A data sharing system and method for realizing multi-agent interaction

By training large language models and graph databases to build a knowledge relationship map, dynamically allocate subtasks, and optimize the collaborative efficiency between agents, it solves the problems of inconsistent data standards and low task execution success rate in smart grid systems, and realizes efficient data sharing and task execution between agents.

CN120277143BActive Publication Date: 2025-08-01ELECTRIC POWER RES INST CHINA SOUTHERN POWER GRID CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510765532.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-10
Publication Date
2025-08-01
Estimated Expiration
2045-06-10

AI Technical Summary

Technical Problem

In existing smart grid systems, the data standards of SCADA, PMS and other systems are not unified. The agent needs to obtain data through customized interfaces. The development cost is high and the real-time performance is poor. The unstructured data processing is inefficient, and the task execution success rate is low. The load difference and task priority of the agent are not considered, resulting in a task backlog in high concurrency scenarios.

Method used

By training large language models to identify task types, generate standardized task templates, use graph databases to build knowledge relationship maps, establish a unified data interface, dynamically allocate subtasks, optimize execution order, and combine the load and skill matching of agents to achieve collaborative efficiency between agents.

Benefits of technology

Real-time interoperability of system data such as SCADA and PMS has been realized, which improves map update efficiency, shortens process time, improves resource utilization and task execution success rate, supports rapid adaptation of power grid business changes, and reduces system expansion costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120277143B_ABST
    Figure CN120277143B_ABST
Patent Text Reader

Abstract

The present invention discloses a data sharing system and method for realizing multi-agent interaction, belonging to the technical field of agents. The present invention annotates production command instructions, trains a large language model to identify task types; disassembles production command instructions into a sub-task sequence; constructs a knowledge relationship graph through a graph database; establishes a unified data interface and constructs a data sharing center; divides agent types according to the power transmission and distribution business scenario to determine the functional boundaries of each agent; uses a multi-agent simulation environment to test the collaboration efficiency of sub-tasks and optimize the execution order of the sub-task sequence; dynamically allocates sub-tasks according to agent load and skill matching degree; agents access the knowledge relationship graph through a unified data interface and use a message queue to realize real-time push of data changes; optimizes the decision-making of the large language model through prompt engineering, executes specific operations using a tool library component, and agents execute operations according to the sub-task sequence.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of agents, and specifically to a data sharing system and method for realizing multi-agent interaction. Background Art

[0002] With the in-depth construction of the smart grid, the production command business of power transmission and distribution is facing challenges such as explosive growth in data scale and increased complexity of business processes. Traditional production command systems rely on manual experience for scheduling and fragmented data processing modes, and can no longer meet the requirements of grid safe operation and efficient operation and maintenance.

[0003] In the prior art, the data standards of systems such as SCADA, PMS, and OMS are not unified. Agents need to obtain data through customized interfaces, resulting in high development costs, poor real-time performance, and inefficient processing of unstructured data. The subtask sequence depends on fixed process orchestration, without considering the load differences and task priorities of agents, leading to task backlogs in high-concurrency scenarios. Existing systems allocate tasks on a first-come-first-served or round-robin basis, without considering the skill differences of agents, resulting in low task execution success rates. General large language models lack knowledge in the power field, and the generated solutions have insufficient compliance and require manual secondary review. In addition, agents need to directly connect to multiple heterogeneous tools, and the interface protocols are not unified. Summary of the Invention

[0004] The purpose of the present invention is to provide a data sharing system and method for realizing multi-agent interaction to solve the problems raised in the prior art.

[0005] To achieve the above purpose, the present invention provides the following technical solutions:

[0006] In the first aspect, a data sharing method for realizing multi-agent interaction includes the following steps:

[0007] Annotate production command instructions, train a large language model to identify task types; generate a standardized task template through prompt engineering, and disassemble the production command instructions into a subtask sequence in combination with the task types;

[0008] Collect power transmission and distribution production data, construct a knowledge relationship graph through a graph database, and convert unstructured data into vectors for storage; establish a unified data interface to support agents to retrieve graph data in real time through the API, and construct a data sharing center;

[0009] Divide agent types according to power transmission and distribution business scenarios, and determine the functional boundaries of each agent; in the data sharing center, use a multi-agent simulation environment to test the collaboration efficiency of subtasks, and optimize the execution order of the subtask sequence; dynamically allocate subtasks according to agent load and skill matching degree;

[0010] The agent accesses the knowledge relation graph through a unified data interface to obtain associated data, and uses a message queue to achieve real-time push of data changes; the agent calls an external knowledge base according to task requirements, optimizes the decision-making of the large language model through prompt engineering, uses the tool library component to execute specific operations, and the agent executes operations according to the subtask sequence.

[0011] Combined with the first aspect, in the first implementation manner of the first aspect of the present application, the annotation of the production command instruction, training the large language model, and identifying the task type include:

[0012] Collect production command instructions, perform denoising processing and standardization, and divide them into training sets, validation sets, and test sets according to a ratio; define task type labels, including data query type, process execution type, solution generation type, and risk assessment type, and use the BIO annotation method to mark the entities in the instruction, including: equipment entity, time entity, and operation action; use LabelStudio to annotate the production command instruction, use DeepSeek as the basic model of the large language model, and use the annotated production command instruction as the input; the training objective is to output the task type to which the instruction belongs using the cross-entropy loss function; set training parameters, evaluate and iterate the large language model, and use it to identify the task type of newly input production command instructions.

[0013] Combined with the first aspect, in the second implementation manner of the first aspect of the present application, the generation of a standardized task template through prompt engineering and the decomposition of the production command instruction into a subtask sequence according to the task type include:

[0014] Design the standardized task template structure in the template library, and each template includes: main task description, subtask sequence, parameter placeholder, and execution constraint. Among them, the main task description is specifically the business objective, the subtask sequence is the subtasks arranged in the order of business logic, the parameter placeholder is the dynamic parameter extracted based on the instruction entity, and the execution constraint is the domain rule limit;

