A multi-mechanism collaborative knowledge retrieval and question answering method, system, device, and medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-22
- Publication Date
- 2026-08-14
AI Technical Summary
[0003]本申请的目的是针对现有技术中单一推理机制难以适应不同类型查询导致答案不准确、不全面的问题;提出了一种多机制协同的知识检索问答方法、系统、设备及介质,通过融合三种查询请求处理机制进行协同处理,实现对多样化查询类型的精准适配与答案的准确全面生成
1、通过根据查询意图类型调度基于预定义逻辑规则的推理、基于图结构的隐含关系预测推理与自然语言生成中的至少两种机制进行协同处理。规则推理处理确定性逻辑,图结构推理挖掘隐含关系,自然语言生成提供流畅表达,三者协同互补覆盖了明确逻辑类、复杂关系类与自然语言解释类等多样化查询需求,使得系统能够灵活适配不同类型的问题,避免了单一技术路线在面对复杂查询时无法给出准确答案的缺陷;
Smart Images

Figure CN122570541A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of power automation technology, specifically to a multi-mechanism collaborative knowledge retrieval and question-answering method, system, device, and medium. Background Technology
[0002] In conventional power information retrieval and question-answering systems, a single rule-based reasoning technique is typically used for retrieval and question-answering processing. Rule-based reasoning relies on predefined, explicit logical rules, providing accurate answers to questions with deterministic logical relationships. However, in real-world applications, user queries exhibit high diversity and complexity. A single technical approach struggles to adapt to different types of questions, especially those involving complex implicit relationships or lacking explicit rules. Rule-based reasoning fails to effectively predict and mine relationships, resulting in inaccurate answers. Furthermore, a single reasoning mechanism cannot generate fluent answers that conform to users' natural language expression habits, leading to a lack of comprehensiveness and accuracy in the final output, failing to meet users' growing demands for precise retrieval and question-answering. Summary of the Invention
[0003] The purpose of this application is to address the problem that a single reasoning mechanism in the existing technology is difficult to adapt to different types of queries, resulting in inaccurate and incomplete answers. It proposes a multi-mechanism collaborative knowledge retrieval question answering method, system, device and medium, which integrates three query request processing mechanisms for collaborative processing to achieve accurate adaptation to diverse query types and accurate and comprehensive generation of answers.
[0004] To achieve the above objectives, the technical solutions adopted in the embodiments of this application are as follows: In a first aspect, embodiments of this application provide a multi-mechanism collaborative knowledge retrieval and question-answering method, the method comprising: In response to a query request, the query intent type is determined; based on the query intent type, at least two of the first, second, and third processing mechanisms are scheduled to collaboratively process the query request, wherein the third processing mechanism is constrained by the knowledge graph facts; and based on the output of the collaborative processing, a question-and-answer answer is generated.
[0005] In this solution, multiple mechanisms are coordinated to process different types of queries based on the query intent type, enabling different types of queries to be adapted to the most suitable reasoning and generation mechanisms. At the same time, natural language generation is constrained by knowledge graph facts, avoiding the defects of generative models that are prone to generating erroneous information, and achieving a dual improvement in the accuracy and comprehensiveness of the answers.
[0006] Optionally, the step of responding to a query request and determining the query intent type includes: receiving a natural language query request; parsing the natural language query request and extracting query keywords and semantic features; and determining the query intent type by performing intent recognition based on the query keywords and semantic features using an intent recognition model.
[0007] Optionally, the step of scheduling at least two of the first, second, and third processing mechanisms to collaboratively process the query request based on the query intent type includes: if the query intent type is an explicit logic type, then scheduling the first and third processing mechanisms to collaboratively process; if the query intent type is a complex relationship type, then scheduling the second and third processing mechanisms to collaboratively process; if the query intent type is a natural language interpretation type, then scheduling the first, second, and third processing mechanisms to collaboratively process; wherein, the first processing mechanism performs query reasoning based on predefined logical rules, the second processing mechanism performs query prediction reasoning based on implicit relationships in a graph structure, and the third processing mechanism generates query information based on natural language generation technology.
[0008] Optionally, the first processing mechanism includes: retrieving knowledge data related to the query request from the knowledge graph based on the query request; performing logical matching on the knowledge data based on a predefined logical rule base to determine the matching logical rules; and reasoning on the knowledge data based on the matching logical rules to arrive at a deterministic conclusion.
[0009] Optionally, the second processing mechanism includes: determining target entities and relationships related to the query request from a knowledge graph based on the query request; learning a graph structure representation of the target entities and relationships based on a graph neural network; and predicting implicit relationships between entities based on the graph structure representation.
[0010] Optionally, the third processing mechanism is constrained by knowledge graph facts, including: retrieving a knowledge graph subgraph related to the query request from the knowledge graph based on the query request; inputting the knowledge graph subgraph as a contextual fact constraint into the large language model; and generating a natural language answer by the large language model based on the contextual fact constraint.
[0011] Optionally, after generating the question-and-answer answer based on the output of the collaborative processing, the method further includes: determining a legality verification standard based on industry and security regulations; performing a legality verification on the question-and-answer answer based on the legality verification standard; and if the legality verification fails, correcting the question-and-answer answer or adding a risk warning.
[0012] Secondly, embodiments of this application provide a multi-mechanism collaborative knowledge retrieval and question-answering system, comprising: a query understanding module, used to determine the query intent type in response to a query request; a collaborative processing module, used to schedule at least two of a first processing mechanism, a second processing mechanism, and a third processing mechanism to collaboratively process the query request based on the query intent type, wherein the third processing mechanism is constrained by knowledge graph facts; and an answer generation module, used to generate question-answering answers based on the output of the collaborative processing.
[0013] Thirdly, embodiments of this application provide a computer device, including: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; the memory is used to store computer programs; and the processor is used to implement the steps of the method described in the first aspect above when executing the program stored in the memory.
[0014] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the method described in the first aspect above.
[0015] The beneficial effects of this application are: 1. The system employs at least two mechanisms—predefined logical rule-based reasoning, graph-based implicit relation prediction reasoning, and natural language generation—to collaboratively process queries based on the query intent type. Rule-based reasoning handles deterministic logic, graph-based reasoning uncovers implicit relations, and natural language generation provides fluent expression. These three mechanisms work synergistically to cover diverse query needs, including explicit logic, complex relational queries, and natural language interpretation queries. This allows the system to flexibly adapt to different types of problems, avoiding the shortcomings of a single technical approach that cannot provide accurate answers to complex queries. 2. By using the retrieved knowledge graph subgraph as contextual fact constraints input into the large language model during the natural language generation process, the generation process of the large language model is strictly limited by objective knowledge facts. This fundamentally cuts off the risk path that generative models are prone to producing illusions or outputting irrelevant information, thereby ensuring the accuracy and reliability of the answer content while obtaining natural and fluent answers that conform to the user's expression habits. Attached Figure Description
[0016] Other features, objects, and advantages of this application will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings. The drawings are for illustrative purposes only and are not intended to limit the scope of this application. Furthermore, the same reference numerals denote the same parts throughout the drawings.
[0017] Figure 1A flowchart of a multi-mechanism collaborative knowledge retrieval and question answering method provided in this application embodiment.
[0018] Figure 2 This is a schematic diagram of a multi-mechanism collaborative knowledge retrieval and question-answering system module provided in an embodiment of this application.
[0019] Figure 3 A schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description of this application is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely one preferred embodiment of this application and are only used to explain this application. They do not limit the scope of protection of this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0021] Example 1: As Figure 1 As shown, a multi-mechanism collaborative knowledge retrieval and question answering method includes steps S1-3, wherein: S1. In response to the query request, determine the query intent type.
[0022] In an optional embodiment, step S1 includes: Receive natural language query requests; The natural language query request is parsed to extract query keywords and semantic features; The intent recognition model identifies the query intent type based on the query keywords and semantic features.
[0023] Specifically, a query request can be natural language text entered by the user through the terminal, or a structured query statement transmitted via an application programming interface. It reflects the inherent needs of users in terms of logical certainty, relational complexity, and fluency of expression.
[0024] In some embodiments, natural language text input by the user through a terminal interface or application programming interface, such as "What are the possible causes of the T1 transformer failure?", is received by the system as the original query request. The received original text undergoes basic parsing operations such as word segmentation, part-of-speech tagging, and dependency parsing to extract keywords representing the core query object (e.g., T1 transformer, failure causes) and deep semantic feature vectors reflecting the tone, scope, and complexity of the query. The intent recognition model then uses the extracted features as input and, through classification or clustering logic, maps the current query to preset categories such as explicit logic, complex relationships, or natural language interpretation. It should be noted that this embodiment does not limit the specific network architecture of the intent recognition model; any model architecture capable of text intent classification, such as traditional support vector machines and decision trees, or fine-tuned pre-trained models based on the Transformer architecture, can be used to construct an intent recognition model to determine the query intent.
[0025] S2. Based on the query intent type, at least two of the first processing mechanism, the second processing mechanism, and the third processing mechanism are scheduled to process the query request in a coordinated manner, wherein the third processing mechanism is constrained by the knowledge graph facts.
[0026] In an optional embodiment, in step S2, based on the query intent type, at least two of the first, second, and third processing mechanisms are scheduled to collaboratively process the query request, including: If the query intent type is an explicit logical type, then the first processing mechanism and the third processing mechanism are scheduled to perform collaborative processing. If the query intent type is a complex relationship type, then the second processing mechanism and the third processing mechanism are scheduled to work together. If the query intent type is natural language interpretation, then the first processing mechanism, the second processing mechanism, and the third processing mechanism are scheduled to perform collaborative processing. The first processing mechanism performs query reasoning based on predefined logical rules, the second processing mechanism performs query prediction reasoning based on the implicit relationships of the graph structure, and the third processing mechanism generates query information based on natural language generation technology.
[0027] Specifically, explicit logic queries refer to questions with clear causal chains or well-defined attributes, such as "What is the rated voltage of transformer T1 in a substation?" or "Does the protection level of a switchgear meet specific standards?" The core requirement for these queries is to obtain absolutely certain objective facts or compliance judgments. In this embodiment, such queries do not use the second processing mechanism based on graph structures alone because graph reasoning is essentially based on the implicit relationship between probability and topology for prediction. Its output results have statistical uncertainty and cannot support scenarios requiring 100% certainty, such as compliance judgments. Therefore, it is necessary to schedule the first processing mechanism to derive a deterministic conclusion based on predefined logical rules, while simultaneously scheduling the third processing mechanism to generate a natural language expression that conforms to user reading habits, transforming this rigid deterministic conclusion into a natural language expression. The two work together to achieve a precise fit between deterministic content and fluent expression.
[0028] Specifically, complex relationship queries refer to those involving multi-entity, cross-level associations, lacking explicit rule definitions, or requiring the discovery of potential risks. Examples include "Which devices in a certain regional power grid might be at risk of cascading failures?" or "What historical violations are implicitly associated with the qualifications of a certain maintenance personnel?" The core objective of these queries is to discover potential connections not explicitly recorded in the knowledge base. In this embodiment, such queries do not solely utilize the first processing mechanism based on predefined logical rules, because rule-based reasoning strictly relies on a predefined rule base. For blind spots not covered by the rule base or complex topological associations spanning multiple hops, rule-based reasoning will directly return empty results, failing to perform effective relationship prediction and mining. Therefore, a second processing mechanism based on graph structure must be scheduled to capture complex topological structures in the graph and predict missing relationships. Simultaneously, a third processing mechanism is scheduled to generate easily understandable narrative answers that transform complex predicted graph relationships. The two mechanisms work together to achieve a precise fit between implicit discovery and fluent expression.
[0029] Specifically, natural language interpretation queries refer to comprehensive questions that require both solid evidence and in-depth correlation analysis, while also demanding detailed natural language explanations, such as "What are the possible causes of the T1 transformer failure? Please provide a detailed analysis combining regulations and historical data." The core requirement for these types of questions is a comprehensive, multi-dimensional answer. In this embodiment, such queries require the full scheduling of three mechanisms. Single rule-based reasoning can only provide a clear list of failure rules, lacking the mining of potential environmental factors; single graph reasoning can only predict potential failure correlations, lacking a solid judgment of regulatory compliance; and if only natural language generation is used without the input of the former two mechanisms, the large language model is prone to fabricating causes. Therefore, rule-based reasoning must be scheduled to provide definitive conclusions as the argument framework, graph reasoning must be scheduled to mine implicit relationships as supplementary arguments, and finally, natural language generation, under the constraints of the knowledge graph facts, must integrate the outputs of the former two mechanisms to generate a logically rigorous, comprehensively evidenced, and fluently expressed natural language answer. The full collaboration of these three processing mechanisms achieves a comprehensive adaptation of the definitive framework, implicit supplementation, and fluent integration.
[0030] In this embodiment, by breaking down the rule-based reasoning process into detailed sub-processes, the unique value of the first processing mechanism in handling deterministic logic is demonstrated from a mechanistic perspective. Within the multi-mechanism collaborative framework, the output of the first processing mechanism provides an unshakeable argumentative framework for natural language generation, ensuring the final answer possesses logical necessity at the factual level. The second processing mechanism, on the other hand, fills the gaps in implicit relationships that the first mechanism cannot reach, and natural language generation further integrates the outputs of the former two into a natural language answer that conforms to user reading habits. Each of the three mechanisms anchors to three non-overlapping functional boundaries: deterministic logic, implicit relationship mining, and fluent expression, forming a synergistic and complementary link of deterministic framework, implicit supplementation, and fluent integration. No single mechanism can simultaneously cover all three dimensions.
[0031] In an optional embodiment, the first processing mechanism includes: Based on the query request, retrieve knowledge data related to the query request from the knowledge graph; Based on a predefined logical rule base, the knowledge data is logically matched to determine the matching logical rules; Based on the matching logic rules, reasoning is performed on the knowledge data to arrive at a deterministic conclusion.
[0032] Specifically, the logical rule base is constructed based on the deterministic causal chains and compliance constraints of the business scenario. The logical rule base stores inference paths predefined by domain experts that have absolute judgment force, such as "if the operating current of equipment exceeds the rated threshold and the duration exceeds the specified value, it is judged as an overload violation" or "if a piece of equipment in the substation is a core node and has no backup line, it is judged as a single point of failure risk device." Using the retrieved knowledge data as input facts, the system traverses the rule preconditions in the logical rule base to find perfectly matching rule items, thereby determining the logical judgment path applicable to the current query.
[0033] Furthermore, based on the deductive logic stipulated by this rule, the input knowledge data is deduced and reasoned. Here, a deterministic conclusion means that, given that both the facts and the rules are correct, the derivation result has 100% logical necessity and is irrefutable, without any probabilistic or statistical uncertainty. This characteristic contrasts sharply with the predictive conclusions output by the second processing mechanism based on implicit relationship prediction reasoning using graph structures. This deterministic conclusion is based on rigorous logical deduction; as long as the rule premises are met, the conclusion is necessarily true, leaving no room for ambiguity. For example, in the equipment location reasoning scenario, if the rule base defines that equipment located within substation A must belong to the jurisdiction of substation A, and the retrieved facts confirm that transformer T1 is located within substation A, then the deduced conclusion that transformer T1 belongs to the jurisdiction of substation A is a deterministic conclusion. This conclusion can be directly used as conclusive evidence for compliance determination without further probabilistic verification.
[0034] In an optional embodiment, the second processing mechanism includes: Based on the query request, the target entities and their relationships related to the query request are determined from the knowledge graph; The target entity and its associated relationships are learned based on a graph neural network. Based on the graph structure representation, the implicit relationships between entities are predicted.
[0035] Specifically, the core of the second processing mechanism lies in locating the entity and its surrounding topological network structure. For example, when the query request involves "which devices in a certain power grid may be at risk of cascading failures", it will not only extract the target entity "a certain power grid", but also follow the connections in the graph to determine the surrounding equipment entities and line entities that are directly or indirectly related to the entity, as well as the relationships between them, such as connection, power supply, backup power supply, etc. These relationships include both known relationships that have been explicitly stored in the graph and potential paths that provide topological context for subsequent predictions, thus forming the structural basis for the graph neural network to perform implicit inference.
[0036] Graph neural network (GNN) models are a class of deep learning architectures specifically designed for processing non-Euclidean graph structures. This embodiment does not limit the specific network variants of the GNN model; any graph deep learning architecture capable of aggregating neighbor node features through message passing to update the representation of the central node can be used to construct a GNN model.
[0037] In some embodiments, the core mechanism for determining the logical rules of matching lies in topological feature aggregation. The graph neural network model uses the target entity identified by retrieving knowledge data as the central node and the relationships as edges. Through a multi-layered iterative message passing process, it weightedly fuses the initial features of the central node with the features of its multi-hop neighbor nodes. This fusion not only captures the entity's local attribute information, but more importantly, it encodes the entity's global topological position information in the knowledge graph into the final graph structure representation vector. In other words, even if two entities have similar local attributes, if their neighboring nodes in the graph are of different types and structures, their learned graph structure representations will be drastically different. This deep ability to capture topological structure is the micro-mechanism behind the graph neural network's ability to predict missing relationships.
[0038] Furthermore, based on the graph structure representation vector containing topological semantics output above, the existence of implicit relationships between target entities that are not yet explicitly recorded in the knowledge graph is inferred through decoder or similarity calculation. The implicit relationship referred to in this application refers to a potential association that lacks direct textual records or explicit rule definitions in existing data sources, but has a high probability of being true in the statistical and semantic space through topological co-occurrence patterns and feature correlations between entities. This implicit relationship is a data-driven and topologically based probabilistic inference that reveals blind spots that rule-based reasoning cannot reach, representing a reasonable assumption and discovery of unknown associations. For example, in complex relationship scenarios such as equipment failure probability prediction, rule-based reasoning cannot determine a causal relationship between abnormal environmental temperature and humidity and the failure of transformer T1, because the rule base may lack such cross-domain rules; however, graph neural network reasoning can predict the potential underlying implicit relationship between the two by learning the frequent co-occurrence topological patterns of "abnormal temperature and humidity nodes" and "transformer failure nodes" in a large number of historical failure graphs. While such predictive conclusions lack absolute logical certainty, they provide valuable clues and early warnings for complex risk assessment, compensating for the shortcomings of rule-based reasoning when facing long-tail scenarios and cross-domain relationships.
[0039] In an optional embodiment, in step S2, the third processing mechanism is constrained by knowledge graph facts, including: Based on the query request, retrieve the knowledge graph subgraph related to the query request from the knowledge graph; The knowledge graph subgraph is used as a contextual fact constraint input into the large language model; The large language model generates a natural language answer based on the contextual fact constraints.
[0040] Specifically, when the system schedules the natural language generation mechanism, its primary task is not to directly allow the model to generate text, but to first extract structured evidence from the underlying graph database as anchor points for facts. Unlike rule-based reasoning that retrieves attribute data or graph structure reasoning that anchors the topology network, the core of this mechanism lies in extracting local network segments that have multi-dimensional semantic relationships with the query request, i.e., knowledge graph subgraphs. For example, when the query request involves "the cause of the T1 transformer failure", the system not only retrieves the central entity node "T1 transformer", but also extracts the "overload rule node", "environmental temperature and humidity entity node", and "relevant legal clause entity node" connected to it along the association edges in the graph, forming a compact subgraph structure containing entities, relationships, and attributes. It should be noted that the scope of the subgraph retrieved here can be dynamically adjusted according to the complexity of the query intent. It can be a micro subgraph containing only the central entity and one-hop neighbors, or an extended subgraph covering multi-hop associations and cross-domain entities, as long as it can provide a sufficient and non-redundant factual framework for subsequent generation.
[0041] Specifically, a large language model refers to a class of deep learning architectures with massive parameters and powerful natural language understanding and generation capabilities. This embodiment does not limit the specific network structure or commercial source of the large language model; any pre-trained language architecture capable of conditional text generation based on the input context can achieve natural language generation. The core mechanism of this step lies in the transformation of structured facts into contextual constraints. Knowledge graph subgraphs are essentially structured data composed of triples (head entity, relation, tail entity) and attribute key-value pairs, while the input interface of a large language model typically only accepts prompts in the form of natural language sequences. Therefore, the system needs to serialize the retrieved subgraphs, mapping them to natural language text or context fragments in a specific template format. For example, the triple "T1 transformer - risk of failure - abnormal environmental temperature and humidity" can be transformed into a natural language statement such as "Known fact: T1 transformer has a risk of failure due to abnormal environmental temperature and humidity," and this statement is then used as a pre-constraint text before the user's original query, together forming the complete prompt for inputting into the large language model.
[0042] Understandably, the hallucination phenomenon in large language models stems from the fact that, in an open generative space, the model relies solely on its internal implicit parameter memory for probability sampling, lacking strong intervention from external objective facts, causing the generation trajectory to deviate from true logic. Using subgraphs as contextual factual constraint inputs is equivalent to forcibly demarcating a factual fence in the model's decoding space. This forces the model's attention mechanism to focus on the objective knowledge entities and relationships provided in the context when predicting the next lexical unit, thereby suppressing the model's tendency to diverge into irrelevant or fictitious semantic spaces from the source of the probability distribution, fundamentally blocking the risky path of hallucination generation.
[0043] Furthermore, under factual constraints, the model integrates and connects the deterministic conclusions output by rule-based reasoning with the implicit relationship predictions output by graph structure reasoning at the natural language level, based on the entity association logic provided by the subgraph, to generate fluent answers that conform to human reading habits while strictly adhering to factual boundaries. For example, the model will not fabricate a cause of failure that does not appear in the subgraph, but will accurately cite factual nodes such as "overload" and "abnormal environmental temperature and humidity" contained in the subgraph, and provide a compliance explanation based on the regulatory clause nodes in the subgraph.
[0044] In this embodiment, natural language generation plays the role of a "constrained fluent expresser." It not only solves the problem of rigid and unreadable output results from rule-based reasoning and graph structure reasoning, but more importantly, through the subgraph context constraint mechanism, it completely reverses the inherent defect of generative models that are prone to illusion. This ensures that the final output answer is both natural and fluent, while also ensuring the factual accuracy and reliability of the answer. Thus, in the causal chain of structure → mechanism → effect, it establishes the irreplaceable role of the fact-constrained generation mechanism in the collaborative system and the underlying support for preventing evasion.
[0045] S3. Generate question-and-answer answers based on the output of collaborative processing.
[0046] In an optional embodiment, after step S3, the method further includes: Based on industry and safety standards, determine the legality verification criteria; The legality of the question and answer answers is verified based on the aforementioned legality verification criteria. If the legality verification fails, the question and answer answers are corrected or risk warnings are added.
[0047] Specifically, based on the domain involved in the current business scenario, the system dynamically loads corresponding legality verification standards. These standards can be pre-compiled and structured by domain experts, such as mandatory prohibitions related to power safety operations or anonymization specifications related to data privacy. If compliance flaws are found in the answer during the verification process, the system will take intervention measures. For minor flaws, the system can issue warnings by adding prominent risk warnings (such as "This operation must be performed under power-off conditions"); for serious violations, the system will directly correct the answer, removing or replacing the violating statements to ensure that the final answer presented to the user is absolutely safe and compliant.
[0048] In this embodiment, the post-compliance verification step provides the final security guarantee for the entire question-and-answer chain, enabling the system to not only provide accurate and comprehensive answers when facing high-risk business scenarios, but also to ensure the legality and security of the answers. This effectively reduces compliance risks in business applications and further improves the availability and reliability of the system in real business environments.
[0049] Based on the same inventive concept, this application also provides a multi-mechanism collaborative knowledge retrieval and question-answering system corresponding to a multi-mechanism collaborative knowledge retrieval and question-answering method, such as... Figure 2 As shown, it includes: The query understanding module is used to determine the query intent type in response to a query request; The collaborative processing module is used to schedule at least two of the first, second and third processing mechanisms to collaboratively process the query request based on the query intent type, wherein the third processing mechanism is constrained by knowledge graph facts. The answer generation module is used to generate question-and-answer answers based on the output of collaborative processing.
[0050] In this embodiment, the query understanding module provides a precise scheduling premise for the collaborative processing module. The collaborative processing module overcomes the adaptability defects of the single reasoning module and the illusion defects of the generative module through the dynamic adaptation and fact constraint mechanism of internal multi-mechanism. The answer generation module ensures the standardization and completeness of the final output.
[0051] This application also provides a computer device, such as... Figure 3 As shown, it includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; The processor, when executing programs stored in memory, implements a multi-mechanism collaborative knowledge retrieval and question-answering method.
[0052] The communication bus mentioned in the above computer equipment can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not indicate that there is only one bus or one type of bus.
[0053] The communication interface is used for communication between the aforementioned computer equipment and other devices.
[0054] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0055] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0056] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements a multi-mechanism collaborative knowledge retrieval and question-answering method.
[0057] The above-described embodiments are preferred embodiments of this application and are not intended to limit the specific scope of this application. The scope of this application includes but is not limited to the specific embodiments described above. All equivalent changes made in accordance with the shape, structure, and method of this application are within the protection scope of this application.
Claims
1. A multi-mechanism collaborative knowledge retrieval and question answering method, characterized in that: Includes the following steps: In response to a query request, determine the type of query intent; Based on the query intent type, at least two of the first, second, and third processing mechanisms are scheduled to collaboratively process the query request, wherein the third processing mechanism is constrained by the knowledge graph facts. Based on the output of collaborative processing, questions and answers are generated.
2. The multi-mechanism collaborative knowledge retrieval and question answering method according to claim 1, characterized in that: The step of responding to a query request and determining the query intent type includes: Receive natural language query requests; The natural language query request is parsed to extract query keywords and semantic features; The intent recognition model identifies the query intent type based on the query keywords and semantic features.
3. The multi-mechanism collaborative knowledge retrieval and question answering method according to claim 2, characterized in that: The step of coordinating at least two of the first, second, and third processing mechanisms based on the query intent type to process the query request includes: If the query intent type is an explicit logical type, then the first processing mechanism and the third processing mechanism are scheduled to perform collaborative processing. If the query intent type is a complex relationship type, then the second processing mechanism and the third processing mechanism are scheduled to work together. If the query intent type is natural language interpretation, then the first processing mechanism, the second processing mechanism, and the third processing mechanism are scheduled to perform collaborative processing. The first processing mechanism performs query reasoning based on predefined logical rules, the second processing mechanism performs query prediction reasoning based on the implicit relationships of the graph structure, and the third processing mechanism generates query information based on natural language generation technology.
4. The multi-mechanism collaborative knowledge retrieval and question answering method according to claim 1, characterized in that: The first processing mechanism includes: Based on the query request, retrieve knowledge data related to the query request from the knowledge graph; Based on a predefined logical rule base, the knowledge data is logically matched to determine the matching logical rules; Based on the matching logic rules, reasoning is performed on the knowledge data to arrive at a deterministic conclusion.
5. The multi-mechanism collaborative knowledge retrieval and question answering method according to claim 1, characterized in that: The second processing mechanism includes: Based on the query request, the target entities and their relationships related to the query request are determined from the knowledge graph; The target entity and its associated relationships are learned based on a graph neural network. Based on the graph structure representation, the implicit relationships between entities are predicted.
6. The multi-mechanism collaborative knowledge retrieval and question answering method according to claim 1, characterized in that: The third processing mechanism is constrained by knowledge graph facts, including: Based on the query request, retrieve the knowledge graph subgraph related to the query request from the knowledge graph; The knowledge graph subgraph is used as a contextual fact constraint input into the large language model; The large language model generates a natural language answer based on the contextual fact constraints.
7. The multi-mechanism collaborative knowledge retrieval and question answering method according to claim 1, characterized in that: After generating the question-and-answer answer based on the output of the collaborative processing, the process further includes: Based on industry and safety standards, determine the legality verification criteria; The legality of the question and answer answers is verified based on the aforementioned legality verification criteria. If the legality verification fails, the question and answer answers are corrected or risk warnings are added.
8. A multi-mechanism collaborative knowledge retrieval and question-answering system, characterized in that: The multi-mechanism collaborative knowledge retrieval and question answering method as described in any one of claims 1-7 includes: The query understanding module is used to determine the query intent type in response to a query request; The collaborative processing module is used to schedule at least two of the first, second and third processing mechanisms to collaboratively process the query request based on the query intent type, wherein the third processing mechanism is constrained by knowledge graph facts. The answer generation module is used to generate question-and-answer answers based on the output of collaborative processing.
9. A computer device, characterized in that: include: The system includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus; the memory is used to store computer programs; and the processor, when executing the program stored in the memory, implements the steps of the multi-mechanism collaborative knowledge retrieval and question answering method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of a multi-mechanism collaborative knowledge retrieval and question-answering method as described in any one of claims 1-7.