An intelligent agent system for power system simulation analysis and a simulation analysis method

By constructing an intelligent agent system for power system simulation analysis and utilizing large model technology to parse user instructions and decompose tasks, a leapfrog development in intelligent power system simulation analysis has been achieved. This has solved the problems of complex human-computer interaction and limitations in AI applications in existing software, and improved work efficiency and information feedback capabilities.

CN121543460BActive Publication Date: 2026-04-10CHINA ELECTRIC POWER RESEARCH INSTITUTE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-01-20
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing power system simulation and analysis software has complex human-computer interaction, and AI applications are limited to assisting individual links, making it difficult to achieve full-process intelligence. Furthermore, the interfaces between various systems are complex and difficult to use in a unified manner.

Method used

A power system simulation analysis intelligent agent system is constructed, including an interface layer, workflow layer, skill layer, tool/knowledge layer, and business system layer. The main intelligent agent parses user instructions, decomposes tasks, and coordinates the execution of sub-intelligent agents. Combined with large model technology, it realizes the automated and intelligent processing of complex tasks.

Benefits of technology

It has achieved a leapfrog development in intelligent power system simulation analysis, improved work efficiency, simplified human-computer interaction, supported various forms of information feedback, and broken the limitations of existing tools and scenario-based tools.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121543460B_ABST
    Figure CN121543460B_ABST
Patent Text Reader

Abstract

The application discloses an electric power system simulation analysis intelligent agent system and a simulation analysis method. The method comprises the following steps: the electric power system simulation analysis intelligent agent system comprises an interface layer, a work flow layer, a skill layer, a tool / knowledge layer and a business system layer. The interface layer is used for receiving user instructions and feeding back task results in multiple modes. The work flow layer comprises a main intelligent agent, which is used for analyzing the user instructions, generating and driving a work flow for executing simulation analysis according to a task knowledge base. The skill layer comprises a plurality of sub-intelligent agents, which are used for encapsulating and executing specific sub-tasks in the work flow. The tool / knowledge layer is used for providing a standardized calling interface of external tools and storing data and knowledge required for task execution. The business system layer comprises one or more existing electric power system simulation business systems, which are used for providing basic data, calculation services and interactive components for the tool / knowledge layer.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of simulation analysis, and more particularly, to a power system simulation analysis intelligent agent system and a simulation analysis method. BACKGROUND

[0002] Power system simulation analysis is a key supporting technology for the operation of large power grids, and grid dispatching, planning, security defense, etc. all rely on simulation calculation conclusions. For a long time, power grid dispatching at all levels has formed a basic working mode of combining fixed-period centralized calculation and temporary emergency calculation, which has ensured the safe and stable operation of China's power grid. With the construction of new-type power systems, power grid operation modes are becoming more diverse, and operation characteristics are becoming more complex, which puts forward higher requirements for power grid simulation analysis work.

[0003] From the perspective of intelligence, automation level, and human-computer interaction form, power system simulation analysis technology can be divided into three development stages. The first stage is the calculation tool stage, represented by PSASP and BPA. The simulation software is built around the core calculation program, mainly providing calculation program data preparation and result output functions, and the user organizes the workflow by himself. The advantage of this mode is that the software function is rich, and very detailed operations can be performed, which is suitable for expert users; the disadvantage is that the use threshold is high, and the user needs to understand the underlying logic of simulation calculation, and in addition to the calculation process, each link has less consideration for automation and intelligence capabilities.

[0004] The second stage is the scenario tool stage, represented by various types of power grid simulation analysis advanced application systems. It is built for work scenarios and work processes, and the function modules are no longer divided by calculation type, but by work content and process. Users can complete a certain work in a module without switching between several calculation modules. The advantage of this mode is that it reduces the software use threshold and improves work efficiency; the disadvantage is that for work involving multiple scenarios, different modules still need to be switched, and the use mode has not broken through the traditional analysis and interaction mode.

[0005] The third stage is the current booming intelligent stage. Since the new generation of artificial intelligence is proposed in 2017, after in-depth research, in the aspects of power flow adjustment, operation mode generation, transient stability characteristic analysis, stability control strategy generation, and section transmission capacity calculation closely related to power grid simulation analysis, the artificial intelligence method research has made more progress, and is gradually applied to practical work. The current main mode is combined with simulation calculation tools or scenario simulation applications to realize intelligent technology application in some human participation links, for example, when the power flow calculation does not converge, the intelligent adjustment convergence algorithm is called to give an adjustment scheme. Although these works effectively improve the efficiency and effect of power grid simulation analysis, but it does not fundamentally change the working mode of power grid simulation analysis, and the use of artificial intelligence of simulation analysis system can only play the role of an assistant like "assistant". How to realize the automatic construction of the power system simulation analysis intelligent agent becomes a technical problem to be solved. SUMMARY

[0006] In view of the deficiencies of the prior art, the present application provides a power system simulation analysis intelligent agent system and a simulation analysis method.

[0007] According to one aspect of the present application, a power system simulation analysis intelligent agent system is provided, comprising:

[0008] An interface layer is used to receive user instructions and feedback task results in multiple modalities;

[0009] A workflow layer includes a main intelligent agent, which is used to analyze user instructions, generate and drive a workflow for executing simulation analysis according to a task knowledge base, wherein the workflow is composed of a plurality of task execution strategies for sequential execution, branch execution, loop execution and exception handling;

[0010] A skill layer includes a plurality of sub-intelligent agents, which are used to encapsulate and execute specific sub-tasks in the workflow;

[0011] A tool / knowledge layer is used to provide a standardized calling interface for external tools and store data and knowledge required for task execution;

[0012] A business system layer includes one or more existing power system simulation business systems, which are used to provide basic data, calculation services and interactive components for the tool / knowledge layer;

[0013] The main intelligent agent analyzes the user instructions into tasks and decomposes the tasks into a plurality of sub-tasks to be executed by the corresponding sub-intelligent agents; the sub-intelligent agents complete the tasks in a cooperative manner by calling the tool interface in the tool / knowledge layer and utilizing the data and knowledge.

[0014] Optionally, the task knowledge base in the workflow layer stores simulation analysis workflow templates in the form of rules, and the main intelligent agent generates specific simulation analysis workflows by combining the parameters in the user instructions with the workflow templates.

[0015] The strategy for loop execution is to record the return results of sub-agent objects in a list. Each sub-agent object has an independent, local variable-like result list. The main agent defines a default operation on the list that processes each item one by one. The main agent executes each item in the list according to the list returned by the sub-agent objects, forming a loop. If the sub-agent objects in subsequent steps also return a list, the main agent forms a nested loop for task execution.

