Power complex question-answering method and device based on large-model multi-agent

By building a knowledge base and multi-agent framework in the power field, the accuracy and reliability issues of the power question-answering platform in complex tasks are solved, and efficient automated processing and accurate analysis of complex power tasks are achieved.

CN120821796APending Publication Date: 2025-10-21STATE GRID HEBEI ELECTRIC POWER CO LTD +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510783745.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-12
Publication Date
2025-10-21

AI Technical Summary

Technical Problem

The existing power question-and-answer platform produces inaccurate and unreliable results when handling complex tasks. Traditional expert systems have limitations in complex reasoning and logical inference, making it difficult to efficiently handle complex problems in the power sector.

Method used

Build a domain knowledge base and design a multi-agent framework that integrates the knowledge base and LLM reasoning, including business processing agents, domain knowledge agents and action planning agents. Through interaction, it acquires professional knowledge in the power field and generates analysis results by combining action planning and domain knowledge.

Benefits of technology

It improves the reasoning accuracy and flexibility of complex power tasks, alleviates the planning illusion problem of large models in the power field, and improves the accuracy and efficiency of complex power question answering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120821796A_ABST
    Figure CN120821796A_ABST
Patent Text Reader

Abstract

The invention provides an electric power complex question-answering method and device based on large-model multi-agent, and relates to the technical field of electric power natural language processing. The method comprises the steps that a domain knowledge base is constructed, and a large-model multi-agent collaborative reasoning framework is constructed and comprises a service processing agent, a domain knowledge agent and an action planning agent; acquiring a natural language problem of a target electric power complex task input by a user by using a business processing agent; interaction between the business processing agent and the action planning agent is utilized to obtain action planning knowledge of the natural language problem; the business processing agent interacts with the domain knowledge agent, and domain knowledge of the target electric power complex task is obtained from the domain knowledge base; and generating an analysis result of the target electric power complex task in combination with the action planning knowledge and the domain knowledge in the business processing agent. According to the invention, the accuracy and reliability of power complex problem results can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electric power natural language processing technology, and in particular to a method and device for complex electric power question answering based on a large model and multiple intelligent agents. Background Art

[0002] In recent years, the application of artificial intelligence (AI) technologies in the power industry has become increasingly widespread. The introduction of technologies such as knowledge graphs and semantic understanding has provided crucial support for the development of power Q&A platforms. However, existing platforms primarily focus on retrieving business metrics, and their utilization of unstructured text data such as industry standards, specifications, and case studies remains insufficient. This data is scattered across power system websites and business systems, lacking a unified knowledge representation, acquisition, and storage mechanism. This results in low knowledge retrieval and utilization efficiency, making it difficult to meet actual business needs.

[0003] To address these issues, the power industry has begun exploring the construction of business-scenario-oriented knowledge bases. By integrating structured information and unstructured text data, these bases enable users to retrieve relevant concept definitions, solutions, and other content while simultaneously searching for business indicators. This shift aims to upgrade from "what" to "why," assisting power workers in decision-making and expanding the application scenarios of question-and-answer platforms. However, complex "why" tasks often involve complex business logic, such as industry specification queries and data analysis. Traditional expert systems have significant limitations in complex reasoning and logical inference, making it difficult to efficiently handle such tasks.

[0004] Agent systems based on large language models (LLMs) offer a new technical approach to addressing these challenges. LLM-driven agents, through their powerful natural language processing and knowledge reasoning capabilities, can significantly reduce the learning curve for system designers and improve the productivity of domain professionals. However, LLMs can exhibit hallucinations and reasoning errors when handling complex tasks, particularly in complex reasoning tasks in the power sector, such as line loss analysis and domain knowledge querying. These issues can compromise the accuracy and reliability of the results. Summary of the Invention

[0005] This application provides a method and device for complex power question answering based on a large model and multiple intelligent agents to solve the problem of inaccurate and unreliable results in the existing technology when dealing with complex power problems.

[0006] In a first aspect, the present application provides a complex power question-answering method based on a large model and multiple agents, comprising:

[0007] Build a domain knowledge base and a large-model multi-agent collaborative reasoning framework, which includes a business processing agent, a domain knowledge agent, and an action planning agent;

[0008] Using business processing agents to obtain natural language problems of complex power tasks input by users;

[0009] Utilizing the business processing agent to interact with the action planning agent to obtain action planning knowledge for the natural language problem;

[0010] Utilizing the business processing agent to interact with the domain knowledge agent to acquire domain knowledge of the target power complex task from the domain knowledge base;

[0011] The action planning knowledge and the domain knowledge are combined in the business processing agent to generate an analysis result of the target power complex task.

[0012] In a second aspect, the present application provides a complex power question-answering device based on a large model and multiple agents, comprising:

[0013] A construction module is used to build a domain knowledge base and a large-model multi-agent collaborative reasoning framework, which includes a business processing agent, a domain knowledge agent, and an action planning agent;

[0014] The question acquisition module is used to use the business processing agent to obtain the natural language question of the target power complex task input by the user;

[0015] An action planning acquisition module, configured to utilize the business processing agent to interact with the action planning agent to acquire action planning knowledge for the natural language question;

[0016] A domain knowledge acquisition module, configured to utilize the business processing agent to interact with the domain knowledge agent to acquire the domain knowledge of the target power complex task from the domain knowledge base;

[0017] A result analysis module is used to combine the action planning knowledge and the domain knowledge in the business processing intelligent body to generate an analysis result of the target power complex task.

