A graph rag-based intelligent question answering method, system, device and medium

By constructing the GraphRAG intelligent question answering method and utilizing intent mining and knowledge graph databases, the problem of insufficient accuracy of traditional RAG technology in cross-chapter and cross-document queries is solved, and more accurate and richer answer generation is achieved.

CN119988572BActive Publication Date: 2026-02-27云和恩墨(北京)信息技术有限公司
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510466849.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-15
Publication Date
2026-02-27
Estimated Expiration
2045-04-15

AI Technical Summary

Technical Problem

Traditional RAG technology struggles to provide accurate answers when handling queries across chapters and documents, especially in large-scale language models where there are limitations in parameterized knowledge and information lag, resulting in insufficient accuracy in question-answering systems.

Method used

By constructing a GraphRAG-based intelligent question answering method, utilizing an intent mining model, a knowledge graph database, and a community summary vector database, and combining a hybrid retrieval mechanism of knowledge graph and community summary, we can perform cross-chapter and cross-document query information mining and answer generation.

Benefits of technology

It improves the accuracy and information richness of responses to cross-chapter and cross-document query requests, generating more valuable and accurate answers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119988572B_ABST
    Figure CN119988572B_ABST
Patent Text Reader

Abstract

The application provides an intelligent question answering method and system based on GraphRAG, a device and a medium, and relates to the technical field of artificial intelligence. The method comprises the following steps: performing intention mining on a query text by an intention mining model to obtain a query entity; querying a pre-constructed knowledge graph database according to the query entity to obtain related subgraph information; wherein the knowledge graph database is constructed based on at least one chapter block and chapter block vectors associated with the chapter block in a preset vector database file, and the vector database file is constructed based on multiple chapter blocks; performing retrieval on a pre-constructed community summary vector database according to a vector obtained by vectorizing the query text to obtain related community summary information; and generating an answer to the query text, the related subgraph information and the related community summary information by an answer generation model to obtain a target answer. In summary, the application can improve the accuracy of answers to query requests that require cross-chapter and cross-document queries.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of artificial intelligence, in particular to a GraphRAG-based intelligent question answering method, system, device and medium. BACKGROUND

[0002] In the field of artificial intelligence, intelligent question answering systems have become an important tool for enterprises and organizations to efficiently utilize data resources. Traditional question answering systems mainly rely on rule-based methods or simple retrieval techniques such as keyword matching and vector similarity retrieval. However, with the expansion of data size and the complexity of user needs, as well as the existence of many problems in large-scale language models (LLM) in professional vertical fields or strong timeliness fields, traditional methods have obvious limitations in handling complex semantic relationships and global knowledge. Therefore, Retrieval-Augmented Generation (RAG) technology has emerged as the times require, which enables the system to complete the question answering task in a cost-effective manner.

[0003] However, traditional RAG technology still has deficiencies in handling query requests that require cross-chapter and cross-document queries, resulting in inaccurate answers from the question answering system. For example, if the query request is "AI research trend evolution", the traditional RAG technology may have difficulty matching relevant text across texts (such as papers published on different dates). Therefore, how to provide a question answering method to further improve the accuracy of answers has become a technical problem to be solved. SUMMARY

[0004] The main purpose of the embodiments of the present application is to provide a GraphRAG-based intelligent question answering method, system, device and medium, which can improve the accuracy of answers to query requests that require cross-chapter and cross-document queries.

[0005] To achieve the above-mentioned purpose, the first aspect of the embodiments of the present application proposes a GraphRAG-based intelligent question answering method, which comprises:

[0006] obtaining a query text;

[0007] mining the query text through a pre-trained intent mining model to obtain query intent information; wherein the query intent information includes a query entity;

[0008] querying a pre-constructed knowledge graph database according to the query entity to obtain related subgraph information; wherein the knowledge graph database is constructed based on at least one chapter block and chapter block vectors associated with the chapter block in a pre-set vector database file, and the vector database file is constructed based on a plurality of chapter blocks, and the plurality of chapter blocks belong to two or more documents;

[0009] According to the vectorization of the query text, a pre-constructed community summary vector database is retrieved to obtain relevant community summary information;

[0010] According to the pre-trained answer generation model, the query text, the relevant subgraph information and the relevant community summary information are used to generate answers to obtain target answers.

[0011] In some embodiments, before the query is performed, the method further comprises constructing the knowledge graph database, specifically comprising:

[0012] The plurality of documents are cut into blocks to obtain a plurality of chapter blocks;

[0013] According to the chapter block vectors of each of the plurality of chapter blocks, the vector database file is constructed;

[0014] According to each of the chapter blocks, the chapter block vectors in the vector database file are retrieved for similarity to obtain associated chapter blocks;

[0015] The chapter blocks are combined with the associated chapter blocks to obtain chapter combination data;

[0016] The knowledge graph is constructed according to the chapter combination data;

[0017] The knowledge graph is stored in an initial graph database to obtain the knowledge graph database.

[0018] In some embodiments, the knowledge graph is constructed according to the chapter combination data, comprising:

[0019] The chapter combination data is extracted to obtain target entities;

[0020] The chapter combination data is extracted to obtain the association relationship between any two target entities;

[0021] The chapter combination data is extracted to obtain the entity attributes of the target entities;

[0022] According to the association relationship and the entity attributes, the target entities are merged to obtain merged entities, or according to the association relationship and the entity attributes, the association relationship between the target entities is merged to obtain merged relationships;

[0023] According to at least one of the merged entities and the merged relationships, the knowledge graph is constructed.

[0024] In some embodiments, before the searching, the method further comprises constructing the community summary vector database, specifically comprising:

[0025] performing community detection on the knowledge graphs existing in the knowledge graph database using a preset community discovery algorithm to obtain at least two community subgraphs;

[0026] performing community summarization on the at least two community subgraphs by a community summarization model to obtain community summary information;

[0027] storing the community summary information in a vector form into an initial vector database to obtain the community summary vector database.

[0028] In some embodiments, the at least two community subgraphs comprise a first community subgraph and a second community subgraph; and the performing community summarization on the at least two community subgraphs by the community summarization model to obtain the community summary information comprises:

