An agent-based power grid dynamic dispatch optimization method and system

By freezing the collaborative state variables of edge agents and shutting down communication interfaces, combined with error time series model analysis, the interference problem of edge agents when executing upper-level scheduling instructions is solved, thereby improving the accuracy and stability of power grid scheduling.

CN121172890BActive Publication Date: 2026-03-24ZHEJIANG SIJI TECH SERVICE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-21
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

When an edge agent executes a superior scheduling instruction, it simultaneously receives coordination requests and state updates from other edge agents, which interferes with the execution of the scheduling instruction. Furthermore, there is a lack of effective means to analyze and adjust the execution error, making it difficult to guarantee scheduling accuracy.

Method used

By freezing the collaborative state variables and closing the first communication interface between edge agents in the preset mode, the independent and reliable execution of the upper-level scheduling instructions is ensured. At the same time, an error time series model is constructed to analyze the execution error, extract the central location data, maximum amplitude data and deviation data of the execution error sequence, determine the type of execution error, and adjust the decision parameters according to the preset decision set.

Benefits of technology

It enables independent and reliable execution of dispatching instructions, improves the accuracy and operational stability of power grid dispatching, and enhances the accuracy and stability of the dispatching process through closed-loop optimization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121172890B_ABST
    Figure CN121172890B_ABST
Patent Text Reader

Abstract

The application provides an agent-based power grid dynamic scheduling optimization method and system, relating to the technical field of power grid scheduling, comprising: obtaining a scheduling instruction of a superior dispatching center and extracting a level identifier of the scheduling instruction; determining a current regulation mode, if it is a preset mode, freezing the collaborative state variable of the current edge agent, and closing the first communication interface of the current edge agent and other edge agents; obtaining feedback data generated by the current edge agent after a preset stable time, determining an execution error with target data in the scheduling instruction, constructing an error time sequence model according to the execution error and determining whether it is an execution error, if yes, obtaining a first reference decision from a preset decision set, and adjusting the first decision parameter of the current edge agent. The application can avoid the interference of other edge agents on the execution of the scheduling instruction by the edge agent, accurately determine the abnormal execution error type, adjust the decision parameter, and improve the scheduling accuracy and stability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of power grid dispatching technology, and in particular to a power grid dynamic dispatching optimization method and system based on intelligent agents. Background Technology

[0002] With the significant increase in installed capacity of new energy sources and the widespread integration of distributed power sources, the traditional grid dispatching architecture, primarily based on centralized radial control, is gradually becoming insufficient to meet the power network's demands for response speed, resource coordination, and local autonomy. In recent years, the application of intelligent agent technology in the power sector has gradually emerged, utilizing methods such as reinforcement learning and multi-agent collaboration to conduct distributed control. At the county-level distribution network level, the frequent interplay between multi-source heterogeneous resources and load behavior demands that dispatching methods possess higher flexibility and robustness to adapt to the uncertainties brought about by local disturbances and regional coupling.

[0003] The power grid dispatch center issues unified dispatch instructions to each distribution node, and each node executes corresponding load adjustments and power allocations according to the instructions. Some power grid dispatch schemes deploy edge agents with autonomous decision-making capabilities at the edge of the distribution network. While receiving dispatch instructions from higher-level agents, these edge agents share status information and coordinate dispatch with neighboring edge agents. Edge agents exchange information such as load status and resource availability through communication interfaces, completing power balance and load optimization within their local scope. Even while executing dispatch instructions from higher-level agents, they still receive coordination requests and status updates from other edge agents.

[0004] In practical applications, when the upper-level dispatch center needs to perform mandatory dispatch on the power grid, the edge agent simultaneously receives dispatch instructions from the upper-level dispatch center and coordination requests from other edge agents, which causes the execution of the dispatch instructions to be interfered with. Summary of the Invention

[0005] This application provides a power grid dynamic scheduling optimization method and system based on intelligent agents, which solves the problem in the prior art that when edge agents execute upper-level scheduling instructions, they simultaneously receive collaborative requests and status updates from other edge agents, which leads to interference in the execution of scheduling instructions and lacks effective means to analyze and adjust execution errors, making it difficult to guarantee scheduling accuracy.

[0006] The first aspect of this application provides a power grid dynamic scheduling optimization method based on intelligent agents, comprising: obtaining scheduling instructions from a superior scheduling center and extracting the level identifier of the scheduling instructions;

[0007] The current control mode is determined based on the level identifier. If the current control mode is a preset mode, the collaborative state variables of the current edge agent are frozen, and the first communication interface between the current edge agent and other edge agents is closed.

[0008] Obtain feedback data generated by the current edge agent after a preset stabilization time, determine the execution error based on the feedback data and the target data in the scheduling instruction, and construct an error time series model based on the execution error;

[0009] The execution error is determined based on the error timing model. If it is an abnormal execution error, a first reference decision is obtained from the preset decision set, and the first decision parameters of the current edge agent are adjusted according to the first reference decision.

[0010] Optionally, in one possible implementation of the first aspect, determining the current control mode based on the level identifier includes:

[0011] If the level identifier is a mandatory level identifier, the current control mode is determined to be a unified control mode;

[0012] If the level identifier is a guidance level identifier, the current control mode is determined to be a coordinated control mode;

[0013] The preset mode is the unified control mode;

[0014] When the current control mode is the collaborative control mode, the current edge agent and other edge agents perform collaborative scheduling by sharing the collaborative state variables. The current edge agent generates scheduling actions based on the state information of other edge agents and its own state information.

[0015] Optionally, in one possible implementation of the first aspect, the collaborative state variable is a state variable in the current edge agent used to send state information to other edge agents;

[0016] The frozen collaborative state variables of the current edge agent include:

[0017] The state variables used for information interaction with other edge agents in the current edge agent's state variables are identified as the collaborative state variables;

[0018] Set the access permission of the collaborative state variable to read-only, prohibiting the current edge agent from writing to the collaborative state variable.

[0019] Optionally, in one possible implementation of the first aspect, freezing the collaborative state variables of the current edge agent further includes:

[0020] Before setting the access permission of the cooperative state variable to read-only, save the current value of the cooperative state variable as the first value;

[0021] After setting the access permission of the collaborative state variable to read-only, obtain the unfreeze command;

[0022] According to the unfreeze command, the access permission of the collaborative state variable is restored to write access permission, and the value of the collaborative state variable is restored according to the first value.

[0023] Optionally, in one possible implementation of the first aspect, closing the first communication interface between the current edge agent and other edge agents includes:

[0024] Stop sending first information to other edge agents through the first communication interface; the first information includes the current load status information, resource availability status information, and scheduling capability information of the edge agent.

[0025] Refuse to receive second information from other edge agents through the first communication interface; the second information includes a cooperative scheduling request, a power support request, and a status query request.

[0026] Return a rejection response to other edge agents that sent the second information; the rejection response contains a unified control mode identifier.

[0027] Optionally, in one possible implementation of the first aspect, before freezing the cooperative state variables of the current edge agent, the method further includes:

[0028] Establish a second communication interface between the upper-level scheduling center and the current edge agent;

[0029] The second communication interface is given a higher priority than the first communication interface. If the current edge agent receives both instructions transmitted through the second communication interface and information transmitted through the first communication interface at the same time, the instructions transmitted through the second communication interface are processed first.

[0030] Optionally, in one possible implementation of the first aspect, constructing the error timing model based on the execution error includes:

[0031] Obtain the execution error corresponding to the scheduling period of the preset number of windows, and arrange the execution errors corresponding to the scheduling period of the preset number of windows in chronological order to obtain the execution error sequence;

[0032] The execution error sequence is aggregated to obtain the aggregation result;

[0033] Extract the first feature data, the second feature data, and the third feature data from the aggregation result;

[0034] The error time series model is constructed based on the first feature data, the second feature data, and the third feature data.

[0035] Optionally, in one possible implementation of the first aspect, the first feature data is the central location data of each execution error in the execution error sequence;

[0036] The second feature data is the maximum magnitude data of the execution error in the execution error sequence;

[0037] The third feature data is the deviation of each execution error in the execution error sequence from the data at the central location.

[0038] Optionally, in one possible implementation of the first aspect, determining the execution error based on the error sequence model includes:

[0039] If the first feature data exceeds the first threshold, the execution error will be marked as the first candidate abnormal execution error;

[0040] If the first candidate abnormal execution error exists and the third feature data exceeds the third threshold, then the execution error is determined to be the first type of abnormal execution error.

[0041] If the first candidate abnormal execution error does not exist, and the second feature data exceeds the second threshold, then the execution error is marked as the second candidate abnormal execution error.

[0042] If the second candidate abnormal execution error exists and the third feature data is lower than the fourth threshold, then the execution error is determined to be the second type of abnormal execution error.

[0043] If neither the first candidate abnormal execution error nor the second candidate abnormal execution error exists, and the third feature data exceeds the fifth threshold, then the execution error is determined to be a third type of abnormal execution error.

[0044] Optionally, in one possible implementation of the first aspect, after determining that the execution error is a first type of abnormal execution error, a second type of abnormal execution error, or a third type of abnormal execution error, the method further includes:

[0045] Obtain the scheduling period in which the most recent abnormal execution error occurred among several scheduling periods that were previously compared with the current scheduling period, and determine the exception type corresponding to the scheduling period in which the most recent abnormal execution error occurred as the historical exception type;

[0046] If the type of abnormal execution error in the current scheduling cycle is the same as the type of historical abnormality, then the abnormal execution error will be marked as a steady-state abnormal execution error.

[0047] If the abnormal execution error type of the current scheduling period is different from the historical abnormal type, the abnormal execution error is marked as a transformation abnormal execution error, and the abnormal transformation direction is determined according to the historical abnormal type and the abnormal execution error type of the current scheduling period.

[0048] The steady-state abnormal execution error corresponds to the first adjustment strategy, and the transition abnormal execution error corresponds to the second adjustment strategy. The adjustment range of the first adjustment strategy is smaller than that of the second adjustment strategy.

[0049] Optionally, in one possible implementation of the first aspect, obtaining the first reference decision from a preset decision set includes:

[0050] Multiple candidate scheduling periods are determined in the preset decision set; the multiple candidate scheduling periods are scheduling periods in which the execution error after performing the scheduling action is lower than a preset reference threshold.

[0051] Obtain multiple candidate decisions, execution error values, and runtime environment parameters corresponding to multiple candidate scheduling cycles;

[0052] Calculate the similarity between the current operating environment parameters of the current edge agent and the operating environment parameters corresponding to multiple candidate scheduling cycles to obtain multiple environment similarities;

[0053] Based on the execution error values ​​corresponding to multiple candidate decisions and the environmental similarity, the candidate decision with the highest comprehensive score is selected as the first reference decision.

[0054] Optionally, in one possible implementation of the first aspect, adjusting the first decision parameters of the current edge agent based on the first reference decision includes:

[0055] Obtain the first decision parameter currently used by the edge agent;

[0056] A first parameter set is extracted from the first reference decision; the first parameter set includes parameters corresponding to the abnormal state data in the feedback data.

[0057] Based on the degree of abnormality of the abnormal status data in the feedback data, the priority of each parameter in the first parameter set is adjusted.

[0058] Based on the adjustment parameters and adjustment priorities corresponding to the abnormal execution errors, the parameters in the first parameter set are adjusted sequentially in descending order of adjustment priority to obtain the second parameter set.

[0059] Replace the parameters in the first decision parameters that have the same parameter identifier as the first parameter set with the second parameter set, while keeping the other parameters in the first decision parameters unchanged.

[0060] A second aspect of this application provides a power grid dynamic dispatch optimization system based on intelligent agents, comprising: an instruction acquisition module, used to acquire dispatch instructions from a higher-level dispatch center and extract the level identifier of the dispatch instructions;

[0061] The mode control module is used to determine the current control mode according to the level identifier. If the current control mode is a preset mode, the collaborative state variables of the current edge agent are frozen and the first communication interface between the current edge agent and other edge agents is closed.

[0062] The error analysis module is used to acquire feedback data generated by the current edge agent after a preset stabilization time, determine the execution error based on the feedback data and the target data in the scheduling instruction, and construct an error time series model based on the execution error.