[0018] The present application provides a method and device for complex power question answering based on large-model multi-agents. By constructing a domain knowledge base and a large-model multi-agent collaborative reasoning framework, the large-model multi-agent collaborative reasoning framework includes a business processing agent, a domain knowledge agent and an action planning agent; the business processing agent is used to obtain the natural language question of the target complex power task input by the user; the business processing agent is used to interact with the action planning agent to obtain the action planning knowledge of the natural language question; the business processing agent is used to interact with the domain knowledge agent to obtain the domain knowledge of the target complex power task from the domain knowledge base; the action planning knowledge and domain knowledge are combined in the business processing agent to generate the analysis results of the target complex power task. This application decomposes complex power tasks into action planning, domain knowledge acquisition and business processing, and demonstrates good generalization ability and versatility when processing complex question-answering tasks involving power data and power domain knowledge; in addition, this application combines knowledge graphs with large models, specifically introduces domain knowledge bases, and constructs corresponding interactive tools, so that the large model can interact with the domain knowledge base to dynamically acquire domain knowledge, thereby improving the flexibility of the entire framework in acquiring knowledge and the accuracy of reasoning, making up for the lack of professional power domain knowledge in the large model, and improving the performance of the large model in complex power question-answering tasks; at the same time, this application can also alleviate the planning illusion problem of large model intelligent agents, and improve the planning accuracy of the multi-agent framework when processing complex power tasks. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0020] Figure 1 This is a schematic diagram of the phase division of the large-model multi-agent-based complex power question-answering method provided in an embodiment of the present application;

[0021] Figure 2 This is a flowchart for implementing the complex power question-answering method based on a large model and multiple agents provided in an embodiment of the present application;

[0022] Figure 3 This is a structural diagram of the knowledge representation model provided in the embodiment of the present application;

[0023] Figure 4 This is a power knowledge concept map provided by an embodiment of the present application;

[0024] Figure 5 This is a schematic diagram of the structure of the large-model multi-agent collaborative reasoning framework provided in the embodiments of the present application;

[0025] Figure 6 This is a structural diagram of the complex power question-answering device based on a large model and multiple agents provided in an embodiment of the present application. DETAILED DESCRIPTION

[0026] In the following description, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obscuring the description of the present application with unnecessary detail.

[0027] In order to make the purpose, technical solutions and advantages of this application clearer, specific embodiments will be described below with reference to the accompanying drawings.

[0028] In order to solve the problem of inaccurate and unreliable results in existing technologies when dealing with complex power problems, this application provides a complex power question-answering method based on large-model multi-agents, focusing on building a knowledge base in the power field and designing a multi-agent framework that integrates the knowledge base and LLM reasoning. This framework aims to alleviate the illusion problem of LLM and improve the accuracy of reasoning, thereby realizing the automated processing of complex tasks. By combining the domain expertise of the knowledge base with the reasoning ability of LLM, the performance of the system in complex power tasks can be further improved, providing strong support for the intelligent development of the power industry. Reference Figure 1 , which consists of two stages:

[0029] The first stage is to build a domain knowledge base: build a knowledge graph in the power field; the second stage is knowledge reasoning: build a large-model multi-agent collaborative reasoning framework, obtain domain knowledge and business data, combine business logic, perform automatic analysis, and give analysis results. The large-model multi-agent collaborative reasoning framework proposed in this application shows good generalization ability and versatility when dealing with complex tasks involving power data and power domain knowledge. This application combines power domain knowledge and intelligent agents, and the intelligent agent dynamically acquires power domain knowledge to improve the flexibility of knowledge acquisition and reasoning accuracy. The action planning intelligent agent proposed in this application generates an action sequence that conforms to the task processing logic by retrieving the action knowledge from the action knowledge base, which alleviates the planning illusion problem in the framework.

[0030] Figure 2 The implementation flow chart of the large-model multi-agent complex power question-answering method provided in the embodiment of this application is detailed as follows:

[0031] In step 201, a domain knowledge base is constructed, and a large-model multi-agent collaborative reasoning framework is constructed. The large-model multi-agent collaborative reasoning framework includes a business processing agent, a domain knowledge agent, and an action planning agent.

[0032] Since the embodiment of the present application is mainly about questions and answers about complex power tasks in the power field, the embodiment of the present application builds a knowledge representation model based on the characteristics of the knowledge source and application scenarios in the power field, defines knowledge units and constructs a concept map, and stores knowledge to build a domain knowledge base in the power field. Then, a large-model multi-agent collaborative reasoning framework is constructed based on the responsibilities and functions of complex power tasks. Among them, the large-model multi-agent collaborative reasoning framework includes business processing agents, domain knowledge agents, and action planning agents. The domain knowledge base interacts with the domain knowledge agents in the large-model multi-agent collaborative reasoning framework.

[0033] By building a specialized domain knowledge base, the embodiments of the present application can ensure that the knowledge and information cited when answering natural language questions related to complex power tasks are accurate and professional, which helps to improve the quality and credibility of the answers. In addition, the embodiments of the present application introduce a large-model multi-agent collaborative reasoning framework, especially the collaborative work of business processing agents, domain knowledge agents, and action planning agents, which can more effectively handle complex power tasks. At the same time, each agent is responsible for different functions and works together to form a comprehensive understanding of complex problems and solution strategies.

[0034] In one possible implementation, building a domain knowledge base may include:

[0035] Based on the needs of different business scenarios in the power sector, a fact-based and process-based knowledge representation model suitable for knowledge reasoning is constructed. The knowledge representation model includes an underlying structure, an intermediate structure, and an upper structure. The underlying structure includes entities and entity relationships, the intermediate structure includes event elements, and the upper structure includes events and event relationships.

[0036] Define corresponding knowledge units based on the characteristics of the power sector and different business scenarios in the power sector. Knowledge units include events, event relationships, entities, and entity relationships.

[0037] Construct a concept map based on the knowledge representation models and knowledge units in different business scenarios in the power sector;

[0038] A domain knowledge base is constructed using knowledge representation models, knowledge units and concept maps in different business scenarios in the power field.

[0039] Optionally, this embodiment collects and sorts out power field data, defines a knowledge representation model, related knowledge units and concept maps, and builds a domain knowledge base. Specifically:

[0040] (1) Define the knowledge representation model

[0041] Aiming at different business scenarios, and addressing the issues of insufficiently structured standard documents and dispersed business system data in knowledge services for the power industry, this paper constructs representation models for factual and process-based knowledge suitable for knowledge reasoning based on specific business scenario requirements. The reasoning process of complex problem tasks involves both factual entity knowledge and process-based event knowledge. Therefore, a knowledge representation model that integrates events and entities is constructed to better support knowledge reasoning. Specifically, a three-layer knowledge representation model integrating events and entities is constructed based on the business requirements of complex power question-answering and the characteristics of power knowledge itself. The knowledge representation model is constructed based on unstructured domain knowledge sources. The knowledge representation model comprises a bottom layer structure, a middle layer structure, and a top layer structure. Entities form the bottom layer of the model, while events form the top layer. Event elements serve as the middle layer of the knowledge representation model, connecting the bottom layer entities with the top layer events.

[0042] The three-layer architecture of the knowledge representation model is designed as follows: a) The bottom layer is composed of entity knowledge units, which include equipment, parameters, standard terminology entities and their attribute association relationships in the power industry specification documents; b) The middle semantic association layer establishes a dynamic association network between entities and events by defining event element mapping rules and role binding mechanisms; c) The upper-layer event knowledge unit is modeled based on business process characteristics and contains procedural event knowledge.

[0043] For example, refer to Figure 3 The upper layer is the event, the middle layer is the event element, and the bottom layer is the entity. Among them, events may include capacity expansion, user application, equipment installation, electricity billing, power supply, power outage, equipment failure, line maintenance, etc. Event elements may include objects, environments, time, assertions, language expressions, etc. Entities may include electricity sales, service work orders, business expansion work orders, units, electricity prices, substations, marketing ledgers, lines, line losses, users, electricity consumption, etc. The relationship between the three can be associated according to actual needs, or as Figure 3 The connection relationship in .

[0044] Compared with the limitation of traditional knowledge representation models that only perform single-dimensional modeling on entities or events, this embodiment realizes the organic integration of factual knowledge and procedural knowledge by constructing a three-layer association architecture of entity-element-event.

[0045] (2) Define knowledge units

[0046] The knowledge units in this embodiment are defined based on the characteristics of the existing power knowledge source and business scenario requirements in the power field. The knowledge units include events, event relationships, entities, and entity relationships.

[0047] When defining events for power business scenarios, this embodiment uses a four-element event ontology model to represent event diversity in a flexible and simple manner. This model represents events as e = {A, O, V, L}, where A represents the action element, O represents the object element, V represents the environment element, and L represents the language representation. Depending on the event type, corresponding roles are defined for each element. For example, the object element can be composed of {constructor, contractor, responsible department}, etc.

[0048] For example, taking the line loss business scenario as an example, the cause of the line loss is modeled as an abnormal event. For example, the file abnormal event "The current transformer ratio file configured in the marketing business application system and the electricity consumption information collection system is inconsistent with the on-site configuration" is modeled as e = {A: inconsistent; O: current transformer ratio file; V: marketing business application system, electricity consumption information collection system; L: the current transformer ratio file configured in the marketing business application system and the electricity consumption information collection system is inconsistent with the on-site configuration}.

[0049] In the embodiment of the present application, a total of 41 event types are provided, including line loss, collection anomalies, file anomalies, statistical anomalies, metering anomalies, electricity theft anomalies, technical anomalies, solutions, management regulations, cases, online audits, special audits, on-site audits, routine audits, audit cooperation, result review, rectification feedback, whitelist application, customer service management, natural impacts, external forces, equipment failures, insufficient system power, insufficient power supply system equipment capacity, power restrictions, power adjustments, user power usage errors, user audits, formulation of maintenance plans, formulation of construction plans, power outages, repairs, power restoration, implementation feedback, data collection, reliability assessment, etc.

[0050] When defining event relationships for power business scenarios, the event relationships in this embodiment are used to express the connections and dependencies between different concepts. In the process of constructing the event graph, the {event, relationship, event} triple can summarize the essential connection between interrelated events.

[0051] In the embodiment of the present application, 10 types of event relationship types are defined, including with cause, with solution, with case, sequential, concurrent, conditional, etc.

[0052] In the embodiment of the present application, there are 19 entity types for the power business scenario, including substations, lines, archives, equipment, indicators, units, users, audit platforms, audit personnel, audit business, audit materials, audit content, audit information, management personnel, fault information, plan applications, maintenance records, maintenance personnel, power outage records, evaluation indicators, business systems, etc.

[0053] In the embodiment of the present application, there are 24 types of entity relationships for the power business scenario, including measurement, ownership, supervision, assistance, audit, influence, reception, inclusion, issuance, execution, management, service, formulation, triggering, recording, review, statistics, etc.

[0054] (3) Constructing a concept map

[0055] This embodiment combines the knowledge units and knowledge representation model defined above to construct a concept map to facilitate the subsequent organization and application of knowledge.

[0056] For example, refer to Figure 4 ,The concept map is constructed by taking the line loss business scenario as an example, in which the event type triples include {line loss, with reasons, collection anomalies}, {line loss, with reasons, archive anomalies}, {line loss, with reasons, statistics anomalies}, {line loss, with reasons, measurement anomalies}, {line loss, with reasons, electricity theft anomalies}, {line loss, with reasons, technical anomalies}, {collection anomalies, with solutions, solutions}, {statistical anomalies, with solutions, solutions}, {measurement anomalies, with cases, cases}, {archive anomalies, with cases, cases}, etc. The entity triples include {equipment, measurement, indicators}, {archive, including, indicators}, etc.

[0057] The knowledge representation models, knowledge units and concept maps defined above for different business scenarios in the power sector are imported into Neo4j to complete the storage of knowledge and realize the construction of a domain knowledge base, that is, to obtain a domain knowledge base.