[0029] analyzing first structured information of the first community subgraph and second structured information of the second community subgraph by the community summarization model to determine a relationship between the first structured information and the second structured information;

[0030] determining the community summary information according to the relationship between the at least two community subgraphs.

[0031] In some embodiments, the performing intent mining on the query text by the pre-trained intent mining model to obtain query intent information specifically comprises:

[0032] performing intent recognition on the query text by an intent recognition module in the intent mining model to obtain an initial intent;

[0033] performing dynamic rewriting on the query text according to the initial intent and a context logic of the query text by a query rewriting module in the intent mining model to obtain a standard query text;

[0034] performing entity recognition on the standard query text by an entity recognition module in the intent mining model to obtain an initial query entity;

[0035] associating the initial intent and the initial query entity by an integration matching module in the intent mining model to obtain a query entity;

[0036] aligning the initial intent, the standard query text and the query entity by an iterative verification module in the intent mining model to obtain the query intent information.

[0037] In some embodiments, the answer generation on the query text, the related subgraph information and the related community summary information by the pre-trained answer generation model obtains a target answer, specifically comprising:

[0038] The related subgraph information and the related community summary information are taken as initial context information; wherein the initial context information includes multiple initial related information;

[0039] The initial context information is arranged according to the relevance between the initial related information and the query intent information by a ranking model, to obtain multiple target related information;

[0040] At least one target related information is taken to form target context information;

[0041] The query text and the target context information are informationally fused to obtain a target query rewriting text;

[0042] The target query rewriting text is subjected to answer generation by a pre-trained answer generation model, to obtain a target answer.

[0043] To achieve the above-mentioned purpose, a second aspect of the embodiment of the present application proposes an intelligent question-answering system based on GraphRAG, which comprises:

[0044] A data acquisition module is configured to acquire a query text;

[0045] An intent mining module is configured to mine the query text by a pre-trained intent mining model to obtain query intent information; wherein the query intent information includes a query entity;

[0046] A knowledge graph query module is configured to query a pre-constructed knowledge graph database according to the query entity to obtain related subgraph information; wherein the knowledge graph database is constructed based on at least one chapter block and chapter block vectors associated with the chapter block in a pre-set vector database file, and the vector database file is constructed based on multiple chapter blocks, and the multiple chapter blocks belong to two or more documents;

[0047] A community summary retrieval module is configured to retrieve a pre-constructed community summary vector database according to the vectorized vector of the query text to obtain related community summary information;

[0048] An answer generation module is configured to generate answers on the query text, the related subgraph information and the related community summary information by a pre-trained answer generation model to obtain a target answer.

[0049] To achieve the above object, a third aspect of the embodiment of the present application provides an electronic device, which comprises a memory and a processor, the memory stores a computer program, and the processor implements the method for intelligent question answering based on GraphRAG when executing the computer program.

[0050] To achieve the above object, a fourth aspect of the embodiment of the present application provides a storage medium, which is a computer readable storage medium, and the storage medium stores a computer program, and the computer program is executed by a processor to implement the method for intelligent question answering based on GraphRAG.

[0051] The method, system, device and medium for intelligent question answering based on GraphRAG provided by the present application firstly grasp the real query intention of the query request by mining the intention of the query text, and preliminarily improve the matching degree of the subsequent answer content and the query request. Secondly, based on at least one chapter block and the chapter block vector associated with the chapter block in the preset vector database file, a knowledge graph database across chapter blocks is constructed, and a community summary vector database is constructed based on the knowledge graph in the knowledge graph database, and the internal relationship between the associated entities is obtained to provide more rich and comprehensive information for the query. Finally, the knowledge graph database and the community summary vector database are retrieved according to the query text and the query intention respectively when retrieving, and relevant subgraph information and relevant community summary information are obtained respectively to form more comprehensive and deeper context information, and more accurate and valuable answer content is generated. In summary, the embodiment of the present application can improve the accuracy of the answer to the query request which needs to query across chapters and documents.

[0052] Other features and advantages of the present application will be set forth in the following description, and in part will become apparent to those skilled in the art from the description, or can be learned by practice of the present application. The objects and other advantages of the present application can be achieved and obtained by the structure particularly pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF DRAWINGS

[0053] Figure 1 is a flowchart of the method for intelligent question answering based on GraphRAG provided by the embodiment of the present application;

[0054] Figure 2 is a flowchart of step S102 in Figure 1

[0055] Figure 3 is a flowchart of step S103 in Figure 1

[0056] Figure 4 Figure 3 ​​​the flowchart of step S305 in

[0057] Figure 5 is Figure 1 the flowchart of step S104 in

[0058] Figure 6 is Figure 5 the flowchart of step S502 in

[0059] Figure 7 is Figure 1 the flowchart of step S105 in

[0060] Figure 8 is a schematic diagram of an intelligent question and answer system based on GraphRAG provided by an embodiment of the present application;

[0061] Figure 9 is a hardware structure schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0062] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application is further described in detail below in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.

[0063] It should be noted that although the functional modules are divided in the device schematic diagram, and the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a manner different from the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification and claims and the above-described drawings are used to distinguish similar objects, and do not necessarily describe a specific order or sequence.

[0064] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the present application belongs. The terms used herein are only for the purpose of describing the embodiments of the present application, and are not intended to limit the present application.

[0065] First, the terms involved in the present application are analyzed:

[0066] Artificial intelligence (AI): is a new technical science that studies and develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence; artificial intelligence is a branch of computer science, artificial intelligence attempts to understand the essence of intelligence and produce a new intelligent machine that can react in a similar way to human intelligence, the research in this field includes robots, language recognition, image recognition, natural language processing and expert systems, etc. Artificial intelligence can simulate the information process of human consciousness and thinking.