[0016] The anomaly handling strategy involves the agent establishing process knowledge for handling different types of anomalies. For errors in different situations, a dedicated anomaly handling subtask is established. The input and output of the erroneous tool and the tool invocation intent of the sub-agent are used as input data for the anomaly handling subtask. The data is modified, or the tool invocation object and parameters of the sub-agent are changed. After processing, the anomaly handling subtask returns to the state before the tool invocation, triggering the sub-agent to invoke the tool again. The anomaly handling includes power flow calculation failure, quasi-stability calculation failure, and AI model invocation failure.

[0017] Optionally, the workflow template uses vectorized encoding, with sine / cosine positional encoding added to the word vectors:

[0018]

[0019] set up, The position of the word in the sequence, The dimension of the word vector. i For dimension indexing;

[0020] Introducing a multi-head attention mechanism into the workflow generation process using workflow templates:

[0021]

[0022] in:

[0023]

[0024]

[0025] In the formula, , , These are matrices representing queries, keys, and values; Let be the dimension of the key vector. head i For the first i One point of attention,h is the number of attention heads; W 0 is the output projection matrix; W i V is the value transformation matrix of the i th head; W i K is the key transformation matrix of the i th head; W i Q is the query transformation matrix of the i th head;

[0026] After each attention sublayer, there is a two-layer fully connected feedforward network:

[0027]

[0028] wherein, x is the input, the output from the attention layer; W 1 is the first layer weight matrix; b 1 is the first layer bias; W 2 is the second layer weight matrix; b 2 is the second layer bias.

[0029] Optionally, the sub-agents in the skill layer include business class sub-agents, auxiliary class sub-agents and knowledge class sub-agents;

[0030] The business class sub-agent is used to execute the long-line sub-tasks of power grid simulation analysis in the workflow;

[0031] The auxiliary class sub-agent is used to execute the short-line sub-tasks of data maintenance and query statistics in the workflow;

[0032] The knowledge class sub-agent is used to execute the sub-tasks of domain knowledge question and answer in the workflow.

[0033] Optionally, the business class sub-agent contains a power grid control skill model:

[0034]

[0035] wherein: is the control vector; is the gain coefficient vector; is the power grid target state vector; The current state vector of the power grid is obtained by querying the current state of the power grid through the business sub-agent, and the target state vector of the power grid is obtained by acquiring the power grid target state vector through the knowledge sub-agent. The gain coefficient vector is calculated or queried through the business sub-agent, and the control vector is finally calculated. The control vector is applied to the power grid data by the control execution skill to adjust the power grid data, and then the control effect is verified by the power grid simulation skill.

[0036] Optionally, the step of the power grid control skill model for multi-step control of the power grid is:

[0037] The initialization step starts from the current actual operation state of the power grid, calculates the comprehensive score of the current actual operation state of the power grid to the target requirement, and puts the current actual operation state of the power grid as an adjustment path with a length of 1 into the initial beam of the next round of control, while recording that the path has not used any action type.

[0038] The multi-round iteration expansion step performs the following sub-steps on each adjustment path in the current beam of the current round of control:

[0039] (a) Based on the current power grid topology corresponding to the adjustment path, dynamically generate the set of actionable actions;

[0040] (b) Simulate the execution of each executable action in the set of actionable actions to obtain a new state and calculate its comprehensive score, wherein the comprehensive score = target matching degree + safety margin - operation cost;

[0041] (c) Group the candidate actions corresponding to all new states according to action types, wherein in each action type group, sort the candidate actions according to the score, and apply an exponential decay penalty to the last ranking, and give an additional reward if a certain action type has never been used in the current path, to obtain the processed candidate actions;

[0042] (d) After combining all processed candidate actions, keep the top b paths with the highest comprehensive score to form the current beam input for the next round;

[0043] The output result step returns all adjustment paths in the final current beam as a complete scheme after the multi-round iteration expansion step is terminated.

[0044] Optionally, the tool / knowledge layer includes:

[0045] A knowledge base for storing working knowledge, working data and working conclusions, the working knowledge including working process knowledge stored in the form of rules and domain knowledge stored in the form of triples, and the working conclusions including analysis reports stored in the form of XML files;

[0046] Tool service, for service encapsulation of simulation computing programs, AI models and database operations based on a model context protocol (MCP), forming a standardized tool interface.

[0047] According to another aspect of the present application, a power system simulation analysis method is provided, comprising:

[0048] S1. Receiving a natural language task instruction of a user through an interface layer;

[0049] S2. Analyzing the task instruction by a master agent, matching a corresponding workflow template from a task knowledge base, and forming an executable workflow in combination with instruction parameters, wherein the workflow is composed of multiple task execution strategies in order, branch, loop and exception handling;

[0050] S3. Decomposing the workflow into multiple sub-tasks by the master agent, and scheduling corresponding sub-agents to execute;

[0051] S4. In the process of executing the sub-tasks, the sub-agents complete the tasks by calling tool interfaces in a tool / knowledge layer and utilizing associated task data objects;

[0052] S5. Returning the sub-task execution results to the master agent, integrating by the master agent, and feeding back the final task results to the user through the interface layer.

[0053] Optionally, in step S4, when calling the tool interface, if the required parameters are incomplete, the system automatically completes the default parameters through a prompt word engineering according to the context and data tags of the current task data object, or initiates confirmation to the user for key parameters.

[0054] Optionally, one or more continuous interactions of the user constitute a dialogue, and one or more tasks are contained in the dialogue; the tasks are connected through their associated task data objects, and the contents of the question and answer sub-tasks in the dialogue are stored in a dialogue history library separately.

[0055] According to still another aspect of the present application, a computer readable storage medium is provided, the storage medium storing a computer program, the computer program being used to execute the method of any one of the above aspects of the present application.

[0056] According to still another aspect of the present application, an electronic device is provided, comprising: a processor; a memory for storing executable instructions of the processor; the processor is used to read the executable instructions from the memory and execute the instructions to implement the method of any one of the above aspects of the present application.

[0057] Therefore, based on a large model, the application comprehensively uses power system simulation analysis technology, data automatic processing technology, and related artificial intelligence technology to establish a new intelligent application system for various power grid simulation analysis services, breaks through the limitations of existing simulation analysis calculation tools and scenario tools, and realizes a leap-forward development of power system simulation analysis in the intelligent direction. BRIEF DESCRIPTION OF DRAWINGS