[0058] The embodiment of the present application can more accurately capture various types of knowledge and information in the power field by constructing fact-based and process-based knowledge representation models suitable for knowledge reasoning. The division of the underlying structure, intermediate structure and upper structure makes the knowledge representation more hierarchical, which is conducive to the organization and storage of knowledge.

[0059] Furthermore, fact-based and process-based knowledge representation models provide a solid foundation for knowledge reasoning, enabling the multi-agent system to effectively reason and judge in complex power question-answering scenarios. Furthermore, by defining knowledge units such as entities, entity relationships, and event relationships, the content of knowledge representation is further enriched, improving the accuracy and efficiency of reasoning.

[0060] This embodiment of the application also constructs a knowledge base based on the characteristics of the power sector and the requirements of different business scenarios, making the knowledge base more adaptable to various practical application scenarios. Furthermore, by constructing a concept map, knowledge in the power sector is presented in an intuitive and clear manner, which facilitates the understanding and application of knowledge by the multi-agent system.

[0061] The embodiments of the present application can also use the domain knowledge base to conduct complex questions and answers and make decisions, thereby improving the operating efficiency and safety of the power system.

[0062] Furthermore, the knowledge representation model and knowledge units constructed in the embodiments of this application are highly flexible and scalable, facilitating updates and maintenance as the power sector evolves and new knowledge emerges. Furthermore, by continuously improving the domain knowledge base, it is possible to ensure that the multi-agent system always has the latest knowledge and information to cope with various complex situations.

[0063] In one possible implementation, building a large-model multi-agent collaborative reasoning framework may include:

[0064] According to the responsibilities and functions of power tasks, business processing agents, domain knowledge agents, and action planning agents are constructed respectively. The responsibilities and functions include action planning, domain knowledge acquisition, and business reasoning. The business processing agent includes planning acquisition tools, indicator analysis tools, data query tools, and domain knowledge query tools. The domain knowledge agent includes graph description acquisition tools, neighbor node acquisition tools, and start node acquisition tools. The action planning agent includes interaction tools.

[0065] The business processing agent, domain knowledge agent and action planning agent are connected in pairs to build a large-model multi-agent collaborative reasoning framework.

[0066] Optionally, based on the responsibilities of complex tasks in power applications, including action planning, domain knowledge acquisition, and business reasoning, a preliminary decomposition is performed into three parts: action planning, domain knowledge acquisition, and business reasoning. Each part is then decomposed into simple subtasks. A business processing agent is constructed that combines a business database with business reasoning, a domain knowledge agent that interacts with a knowledge graph to obtain knowledge support, and an action planning agent that combines external action knowledge to provide action planning recommendations.

[0067] Then, the business processing agent, domain knowledge agent and action planning agent are connected in pairs to build a large-model multi-agent collaborative reasoning framework. Figure 5 , the business processing agent, domain knowledge agent and action planning agent in the large-model multi-agent collaborative reasoning framework interact to process the input complex power tasks.

[0068] First, for the business processing intelligent body, the business logic and processing procedures of complex power tasks for various business scenarios are summarized and abstracted into corresponding tools for the big model to call, so as to perform relevant business processing; reasonable tools are constructed to realize the processing of tasks related to business data, so that the big model can obtain the corresponding lack of business data.

[0069] In order to assist the business processing agent to effectively perform tasks, four tools were constructed, namely: planning acquisition tool (GetThaught): obtain the action plan for the business to which the current problem belongs to guide the business processing process; indicator analysis tool (GetIndexs): obtain the indicator name required to process the problem; data query tool (GetData): obtain data in the database based on the existing indicator name or information in the problem; domain knowledge query tool (GetCriterion): obtain domain knowledge related to complex problems and corresponding business judgment criteria.

[0070] For different types of tasks, the business processing intelligence will select different tools and the corresponding calling sequence according to the task requirements. <T1,T2,…,T n >. Specifically, where T i represents the tool call sequence, and T i = <t1,m1,t2,m2,…,t n ,m n >, where t i Represents the specific tool called, m i The result of calling the tool. The business processing agent will provide the planning suggestions for the task to be processed based on the action planning agent, and call the tool t i The intermediate result m i , to determine whether the task can be solved under the current information conditions; if it cannot be solved, the business processing intelligent body will continue to call the next tool t i+1 To obtain the missing information and complete the task.

[0071] The role of the action planning agent is to provide action planning for the agents in the framework in combination with the action knowledge base. First, it is necessary to build a tool to interact with the action knowledge base. Then, using prompt technology and the function calling capability of the large model, the large model can use the corresponding tools to interact with the action knowledge base to obtain action knowledge. Finally, the action plan for the input task is generated by combining the acquired action knowledge.

[0072] Specifically, each node in the action knowledge base represents a sub-action in task execution, while edges represent the transition relationships between sub-actions. Through knowledge graph interaction tools, LLM can effectively search and reason within the action knowledge base, retrieving action planning chains relevant to the current task, thus avoiding planning illusions caused by a lack of domain knowledge.

[0073] Then, for the domain knowledge agent, this embodiment constructs reasonable tools for interacting with the knowledge graph, including: graph description acquisition tool (GetGraph): obtains the knowledge graph description under a specific business scenario; neighbor node acquisition tool (GetNeighbours): obtains the neighbor node information of a node based on the node ID provided; starting node acquisition tool (GetNode): obtains the starting node information of the query domain knowledge.

[0074] After building the interactive tool, this embodiment uses appropriate prompts to enable the large model to dynamically interact with the knowledge graph to acquire domain knowledge based on the task being processed. The domain knowledge agent then provides domain knowledge to other agents, enhancing reasoning accuracy. By collaborating with the LLM and external tools, the constructed domain-specific knowledge base can be utilized to compensate for the LLM's shortcomings in domain-specific knowledge, thereby improving its performance in multi-step reasoning tasks.