[0063] The parameter adjustment module determines the execution error based on the error timing model. If it is an abnormal execution error, it obtains a first reference decision from the preset decision set and adjusts the first decision parameters of the current edge agent according to the first reference decision.

[0064] The beneficial effects of the agent-based power grid dynamic dispatch optimization method and system proposed in this application are as follows: Addressing the problems of interference with dispatch command execution and lack of error adjustment mechanisms, this application freezes the collaborative state variables and closes the first communication interface between edge agents in a preset mode. This prevents interference from collaborative requests from other edge agents on the execution of upper-level dispatch commands, ensuring independent and reliable command execution. Simultaneously, by constructing an error time-series model to analyze execution errors and extracting the concentrated location data, maximum amplitude data, and deviation data of the execution error sequence, it can not only determine the abnormal type of execution error but also obtain reference decisions based on a preset decision set to adjust decision parameters. This achieves closed-loop optimization of the dispatch process, improving the accuracy and operational stability of power grid dispatch. Attached Figure Description

[0065] Figure 1 This is a flowchart illustrating a power grid dynamic scheduling optimization method based on intelligent agents provided in an embodiment of this application;

[0066] Figure 2 This is an application environment diagram of an agent-based power grid dynamic scheduling optimization method provided in an embodiment of this application;

[0067] Figure 3 This is a schematic diagram of the structure of a power grid dynamic scheduling optimization system based on an intelligent agent, provided in an embodiment of this application;

[0068] Figure 4 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application;

[0069] Figure 5 This is a schematic diagram of the cooperative network topology of a power grid dynamic scheduling optimization method based on intelligent agents provided in an embodiment of this application. Detailed Implementation

[0070] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0071] The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein.

[0072] It should be understood that in the various embodiments of this application, the sequence number of each process does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0073] It should be understood that in this application, "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to such process, method, product or device.

[0074] It should be understood that in this application, "multiple" refers to two or more. "And / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "Contains A, B, and C", "Contains A, B, and C" means that all three A, B, and C are contained; "Contains A, B, or C" means that one of A, B, and C is contained; "Contains A, B, and / or C" means that any one, two, or three of A, B, and C are contained.

[0075] It should be understood that in this application, "B corresponding to A", "B corresponding to A", "A corresponds to B", or "B corresponds to A" means that B is associated with A, and B can be determined based on A. Determining B based on A does not mean determining B solely based on A; B can also be determined based on A and / or other information. Matching A and B is defined as a similarity between A and B that is greater than or equal to a preset threshold.

[0076] Depending on the context, "if" as used here can be interpreted as "when," "when," "in response to determination," or "in response to detection."

[0077] The technical solutions of this application will be described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.

[0078] like Figure 2 The diagram shown illustrates the application environment of the technical solution provided in this application, including: an upper-level dispatch center, edge intelligent agents (including A1, A2, A3, and A4), power grid node equipment, communication gateways, and monitoring terminals. The upper-level dispatch center is connected to each edge intelligent agent, communication gateway, and monitoring terminal through a communication network.

[0079] During power grid operation, the higher-level dispatch center issues dispatch instructions to each edge agent based on the overall operation requirements of the power grid. Each dispatch instruction carries a corresponding level identifier to indicate the execution mode. Edge agents are deployed at nodes or areas of the power grid, responsible for receiving and executing dispatch instructions from the higher-level dispatch center. They can also coordinate and assist with adjacent edge agents under the specified level identifier. Communication gateways connect horizontal communication between edge agents and vertical communication between edge agents and the higher-level dispatch center, supporting the management of communication interfaces with different priorities. Monitoring terminals display the operating status of each edge agent, dispatch execution status, and anomaly warning information.

[0080] Edge agents can be intelligent dispatch and control units deployed at the edge of the distribution network. They employ an embedded design, are equipped with high-performance processors and communication modules, and support local autonomous decision-making and collaborative dispatch functions. Edge agents have built-in status monitoring sensors that can collect information such as local load status, resource availability, and dispatch capabilities, and share operational data with other edge agents through collaborative state variables. Edge agents can operate independently; in collaborative control mode, multiple edge agents can form a collaborative dispatch network, achieving power balance and load optimization by sharing collaborative state variables.

[0081] See Figure 5In a certain regional power distribution network, four edge agents, labeled A1, A2, A3, and A4, are deployed, forming a collaborative scheduling network. Under normal circumstances, i.e., at the guidance level, A1 can perceive the load status and resource availability of A2 and A4, while A2 can perceive the operating status of A1 and A3, thus completing collaborative scheduling and power support among adjacent edge agents. When the upper-level dispatch center issues a command to enforce the level, each edge agent automatically switches to a unified control mode, freezes collaborative state variables, and closes its communication interfaces with others, focusing on executing the unified commands from the upper-level dispatch center.

[0082] The communication gateway is a communication device connecting multiple edge agents and the upper-level dispatch center. It is equipped with a multi-channel communication module, supporting the parallel operation of the first and second communication interfaces. The first communication interface is used for horizontal communication between edge agents, while the second communication interface is used for vertical communication between the upper-level dispatch center and the edge agents. The first communication interface can use the MQTT protocol to achieve lightweight asynchronous communication between edge agents, suitable for scenarios such as status information sharing, collaborative scheduling requests, and power support requests. The second communication interface can use the gRPC protocol to achieve low-latency communication between the upper-level dispatch center and the edge agents, ensuring the timeliness and reliability of scheduling commands. The communication gateway can automatically identify the priority of the communication interfaces, prioritizing the communication quality of the second communication interface in a unified control mode.

[0083] The communication gateway can aggregate operational data and feedback information from various edge agents, perform logical numbering and initialization for each edge agent, and provide functions such as remote parameter configuration, batch command issuance, and status query. It can automatically network multiple edge agents according to predetermined numbering rules by acquiring their location information and device identifiers. Decision parameters for each edge agent can be set individually, or operational parameters can be configured in batches. The communication gateway also supports priority management of scheduling commands, ensuring that commands with mandatory level identifiers are transmitted and executed with priority.

[0084] Upon receiving scheduling instructions from the superior scheduling center, the edge agent automatically adjusts its operating mode based on the level identifier in the instructions. In unified control mode, the edge agent freezes the collaborative state variables used for interaction with other edge agents, sets access permissions to read-only, and prohibits local agents from modifying the collaborative state variables, thereby avoiding interference from state changes of other edge agents during the execution of mandatory instructions. Simultaneously, the edge agent closes its first communication interface, stops sending load status information, resource availability status information, etc., to other edge agents, and refuses to receive collaborative scheduling requests or power support requests from other edge agents, returning a rejection response containing the unified control mode identifier to the requesting edge agents.

[0085] After a preset stabilization period following the execution of scheduling instructions, the edge agent generates feedback data, including the execution error between the actual execution result and the target data in the scheduling instructions. The edge agent uses a sliding window to collect execution errors from multiple consecutive scheduling cycles, constructing an error time series model. This model extracts features such as the central location data, maximum amplitude data, and deviation degree data of the execution error sequence to perform multi-level analysis and judgment of the execution errors. If abnormal execution errors are identified, the edge agent searches for reference decisions with good execution performance from a preset decision set, selects a decision scheme suitable for the current operating environment by calculating environmental similarity, and adjusts the edge agent's decision parameters accordingly based on the reference decisions, thereby improving the accuracy and stability of scheduling execution.

[0086] See Figure 1 This is a flowchart illustrating a power grid dynamic scheduling optimization method based on intelligent agents, provided in an embodiment of this application. Figure 1 The execution entity of the method shown can be a software and / or hardware device. The execution entity of this application can include, but is not limited to, at least one of the following: user equipment, network equipment, etc. User equipment can include, but is not limited to, computers, smartphones, personal digital assistants (PDAs), and the aforementioned electronic devices. Network equipment can include, but is not limited to, a single network server, a server group consisting of multiple network servers, or a cloud based on cloud computing consisting of a large number of computers or network servers. Cloud computing is a type of distributed computing, consisting of a super virtual computer composed of a group of loosely coupled computers. This embodiment does not limit this. Steps 100 to 400 are detailed below:

[0087] Step 100: Obtain the scheduling instructions from the superior scheduling center and extract the level identifier of the scheduling instructions.

[0088] In some embodiments, step 100 may be implemented in the following ways:

[0089] The edge agent establishes a communication connection with the upper-level scheduling center through a second communication interface. The second communication interface uses the gRPC protocol to complete low-latency communication between the upper-level scheduling center and the edge agent. The edge agent continuously listens for scheduling instructions from the upper-level scheduling center on the listening port of the second communication interface, and the listening period can be set from 100 milliseconds to 500 milliseconds.

[0090] When the higher-level dispatch center issues dispatch instructions to the edge agent based on the overall operation requirements of the power grid, the dispatch instructions are transmitted to the edge agent in the form of data packets through the second communication interface. The dispatch instruction data packet includes an instruction identifier, a level identifier, target data, an execution timestamp, and a checksum. Upon receiving the dispatch instruction data packet, the edge agent first performs checksum verification on the data packet to verify its integrity and validity.

[0091] It should be noted that traditional power grid dispatching systems typically use a uniform command format, which cannot differentiate between dispatching needs of varying urgency. This results in all dispatching commands being processed with the same priority, potentially delaying the execution of critical dispatching actions during emergencies. This application addresses this by using level identifiers in the dispatching command data packets, enabling differentiated processing based on the urgency and importance of the dispatching commands.

[0092] Understandably, the edge agent parses the level identifier from the scheduling instruction data packet. The level identifier is represented by an enumeration value, which can be a mandatory level identifier with an enumeration value of 1, or a guiding level identifier with an enumeration value of 2. The edge agent determines the execution mode of the scheduling instruction based on the enumeration value of the parsed level identifier, thus providing a basis for the control mode switching in step 200.

[0093] The edge agent stores the instruction identifier, level identifier, target data, and execution timestamp from the scheduling instruction data packet in a local scheduling instruction buffer. This local buffer uses a first-in-first-out (FIFO) queue structure, with a capacity of 100 to 500 scheduling instructions. The edge agent returns a scheduling instruction receipt acknowledgment response to the higher-level scheduling center. This acknowledgment response includes the edge agent identifier, instruction identifier, and receipt timestamp, ensuring that the higher-level scheduling center can promptly obtain the delivery status of the scheduling instructions.

[0094] In some embodiments, step 100, obtaining the scheduling instructions from the superior scheduling center and extracting the level identifier of the scheduling instructions, further includes:

[0095] The edge agent, while acquiring scheduling instruction data packets, records the received timestamp of the packets in UTC format with millisecond precision. The edge agent then compares the received timestamp with the execution timestamp in the scheduling instruction data packets to calculate the time deviation. It's easy to understand that the time deviation value can be used to determine whether a delay occurred during the transmission of the scheduling instruction data packets.

[0096] If the time deviation exceeds the preset delay threshold, the edge agent sends a delay anomaly alarm to the upper-level scheduling center. The delay anomaly alarm includes the edge agent identifier, instruction identifier, reception timestamp, execution timestamp, and time deviation value. The preset delay threshold is set to 500 milliseconds to 2000 milliseconds, for example, it can be set to 1000 milliseconds.

[0097] In other embodiments, the level identifier for extracting the scheduling instruction in step 100 includes:

[0098] The edge agent performs a validity check on the level identifier in the scheduling instruction data packet, and determines whether the enumerated value of the level identifier belongs to the preset level identifier set. The preset level identifier set includes the enumerated value 1 of the mandatory level identifier and the enumerated value 2 of the guidance level identifier.

[0099] If the enumerated value of the level identifier does not belong to the preset level identifier set, the edge agent marks the scheduling instruction data packet as an invalid scheduling instruction and returns a scheduling instruction rejection response to the upper-level scheduling center. The scheduling instruction rejection response includes the edge agent identifier, the instruction identifier, and the rejection reason code. The rejection reason code contains the error message that the level identifier is invalid, thereby preventing the edge agent from executing scheduling instruction data packets with incorrect format.