[0058] The exemplary embodiments of the present application can be more fully understood with reference to the following drawings:

[0059] Figure 1 FIG. 1 is a structural schematic diagram of a power system simulation analysis intelligent agent system provided by an exemplary embodiment of the present application;

[0060] Figure 2 FIG. 2 is a flow schematic diagram of a power system simulation analysis method provided by an exemplary embodiment of the present application;

[0061] Figure 3 FIG. 3 is a workflow schematic diagram of a task, a subtask, and a metatask provided by an exemplary embodiment of the present application;

[0062] Figure 4 FIG. 4 is a structure of an electronic device provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0063] Hereinafter, exemplary embodiments according to the present application will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, and not all embodiments of the present application, and it should be understood that the present application is not limited to the described exemplary embodiments.

[0064] It should be noted that: the relative arrangement, numerical expression, and numerical value of the components and steps set forth in these embodiments do not limit the scope of the present application, unless otherwise specifically stated.

[0065] Those skilled in the art can understand that the terms "first", "second", and the like in the embodiments of the present application are only used to distinguish different steps, devices, or modules, and do not represent any specific technical meaning, nor do they represent the inevitable logical order between them.

[0066] It should also be understood that in the embodiments of the present application, "a plurality of" can mean two or more, and "at least one" can mean one, two, or more.

[0067] It should also be understood that for any component, data, or structure mentioned in the embodiments of the present application, unless specifically limited or given the opposite implication by the context, it can be understood as one or more in general.

[0068] In addition, the term "and / or" in the present application is only used to describe the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B can represent the three cases of A alone, A and B together, and B alone. In addition, the character " / " in the present application generally represents an "or" relationship between the front and rear associated objects.

[0069] It should also be understood that the description of the various embodiments of the present application focuses on the differences between the various embodiments, and the same or similar parts can be referred to each other, and for the sake of brevity, will not be repeated.

[0070] At the same time, it should be understood that, for the convenience of description, the size of each part shown in the drawing is not drawn according to the actual proportional relationship.

[0071] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the application or its application or use.

[0072] Techniques, methods, and devices known to those of ordinary skill in the relevant art can not be discussed in detail, but where appropriate, the techniques, methods, and devices should be considered as part of the specification.

[0073] Figure 1 is a structural schematic diagram of an intelligent agent system for power system simulation analysis provided by an exemplary embodiment of the present application. As shown in Figure 1 The power system simulation analysis intelligent agent system includes:

[0074] The interface layer is used to receive user instructions and feedback task results in multiple modalities.

[0075] The workflow layer includes a main intelligent agent, which is used to analyze user instructions, generate and drive a workflow for executing simulation analysis according to a task knowledge base, wherein the workflow is composed of multiple task execution strategies for sequential execution, branch execution, loop execution and exception handling.

[0076] The skill layer includes multiple sub-intelligent agents, which are used to encapsulate and execute specific sub-tasks in the workflow.

[0077] The tool / knowledge layer is used to provide a standardized calling interface for external tools and store data and knowledge required for task execution.

[0078] The business system layer includes one or more existing power system simulation business systems, which are used to provide basic data, computing services and interactive components for the tool / knowledge layer.

[0079] Wherein, the main intelligent agent parses the user instruction as a task, and decomposes the task into several sub-tasks and assigns them to corresponding sub-intelligent agents for execution; the sub-intelligent agent calls the tool interface in the tool / knowledge layer, and utilizes data and knowledge to complete the task in a collaborative manner.

[0080] Specifically, in recent years, large model technologies represented by ChatGPT and DeepSeek have made continuous breakthroughs, and have improved the interaction and understanding between people and artificial intelligence to a new height. Based on the generative method and massive sample training, the large model can give correct answers or generate content-rich pictures based on the input text information. DeepSeek can also give a detailed reasoning process. Based on large model technology, workflow-oriented intelligent agents can be constructed, such as Coze of ByteDance and Tencent's components. These intelligent agents can intelligently complete various complex tasks based on user input information, and are an effective way to apply artificial intelligence technology to solve practical application problems.

[0081] Based on the construction idea of large model intelligent agent, an intelligent power system analysis agent (iPSA-Agent) can be proposed. Based on large models, the technology comprehensively uses power system simulation analysis technology, data automatic processing technology, and related artificial intelligence technology to establish a new intelligent application system for various power grid simulation analysis businesses, breaks through the limitations of existing simulation analysis calculation tools and scenario-based tools, and realizes a leap-forward development of power system simulation analysis in the direction of intelligentization.

[0082] The technical problems to be solved by the present application include:

[0083] 1. The current AI application in the field of power system simulation analysis only involves replacing individual manual links, and has limited overall support for simulation analysis work;

[0084] 2. The man-machine interaction of existing power system simulation analysis software is limited to data, and the steps are complex and the content is insufficient, which hinders the improvement of work efficiency;

[0085] 3. The existing simulation analysis business system is diverse and complex to use, and it is difficult to use it through a unified portal.

[0086] Therefore, the construction idea of the present application is:

[0087] Power system simulation calculation is a highly specialized work process, and iPSA-Agent has significant differences from common intelligent agent applications for Internet resources, and its characteristics mainly include:

[0088] 1. Complex process. While the requirements for basic power grid simulation calculations such as power flow convergence and fault scanning are clear, and in some cases there are even standards and specifications to follow, the actual execution of these tasks is extremely complex, involving repeated adjustments to data, iterative calculations and analyses, repeated summarization of results, and handling of calculation failures.

[0089] 2. Complex data. The calculations and analyses require simulation data and relevant domain knowledge as the core. Because they involve different types of calculations such as power flow, transient stability, and short circuits, the initial calculation data may generate a large amount of derived data and results, as well as a wealth of analytical conclusions, making data and knowledge management complex.

[0090] 3. Complex interfaces. iPSA-Agent needs to call various simulation calculation programs, multiple types of data interfaces, AI models, and even supercomputing systems.

[0091] Based on the above characteristics, the design of iPSA-Agent mainly considers the following principles:

[0092] 1. The program implementation and large-scale model application are organically combined to construct a simulation calculation workflow. Large-scale models are mainly used in areas where traditional software methods are difficult to implement, such as human-computer interaction understanding, complex task decomposition, and result summarization. Large-scale models are not used for aspects that can be easily implemented through automation and simulation calculations.