[0075] The structured nature of knowledge in the domain knowledge base helps improve the interpretability of LLM in the decision-making and prediction process, and assists it in reasoning and decision-making in complex tasks in specific fields. <v1,v2,…,v n > and edge <e1,e2,…,e n >, integrating domain knowledge from different sources to form a unified knowledge representation, represented by (v,e).

[0076] Furthermore, for the action planning agent, this embodiment converts the task processing process in all business scenarios in the power field into action planning knowledge, and integrates the action planning knowledge into an action knowledge base in the form of a knowledge graph. The construction process of the action knowledge base is as follows:

[0077] Based on domain experts' understanding of the business logic and processing flow of power tasks, tasks in different power sector business scenarios are converted into action planning knowledge consisting of a set of discrete actions and their corresponding logical rules. Subsequently, tasks across all business scenarios are unified and integrated into a knowledge graph to construct an action knowledge base. For example, a business analysis task can be converted into sub-actions, which also serve as nodes in the action knowledge graph: obtaining line loss-related indicators, obtaining business data, obtaining domain knowledge, and performing line loss analysis. The relationships between these sub-actions are sequential.

[0078] Definition of Planning Knowledge:

[0079] A={a1,a2,…,a N}

[0080] Among them, A is the action set and a is the discrete sub-action required to complete the task.

[0081] R={r1,r2,…,r N}

[0082] Among them, R is the set of action logic rules, and r is the logical relationship and sequence rules for conversion between sub-actions.

[0083] Action planning knowledge: It can be expressed as (A, R), which consists of a set of sub-actions A to complete the task and their corresponding logical transformation rules R.

[0084] Action Knowledge Graph: The action planning knowledge for different tasks collectively constitutes the action knowledge graph, which contains the required action sets and logical rules. Although the action planning knowledge for different tasks may differ, some sub-actions may be shared across tasks. To this end, a knowledge graph is used as a representation of action knowledge, leveraging its structured nature to provide support for LLM in action planning, enhancing planning accuracy and consistency.

[0085] Build reasonable tools to interact with the action knowledge base so that the action planning agent can obtain the action planning knowledge of the corresponding task and better provide action planning for other agents in the framework.

[0086] The role of the action planning agent is to provide action planning for the agents in the framework in combination with the action knowledge graph. First, it is necessary to build a tool that interacts with the action knowledge graph. Then, using Prompt technology and the function calling capability of the large model, the large model can use the corresponding tools to interact with the action knowledge graph to obtain action knowledge. Finally, the action planning for the input task is generated by combining the acquired action knowledge.

[0087] In step 202, a business processing agent is used to obtain a natural language question of a target power complex task input by a user.

[0088] In the embodiment of the present application, the business processing agent converts complex business logic into tools that can be called by LLM, and uses the function call capability of LLM to interact with external tools, thereby implementing business logic that LLM cannot directly process, such as Figure 4 As shown in Figure 2, the user inputs a natural language question about a complex power task, which is then captured by the business processing agent.

[0089] The business processing agent first receives a question input from the user and interacts with the action planning agent using the GetThaught tool to obtain external action planning knowledge related to the question, thereby mitigating planning errors caused by the LLM's lack of domain knowledge. Subsequently, after receiving action planning guidance, the business processing agent interacts with the domain knowledge agent using the GetCriterion tool to obtain subtask processing logic or relevant domain knowledge for complex tasks. For tasks involving data analysis, the business processing agent can interact with external databases using the GetIndexs and GetData tools to obtain the required data and perform further analysis and reasoning.

[0090] In the embodiment of the present application, users only need to ask complex power tasks in natural language, and the system can automatically analyze and provide professional and accurate analysis results. This interactive method greatly reduces the user's usage threshold and improves the user experience.

[0091] In step 203, the business processing agent interacts with the action planning agent to obtain action planning knowledge for natural language questions.

[0092] In an embodiment of the present application, the business processing agent interacts with the action planning agent to obtain the action planning knowledge corresponding to the target power complex task, which can alleviate the planning error caused by the lack of domain knowledge of LLM.

[0093] In one possible implementation, the business processing agent interacts with the action planning agent to obtain action planning knowledge for natural language questions, which may include:

[0094] Use the interactive tools in the action planning agent to interact with the action knowledge base to obtain the action planning knowledge corresponding to the natural language question;

[0095] The action planning agent is used to feed back the action planning knowledge to the business processing agent.

[0096] Optionally, the interactive tools in the action planning agent are used to interact with the action knowledge base, and the prompt technology and the function calling capability of the large model are used to enable the large model to interact with the action knowledge graph with the help of corresponding tools to obtain the action planning knowledge corresponding to the target power complex task, and then use the action planning agent to feed back the obtained action planning knowledge to the business processing agent.

[0097] After acquiring action planning knowledge, the action planning agent can generate an action plan for the target power complex task. The business processing agent's planning acquisition tool can then interact with the action planning agent to acquire the corresponding action planning knowledge and action plan.

[0098] For example, refer to Figure 5 The action planning agent accepts task input from other agents, such as "Please analyze the line loss situation in Beitai District, Handan City on January 13, 2024". First, it preliminarily determines that the task belongs to line loss analysis, and then uses the GetAction tool that interacts with the action knowledge graph to obtain the relevant action planning chain ["Get the relevant indicators of the corresponding business", "Get the business data of the corresponding indicators", "Get the judgment criteria of the corresponding business", "Line loss analysis result requirements"], and finally converts it into unstructured text information "For this problem, my action plan is: first get the relevant indicators of the corresponding business, then get the business data of the corresponding indicators, then get the judgment criteria of the corresponding business, and finally analyze the line loss situation and get the results" and returns it to the business processing agent to provide planning suggestions for subsequent task processing.

[0099] In step 204, the business processing agent interacts with the domain knowledge agent to obtain the domain knowledge of the target power complex task from the domain knowledge base.