[0015] Based on the task type, retrieve the corresponding template from the template library, combine the keywords in the instruction, and select the detailed scenario template; fill the entities in the instruction into the parameter placeholders of the template; arrange the subtasks in the business logic order preset by the template; for subtasks that can be processed in parallel, mark them as parallel execution nodes; call the execution constraint to verify the compliance of the subtask sequence.

[0016] Combined with the first aspect, in the third implementation manner of the first aspect of the present application, the collection of power transmission and distribution production data, the construction of a knowledge relation graph through a graph database, and the conversion of unstructured data into vector storage include:

[0017] Collect power transmission and distribution production data, define event entities and spatial entities, combine equipment entities and operation actions, and construct the triggering relationship between equipment and events, the location relationship between equipment and space, and the process relationship between events and operation actions; construct an equipment layer, an event layer, a rule layer, and a spatial layer in the knowledge relationship graph. The equipment layer is constructed according to the hierarchical levels from high to low of substations, voltage levels, equipment, and components, and records the full life cycle information of the equipment. The event layer is used to label the event triggering conditions and influence ranges. The rule layer implants industry rules and defines the equipment maintenance cycle and fault handling process. The spatial layer integrates geographical coordinates and administrative divisions.

[0018] Based on the power transmission and distribution production data, convert structured data into graph nodes and convert the extracted relationships into graph edges; remove non-business-related content from unstructured data, unify terms using a domain dictionary, and split the text in the unstructured data into independent blocks according to semantic relevance; use a pre-trained language model for the power industry to encode the text blocks, generate vectors, and store them in a vector database.

[0019] Combined with the first aspect, in the fourth implementation manner of the first aspect of this application, the intelligent agent types are divided according to the power transmission and distribution business scenarios, and the functional boundaries of each intelligent agent are determined, including:

[0020] The power transmission and distribution business scenarios include equipment management, operation monitoring, dispatching and command, emergency repair, and material management. For each power distribution business scenario, the corresponding intelligent agent type is determined; the functional scope of each intelligent agent is defined, and the functions of each intelligent agent are checked to ensure that there is no functional overlap between intelligent agents. When there is a functional overlap, the functional boundaries are readjusted; based on the association and dependence relationships between various links in the power transmission and distribution business process, the collaboration requirements between intelligent agents are determined.

[0021] Combined with the first aspect, in the fifth implementation manner of the first aspect of this application, in the data sharing center, the collaborative efficiency of subtasks is tested using a multi-intelligent agent simulation environment, and the execution order of the subtask sequence is optimized, including:

[0022] Create a virtual scenario based on the power transmission and distribution business process, including an equipment network, business rules, and a resource pool; deploy intelligent agents consistent with the production environment, map their data interfaces and functional logics, and configure a load threshold for each intelligent agent; use discrete event simulation technology to drive intelligent agent interactions by time slices for monitoring and debugging; locate typical problems, including serial execution caused by strong dependencies between subtasks, multiple intelligent agents simultaneously requesting the same resource, and data version conflicts in the data transmitted between intelligent agents.

[0023] Identify independent subtasks and adjust them to be executed in parallel; assign priorities to subtasks, and high-priority tasks can preempt low-priority resources; encode the execution order of subtasks into chromosomes, calculate fitness by integrating the total task execution time, resource occupancy, and compliance, iteratively generate the optimal sequence, and dynamically allocate tasks to idle agent instances; define arbitration rules during resource competition, and when an agent fails, switch to a backup agent instance or trigger a manual intervention process.

[0024] Combined with the first aspect, in the sixth implementation manner of the first aspect of the present application, the dynamically allocating subtasks according to agent load and skill matching degree includes:

[0025] Obtain the real-time load data of the agent, and use the cosine similarity algorithm to calculate the matching degree score between the subtask requirements and the agent skills. The formula is as follows:

[0026] ;

[0027] where MD is the matching degree, is the demand intensity of the subtask for skill i, is the mastery degree of the agent for skill i, is the skill weight;

[0028] Obtain the subtask characteristics and agent status. The subtask characteristics include task type, priority, skill requirements, and data requirements. The agent status includes real-time load data and skill portraits; construct a subtask set according to the subtask characteristics of all subtasks, construct an agent set according to the agent status of all agents, and construct a mixed-integer programming model with the goal of maximizing skill matching degree and load balancing. The formula is as follows:

[0029] ; [[ID=2,8]]

[0030] where A is the agent set, T is the subtask set, is a 0-1 variable indicating whether agent a processes subtask t, is the skill matching degree between agent a and subtask t, is the load of agent a, is the load threshold of agent a, MMT is the lowest matching degree threshold, and s.t. is used to introduce the constraint conditions that the objective function must satisfy;

[0031] The subtask enters the assignment queue for compliance verification; filters out unmatched agents according to the mandatory constraint conditions, generates a list of candidate agents, sorts them in descending order of skill matching degree, when the matching degrees are the same, sorts them in ascending order of load ratio, and when the load ratios are the same, sorts them in descending order of historical task success rate; pushes the subtask to the target agent through the API, along with the task details. After receiving the task, the agent updates the load status in real time and synchronizes it to the data sharing center.

[0032] Combined with the first aspect, in the seventh implementation manner of the first aspect of the present application, the agent accesses the knowledge relationship graph through a unified data interface, obtains associated data, and uses a message queue to achieve real-time push of data changes, including:

[0033] The unified data interface adopts the RESTful API specification, realizes high throughput based on the HTTP / 2 protocol, and supports JSON format requests or responses; docks with the authentication system, verifies the identity of the agent through the API Key, and follows the principle of least privilege;