[0093] 2. Organic integration of data and knowledge. In traditional simulation analysis systems, data management primarily supports functional implementation, while the knowledge behind the data is generally held by humans. iPSA-Agent executes tasks independently, requiring the establishment of a correspondence between data and knowledge. This facilitates the intelligent agent's simultaneous access to both data and required knowledge, and supports upgrading the traditional human-machine data interaction mode to a knowledge interaction mode.

[0094] 3. Integrate with existing simulation software, rather than replace it. On the one hand, existing simulation software can provide iPSA-Agent with data storage, capability implementation, and human-computer interaction assistance; on the other hand, the development and maturation of iPSA-Agent requires a long process, and traditional computing software may have more advantages for simple tasks.

[0095] like Figure 1 As shown, the present invention proposes a power system simulation and analysis intelligent agent system, comprising:

[0096] 1. The interface layer consists of three parts: text, graphics, and tables. The text part is used to receive instructions, provide feedback text information, and report; the graphics part includes geographic maps and statistical charts, which are used to visually display the main information of the task execution results, and the statistical charts can be generated from large models; the tables are used to display detailed data information of the task execution results.

[0097] 2. The workflow layer is used to understand user intent, form task workflows, and drive and coordinate individual sub-agents of the skill layer based on the workflow;

[0098] In order to more accurately match the simulation analysis workflow template, it is necessary to first vectorize the workflow template. In order to retain the sequence order information of the template, a sine / cosine position encoding is added to the word vector:

[0099]

[0100] wherein: is the position of the word in the sequence, is the dimension of the word vector, i is the dimension index. The encoding is added to the word embedding and sent to the subsequent layer, so that the model can perceive relative / absolute position information.

[0101] Then a multi-head attention mechanism is introduced:

[0102]

[0103] wherein:

[0104]

[0105]

[0106] wherein, , , are the matrices of the query, key and value respectively; is the dimension of the key vector, head i is the i th attention head, h is the number of attention heads; W 0 is the output projection matrix; W i V is the value transformation matrix of the i th head; W i K is the key transformation matrix of the i th head; W i Q is the query transformation matrix of the i th head;

[0107] After each attention sub-layer, there is a two-layer fully connected feedforward network:

[0108]

[0109] wherein, x is the input, and output from the attention layer; W 1 is the first layer weight matrix; b 1 is the first layer bias; W 2 is the second layer weight matrix; b 2 is the second layer bias. The first linear transformation expands the dimension from to (typically by a factor of 4), followed by a ReLU (or GELU) activation; the second linear transformation maps back to .

[0110] After the above processing, the main intelligent agent can more accurately select the simulation analysis workflow template to generate a specific simulation analysis workflow.

[0111] 3. The skill layer encapsulates the long-line and short-line sub-task execution logic of the iPSA-Agent through sub-intelligent agents, and is divided into business sub-intelligent agents, auxiliary sub-intelligent agents, and knowledge sub-intelligent agents.

[0112] The power grid control skill is included in the business sub-intelligent agent, and the main control model is:

[0113]

[0114] wherein: : control vector; : gain coefficient vector; : power grid target state vector; : power grid current state vector.

[0115] The power grid target state vector is obtained through the knowledge sub-intelligent agent, the power grid current state is queried through the business sub-intelligent agent, the gain coefficient vector is calculated or queried through the business sub-intelligent agent, and finally the control vector is calculated.

[0116] After obtaining the control vector, the control execution skill acts on the power grid data to adjust the power grid data, and then the power grid simulation skill verifies the control effect. According to the effect, it is decided whether to perform the next round of control process.

[0117] For the case of multi-step control, the following method is used:

[0118]

[0119] wherein, score() is a state evaluation function, get_reachable_actions() is a reachable action generator, violates_constraint() is a constraint checking function, and action_cost() is an operation cost function. The whole process is briefly described as follows:

[0120] (1) Initialization

[0121] Starting from the current grid actual operation state T0 (including generator output, bus voltage, line flow, switch state, etc.);

[0122] Calculate the comprehensive score of this state on the target requirements q (such as total load value, voltage qualification rate, N-1 passing rate, etc.);

[0123] Put the initial state as a "adjustment path" with a length of 1 into the initial beam B0, and record that the path has not yet used any action type.

[0124] (2) Multi-round iterative expansion

[0125] For each candidate action in the current beam (representing an intermediate state after a number of operations have been performed):

[0126] (a) Dynamically generate actionable set

[0127] Based on the current grid topology (for example, which lines are closed, which areas are connected), call the get_reachable_actions function to list only executable operations.

[0128] For example: if a substation has been cut off, the transformer of the substation cannot be adjusted; if a capacitor has been put into operation, the next step can only consider cutting off or keeping.

[0129] (b) Simulate execution and scoring

[0130] For each actionable action, check if it violates the hard constraints (such as generator output exceeding the limit, voltage exceeding the limit):

[0131] <1> If legal, simulate execution to get new state Tnew;

[0132] <2> Calculate the comprehensive score of the new state = target matching degree + safety margin - operation cost. Operation cost: reflects the operation and maintenance cost of the action (such as high cost of main transformer adjustment, low cost of capacitor switching).

[0133] (c) Group diversity enhancement

[0134] Group all newly generated candidate actions by action type (such as "generator adjustment", "capacitor switching", "line switch", etc.). In each group, sort the candidate actions by score, and apply an exponential decay penalty to the lower-ranked ones. At the same time, if a certain action type has never been used in the current path, give an additional reward (for example, score 1.1) to encourage mixed strategies.

[0135] (d) Merge and prune

[0136] Merge all the diversity processed candidate actions; keep the top b paths with the highest total scores to form the beam for the next round.

[0137] (3) Output the result

[0138] After at most l steps, return all the paths in the beam, each of which is a complete, executable multi-hop adjustment sequence.

[0139] After the above steps, both high-quality adjustment schemes and diversified options can be generated, meeting the actual needs of "multiple plans and flexible choices" in power grid operation analysis.

[0140] 4. The tool / knowledge layer includes calls to external services and storage and utilization of knowledge. The former can be based on the MCP (Model Context Protocol) protocol, and the latter stores data and knowledge environment for task execution.

[0141] 5. The business system layer provides data, calculations, and even automatic processing functions to support the iPSA-Agent, and can provide necessary interactive interfaces.

[0142] The positioning of the power system simulation analysis agent includes the following three aspects:

[0143] 1. In terms of artificial intelligence technology application, the current AI model research and application mode corresponding to a few manual links is upgraded to an application mode for complex work tasks. The large model integrated by the agent is used to understand and drive various power grid simulation analysis task execution, coordinate the calling of AI models, simulation programs, and various automated analysis methods.