[0067] Natural language processing (NLP): NLP uses computers to process, understand and use human languages (such as Chinese, English, etc.), NLP is a branch of artificial intelligence and is an interdisciplinary subject of computer science and linguistics, and is also commonly known as computational linguistics. Natural language processing includes syntax analysis, semantic analysis, discourse understanding, etc. Natural language processing is commonly used in machine translation, handwritten and printed character recognition, speech recognition and text-to-speech conversion, information intent recognition, information extraction and filtering, text classification and clustering, hot topic analysis and opinion mining, etc. It involves data mining, machine learning, knowledge acquisition, knowledge engineering, artificial intelligence research related to language processing, and language computing related linguistic research.

[0068] Retrieval-Augmented Generation (RAG) is an advanced natural language processing technique that combines information retrieval and text generation, aiming to improve the accuracy and information richness of generated models. The RAG model consists of two core components: retriever and generator. First, the retriever retrieves relevant documents or paragraphs from a large external knowledge base (such as Wikipedia or a specific domain database) based on the input query, extracting the most relevant information; then, the generator generates coherent and information-rich text output based on the retrieved information. Unlike traditional generation models, RAG not only relies on the parameterized knowledge of pre-trained language models, but also dynamically introduces external non-parameterized knowledge, effectively solving the problem of knowledge limitations or information obsolescence that may occur during model generation. This method performs well in question-answering systems, dialogue generation and knowledge-intensive tasks, and can generate more accurate and reliable text content.

[0069] In the field of artificial intelligence technology, intelligent question answering systems have become an important tool for enterprises and organizations to efficiently utilize data resources. Traditional question answering systems mainly rely on rule-based methods or simple retrieval techniques such as keyword matching and vector similarity retrieval. These methods perform well in handling structured data and simple queries, but struggle when faced with large-scale, complex semantics, and dynamic knowledge. Especially in large-scale language models (LLM) in professional vertical fields or strong timeliness scenarios, due to the limitations of parameterized knowledge and the lag of training data, it is often difficult to provide accurate and real-time answers.

[0070] In related technologies, to solve these problems, Retrieval-Augmented Generation (RAG) technology has emerged. By combining external knowledge retrieval and generation models, non-parametric knowledge is dynamically introduced to improve the performance of question answering systems at a lower cost. However, RAG technology itself still has some significant problems. First, in the retrieval stage, traditional RAG technology usually relies on a single retriever, making it difficult to effectively handle complex query requests that require cross-chapter, cross-document, or cross-time dimensions. Second, in the generation stage, RAG models lack deep semantic integration capabilities for retrieved information, making it difficult to effectively integrate multi-source knowledge, thereby affecting the efficiency and accuracy of generated answers. In addition, RAG technology still relies on the update frequency of external knowledge bases when dealing with time-sensitive knowledge, and cannot capture the latest information in real time. These problems limit the application effect of RAG technology in complex scenarios.

[0071] Therefore, how to provide an intelligent question answering method, system, device and medium based on GraphRAG, which can improve the accuracy of answers to query requests that require cross-chapter and cross-document queries, has become a technical problem to be solved.

[0072] Therefore, how to provide an intelligent question answering method, system, device and medium based on GraphRAG, which can improve the accuracy of answers to query requests that require cross-chapter and cross-document queries, has become a technical problem to be solved.

[0073] The intelligent question answering method based on GraphRAG provided in the embodiments of the present application is applied to a server end, and can also be software running in a terminal or a server end. The server end can be configured as a stand-alone physical server, or a server cluster or a distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs, and big data and artificial intelligence platforms. The software can be an application that implements the query statement generation method based on the syntax analysis tree, but is not limited to the above forms.

[0074] The present application can be used in many general or special computer system environments or configurations. For example: server computers, multi-processor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, distributed computing environments including any of the above systems or devices, and the like. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, and the like that perform specific tasks or implement specific abstract data types. The present application can also be practiced in a distributed computing environment, in which tasks are performed by remote processing devices connected by a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media, including storage devices.

[0075] The embodiments of the present application provide an intelligent question answering method, system, device and medium based on GraphRAG. The embodiments are specifically described as follows: first, a method for intelligent question answering based on GraphRAG in the embodiments of the present application is described.

[0076] It should be noted that in each specific embodiment of the present application, when it is necessary to process relevant data related to the identity or characteristics of the user according to user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first, and the collection, use and processing of these data will comply with relevant laws, regulations and standards. In addition, when the embodiments of the present application need to obtain sensitive personal information of the user, the separate permission or separate consent of the user will be obtained through a pop-up window or a jump to a confirmation page, and after obtaining the separate permission or separate consent of the user, the necessary user-related data for the normal operation of the embodiments of the present application will be obtained.

[0077] Figure 1 is an optional flowchart of the intelligent question answering method based on GraphRAG provided by the embodiments of the present application, which can include but is not limited to steps S101 to S105.

[0078] In step S101, the query text is obtained.

[0079] In step S102, the query text is subjected to intent mining through a pre-trained intent mining model to obtain query intent information; the query intent information includes query entities.

[0080] In step S103, the pre-constructed knowledge graph database is queried according to the query entities to obtain relevant subgraph information; the knowledge graph database is constructed based on at least one chapter block and chapter block vectors associated with the chapter block in a preset vector database file; the vector database file is constructed based on a plurality of chapter blocks, and the plurality of chapter blocks belong to two or more documents.

[0081] In step S104, the pre-constructed community summary vector database is searched according to the vector of the vectorized query text to obtain relevant community summary information.

[0082] In step S105, the query text, the relevant subgraph information and the relevant community summary information are subjected to answer generation through a pre-trained answer generation model to obtain a target answer.

[0083] The steps S101 to S105 shown in the embodiments of the present application first mine the query text to grasp the real query intent of the query request, thereby preliminarily improving the matching degree of the subsequent answer content and the query request. Secondly, the knowledge graph database across chapter blocks is constructed based on at least one chapter block and chapter block vectors associated with the chapter block in a preset vector database file, and the community summary vector database is constructed based on the knowledge graph in the knowledge graph database, thereby providing more rich and comprehensive information for the query by obtaining the internal relationship between the associated entities. Finally, the knowledge graph database and the community summary vector database are searched according to the query text and the query intent respectively to obtain the relevant subgraph information and the relevant community summary information respectively, thereby forming more comprehensive and deeper context information, and generating more accurate and valuable answer content.