[0100] In summary, step 100 obtains the scheduling instruction data packet through the second communication interface between the edge agent and the upper-level scheduling center, performs verification on the scheduling instruction data packet, parses the level identifier, stores the scheduling instruction information, and returns a scheduling instruction reception confirmation response. If necessary, it performs delay checks and validity checks to ensure the accurate reception of the scheduling instruction data packet and the correct extraction of the level identifier, laying the foundation for the control mode switching in step 200 and the scheduling execution in steps 300 to 400.

[0101] Step 200: Determine the current control mode based on the level identifier. If the current control mode is the preset mode, freeze the collaborative state variables of the current edge agent and close the first communication interface between the current edge agent and other edge agents.

[0102] In some embodiments, step 200 includes steps 210 to 230, as follows:

[0103] Step 210: Determine the current control mode based on the level identifier.

[0104] In some embodiments, step 210 includes steps 211 to 213:

[0105] Step 211: If the level identifier is a mandatory level identifier, determine the current control mode as a unified control mode.

[0106] Among them, the mandatory level identifier is a high-priority identifier issued by the superior dispatch center in emergency events or extreme weather scenarios, and the enumeration value of the mandatory level identifier is 1. The unified control mode is a mode in which the edge agent completely obeys the centralized control mode of the superior dispatch center. In the unified control mode, the edge agent is prohibited from cooperating with other edge agents and only executes the dispatch instructions issued by the superior dispatch center.

[0107] Understandably, the edge agent reads the enumeration value of the level identifier from the level identifier obtained in step 100 and determines whether the enumeration value of the level identifier is equal to 1. If the enumeration value of the level identifier is equal to 1, the edge agent marks the current control mode as the unified control mode and stores the mode identifier of the unified control mode in the local control mode register.

[0108] Step 212: If the level identifier is the guidance level identifier, determine that the current control mode is the coordinated control mode.

[0109] The guidance level identifier is a marker issued by the superior dispatch center under normal operating scenarios, and its enumeration value is 2. The collaborative control mode allows edge agents to perform collaborative and mutually supportive operations with other edge agents while executing dispatch instructions from the superior dispatch center.

[0110] The edge agent checks if the enumerated value of the level identifier is equal to 2. If the enumerated value of the level identifier is equal to 2, the edge agent marks the current control mode as the collaborative control mode and stores the mode identifier of the collaborative control mode in the local control mode register.

[0111] It should be noted that in the embodiments of this application, the preset mode is the unified control mode.

[0112] Step 213: When the current control mode is the collaborative control mode, the current edge agent and other edge agents perform collaborative scheduling by sharing collaborative state variables. The current edge agent generates scheduling actions based on the state information of other edge agents and its own state information.

[0113] Among them, the collaborative state variables are the state variables used by the current edge agent to send state information to other edge agents. The collaborative state variables include the load state information, resource availability state information, scheduling capability information, energy storage state of charge (SOC) and abandoned power information of the current edge agent.

[0114] It should be noted that traditional edge agents typically make decisions based solely on locally collected state information when performing scheduling, and cannot perceive the operating status of adjacent edge agents. This results in the inability to perform power mutual assistance among edge agents in scenarios of sudden load increases or generator redundancy, reducing the utilization efficiency of grid resources. This application utilizes a shared cooperative state variable approach, enabling the current edge agent to obtain the state information of other edge agents, thereby achieving cooperative scheduling among edge agents under a cooperative control mode.

[0115] Understandably, the current edge agent sends its collaborative state variables to other edge agents through the first communication interface, and simultaneously receives collaborative state variables from other edge agents through the same interface. The first communication interface uses the MQTT protocol to facilitate lightweight asynchronous communication between edge agents. The current edge agent stores the received collaborative state variables from other edge agents in a collaborative state buffer. This buffer uses a hash table structure, with the edge agent identifier as the key to store the corresponding edge agent's collaborative state variables.

[0116] The current edge agent generates scheduling actions based on the state information of other edge agents in the cooperative state buffer and its own state information. For example, when the current edge agent detects power generation redundancy in its region, it searches for other edge agents experiencing a sudden load increase in the cooperative state buffer and initiates a boundary power coordination request to them, achieving load balancing through power mutual assistance among edge agents. Alternatively, when the current edge agent detects a sudden load increase in its region, it searches for other edge agents with adjustment margins in the cooperative state buffer and sends a power support request to them, thereby obtaining power support from other edge agents.

[0117] It should be noted that, under the collaborative control mode, when the current edge agent generates scheduling actions, it needs to comprehensively consider the target data in the scheduling instructions of the upper-level scheduling center and the state information of other edge agents. Under the constraint of the target data in the scheduling instructions, the current edge agent prioritizes scheduling actions that can achieve collaborative mutual assistance, thereby maximizing the collaborative benefits among edge agents while meeting the scheduling needs of the upper-level scheduling center.

[0118] Step 220: If the current control mode is the preset mode, then freeze the collaborative state variables of the current edge agent.

[0119] Among them, the collaborative state variable is the state variable used by the current edge agent to send state information to other edge agents.

[0120] It should be noted that traditional power grid dispatching systems, even after switching to unified control mode, still maintain collaborative communication between edge agents. This can lead to interference from collaborative requests from other edge agents when the current edge agent is executing dispatching instructions from the upper-level dispatching center. This can cause conflicts between the current edge agent's handling of dispatching instructions from the upper-level dispatching center and collaborative requests from other edge agents, reducing the accuracy of dispatching instruction execution. This application addresses this by freezing the collaborative state variables of the current edge agent, allowing the current edge agent to focus on executing dispatching instructions from the upper-level dispatching center in unified control mode, thus avoiding interference from other edge agents.

[0121] It should be noted that freezing the cooperative state variables of the current edge agent in step 220 includes steps A1 and A2:

[0122] Step A1: Identify the state variables used for information interaction with other edge agents in the current edge agent's state variables as collaborative state variables.

[0123] It is understandable that the current state variables of the edge agent include local state variables and collaborative state variables. The local state variables are the state variables that the current edge agent uses only for local decision-making, while the collaborative state variables are the state variables that the current edge agent uses to send state information to other edge agents.

[0124] The current edge agent iterates through all its state variables, checking the attribute label of each state variable. If the attribute label of a state variable contains a collaborative sharing identifier, then the state variable is marked as a collaborative state variable. The collaborative sharing identifier is an attribute label configured during the initialization of the state variable, used to indicate whether the state variable needs to be shared with other edge agents.

[0125] The current edge agent stores the variable identifiers of all state variables marked as cooperative state variables in a cooperative state variable list. The cooperative state variable list uses an array structure to store the variable identifiers of the cooperative state variables. For example, the cooperative state variable list may include variable identifiers for load status information, resource availability status information, scheduling capability information, energy storage state of charge (SOC) information, and abandoned power information.

[0126] Step A2: Set the access permission of the collaborative state variable to read-only, prohibiting the current edge agent from writing to the collaborative state variable.

[0127] Understandably, the current edge agent iterates through all variable identifiers in the collaborative state variable list, locating the corresponding collaborative state variable based on the variable identifier. The current edge agent then modifies the access permission attribute of the collaborative state variable from read-write to read-only.

[0128] After setting the access permission of the collaborative state variable to read-only, the local decision module of the current edge agent can still read the value of the collaborative state variable, but cannot perform write operations on it. If the local decision module of the current edge agent attempts to perform a write operation on the collaborative state variable, the operating system will reject the write operation and return a permission denial error to the local decision module.

[0129] It is easy to understand that by setting the access permission of the collaborative state variable to read-only, it can be ensured that the current edge agent will not update the value of the collaborative state variable under the unified control mode, thereby avoiding sending incorrect state information to other edge agents and preventing other edge agents from initiating collaborative requests based on incorrect state information.

[0130] In some embodiments, freezing the collaborative state variables of the current edge agent in step 220 further includes steps B1 to B3:

[0131] Step B1: Before setting the access permissions of the cooperative state variables to read-only, save the first value of the cooperative state variables.

[0132] The first value is the value of the collaborative state variable before the access permission was modified.

[0133] Understandably, before setting the access permissions of the collaborative state variables to read-only in step A2, the current edge agent reads the current values ​​of all collaborative state variables in the collaborative state variable list. The current edge agent then stores a key-value pair consisting of the variable identifier and the corresponding current value of each collaborative state variable in the collaborative state snapshot cache.

[0134] The collaborative state snapshot cache uses persistent storage, such as storing it in the edge agent's flash memory or hard drive, to ensure that the first value of the collaborative state variables can still be restored after the edge agent is powered off and restarted.

[0135] Step B2: After setting the access permissions of the cooperative state variables to read-only, obtain the unfreeze command.

[0136] The unfreeze command is issued by the superior dispatch center after the emergency event is handled. The unfreeze command is used to notify the current edge agent to restore the writable access permission of the collaborative state variables, so that the current edge agent can re-enter the collaborative control mode.

[0137] The edge agent continuously listens for unfreezing commands from the upper-level scheduling center via a second communication interface. The unfreezing command data packet includes a command identifier, an unfreezing identifier, and an execution timestamp. Upon receiving the unfreezing command, the edge agent extracts the unfreezing identifier from the data packet and verifies its validity.

[0138] Step B3: According to the unfreeze command, restore the access permission of the cooperative state variable to write access permission, and restore the value of the cooperative state variable according to the first value.

[0139] Understandably, upon receiving the unfreeze command, the current edge agent iterates through all variable identifiers in the collaborative state variable list, locating the corresponding collaborative state variable based on the identifier. The current edge agent then modifies the access permission attribute of the collaborative state variable from read-only to read-write.

[0140] The current edge agent reads the first value corresponding to the variable identifier of each collaborative state variable from the collaborative state snapshot cache and restores the value of the collaborative state variable to the first value. It is easy to understand that by restoring the first value of the collaborative state variable, it can ensure that the value of the collaborative state variable is consistent with that before entering the unified control mode after the current edge agent exits the unified control mode, avoiding other edge agents receiving discontinuous state information due to numerical errors.

[0141] After restoring access permissions and values ​​for collaborative state variables, the current edge agent switches the current control mode from unified control mode to collaborative control mode and returns an unfreezing completion response to the upper-level scheduling center. The unfreezing completion response includes the current edge agent identifier, instruction identifier, and completion timestamp.

[0142] In some embodiments, before freezing the collaborative state variables of the current edge agent in step 220, steps C1 and C2 are further included:

[0143] Step C1: Establish a second communication interface between the upper-level scheduling center and the current edge agent.

[0144] The second communication interface is a vertical communication interface between the upper-level scheduling center and the current edge agent. The second communication interface uses the gRPC protocol to complete low-latency communication between the upper-level scheduling center and the current edge agent.

[0145] It should be noted that in traditional power grid dispatching systems, the communication interfaces between edge agents and the upper-level dispatching center, as well as the communication interfaces between edge agents, typically use the same priority. This can lead to situations where, in network congestion scenarios, dispatching instructions from the upper-level dispatching center may not reach the edge agents in a timely manner due to network latency, affecting the timeliness of dispatching instructions. This application addresses this by setting a higher priority for the second communication interface than the first communication interface, ensuring that dispatching instructions from the upper-level dispatching center are transmitted with priority.

[0146] Understandably, upon startup, the current edge agent first establishes a second communication interface with the upper-level scheduling center. The current edge agent sends a connection request to the upper-level scheduling center, which includes the current edge agent's identifier, communication protocol type, and encryption parameters. Upon receiving the connection request, the upper-level scheduling center verifies the validity of the current edge agent's identifier and returns a connection confirmation response, which includes the upper-level scheduling center's identifier, session key, and heartbeat cycle.

[0147] Upon receiving the connection confirmation response, the current edge agent encrypts the data transmission on the second communication interface using the session key to ensure the security of scheduling commands during transmission. The current edge agent sends heartbeat messages to the higher-level scheduling center according to a heartbeat cycle. These heartbeat messages include the current edge agent's identifier and a timestamp, thereby maintaining the connection status of the second communication interface.

[0148] Step C2: Set the priority of the second communication interface to be higher than that of the first communication interface. If the current edge agent receives both instructions transmitted through the second communication interface and information transmitted through the first communication interface at the same time, the instructions transmitted through the second communication interface shall be processed first.

[0149] The first communication interface is the horizontal communication interface between the current edge agent and other edge agents. The first communication interface uses the MQTT protocol to complete the lightweight asynchronous communication between edge agents.