[0034] The agent actively initiates a query according to the task requirements, subscribes to specific types of data changes, and the interface automatically pushes updates; maps the nodes and edges returned by the knowledge relationship graph to an object model recognizable by the agent; the message queue adopts Apache Kafka.

[0035] Combined with the first aspect, in the eighth implementation manner of the first aspect of the present application, the agent calls an external knowledge base according to the task requirements, optimizes the decision-making of the large language model through prompt engineering, and uses the tool library component to execute specific operations. The agent executes the operations according to the subtask sequence, including:

[0036] The external knowledge base includes an industry specification library, a historical case library, and a real-time data knowledge base. The agent extracts key retrieval elements according to the task type and subtasks; designs a prompt engineering template, inserts several historical successful cases in the prompt, and guides the large language model to generate a response that conforms to historical experience; filters the tool library components according to the subtask requirements, checks the integrity of the tool input parameters, and triggers the agent to ask questions when they are missing; when receiving a task with a higher priority, pauses the current subtask sequence and preferentially executes the task with a higher priority; when a subtask fails, triggers a rollback mechanism and re-plans the subtask sequence.

[0037] A data sharing system for realizing multi-agent interaction, including:

[0038] Task decomposition module: including: task type recognition unit and subtask sequence generation unit; among them, the task type recognition unit annotates the production command instructions, trains the large language model, and recognizes the task type; the subtask sequence generation unit generates a standardized task template through prompt engineering, and decomposes the production command instructions into a subtask sequence in combination with the task type;

[0039] Knowledge graph construction module: including: knowledge relationship graph construction unit, unstructured data vectorization unit, and data sharing center establishment unit; among them, the knowledge relationship graph construction unit collects power transmission and distribution production data, constructs a knowledge relationship graph through a graph database, and the unstructured data vectorization unit converts unstructured data into vectors for storage; the data sharing center establishment unit establishes a unified data interface to support the intelligent agent to retrieve graph data in real time through the API and construct a data sharing center;

[0040] Intelligent agent classification and collaborative optimization module: including: intelligent agent type division unit, subtask sequence execution order optimization unit, and skill matching degree dynamic task allocation unit; among them, the intelligent agent type division unit divides the intelligent agent types according to the power transmission and distribution business scenarios and determines the functional boundaries of each intelligent agent; the subtask sequence execution order optimization unit tests the collaborative efficiency of subtasks in the data sharing center using a multi-intelligent agent simulation environment and optimizes the execution order of the subtask sequence; the skill matching degree dynamic task allocation unit dynamically allocates subtasks according to the intelligent agent load and skill matching degree;

[0041] Intelligent agent interaction and task execution module: including: data real-time push unit, prompt engineering optimization decision-making unit, and subtask execution unit; among them, in the data real-time push unit, the intelligent agent accesses the knowledge relationship graph through a unified data interface, obtains associated data, and uses a message queue to achieve real-time push of data changes; in the prompt engineering optimization decision-making unit, the intelligent agent calls an external knowledge base according to the task requirements and optimizes the decision-making of the large language model through prompt engineering, and the subtask execution unit uses the tool library component to execute specific operations, and the intelligent agent executes the operations according to the subtask sequence.

[0042] Compared with the prior art, the beneficial effects of the present invention are:

[0043] 1. The present invention realizes real-time data interconnection of systems such as SCADA and PMS through a standardized API interface and a data sharing center, and uses retrieval-augmented generation technology to automatically extract entity relationships in unstructured data, improving the efficiency of graph update.

[0044] 2. The present invention uses a simulation environment to test the collaborative path of subtasks, optimizes the execution order through algorithms, shortens the overall process time, dynamically allocates tasks according to the real-time load and skill matching degree of intelligent agents, avoids the problems of uneven workload and qualification mismatch, and improves resource utilization and task execution success rate.

[0045] 3. The agent types and collaboration processes of the present invention can be dynamically adjusted according to business requirements, without reconstructing the underlying architecture, quickly adapting to changes in power grid operations, decoupling data interfaces from agent functions, supporting the rapid access of new agents, reducing system expansion costs, and enhancing the ability to handle new business scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 is a schematic diagram of the steps of a method for data sharing for multi-agent interaction according to the present invention;

[0047] Figure 2 is a system structure diagram of a system for data sharing for multi-agent interaction according to the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0048] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0049] Embodiment: As Figure 1 - Figure 2 shown, the present invention provides a technical solution,

[0050] As Figure 1 shown in the schematic diagram of the steps of a method for data sharing for multi-agent interaction, the present invention provides a method for data sharing for multi-agent interaction, including the following steps:

[0051] Step S100: Annotate production command instructions, train a large language model to identify task types; generate a standardized task template through prompt engineering, and disassemble production command instructions into a sequence of subtasks according to the task type;

[0052] Specifically, collect production command instructions, perform denoising and standardization, and divide them into a training set, a validation set, and a test set according to a ratio; define task type labels, including data query type, process execution type, solution generation type, and risk assessment type, and use the BIO annotation method to mark entities in the instructions, including: equipment entities, time entities, and operation actions; use LabelStudio to annotate production command instructions, use DeepSeek as the basic model of the large language model, and use the annotated production command instructions as input; the training objective is to output the task type to which the instruction belongs using the cross-entropy loss function; set training parameters, evaluate and iterate the large language model to identify the task type of newly input production command instructions.

[0053] Furthermore, design a standardized task template structure in the template library. Each template includes: a main task description, a subtask sequence, parameter placeholders, and execution constraints. Among them, the main task description is specifically the business objective, the subtask sequence is a series of subtasks arranged in the order of business logic, the parameter placeholders are dynamic parameters extracted based on instruction entities, and the execution constraints are domain rule limitations;