[0084] It should be noted that the query text referred to in the present application refers to text content expressed in natural language form and intended to obtain specific information or solve problems. The query text has a wide and diverse source, which can be a question input by a user through an interface, a system-generated instruction, information generated in a device interaction process, a text generated by a robot according to a user instruction, an instruction or question transmitted between servers, and a query generated by a client device according to a user operation or a preset task.

[0085] In step S101 of some embodiments, the form of the obtained query text is not limited to traditional text input, but can also include multimedia forms such as voice, video, and image. These forms are converted into natural language text by different input methods, and then trigger the subsequent processing steps. Generally, the query text can correspond to two cases of simple query and complex query. Specifically, simple query refers to those queries that can be quickly answered by matching information in the knowledge base or following explicit syntax rules. For example, "Python method for converting a string to an integer" or "Who is the winner of the 2023 Nobel Prize in Literature". Complex queries contain multiple intents, multiple entities, complex semantic structures, or rely on specific background information, which is the reason why the subsequent answer content may not match the query intent. For example, the user query "Science fiction novel series suitable for 10-year-old children" includes not only the two premises "suitable for 10-year-old children" and "science fiction novel series", but also implies that the content should be healthy and safe.

[0086] In step S102 of some embodiments, for the obtained query text, natural language processing techniques are used to mine the query text for intent to obtain the true query intent of the query text. Specifically, a large language model (LLM) is used for intent recognition, query rewriting, and entity extraction to implement intent mining, and a chain of thought (CoT) progressive reasoning mechanism is used to implement multi-task collaborative processing.

[0087] Please refer to Figure 2 In some embodiments, step S102 can include but is not limited to steps S201 to S205:

[0088] Step S201, through the intent recognition module in the intent mining model, the query text is subjected to intent recognition to obtain an initial intent;

[0089] Step S202, through the query rewriting module in the intent mining model, the query text is dynamically rewritten according to the initial intent and the context logic of the query text to obtain a standard query text;

[0090] Step S203, through the entity recognition module in the intent mining model, the standard query text is subjected to entity recognition to obtain an initial query entity;

[0091] Step S204, through the integration matching module in the intent mining model, the initial intent and the initial query entity are associated to obtain a query entity;

[0092] In step S205, the initial intent, the standard query text, and the query entity are aligned by an iterative verification module in the intent mining model to obtain query intent information.

[0093] The steps S201 to S205 shown in the embodiments of the present application first decompose semantics and make potential intent assumptions based on the query text by the intent recognition module in the LLM to separate the initial intent from the complex context. For example, “Sichuan restaurant recommendation” is extracted from the query text “Recommend a Sichuan restaurant, a little better” with additional requirements such as “high rating” and “elegant environment”. Then, the query text is dynamically rewritten by the query rewriting module in combination with the initial intent and context logic to supplement implicit conditions and eliminate ambiguity. For example, “Recommend a Sichuan restaurant, a little better” is rewritten as “Recommend a Sichuan restaurant with high rating and elegant environment”. Then, the entity in the query text is identified by the entity recognition module. For example, “Sichuan restaurant” is identified as an entity. Then, the self-attention mechanism in the integration matching module is used to capture the association between the initial query entity and the initial intent to perform entity extraction, such as identifying “Sichuan restaurant” and strengthening the “high rating” attribute to extract the query entity “selected Sichuan restaurant”. Finally, the intent assumption, the rewritten query text, and the query entity are aligned by the iterative verification module to form a closed loop optimization, ensuring that each link decision is based on semantic consistency, and achieving end-to-end accurate semantic analysis. This process solves the problems of inaccurate intent recognition and incomplete entity extraction in traditional methods in complex query processing, improving the accuracy and efficiency of semantic analysis, and thus improving the matching degree of the answer content and the query intent.

[0094] It should be noted that the multi-layer self-attention mechanism based on the Transformer architecture of the LLM can model long-distance dependencies and capture the implicit intent logic in the query through global interaction between word vectors, such as inferring the composite intent of “value for money” and “environmental requirements” from “not too expensive and quiet coffee shop”. Secondly, the pre-training of massive corpus enables the model to have the implicit encoding ability of generalizing real knowledge and expression patterns, which can identify the real demand behind unconventional expressions, such as mapping “a place suitable for eating with children” to the entity label “kid-friendly restaurant”. Finally, in the fine-tuning stage, the complex problem is decomposed into interpretable sub-steps (such as intent assumption, context completion, and entity disambiguation) by the instruction alignment mechanism and CoT, effectively reducing the error propagation caused by semantic gap.

[0095] In step S103 of some embodiments, the pre-constructed knowledge graph database is queried according to the query entity in the query intention, and relevant subgraph information is obtained. Specifically, the query entity is input into the knowledge graph database for graph query, and a predetermined number of subgraphs are recalled which are similar to the query entity, and relevant subgraph information is obtained. By mining the locally extensive associated subgraph information and the potential association between entities in the graph database, more comprehensive and rich context is provided for the subsequent generation of answer content, and the accuracy and globality of the answer are improved.

[0096] It should be noted that the subgraph of a predetermined number (such as 3) of hops refers to starting from the query entity and traversing along the relationship edges in the knowledge graph for a predetermined number (3) of steps (hops), thereby obtaining entities and their relationship networks that are directly or indirectly related to the query entity. For example, in a big data-based scenario, if the query entity is "user behavior data", the first hop may recall "data collection system" and "data storage platform" which are directly related to it, the second hop may further expand to "log collection tool" related to "data collection system" or "distributed database" related to "data storage platform", and the third hop may extend to "real-time data stream processing" in "log collection tool" or "data partitioning strategy" in "distributed database" and other information. In addition, the method for determining that the query entity is similar and associated with the subgraph usually includes graph query algorithm, semantic similarity calculation, and keyword matching. Taking the keyword matching method as an example, if the query entity is "database write delay", the corresponding entity in the graph is matched to "database write delay is too high", "database write delay increases", and other entity nodes.

[0097] Please refer to Figure 3 In some embodiments, step S103 can include but is not limited to steps S301 to S306:

[0098] Step S301, performing block processing on a plurality of documents to obtain a plurality of chapter blocks;

[0099] Step S302, constructing a vector database file according to the chapter block vectors of the plurality of chapter blocks;

[0100] Step S303, performing similarity retrieval on the chapter block vectors in the vector database file according to each chapter block, to obtain associated chapter blocks;

[0101] Step S304, combining the chapter blocks with the associated chapter blocks to obtain chapter combination data;

[0102] Step S305, constructing a knowledge graph according to the chapter combination data;

[0103] Step S306, storing the knowledge graph into an initial graph database to obtain a knowledge graph database.

[0104] The steps S301 to S306 shown in the embodiments of the present application first obtain chapter blocks by cutting a plurality of documents, and construct a vector database file based on the vectorization of the chapter blocks; then, similarity retrieval is performed on the current chapter block, and the methods commonly used for similarity retrieval include cosine similarity, Jaccard similarity coefficient, model-based similarity calculation, etc. In some embodiments, cosine similarity is used for retrieval, and the associated chapter blocks with a similarity exceeding a threshold of 0.8 are recalled, combined with the current chapter block to form chapter combination data, so as to integrate the information across chapter blocks and mine the association relationship between similar entities, and then construct a knowledge graph and store it in a graph database. In this way, comprehensive knowledge can be provided for global problems, and the performance of the knowledge graph in information integration and global knowledge supplement is improved.

[0105] It should be noted that the documents referred to in the present application are usually derived from enterprise internal business systems, such as customer relationship management systems, enterprise resource planning systems, project management systems, etc. A large amount of business data and document materials are accumulated in these systems. In addition, the documents may also come from external data sources, including industry reports, market research data, materials provided by partners, and public industry standards and specifications, etc. Then the above data is preprocessed to improve data quality and enrich data content, laying a solid foundation for subsequent analysis. Specifically, data cleaning is performed to remove redundant and invalid information, website links are crawled to obtain more associated content, OCR technology is used to recognize and convert the text in the pictures, and formulas and tables are recognized and converted into natural language form.

[0106] Please refer to Figure 4 In some embodiments, step S305 can include but is not limited to steps S401 to S405:

[0107] Step S401, entity extraction is performed on the chapter combination data to obtain target entities;

[0108] Step S402, entity relationship extraction is performed on the chapter combination data to obtain the association relationship between any two target entities;

[0109] Step S403, entity attribute extraction is performed on the chapter combination data to obtain the entity attributes of the target entities;

[0110] Step S404, entity merging is performed on the plurality of target entities according to the association relationship and the entity attributes to obtain merged entities; or, relationship merging is performed on the association relationship between the plurality of target entities according to the association relationship and the entity attributes to obtain merged relationships;

[0111] Step S405, a knowledge graph is constructed according to at least one of the merged entities and the merged relationships.

[0112] The steps S401 to S405 shown in the embodiments of the present application are to extract entities, relationships and attributes from the chapter combination data, and then merge the extracted entities or relationships based on the association relationship and entity attribute, unify the naming and eliminate the redundancy. This process reduces the size of the graph, improves the construction efficiency and accuracy. Specifically, by merging entities and relationships with similar or repetitive characteristics, the number of nodes and edges in the graph is reduced, while the key information is retained, thereby optimizing the graph structure, reducing the storage and computing cost, and improving the query efficiency on the premise of ensuring the data information quality. For example, assuming that there are two entities "Apple Inc." and "Apple Inc." in the original graph, they point to the same concept, but have their own attributes and relationships. By merging the two entities into a unified "Apple Inc.", the size of the graph is reduced, but the information is more concentrated and accurate. When querying the products of "Apple Inc.", the user can directly obtain all the relevant information, without the query results being scattered or repeated due to redundant entities.

[0113] In step S104 of some embodiments, the pre-constructed community summary vector database is retrieved according to the vectorized vector of the query text to obtain relevant community summary information; specifically, when retrieving, the cosine similarity method is used to recall community summaries with a similarity threshold greater than 0.8, thereby obtaining global community summary information that matches the semantics of the query text, providing more comprehensive and rich context for the generation of subsequent answer content, and improving the retrieval effect and accuracy.

[0114] Please refer to Figure 5 In some embodiments, step S104 can include but is not limited to steps S501 to S503:

[0115] Step S501, using a preset community discovery algorithm to detect communities in the knowledge graph in the knowledge graph database, to obtain at least two community subgraphs;

[0116] Step S502, performing community summarization on the at least two community subgraphs through a community summarization model to obtain community summary information;

[0117] Step S503, storing the vectorized community summary information into an initial vector database to obtain a community summary vector database.

[0118] The steps S501 to S503 shown in the embodiments of the present application, the community summary can extract entity sets with similar characteristics or themes and generate concise summary information through clustering analysis of entities and relationships in the knowledge graph. This summary information provides more rich context support for query, so that the system can understand the intention of the user query at a more macro level, thereby quickly positioning to the community or theme field related to the query.

[0119] It should be noted that the commonly used community discovery algorithms include Louvain algorithm, Leiden algorithm and Girvan-Newman algorithm, etc., and the Leiden algorithm is used in some embodiments. At the same time, based on the optimized knowledge graph, the community discovery algorithm can more efficiently and accurately divide the community, enhance the semantic representativeness of the community summary, so that the summary information can more accurately reflect the core theme and key information of the community, to improve the quality and richness of the search content, and improve the accuracy of the answer content.

[0120] In step S502 of some embodiments, the at least two community subgraphs include a first community subgraph and a second community subgraph.

[0121] Please refer to Figure 6 In some embodiments, step S502 can include but is not limited to steps S601 to S602:

[0122] Step S601, analyzing the first structured information of the first community subgraph and the second structured information in the second community subgraph by the community summary model, for determining the relationship between the first structured information and the second structured information;

[0123] Step S602, determining the community summary information according to the relationship between the at least two community subgraphs.