[0150] Understandably, the current edge agent configures a priority parameter for the second communication interface in the communication gateway, setting the priority parameter of the second communication interface to high priority, such as priority 1. The current edge agent also configures a priority parameter for the first communication interface, setting the priority parameter of the first communication interface to normal priority, such as priority 3.

[0151] The communication gateway reads the priority parameter of the corresponding interface based on the source interface of the received data packet. If the communication gateway simultaneously receives a scheduling instruction data packet from the second communication interface and a coordination information data packet from the first communication interface, the communication gateway compares the priority parameters of the second and first communication interfaces. Since the priority parameter of the second communication interface is higher than that of the first communication interface, the communication gateway prioritizes transmitting the scheduling instruction data packet from the second communication interface to the instruction processing module of the current edge agent, and buffers the coordination information data packet from the first communication interface in the receiving buffer.

[0152] After processing the scheduling instruction data packet from the second communication interface, the instruction processing module of the current edge agent notifies the communication gateway to continue transmitting the coordination information data packet from the first communication interface in the receive buffer. It is easy to understand that by setting a higher priority for the second communication interface than the first, it ensures that the scheduling instructions from the upper-level scheduling center are always processed before the coordination information of other edge agents, thereby guaranteeing the timeliness of scheduling instruction execution.

[0153] Step 230: Immediately following step 220, close the first communication interface between the current edge agent and other edge agents.

[0154] It should be noted that in traditional power grid dispatching systems, after the edge agent switches to unified control mode, the first communication interface remains open. This allows other edge agents to continue sending collaborative dispatching requests, power support requests, or status query requests to the current edge agent, requiring the current edge agent to process and reject these requests. This increases the computational burden on the current edge agent and may delay the execution of dispatching instructions from the superior dispatching center due to request processing. This application addresses this by closing the first communication interface, completely isolating the current edge agent from communication with other edge agents in unified control mode, allowing it to focus solely on executing dispatching instructions from the superior dispatching center.

[0155] In some embodiments, step 230 includes steps 231 to 233:

[0156] Step 231: Stop sending the first information to other edge agents through the first communication interface.

[0157] The first piece of information includes the current load status information, resource availability status information, and scheduling capability information of the edge agent.

[0158] Understandably, in the current collaborative control mode, edge agents periodically send first information to other edge agents through the first communication interface. The sending period of the first information is set to 1 to 10 seconds, for example, it can be set to 5 seconds. The first information is published to the collaborative status topic in the form of an MQTT message. The collaborative status topic is an MQTT topic identifier agreed upon between edge agents, for example, it can be named: grid / agent / status.

[0159] After freezing the collaborative state variables in step 220, the current edge agent stops publishing the first message to the collaborative state topic. The current edge agent cancels the periodic sending task of the first message and marks the status of the first message sending task as paused. Upon detecting that the status of the first message sending task is paused, the communication gateway stops publishing messages to the collaborative state topic through the first communication interface.

[0160] It is easy to understand that by stopping the transmission of the first information, other edge agents can be prevented from initiating collaboration requests based on the first information of the current edge agent, thereby reducing the number of collaboration requests received by the current edge agent under the unified control mode.

[0161] Step 232: Refuse to receive second information from other edge agents through the first communication interface.

[0162] The second type of information includes a coordinated scheduling request, a power support request, and a status query request.

[0163] Understandably, other edge agents in the collaborative control mode may send a second message to the current edge agent. The second message is published in the form of an MQTT message to the request topic subscribed to by the current edge agent. The request topic is the exclusive MQTT topic identifier of the current edge agent, such as: grid / agent / A1 / request, where A1 is the identifier of the current edge agent.

[0164] After freezing the collaborative state variables in step 220, the current edge agent configures the receive filtering rules for the first communication interface. The receive filtering rules mark all MQTT messages from the request topic as rejected messages. Based on the receive filtering rules, the communication gateway discards all MQTT messages from the request topic and does not transmit these MQTT messages to the current edge agent's request processing module.

[0165] In other embodiments, upon receiving an MQTT message from a request topic, the communication gateway does not immediately discard the MQTT message. Instead, it records the message identifier and the sender edge agent identifier of the MQTT message in a rejection log. The rejection log is stored in a log file format and includes a timestamp, message identifier, sender edge agent identifier, and rejection reason. After recording the rejection in the rejection log, the communication gateway discards the MQTT message.

[0166] Step 233: Return a rejection response to the other edge agents that sent the second message.

[0167] Among them, the rejection response includes a unified control mode identifier.

[0168] Understandably, in order to notify other edge agents that the current edge agent has entered the unified control mode, the current edge agent refuses to receive the second information in step 232 and returns a rejection response to the other edge agents that sent the second information.

[0169] The communication gateway extracts the sender edge agent identifier from the MQTT message in the second message and constructs a rejection response message. The rejection response message includes the current edge agent identifier, message identifier, unified control mode identifier, and rejection timestamp. The unified control mode identifier is an enumerated value, such as MODE_UNIFIED, used to indicate that the current edge agent is in unified control mode.

[0170] The communication gateway sends a rejection response message to the response topic subscribed to by the sending edge agent through the first communication interface. The response topic is the exclusive MQTT topic identifier of the sending edge agent, such as: grid / agent / A2 / response, where A2 is the identifier of the sending edge agent.

[0171] Upon receiving the rejection response message, the sending edge agent extracts the unified control mode identifier from the message, recognizing that it is currently in unified control mode. The sending edge agent records its own edge agent identifier and unified control mode identifier in the collaborative state buffer, updating its collaborative state to non-collaborative. It's easy to understand that by returning a rejection response to other edge agents that sent the second message, they can promptly learn the current edge agent's control mode status, preventing them from continuing to send collaborative requests and reducing unnecessary communication overhead.

[0172] In some embodiments, closing the first communication interface between the current edge agent and other edge agents in step 230 further includes:

[0173] After executing steps 231 to 233, the current edge agent further closes the network connection of the first communication interface. The current edge agent sends an interface closure command to the communication gateway, which includes the interface identifier and closure timestamp of the first communication interface.

[0174] Upon receiving the interface shutdown command, the communication gateway disconnects the MQTT connection of the first communication interface and releases the network port and cache resources occupied by the first communication interface. The communication gateway marks the connection status of the first communication interface as closed and returns an interface shutdown completion response to the current edge agent. The interface shutdown completion response includes the interface identifier of the first communication interface and the shutdown completion timestamp.

[0175] Upon receiving the interface closure completion response, the current edge agent confirms that the first communication interface has been completely shut down. It's easy to understand that by closing the network connection of the first communication interface, communication between the current edge agent and other edge agents can be physically isolated, ensuring that the current edge agent is not subject to any interference from other edge agents under unified control mode.

[0176] Preferably, step 200 determines the current control mode based on the level identifier. When the current control mode is the unified control mode, it freezes the collaborative state variables of the current edge agent and closes the first communication interface, achieving a smooth switch from the collaborative control mode to the unified control mode. By freezing the collaborative state variables, the inconsistency in state information caused by the current edge agent updating the collaborative state variables in the unified control mode is avoided. By closing the first communication interface, communication between the current edge agent and other edge agents is isolated, ensuring that the current edge agent focuses on executing the scheduling instructions of the superior scheduling center and avoids interference from collaborative requests from other edge agents. By setting a higher priority for the second communication interface than the first communication interface, the priority processing of the scheduling instructions of the superior scheduling center is guaranteed. By saving the first value of the collaborative state variables and restoring it when unfrozen, it is ensured that the current edge agent can seamlessly recover to the collaborative control mode after exiting the unified control mode, laying a stable control mode foundation for the feedback data collection in step 300 and the decision parameter adjustment in step 400.

[0177] Step 300: Obtain the feedback data generated by the current edge agent after a preset stabilization time, determine the execution error based on the feedback data and the target data in the scheduling instruction, and construct an error time series model based on the execution error.

[0178] In some embodiments, step 300 specifically includes steps 310 to 330:

[0179] Step 310: Obtain the feedback data generated by the current edge agent after a preset stabilization time.

[0180] The preset stabilization time is the time required for the power grid system to reach a stable operating state after the current edge agent executes the scheduling command. The preset stabilization time can be set from 30 seconds to 300 seconds, for example, it can be set to 60 seconds. The feedback data is the power grid operating status data collected by the current edge agent after the preset stabilization time. The feedback data includes load change data after scheduling, node voltage response data, and frequency disturbance assessment values.

[0181] It should be noted that traditional power grid dispatching systems typically collect power grid state data immediately after the edge agent executes dispatching commands, ignoring the transition process between dispatching actions and stable operation of the power grid system. This results in the collected state data containing transient fluctuations from the transition process, which interfere with the calculation of execution errors and reduce the accuracy of execution error assessment. This application, by setting a preset stabilization time, ensures that the current edge agent collects feedback data only after the power grid system has reached a stable operating state, thereby obtaining steady-state data that truly reflects the dispatching effect.

[0182] Understandably, after the edge agent executes the scheduling action according to the scheduling instruction in step 200, it starts a stabilization timer. The starting point of the stabilization timer is the timestamp of the completion of the scheduling action. The duration of the stabilization timer is set to a preset stabilization time.

[0183] The stabilization timer executes timing with a 1-second time granularity, checking every second whether the timer's accumulated duration has reached the preset stabilization time. If the timer's accumulated duration has not reached the preset stabilization time, the stabilization timer continues timing. If the timer's accumulated duration reaches the preset stabilization time, the stabilization timer sends a data acquisition trigger signal to the data acquisition module of the current edge agent.

[0184] After receiving a data acquisition trigger signal, the data acquisition module of the current edge agent collects feedback data from power grid node devices. For example, the data acquisition module can collect load change data after dispatch from the monitoring terminal of the distribution transformer. This data includes the difference between the current load power value and the load power value before dispatch. Another example is that the data acquisition module can collect node voltage response data from voltage transformers. This data includes the difference between the current node voltage value and the node voltage value before dispatch. Yet another example is that the data acquisition module can collect frequency disturbance assessment values ​​from frequency measurement devices. These assessment values ​​represent the deviation between the current frequency value and the rated frequency of 50Hz.

[0185] The data acquisition module combines the collected post-dispatch load change data, node voltage response data, and frequency disturbance assessment values ​​into feedback data, and adds a collection timestamp to the feedback data, recording the time of collection. The data acquisition module stores the feedback data and collection timestamp in the feedback data buffer, which adopts a circular queue structure with a buffer capacity of 100 to 1000 feedback data records.

[0186] In some embodiments, step 310, obtaining the feedback data generated by the current edge agent after a preset stabilization time, further includes:

[0187] When the edge agent collects feedback data from the data acquisition module, it simultaneously records the instruction identifier of the scheduling instruction and the action identifier of the scheduling action. The action identifier is a unique identifier for the specific scheduling action generated by the edge agent based on the scheduling instruction.

[0188] For example, the action identifier could be: ACTION_20250101_153020, which represents the scheduled action to be executed at 15:30:20 on January 1, 2025.

[0189] The current edge agent assembles a feedback data record, consisting of an instruction identifier, an action identifier, feedback data, and a collection timestamp, and stores it in the feedback data buffer. By recording the instruction identifier and action identifier, a correlation can be established between the feedback data and the scheduling instructions, facilitating the comparison between the feedback data and the target data in the corresponding scheduling instructions in step 320.

[0190] Step 320: Determine the execution error based on the feedback data and the target data in the scheduling instructions.

[0191] The target data refers to the expected power grid operating state after the current edge agent executes the scheduling action, as specified in the scheduling instruction. The target data includes target load change data, target node voltage data, and target frequency deviation data. The execution error is the difference between the feedback data and the target data; it is used to evaluate the degree of deviation between the actual and expected execution effects of the scheduling action.

[0192] Understandably, the current edge agent extracts the instruction identifier from the feedback data record obtained in step 310, and searches for the corresponding scheduling instruction data packet in the local scheduling instruction buffer based on the instruction identifier. The current edge agent extracts the target data from the scheduling instruction data packet, which includes target load change data, target node voltage data, and target frequency deviation data.