[0054] Based on the task type, retrieve the corresponding template from the template library, and combine with the keywords in the instruction to select the detailed scenario template; fill the entities in the instruction into the parameter placeholders of the template; arrange the subtasks in the business logic order preset by the template; for subtasks that can be processed in parallel, mark them as parallel execution nodes; call the execution constraints to verify the compliance of the subtask sequence.

[0055] In a specific embodiment, 3000 production command instructions of a certain regional power grid in Q2 of 2024 are collected, including dispatching instructions, maintenance work orders, fault handling notifications, etc. After removing invalid instructions, 2750 valid instructions are retained; the dataset is divided as follows: training set: 1925 (70%), validation set: 413 (15%), test set: 412 (15%).

[0056] The BIO annotation example is as follows: Instruction: "Conduct on-off test on the #3 switch of the 10kV Guangming Line on July 10, 2024", and the following results are obtained: Time entity: July 10, 2024 → B-Time, I-Time, I-Time, I-Time; Equipment entity: #3 switch of the 10kV Guangming Line → B-Device, I-Device, I-Device, I-Device, I-Device; Operation action: on-off test → B-Action, I-Action, I-Action. Using LabelStudio for annotation, the annotation consistency is verified by the Fleiss' kappa coefficient to be 0.91, showing a high degree of consistency.

[0057] The base model of the large language model is DeepSeek-R1-13B, and the training configuration is as follows: Training duration: 48 hours (GPU cluster: 8×A100); Learning rate: 1.5e-5, Batch size: 32, Number of training epochs: 12; Loss function: Cross-entropy loss, Optimizer: AdamW.

[0058] Through the validation set, it is found that the "solution generation class" has errors due to the high complexity of the instructions. By increasing the long text segmentation processing (truncated to 2048 tokens), the F1 value is increased to 91.7%.

[0059] Input instruction: "Conduct an annual preventive test on the #7 switch of the 10kV Zhenxing Line at 14:00 on September 12, 2024. Power outage is required 30 minutes in advance." The large language model outputs "Process execution type" (confidence level 98.2%), matching the "Process execution type - Equipment maintenance" template (similarity 95.6%). Fill in the parameters: Equipment name: #7 switch of the 10kV Zhenxing Line; Maintenance type: Annual preventive test; Scheduled time: 14:00 on September 12, 2024. The generated subtask sequence is as follows: Safety briefing → Power outage and voltage verification → Defect handling → Re-energization acceptance. Parallel node marking: None. Conduct equipment coordinate verification: Query through the GIS interface and it exists (time-consuming 200ms); Conduct time conflict check: The scheduled time is 14:00, which is a non-peak period, and it passes the verification.

[0060] Step S200: Collect power transmission and distribution production data, construct a knowledge relationship graph through a graph database, and convert unstructured data into vector storage; Establish a unified data interface to support agents to retrieve graph data in real time through the API and construct a data sharing center;

[0061] Specifically, collect power transmission and distribution production data, define event entities and spatial entities, combine equipment entities and operation actions, and construct the trigger relationship between equipment and events, the location relationship between equipment and space, and the process relationship between events and operation actions; Construct an equipment layer, an event layer, a rule layer, and a spatial layer in the knowledge relationship graph. The equipment layer is constructed according to the hierarchical levels of substation, voltage level, equipment, and components from high to low, and records the full life cycle information of the equipment. The event layer is used to mark the event trigger conditions and influence ranges. The rule layer implants industry rules and defines the equipment maintenance cycle and fault handling process. The spatial layer integrates geographical coordinates and administrative regions;

[0062] Based on the power transmission and distribution production data, convert structured data into graph nodes and convert the extracted relationships into graph edges; Remove non-business-related content from unstructured data, unify terms using a domain dictionary, and split the text in unstructured data into independent blocks according to semantic relevance; Use a pre-trained language model in the power industry to encode the text blocks, generate vectors, and store them in a vector database.

[0063] In a specific embodiment, the collected structured data includes: Equipment inventory: full life-cycle data of 500 substations, 100,000 poles, and 200,000 distribution network devices (including transformers, switches, etc.); Operation data: monitoring data such as real-time load, oil temperature, and voltage of 1,000 transmission lines (sampling frequency: 1 time / minute); Event data: 100,000 fault records (such as tripping, overload) and 50,000 maintenance work orders from January 2023 to June 2024. Unstructured data includes: Maintenance reports: 20,000 PDF / Word documents (such as main transformer maintenance records, line inspection reports); Dispatching recordings: 500 hours of voice data (including fault handling instructions, load adjustment notices); Industry specifications: PDF clauses such as "Southern Power Grid Equipment Maintenance Regulations" and "Distribution Network Fault Handling Standards".

[0064] Entity types include: equipment entities, event entities, spatial entities, and rule entities; Relationship types include: Trigger relationship: equipment failure → trigger → protection action (e.g., "#1 line tripping" triggers "quick-break protection action"); Location relationship: equipment → installed in → spatial area (e.g., "10kV switch station" is located in "No. 1 distribution area of Futian District"); Process relationship: fault event → subsequent → handling steps (e.g., "fault location" subsequent to "resource scheduling").

[0065] In the equipment layer, the hierarchical structure: substation (such as "Shenzhen Substation") → voltage level (110kV) → equipment (main transformer) → components (windings, bushings); Stored information: equipment model, commissioning time, previous maintenance records, a total of more than 500,000 nodes and more than 1,000,000 edges are generated.

[0066] In the event layer, the marked content: event type (fault / maintenance), trigger condition (e.g., "oil temperature > 95°C"), influence range (number of power outage users, affected lines); Association relationship: each event node is associated with 1-5 equipment nodes, a total of more than 150,000 nodes and more than 300,000 edges are generated.

[0067] In the rule layer, implanted rules: 200 industry specification clauses (e.g., "10kV line inspection cycle ≤ 7 days"), each rule is associated with equipment type or event type; Relationship definition: rule → constraint → equipment / event (e.g., "main transformer maintenance cycle" constrains the "main transformer" equipment node), generating more than 2,000 edges.