[0124] In step S601 of some embodiments, the system uses the community summary model to deeply analyze the first structured information of the first community subgraph and the second structured information of the second community subgraph. The structured information refers to the set of nodes, edges and their attributes in the community subgraph, which fully reflects the topological structure and semantic content of the community subgraph. The community summary model analyzes these structured information, identifies node types, edge semantics and attribute values, and determines the relationship between the two community subgraphs. For example, the model can find the similarity or complementarity of the two community subgraphs in theme, or identify their hierarchical relationship or dependency relationship in the knowledge system.

[0125] In step S602 of some embodiments, the system generates community summary information that can comprehensively reflect the core content of the at least two community subgraphs according to the relationship between the community subgraphs determined in step S601. The generation process of the community summary information is based on the relationship between the community subgraphs, and the structured information thereof is integrated and refined. For example, if two community subgraphs have complementary themes, the community summary model will organically integrate their core content to generate a summary information that comprehensively covers the themes of both; if there is a hierarchical relationship between them, the summary information will be organized according to the hierarchical structure, clearly showing the position and role of each community subgraph in the knowledge system. In this way, the community summary information can not only accurately reflect the core content of a single community subgraph, but also reflect the association between community subgraphs and the overall knowledge structure.

[0126] Through steps S601 to S602, the embodiment can accurately analyze and summarize the relationship between multiple community subgraphs and generate comprehensive community summary information. This process not only enriches the semantic expression of the knowledge graph, but also provides more comprehensive and in-depth knowledge support for the generation of subsequent answers, to generate more accurate and comprehensive answers.

[0127] In step S105 of some embodiments, the system uses a pre-trained answer generation model to analyze and process the query text, related subgraph information, and related community summary information as inputs, and finally generates a precise and comprehensive target answer. The answer generation model is a natural language processing model based on deep learning, which usually uses sequence generation or text generation technology and can generate natural and coherent text output according to multiple information inputs. In this step, the query text provides the core intent and background information of the original question; the related subgraph information extracts structured knowledge related to the query entity from the knowledge graph, including the relationship and attributes between entities, providing precise knowledge support for the answer; and the related community summary information provides a general understanding of related topics in the knowledge graph, which helps to organize and cohere the answer. The answer generation model can generate a target answer that not only meets the user's query intent, but also has a rich knowledge background and logical coherence by integrating these multiple sources of information. For example, when the user queries "the latest application of artificial intelligence in the medical field", the model will combine the entity relationships about artificial intelligence and the medical field in the knowledge graph, as well as the latest research trends and application cases mentioned in the community summary, to generate a complete answer that covers technical details, application scenarios, and trend analysis. This process not only improves the accuracy and authority of the answer, but also enhances the intelligence level of the question and answer system, providing more valuable information to the user.

[0128] Please refer to Figure 7In some embodiments, step S105 can include but is not limited to steps 701-705:

[0129] Step S701, the relevant subgraph information and the relevant community summary information are integrated as initial context information; wherein the initial context information includes a plurality of initial relevant information;

[0130] Step S702, arranging the initial context information according to the relevance between the initial relevant information and the query intent information through a ranking model, to obtain a plurality of target relevant information;

[0131] Step S703, at least one target relevant information is combined to form target context information;

[0132] Step S704, information fusion is performed on the query text and the target context information to obtain a target query rewriting text;

[0133] Step S705, an answer is generated for the target query rewriting text through a pre-trained answer generation model to obtain a target answer.

[0134] Through steps S701-S705, the quality and efficiency of the answer content generation are improved. First, step S701 integrates the relevant subgraph information and the relevant community summary information into the initial context information, which can integrate multiple information and provide a richer and deeper knowledge base for answer generation. Then, step S702 filters and sorts the initial context information through the ranking model to ensure that only information segments highly related to the query intent are retained, thereby improving the relevance and pertinence of the information. Step S703 further combines the target relevant information into the target context information to further optimize the input quality. Step S704 combines the query text and the target context information through information fusion to generate a target query rewriting text, so that the answer generation model can process based on more comprehensive and accurate information. Finally, step S705 uses a pre-trained answer generation model to generate a high-quality target answer based on the target query rewriting text. The close cooperation of these steps not only ensures the accuracy and comprehensiveness of the answer, but also improves the efficiency and experience of the answering process.

[0135] It should be noted that in some embodiments, the ranking model adopted is, for example, a Transformer-based cross-attention model or a Learning to Rank model, which scores the retrieval results according to the relevance between the context and the user query. The scoring criteria are mainly based on the following aspects: semantic similarity, information integrity, importance, context quality, etc. Then, the retrieval results are arranged in descending order according to the scores given by the ranking model, and the contents below the threshold are filtered. Thus, the query request is accurately matched, irrelevant information interference is reduced, and the key information is quickly located when generating the answer content.

[0136] Please refer to Figure 8 The embodiment of the application also provides an intelligent question answering system based on GraphRAG, which can implement the intelligent question answering method based on GraphRAG. Figure 8 The embodiment of the application provides a module structure block diagram of an intelligent question answering system based on GraphRAG, which includes a data acquisition module 801, an intention mining module 802, a knowledge graph query module 803, a community summary retrieval module 804, and an answer generation module 805. The data acquisition module 801 is used to acquire query text. The intention mining module 802 is used to mine the query text through a pre-trained intention mining model to obtain query intention information. The query intention information includes query entities. The knowledge graph query module 803 is used to query a pre-constructed knowledge graph database according to the query entities to obtain related subgraph information. The knowledge graph database is constructed based on at least one chapter block and chapter block vectors associated with the chapter block in a preset vector database file. The vector database file is constructed based on a plurality of chapter blocks, and the plurality of chapter blocks belong to two or more documents. The community summary retrieval module 804 is used to retrieve a pre-constructed community summary vector database according to the vectors of the vectorized query text to obtain related community summary information. The answer generation module 805 is used to generate answers to the query text, the related subgraph information, and the related community summary information through a pre-trained answer generation model to obtain target answers.

[0137] It should be noted that the specific implementation of the intelligent question answering system based on GraphRAG is basically the same as the specific embodiment of the intelligent question answering method based on GraphRAG, and will not be repeated here.

[0138] The embodiment of the application also provides an electronic device, which includes:

[0139] at least one memory;

[0140] at least one processor;