[0100] In an embodiment of the present application, the business processing agent interacts with the domain knowledge agent to obtain domain knowledge of the target power complex task from the domain knowledge base.

[0101] In one possible implementation, the business processing agent interacts with the domain knowledge agent to obtain domain knowledge of the target power complex task from the domain knowledge base, which may include:

[0102] Use the graph description acquisition tool in the domain knowledge agent to obtain the knowledge graph description of the target power complex task;

[0103] Based on the natural language question and knowledge graph description of the target power complex task, the starting node acquisition tool in the domain knowledge agent is used to obtain the starting node information of the natural language question in the knowledge graph. The starting node information includes the node ID and node type.

[0104] Utilizing the neighbor node acquisition tool in the domain knowledge agent, neighbor nodes are acquired layer by layer from the starting node information, and the node information and relationships of each neighbor node are converted into unstructured domain knowledge and fed back to the business processing agent.

[0105] Among them, the knowledge acquisition process of the domain knowledge agent includes three main steps: obtaining the domain knowledge graph description, locating the starting node, and obtaining neighbor nodes.

[0106] First, the LLM determines which business scenario in the power sector the queried domain knowledge pertains to and retrieves the knowledge graph description of the corresponding business. Subsequently, the LLM combines the user question and the knowledge graph description to retrieve the starting node information for the query content in the knowledge graph. Next, the LLM retrieves neighboring nodes layer by layer from the starting node until it finds the required domain knowledge. Finally, the domain knowledge agent converts the retrieved node information and its relationships into unstructured domain knowledge and returns it, providing effective domain knowledge support for the LLM.

[0107] The knowledge graph includes knowledge units, which include events, event relations, entities, and entity relations. The starting node information may include node ID and node type.

[0108] Optionally, the business processing agent interacts with the domain knowledge agent using a domain query tool and utilizes the graph description acquisition tool within the domain knowledge agent to obtain a knowledge graph description of the target complex power task. Then, after obtaining the knowledge graph description, the domain knowledge agent utilizes the starting node acquisition tool to obtain the starting node information of the natural language question within the knowledge graph. Finally, the domain knowledge agent utilizes the neighbor node acquisition tool to retrieve neighbor nodes layer by layer from the starting node information. The node information and relationships of each neighbor node are converted into unstructured domain knowledge, which is then fed back to the business processing agent.

[0109] For example, refer to Figure 5 The domain knowledge agent provides task-related domain knowledge. For example, for the task "Please analyze the line loss situation in Beitai District, Handan City, on January 13, 2024," it first determines that it belongs to the line loss business scenario. Then, it uses the graph description acquisition tool to obtain the corresponding knowledge graph description of the line loss, including node types and relationship types. Based on the acquired indicator data and other information, it then obtains the description of the starting node related to the task. The starting node acquisition tool then uses the starting node ID and other information in the knowledge graph. Then, based on the node ID, the neighbor node acquisition tool is used repeatedly to obtain adjacent nodes. Finally, the acquired structured knowledge is converted into unstructured domain knowledge and fed back to the business processing agent.

[0110] In step 205, the action planning knowledge and domain knowledge are combined in the business processing agent to generate analysis results of the target power complex task.

[0111] In an embodiment of the present application, the action planning knowledge obtained in step 203 and the domain knowledge obtained in step 204 are combined in the business processing agent to generate an analysis result of the target power complex task, and the analysis result is returned to the user.

[0112] For example, refer to Figure 5Taking the question "Please analyze the line loss situation in Beitai District, Handan City, on January 13, 2024" as an example, the business processing agent accepts user input and interacts with the action planning agent using a plan acquisition tool to obtain an action plan for the corresponding line loss analysis task. The business processing agent executes the task according to the action plan, obtains relevant indicator data, and preliminarily determines that the line loss situation is "sudden high loss." Next, the domain knowledge agent provides domain knowledge related to "sudden high loss." Finally, the business processing agent combines the business indicator data with the domain knowledge to generate the analysis result: "Based on the power supply of 1205 and the line loss rate of 0.125, it can be determined that the line loss type in this substation is sudden high loss. Related indicators and data: ... Possible causes: ... Solution: ..."

[0113] The present application provides a method for complex power question answering based on large-model multi-agents, which constructs a domain knowledge base and a large-model multi-agent collaborative reasoning framework. The large-model multi-agent collaborative reasoning framework includes a business processing agent, a domain knowledge agent and an action planning agent; the business processing agent is used to obtain the natural language question of the target complex power task input by the user; the business processing agent is used to interact with the action planning agent to obtain the action planning knowledge of the natural language question; the business processing agent is used to interact with the domain knowledge agent to obtain the domain knowledge of the target complex power task from the domain knowledge base; the action planning knowledge and domain knowledge are combined in the business processing agent to generate the analysis results of the target complex power task. This application decomposes complex power tasks into action planning, domain knowledge acquisition and business processing, and demonstrates good generalization ability and versatility when processing complex question-answering tasks involving power data and power domain knowledge; in addition, this application combines knowledge graphs with large models, specifically introduces domain knowledge bases, and constructs corresponding interactive tools, so that the large model can interact with the domain knowledge base to dynamically acquire domain knowledge, thereby improving the flexibility of the entire framework in acquiring knowledge and the accuracy of reasoning, making up for the lack of professional power domain knowledge in the large model, and improving the performance of the large model in complex power question-answering tasks; at the same time, this application can also alleviate the planning illusion problem of large model intelligent agents, and improve the planning accuracy of the multi-agent framework when processing complex power tasks.

[0114] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0115] The following are device embodiments of the present application. For details not fully described therein, please refer to the corresponding method embodiments described above.

[0116] Figure 6The following is a schematic diagram of the structure of a large-model multi-agent complex power question-answering device provided in an embodiment of the present application. For ease of explanation, only the parts related to the embodiment of the present application are shown, which are detailed as follows:

[0117] like Figure 6 As shown, the large-model multi-agent-based complex power question-answering device 6 includes:

[0118] Construction module 61 is used to build a domain knowledge base and a large-model multi-agent collaborative reasoning framework, which includes a business processing agent, a domain knowledge agent, and an action planning agent;

[0119] A question acquisition module 62 is used to use a business processing agent to acquire a natural language question of a target power complex task input by a user;

[0120] An action planning acquisition module 63 is used to acquire action planning knowledge for natural language questions by using the business processing agent to interact with the action planning agent;

[0121] The domain knowledge acquisition module 64 is used to acquire domain knowledge of the target power complex task from the domain knowledge base by using the business processing agent to interact with the domain knowledge agent;

[0122] The result analysis module 65 is used to combine the action planning knowledge and domain knowledge in the business processing intelligent agent to generate the analysis results of the target power complex task.

[0123] The present application provides a complex power question-answering device based on a large model multi-agent. By constructing a domain knowledge base and a large model multi-agent collaborative reasoning framework, the large model multi-agent collaborative reasoning framework includes a business processing agent, a domain knowledge agent and an action planning agent; the business processing agent is used to obtain the natural language question of the target complex power task input by the user; the business processing agent is used to interact with the action planning agent to obtain the action planning knowledge of the natural language question; the business processing agent is used to interact with the domain knowledge agent to obtain the domain knowledge of the target complex power task from the domain knowledge base; the action planning knowledge and domain knowledge are combined in the business processing agent to generate the analysis results of the target complex power task. This application decomposes complex power tasks into action planning, domain knowledge acquisition and business processing, and demonstrates good generalization ability and versatility when processing complex question-answering tasks involving power data and power domain knowledge; in addition, this application combines knowledge graphs with large models, specifically introduces domain knowledge bases, and constructs corresponding interactive tools, so that the large model can interact with the domain knowledge base to dynamically acquire domain knowledge, thereby improving the flexibility of the entire framework in acquiring knowledge and the accuracy of reasoning, making up for the lack of professional power domain knowledge in the large model, and improving the performance of the large model in complex power question-answering tasks; at the same time, this application can also alleviate the planning illusion problem of large model intelligent agents, and improve the planning accuracy of the multi-agent framework when processing complex power tasks.

[0124] In one possible implementation, the building blocks can be used to:

[0125] Based on the needs of different business scenarios in the power sector, a fact-based and process-based knowledge representation model suitable for knowledge reasoning is constructed. The knowledge representation model includes an underlying structure, an intermediate structure, and an upper structure. The underlying structure includes entities and entity relationships, the intermediate structure includes event elements, and the upper structure includes events and event relationships.

[0126] Define corresponding knowledge units based on the characteristics of the power sector and different business scenarios in the power sector. Knowledge units include events, event relationships, entities, and entity relationships.

[0127] Construct a concept map based on the knowledge representation models and knowledge units in different business scenarios in the power sector;

[0128] A domain knowledge base is constructed using knowledge representation models, knowledge units and concept maps in different business scenarios in the power field.

[0129] In one possible implementation, the building blocks may also be used to:

[0130] According to the responsibilities and functions of power tasks, business processing agents, domain knowledge agents, and action planning agents are constructed respectively. The responsibilities and functions include action planning, domain knowledge acquisition, and business reasoning. The business processing agent includes planning acquisition tools, indicator analysis tools, data query tools, and domain knowledge query tools. The domain knowledge agent includes graph description acquisition tools, neighbor node acquisition tools, and start node acquisition tools. The action planning agent includes interaction tools.

[0131] The business processing agent, domain knowledge agent and action planning agent are connected in pairs to build a large-model multi-agent collaborative reasoning framework.

[0132] In one possible implementation, the building blocks may also be used to:

[0133] Transform power tasks in different business scenarios in the power sector into action planning knowledge consisting of a set of discrete sub-actions and their corresponding logical rules;

[0134] Integrate the action planning knowledge corresponding to all business scenarios in the power field into an action knowledge base.

[0135] In one possible implementation, the action plan acquisition module may be used to:

[0136] Use the interactive tools in the action planning agent to interact with the action knowledge base to obtain the action planning knowledge corresponding to the natural language question;

[0137] The action planning agent is used to feed back the action planning knowledge to the business processing agent.

[0138] In a possible implementation, the action plan acquisition module may also be used to:

[0139] Generate action plans for target power complex tasks based on action planning knowledge;

[0140] Accordingly, the action planning acquisition module is used to:

[0141] The action planning agent is used to feed back the action tasks of the target power complex task to the business processing agent.

[0142] In a possible implementation, the action plan acquisition module may also be used to:

[0143] Utilize the planning acquisition tool in the business processing agent to obtain the action planning knowledge fed back by the action planning agent.

[0144] In one possible implementation, the domain knowledge acquisition module can be used to:

[0145] Use the graph description acquisition tool in the domain knowledge agent to obtain the knowledge graph description of the target power complex task;

[0146] Based on the natural language question and knowledge graph description of the target power complex task, the starting node acquisition tool in the domain knowledge agent is used to obtain the starting node information of the natural language question in the knowledge graph. The starting node information includes the node ID and node type.

[0147] Utilizing the neighbor node acquisition tool in the domain knowledge agent, neighbor nodes are acquired layer by layer from the starting node information, and the node information and relationships of each neighbor node are converted into unstructured domain knowledge and fed back to the business processing agent.

[0148] In one possible implementation, the domain knowledge acquisition module can also be used to:

[0149] Use the domain knowledge query tool in the business processing agent to obtain the domain knowledge fed back by the domain knowledge agent

[0150] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.

[0151] Those skilled in the art will appreciate that the templates, units, and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.