[0068] In the spatial layer, data fusion: GIS coordinates (such as longitude 114.05°, latitude 22.54°) are associated with administrative divisions (Nanshan District, Shenzhen); Application scenario: support path planning of "equipment → spatial location → repair team", generating more than 80,000 spatial nodes and more than 120,000 edges.

[0069] In the following query scenario: "Find the 10kV line faults that occurred in Shenzhen in 2024 and caused power outages for more than 100 households, and their associated main transformer equipment", the traditional SQL query took 1200ms, while the graph query took 180ms, with an efficiency improvement of 85%.

[0070] In the vectorized storage of unstructured data, the encoding model is the BERT-base model fine-tuned for the power domain. The input example is: "#3 main transformer oil chromatogram detection found that the acetylene content exceeded the standard, it is recommended to arrange a cover lifting inspection", and the output vector is: [-0.12, 0.34,..., 0.05] (a 768-dimensional floating-point array). Deploy a Milvus cluster to store more than 1 million vectors, support cosine similarity retrieval, and the average response time < 50ms.

[0071] The API types used include: graph query interface: GET / graph / device / {device_id} / events, which returns a list of fault events associated with the device; vector retrieval interface: POST / vector / search, which receives a text query and returns the similar document IDs; real-time data interface: GET / realtime / data / {device_id}, which returns the real-time operating parameters of the device.

[0072] The storage scale of the data sharing center is as follows: graph database: Neo4j cluster stores more than 1 million nodes and more than 2 million edges; vector database: Milvus stores more than 1.5 million vectors; relational database: DM database stores structured operating data (about 500GB).

[0073] Step S300: Divide the agent types according to the power transmission and distribution business scenarios, and determine the functional boundaries of each agent; in the data sharing center, use the multi-agent simulation environment to test the collaboration efficiency of subtasks, and optimize the execution order of subtask sequences; dynamically allocate subtasks according to the agent load and skill matching degree;

[0074] Specifically, the power transmission and distribution business scenarios include equipment management, operation monitoring, dispatching and command, emergency repair, and material management. For each power distribution business scenario, determine the corresponding agent type; define the functional scope of each agent, check the functions of each agent to ensure that there is no functional overlap between agents. When functional overlap occurs, readjust the functional boundaries; based on the association and dependency relationships between various links in the power transmission and distribution business process, determine the collaboration requirements between agents.

[0075] Further, create a virtual scenario based on the power transmission and distribution business process, including an equipment network, business rules, and a resource pool; deploy agents consistent with the production environment, map their data interfaces and functional logics, and configure a load threshold for each agent; use discrete event simulation technology to drive agent interactions by time slices for monitoring and debugging; locate typical problems, including serial execution caused by strong dependencies between subtasks, multiple agents simultaneously requesting the same resource, and data version conflicts in the data transmitted between agents.

[0076] Identify subtasks with no dependencies and adjust them to be executed in parallel; assign priorities to subtasks, and high-priority tasks can preempt low-priority resources; encode the execution order of subtasks into chromosomes, calculate fitness by integrating the total task execution time, resource occupancy, and compliance, iteratively generate the optimal sequence, and dynamically allocate tasks to idle agent instances; define arbitration rules in case of resource competition, and when an agent fails, switch to a standby agent instance or trigger a manual intervention process.

[0077] Further, obtain the real-time load data of agents, and use the cosine similarity algorithm to calculate the matching score between subtask requirements and agent skills. The formula is as follows:

[0078] ;

[0079] where MD is the matching degree, is the demand intensity of subtask for skill i, is the mastery degree of agent for skill i, is the skill weight;

[0080] Obtain subtask characteristics and agent states. The subtask characteristics include task type, priority, skill requirements, and data requirements. The agent states include real-time load data and skill portraits; construct a subtask set according to the subtask characteristics of all subtasks, construct an agent set according to the agent states of all agents, and construct a mixed-integer programming model with the goal of maximizing skill matching degree and load balancing. The formula is as follows:

[0081]

[0082] where A is the agent set, T is the subtask set, is a 0-1 variable indicating whether agent a processes subtask t, is the skill matching degree between agent a and subtask t, is the load of agent a, is the load threshold of agent a, MMT is the minimum matching degree threshold, and s.t. is used to introduce the constraint conditions that the objective function must satisfy;

[0083] The subtask enters the assignment queue for compliance verification; filters out unmatched agents according to the mandatory constraints, generates a list of candidate agents, sorted in descending order of skill matching degree. When the matching degrees are the same, it is sorted in ascending order of load rate. When the load rates are the same, it is sorted in descending order of historical task success rate; pushes the subtask to the target agent through the API, along with the task details. After receiving the task, the agent updates the load status in real time and synchronizes it to the data sharing center.

[0084] In a specific embodiment, the device network: replicates the distribution network structure of a certain area, including: substations: 5 (220kV / 110kV / 10kV); transmission lines: 20 (110kV), distribution lines: 100 (10kV); device nodes: 500 (transformers, switches, poles). Business rules: "South Grid Fault Disposal Process": fault location → impact analysis → resource scheduling → work order generation → emergency repair execution; resource constraints: each emergency repair team only has the qualification to handle a single voltage level (such as 10kV or 110kV). Resource pool: emergency repair teams: 10 (5 for 10kV, 5 for 110kV); material warehouses: 3, storing 20 types of materials such as insulators and circuit breakers.

[0085] The time slice is 100ms / step, simulating 24-hour continuous operation; the initial task sequence is: fault location, impact analysis, resource scheduling, work order generation, and emergency repair execution. Monitoring indicators are: total task duration, agent idle rate, number of resource conflicts; typical problems are: serial bottleneck: "resource scheduling" needs to wait for "impact analysis" to complete, with a time-consuming ratio of 30%; resource competition: in the multi-fault scenario, the load of the "data query agent" reaches 100%, resulting in request timeouts.