[0141] at least one program;

[0142] The program is stored in the memory, and the processor executes the at least one program to implement the above-mentioned GraphRAG-based intelligent question answering method. The electronic device can be any intelligent terminal including a mobile phone, a tablet computer, a personal digital assistant (PDA), a vehicle-mounted computer, etc.

[0143] Please refer to Figure 9 , Figure 9 The hardware structure of the electronic device of another embodiment is illustrated, and the electronic device includes:

[0144] The processor 901 can be implemented in the form of a general-purpose CPU (Central Processing Unit), a microprocessor, an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits, etc., for executing related programs to implement the technical solutions provided by the embodiments of the present application;

[0145] The memory 902 can be implemented in the form of a ROM (Read Only Memory), a static storage device, a dynamic storage device, or a RAM (Random Access Memory), etc. The memory 902 can store an operating system and other application programs, and when the technical solutions provided by the embodiments of the present application are implemented by software or firmware, the related program codes are saved in the memory 902 and called and executed by the processor 901 to implement the GraphRAG-based intelligent question answering method;

[0146] The input / output interface 903 is used to realize information input and output;

[0147] The communication interface 904 is used to realize the communication interaction between the device and other devices, which can realize communication through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.);

[0148] The bus 905 transmits information between various components (such as the processor 901, the memory 902, the input / output interface 903, and the communication interface 904) of the device;

[0149] The processor 901, the memory 902, the input / output interface 903, and the communication interface 904 are connected to each other through the bus 905 for internal communication in the device.

[0150] The embodiment of the application further provides a storage medium, which is a computer readable storage medium, and the storage medium stores a computer program, and the computer program is executed by a processor to implement the intelligent question answering method based on GraphRAG.

[0151] The memory is a non-transitory computer readable storage medium, and can be used to store a non-transitory software program and a non-transitory computer executable program. In addition, the memory can include a high-speed random access memory, and can also include a non-transitory memory, for example, at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state memory device. In some embodiments, the memory can optionally include a memory remotely arranged relative to the processor, and the remote memory can be connected to the processor through a network. Examples of the network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0152] The intelligent question answering method based on GraphRAG, the intelligent question answering system based on GraphRAG, the electronic device, and the storage medium provided by the embodiment of the application first grasp the real query intention of the query request by performing intention mining on the query text, and preliminarily improve the matching degree of the subsequent answer content and the query request. Secondly, a knowledge graph database across chapter blocks is constructed based on at least one chapter block and a chapter block vector associated with the chapter block in a preset vector database file, and a community summary vector database is constructed based on a knowledge graph in the knowledge graph database, so that the internal relationship between associated entities is obtained, and more rich and comprehensive information is provided for the query. Finally, the knowledge graph database and the community summary vector database are searched according to the query text and the query intention during the search, and relevant subgraph information and relevant community summary information are obtained, respectively, to form more comprehensive and deeper context information, and more accurate and valuable answer content is generated. In summary, the embodiment of the application can improve the accuracy of the answer to the query request requiring cross-chapter and cross-document query.

[0153] The embodiments described in the embodiment of the application are used to more clearly illustrate the technical solutions of the embodiment of the application, and do not constitute a limitation on the technical solutions provided by the embodiment of the application. Those skilled in the art can know that, with the evolution of technology and the appearance of new application scenarios, the technical solutions provided by the embodiment of the application are also applicable to similar technical problems.

[0154] Those skilled in the art can understand that the technical solutions shown in the figures do not constitute a limitation on the embodiment of the application, and can include more or fewer steps than the figures, or combine certain steps, or different steps.

[0155] The apparatus embodiments described above are merely exemplary, and the units described as separate units can or can not be physically separate, i.e., can be located in one place, or can be distributed over multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the embodiment.

[0156] Those skilled in the art can understand that all or some of the steps in the method disclosed above, the functional modules / units in the system and the device can be implemented as software, firmware, hardware and appropriate combinations thereof.

[0157] The terms "first", "second", "third", "fourth" and the like in the description of the application and in the claims of the foregoing drawings, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the use of the terms so construed can be interchanged, such that, for example, without departing from the scope of the application, the embodiments described herein can be carried out in a different order than the one illustrated or described herein. In addition, the terms "comprising", "having" and any variations thereof are intended to cover a non-exclusive inclusion, for example, a process, method, system, product or apparatus that comprises a list of steps or units not necessarily limited to those explicitly listed, but can include other not expressly listed or inherent to such processes, methods, products or apparatus.

[0158] It should be understood that in this application, "at least one" means one or more, and "multiple" means two or more. "And / or" is used to describe the relationship between the associated objects, which means that there can be three relationships, for example, "A and / or B" can mean that there are three cases: only A, only B, and A and B at the same time, where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects. "At least one of the following" or similar expressions means any combination of these items, including any combination of single or multiple items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0159] In several embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented by other manners. For example, the apparatus embodiments described above are merely illustrative, for example, the division of the above units is merely a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. The coupling or direct coupling or communication connection between the units or components shown or discussed can be indirect coupling or communication connection through some interfaces, apparatuses or units, and can be electrical, mechanical or other forms.

[0160] The units described above as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they can be located in one place or distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.

[0161] In addition, the functional units in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.

[0162] If the integrated unit is realized in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the part of the prior art that contributes to the technical solutions or all or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method of each embodiment of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various program storage media.

[0163] The preferred embodiments of the embodiments of the present application are described above with reference to the accompanying drawings, but this does not limit the scope of the embodiments of the present application. Any modifications, equivalent replacements and improvements made by those skilled in the art without departing from the scope and essence of the embodiments of the present application shall be within the scope of the embodiments of the present application.

Claims