[0144] 2. In terms of human-computer interaction mode, simulation analysis personnel interact with the agent through various forms such as text and voice. The agent uses the summarization capabilities of the large model to extract patterns from result data and feeds back refined information in various forms such as text, pictures, and tables, promoting the data interaction between humans and computers to knowledge interaction.

[0145] 3. In terms of simulation analysis system construction, as the "first entrance" of the system, it calls data, calculations, computing power, and other underlying services, as well as modules and pages of various business systems, to meet the needs of task execution and human-computer interaction. At this time, conventional business systems are mainly used for establishing data, setting conditions, and displaying feedback information, and are no longer the core tool for workflow execution.

[0146] It can be seen that the main goal of the iPSA-Agent construction is to support the power grid simulation analysis work mode of "human task assignment-machine understanding and task execution" (referred to as "human-machine task-driven mode") and realize the breakthrough of power system intelligent simulation analysis technology. The establishment of this mode will enable artificial intelligence to be a "colleague" that can complete tasks with staff, and realize the free cooperation between man and machine in the professional field before the breakthrough of strong artificial intelligence.

[0147] In addition, Figure 2 is a flowchart of a power system simulation analysis method provided by an exemplary embodiment of the present application, referring to Figure 2 The power system simulation analysis method 200 includes:

[0148] S1. Receive the natural language task instruction of the user through the interface layer;

[0149] S2. The main intelligent agent analyzes the task instruction, matches the corresponding workflow template from the task knowledge base, and forms an executable workflow in combination with the instruction parameters;

[0150] S3. The main intelligent agent decomposes the workflow into multiple sub-tasks and schedules the corresponding sub-intelligent agents to execute;

[0151] S4. The sub-intelligent agent completes the task by calling the tool interface in the tool / knowledge layer and using the associated task data object during the execution of the sub-task;

[0152] S5. The sub-intelligent agent returns the sub-task execution result to the main intelligent agent, and the main intelligent agent integrates the final task result and feeds back to the user through the interface layer.

[0153] Specifically, the power system simulation analysis method realized by the power system simulation analysis intelligent agent system in the embodiment includes the following steps:

[0154] First step: build dialogue and task

[0155] The iPSA-Agent organizes work execution in the form of dialogue and task. The multi-round communication between man and machine constitutes a dialogue, that is, several tasks can be executed in a dialogue, and the end of the dialogue and the start of a new dialogue are determined by the human. A user's input instruction and the corresponding execution and return process of the iPSA-Agent correspond to a task, that is, a dialogue process between man and machine.

[0156] In the traditional large model dialogue process, the context association of the dialogue usually needs to be considered, but in the dialogue process of iPSA-Agent, it may involve not only regular question and answer dialogue, but also operations such as calculation and data modification, and related return information. Due to other tasks in addition to question and answer, the essence of which is to operate data, the basic form of the execution result is also data, therefore, in order to avoid interference, only the context association of the question and answer type task is considered in the dialogue of iPSA-Agent, and other types of tasks are connected through the related data of the task.

[0157] The question and answer content cannot be shared between different dialogues, but the task data object of the other party can be used, so in addition to the question and answer, the essence of the task can be cross-dialogue. The significance of designing the dialogue is to form an analysis or work report according to the dialogue content, so the dialogue can also be regarded as a complete work task of a person.

[0158] The task in the dialogue corresponds to the common workflow in the simulation analysis work, and the task data object and the task execution parameter form the specific analysis processing process of the agent.

[0159] Reference Figure 3 As shown in the figure, a single human-computer interaction or calculation calling link is defined as a meta task, such as power grid simulation, AI calculation, and data operation, a sub task is composed of a sequence of meta tasks, and part of the common meta tasks can be encapsulated for calling by different sub tasks. A user's command is a task, a task may contain several sub tasks, each sub task corresponds to a long line task or a short line task, and the same sub task can be called in different tasks. The long line sub task contains all the analysis and calculation sub tasks with clear flow, such as generating the power flow mode; the short line sub task contains three types of data maintenance sub tasks (addition, deletion and modification of simulation data), statistical analysis sub tasks (query and statistics of simulation data and results), and question and answer sub tasks. Since each scene of simulation analysis is complex, a long line sub task may contain multiple meta tasks, and a short line task may only contain a small number of meta tasks.

[0160] Step 2: Establish workflow and skills

[0161] The task, sub task and meta task divide the logical structure of the simulation analysis workflow, and in the implementation of the agent, task flow arrangement and promotion, skills, and tools are used for implementation. When executing a task, the task flow arrangement is determined by the large model in combination with related knowledge, parameters, and task requirements, and is autonomously promoted for execution.

[0162] For sub-tasks, since the operations performed are generally deterministic, the specific operations of these links are relatively fixed and are constructed as the "skills" of the agent. The relationship between skills and tasks here is similar to the skills that simulation analysis personnel pre-master using calculation programs, statistical calculation results, etc. Through a clear work flow, i.e. task arrangement, personnel use these capabilities to complete corresponding work tasks.

[0163] Meta-tasks correspond to specific operations and involve the invocation of various interfaces, algorithms, functions, and large models. These operations are encapsulated as tools to support the construction of agent skills according to the correspondence between meta-tasks and sub-tasks.

[0164] Step 3: Multi-agent-based workflow execution

[0165] After receiving the task instruction, the main agent parses the instruction, finds the relevant workflow description from the power grid simulation analysis task knowledge base, and forms the workflow according to the parameters in the task instruction.

[0166] The execution of the workflow requires the skills of iPSA-Agent, which are encapsulations of tools that can be fixed in the process through MCP to call tool interfaces, or in the form of sub-agents that assemble sub-task execution processes based on assigned tasks and call large models and task knowledge bases. iPSA-Agent implements skills in a multi-agent manner, mainly for two reasons. First, in actual work, even relatively fixed workflows may encounter various problems during execution that require complex human-machine interaction and process adjustment. Sub-agents can better adapt to such situations by combining task knowledge bases. Second, it can track human operations and feedback, continuously improve the content of the task knowledge base related to sub-tasks, and easily optimize the behavior of sub-agents to achieve human-machine hybrid optimization.

[0167] Step 4: Establish a data and knowledge environment framework for task execution

[0168] The task execution of iPSA-Agent requires data and knowledge support, mainly including work knowledge, work data, and work conclusions.