[0086] The skills required for "10kV line trip disposal" are as follows: fault location (demand intensity 0.9), 10kV equipment disposal (0.8), GIS operation (0.7); the skill portraits of the agents are as follows: Agent A: 10kV disposal (0.9), fault location (0.8), GIS (0.6); Agent B: 110kV disposal (0.9), fault location (0.7), GIS (0.8);

[0087] Perform the matching degree calculation. , due to the mismatch of 110kV skills, the matching degree is relatively low. ;

[0088] In the mixed-integer programming model, the input parameters include: Agent set A: 10 agents (including 2 spare instances); Sub-task set T: 50 sub-tasks (including 10 high-priority fault tasks); Load threshold: CPU utilization > 80% is considered overloaded; The solution result (optimization goal: matching degree ≥ 0.8, load balance degree ≤ 20%) is: All high-priority tasks are processed by agents with a matching degree ≥ 0.8; The load difference among agents is reduced from 35% to 18%, meeting the balance requirement.

[0089] Step S400: The agent accesses the knowledge relationship graph through a unified data interface, obtains associated data, and uses a message queue to achieve real-time push of data changes; The agent calls the external knowledge base according to the task requirements, optimizes the decision-making of the large language model through prompt engineering, and uses the tool library components to execute specific operations. The agent executes the operations according to the sub-task sequence.

[0090] Specifically, the unified data interface adopts the RESTful API specification, realizes high throughput based on the HTTP / 2 protocol, and supports JSON format requests or responses; It is docked with the authentication system, and the identity of the agent is verified through the API Key, following the principle of least privilege;

[0091] The agent actively initiates a query according to the task requirements. The agent subscribes to specific types of data changes, and the interface automatically pushes updates; The nodes and edges returned by the knowledge relationship graph are mapped to an object model recognizable by the agent; The message queue uses Apache Kafka.

[0092] Furthermore, the external knowledge base includes an industry specification library, a historical case library, and a real-time data knowledge base. The agent extracts key retrieval elements according to the task type and sub-tasks; Designs a prompt engineering template, inserts several historical successful cases in the prompt, and guides the large language model to generate a response that conforms to historical experience; According to the sub-task requirements, filters the tool library components, checks the integrity of the tool input parameters, and triggers the agent to ask for more information when missing; When receiving a higher-priority task, pauses the current sub-task sequence and gives priority to executing the higher-priority task; When a sub-task execution fails, triggers a rollback mechanism and re-plans the sub-task sequence.

[0093] In a specific embodiment, the template example is as follows:

[0094] [Task type]: Emergency repair;

[0095] [Current fault]: The #8 pole of the 10kV Chaoyang line tripped and did not reclose successfully;

[0096] [Historical case]: Case 1: On X month X day, 2023, the disposal steps for the same type of fault: 1. Fault location → 2. Isolate the fault point → 3. Transfer the load;

[0097] Case 2: On XX / XX / 2024, the local emergency repair team is called first (distance < 5 km);

[0098] [Output requirements]: Generate a 5-step disposal process and cite the terms in the CSG regulations.

[0099] Call the tool library components and execute the tasks. When a first-level fault task is received during the execution of a low-priority task (equipment inspection), the preemption takes less than 1 second; the suspended inspection task releases the GIS tool occupation, and the release success rate is 100%. If the work order generation fails (network interruption), a rollback is triggered to revoke the dispatched emergency repair team; after 3 consecutive retry failures, the manual intervention process is automatically triggered to notify the dispatcher for manual handling.

[0100] As Figure 2 As shown in the system structure diagram of a data sharing system for realizing multi-agent interaction, a data sharing system for realizing multi-agent interaction includes:

[0101] Task decomposition module: including: task type recognition unit and subtask sequence generation unit; among them, the task type recognition unit annotates the production command instructions, trains the large language model, and recognizes the task type; the subtask sequence generation unit generates a standardized task template through prompt engineering, and decomposes the production command instructions into subtask sequences in combination with the task type;

[0102] Knowledge graph construction module: including: knowledge relationship graph construction unit, unstructured data vectorization unit, and data sharing center establishment unit; among them, the knowledge relationship graph construction unit collects power transmission and distribution production data, constructs a knowledge relationship graph through a graph database, and the unstructured data vectorization unit converts unstructured data into vectors for storage; the data sharing center establishment unit establishes a unified data interface to support agents to retrieve graph data in real time through the API and construct a data sharing center;

[0103] Agent classification and collaborative optimization module: including: agent type division unit, subtask sequence execution order optimization unit, and skill matching degree dynamic task allocation unit; among them, the agent type division unit divides the agent types according to the power transmission and distribution business scenarios and determines the functional boundaries of each agent; the subtask sequence execution order optimization unit tests the collaborative efficiency of subtasks in the data sharing center using a multi-agent simulation environment and optimizes the execution order of subtask sequences; the skill matching degree dynamic task allocation unit dynamically allocates subtasks according to the agent load and skill matching degree;

[0104] Agent Interaction and Task Execution Module: It includes: a real-time data push unit, a prompt engineering optimization decision-making unit, and a subtask execution unit; among them, in the real-time data push unit, the agent accesses the knowledge relationship graph through a unified data interface, obtains associated data, and uses a message queue to achieve real-time push of data changes; in the prompt engineering optimization decision-making unit, the agent calls an external knowledge base according to the task requirements, optimizes the decision-making of the large language model through prompt engineering, and the subtask execution unit uses the tool library component to perform specific operations, and the agent executes operations according to the subtask sequence.