[0193] The load execution error is obtained by calculating the difference between the post-scheduling load change data in the current edge agent's feedback data and the target load change data in the target data.

[0194] The voltage execution error is obtained by calculating the difference between the node voltage response data in the current edge agent's feedback data and the target node voltage data in the target data.

[0195] The frequency execution error is obtained by calculating the difference between the frequency perturbation evaluation value in the current edge agent's feedback data and the target frequency deviation data in the target data.

[0196] The current edge agent combines load execution error, voltage execution error, and frequency execution error into execution error data, and adds an error calculation timestamp to the execution error data. The current edge agent combines the execution error data, error calculation timestamp, instruction identifier, and action identifier into execution error records, which are stored in the execution error cache. The execution error cache adopts a time-series database structure, supporting fast retrieval of execution error records in chronological order.

[0197] In some embodiments, determining the execution error based on the feedback data and the target data in the scheduling instruction in step 320 further includes:

[0198] The current edge agent calculates the comprehensive error value of its execution error, which is a weighted sum of load execution error, voltage execution error, and frequency execution error. The weighting coefficients are set according to the priorities of the power grid operation; for example, the importance of load execution error can be set higher than that of voltage and frequency execution errors.

[0199] The edge agent adds the comprehensive error value to the execution error record, thereby providing a comprehensive evaluation index for the construction of the error time series model in step 330.

[0200] Step 330: Construct an error time series model based on the execution error.

[0201] Among them, the error time series model is a time series analysis model built based on the execution error records of multiple consecutive scheduling cycles. The error time series model is used to identify the changing trend and abnormal patterns of execution errors.

[0202] It should be noted that traditional power grid dispatching systems typically evaluate the performance of edge agents based solely on the execution error of a single dispatching cycle, failing to identify the evolution of execution errors over time. This leads to an inability to distinguish between sporadic and persistent execution errors, potentially causing the dispatching system to over-adjust for sporadic errors or fail to promptly identify persistent errors. This application, by constructing an error time-series model, can comprehensively analyze the execution errors across multiple consecutive dispatching cycles, identifying the statistical characteristics and trends of these errors, thereby providing a time-series analysis basis for determining abnormal execution errors in step 400.

[0203] In some embodiments, step 330, which involves constructing an error timing model based on the execution error, specifically includes steps 331 to 334:

[0204] Step 331: Obtain the execution error corresponding to the scheduling period of the preset number of windows, and arrange the execution errors corresponding to the scheduling period of the preset number of windows in chronological order to obtain the execution error sequence.

[0205] The preset window number is the number of historical scheduling cycles used to build the error time series model. The preset window number can be set to 5 to 50, for example, 20. The scheduling cycle is the time period for the current edge agent to perform a complete scheduling action. The scheduling cycle includes the total time for receiving scheduling instructions, executing scheduling actions, waiting for the preset stabilization time, and collecting feedback data. The duration of the scheduling cycle can be set to 5 to 30 minutes, for example, 10 minutes.

[0206] Understandably, the current edge agent retrieves execution error records corresponding to the most recent scheduling cycles within a preset window size from the execution error cache. For example, if the preset window size is set to 20, the current edge agent retrieves execution error records corresponding to the most recent 20 scheduling cycles.

[0207] The current edge agent extracts the comprehensive error value and error calculation timestamp from each execution error record to form error data points. Each error data point includes a timestamp field and a comprehensive error value field. The current edge agent sorts the error data points (a preset window size) according to their timestamp fields from earliest to latest, obtaining an execution error sequence.

[0208] The execution error sequence is stored in an array structure. The array index represents the sequential number of the scheduling period, and the array element is the comprehensive error value of the corresponding scheduling period. For example, the execution error sequence can be represented as [e1, e2, e3, …, e20], where e1 is the comprehensive error value of the earliest scheduling period and e20 is the comprehensive error value of the most recent scheduling period.

[0209] In some embodiments, step 331, obtaining the execution error corresponding to the scheduling period of the preset number of windows, further includes:

[0210] When the edge agent retrieves execution error records, it checks whether the number of execution error records in the execution error buffer has reached the preset window size. If the number of execution error records is less than the preset window size, the edge agent marks the execution error sequence as insufficient data and does not build an error time series model until a sufficient number of execution error records have accumulated.

[0211] If the number of execution error records reaches or exceeds the preset window size, the current edge agent selects the nearest preset window size of execution error records to construct an execution error sequence. It's easy to understand that by checking the number of execution error records, it ensures that the error time series model is built on sufficient historical data, thus improving the statistical reliability of the error time series model.

[0212] Step 332: Aggregate the execution error sequence to obtain the aggregation result.

[0213] The aggregation process involves performing statistical calculations on the execution error sequence to extract its statistical features. The aggregation result is a set of statistical feature data obtained after the aggregation process.

[0214] Understandably, current edge agents perform various statistical calculations on the execution error sequence, including calculating the mean, median, maximum, minimum, standard deviation, and variance of the execution error sequence.

[0215] The mean of the current edge agent's computational execution error sequence, and the median of the current edge agent's computational execution error sequence. The median is the middle value in the sequence after sorting by numerical value. If the preset window size is even, the median is the average of the two middle values ​​after sorting. For example, if the sorted execution error sequence is [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], the median is 10.5.

[0216] The current edge agent calculates the maximum value of the execution error sequence, which is the largest comprehensive error value in the execution error sequence.

[0217] The current edge agent calculates the minimum value of the execution error sequence, which is the comprehensive error value with the smallest value in the execution error sequence.

[0218] The current edge agent calculates the standard deviation of the execution error sequence. The standard deviation is used to measure the degree of dispersion of each comprehensive error value in the execution error sequence relative to the mean.

[0219] The current edge agent calculates the variance of the execution error sequence, which is the square of the standard deviation.

[0220] The current edge agent aggregates the mean, median, maximum, minimum, standard deviation, and variance into an aggregated result. The aggregated result is stored in a key-value pair structure, which can be represented as {"mean": mean, "median": median, "max": maximum, "min": minimum, "std": standard deviation, "var": variance}.

[0221] Step 333: Extract the first feature data, the second feature data, and the third feature data from the aggregation results.

[0222] The first feature data represents the central tendency of each execution error in the execution error sequence, expressed as the median of the aggregated result, reflecting the central trend of the execution error sequence. The second feature data represents the maximum magnitude of each execution error in the execution error sequence, expressed as the maximum value of the aggregated result, reflecting extreme deviations in the execution error sequence. The third feature data represents the degree of deviation of each execution error in the execution error sequence from its central tendency, expressed as the standard deviation of the aggregated result, reflecting the volatility of the execution error sequence.

[0223] It should be noted that the median is used instead of the mean as the first feature data because the median is more robust to extreme outliers in the execution error sequence. For example, if there is a very large outlier in the execution error sequence, the mean will be significantly raised by the outlier, while the median is not affected by the outlier and can more accurately reflect the overall central location of the execution error sequence.

[0224] Understandably, the current edge agent reads the value corresponding to the "median" key from the key-value pair structure of the aggregation result and uses this value as the first feature data. The current edge agent reads the value corresponding to the "max" key from the key-value pair structure of the aggregation result and uses this value as the second feature data. The current edge agent reads the value corresponding to the "std" key from the key-value pair structure of the aggregation result and uses this value as the third feature data.

[0225] The current edge agent combines the first feature data, the second feature data, and the third feature data into a feature data set. The feature data set is stored in an array structure, for example, it can be represented as [first feature data, second feature data, third feature data].

[0226] Step 334: Construct an error time series model based on the first feature data, the second feature data, and the third feature data.

[0227] It is understandable that the current edge agent constructs the model parameters of the error time series model based on the first feature data, the second feature data, and the third feature data. The model parameters of the error time series model include the central location parameter, the maximum amplitude parameter, and the fluctuation degree parameter.

[0228] The central location parameter is set to the value of the first feature data, representing the normal execution error level of the execution error sequence. The maximum amplitude parameter is set to the value of the second feature data, representing the maximum deviation level in the execution error sequence. The volatility parameter is set to the value of the third feature data, representing the stability of the execution error sequence.

[0229] The current edge agent will concentrate the location parameters, maximum amplitude parameters, and fluctuation degree parameters to form the model parameter set of the error time series model, and add a model construction timestamp to the error time series model. The model construction timestamp records the creation time of the error time series model.

[0230] The current edge agent stores the model parameter set, model construction timestamp, and execution error sequence of the error time series model in the error time series model cache. The error time series model cache adopts a relational database structure and supports the retrieval of historical error time series models according to the model construction timestamp.

[0231] In some embodiments, step 334, which involves constructing an error time series model based on the first feature data, the second feature data, and the third feature data, further includes:

[0232] The current edge agent computes the error time-series model's model confidence score, which is used to evaluate the reliability of the error time-series model. The formula for calculating the model confidence score is:

[0233] Model confidence level = 1 - (fluctuation level parameter / maximum amplitude parameter);

[0234] Among them, the fluctuation level parameter is the third characteristic data, and the maximum amplitude parameter is the second characteristic data.

[0235] It's easy to understand that a smaller fluctuation parameter indicates lower fluctuation in the execution error sequence, more stable execution errors, higher reliability of the error time series model, and a model confidence level close to 1. Conversely, if the fluctuation parameter is close to the maximum amplitude parameter, it indicates higher fluctuation in the execution error sequence, unstable execution errors, lower reliability of the error time series model, and a model confidence level close to 0.

[0236] The current edge agent adds the model confidence to the model parameter set of the error time series model, thereby providing a model reliability reference for the abnormal execution error determination in step 400.

[0237] Preferably, step 300 obtains feedback data generated by the current edge agent after a preset stabilization time to ensure that the feedback data reflects the steady-state operation of the power grid system and avoids interference from transient fluctuations in the calculation of execution errors. By determining the execution error based on the feedback data and the target data in the scheduling instructions, the deviation between the actual and expected execution effects of the scheduling actions is quantified, providing an objective basis for performance evaluation. By constructing an error time series model, the execution errors of multiple consecutive scheduling cycles are comprehensively analyzed, and the concentrated location data, maximum amplitude data, and fluctuation degree data of the execution errors are extracted. The statistical characteristics and trends of the execution errors are identified, thus providing a time series analysis basis for the abnormal execution error judgment and decision parameter adjustment in step 400, improving the scheduling system's ability to identify execution errors and the pertinence of adjustment strategies.

[0238] Step 400: Determine the execution error based on the error time series model. If it is an abnormal execution error, obtain the first reference decision from the preset decision set and adjust the first decision parameters of the current edge agent according to the first reference decision.

[0239] Among them, abnormal execution error refers to execution error whose statistical characteristics exceed the normal range. Abnormal execution error indicates that the decision parameters of the current edge agent are biased and need to be adjusted. The first reference decision is a decision scheme with good execution performance selected from historical scheduling cycles. The first reference decision is used to guide the adjustment of the decision parameters of the current edge agent. The first decision parameters are the set of parameters used by the current edge agent when generating scheduling actions. The first decision parameters include load adjustment coefficient, voltage control gain, and frequency response weight.

[0240] It should be noted that traditional power grid dispatching systems typically only make a simple judgment based on whether the error of a single execution exceeds a threshold after the edge agent executes the dispatching command. This fails to distinguish between different types of abnormal execution errors, leading the dispatching system to apply the same adjustment strategy to all abnormal execution errors. This results in a lack of specificity in the adjustment strategy, potentially leading to over-adjustment for transient fluctuation-type anomalies or under-adjustment for trend-shifting anomalies. This application, through multi-level judgment based on an error time series model, identifies the specific type of abnormal execution error and selects the corresponding adjustment strategy based on the anomaly type, thereby improving the accuracy and effectiveness of decision parameter adjustment.

[0241] In some embodiments, step 400, which determines the execution error based on an error sequence model, includes:

[0242] If the first feature data exceeds the first threshold, the execution error will be marked as the first candidate abnormal execution error.

[0243] The first threshold is the normal upper limit of the concentrated location data of the execution error, and is set to 5kW to 20kW, for example, it can be set to 10kW. The first candidate abnormal execution error is the execution error in which the concentrated location data exceeds the normal range. The first candidate abnormal execution error indicates that the overall level of the execution error sequence is too high.