[0169] 1. Work knowledge. In the task flow arrangement link, the large model needs simulation analysis workflow knowledge corresponding to the task scenario; during execution, the agent needs to call domain knowledge related to the task;

[0170] 2. Work Data. During task execution, skill activation needs to be combined with the simulation data required for the task, and the conclusions after task completion will also be reflected in the simulation data. Effective management and storage of work data are necessary for verifying and analyzing task conclusions, as well as improving intelligent agent tools.

[0171] 3. Work Conclusions. After the task is completed, the conclusions obtained are reflected in the relevant simulation data and can also be summarized as textual and graphical conclusions of the work. These conclusions need to be stored so that they can be used directly when there are similar tasks in the future, or for further analysis, querying and reference when needed.

[0172] The aforementioned work knowledge, work data, work conclusions, and task parameters together constitute the task data object, which is the data and knowledge environment required for task execution.

[0173] Step 5: Workflow Execution Strategy

[0174] The execution of tasks by intelligent agents mainly includes four types: sequential execution, cyclic execution, branch execution, and exception handling. The main agent connects the outputs of each sub-agent to drive the task execution.

[0175] 1. The general model generates a workflow based on task-related knowledge. Essentially, it is a process framework. The main agent can easily and autonomously drive both sequential execution and branch execution.

[0176] 2. Looping Execution. First, the return results of the sub-Agent objects are recorded in a list. Each sub-Agent object, i.e., each sub-task stage, has an independent, local variable-like list of results. The main agent defines a default operation on the list, processing each item sequentially. The main agent executes each item in the list returned by the sub-agents, forming a loop. If subsequent sub-agents also return lists, the main agent forms a nested loop for task execution.

[0177] 3. Exception handling. The exception in the task execution process generally occurs when the tool is called, such as the convergence of power flow calculation. It should be noted that the processing of the calculation or sub-task execution result that does not meet the requirements does not belong to the exception handling, which should belong to a link in the workflow. The agent establishes the process knowledge of different categories of exception handling, mainly including power flow calculation failure, transient stability calculation failure, AI model call failure, etc. For different errors, a special exception handling sub-task is established, and the input and output of the error tool and the tool calling intention of the sub-agent are used as the input data of the exception handling sub-task, mainly guiding the person to modify the data or change the tool calling object and parameters of the sub-agent. After processing, the exception handling sub-task returns to the tool calling before, triggering the sub-agent to call the tool again.

[0178] Step 6: Management of heterogeneous task data objects

[0179] The structure and data size of iPSA-Agent task data objects vary greatly, so the following aspects are mainly considered for construction and management:

[0180] 1. Different data structures are used to store and manage task-related data and knowledge. The power grid simulation analysis task knowledge base records the workflow in the form of rules and records the domain knowledge related to workflow execution in the form of triples; the power grid simulation analysis question and answer knowledge base adopts the form of document library, and provides support for human-computer question and answer based on RAG (Retrieval-Augmented Generation) technology; the task database uses a commercial database to load simulation data required for task execution; the simulation analysis historical result library records the textual description and report of the analysis result in the form of XML file; the dialogue history library also records the question and answer content in the form of XML.

[0181] 2. Data tags are used to mark and associate task data objects to meet the needs of task execution and data query. Data tags are stored in the task database, and the content mainly includes task ID, reference knowledge ID, task data ID, historical result ID, and description tags related to the task, such as running mode name and running mode characteristics, so as to facilitate large model analysis and understanding of task content.

[0182] 3. When the user inputs the task command, some parameters may be omitted, and the input parameters may not be complete when the tool is called, so the parameters need to be completed. Since the use of large model fine-tuning method requires a large amount of training, and the effect has certain uncertainty, therefore, the prompt word engineering is mainly used to explain the parameters, and the default parameter value is given. On this basis, part of the important parameters can be confirmed by the iPSA-Agent asking the user.

[0183] 4. Sub-task data environment centered on data labels. Sub-task execution requires a task data object, execution requirements or parameters, and an output execution result data object; these three elements constitute the task's data environment. Unless explicitly instructed by the user, the current task data object remains unchanged. Task data objects are labeled with data tags for user reselection; a data tag is a multi-dimensional vector marking data features from different dimensions. Users can specify task data object tags via text or switch between tags. If no user-specified tags are specified, the main model should automatically complete the data object tag parameters based on the context. For example, the sub-task execution result dataset should have automatically constructed data tags. For question-and-answer sub-tasks, the current task data object remains unchanged, and its execution is unrelated to the current task data object, so no data object tag is required. The basic computational dataset for the agent's runtime environment is given a default data tag, such as all computational data from simulation analysis. To simplify the logic, the system defaults to the basic computational dataset each time the agent executes a task unless a new data object is manually specified.

[0184] To facilitate user input of task execution requirements and ensure standardized input format, it is necessary to construct description templates for common tasks, which users can modify based on.

[0185] Regarding the task execution results, operations on the power grid simulation data directly affect the simulation data itself, are stored in the basic database, and are labeled; statistical analysis results, as well as the generated tables and statistical charts, are stored in files and labeled for later use; and question and answer results are directly returned to the dialogue area.

[0186] Step 6: Invoking relevant system functions

[0187] iPSA-Agent calls services provided by existing simulation systems, AI platforms, and third-party software through tool interfaces. Since these systems were built at different times and used different technical approaches, it is first necessary to determine the standard specifications for the service interfaces, including data exchange formats and calling methods. Based on this, existing systems are modified to establish the service interfaces; this part involves significant software development work.

[0188] iPSA-Agent communicates with each system through Socket during task execution. If a single-step instruction is executed, such as starting an independent tool of an external system, iPSA-Agent returns to the state of waiting for input instruction directly after calling. If an instruction requiring a returned result is executed, iPSA-Agent waits for the service interface to return after execution. To prevent return failure, a terminate waiting instruction is set, and then iPSA-Agent continues to execute the task or enters an error processing link. In this way, a large number of previous task links can be avoided from being discarded due to simple termination of the task.

[0189] In a specific embodiment of the present application, a long-line task of example 1 is as follows:

[0190] User input:

[0191] >Calculate the limit of section A using the data set 1 of the summer mode of 2025 to calculate the data set

[0192] iPSA-Agent output:

[0193] >Obtain the data set 1 of the summer mode of 2025 to calculate the data set

[0194] >Set the section A limit calculation condition according to the predefined section A limit calculation template, and…

[0195] >Perform the first round of section A flow adjustment

[0196] >Increase the section A flow and start a unit