[0105] For those skilled in the art, it is obvious that the present invention is not limited to the details of the above exemplary embodiments, and the present invention can be implemented in other specific forms without departing from the spirit or basic characteristics of the present invention. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-limiting. The scope of the present invention is defined by the appended claims rather than the above description. Therefore, all changes falling within the meaning and scope of the equivalent elements of the claims are intended to be embraced within the present invention. Any reference signs in the claims should not be construed as limiting the claims concerned.

Claims

1. A data sharing method for realizing multi-agent interaction, characterized in that, It includes the following steps: Annotate the production command instructions, train the large language model to identify the task type; generate a standardized task template through prompt engineering, and disassemble the production command instructions into a sub-task sequence according to the task type; Collect power transmission and distribution production data, construct a knowledge relationship graph through a graph database, and convert unstructured data into vector storage; establish a unified data interface to support the intelligent agent to retrieve graph data in real time through the API and build a data sharing center; Divide the intelligent agent types according to the power transmission and distribution business scenarios, and determine the functional boundaries of each intelligent agent; in the data sharing center, use the multi-intelligent agent simulation environment to test the collaboration efficiency of sub-tasks and optimize the execution order of the sub-task sequence; dynamically allocate sub-tasks according to the intelligent agent load and skill matching degree; The intelligent agent accesses the knowledge relationship graph through the unified data interface to obtain associated data, and uses a message queue to realize real-time push of data changes; the intelligent agent calls the external knowledge base according to the task requirements, optimizes the decision-making of the large language model through prompt engineering, uses the tool library component to execute specific operations, and the intelligent agent executes the operations according to the sub-task sequence.

2. The data sharing method for realizing multi-agent interaction according to claim 1, wherein The annotation of the production command instructions, training of the large language model, and identification of the task type include: Collect production command instructions, perform denoising processing and standardization, and divide them into training set, validation set and test set according to a certain proportion; define task type labels, including data query type, process execution type, solution generation type and risk assessment type, and use the BIO annotation method to mark the entities in the instructions, including: equipment entity, time entity and operation action; use LabelStudio to annotate the production command instructions, use DeepSeek as the basic model of the large language model, and use the annotated production command instructions as the input; the training objective is to output the task type to which the instruction belongs using the cross-entropy loss function; set training parameters, evaluate and iterate the large language model to identify the task type of newly input production command instructions.

3. The data sharing method for realizing multi-agent interaction according to claim 1, characterized in that The generation of a standardized task template through prompt engineering and the disassembly of the production command instructions into a sub-task sequence according to the task type include: Design the structure of the standardized task template in the template library, and each template includes: main task description, sub-task sequence, parameter placeholder and execution constraint, where the main task description is specifically the business objective, the sub-task sequence is the sub-tasks arranged in the business logic order, the parameter placeholder is the dynamic parameter extracted based on the instruction entity, and the execution constraint is the domain rule restriction; Based on the task type, retrieve the corresponding template from the template library, select the detailed scenario template in combination with the keywords in the instruction; fill the entities in the instruction into the parameter placeholders of the template; arrange the sub-tasks in the business logic order preset by the template; mark the sub-tasks that can be processed in parallel as parallel execution nodes; call the execution constraint to verify the compliance of the sub-task sequence.

4. A data sharing method for realizing multi-agent interaction according to claim 1, characterized in that The collection of power transmission and distribution production data, construction of a knowledge relationship graph through a graph database, and conversion of unstructured data into vector storage include: Collect power transmission and distribution production data, define event entities and spatial entities, combine equipment entities and operation actions, and construct the triggering relationship between equipment and events, the location relationship between equipment and space, and the process relationship between events and operation actions; construct an equipment layer, an event layer, a rule layer, and a space layer in the knowledge relationship graph. The equipment layer is constructed according to the hierarchical levels of substation, voltage level, equipment, and components from high to low, and records the full life cycle information of the equipment. The event layer is used to mark the event triggering conditions and influence ranges. The rule layer implants industry rules and defines the equipment maintenance cycle and fault handling process. The space layer integrates geographical coordinates and administrative divisions. Based on the power transmission and distribution production data, convert structured data into graph nodes and convert the extracted relationships into graph edges; remove non-business-related content from unstructured data, unify terms using a domain dictionary, and split the text in unstructured data into independent blocks according to semantic relevance; use a pre-trained language model for the power industry to encode the text blocks, generate vectors, and store them in a vector database.

5. A data sharing method for realizing multi-agent interaction according to claim 1, characterized in that Divide the intelligent agent types according to the power transmission and distribution business scenarios, and determine the functional boundaries of each intelligent agent, including: The power transmission and distribution business scenarios include equipment management, operation monitoring, dispatching and command, emergency repair, and material management. For each power distribution business scenario, determine the corresponding intelligent agent type; define the functional scope of each intelligent agent, check the functions of each intelligent agent to ensure that there is no functional overlap between intelligent agents. When there is a functional overlap, readjust the functional boundaries; based on the association and dependency relationships between various links in the power transmission and distribution business process, determine the collaboration requirements between intelligent agents.

6. A data sharing method for realizing multi-agent interaction according to claim 1, characterized in that In the data sharing center, use the multi-intelligent agent simulation environment to test the collaboration efficiency of subtasks and optimize the execution order of subtask sequences, including: Create a virtual scenario based on the power transmission and distribution business process, including an equipment network, business rules, and a resource pool; deploy intelligent agents consistent with the production environment, map their data interfaces and functional logics, and configure a load threshold for each intelligent agent; use discrete event simulation technology to drive intelligent agent interactions according to time slices for monitoring and debugging; locate typical problems, including serial execution caused by strong dependencies between subtasks, multiple intelligent agents simultaneously requesting the same resource, and data version conflicts in the data transmitted between intelligent agents. Identify subtasks with no dependencies and adjust them to be executed in parallel; assign priorities to subtasks, and high-priority tasks can preempt low-priority resources; encode the subtask execution order as a chromosome, calculate the fitness by integrating the total task execution time, resource occupancy, and compliance, iteratively generate the optimal sequence, and dynamically allocate tasks to idle intelligent agent instances; define arbitration rules during resource competition. When an intelligent agent fails, switch to a standby intelligent agent instance or trigger an artificial intervention process.