[0244] Understandably, the current edge agent reads the first feature data from the model parameter set of the error time series model constructed in step 330. The first feature data consists of the values ​​of the centralized location parameters. The current edge agent reads the first threshold from the configuration parameter library, which stores preset values ​​for various judgment thresholds.

[0245] The current edge agent compares the magnitude of the first feature data with the first threshold. If the value of the first feature data is greater than the first threshold, the current edge agent marks the execution error of the current scheduling cycle as the first candidate abnormal execution error and stores the marking status of the first candidate abnormal execution error in the abnormal marking cache. The abnormal marking cache uses a Boolean variable to store the marking status of the first candidate abnormal execution error. A true marking status indicates the existence of the first candidate abnormal execution error, and a false marking status indicates the absence of the first candidate abnormal execution error.

[0246] If the value of the first feature data is not greater than the first threshold, the current edge agent sets the labeling status of the first candidate abnormal execution error to false.

[0247] If the first candidate abnormal execution error exists and the third feature data exceeds the third threshold, then the execution error is determined to be a first type of abnormal execution error.

[0248] The third threshold represents the upper limit of high volatility in the execution error fluctuation data, and is set between 3kW and 10kW, for example, it can be set to 5kW. The first type of abnormal execution error is an abnormal execution error with high concentration and large fluctuation. The first type of abnormal execution error indicates that the overall execution error sequence is high and unstable, which may be due to improper setting of decision parameters, causing the scheduling action to continuously deviate from the target and fluctuate drastically.

[0249] Understandably, the current edge agent checks the marking status of the first candidate abnormal execution error in the anomaly marking buffer. If the marking status of the first candidate abnormal execution error is true, the current edge agent further reads the third feature data from the model parameter set of the error time series model. The third feature data is the value of the fluctuation degree parameter.

[0250] The current edge agent reads the third threshold from the configuration parameter library and compares the value of the third feature data with the third threshold. If the value of the third feature data is greater than the third threshold, the current edge agent determines that the execution error of the current scheduling cycle is a first-type abnormal execution error and stores the type identifier of the first-type abnormal execution error in the exception type register. The exception type register uses an enumerated variable to store the type identifier of the abnormal execution error. For example, the type identifier of the first-type abnormal execution error can be set to "TYPE_1_HIGH_CENTER_HIGH_VOLATILITY".

[0251] If the first candidate abnormal execution error does not exist, and the second feature data exceeds the second threshold, then the execution error is marked as the second candidate abnormal execution error.

[0252] The second threshold is the upper limit of the extreme deviation of the maximum amplitude data of the execution error. The second threshold is set to 15kW to 40kW, for example, it can be set to 25kW. The second candidate abnormal execution error is the execution error whose maximum amplitude data exceeds the normal range. The second candidate abnormal execution error indicates that there is an extreme deviation in the execution error sequence.

[0253] Understandably, the current edge agent checks the marking status of the first candidate abnormal execution error in the anomaly marking buffer. If the marking status of the first candidate abnormal execution error is false, the current edge agent reads the second feature data from the model parameter set of the error time series model. The second feature data is the value of the maximum amplitude parameter.

[0254] The current edge agent reads the second threshold from the configuration parameter library and compares the second feature data with the second threshold. If the value of the second feature data is greater than the second threshold, the current edge agent marks the execution error of the current scheduling cycle as the second candidate abnormal execution error and stores the marking status of the second candidate abnormal execution error in the abnormal marking cache.

[0255] If a second candidate abnormal execution error exists and the third feature data is lower than the fourth threshold, then the execution error is determined to be a second type of abnormal execution error.

[0256] The fourth threshold is the upper limit of the low fluctuation of the execution error data, and is set to 1kW to 4kW, for example, it can be set to 2kW. The second type of abnormal execution error is an abnormal execution error with a higher maximum amplitude but a smaller fluctuation. The second type of abnormal execution error indicates that there is a single extreme deviation in the execution error sequence, but the overall system is relatively stable. It may be caused by occasional external disturbances or instantaneous measurement errors.

[0257] Understandably, the current edge agent checks the labeling status of the second candidate abnormal execution error in the anomaly labeling buffer. If the labeling status of the second candidate abnormal execution error is true, the current edge agent reads the third feature data from the model parameter set of the error time series model.

[0258] The current edge agent reads the fourth threshold from the configuration parameter library and compares the magnitude of the third feature data with the fourth threshold. If the value of the third feature data is less than the fourth threshold, the current edge agent determines that the execution error of the current scheduling cycle is a second-type abnormal execution error and stores the type identifier of the second-type abnormal execution error in the exception type register. For example, the type identifier of the second-type abnormal execution error can be set to "TYPE_2_HIGH_PEAK_LOW_VOLATILITY".

[0259] If neither the first candidate abnormal execution error nor the second candidate abnormal execution error exists, and the third feature data exceeds the fifth threshold, then the execution error is determined to be a third type of abnormal execution error.

[0260] The fifth threshold represents the upper limit of moderate fluctuation in the execution error data, and is set between 4kW and 8kW, for example, it can be set to 6kW. The third type of abnormal execution error is an abnormal execution error where the concentrated location data and maximum amplitude data are normal, but the degree of fluctuation is large. The third type of abnormal execution error indicates that the overall level of the execution error sequence is normal, but the stability is poor, which may be due to the decision parameter response sensitivity being set too high, resulting in frequent adjustments to the scheduling action.

[0261] Understandably, the current edge agent checks the labeling status of the first candidate abnormal execution error and the labeling status of the second candidate abnormal execution error in the anomaly labeling buffer. If both the labeling status of the first candidate abnormal execution error and the labeling status of the second candidate abnormal execution error are false, the current edge agent reads the third feature data from the model parameter set of the error time series model.

[0262] The current edge agent reads the fifth threshold from the configuration parameter library and compares the value of the third feature data with the fifth threshold. If the value of the third feature data is greater than the fifth threshold, the current edge agent determines that the execution error of the current scheduling cycle is a third-type abnormal execution error and stores the type identifier of the third-type abnormal execution error in the exception type register. For example, the type identifier of the third-type abnormal execution error can be set to "TYPE_3_NORMAL_CENTER_HIGH_VOLATILITY".

[0263] It should be noted that, through a two-level screening mechanism of first-candidate abnormal execution errors and second-candidate abnormal execution errors, abnormal execution errors can be categorized into three types: Type I abnormal execution errors correspond to situations where the overall level is high and fluctuates drastically, requiring significant adjustments to the decision parameters; Type II abnormal execution errors correspond to situations where there is a single extreme deviation but overall stability, allowing for minor adjustments or simply recording the anomaly without further adjustment; Type III abnormal execution errors correspond to situations where the overall level is normal but fluctuates significantly, requiring a reduction in the response sensitivity of the decision parameters. Different types of abnormal execution errors correspond to different adjustment strategies, thereby achieving targeted optimization of the decision parameters.

[0264] In some embodiments, after determining that the execution error is a first type of abnormal execution error, a second type of abnormal execution error, or a third type of abnormal execution error, the method further includes:

[0265] Obtain the scheduling period in which the most recent abnormal execution error occurred among several scheduling periods that were previously compared with the current scheduling period, and determine the exception type corresponding to the scheduling period in which the most recent abnormal execution error occurred as the historical exception type.

[0266] The preset comparison period number is the number of backtracking periods used to find historical abnormal execution errors. The preset comparison period number can be set to 3 to 15, for example, it can be set to 10. The historical anomaly type is the type identifier of the most recent abnormal execution error that occurred before the current scheduling period.

[0267] Understandably, the current edge agent reads the exception type identifier of the current scheduling period from the exception type register. The exception type identifier of the current scheduling period is one of the first type of exception execution error, the second type of exception execution error, or the third type of exception execution error.

[0268] The current edge agent retrieves execution error records from the execution error buffer for several scheduling cycles prior to the current scheduling cycle, which are then compared to a preset number of cycles. The current edge agent iterates through these execution error records, checking if each record contains an exception type identifier field. If an execution error record contains an exception type identifier field, it indicates that an abnormal execution error occurred during that scheduling cycle, and the current edge agent records the cycle number and the exception type identifier for that scheduling cycle.

[0269] The current edge agent selects the execution error record with the largest cycle number from all execution error records containing an anomaly type identifier field. This execution error record corresponds to the scheduling cycle in which the most recent abnormal execution error occurred. The current edge agent extracts the anomaly type identifier from this execution error record and stores it as a historical anomaly type in the historical anomaly type cache.

[0270] If the type of abnormal execution error in the current scheduling period is the same as the type of historical abnormality, then the abnormal execution error will be marked as a steady-state abnormal execution error.

[0271] Among them, steady-state abnormal execution error is the abnormal execution error that remains consistent across multiple consecutive scheduling cycles. Steady-state abnormal execution error indicates that the deviation of decision parameters has persistence and stability, and requires gradual adjustment.

[0272] Understandably, the current edge agent reads the exception type identifier for the current scheduling period from the exception type register and reads the historical exception type from the historical exception type cache. The current edge agent then compares the exception type identifier for the current scheduling period with the historical exception type to see if they are the same.

[0273] If the anomaly type identifier of the current scheduling period is the same as the historical anomaly type, for example, if the anomaly type identifier of the current scheduling period and the historical anomaly type are both "TYPE_1_HIGH_CENTER_HIGH_VOLATILITY", the current edge agent will mark the abnormal execution error of the current scheduling period as a steady-state abnormal execution error and store the mark identifier of the steady-state abnormal execution error in the anomaly status register. The anomaly status register uses an enumerated variable to store the status identifier of the abnormal execution error. For example, the mark identifier of the steady-state abnormal execution error can be set to "STATE_STEADY".

[0274] If the abnormal execution error type of the current scheduling period is different from the historical abnormal type, the abnormal execution error is marked as a transformation abnormal execution error, and the abnormal transformation direction is determined according to the historical abnormal type and the abnormal execution error type of the current scheduling period.

[0275] Among them, the transformation of abnormal execution error refers to the abnormal execution error whose type changes in the current scheduling cycle. The transformation of abnormal execution error indicates that the deviation of decision parameters has undergone a mode shift, requiring significant adjustments. The direction of abnormal change is the direction of change from the historical abnormal type to the abnormal execution error type in the current scheduling cycle. The direction of abnormal change is used to guide the selection of adjustment strategies.

[0276] Understandably, if the anomaly type identifier of the current scheduling period is different from the historical anomaly type, for example, the historical anomaly type is "TYPE_2_HIGH_PEAK_LOW_VOLATILITY" and the anomaly type identifier of the current scheduling period is "TYPE_1_HIGH_CENTER_HIGH_VOLATILITY", the current edge agent will mark the abnormal execution error of the current scheduling period as a transformed abnormal execution error and store the marker of the transformed abnormal execution error in the anomaly status register. For example, the marker of the transformed abnormal execution error can be set to "STATE_TRANSITION".

[0277] The current edge agent constructs an anomaly transition direction identifier based on historical anomaly types and the anomaly type identifier of the current scheduling cycle. The anomaly transition direction identifier is represented in the format of "historical anomaly type → current anomaly type".

[0278] The edge agent stores the abnormal change direction identifier in the abnormal change direction cache area, which uses a string variable to store the abnormal change direction identifier.

[0279] The steady-state abnormal execution error corresponds to the first adjustment strategy, and the transition abnormal execution error corresponds to the second adjustment strategy. The adjustment range of the first adjustment strategy is smaller than that of the second adjustment strategy.

[0280] The first adjustment strategy is a gradual adjustment strategy for steady-state abnormal execution errors, and the adjustment range of the first adjustment strategy is set to 5% to 15% of the current value of the decision parameter, for example, it can be set to 10%. The second adjustment strategy is a rapid adjustment strategy for transition abnormal execution errors, and the adjustment range of the second adjustment strategy is set to 15% to 30% of the current value of the decision parameter, for example, it can be set to 20%.

[0281] It should be noted that steady-state abnormal execution error indicates that the deviation of the decision parameters is persistent. Large adjustments may lead to overcorrection of the decision parameters, triggering new abnormal execution errors. Therefore, the first adjustment strategy employs small, gradual adjustments to progressively approach the optimal decision parameters. Transitional abnormal execution error indicates a mode shift in the deviation of the decision parameters. Small adjustments may not be sufficient to correct the deviation in time. Therefore, the second adjustment strategy employs larger, rapid adjustments to quickly bring the decision parameters to a reasonable range.