[0197] >Check the section A fault set

[0198] >Pass the check, no instability fault, continue to increase the section A flow

[0199]

[0200] >Perform the 17th round of section A flow adjustment

[0201] >Increase the section A flow and start a unit

[0202] >Check the section A fault set

[0203] >Fail the check, three permanent fault systems are unstable

[0204] >The limit of section A is MW, and the corresponding per unit value is p.u.

[0205] A short-line task of example 2 is as follows:

[0206] User input:

[0207] >Query the maximum active value of North China network from 2023 to 2025

[0208] iPSA-Agent output:

[0209] Obtain all calculation datasets for the North China Power Grid from 2023 to 2025, totaling 23 sets.

[0210] The maximum active power of a single load in the North China power grid is MW, corresponding to the per-unit value pu.

[0211] Therefore, based on a large model, this invention comprehensively utilizes power system simulation analysis technology, automatic data processing technology, and related artificial intelligence technology to establish a new intelligent application system for various power grid simulation analysis businesses. This breaks through the limitations of existing simulation analysis calculation tools and scenario-based tools, and achieves a leapfrog development of power system simulation analysis in the direction of intelligence.

[0212] Exemplary electronic device

[0213] Figure 4 This is the structure of an electronic device provided in an exemplary embodiment of the present invention. For example... Figure 4 As shown, the electronic device 40 includes one or more processors 41 and a memory 42.

[0214] The processor 41 may be a central processing unit (CPU) or other form of processing unit with data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device to perform desired functions.

[0215] The memory 42 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 41 may execute the program instructions to implement the methods of the software programs of the various embodiments of the present invention described above, and / or other desired functions. In one example, the electronic device may also include an input device 43 and an output device 44, these components being interconnected via a bus system and / or other forms of connection mechanisms (not shown).

[0216] In addition, the input device 43 may also include, for example, a keyboard, a mouse, etc.

[0217] The output device 44 can output various information to the outside. The output device 44 may include, for example, a display, a speaker, a printer, and a communication network and its connected remote output devices, etc.

[0218] Of course, in order to simplify, Figure 4 Only some of the components in the electronic device related to the present application are shown in FIG. 6, and components such as buses, input / output interfaces, etc. are omitted. In addition, the electronic device can include any other appropriate components according to a specific application.

[0219] Exemplary computer program product and computer readable storage medium

[0220] In addition to the above-mentioned methods and devices, embodiments of the present application can also be a computer program product including computer program instructions, which, when executed by a processor, cause the processor to perform steps of the methods according to various embodiments of the present application described in the above "Exemplary Methods" section of the specification.

[0221] The computer program product can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++, etc., and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device or entirely on the remote computing device or server.

[0222] In addition, embodiments of the present application can also be a computer readable storage medium, which stores computer program instructions, which, when executed by a processor, cause the processor to perform steps of the methods according to various embodiments of the present application described in the above "Exemplary Methods" section of the specification.

[0223] The computer readable storage medium can take any combination of one or more of a readable medium. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, system or device, or any combination thereof. More specific examples (a non-exhaustive list) of the readable storage medium include an electrical connection having one or more wires, a portable disc, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any appropriate combination of the above.

[0224] The above describes the basic principles of the present application in conjunction with specific embodiments, but it should be noted that the advantages, benefits, effects and the like mentioned in the present application are only examples and are not limiting, and these advantages, benefits, effects and the like cannot be considered as necessary for each embodiment of the present application. In addition, the above specific details disclosed are only for the purpose of example and understanding, and are not limiting, and the above details do not limit the present application to be necessarily implemented with the above specific details.

[0225] Each embodiment in the specification is described in a progressive manner, and each embodiment focuses on the difference from other embodiments, and the same or similar parts between each embodiment can be understood by referring to each other. For the system embodiment, since it basically corresponds to the method embodiment, the description is relatively simple, and the relevant parts can be understood by referring to the part of the method embodiment.

[0226] The block diagrams of the devices, systems, apparatuses, systems involved in the present application are only exemplary examples and are not intended to require or imply the connection, arrangement, configuration shown in the block diagram. As those skilled in the art will recognize, these devices, systems, apparatuses, systems can be connected, arranged, configured in any manner. Words such as "include", "contain", "have" and the like are open-ended words, which mean "include but not limited to", and can be used interchangeably. The words "or" and "and" used herein mean the word "and / or", and can be used interchangeably unless the context clearly indicates otherwise. The word "such as" used herein means the phrase "such as but not limited to", and can be used interchangeably.

[0227] The method and system of the present application can be implemented in many ways. For example, the method and system of the present application can be implemented by software, hardware, firmware or any combination of software, hardware and firmware. The above order of steps for the method is only for illustration, and the steps of the method of the present application are not limited to the above specific description, unless otherwise specifically described. In addition, in some embodiments, the present application can also be implemented as programs recorded in recording media, which include machine-readable instructions for implementing the method according to the present application. Therefore, the present application also covers the recording media storing the programs for executing the method according to the present application.

[0228] It should also be noted that in the systems, apparatus, and methods of the present invention, the components or steps can be disassembled and / or recombined. These disassemblies and / or recombinations should be considered equivalents of the present invention. The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the invention. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein can be applied to other aspects without departing from the scope of the invention. Therefore, the invention is not intended to be limited to the aspects shown herein, but rather to be carried out within the widest scope consistent with the principles and novel features disclosed herein.

[0229] The above description has been given for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of the invention to the forms disclosed herein. Although numerous exemplary aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations thereof.

Claims