7. A data sharing method for realizing multi-agent interaction according to claim 1, characterized in that, Dynamically allocate subtasks according to the load and skill matching degree of intelligent agents, including: Obtain the real-time load data of intelligent agents, and use the cosine similarity algorithm to calculate the matching degree score between the subtask requirements and the skills of intelligent agents. The formula is as follows: ; where MD is the matching degree, is the demand intensity of subtask for skill i, is the mastery level of the agent for skill i, is the skill weight; Obtain subtask features and agent status. The subtask features include task type, priority, skill requirements, and data requirements. The agent status includes real-time load data and skill profiles. Construct a subtask set based on the subtask features of all subtasks, and construct an agent set based on the agent status of all agents. With the goal of maximizing skill matching and load balancing, construct a mixed-integer programming model, and the formula is as follows: ; where \(A\) is the set of agents, \(T\) is the set of subtasks, is a 0-1 variable indicating whether agent \(a\) processes subtask \(t\), is the skill matching degree between agent \(a\) and subtask \(t\), is the load of agent \(a\), is the load threshold of agent \(a\), \(MMT\) is the minimum matching degree threshold, and \(s.t.\) is used to introduce the constraints that the objective function must satisfy; The subtasks enter the allocation queue for compliance verification. Filter out unmatched agents according to the mandatory constraint conditions to generate a candidate agent list, which is sorted in descending order of skill matching degree. When the matching degrees are the same, it is sorted in ascending order of load rate. When the load rates are the same, it is sorted in descending order of historical task success rate. Push the subtasks to the target agent through the API, along with task details. After receiving the task, the agent updates the load status in real time and synchronizes it to the data sharing center.

8. A data sharing method for realizing multi-agent interaction according to claim 1, characterized in that, The agent accesses the knowledge relationship graph through a unified data interface to obtain associated data, and uses a message queue to achieve real-time push of data changes, including: The unified data interface adopts the RESTful API specification, realizes high throughput based on the HTTP / 2 protocol, and supports JSON format requests or responses. Connect to the authentication system, verify the agent's identity through the API Key, and follow the principle of least privilege. The agent actively initiates a query according to the task requirements. The agent subscribes to specific types of data changes, and the interface automatically pushes updates. Map the nodes and edges returned by the knowledge relationship graph to an object model recognizable by the agent. The message queue uses Apache Kafka.

9. A data sharing method for realizing multi-agent interaction according to claim 1, characterized in that, The agent calls the external knowledge base according to the task requirements, optimizes the decision-making of the large language model through prompt engineering, and uses the tool library components to perform specific operations. The agent executes the operations according to the subtask sequence, including: The external knowledge base includes an industry specification library, a historical case library, and a real-time data knowledge base. The agent extracts key retrieval elements according to the task type and subtasks. Design a prompt engineering template, insert several historical successful cases into the prompt, and guide the large language model to generate responses that conform to historical experience. According to the subtask requirements, screen the tool library components, check the integrity of the tool input parameters, and trigger the agent to ask questions when they are missing. When receiving a task with a higher priority, pause the current subtask sequence and give priority to executing the task with a higher priority. When a subtask fails to execute, trigger a rollback mechanism and re-plan the subtask sequence.

10. A data sharing system for realizing multi-agent interaction, using a method for realizing multi-agent interaction data sharing according to any one of claims 1-9, characterized in that, Including: Task decomposition module: including: task type recognition unit and subtask sequence generation unit; among them, the task type recognition unit annotates the production command instructions, trains the large language model, and recognizes the task type; the subtask sequence generation unit generates a standardized task template through prompt engineering, and decomposes the production command instructions into subtask sequences in combination with the task type; Knowledge Graph Construction Module: It includes: Knowledge Relationship Graph Construction Unit, Unstructured Data Vectorization Unit, and Data Sharing Center Establishment Unit; among them, the Knowledge Relationship Graph Construction Unit collects power transmission and distribution production data and constructs a knowledge relationship graph through a graph database. The Unstructured Data Vectorization Unit converts unstructured data into vectors for storage; the Data Sharing Center Establishment Unit establishes a unified data interface to support agents to retrieve graph data in real time through the API and constructs a data sharing center; Agent Classification and Cooperative Optimization Module: It includes: Agent Type Division Unit, Sub-task Sequence Execution Order Optimization Unit, and Skill Matching Degree Dynamic Task Allocation Unit; among them, the Agent Type Division Unit divides agent types according to the power transmission and distribution business scenarios to determine the functional boundaries of each agent; the Sub-task Sequence Execution Order Optimization Unit uses a multi-agent simulation environment in the data sharing center to test the cooperation efficiency of sub-tasks and optimize the execution order of sub-task sequences; the Skill Matching Degree Dynamic Task Allocation Unit dynamically allocates sub-tasks according to agent load and skill matching degree; Agent Interaction and Task Execution Module: It includes: Data Real-time Push Unit, Prompt Engineering Optimization Decision-making Unit, and Sub-task Execution Unit; among them, in the Data Real-time Push Unit, the agent accesses the knowledge relationship graph through a unified data interface to obtain associated data and uses a message queue to achieve real-time push of data changes; in the Prompt Engineering Optimization Decision-making Unit, the agent calls an external knowledge base according to the task requirements and optimizes the decision-making of the large language model through prompt engineering. The Sub-task Execution Unit uses a tool library component to perform specific operations, and the agent executes the operations according to the sub-task sequence.

Citation Information

Patent Citations

  • Multi-agent cooperation method and system

    CN118917632A

  • Production traceability and transaction collaboration method and system of MES (Manufacturing Execution System)

    CN119067689A