[0282] Understandably, the current edge agent reads the status flag of the abnormal execution error from the abnormal status register. If the status flag of the abnormal execution error is "STATE_STEADY", the current edge agent selects the first adjustment strategy as the adjustment strategy for the current scheduling cycle and stores the strategy flag of the first adjustment strategy in the adjustment strategy register. For example, the strategy flag of the first adjustment strategy can be set to "STRATEGY_GRADUAL".

[0283] If the status flag of the abnormal execution error is "STATE_TRANSITION", the current edge agent selects the second adjustment strategy as the adjustment strategy for the current scheduling cycle and stores the strategy flag of the second adjustment strategy in the adjustment strategy register. For example, the strategy flag of the second adjustment strategy can be set to "STRATEGY_RAPID".

[0284] In some embodiments, obtaining a first reference decision from a preset decision set in step 400 specifically includes steps D1 to D4:

[0285] Step D1: Determine multiple candidate scheduling cycles in the preset decision set.

[0286] The preset decision set is a database storing decision schemes and execution results for historical scheduling cycles. It includes scheduling actions, decision parameters, execution error values, and operating environment parameters for each historical scheduling cycle. Candidate scheduling cycles are those where the execution error after executing scheduling actions is lower than a preset reference threshold. Candidate scheduling cycles represent scheduling cycles with reasonable decision parameter settings and good execution results.

[0287] The preset reference threshold is the upper limit of the execution error for screening candidate scheduling cycles. The preset reference threshold is set to 2kW to 8kW, for example, it can be set to 5kW.

[0288] Understandably, the current edge agent retrieves execution error records for all historical scheduling cycles from a preset decision set. The current edge agent then iterates through these execution error records, extracting the comprehensive error value from each record.

[0289] The current edge agent reads a preset reference threshold from the configuration parameter library and compares the comprehensive error value of each execution error record with the preset reference threshold. If the comprehensive error value of the execution error record is less than the preset reference threshold, the current edge agent marks the scheduling period corresponding to the execution error record as a candidate scheduling period and stores the period number of the candidate scheduling period in the candidate scheduling period list. The candidate scheduling period list uses an array structure to store the period numbers of the candidate scheduling periods.

[0290] The current edge agent counts the number of candidate scheduling cycles in the candidate scheduling cycle list. If the number of candidate scheduling cycles is 0, it means that there are no scheduling cycles with good execution performance in the preset decision set. The current edge agent relaxes the preset reference threshold, for example, by increasing the preset reference threshold by 20%, and re-executes the screening of candidate scheduling cycles.

[0291] If the number of candidate scheduling periods is greater than 0, the current edge agent determines all candidate scheduling periods in the candidate scheduling period list as multiple candidate scheduling periods.

[0292] Step D2: Obtain the candidate decisions, execution error values, and runtime environment parameters corresponding to the candidate scheduling cycles.

[0293] Among them, candidate decisions are the decision schemes used in candidate scheduling cycles, and candidate decisions include the configuration of decision parameters for the candidate scheduling cycle. Operating environment parameters are the grid operating environment status data when scheduling actions are executed in the candidate scheduling cycle, and operating environment parameters include load level, renewable energy output ratio, energy storage state of charge (SOC), and grid frequency.

[0294] Understandably, the current edge agent iterates through the cycle numbers of all candidate scheduling cycles in the candidate scheduling cycle list. For each candidate scheduling cycle number, the current edge agent retrieves the corresponding scheduling cycle record from the preset decision set.

[0295] The current edge agent extracts candidate decisions from the scheduling cycle records. These candidate decisions are stored in the form of parameter configuration files, including values ​​for decision parameters such as load regulation coefficient, voltage control gain, and frequency response weight. The current edge agent stores the candidate decisions in a candidate decision list, which uses a list structure to store multiple candidate decisions.

[0296] The current edge agent extracts the execution error value from the scheduling cycle record. The execution error value is the comprehensive error value of the candidate scheduling cycle. The current edge agent stores the execution error value into an execution error value list. The execution error value list uses an array structure to store the execution error values ​​corresponding to multiple candidate scheduling cycles.

[0297] The edge agent currently extracts operating environment parameters from the scheduling cycle records. These parameters include load level, renewable energy output ratio, energy storage state of charge (SOC), and grid frequency. The edge agent then stores these operating environment parameters in an operating environment parameter list. This list uses a list structure to store the operating environment parameters corresponding to multiple candidate scheduling cycles.

[0298] Step D3: Calculate the similarity between the current operating environment parameters of the current edge agent and the operating environment parameters corresponding to multiple candidate scheduling cycles to obtain multiple environment similarities.

[0299] The current operating environment parameters are the grid operating environment status data when the edge agent executes scheduling actions in the current scheduling cycle. These parameters include the current load level, the current renewable energy output ratio, the current state of charge (SOC) of energy storage, and the current grid frequency. Environmental similarity is the degree of similarity between the current operating environment parameters and the operating environment parameters of the candidate scheduling cycle. Environmental similarity is expressed using cosine similarity or the reciprocal of Euclidean distance.

[0300] Understandably, edge agents currently collect current operating environment parameters from grid node devices. For example, they collect current load levels from the monitoring terminals of distribution transformers, current renewable energy output ratios from photovoltaic inverters, current state of charge (SOC) from energy storage systems, and current grid frequency from frequency measurement devices.

[0301] The current edge agent will compose the current operating environment parameter vector by combining the current load level, the current renewable energy output ratio, the current energy storage state of charge (SOC), and the current grid frequency. For example, it can be represented as [current load level, current renewable energy output ratio, current energy storage SOC, current grid frequency].

[0302] The current edge agent traverses all operating environment parameters in the list of operating environment parameters. For each operating environment parameter, the current edge agent assembles the operating environment parameter into a candidate operating environment parameter vector, which can be represented as [candidate load level, candidate renewable energy output ratio, candidate energy storage state of charge (SOC), candidate grid frequency].

[0303] The current edge agent calculates the cosine similarity between the current runtime environment parameter vector and the candidate runtime environment parameter vectors. The current edge agent uses the calculated cosine similarity as the environment similarity and stores it in an environment similarity list. This list uses an array structure to store the environment similarities corresponding to multiple candidate scheduling cycles. In some embodiments, the current edge agent can use the reciprocal of the Euclidean distance to calculate the environment similarity. It's easy to understand that the smaller the Euclidean distance, the closer the current runtime environment parameters are to the candidate runtime environment parameters, and the higher the environment similarity. By introducing the reciprocal of the Euclidean distance, the Euclidean distance can be converted into a similarity index, making the environment similarity value range between 0 and 1.

[0304] Step D4: Based on the execution error values ​​corresponding to multiple candidate decisions and multiple environmental similarities, select the candidate decision with the highest comprehensive score from among the multiple candidate decisions as the first reference decision.

[0305] Among them, the comprehensive score is an evaluation index that takes into account the execution effect of the candidate decision and the similarity of the operating environment. The higher the comprehensive score, the better the execution effect of the candidate decision and the closer the operating environment is to the current operating environment.

[0306] Understandably, the current edge agent traverses all candidate decisions in the candidate decision list. For each candidate decision, the current edge agent retrieves the execution error value corresponding to the candidate decision from the execution error value list and the environment similarity value corresponding to the candidate decision from the environment similarity list.

[0307] The edge agent calculates a comprehensive score for the candidate decision. This comprehensive score is an evaluation metric that takes into account both the execution effectiveness of the candidate decision and the similarity to the operating environment.

[0308] Understandably, the current edge agent iterates through all candidate decisions in the candidate decision list. For each candidate decision, the current edge agent obtains the corresponding execution error value and environmental similarity.

[0309] The edge agent calculates a comprehensive score for the candidate decision. This comprehensive score is a weighted sum of the execution performance score and the environment similarity score. The execution performance score is calculated based on the ratio of the execution error value to a preset reference threshold; a smaller execution error value results in a higher execution performance score. The environment similarity score is directly derived from the environment similarity value.

[0310] The current edge agent assigns weight coefficients to both the execution performance score and the environment similarity score. The execution performance weight coefficient is set to 0.5 to 0.7, for example, 0.6, while the environment similarity weight coefficient is set to 0.3 to 0.5, for example, 0.4. The sum of the two weight coefficients is 1. It's easy to understand that by setting the execution performance weight coefficient slightly higher than the environment similarity weight coefficient, the candidate decision with the better execution performance can be prioritized.

[0311] The system calculates the product of the current edge agent's performance score and its weighted coefficient, and the product of the environment similarity score and its weighted coefficient. These two products are then summed to obtain a comprehensive score. The current edge agent stores this comprehensive score in a comprehensive score list.

[0312] The current edge agent iterates through all comprehensive scores in the comprehensive score list and finds the maximum comprehensive score. The current edge agent determines the candidate decision corresponding to the maximum comprehensive score as the first reference decision and stores the first reference decision in the reference decision cache.

[0313] The edge agent will calculate and store the comprehensive score into a comprehensive score list. The comprehensive score list uses an array structure to store the comprehensive scores corresponding to multiple candidate decisions.

[0314] The current edge agent iterates through all comprehensive scores in the comprehensive score list and finds the maximum comprehensive score. The current edge agent determines the candidate decision corresponding to the maximum comprehensive score as the first reference decision and stores the first reference decision in the reference decision cache.

[0315] In some embodiments, adjusting the first decision parameters of the current edge agent according to the first reference decision in step 400 specifically includes steps E1 to E5:

[0316] Step E1: Obtain the first decision parameters currently used by the edge agent.

[0317] Understandably, the current edge agent reads the first decision parameter from the parameter configuration file of the local decision module and stores all parameter identifiers and parameter values ​​of the first decision parameter in the first decision parameter cache area.

[0318] Step E2: Extract the first parameter set from the first reference decision.

[0319] The first parameter set includes parameters corresponding to the abnormal state data in the feedback data.

[0320] It should be noted that traditional power grid dispatching systems typically perform uniform adjustments on all decision parameters when adjusting the decision parameters of edge agents, resulting in a lack of specificity in the adjustment strategy. This application achieves targeted parameter adjustments by identifying abnormal state data in the feedback data and extracting the decision parameters corresponding to these abnormal state data.

[0321] Understandably, the current edge agent analyzes the abnormal state data from the feedback data obtained in step 310. For example, if the difference between the post-scheduled load change data and the target load change data exceeds the load anomaly threshold, the current edge agent marks the post-scheduled load change data as abnormal state data.

[0322] The current edge agent determines the decision parameters affecting the abnormal state data based on the abnormal state data. For example, the load change data after scheduling is mainly affected by the load adjustment coefficient, and the node voltage response data is mainly affected by the voltage control gain. The current edge agent extracts the decision parameters corresponding to the abnormal state data from the first reference decision to form a first parameter set.

[0323] Step E3: Based on the degree of abnormality of the abnormal status data in the feedback data, adjust the priority of each parameter in the first parameter set.

[0324] Here, the degree of anomaly refers to the deviation between the actual value of the abnormal state data and the target data, and the degree of anomaly is expressed as a deviation ratio. Adjustment priority refers to the priority of each parameter in the adjustment order.

[0325] Understandably, the current edge agent iterates through all anomaly-prone state data in the feedback data, calculating the deviation ratio of each anomaly. The current edge agent then sorts the anomaly-proportioned state data in descending order, assigning adjustment priorities to the corresponding decision parameters based on the sorting order; decision parameters with larger deviation ratios have higher adjustment priorities.

[0326] Step E4: Based on the adjustment strategy and adjustment priority corresponding to the abnormal execution error, adjust each parameter in the first parameter set in descending order of adjustment priority to obtain the second parameter set.

[0327] Understandably, the current edge agent reads the adjustment policy identifier for the current scheduling period from the adjustment policy register to determine the adjustment magnitude. The current edge agent iterates through all parameters in the first parameter set and adjusts each parameter in descending order of adjustment priority. For each parameter, the current edge agent reads the reference value of the parameter from the first reference decision and the current value of the parameter from the first decision parameter buffer.