[0152] If the module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, it can implement the steps of the above-mentioned embodiments of the complex power question-answering method based on a large model and multiple agents. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device that can carry the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory, random access memory, electric carrier signal, telecommunication signal and software distribution medium, etc.

[0153] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention, and should all be included in the scope of protection of the present invention.

Claims

1. A complex power question-answering method based on a large model and multiple agents, characterized by: include: Build a domain knowledge base and a large-model multi-agent collaborative reasoning framework, which includes a business processing agent, a domain knowledge agent, and an action planning agent; Using business processing agents to obtain natural language problems of complex power tasks input by users; Utilizing the business processing agent to interact with the action planning agent to obtain action planning knowledge for the natural language problem; Utilizing the business processing agent to interact with the domain knowledge agent to acquire domain knowledge of the target power complex task from the domain knowledge base; The action planning knowledge and the domain knowledge are combined in the business processing agent to generate an analysis result of the target power complex task.

2. The large-model multi-agent-based complex power question-answering method according to claim 1 is characterized in that: The construction of the domain knowledge base includes: Based on the needs of different business scenarios in the power sector, a fact-based and process-based knowledge representation model suitable for knowledge reasoning is constructed. The knowledge representation model includes a bottom layer structure, a middle layer structure, and a top layer structure. The bottom layer structure includes entities and entity relationships, the middle layer structure includes event elements, and the top layer structure includes events and event relationships. Define corresponding knowledge units based on the characteristics of the power sector and different business scenarios in the power sector. The knowledge units include events, event relationships, entities, and entity relationships. Construct a concept map based on the knowledge representation models and knowledge units in different business scenarios in the power sector; The domain knowledge base is constructed using knowledge representation models, knowledge units and concept maps in different business scenarios in the power field.

3. The large-model multi-agent-based complex power question-answering method according to claim 1 is characterized in that: The construction of a large-model multi-agent collaborative reasoning framework includes: According to the responsibilities and functions of the power task, a business processing agent, a domain knowledge agent, and an action planning agent are constructed respectively. The responsibilities and functions include action planning function, domain knowledge acquisition function, and business reasoning function. The business processing agent includes a planning acquisition tool, an indicator analysis tool, a data query tool, and a domain knowledge query tool. The domain knowledge agent includes a graph description acquisition tool, a neighbor node acquisition tool, and a start node acquisition tool. The action planning agent includes an interaction tool. The business processing agent, the domain knowledge agent and the action planning agent are connected in pairs to communicate with each other to construct the large-model multi-agent collaborative reasoning framework.

4. The large-model multi-agent-based complex power question-answering method according to claim 3 is characterized in that: Before constructing the action planning agent, the method further includes: Transform power tasks in different business scenarios in the power sector into action planning knowledge consisting of a set of discrete sub-actions and their corresponding logical rules; Integrate the action planning knowledge corresponding to all business scenarios in the power field into an action knowledge base.

5. The large-model multi-agent-based complex power question-answering method according to claim 4 is characterized in that: The utilizing the business processing agent to interact with the action planning agent to obtain action planning knowledge for the natural language question includes: Utilizing the interactive tool in the action planning agent to interact with the action knowledge base to obtain action planning knowledge corresponding to the natural language question; The action planning agent is used to feed back the action planning knowledge to the business processing agent.

6. The large-model multi-agent-based complex power question-answering method according to claim 5 is characterized in that: After obtaining the action planning knowledge corresponding to the natural language question, the method further includes: generating an action plan for the target power complex task based on the action planning knowledge; Accordingly, the step of utilizing the action planning agent to feed back the action planning knowledge to the business processing agent includes: The action planning agent is used to feed back the action task of the target power complex task to the business processing agent.

7. The large-model multi-agent-based complex power question-answering method according to claim 5 is characterized in that: The step of utilizing the action planning agent to feed back the action planning knowledge to the business processing agent includes: The action planning knowledge fed back by the action planning agent is acquired by utilizing the planning acquisition tool in the business processing agent.

8. The large-model multi-agent-based complex power question-answering method according to claim 3 is characterized in that: The utilizing the business processing agent to interact with the domain knowledge agent to acquire the domain knowledge of the target power complex task from the domain knowledge base includes: Utilizing the graph description acquisition tool in the domain knowledge agent to acquire the knowledge graph description of the target power complex task; Based on the natural language question of the target power complex task and the knowledge graph description, using the starting node acquisition tool in the domain knowledge agent to obtain the starting node information of the natural language question in the knowledge graph, the starting node information including the node ID and the node type; The neighbor node acquisition tool in the domain knowledge agent is used to acquire neighbor nodes layer by layer from the starting node information, and the node information and relationship of each neighbor node are converted into unstructured domain knowledge and fed back to the business processing agent.

9. The large-model multi-agent-based complex power question-answering method according to claim 8 is characterized in that: The step of converting the node information of each neighbor node and the relationship thereof into unstructured domain knowledge and feeding it back to the business processing agent includes: The domain knowledge query tool in the business processing agent is used to obtain the domain knowledge fed back by the domain knowledge agent.

10. A complex power question-answering device based on a large model and multiple agents, characterized by: include: A construction module is used to build a domain knowledge base and a large-model multi-agent collaborative reasoning framework, which includes a business processing agent, a domain knowledge agent, and an action planning agent; The question acquisition module is used to use the business processing agent to obtain the natural language question of the target power complex task input by the user; An action planning acquisition module, configured to utilize the business processing agent to interact with the action planning agent to acquire action planning knowledge for the natural language question; A domain knowledge acquisition module, configured to utilize the business processing agent to interact with the domain knowledge agent to acquire the domain knowledge of the target power complex task from the domain knowledge base; A result analysis module is used to combine the action planning knowledge and the domain knowledge in the business processing intelligent body to generate an analysis result of the target power complex task.

Citation Information

Cited By

  • Task decomposition method and terminal

    CN121525886A