Intelligent question answering methods, devices, equipment, media and program products
By constructing a multi-granularity hypergraph for problem decomposition and knowledge retrieval, the problems of single semantic granularity and insufficient multi-hop reasoning ability in existing intelligent question answering systems are solved, realizing efficient, accurate and interpretable intelligent question answering for complex questions.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- PURPLE MOUNTAIN LAB
- Filing Date
- 2026-03-26
- Publication Date
- 2026-06-30
AI Technical Summary
Existing vector-based RAG methods suffer from limited semantic granularity, flat association modeling, and multi-hop reasoning capabilities, making it difficult to meet users' accuracy requirements for intelligent question answering in deep understanding and complex problem reasoning.
We construct a multi-granularity hypergraph based on four granularities: paragraph, sentence, fact, and entity. We adaptively select the appropriate granularity for knowledge retrieval. Through problem decomposition and multi-granularity hypergraph retrieval, we build an explicit and interconnected knowledge network, improving the accuracy and interpretability of multi-hop reasoning.
It improves the accuracy and efficiency of searching for complex questions, provides more solid and structured knowledge support, and enhances the accuracy and interpretability of intelligent question answering.
Smart Images

Figure CN122309664A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and in particular to an intelligent question-answering method, apparatus, device, medium, and program product. Background Technology
[0002] With the rapid development of technology, intelligent question-answering products that use natural language processing technology to answer user questions are emerging in large numbers. Traditional intelligent question-answering systems are mainly retrieval-based question answering systems based on keyword matching or rule-based systems based on templates. The accuracy and flexibility of their answers are limited by the completeness of the rule base and semantic understanding capabilities.
[0003] In recent years, with the rise of large-scale pre-trained language models (also known as Large Language Models, LLMs) and retrieval-augmented generation (RAG) technologies, question answering systems have made significant progress in open-domain and multi-step reasoning tasks. However, existing vector-based RAG methods still have core shortcomings: 1) Single semantic granularity: Documents are typically simply cut into fixed-length segments for vectorization, which is difficult to adapt to the information requirements of problems with varying complexity. Simple segments may lose long-range dependencies and global structure, while excessively long segments introduce noise. 2) Flat association modeling: Traditional methods treat entities, concepts, and their relationships in the knowledge base as discrete nodes or simple edge connections, failing to effectively model the high-order, multi-dimensional, and unpaired relationships that are prevalent in real-world knowledge. 3) Insufficient multi-hop reasoning ability: When faced with problems that require connecting multiple knowledge points for complex reasoning, existing methods are prone to losing key intermediate information or getting trapped in local optima during the reasoning path, leading to broken reasoning chains or inaccurate answers. It is difficult to meet users' needs for interpretability of the accuracy of intelligent question answering in situations involving deep understanding and complex problem reasoning. Summary of the Invention
[0004] This invention provides an intelligent question-answering method, apparatus, device, medium, and program product. Based on a constructed multi-granularity hypergraph with richer granularity, it enables on-demand matching for knowledge retrieval. It can adaptively select the appropriate granularity for knowledge retrieval based on the complexity and intent of the user's query, thereby improving retrieval accuracy and efficiency. It can also better understand and reason about complex relationships and high-order semantics between knowledge, providing more solid and structured knowledge support for answering complex questions, and improving the accuracy and interpretability of intelligent answers.
[0005] In a first aspect, embodiments of the present invention provide an intelligent question-answering method, including: Obtain the original problem and decompose it into multiple sub-problems; Based on the similarity between the original question and its sub-questions and the pre-constructed multi-granularity hypergraph, multi-granularity hypergraph retrieval information is determined. Hypergraph retrieval is performed within the multi-granularity hypergraph based on multi-granularity hypergraph retrieval information to determine the hypergraph retrieval results; Based on the Hypergraph search results, question-answering background knowledge is constructed. The question-answering background knowledge is then combined with the original question to construct prompt words and statements. Based on the prompt words and statements, the answer to the original question is determined. Among them, the multi-granularity hypergraph is a hypergraph constructed based on four granularities: paragraph, sentence, fact, and entity.
[0006] Secondly, embodiments of the present invention also provide an intelligent question-answering device, comprising: The problem decomposition module is used to obtain the original problem and decompose it into multiple sub-problems. The retrieval information determination module is used to determine the multi-granularity hypergraph retrieval information based on the similarity between the original question and each sub-question and the pre-constructed multi-granularity hypergraph. The retrieval result determination module is used to perform hypergraph retrieval in multi-granularity hypergraphs based on multi-granularity hypergraph retrieval information and determine the hypergraph retrieval results; The answer determination module is used to construct question-and-answer background knowledge based on the hypergraph search results, assemble the question-and-answer background knowledge with the original question to construct prompt words, and determine the answer to the original question based on the prompt words. Among them, the multi-granularity hypergraph is a hypergraph constructed based on four granularities: paragraph, sentence, fact, and entity.
[0007] Thirdly, embodiments of the present invention also provide an intelligent question-answering device, comprising: At least one processor; and a memory communicatively connected to the at least one processor; The memory stores a computer program that can be executed by at least one processor, which enables the at least one processor to implement the intelligent question-answering method of any embodiment of the present invention.
[0008] Fourthly, embodiments of the present invention also provide a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform the intelligent question-answering method of any embodiment of the present invention.
[0009] Fifthly, embodiments of the present invention also provide a computer program product, including a computer program, which, when executed by a processor, is used to perform the intelligent question-answering method of any embodiment of the present invention.
[0010] This invention provides an intelligent question-answering method, apparatus, device, medium, and program product. The method involves acquiring an original question and decomposing it into multiple sub-questions; determining multi-granularity hypergraph retrieval information based on the similarity between the original question, each sub-question, and a pre-constructed multi-granularity hypergraph; performing hypergraph retrieval within the multi-granularity hypergraph based on the multi-granularity hypergraph retrieval information to determine the hypergraph retrieval results; constructing question-answering background knowledge based on the hypergraph retrieval results; assembling prompt words with the original question based on the question-answering background knowledge; and determining the answer to the original question based on the prompt words. The multi-granularity hypergraph is constructed based on four granularities: paragraph, sentence, fact, and entity. By employing this technical solution, a multi-granularity hypergraph is constructed based on these four granularities to enhance the retrieval of user question answers. This allows for adaptive selection of the most suitable granularity for knowledge retrieval based on the complexity and intent of the user's query content after clarifying the user's question, thereby improving the accuracy and efficiency of the retrieval. When obtaining the original question from the user, it is broken down into multiple sub-questions. Combining the original question with these sub-questions, and leveraging the explicit and interconnected knowledge network provided by the multi-granularity hypergraph, a more stable and transparent multi-hop reasoning path is constructed, improving the success rate and accuracy of multi-step reasoning for complex questions. Simultaneously, based on the multi-granularity hypergraph's ability to understand and reason about complex relationships and higher-order semantics, the richness and accuracy of the question-answering background knowledge retrieved from the multi-granularity hypergraph are enhanced. This provides a more solid and structured knowledge support for answering complex questions, thereby improving the accuracy and interpretability of the answers provided when intelligently responding to user questions using the question-answering background knowledge constructed based on the multi-granularity hypergraph retrieval results.
[0011] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0012] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0013] Figure 1 This is a flowchart of an intelligent question-answering method provided in Embodiment 1 of the present invention; Figure 2 This is a flowchart of an intelligent question-answering method provided in Embodiment 2 of the present invention; Figure 3This is an example diagram illustrating a method for constructing a multi-granularity hypergraph according to Embodiment 2 of the present invention; Figure 4 This is a flowchart illustrating a process for extracting multi-granular information and multiple relationships from a collection of document fragments, as provided in Embodiment 2 of the present invention, to determine paragraphs, sentences, facts, entities, internal relationships, and external relationships. Figure 5 This is a structural example diagram of a multi-granularity hypergraph provided in Embodiment 2 of the present invention; Figure 6 This is a flowchart illustrating how, according to Embodiment 2 of the present invention, a set of candidate facts corresponding to each sub-problem and the probability of each candidate fact in the set of candidate facts are determined based on the similarity between each sub-problem and all facts in a pre-constructed multi-granularity hypergraph. Figure 7 This is a schematic diagram of the structure of an intelligent question-and-answer device provided in Embodiment 3 of the present invention; Figure 8 This is a schematic diagram of the structure of an intelligent question-and-answer device provided in Embodiment 4 of the present invention. Detailed Implementation
[0014] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0015] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "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 series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0016] Example 1 Figure 1This is a flowchart illustrating an intelligent question-answering method provided in Embodiment 1 of the present invention. This embodiment is applicable to situations where more accurate background knowledge is extracted from complex questions posed by users, and then a more accurate intelligent answer is provided based on the extracted background knowledge. This method can be executed by an intelligent question-answering device, which can be implemented by software and / or hardware, and can be configured in an intelligent question-answering device. Optionally, the intelligent question-answering device can be a laptop, desktop computer, or smart tablet, etc., and this embodiment of the present invention does not impose any limitations on this.
[0017] like Figure 1 As shown in the figure, an intelligent question-answering method provided by an embodiment of the present invention specifically includes the following steps: S101. Obtain the original problem and decompose it into multiple sub-problems.
[0018] In this embodiment, the original problem can be understood as a complex problem input by the user and expressed in natural language. Sub-problems can be understood as problem units obtained by decomposing and breaking down the original problem, which can express some meaning or purpose of the original problem and are easier to solve; it can be understood that the combination of all the sub-problems obtained from the decomposition can represent all the information of the original problem.
[0019] Specifically, when a user needs to initiate intelligent question answering, they will input their desired question into the intelligent question answering device. This question then serves as the original question acquired by the device. To reduce the difficulty of understanding the original question and to improve the completeness and accuracy of the answers, the original question can be decomposed using methods such as semantic analysis. This results in multiple sub-questions that can express some of the meaning or purpose of the original question and can be reconstructed into the original question when combined.
[0020] For example, the decomposition of the original question can be achieved by combining LLM with prompts, or by other natural language processing methods (such as rule-based and template-based decomposition, retrieval decomposition based on similar question matching, and decomposition based on structured reasoning, etc.). This embodiment of the invention does not limit this. For example, the question "Where was the husband of Joanna Elisabeth Of Holstein-Gottorp born?" can be decomposed into two sub-questions ["Who was the husband of Joanna Elisabeth Of Holstein-Gottorp?"] and ["Where was the previously identified husband born?"].
[0021] S102. Based on the original question and each sub-question, and the similarity between the original question and the pre-constructed multi-granularity hypergraph, determine the multi-granularity hypergraph retrieval information.
[0022] Among them, the multi-granularity hypergraph is a hypergraph constructed based on four granularities: paragraph, sentence, fact, and entity.
[0023] In this embodiment, a hypergraph can be understood as a generalized graph structure where a single hyperedge can connect any number of nodes, making it naturally suitable for modeling higher-order relations. A passage can be understood as a basic text unit in a text file, consisting of several semantically related sentences. A sentence can be understood as a linguistic unit within a passage that expresses a relatively complete meaning, composed of words or phrases arranged according to grammatical rules and ending with a specific punctuation mark. A fact can be understood as the smallest unit of meaning, or the smallest information fragment, obtained by dividing a sentence; it cannot be further divided and has a clear objective meaning on its own. In other words, a fact can completely represent a semantic meaning and should consist of a subject, predicate, and object. An entity can be understood as a semantic carrier used to indicate the object or recipient of an action in a fact, indicating the actual objective existence of an event within that fact. In other words, an entity can be understood as the subject and object of the aforementioned fact.
[0024] In this embodiment, a multi-granularity hypergraph can be specifically understood as a graph structure constructed in the form of a hypergraph based on the text required to answer user questions. This text is divided into four granularities: paragraphs, sentences, facts, and entities, as mentioned above. The graph is then constructed according to the multivariate relationships and higher-order dependencies between information at different granularities. Multi-granularity hypergraph retrieval information can be specifically understood as the general term for information that can be input into a multi-granularity hypergraph for matching and querying.
[0025] Specifically, the original problem and each sub-problem are compared with the hyperedges and nodes contained in the pre-constructed multi-granularity hypergraph, and the similarity is calculated according to the granularity. Based on the calculated similarity with hyperedges and nodes of different granularities, relevant information at different granularities that can be used for subsequent multi-granularity hypergraph retrieval is determined. The determined relevant information is used together as multi-granularity hypergraph retrieval information that can be used for subsequent multi-granularity hypergraph retrieval.
[0026] S103. Perform hypergraph retrieval in the multi-granularity hypergraph based on the multi-granularity hypergraph retrieval information, and determine the hypergraph retrieval results.
[0027] Specifically, the relevant information of different granularities contained in the multi-granularity hypergraph retrieval information is substituted into the corresponding nodes and hyperedges in the multi-granularity hypergraph. The multi-granularity hypergraph after information substitution is then searched for four granularities: entity, fact, statement, and paragraph. The nodes and hyperedges in the hypergraph corresponding to paragraphs, statements, and facts are sorted respectively, and the information that can be used for subsequent intelligent question answering is selected as the hypergraph retrieval result based on the sorting results.
[0028] S104. Construct question-and-answer background knowledge based on the hypergraph retrieval results, assemble the question-and-answer background knowledge with the original question to construct prompt words, and determine the answer to the original question based on the prompt words.
[0029] In this embodiment, question-answering background knowledge can be specifically understood as external knowledge associated with the user's original question. This knowledge serves as contextual information provided to the LLM to constrain its understanding of the user's intent, ensuring a positive answer and avoiding illusions. Prompt words can be specifically understood as natural language instructions or text fragments used as input to the LLM to guide the model's understanding of the task, clarify the generation goal, and limit the output content.
[0030] Specifically, based on the hypergraph retrieval results, paragraphs, sentences, and factual information related to the user's question are extracted from the hypergraph. These are combined as question-answering background knowledge that can be used to answer the original question. The question-answering background knowledge and the original question given by the user are then substituted into a pre-built prompt word template to assemble a prompt word statement that can be input into a large language model to guide it in generating an intelligent answer. The resulting prompt word statement is then used as the input to the large language model, and the output of the large language model based on the prompt word statement is determined as the answer to the original question.
[0031] The technical solution of this embodiment involves obtaining the original question and decomposing it into multiple sub-questions; determining multi-granularity hypergraph retrieval information based on the similarity between the original question, each sub-question, and a pre-constructed multi-granularity hypergraph; performing hypergraph retrieval within the multi-granularity hypergraph based on the multi-granularity hypergraph retrieval information to determine the hypergraph retrieval results; constructing question-answering background knowledge based on the hypergraph retrieval results; assembling the question-answering background knowledge with the original question to construct prompt words; and determining the answer to the original question based on the prompt words. The multi-granularity hypergraph is constructed based on four granularities: paragraph, sentence, fact, and entity. By adopting the above technical solution, a multi-granularity hypergraph is constructed based on four granularities—paragraph, sentence, fact, and entity—to enhance the retrieval of user question answers. This allows for adaptive selection of the most suitable granularity for knowledge retrieval based on the complexity and intent of the user's query content after clarifying the user's question, thereby improving the accuracy and efficiency of the retrieval. When obtaining the original question from the user, it is broken down into multiple sub-questions. Combining the original question with these sub-questions, and leveraging the explicit and interconnected knowledge network provided by the multi-granularity hypergraph, a more stable and transparent multi-hop reasoning path is constructed, improving the success rate and accuracy of multi-step reasoning for complex questions. Simultaneously, based on the multi-granularity hypergraph's ability to understand and reason about complex relationships and higher-order semantics, the richness and accuracy of the question-answering background knowledge retrieved from the multi-granularity hypergraph are enhanced. This provides a more solid and structured knowledge support for answering complex questions, thereby improving the accuracy and interpretability of the answers provided when intelligently responding to user questions using the question-answering background knowledge constructed based on the multi-granularity hypergraph retrieval results.
[0032] Example 2 Figure 2This is a flowchart of an intelligent question-answering method provided in Embodiment 2 of the present invention. The technical solution of this embodiment further optimizes the above-mentioned optional technical solutions. Based on the similarity between the original question and each sub-question and all facts, paragraphs and sentences in the pre-constructed multi-granularity hypergraph, the candidate entities, candidate facts, the probability of the candidate entities corresponding to the candidate entities, the probability of the candidate facts corresponding to the candidate facts, paragraph similarity and sentence similarity used for hypergraph retrieval are determined. The above information is used as multi-granularity hypergraph retrieval information. The corresponding nodes and hyperedges in the pre-constructed multi-granularity hypergraph are reassigned according to similarity. Then, hypergraph search is performed on the reassigned multi-granularity hypergraph. The most relevant paragraphs, sentences and facts in the search results are extracted to construct question-answering background knowledge as contextual information. This improves the relevance of the constructed question-answering background knowledge to the original question raised by the user and its sub-questions, so that the prompt words constructed based on this can better guide the LLM to give question-answering results that meet the user's intelligent question-answering needs. Furthermore, it presents a multi-granularity hypergraph construction method based on a collection of question-and-answer documents related to the user's question, and employing multi-granularity information extraction and multi-relationship extraction processing methods. This method offers more layers and more angles of information retention compared to fixed text block division. After clarifying the user's question, it can adaptively select the most appropriate granularity for knowledge retrieval based on the complexity and intent of the query content, improving the accuracy and efficiency of the retrieval. It also enables the evaluation and selection among multiple candidate intermediate nodes and hyperedges during the retrieval process, forming a structured reasoning chain. This not only improves the success rate and accuracy of multi-step reasoning but also makes the reasoning process visible and traceable. Based on this, intelligent question answering greatly enhances the interpretability and credibility of the results.
[0033] like Figure 2 As shown in Embodiment 2 of the present invention, an intelligent question-answering method specifically includes the following steps: S201. Obtain the original problem and decompose it into multiple sub-problems.
[0034] Optionally, to implement hypergraph retrieval and question-answering background knowledge construction based on multi-granularity hypergraphs, the construction of multi-granularity hypergraphs needs to be completed before the user inputs the question. That is, before obtaining the original question and decomposing it into multiple sub-questions, the construction of a multi-granularity hypergraph must first be completed based on pre-set, existing information adapted to the user's question direction. In some examples, Figure 3 This is an example diagram illustrating a multi-granularity hypergraph construction method provided in Embodiment 2 of the present invention, as shown below. Figure 3 As shown, the specific steps include the following: S301. Obtain the question and answer document set, segment each question and answer document in the question and answer document set, and determine the document fragment set.
[0035] In this embodiment, the question-and-answer document set can be specifically understood as a collection of existing question-and-answer information documents obtained based on the user's question direction and adapted to the user's question background. Optionally, the question-and-answer document set may come from a document database, document library, or other acquisition channels, and this embodiment of the invention does not impose any restrictions on this.
[0036] Specifically, based on the direction of providing intelligent question-and-answer services to users, a set of question-and-answer documents related to the user's extraction direction is obtained. Then, each question-and-answer document in the set is segmented to obtain multiple document fragments, and the set of document fragments is determined as the document fragment set. For example, the segmentation method for document fragments can be fixed-length segmentation, natural paragraph segmentation, and segmentation based on semantic relationships, etc., and this embodiment of the invention does not limit the method.
[0037] S302. Perform multi-granularity information extraction and multi-relation extraction on the document fragment set to determine paragraphs, sentences, facts, entities, internal relations and external relations.
[0038] In this embodiment, multi-granularity information extraction can be specifically understood as extracting corresponding granularity information for each document fragment in the document fragment set using the four granularities of paragraph, sentence, fact, and entity proposed in the above embodiments. Multi-relationship extraction can be specifically understood as extracting the ownership and association relationships between the various granularities of information that can be used to form a hypergraph. Multi-relationship extraction may include extracting internal relationships with close ownership and extracting external relationships between granularities of information that do not have direct ownership.
[0039] Specifically, multi-granularity information extraction is performed on each document fragment in the document fragment set. This involves extracting information at the paragraph, sentence, fact, and entity levels for each fragment, resulting in paragraphs, sentences, facts, and entities belonging to each fragment. This extraction process also clarifies the subordinate relationships between entities and facts, facts and sentences, and sentences and paragraphs, preparing for subsequent multi-relationship extraction. Furthermore, internal relationships are extracted for paragraphs, sentences, facts, and entities with direct subordinate relationships, while external relationships are extracted for those without direct subordinate relationships, yielding the corresponding internal and external relationships.
[0040] In some examples, Figure 4 This is a flowchart illustrating a process for extracting multi-granular information and multiple relationships from a collection of document fragments, as provided in Embodiment 2 of the present invention, to determine paragraphs, sentences, facts, entities, internal relationships, and external relationships. Figure 4 As shown, the specific steps include the following: S3021. Split each document segment according to paragraph delimiters to determine paragraphs at the paragraph level.
[0041] Specifically, since paragraphs in a document fragment are often separated by paragraph delimiters (such as line breaks), each document fragment can be split into paragraphs by recognizing paragraph delimiters, and the content between every two paragraph delimiters can be treated as a paragraph at the paragraph level.
[0042] S3022. Segment each paragraph according to natural semantics or punctuation to identify multiple non-overlapping statement-level granularities.
[0043] Specifically, since a paragraph is often composed of multiple complete sentences, and different sentences are often separated by punctuation marks or often have different semantic information, each paragraph can be segmented based on natural semantic analysis or specific punctuation marks (such as periods). The multiple document information obtained after segmentation that do not overlap in semantics and document expression can then be identified as sentences at the sentence level.
[0044] For example, taking a paragraph obtained from the above split as P = “Sandasar is a village and union council (an administrative subdivision) of Mansehra District in the Khyber Pakhtunkhwa Province of Pakistan. It is located in the south of the district and lies to the west of the district capital Mansehra.”, after processing based on natural language or punctuation, two sentences can be extracted from the above paragraph, namely [“Sandasar is avillage and union council (an administrative subdivision) of MansehraDistrict in the Khyber Pakhtunkhwa Province of Pakistan.” and “It is located in the south of the district and lies to the west of the district capital Mansehra.”], which can also be denoted as [S1, S2].
[0045] S3023. The smallest complete semantic unit extracted from each statement is determined as a fact at the fact level.
[0046] Specifically, each statement is broken down into multiple short sentences that can only represent a single complete semantic unit, that is, into multiple smallest complete semantic units, and each smallest complete semantic unit is determined as a fact at the fact level.
[0047] Following the example above, extracting the smallest complete semantic unit from [S1,S2] yields seven facts, which can be represented as: ["Sandasar located in Mansehra District", "Sandasar is a unioncouncil", "Sandasar is a village", "Mansehra District is in the Khyber Pakhtunkhwa Province", "Sandasar is located in the south of Mansehra District", "Khyber Pakhtunkhwa Province is in Pakistan", "Sandasar lies to the west of Mansehra"], or [F1, F2, F3, F4, F5, F6, F7]. Each fact Fi is an indivisible smallest complete semantic unit consisting of a subject, predicate, and object. It is understandable that [F1, F2, F3, F4, F5, F6, F7] and [S1,S2] have a subordinate relationship with P, that is, [F1, F2, F3, F4] belongs to S1, [F5, F6, F7] belongs to S2, and [S1,S2] belongs to P.
[0048] S3024. Identify the subject and object contained in each fact as entities at the entity level.
[0049] Specifically, since each fact contains three parts: subject, predicate, and object, the subject and object of each fact can be identified as entities at the entity level associated with that fact, which can also be represented by E in subsequent examples.
[0050] S3025. Extract the relationships between entities and their directly subordinate facts, between entities directly subordinate to facts and statements directly subordinate to those facts, and between facts directly subordinate to statements and paragraphs directly subordinate to those statements to determine the internal relationships.
[0051] Following the example above, based on the subordinate relationships between paragraphs, sentences, facts, and entities, a connection relationship can be established between entity E and its directly subordinate fact F, with the weight of this connection relationship set to 1; a connection relationship can be established between E and the sentence S directly subordinate to F, with the weight of this connection relationship set to 1; and connections can be established between E and S and their directly subordinate paragraph P, with the weight of this connection relationship set to 1. Thus, all of the above connection relationships can be determined as internal relationships.
[0052] S3026. Extract the relationships between entities, facts, and statements that are not directly related to each other, and determine the external relationships.
[0053] Following the example above, the relationships between entities and other facts and statements can be considered as external relations based on the hierarchical relationships between paragraphs, sentences, facts, and entities. Specifically, by calculating the similarity between all entities, entity pairs (Ei, Ej) with similarity exceeding a preset similarity threshold can be selected. Then, connections can be established between entity Ei and the fact Fj to which entity Ej directly belongs, and the statement Sj to which Fj belongs. Similarly, connections can be established between entity Ej and the fact Fi to which entity Ei directly belongs, and the statement Si to which Fi belongs. The weights of all these connections are set to the similarity values of the entity pairs (Ei, Ej), and these connections are determined as external relations.
[0054] It is understandable that, since the topics expressed by different sentences in the same paragraph, as well as the topics expressed by different sentences in adjacent paragraphs, may be similar or consistent, there may be situations where the same entity establishes multiple connection relationships with a certain fact or a certain sentence. In this case, the weight of the connection relationship can be set as the average value of the similarity corresponding to these connection relationships.
[0055] S303. Construct a multi-granularity hypergraph using statements and facts as hyperedges and paragraphs and entities as nodes, based on internal and external relationships.
[0056] For example, Figure 5 This is a structural example diagram of a multi-granularity hypergraph provided in Embodiment 2 of the present invention, as shown below. Figure 5 As shown, the light gray circles represent segments that exist as nodes in the multi-granularity hypergraph, the dark gray circles represent entities that exist as nodes in the multi-granularity hypergraph, and the elongated ellipses represent statements or facts that exist as hyperedges in the multi-granularity hypergraph. The aforementioned internal and external relationships can be considered as connections such as... Figure 5 The line connecting the node and the hyperedge shown.
[0057] S202. Based on the similarity between each sub-problem and all facts in the pre-constructed multi-granularity hypergraph, determine the set of candidate facts corresponding to each sub-problem, and the probability of each candidate fact in the set of candidate facts.
[0058] In this embodiment, a candidate fact can be specifically understood as the fact most closely related to the sub-problem in the multi-granularity hypergraph. The candidate fact probability can be specifically understood as the probability that the sub-problem is indeed related to the candidate fact.
[0059] Specifically, for each sub-problem, the similarity between the sub-problem and all facts in the pre-constructed multi-granularity hypergraph is calculated. This similarity can be calculated based on word overlap or semantic similarity based on vectors. Based on the similarity between each fact and the sub-problem, candidate facts corresponding to the sub-problem are selected from among the facts, and the similarity between the candidate fact and the sub-problem is determined as the probability of the candidate fact. Furthermore, in the case of multiple sub-problems, the set of candidate facts corresponding to each sub-problem can be determined as the candidate fact set corresponding to each sub-problem.
[0060] Optional, Figure 6 This is a flowchart illustrating a process for determining a set of candidate facts corresponding to each sub-problem and the probability of each candidate fact in the set of candidate facts, based on the similarity between each sub-problem and all facts in a pre-constructed multi-granularity hypergraph, as provided in Embodiment 2 of the present invention. Figure 6 As shown, the specific steps include the following: S2021. For each sub-problem, determine the similarity between the sub-problem and all facts in the pre-constructed multi-granularity hypergraph, and identify the fact with the highest similarity as the candidate fact corresponding to the sub-problem.
[0061] S2022. The similarity of candidate facts is determined as the probability of the candidate fact corresponding to the candidate fact.
[0062] S2023. Determine the set of candidate facts corresponding to each sub-problem as the candidate fact set.
[0063] S203. In the multi-granularity hypergraph, determine the candidate entities associated with the candidate fact set, and the probability of each candidate entity.
[0064] Specifically, since there is a direct relationship between facts and entities in a multi-granularity hypergraph, for each candidate fact in the candidate fact set, the entity directly related to the candidate fact can be taken as the candidate entity corresponding to the candidate fact, and the candidate fact probability of the candidate fact can be taken as the candidate entity probability of the corresponding candidate entity.
[0065] S204. Based on the similarity between the original question and each paragraph and sentence in the multi-granularity hypergraph, determine the paragraph similarity of each paragraph and the sentence similarity of each sentence.
[0066] Specifically, the original problem is treated as a whole, and the similarity between the original problem and all paragraphs and all sentences in the pre-constructed multi-granularity hypergraph is calculated. The similarity between each paragraph and the original problem is determined as the paragraph similarity, and the similarity between each sentence and the original problem is determined as the sentence similarity.
[0067] It should be clarified that S202-S203 should be executed sequentially, but the execution order of S202-S203 and S204 is not restricted. They can be executed in any order or simultaneously. This embodiment of the invention does not impose any restrictions on this.
[0068] S205. The candidate facts, the probability of each candidate fact, the candidate entity, the probability of each candidate entity, the similarity of each paragraph, and the similarity of each sentence are used as multi-granularity hypergraph retrieval information.
[0069] S206. Take the node corresponding to the candidate entity in the multi-granularity hypergraph as the starting node, and determine the candidate entity probability of the candidate entity as the node probability of the starting node.
[0070] S207. The candidate fact probability of each candidate fact is used as the hyperedge probability of the corresponding hyperedge in the multi-granularity hypergraph.
[0071] S208. The sentence similarity of each sentence is used as the hyperedge probability of the corresponding hyperedge in the multi-granularity hypergraph.
[0072] S209. The paragraph similarity of each paragraph is used as the node probability of the corresponding node in the multi-granularity hypergraph.
[0073] It should be clarified that S206-S209 are processes for configuring the similarity of the probabilities of each node and hyperedge by inputting multi-granularity hypergraph retrieval information, and for selecting the starting node of the subsequent hypergraph retrieval. The execution of S206-S209 can be performed sequentially or in any order, and the embodiments of the present invention do not impose any restrictions on this.
[0074] S210. Perform hypergraph search on the multi-granularity hypergraph after similarity configuration, and extract a preset number of the most relevant paragraphs, sentences and facts from the search results as hypergraph retrieval results.
[0075] In some examples, hypergraph search can be performed on multi-granularity hypergraphs using Personalized PageRank (PPR) or other PageRank (PR) algorithms. The importance of each node relative to the hyperedge is calculated, and the nodes corresponding to paragraphs, statements, and facts in the multi-granularity hypergraph are sorted according to their importance. A predetermined number of paragraphs, statements, and facts that rank highest are selected as the most relevant paragraphs, statements, and facts, and these most relevant paragraphs, statements, and facts can then be used as the hypergraph search results.
[0076] Optionally, the number of paragraphs, sentences, and facts selected can be different. For example, you can select k paragraphs, m sentences, and n facts, where k, m, and n can all be different.
[0077] S211. Construct question-answering background knowledge based on the hypergraph retrieval results, assemble the question-answering background knowledge with the original question to construct prompt words, and determine the answer to the original question based on the prompt words.
[0078] The technical solution of this embodiment determines the candidate entities, candidate facts, the probability of the candidate entities corresponding to the candidate entities, the probability of the candidate facts corresponding to the candidate facts, the paragraph similarity, and the sentence similarity used for hypergraph retrieval based on the similarity between the original question and each sub-question and all facts, paragraphs, and sentences in the pre-constructed multi-granularity hypergraph. The above information is used as multi-granularity hypergraph retrieval information. The corresponding nodes and hyperedges in the pre-constructed multi-granularity hypergraph are reassigned according to similarity. Then, hypergraph search is performed on the reassigned multi-granularity hypergraph. The most relevant paragraphs, sentences, and facts in the search results are extracted to construct question-answering background knowledge as contextual information. This improves the relevance of the constructed question-answering background knowledge to the original question raised by the user and its sub-questions. As a result, the prompt words constructed based on this knowledge can better guide the LLM to provide question-answering results that meet the user's intelligent question-answering needs. Furthermore, it presents a multi-granularity hypergraph construction method based on a collection of question-and-answer documents related to the user's question, and employing multi-granularity information extraction and multi-relationship extraction processing methods. This method offers more layers and more angles of information retention compared to fixed text block division. After clarifying the user's question, it can adaptively select the most appropriate granularity for knowledge retrieval based on the complexity and intent of the query content, improving the accuracy and efficiency of the retrieval. It also enables the evaluation and selection among multiple candidate intermediate nodes and hyperedges during the retrieval process, forming a structured reasoning chain. This not only improves the success rate and accuracy of multi-step reasoning but also makes the reasoning process visible and traceable. Based on this, intelligent question answering greatly enhances the interpretability and credibility of the results.
[0079] Example 3 Figure 7 This is a schematic diagram of the structure of an intelligent question-answering device provided in Embodiment 3 of the present invention, as shown below. Figure 7 As shown, the intelligent question-answering device includes a question decomposition module 41, a retrieval information determination module 42, a retrieval result determination module 43, and an answer result determination module 44.
[0080] The system includes the following modules: Problem Decomposition Module 41, which acquires the original problem and decomposes it into multiple sub-problems; Retrieval Information Determination Module 42, which determines multi-granularity hypergraph retrieval information based on the similarity between the original problem and each sub-problem and the pre-constructed multi-granularity hypergraph; Retrieval Result Determination Module 43, which performs hypergraph retrieval within the multi-granularity hypergraph based on the multi-granularity hypergraph retrieval information and determines the hypergraph retrieval result; and Answer Result Determination Module 44, which constructs question-and-answer background knowledge based on the hypergraph retrieval result, assembles the question-and-answer background knowledge with the original problem to construct prompt words, and determines the answer result for the original problem based on the prompt words. The multi-granularity hypergraph is constructed based on four granularities: paragraph, sentence, fact, and entity.
[0081] The technical solution of this invention constructs a multi-granularity hypergraph based on four granularities: paragraph, sentence, fact, and entity, for enhanced retrieval of user question answers. This allows for adaptive selection of the most suitable granularity for knowledge retrieval based on the complexity and intent of the user's query content after the user's question is clearly defined, improving retrieval accuracy and efficiency. When obtaining the original question from the user, it is broken down into multiple sub-questions. Combining the original question with the sub-questions, and based on the explicit and interconnected knowledge network provided by the multi-granularity hypergraph, a more stable and transparent multi-hop reasoning path is constructed, improving the success rate and accuracy of multi-step reasoning for complex questions. Simultaneously, based on the multi-granularity hypergraph's ability to understand and reason about complex relationships and high-order semantics, the richness and accuracy of the question-and-answer background knowledge retrieved from the multi-granularity hypergraph are enhanced, providing more solid and structured knowledge support for answering complex questions. This, in turn, improves the accuracy and interpretability of the answers provided when intelligently answering user questions using the question-and-answer background knowledge constructed based on the multi-granularity hypergraph retrieval results.
[0082] Optionally, the retrieval information determination module 42 is specifically used for: Based on the similarity between each sub-problem and all facts in the pre-constructed multi-granularity hypergraph, determine the set of candidate facts corresponding to each sub-problem, and the probability of each candidate fact in the set of candidate facts; In a multi-granularity hypergraph, identify candidate entities associated with the candidate fact set, and the probability of each candidate entity. Based on the similarity between the original question and each paragraph and sentence in the multi-granularity hypergraph, determine the paragraph similarity of each paragraph and the sentence similarity of each sentence; Each candidate fact, its probability, its entity, its probability, paragraph similarity, and sentence similarity are used as multi-granularity hypergraph retrieval information.
[0083] Optionally, based on the similarity between each sub-problem and all facts in the pre-constructed multi-granularity hypergraph, a set of candidate facts corresponding to each sub-problem and the probability of each candidate fact in the candidate fact set are determined, including: For each sub-problem, determine the similarity between the sub-problem and all facts in the pre-constructed multi-granularity hypergraph, and identify the fact with the highest similarity as the candidate fact corresponding to the sub-problem; The similarity of candidate facts is determined as the probability of the candidate fact corresponding to the candidate fact; The set of candidate facts corresponding to each sub-problem is determined as the candidate fact set.
[0084] Optionally, the search result determination module 43 is specifically used for: The node corresponding to the candidate entity in the multi-granularity hypergraph is taken as the starting node, and the candidate entity probability of the candidate entity is determined as the node probability of the starting node. The candidate fact probability of each candidate fact is used as the hyperedge probability of the corresponding hyperedge in the multi-granularity hypergraph. The sentence similarity of each sentence is used as the hyperedge probability of the corresponding hyperedge in the multi-granularity hypergraph. The paragraph similarity of each paragraph is used as the node probability of the corresponding node in the multi-granularity hypergraph. Perform hypergraph search on the multi-granularity hypergraph after similarity configuration, and extract a preset number of the most relevant paragraphs, sentences and facts from the search results as hypergraph retrieval results.
[0085] Optionally, the intelligent question-answering device also includes: a hypergraph construction module, specifically used for: Before obtaining the original question and decomposing it into multiple sub-questions, a question-and-answer document set is obtained, and each question-and-answer document in the question-and-answer document set is segmented to determine a document fragment set; Perform multi-granularity information extraction and multi-relation extraction on a collection of document fragments to identify paragraphs, sentences, facts, entities, internal relationships, and external relationships; Using statements and facts as hyperedges and paragraphs and entities as nodes, a multi-granularity hypergraph is constructed based on internal and external relationships.
[0086] Optionally, multi-granularity information extraction and multi-relation extraction are performed on the document fragment set to identify paragraphs, sentences, facts, entities, internal relations, and external relations, including: Each document segment is split according to paragraph delimiters to determine paragraphs at the paragraph level; Each paragraph is segmented based on natural semantics or punctuation to identify multiple non-overlapping sentence-level statements; The smallest complete semantic unit extracted from each statement is identified as a fact at the fact level. The subject and object contained in each fact are identified as entities at the entity level. Extract the relationships between entities and the facts they directly belong to, the relationships between entities that directly belong to facts and the statements that the facts directly belong to, and the relationships between facts that directly belong to statements and the paragraphs that the statements directly belong to, and determine the internal relationships. Extract the relationships between entities, facts, and statements that are not directly related to each other, and determine the external relationships.
[0087] The intelligent question-answering device provided in this embodiment of the invention can execute the intelligent question-answering method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0088] Example 4 Figure 8 This is a schematic diagram of the structure of an intelligent question-answering device according to Embodiment 4 of the present invention. The intelligent question-answering device 50 can represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The intelligent question-answering device 50 can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0089] like Figure 8 As shown, the intelligent question-answering device 50 includes at least one processor 51 and a memory, such as a read-only memory (ROM) 52 and a random access memory (RAM) 53, communicatively connected to the at least one processor 51. The memory stores computer programs executable by the at least one processor. The processor 51 can perform various appropriate actions and processes based on the computer program stored in the ROM 52 or loaded from storage unit 58 into the RAM 53. The RAM 53 can also store various programs and data required for the operation of the intelligent question-answering device 50. The processor 51, ROM 52, and RAM 53 are interconnected via a bus 54. An input / output (I / O) interface 55 is also connected to the bus 54.
[0090] Multiple components in the intelligent question-answering device 50 are connected to the I / O interface 55, including: an input unit 56, such as a keyboard, mouse, etc.; an output unit 57, such as various types of displays, speakers, etc.; a storage unit 58, such as a disk, optical disk, etc.; and a communication unit 59, such as a network card, modem, wireless transceiver, etc. The communication unit 59 allows the intelligent question-answering device 50 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0091] Processor 51 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 51 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any suitable processor, controller, microcontroller, etc. Processor 51 performs the various methods and processes described above, such as intelligent question answering methods.
[0092] In some embodiments, the intelligent question-answering method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 58. In some embodiments, part or all of the computer program may be loaded and / or installed on the intelligent question-answering device 50 via ROM 52 and / or communication unit 59. When the computer program is loaded into RAM 53 and executed by processor 51, one or more steps of the intelligent question-answering method described above may be performed. Alternatively, in other embodiments, processor 51 may be configured to execute the intelligent question-answering method by any other suitable means (e.g., by means of firmware).
[0093] Optionally, embodiments of the present invention also provide a computer program product, including a computer program that, when executed by a processor, implements the intelligent question-answering method as provided in any embodiment of the present invention.
[0094] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0095] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0096] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0097] To provide interaction with the user, the systems and techniques described herein can be implemented on a smart question-answering device, which includes: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the smart question-answering device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including voice input, speech input, or tactile input).
[0098] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0099] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0100] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0101] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. An intelligent question-answering method, characterized in that, include: Obtain the original problem and decompose it into multiple sub-problems; Based on the original question and each of the sub-questions, and the similarity between them and the pre-constructed multi-granularity hypergraph, multi-granularity hypergraph retrieval information is determined; Based on the multi-granularity hypergraph retrieval information, a hypergraph retrieval is performed in the multi-granularity hypergraph to determine the hypergraph retrieval results; Based on the hypergraph retrieval results, question-answering background knowledge is constructed, and the question-answering background knowledge is assembled with the original question to construct prompt words and statements. Based on the prompt words and statements, the answer to the original question is determined. The multi-granularity hypergraph is a hypergraph constructed based on four granularities: paragraph, sentence, fact, and entity.
2. The intelligent question-answering method according to claim 1, characterized in that, The step of determining multi-granularity hypergraph retrieval information based on the similarity between the original question and each of the sub-questions and the pre-constructed multi-granularity hypergraph includes: Based on the similarity between each sub-problem and all facts in the pre-constructed multi-granularity hypergraph, determine the set of candidate facts corresponding to each sub-problem, and the probability of each candidate fact in the set of candidate facts; In the multi-granularity hypergraph, candidate entities associated with the candidate fact set and the probability of each candidate entity are determined. Based on the similarity between the original question and each paragraph and each statement in the multi-granularity hypergraph, determine the paragraph similarity of each paragraph and the statement similarity of each statement; Each of the candidate facts, the probability of each candidate fact, the candidate entity, the probability of each candidate entity, the paragraph similarity, and the sentence similarity are used as multi-granularity hypergraph retrieval information.
3. The intelligent question-answering method according to claim 2, characterized in that, The process of performing a hypergraph retrieval based on the multi-granularity hypergraph retrieval information and determining the hypergraph retrieval results includes: The node corresponding to the candidate entity in the multi-granularity hypergraph is taken as the starting node, and the candidate entity probability of the candidate entity is determined as the node probability of the starting node. The candidate fact probability of each of the candidate facts is respectively used as the hyperedge probability of the corresponding hyperedge in the multi-granularity hypergraph; The statement similarity of each statement is used as the hyperedge probability of the hyperedge corresponding to each statement in the multi-granularity hypergraph. The paragraph similarity of each paragraph is used as the node probability of the corresponding node in the multi-granularity hypergraph. Perform hypergraph search on the multi-granularity hypergraph after similarity configuration, and extract a preset number of the most relevant paragraphs, sentences and facts from the search results as hypergraph retrieval results.
4. The intelligent question-answering method according to claim 2, characterized in that, The step of determining the candidate fact set corresponding to each sub-problem and the candidate fact probability corresponding to each candidate fact in the candidate fact set based on the similarity between each sub-problem and all facts in the pre-constructed multi-granularity hypergraph includes: For each sub-problem, the similarity between the sub-problem and all facts in the pre-constructed multi-granularity hypergraph is determined, and the fact with the highest similarity is determined as the candidate fact corresponding to the sub-problem; The similarity of the candidate facts is determined as the probability of the candidate facts corresponding to the candidate facts; The set of candidate facts corresponding to each of the sub-problems is determined as the candidate fact set.
5. The intelligent question-answering method according to claim 1, characterized in that, Before obtaining the original problem and decomposing the original problem into multiple sub-problems, the method further includes: Obtain a set of question and answer documents, segment each question and answer document in the set, and determine a set of document fragments; Multi-granularity information extraction and multi-relation extraction are performed on the document fragment set to determine paragraphs, sentences, facts, entities, internal relations and external relations; Using the statements and facts as hyperedges, and the paragraphs and entities as nodes, a multi-granularity hypergraph is constructed based on the internal and external relationships.
6. The intelligent question-answering method according to claim 5, characterized in that, The step of performing multi-granularity information extraction and multi-relation extraction on the document fragment set to determine paragraphs, sentences, facts, entities, internal relations, and external relations includes: Each document segment is split according to paragraph delimiters to determine paragraphs at the paragraph level; Each paragraph is segmented based on natural semantics or punctuation to identify multiple non-overlapping statement-level granularities. The smallest complete semantic unit extracted from each of the above statements is determined as a fact at the fact level. The subject and object contained in each of the facts are identified as entities at the entity level. Extract the relationships between entities and their directly subordinate facts, the relationships between entities directly subordinate to facts and the statements directly subordinate to those facts, and the relationships between facts directly subordinate to statements and the paragraphs directly subordinate to those statements to determine internal relationships; Extract the relationships between entities, facts, and statements that are not directly related to each other, and determine the external relationships.
7. An intelligent question-and-answer device, characterized in that, include: The problem decomposition module is used to obtain the original problem and decompose it into multiple sub-problems. The retrieval information determination module is used to determine multi-granularity hypergraph retrieval information based on the similarity between the original question and each of the sub-questions and the pre-constructed multi-granularity hypergraph; The retrieval result determination module is used to perform a hypergraph retrieval in the multi-granularity hypergraph based on the multi-granularity hypergraph retrieval information, and determine the hypergraph retrieval result; The answer result determination module is used to construct question-and-answer background knowledge based on the hypergraph retrieval results, assemble the question-and-answer background knowledge with the original question to construct prompt words, and determine the answer result of the original question based on the prompt words. The multi-granularity hypergraph is a hypergraph constructed based on four granularities: paragraph, sentence, fact, and entity.
8. An intelligent question-and-answer device, characterized in that, include: At least one processor; and a memory communicatively connected to the at least one processor; The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the intelligent question-answering method according to any one of claims 1-6.
9. A storage medium containing computer-executable instructions, characterized in that, The computer-executable instructions, when executed by a computer processor, are used to perform the intelligent question-answering method as described in any one of claims 1-6.
10. A computer program product, characterized in that, It includes a computer program that, when executed by a processor, implements the intelligent question-answering method as described in any one of claims 1-6.