[0328] The current edge agent calculates the adjustment direction of this parameter. If the reference value is greater than the current value, the adjustment direction is to increase; if the reference value is less than the current value, the adjustment direction is to decrease. The current edge agent calculates the adjusted value of the parameter based on the adjustment direction and adjustment magnitude, and stores the adjusted value in the second parameter set.

[0329] Step E5: Replace the parameters in the first decision parameters that have the same parameter identifier as the first parameter set with the second parameter set, while keeping the other parameters in the first decision parameters unchanged.

[0330] Understandably, the current edge agent iterates through all parameter identifiers in the second parameter set. For each parameter identifier, the current edge agent replaces the parameter value in the first decision parameter cache with the adjusted value from the second parameter set. The current edge agent keeps other parameters in the first decision parameter cache that are not in the second parameter set unchanged. The current edge agent writes the updated first decision parameters into the parameter configuration file of the local decision module, completing the adjustment of the decision parameters.

[0331] In summary, this application obtains the dispatch instructions from the superior dispatch center and extracts the level identifier in step 100, providing a basis for switching the control mode; in step 200, it switches the control mode according to the level identifier, freezes the collaborative state variables, and closes the first communication interface, ensuring that the current edge agent focuses on executing the dispatch instructions from the superior dispatch center under the unified control mode; in step 300, it obtains feedback data after a preset stabilization time, calculates the execution error, and constructs an error time series model, providing a time series analysis basis for evaluating the execution effect; in step 400, it determines abnormal execution errors based on the error time series model, obtains the first reference decision from the preset decision set, and adjusts the first decision parameters of the current edge agent according to the first reference decision, thereby optimizing the decision parameters. The power grid dynamic dispatch optimization method based on agents provided in this application effectively solves the problem of edge agents being interfered with by collaborative requests from other edge agents when executing superior dispatch instructions, improves the accuracy of dispatch instruction execution, and achieves precise adjustment of decision parameters through the error time series model and reference decision mechanism, thereby improving the intelligence level and operating efficiency of the power grid dispatch system.

[0332] Based on the above steps, this application also includes the following embodiments:

[0333] See Figure 3 This is a schematic diagram of the structure of a power grid dynamic dispatch optimization system based on an intelligent agent, provided in an embodiment of this application. The data processing system of this power grid dynamic dispatch optimization system includes:

[0334] The instruction acquisition module is used to acquire scheduling instructions from the superior scheduling center and extract the level identifier of the scheduling instructions.

[0335] The mode control module is used to determine the current control mode based on the level identifier. If the current control mode is the preset mode, the collaborative state variables of the current edge agent are frozen and the first communication interface between the current edge agent and other edge agents is closed.

[0336] The error analysis module is used to obtain the feedback data generated by the current edge agent after a preset stabilization time, determine the execution error based on the feedback data and the target data in the scheduling instructions, and construct an error time series model based on the execution error.

[0337] The parameter adjustment module determines the execution error based on the error time series model. If it is an abnormal execution error, it obtains the first reference decision from the preset decision set and adjusts the first decision parameters of the current edge agent according to the first reference decision.

[0338] Figure 3 The apparatus of the illustrated embodiment can be used to perform corresponding actions. Figure 1 The steps in the method embodiments shown are implemented in a similar manner and have similar technical effects, and will not be repeated here.

[0339] See Figure 4 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application. The electronic device 60 includes: a processor 61, a memory 62, and a computer program; wherein...

[0340] The memory 62 is used to store computer programs, and the memory may also be flash memory. Computer programs may be, for example, application programs or functional modules that implement the methods described above.

[0341] Processor 61 is used to execute a computer program stored in the memory to implement the various steps performed by the device in the above method. For details, please refer to the relevant descriptions in the preceding method embodiments.

[0342] Alternatively, the memory 62 can be either standalone or integrated with the processor 61.

[0343] When the memory 62 is a device independent of the processor 61, the device may also include:

[0344] Bus 63 is used to connect memory 62 and processor 61.

[0345] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

Claims

1. A power grid dynamic scheduling optimization method based on intelligent agents, characterized in that, include: Obtain the scheduling instructions from the superior scheduling center and extract the level identifier of the scheduling instructions; The current control mode is determined based on the level identifier. If the current control mode is a unified control mode, the collaborative state variables of the current edge agent are frozen, and the first communication interface between the current edge agent and other edge agents is closed. The system acquires feedback data generated by the current edge agent after a preset stabilization time, determines the execution error based on the feedback data and the target data in the scheduling instruction, and constructs an error time series model based on the execution error. The feedback data includes load change data after scheduling, node voltage response data, and frequency disturbance evaluation values. The error time series model is used to identify the changing trend and abnormal patterns of the execution error. The execution error is determined based on the error timing model. If it is an abnormal execution error, a first reference decision is obtained from the preset decision set, and the first decision parameters of the current edge agent are adjusted according to the first reference decision. The step of constructing an error time series model based on the execution error includes: Obtain the execution error corresponding to the scheduling period of the preset number of windows, and arrange the execution errors corresponding to the scheduling period of the preset number of windows in chronological order to obtain the execution error sequence; The execution error sequence is aggregated to obtain the aggregation result; Extract the first feature data, the second feature data, and the third feature data from the aggregation result; The error time series model is constructed based on the first feature data, the second feature data, and the third feature data.

2. The method according to claim 1, characterized in that, The step of determining the current control mode based on the level identifier also includes: If the level identifier is a guidance level identifier, the current control mode is determined to be a coordinated control mode; When the current control mode is the collaborative control mode, the current edge agent and other edge agents perform collaborative scheduling by sharing the collaborative state variables. The current edge agent generates scheduling actions based on the state information of other edge agents and its own state information.

3. The method according to claim 1, characterized in that, The collaborative state variable is the state variable in the current edge agent used to send state information to other edge agents; The freezing of the collaborative state variables of the current edge agent includes: The state variables used for information interaction with other edge agents in the current edge agent's state variables are identified as the collaborative state variables; Set the access permission of the collaborative state variable to read-only, prohibiting the current edge agent from writing to the collaborative state variable.

4. The method according to claim 3, characterized in that, The freezing of the collaborative state variables of the current edge agent also includes: Before setting the access permission of the cooperative state variable to read-only, save the current value of the cooperative state variable as the first value; After setting the access permission of the collaborative state variable to read-only, obtain the unfreeze command; According to the unfreeze command, the access permission of the collaborative state variable is restored to write access permission, and the value of the collaborative state variable is restored according to the first value.

5. The method according to claim 1, characterized in that, The step of closing the first communication interface between the current edge agent and other edge agents includes: Stop sending first information to other edge agents through the first communication interface; the first information includes the current load status information, resource availability status information, and scheduling capability information of the edge agent. Refuse to receive second information from other edge agents through the first communication interface; the second information includes a cooperative scheduling request, a power support request, and a status query request. Return a rejection response to other edge agents that sent the second information; the rejection response contains a unified control mode identifier.

6. The method according to claim 4, characterized in that, Before freezing the collaborative state variables of the current edge agent, the method further includes: Establish a second communication interface between the upper-level scheduling center and the current edge agent; The second communication interface is given a higher priority than the first communication interface. If the current edge agent receives both instructions transmitted through the second communication interface and information transmitted through the first communication interface at the same time, the instructions transmitted through the second communication interface are processed first.

7. The method according to claim 1, characterized in that, The first feature data is the centralized location data of each execution error in the execution error sequence; The second feature data is the maximum magnitude data of the execution error in the execution error sequence; The third feature data is the deviation of each execution error in the execution error sequence from the data at the central location.

8. The method according to claim 1, characterized in that, Determining execution errors based on the aforementioned error timing model includes: If the first feature data exceeds the first threshold, the execution error will be marked as the first candidate abnormal execution error; If the first candidate abnormal execution error exists and the third feature data exceeds the third threshold, then the execution error is determined to be the first type of abnormal execution error. If the first candidate abnormal execution error does not exist, and the second feature data exceeds the second threshold, then the execution error is marked as the second candidate abnormal execution error. If the second candidate abnormal execution error exists and the third feature data is lower than the fourth threshold, then the execution error is determined to be the second type of abnormal execution error. If neither the first candidate abnormal execution error nor the second candidate abnormal execution error exists, and the third feature data exceeds the fifth threshold, then the execution error is determined to be a third type of abnormal execution error.

9. The method according to claim 8, characterized in that, After determining whether the execution error is a type I, type II, or type III abnormal execution error, the following steps are also included: Obtain the scheduling period in which the most recent abnormal execution error occurred among several scheduling periods that were previously compared with the current scheduling period, and determine the exception type corresponding to the scheduling period in which the most recent abnormal execution error occurred as the historical exception type; If the type of abnormal execution error in the current scheduling cycle is the same as the type of historical abnormality, then the abnormal execution error will be marked as a steady-state abnormal execution error. If the abnormal execution error type of the current scheduling period is different from the historical abnormal type, the abnormal execution error is marked as a transformation abnormal execution error, and the abnormal transformation direction is determined according to the historical abnormal type and the abnormal execution error type of the current scheduling period. The steady-state abnormal execution error corresponds to the first adjustment strategy, and the transition abnormal execution error corresponds to the second adjustment strategy. The adjustment range of the first adjustment strategy is smaller than that of the second adjustment strategy.

10. The method according to claim 1, characterized in that, Obtain the first reference decision from the preset decision set, including: Multiple candidate scheduling periods are determined in the preset decision set; the multiple candidate scheduling periods are scheduling periods in which the execution error after performing the scheduling action is lower than a preset reference threshold. Obtain multiple candidate decisions, execution error values, and runtime environment parameters corresponding to multiple candidate scheduling cycles; Calculate the similarity between the current operating environment parameters of the current edge agent and the operating environment parameters corresponding to multiple candidate scheduling cycles to obtain multiple environment similarities; Based on the execution error values ​​corresponding to multiple candidate decisions and the environmental similarity, the candidate decision with the highest comprehensive score is selected as the first reference decision.

11. The method according to claim 10, characterized in that, Adjusting the first decision parameters of the current edge agent based on the first reference decision includes: Obtain the first decision parameter currently used by the edge agent; A first parameter set is extracted from the first reference decision; the first parameter set includes parameters corresponding to the abnormal state data in the feedback data. Based on the degree of abnormality of the abnormal status data in the feedback data, the priority of each parameter in the first parameter set is adjusted. Based on the adjustment parameters and adjustment priorities corresponding to the abnormal execution errors, the parameters in the first parameter set are adjusted sequentially in descending order of adjustment priority to obtain the second parameter set. Replace the parameters in the first decision parameters that have the same parameter identifier as the first parameter set with the second parameter set, while keeping the other parameters in the first decision parameters unchanged.

12. A power grid dynamic scheduling optimization system based on intelligent agents, employing the power grid dynamic scheduling optimization method based on intelligent agents as described in any one of claims 1 to 11, characterized in that, include: The instruction acquisition module is used to acquire scheduling instructions from the superior scheduling center and extract the level identifier of the scheduling instructions; The mode control module is used to determine the current control mode according to the level identifier. If the current control mode is a preset mode, the collaborative state variables of the current edge agent are frozen and the first communication interface between the current edge agent and other edge agents is closed. The error analysis module is used to acquire feedback data generated by the current edge agent after a preset stabilization time, determine the execution error based on the feedback data and the target data in the scheduling instruction, and construct an error time series model based on the execution error. The step of constructing an error time series model based on the execution error includes: Obtain the execution error corresponding to the scheduling period of the preset number of windows, and arrange the execution errors corresponding to the scheduling period of the preset number of windows in chronological order to obtain the execution error sequence; The execution error sequence is aggregated to obtain the aggregation result; Extract the first feature data, the second feature data, and the third feature data from the aggregation result; The error time series model is constructed based on the first feature data, the second feature data, and the third feature data; The parameter adjustment module determines the execution error based on the error timing model. If it is an abnormal execution error, it obtains a first reference decision from the preset decision set and adjusts the first decision parameters of the current edge agent according to the first reference decision.

Citation Information

Patent Citations

  • Multi-source photovoltaic energy storage collaborative management method and system

    CN120185104A