1. A power system simulation and analysis intelligent agent system, characterized in that, include: The interface layer is used to receive user commands and provide task results in multiple modalities. The workflow layer includes a main intelligent agent, which is used to parse the user instructions, generate and drive the execution of the simulation analysis workflow based on the task knowledge base, wherein the workflow consists of multiple task execution strategies such as sequential execution, branch execution, loop execution and exception handling. The skill layer includes multiple sub-agents, which are used to encapsulate and execute specific sub-tasks in the workflow; The tools / knowledge layer provides standardized interfaces for calling external tools and stores the data and knowledge required for task execution. The business system layer includes one or more existing power system simulation business systems, which provide basic data, computing services and interactive components for the tools / knowledge layer. The main intelligent agent parses user instructions into tasks, and decomposes the tasks into several sub-tasks, which are then assigned to the corresponding sub-intelligent agents for execution. The sub-intelligent agents complete the tasks collaboratively by calling the tool interfaces in the tool / knowledge layer and utilizing the data and knowledge. The sub-agents in the skill layer include business-type sub-agents, auxiliary-type sub-agents, and knowledge-type sub-agents; The business-type sub-intelligent agent is used to execute the long-term sub-tasks of power grid simulation analysis specified in the workflow; The auxiliary sub-intelligent agent is used to perform short-term sub-tasks such as data maintenance and query statistics in the workflow; The knowledge-based sub-agent is used to execute the domain knowledge question-answering sub-task in the workflow; The business-class sub-agent includes a power grid control skill model: in: For control vectors; This is the gain coefficient vector; The target state vector of the power grid; The current state vector of the power grid is obtained through a knowledge-based sub-agent, the target state vector of the power grid is obtained through a business-based sub-agent, the current state of the power grid is queried through a business-based sub-agent, the gain coefficient vector is calculated or queried through a business-based sub-agent, and finally the control vector is calculated. The control execution skill applies the control vector to the power grid data to adjust the power grid data, and then the control effect is verified by the power grid simulation skill. The power grid control skill model performs multi-step control of the power grid in the following steps: The initialization step starts from the current actual operating state of the power grid, calculates the comprehensive score of the current actual operating state of the power grid to the target requirements, and puts the current actual operating state of the power grid as an adjustment path of length 1 into the initial bundle of the next round of control, while recording that no action type has been used for this path; The multi-round iterative expansion step performs the following sub-steps for each of the adjustment paths in the current bundle controlled by the current round: (a) Based on the current power grid topology corresponding to the adjustment path, dynamically generate a set of actionable actions; (b) Simulate the execution of each executable action in the set of executable actions to obtain a new state and calculate its comprehensive score, wherein the comprehensive score = target matching degree + safety margin - operation cost; (c) Group all candidate actions corresponding to the new state by action type. Within each action type group, sort the candidate actions by score and apply an exponential decay penalty to the lower-ranked ones. If an action type has never been used in the current path, give an extra reward to obtain the processed candidate actions. (d) After merging all processed candidate actions, retain the top b paths with the highest comprehensive scores to form the current bundle for the next round of input; The output result step, after the termination of the multi-round iterative expansion step, returns all adjusted paths in the final current bundle as a complete scheme.

2. The system according to claim 1, characterized in that, The task knowledge base in the workflow layer stores simulation analysis workflow templates in the form of rules. The main intelligent agent generates a specific simulation analysis workflow by combining the parameters in the user instructions with the workflow templates. The strategy for loop execution is to record the return results of sub-agent objects in a list. Each sub-agent object has an independent, local variable-like result list. The main agent defines a default operation on the list that processes each item one by one. The main agent executes each item in the list according to the list returned by the sub-agent objects, forming a loop. If the sub-agent objects in subsequent steps also return a list, the main agent forms a nested loop for task execution. The anomaly handling strategy involves the agent establishing process knowledge for handling different types of anomalies. For errors in different situations, a dedicated anomaly handling subtask is established. The input and output of the erroneous tool and the tool invocation intent of the sub-agent are used as input data for the anomaly handling subtask. The data is modified, or the tool invocation object and parameters of the sub-agent are changed. After processing, the anomaly handling subtask returns to the state before the tool invocation, triggering the sub-agent to invoke the tool again. The anomaly handling includes power flow calculation failure, quasi-stability calculation failure, and AI model invocation failure.

3. The system according to claim 2, characterized in that, The workflow template uses vectorized encoding, and sine / cosine positional encoding is added to the word vectors of the vectorized encoding: set up, The position of the word in the sequence, The dimension of the word vector. i For dimension indexing; The workflow template is used to generate the workflow, which incorporates a multi-head attention mechanism: in: In the formula, , , These are matrices representing queries, keys, and values; Let be the dimension of the key vector. head i For the first i One point of attention, h For the number of attention heads; W 0 To output the projection matrix; W i V For the first i The value transformation matrix of each head; W i K For the first i The key transformation matrix of the head; W i Q For the first i The query transformation matrix for each head; Each attention sublayer is followed by a two-layer fully connected feedforward network: In the formula, x The input is the output from the attention layer; W 1 represents the first-layer weight matrix; b 1 represents the first layer bias; W 2 represents the weight matrix of the second layer; b 2 represents the second layer bias.

4. The system according to claim 1, characterized in that, The tools / knowledge layer includes: A knowledge base is used to store work knowledge, work data, and work conclusions. The work knowledge includes workflow knowledge stored in the form of rules and domain knowledge stored in the form of triples. The work conclusions include analysis reports stored in the form of XML files. The tool service is used to encapsulate simulation calculation programs, AI models, and database operations into standardized tool interfaces based on the Model Context Protocol (MCP).

5. A power system simulation analysis method based on the system described in any one of claims 1-4, characterized in that, include: S1. Receive the user's natural language task instructions through the interface layer; S2. The main intelligent agent parses the task instruction, matches the corresponding workflow template from the task knowledge base, and combines the instruction parameters to form an executable workflow, wherein the workflow consists of multiple task execution strategies such as sequential execution, branch execution, loop execution, and exception handling; S3. The main intelligent agent decomposes the workflow into multiple sub-tasks and schedules the corresponding sub-intelligent agents to execute them; S4. During the execution of a sub-task, the sub-agent completes the task by calling the tool interface in the tool / knowledge layer and using the associated task data object; S5. The sub-agent returns the sub-task execution results to the main agent, which integrates them and then feeds back the final task results to the user through the interface layer.

6. The method according to claim 5, characterized in that, In step S4, when calling the tool interface, if the required parameters are incomplete, the system will automatically complete the default parameters based on the context and data tags of the current task data object through prompt words, or ask the user for confirmation on key parameters.

7. The method according to claim 5, characterized in that, A user’s one or more consecutive interactions constitute a dialogue, and a dialogue contains one or more tasks; the tasks are linked through their associated task data objects, and the content of the question-and-answer subtasks within the dialogue is stored separately in the dialogue history database.

8. A computer-readable storage medium, characterized in that, The storage medium stores a computer program for performing the method described in any one of claims 5-7.

9. An electronic device, characterized in that, The electronic device includes: processor; Memory used to store the processor's executable instructions; The processor is configured to read the executable instructions from the memory and execute the instructions to implement the method described in any one of claims 5-7.

Citation Information

Patent Citations

  • Intelligent intention sensing method and device for electric power system simulation calculation analysis machine

    CN117689013A

  • Multi-agent scheduling method and multi-agent system

    CN121255391A