1. A GraphRAG-based intelligent question answering method, characterized in that, The method comprises: acquiring query text; performing intent recognition on the query text by an intent recognition module in a pre-trained intent mining model to obtain an initial intent; wherein the intent recognition module is a large-scale language model based on a Transformer architecture; performing dynamic rewriting on the query text according to the initial intent and the context logic of the query text by a query rewriting module in the intent mining model to obtain standard query text; performing entity recognition on the standard query text by an entity recognition module in the intent mining model to obtain initial query entities; associating the initial intent and the initial query entities by an integration matching module in the intent mining model to obtain query entities; aligning the initial intent, the standard query text and the query entities by an iterative verification module in the intent mining model to obtain query intent information; wherein the query intent information comprises query entities; performing chunking processing on a plurality of documents to obtain a plurality of chapter blocks; constructing a vector database file according to chapter block vectors of the plurality of chapter blocks; performing similarity retrieval on chapter block vectors in the vector database file according to each chapter block to obtain associated chapter blocks; combining the chapter blocks and the associated chapter blocks to obtain chapter combination data; constructing a knowledge graph according to the chapter combination data; storing the knowledge graph into an initial graph database to obtain a knowledge graph database; querying a pre-constructed knowledge graph database according to the query entities to obtain relevant subgraph information; wherein the knowledge graph database is constructed based on at least one chapter block and chapter block vectors associated with the chapter block in a preset vector database file, the vector database file is constructed based on a plurality of chapter blocks, and the plurality of chapter blocks belong to two or more documents; performing retrieval on a pre-constructed community summary vector database according to vectors of the query text after vectorization, recalling community summaries with a similarity greater than 0.8 using a cosine similarity method, and obtaining relevant community summary information; generating an answer by a pre-trained answer generation model based on the query text, the relevant subgraph information and the relevant community summary information to obtain a target answer.

2. The method of claim 1, wherein, The construction of the knowledge graph according to the chapter combination data comprises: performing entity extraction on the chapter combination data to obtain target entities; performing entity relationship extraction on the chapter combination data to obtain the association relationship between any two target entities; performing entity attribute extraction on the chapter combination data to obtain the entity attribute of the target entity; performing entity merging on a plurality of target entities according to the association relationship and the entity attribute to obtain merged entities; or performing relationship merging on the association relationship between a plurality of target entities according to the association relationship and the entity attribute to obtain merged relationships; constructing the knowledge graph according to at least one of the merged entities and the merged relationships.

3. The method of claim 1, wherein, Before the retrieval, the method further comprises constructing the community summary vector database, specifically comprising: The knowledge graphs in the knowledge graph database are used to perform community detection using a preset community detection algorithm to obtain at least two community subgraphs; Community summary information is obtained by summarizing at least two of the community subgraphs using a community summary model. The community summary information is vectorized and stored in the initial vector database to obtain the community summary vector database.

4. The method of claim 3, wherein, The at least two community subgraphs include a first community subgraph and a second community subgraph; The process of summarizing at least two community subgraphs using a community summarization model to obtain community summary information includes: The community summary model is used to analyze the first structured information of the first community subgraph and the second structured information of the second community subgraph to determine the relationship between the first structured information and the second structured information. The community summary information is determined based on the relationship between at least two community subgraphs.

5. The method according to any one of claims 1 to 4, characterized in that, The step of generating an answer from the query text, the relevant subgraph information, and the relevant community summary information using a pre-trained answer generation model to obtain the target answer specifically includes: The relevant subgraph information and the relevant community summary information are used as initial context information; wherein, the initial context information includes multiple initial related information; The initial context information is arranged according to the correlation between the initial relevant information and the query intent information using a sorting model to obtain multiple target-related information; At least one target-related information is used to form the target context information; The query text and the target context information are fused to obtain the target query rewritten text; The target answer is obtained by generating an answer from the rewritten text of the target query using a pre-trained answer generation model.

6. A GraphRAG-based intelligent question answering system, characterized in that, The system includes: The data acquisition module is used to acquire the query text; An intent mining module is used to identify the intent of a query text using an intent recognition module within a pre-trained intent mining model to obtain an initial intent; wherein the intent recognition module is a large-scale language model based on the Transformer architecture; a query rewriting module within the intent mining model dynamically rewrites the query text according to the initial intent and the contextual logic of the query text to obtain standard query text; an entity recognition module within the intent mining model identifies entities in the standard query text to obtain initial query entities; an integration matching module within the intent mining model associates the initial intent and the initial query entities to obtain query entities; and an iterative verification module within the intent mining model aligns the initial intent, the standard query text, and the query entities to obtain query intent information; wherein the query intent information includes query entities; The knowledge graph query module is configured to query a pre-constructed knowledge graph database according to the query entity, and obtain relevant subgraph information; wherein the knowledge graph database is constructed based on at least one chapter block and chapter block vectors associated with the chapter block in a pre-set vector database file, the vector database file is constructed based on a plurality of chapter blocks, and the plurality of chapter blocks belong to two or more documents; The community summary retrieval module is configured to retrieve a pre-constructed community summary vector database according to a vector obtained by vectorizing the query text, and use a cosine similarity method to recall community summaries with a similarity greater than 0.8, and obtain relevant community summary information; The answer generation module is configured to generate an answer for the query text, the relevant subgraph information and the relevant community summary information by using a pre-trained answer generation model, and obtain a target answer. Before the knowledge graph database is queried according to the query entity, the system is further configured to: perform block processing on a plurality of documents to obtain a plurality of chapter blocks; construct a vector database file based on chapter block vectors of the plurality of chapter blocks; perform similarity retrieval on chapter block vectors in the vector database file according to each chapter block to obtain associated chapter blocks; combine the chapter blocks and the associated chapter blocks to obtain chapter combination data; construct a knowledge graph based on the chapter combination data; and store the knowledge graph into an initial graph database to obtain the knowledge graph database.

7. An electronic device, comprising: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the method of any one of claims 1 to 5 when executing the computer program.

8. A storage medium, characterized by The storage medium is a non-volatile computer readable storage medium, and the non-volatile computer readable storage medium stores at least one program, each program includes instructions, and the instructions make the terminal execute the method according to any one of claims 1 to 5 when the terminal executes.

Citation Information

Patent Citations

  • Intelligent question and answer method and device, electronic equipment and storage medium

    CN119357319A

  • Intelligent question answering system and method based on question decomposition and community semantic search

    CN119537539A

  • Knowledge base index construction optimization method and device based on large model

    CN119760178A