Micro-grid credible AI scheduling method and system, and computer device

By constructing a causal graph and performing counterfactual verification, the causal mechanism of the microgrid AI scheduling model is revealed, which improves the interpretability of the scheduling strategy, solves the problem of AI scheduling in microgrids relying on human intervention, and achieves higher trust and lower human intervention rate.

CN122334902APending Publication Date: 2026-07-03HANGZHOU QIZHI TECH CO LTD +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HANGZHOU QIZHI TECH CO LTD
Filing Date
2026-06-04
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

In the current application of AI scheduling in microgrids, there is a serious reliance on human intervention. This is mainly because the decision-making process of the AI ​​scheduling model is not transparent, which leads to the distrust of the scheduling instructions generated by AI by operation and maintenance personnel, making it difficult to truly implement them.

Method used

By constructing causal graphs, conducting causal reasoning and counterfactual verification, the causal interaction mechanism between variables is revealed, improving the interpretability of scheduling strategies. A causal interpretability scoring mechanism is adopted to reduce the rate of manual intervention.

Benefits of technology

It significantly reduced the rate of manual intervention by operations and maintenance personnel in AI scheduling instructions, and improved the interpretability and trustworthiness of scheduling strategies. The trustworthiness of operations and maintenance personnel in AI scheduling instructions decreased from 54.3% to 18.7%.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122334902A_ABST
    Figure CN122334902A_ABST
Patent Text Reader

Abstract

This application discloses a reliable AI scheduling method, system, and computer equipment for microgrids. It includes: conditional independence testing of multi-source data; constructing a candidate causal graph among variables, constrained by prior knowledge in the power sector; calculating the differences in causal effects caused by fluctuations in the current scheduling strategy; performing counterfactual reasoning verification based on different differentiated scheduling strategies; and scoring the current scheduling strategy on causal interpretability based on causal effect differences, counterfactual verification results, and link integrity, followed by AI scheduling. This application reveals the causal interaction mechanism between variables, and the counterfactual reasoning that changes in variables lead to changes in scheduling results, improving the interpretability of the scheduling strategy. It can trace the causal driving factors of each scheduling instruction, significantly reducing the rate of human intervention. Prior knowledge in the power sector ensures safe and compliant scheduling, making the results more reliable. It solves the problem of dependence on human intervention in the application of AI scheduling in microgrids.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of microgrid dispatching technology, and in particular to a reliable AI dispatching method, system and computer equipment for microgrids. Background Technology

[0002] In recent years, the development of distributed energy and microgrids has accelerated rapidly, and AI has been increasingly widely applied in scheduling optimization. While technologies such as deep reinforcement learning and neural network prediction have shown good performance in scheduling efficiency, a "black box" problem exists in actual deployment and operation. Current mainstream AI scheduling models, whether based on online decisions using deep reinforcement learning (DRL) or offline optimization using deep neural networks (DNN), lack transparency in their decision-making processes. For example, the policy network of a DRL scheduling model maps the decision-making process from a high-dimensional state space to a nonlinear action space, typically involving millions or even tens of millions of parameters. When maintenance personnel receive a scheduling instruction generated by AI, such as adjusting the energy storage system's discharge power to 75% of its rated capacity at 14:00, this instruction might be generated because of a pre-predicted need to consume remaining energy storage, arbitrage based on fluctuating electricity prices, or considerations of battery health and load demand. In short, the lack of transparency in AI-generated scheduling instructions directly leads to a distrust of AI scheduling instructions by maintenance personnel. Even after receiving AI-generated scheduling instructions, maintenance personnel still need to manually intervene, indicating a high degree of reliance on human intervention. Although some ex-post interpretation methods have emerged in recent years, these methods can only provide statistical correlation explanations at the level of feature importance ranking. A manual reassessment of the instruction's rationality is required, meaning the instructions have poor interpretability, making it difficult to truly implement AI scheduling instructions. Therefore, existing technologies present a significant technical problem in the application of AI scheduling in microgrids, heavily relying on human intervention. Summary of the Invention

[0003] This application provides a reliable AI scheduling method, system, and computer equipment for microgrids, which can solve the technical problem in the prior art that the application of AI scheduling in microgrids relies heavily on manual intervention.

[0004] In a first aspect, embodiments of this application provide a trusted AI scheduling method for microgrids, including: Acquire multi-source data; Conditional independence is tested on the multi-source data, and a topological structure is constructed based on the direct causal path between variables to obtain a candidate causal graph between variables, wherein the candidate causal graph uses prior knowledge in the power field as a constraint. The candidate causal graph is simulated and intervened with the current scheduling strategy to calculate the difference in causal effects caused by the floating change of the current scheduling strategy. Based on observational evidence of the differentiated scheduling strategy and the current scheduling strategy, counterfactual reasoning is performed on the candidate causal graph to obtain a counterfactual verification result, wherein the differentiated scheduling strategy is different from the current scheduling strategy. Based on the causal effect differences, the counterfactual verification results, and the link integrity, the current scheduling strategy is scored on the causal interpretability dimension to obtain the interpretability score of the current scheduling strategy and perform AI scheduling. The link integrity refers to the completeness of the causal link traceability. The higher the interpretability score, the higher the interpretability of the current scheduling strategy.

[0005] In some embodiments, the step of simulating intervention on the candidate causal graph using the current scheduling policy to calculate the difference in causal effects caused by the floating change of the current scheduling policy includes: The candidate causal graph is simulated and intervened using the current scheduling strategy to calculate the first causal effect brought about by the current scheduling strategy. By keeping the promiscuous variables fixed, the current scheduling strategy is changed in a single dimension. The promiscuous variables refer to variables other than the current single variable, and the current single variable is the single-dimensional control variable corresponding to the current scheduling strategy. The candidate causal graph is simulated and intervened with the current scheduling strategy that is changing with floating, and the second causal effect brought about by the current scheduling strategy that is changing with floating is calculated. The difference between the first causal effect and the second causal effect is calculated to obtain the difference in causal effects caused by the current scheduling strategy floating change.

[0006] In some embodiments, before scoring the current scheduling strategy on the causal interpretability dimension based on the causal effect difference, the counterfactual verification result, and the link integrity, and obtaining the interpretability score of the current scheduling strategy and performing AI scheduling, the process includes: Establish the model to be trained; The model to be trained is distributed to each microgrid node for local training, and the trained model parameters uploaded by each microgrid node are obtained. Determine the verification loss of a node, wherein the verification loss of the node is the verification loss of the current microgrid node in the current round in the local area; The verification loss of the node is used as a negative exponential modulation factor to obtain the aggregation weight of the current microgrid node, wherein the smaller the verification loss, the higher the aggregation weight. Based on the aggregated weights, the trained model parameters uploaded by each node are aggregated and updated to obtain the trained model, which is then used to score the causal interpretability dimension of the current scheduling strategy and for AI scheduling.

[0007] In some embodiments, the step of distributing the model to be trained to each microgrid node for local training and obtaining the trained model parameters uploaded by each microgrid node includes: The model to be trained is distributed to each microgrid node. Each microgrid node generates a corresponding number of random fragments, retains the last fragment, and distributes the other fragments to the corresponding network nodes for local training. After training, the aggregated results of the encrypted text are uploaded according to the gradient of their respective nodes. Obtain the uploaded partial aggregation results and sum them to obtain variables; Based on the variables, the parameters of the trained model are determined.

[0008] In some embodiments, after distributing the model to be trained to each microgrid node, the process includes: Each microgrid node adds Gaussian noise with a calibration difference to the gradient and uploads a portion of the aggregated result of the ciphertext with its corresponding node gradient. The accumulated privacy loss is tracked in real time using a global privacy budget counter, and federated training is automatically stopped when a preset threshold is reached. In some embodiments, after performing conditional independence tests on the multi-source data and constructing a topological structure based on direct causal paths between variables to obtain a candidate causal graph between variables, the process includes: Acquire pre-defined prior knowledge in the power sector; The candidate causal graph is subject to conditional constraints based on the prior knowledge in the power field, wherein the conditional constraints include at least one of expert knowledge constraints, temporal sequence constraints, and physical mechanism constraints.

[0009] In some embodiments, after performing conditional independence tests on the multi-source data, constructing a topological structure based on direct causal paths between variables, and obtaining a candidate causal graph between variables, the process includes: Based on the topology of the candidate causal graph and the observation data, the maximum likelihood value corresponding to the candidate causal graph is determined, wherein the maximum likelihood value characterizes the degree of fit to the observation data; Based on the maximum likelihood value, a target candidate causal graph is selected from multiple candidate causal graphs to simulate intervention on the target candidate causal graph.

[0010] Secondly, embodiments of this application also provide a microgrid trusted AI scheduling system, which includes: The user interaction module is used to acquire data from multiple sources. The causal reasoning engine module is used to perform conditional independence tests on the multi-source data, construct a topological structure based on the direct causal paths between variables, and obtain a candidate causal graph between variables; The safety and compliance module is used to use prior knowledge in the power sector as constraints on the candidate causal graph. The causal reasoning engine module is also used to simulate intervention on the candidate causal graph with the current scheduling strategy, calculate the difference in causal effects brought about by the floating change of the current scheduling strategy; and perform counterfactual reasoning verification on the candidate causal graph based on observational evidence of the distinguishing scheduling strategy and the current scheduling strategy to obtain the counterfactual verification result, wherein the distinguishing scheduling strategy is different from the current scheduling strategy. The scheduling module is used to score the current scheduling strategy on the causal interpretability dimension based on the causal effect difference, the counterfactual verification result, and the link integrity, to obtain the interpretability score of the current scheduling strategy and perform AI scheduling. The link integrity refers to the completeness of the causal link traceability. The higher the interpretability score, the higher the interpretability of the current scheduling strategy.

[0011] Thirdly, embodiments of this application also provide a computer device for trusted AI scheduling of microgrids, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-mentioned method.

[0012] This application provides a reliable AI scheduling method, system, and computer device for microgrids. The method includes: acquiring multi-source data; performing conditional independence tests on the multi-source data, constructing a topology based on direct causal paths between variables to obtain a candidate causal graph, wherein the candidate causal graph uses prior knowledge in the power sector as constraints; simulating intervention on the candidate causal graph using the current scheduling strategy to calculate the causal effect differences caused by fluctuations in the current scheduling strategy; performing counterfactual reasoning verification on the candidate causal graph based on observational evidence of the distinguishing scheduling strategy and the current scheduling strategy to obtain a counterfactual verification result, wherein the distinguishing scheduling strategy is different from the current scheduling strategy; and scoring the current scheduling strategy on a causal interpretability dimension based on the causal effect differences, the counterfactual verification result, and link integrity to obtain an interpretability score for the current scheduling strategy and performing AI scheduling, wherein the link integrity refers to the completeness of causal link traceability, and the higher the interpretability score, the higher the interpretability of the current scheduling strategy. This application reveals the causal mechanism between variables and demonstrates counterfactual reasoning that changes in variables lead to changes in scheduling outcomes, thus improving the interpretability of scheduling strategies. It elevates the generation logic of scheduling decisions from the level of statistical correlation to the level of causal mechanisms, enabling the tracing of the causal driving factors of each scheduling instruction and significantly reducing the rate of human intervention. Furthermore, the causal graph uses prior knowledge in the power sector as constraints, ensuring the safety and compliance of scheduling and making AI scheduling results more reliable. This addresses the reliance on human intervention in the application of AI scheduling in microgrids. Attached Figure Description

[0013] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0014] Figure 1 A flowchart illustrating the trusted AI scheduling method for microgrids provided in this application embodiment; Figure 2 A schematic block diagram of a microgrid trusted AI scheduling system provided in the embodiments of this application; Figure 3 A schematic block diagram of a computer device provided in an embodiment of this application. Detailed Implementation

[0015] 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, not all, of the embodiments of this application. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0016] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the stated features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.

[0017] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the application. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.

[0018] It should also be further understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0019] In recent years, the development of distributed energy and microgrids has accelerated, and AI has been increasingly widely applied in scheduling optimization. While technologies such as deep reinforcement learning and neural network prediction have shown good performance in scheduling efficiency, a "black box" problem exists in actual deployment and operation. Current mainstream AI scheduling models, whether based on online decisions using deep reinforcement learning (DRL) or offline optimization using deep neural networks (DNN), lack transparency in their decision-making processes. For example, the policy network of a DRL scheduling model maps the decision-making process from a high-dimensional state space to a nonlinear action space, typically involving millions or even tens of millions of parameters. When maintenance personnel receive a scheduling instruction generated by AI, such as "adjust the energy storage system's discharge power to 75% of its rated capacity at 14:00," the generation of this instruction could be due to a pre-predicted need to consume remaining energy storage, arbitrage based on fluctuating electricity prices, or considerations of battery health and load demand, etc. In short, the lack of transparency in AI-generated scheduling instructions directly leads to a distrust of AI scheduling instructions by maintenance personnel. Even after receiving AI-generated dispatch instructions, maintenance personnel still need to manually intervene, indicating a high degree of reliance on human intervention. For example, in the first year after introducing an AI-assisted dispatch system, the manual intervention rate for AI instructions at a microgrid dispatch center in a certain region reached 54.3%, far exceeding the expected 15%. Moreover, approximately 67% of these interventions were due to the inability to determine the reasonableness of the instructions. This data shows that without resolving the issue of instruction interpretability, AI dispatching is difficult to truly implement. The need for manual re-evaluation of the instruction's reasonableness, meaning poor interpretability, hinders the effective implementation of AI dispatching. Although some ex-post interpretation methods have emerged in recent years, these methods can only provide statistical correlation explanations at the level of feature importance ranking. Therefore, existing technologies suffer from a severe technical problem in the application of AI dispatching in microgrids, where there is a heavy reliance on human intervention.

[0020] This application provides a reliable AI scheduling method, system, and computer equipment for microgrids, aiming to solve the technical problem that the application of AI scheduling in microgrids heavily relies on manual intervention.

[0021] This application improves the interpretability of instructions by revealing the causal mechanism between variables and demonstrating counterfactual reasoning that changing a certain input condition will alter the scheduling result. It constructs an interpretable scheduling decision engine based on a structural causal model. Through a three-stage causal reasoning process—causal graph construction, computational intervention analysis, and counterfactual reasoning verification—the generation logic of scheduling decisions is elevated from the statistical correlation level to the causal mechanism level, allowing maintenance personnel to trace the causal driving factors of each scheduling instruction and significantly reducing the rate of manual intervention. This addresses the reliance on manual intervention in the application of AI scheduling in microgrids.

[0022] The microgrid trusted AI scheduling method provided in this application is oriented towards a trusted AI scheduling overall architecture. This architecture adopts a layered decoupling and modular combination, and is divided into multiple core layers from top to bottom: user interaction layer, trusted AI scheduling core engine layer, microgrid data layer, and device layer.

[0023] The user interaction layer provides five functional entry points: operation and maintenance monitoring panel, decision interpretation interface, cause-effect tracing query, privacy audit log, and manual intervention interface, realizing closed-loop interaction for human-machine collaborative scheduling.

[0024] The Trusted AI Scheduling Core Engine Layer is the computing hub of the system, integrating three major computing components: a large inference model, a cluster of domain-specific intelligent agents, and a matrix of specialized small models, as well as two core functional modules: a causal inference engine and a security and compliance verification module.

[0025] The microgrid data layer and device layer are responsible for data acquisition and command issuance to physical devices such as photovoltaic arrays, wind power generation, energy storage systems, flexible loads, EMS / SCADA systems, and smart meters.

[0026] In some embodiments, in addition to the above-mentioned layers, the architecture may also include a privacy computing security layer. The privacy computing security layer is used to achieve a zero-leakage data collaboration mode, where the original data does not leave the local area, the model parameters are transmitted in encrypted form, and the privacy budget can be quantified and tracked, while ensuring the accuracy of the collaborative scheduling of multiple microgrid nodes.

[0027] The privacy-preserving computation security layer serves as a data barrier, employing four layers of protection: a federated learning framework, a secure multi-party computation protocol, a differential privacy mechanism, and a trusted execution environment.

[0028] Figure 1 This is a flowchart illustrating the trusted AI scheduling method for microgrids provided in an embodiment of this application. Figure 1 As shown, the method includes the following steps S110-S150: S110, Obtain multi-source data; Multi-source data includes exogenous and endogenous variables. Exogenous variables are given external conditions. Their values ​​come from outside the model, are not affected by the model, and only influence the model unilaterally. Endogenous variables are the results to be explained or predicted. Their values ​​are determined by other variables within the model, especially exogenous variables.

[0029] The set of exogenous variable data is called the exogenous variable set U. U includes at least one of the following: meteorological condition variables, market environment variables, and initial equipment condition variables.

[0030] Among them, the meteorological condition variable u_weather includes at least one of solar irradiance, wind speed, temperature, and humidity; the market environment variable u_market includes at least one of real-time electricity price, peak-valley electricity price difference, and carbon trading price; and the equipment initial status variable u_device includes at least one of equipment rated parameters and aging coefficient.

[0031] The set of endogenous variable data is called the endogenous variable set V. V includes at least one of the following: photovoltaic power output, wind power output, load demand, energy storage SOC status, grid power purchase and sale, dispatch cost, system safety margin, and carbon emissions. For each endogenous variable Xi, a structural equation can be determined through its parent node PAi and the corresponding exogenous noise Ui, resulting in a set of multiple structural equations F.

[0032] Taking photovoltaic power output as an endogenous variable as an example, its structural equation is specifically expanded as follows: X_pv = f_pv(u_irradiance, u_temperature, u_panel_age, U_pv); Here, f_pv is a nonlinear mapping function, and its parameters can be identified through a hybrid approach combining physical mechanism models and data-driven models. The parent node of photovoltaic output includes three observable exogenous variables: solar irradiance u_irradiance, ambient temperature u_temperature, and photovoltaic panel aging coefficient u_panel_age. U_pv represents an unobservable random disturbance term, which follows a zero-mean Gaussian distribution and represents unmodeled random factors such as cloud cover transients.

[0033] In this application, after obtaining multi-source exogenous and endogenous variable data, the microgrid dispatching system can be modeled as a structural causal model M, M =<U, V, F> Where U is the set of exogenous variables, V is the set of endogenous variables, and F is the set of structural equations. S120. Perform conditional independence tests on the multi-source data, construct a topological structure based on the direct causal paths between variables, and obtain a candidate causal graph between variables, wherein the candidate causal graph uses prior knowledge in the power field as a constraint condition; Conditional independence means that given a variable Z, variables X and Y are conditionally independent. Once information about Z is known, X does not provide any additional help in predicting Y.

[0034] Conditional independence tests are essential in causal structure learning scenarios. Learning directed acyclic graphs from data requires determining whether two variables are independent given a third variable, thus identifying structures such as directed edges and colliders. They are also indispensable in Bayesian networks, verifying whether a candidate graph structure matches the data. In causal inference, conditional independence tests are used to verify the validity of variables.

[0035] For example, the improved Peter-Clark (PC) algorithm can be used to perform conditional independence tests on observed data to preliminarily determine the causal framework among variables. The core criterion of the PC algorithm is: There is no direct causal path from X to Y under condition set Z. If X and Y become statistically independent after controlling for a set of variables Z, then there is no direct causal path between X and Y under condition Z.

[0036] After the conditional independence test, direct causal paths are obtained. Based on the direct causal paths between variables, a topological structure is constructed to obtain candidate causal graphs. There can be multiple candidate causal graphs.

[0037] When existing microgrid AI is used for dispatching, the training of current AI dispatching models typically only considers economic or environmental benefits as optimization objectives. This leads to situations where, in extreme scenarios such as islanded operation during typhoons, emergency derating of equipment due to continuous overload, or coordinated protection against multiple overlapping faults, the AI ​​may generate dispatching instructions that violate safety regulations. For example, continuing to discharge batteries when their SOC is below the safety limit, adding load transfer to lines already near their thermal stability limits, or arbitrarily adjusting switch states without verifying the coordination of protection system action timelines. The lack of a systematic compliance verification mechanism not only increases operational risks but also severely restricts the large-scale deployment of AI dispatching technology. In some implementations, this application embeds the power industry's safe operation regulations as hard constraints into the model structure. This is because the power system is a critical infrastructure, and dispatching operations must strictly adhere to safety regulations and technical standards.

[0038] Therefore, after S120, steps A1-A2 are included: A1. Acquire pre-defined prior knowledge in the power sector; Prior knowledge from the power sector is introduced as a constraint. Expert knowledge from the power industry and safety regulations are integrated into the AI ​​decision-making process in a structured manner.

[0039] A2. Based on the prior knowledge in the power field, conditional constraints are imposed on the candidate causal graph, wherein the conditional constraints include at least one of expert knowledge constraints, temporal sequence constraints, and physical mechanism constraints.

[0040] The candidate causal graph is constrained based on prior knowledge in the power industry. This constraint includes any one of the following: expert knowledge constraints, temporal constraints, or physical mechanism constraints. For example, expert knowledge constraints refer to causal relationship chains constrained by specific operating procedures. The prior knowledge in the power industry is formalized into three types of constraints. After obtaining the candidate causal graph, reliable knowledge is first listed, written as directed edges that must exist, prohibited edges, and directional mandatory constraints. Each candidate graph is reviewed to check whether it satisfies each constraint. All edges that violate the constraints are output, forming a conflict report. Experts decide which priors are absolute and which are suggestions. The system applies these instructions sequentially according to the experts' decisions.

[0041] When constructing the candidate causal graphs mentioned above, a preliminary screening can be performed to select those with simple structures. Obtaining the optimal causal graph ensures that the constructed causal graph can explain the data without being overly complex.

[0042] This application constructs a complete knowledge graph of power safety regulations and uses this graph to automate the compliance verification of dispatch instructions.

[0043] The knowledge graph employs a structured representation of triples. Entity types include regulatory clauses, technical standards, safety procedures, equipment types, operation types, safety thresholds, electrical parameters, and emergency operations. Relationship types include various semantic relationships such as constraint, regulation, applicable, requirement, when x, then x, higher-level standard, and reference. The complete process of constructing the power safety regulatory knowledge graph is as follows: First, through specification parsing and entity extraction, natural language processing technology is used to automatically parse power industry standards, extracting structured information such as safety constraints, technical parameter thresholds, and operation procedure requirements. Then, relation construction and graph storage are performed, storing the extracted entities and relations as a graph database to support complex graph query and reasoning operations. Finally, vector embedding and similarity calculation are performed, using knowledge graph embedding algorithms to map entities and relations to a continuous vector space.

[0044] After constructing a complete knowledge graph of power safety regulations, compliance verification is performed. Each AI-generated dispatch instruction must pass a three-level compliance check before being issued and executed. The first level is a hard constraint check, verifying whether the dispatch instruction violates the rigid safety constraints of the power system, including voltage deviation exceeding limits, frequency offset exceeding limits, thermal stability limit exceeding limits, and SOC safety boundary breaching. The second level is a procedure compliance check, semantically matching the dispatch instruction with the operating procedures in the knowledge graph to check for violations of operating procedures, failure to meet preconditions, or exceeding the equipment's rated range. The third level is expert review triggering; for high-risk operations involving islanded operation, black start, or large load transfer, a manual expert review process is automatically triggered, temporarily suspending execution pending confirmation.

[0045] Following S120, steps A3-A4 are also included: A3. Based on the topology of the candidate causal graph and the observation data, determine the maximum likelihood value corresponding to the candidate causal graph, wherein the maximum likelihood value characterizes the degree of fit to the observation data; The topology of the candidate causal graph is optimized. The maximum likelihood value characterizes the degree of fit to the observed data.

[0046] For example, the Bayesian Information Criterion (BIC) can be used to score and optimize candidate causal graph structures.

[0047] Where G is the structure of the candidate causal graph, and D is the observation dataset. θ is the maximum likelihood value given the graph structure G and the observed dataset. |θ| is the number of parameters, and N is the sample size. BIC(G) is the maximum likelihood value corresponding to the candidate causal graph. The optimal candidate causal graph is obtained by searching for the graph structure that minimizes the maximum likelihood value. This ensures that the constructed causal graph can explain the data without being overly complex.

[0048] A4. Based on the maximum likelihood value, a target candidate causal graph is selected from multiple candidate causal graphs to simulate intervention on the target candidate causal graph.

[0049] S130. Simulate intervention on the candidate causal graph using the current scheduling strategy, and calculate the difference in causal effects brought about by the floating change of the current scheduling strategy. The difference in causal effects refers to the impact on the target variable if a scheduling variable is actively changed. Specifically, this involves actively changing one scheduling variable while keeping other variables constant.

[0050] By controlling the current scheduling strategy to allow for appropriate interval fluctuations, the difference in causal effects is calculated. This difference in causal effects can intuitively reflect or explain the basis for decision comparison. It is not a correlation, but rather the difference in causal relationship that truly leads to the correct outcome.

[0051] S130 includes steps S1301-S1304: S1301. Simulate intervention on the candidate causal graph using the current scheduling strategy, and calculate the first causal effect brought about by the current scheduling strategy. For example, in a microgrid dispatching scenario, the current dispatching strategy is to increase the energy storage discharge power. We need to assess the causal effect of this dispatching strategy on the system operating costs.

[0052] For example, the system operating cost is calculated when the energy storage discharge power is 30kW, thus obtaining the first causal effect.

[0053] S1302. By keeping the hybrid variable fixed, the current scheduling strategy is changed in a single dimension by floating. The hybrid variable refers to other variables besides the current single variable. The current single variable is the single-dimensional control variable corresponding to the current scheduling strategy. Increasing the discharge power of energy storage requires identifying and controlling all confounding variables to obtain unbiased causal effect estimates. Confounding variables include current electricity prices, load demand, and predicted photovoltaic output. By keeping these confounding variables constant, the current dispatch strategy can be dynamically adjusted in a single dimension, such as increasing the energy storage discharge power from 30kW to 50kW.

[0054] S1303. Simulate intervention on the candidate causal graph using the current scheduling strategy with floating changes, and calculate the second causal effect brought about by the current scheduling strategy with floating changes. The system operating cost when the energy storage discharge power is 50kW is calculated, and the second causal effect is obtained.

[0055] S1304. Calculate the difference between the first causal effect and the second causal effect to obtain the difference in causal effects brought about by the current scheduling strategy floating change.

[0056] The difference between the first causal effect and the second causal effect is calculated to obtain the difference in system operating costs resulting from increasing the energy storage discharge power from 30kW to 50kW.

[0057] Based on this, the single-dimensional floating change of the current scheduling policy is calculated. Sometimes, the current scheduling policy has multiple dimensions of variable change, not just one. Therefore, in some embodiments, multiple causal effect differences can be obtained based on the floating change of each single dimension. These multiple causal effect differences are averaged to obtain the average treatment effect difference, thus quantifying the overall impact of the floating change of the scheduling policy.

[0058] S140. Based on the observational evidence of the differential scheduling strategy and the current scheduling strategy, counterfactual reasoning is performed on the candidate causal graph to obtain the counterfactual verification result, wherein the differential scheduling strategy is different from the current scheduling strategy. Counterfactual reasoning verification is the highest level of reasoning in causal inference. Applied to verifying candidate causal graphs, it can effectively supplement prior knowledge constraints. Counterfactual reasoning asks what would have happened if things had gone differently. When verifying causal graphs, counterfactual methods are used to check whether the counterfactual results predicted based on the current causal graph conform to domain common sense or a certain comparison with actual observations.

[0059] A counterfactual reasoning mechanism is introduced into the scheduling system to perform post-hoc evaluation and verification of executed scheduling decisions. Counterfactual reasoning does not require actual intervention; its core idea is to answer the hypothetical question of how the system state would have changed if a different scheduling strategy had been adopted.

[0060] Based on observational evidence of the distinguishing scheduling strategy and the current scheduling strategy, counterfactual reasoning is used to verify the candidate causal graph. The distinguishing scheduling strategy differs from the current scheduling strategy. The posterior distribution of the exogenous variable U is inferred from the observational evidence for retrospective analysis. Hypothetical interventions are performed in the structural causal model, modifying the corresponding model, i.e., the structural equations.

[0061] For example, counterfactual results are calculated in the modified model, and counterfactual reasoning provides the following form of decision explanation for the operation and maintenance personnel: When the energy storage discharge command is executed at 14:00, if the discharge power is reduced from 50kW to 30kW at that time, the system operating cost is expected to increase by about 12.3%, but the battery life loss can be reduced by about 8.7%.

[0062] After comprehensive consideration, the current solution is superior to the alternative. This explanation based on causal mechanisms achieves a qualitative improvement in terms of understanding and trust among operations and maintenance personnel compared to the traditional feature importance ranking.

[0063] S150. Based on the causal effect difference, the counterfactual verification result, and the link integrity, the current scheduling strategy is scored on the causal interpretability dimension to obtain the interpretability score of the current scheduling strategy and AI scheduling is performed. The link integrity is the completeness of the causal link traceability. The higher the interpretability score, the higher the interpretability of the current scheduling strategy.

[0064] By comprehensively comparing the differences in causal effects, counterfactual verification results, and link integrity, the causal effects of the current scheduling strategy are evaluated from various perspectives, making the scheduling strategy explainable.

[0065] Causal explainability score is used as a quantitative indicator to measure the explainability of scheduling decisions: CES = (1 / |D|) · Σ_{d∈D} [α·SHAP_causal(d) + β·CF_valid(d) + γ·Trace_complete(d)]; Where D represents the set of scheduling decisions to be evaluated, SHAP_causal(d) is the SHAP value attribution score based on the current causal graph, CF_valid(d) is the validity score of the counterfactual reasoning result, taking a value of 0 or 1, Trace_complete(d) is the causal link traceability completeness score, and α, β, and γ are weighting coefficients satisfying α + β + γ = 1. CES represents the causal interpretability score of the current scheduling strategy; the higher the score, the more interpretable the system's scheduling decisions are. This metric is used as one of the optimization objectives in the causal reinforcement multi-objective joint optimization algorithm, incentivizing the algorithm to prioritize solutions with stronger interpretability.

[0066] This application proposes a Causal-enhanced Pareto Joint Optimization (CPJO) algorithm, which integrates the results of causal inference as guiding factors for the optimization objective into the solution process of the scheduling strategy. The optimization objective function of this algorithm is defined as: min F(s) = w1*C_cost(s) + w2*C_emission(s) + w3*R_risk(s) - w4*E_causal(s); Where s is the scheduling policy vector, C_cost is the operating cost target, C_emission is the carbon emission target, R_risk is the safety risk target, E_causal is the causal interpretability score, and w1 to w4 are the weight coefficients of each target. The causal interpretability score E_causal is calculated based on the aforementioned CES index and is included as a negative term in the objective function to incentivize the algorithm to prioritize scheduling schemes with stronger causal interpretability.

[0067] The safety risk objective R_risk is quantified in the following ways: R_risk(s) = Sum_{i=1}^{M} omega_i * max(0, g_i(s) - g_i_max);

[0068] Where g_i(s) is the value of the i-th security indicator under policy s, g_i_max is the corresponding security threshold obtained from the knowledge graph, and omega_i is the penalty weight. This design incorporates security constraints into the optimization objective in a soft constraint manner to avoid the problem of an empty feasible region caused by hard constraints, while ensuring that security constraints are not violated through high penalty weights.

[0069] The CPJO algorithm employs an improved NSGA-III multi-objective evolutionary algorithm, where the mutation operator is guided by causal inference results. Specifically, in each generation of evolution, the causal inference engine identifies key causal factors in the current scenario and uses them as a guide for mutation direction, enabling the optimization search to explore along causal relationship chains in a targeted manner, significantly improving solution efficiency and the quality of the Pareto front.

[0070] This application's AI scheduling strategy features an interpretability score, representing the degree of interpretability of the reasoning. Unlike existing technologies that only provide statistical correlation explanations at the level of feature importance ranking, this application goes beyond general statistical explanations, revealing the causal mechanisms between variables and supporting counterfactual reasoning that changes in a given input condition will affect the scheduling outcome. Through a three-stage causal reasoning process—causal graph construction, computational intervention analysis, and counterfactual reasoning verification—the generation logic of scheduling decisions is elevated from the statistical correlation level to the causal mechanism level, allowing operations personnel to trace the causal driving factors of each scheduling instruction and significantly reducing the rate of manual intervention. Regarding interpretability, by introducing a structural causal model to replace traditional statistical correlation analysis methods, the explanation of scheduling decisions is elevated from identifying which features are important to understanding the causal mechanism of why scheduling is performed in this way.

[0071] Experiments show that the rate of manual intervention by operations and maintenance personnel in AI scheduling instructions can be reduced from 54.3% to 18.7%, with the credibility score of the causal explanation reaching 4.2 points, which is significantly better than the SHAP explanation method's 3.1 points and the LIME explanation method's 2.8 points.

[0072] This application improves the interpretability of instructions by revealing the causal mechanism between variables and demonstrating counterfactual reasoning that changing a certain input condition will alter the scheduling outcome. It elevates the generation logic of scheduling decisions from the level of statistical correlation to the level of causal mechanisms, making the causal traceability of each scheduling instruction traceable and significantly reducing the rate of human intervention.

[0073] This application utilizes a large-scale inference model for AI scheduling. This model, serving as the system's top-level strategy engine, is responsible for formulating global scheduling strategies, making multi-objective trade-off decisions, and performing reasoning analysis in complex scenarios. It employs a large language model enhanced with knowledge of the power sector as the inference engine, and uses the LoRA (Low-Rank Adaptation) method for efficient parameter fine-tuning. The large-scale inference model is also equipped with a retrieval enhancement generation module, injecting relevant clauses from the power safety regulations knowledge graph as context into the inference process to ensure that the generated scheduling strategies comply with industry standards. The RAG retrieval process uses a hybrid strategy of vector similarity and keyword retrieval to ensure a balance between recall and precision. The domain agent acts as an intermediate coordination layer, responsible for decomposing the high-level strategies generated by the large-scale inference model into executable sub-tasks and coordinating the collaborative operation of multiple specialized smaller models. Specifically, the new energy prediction agent is responsible for scheduling photovoltaic and wind power output prediction tasks; the load management agent is responsible for load prediction and demand response management; the energy storage scheduling agent is responsible for optimizing battery system charging and discharging strategies; the safety supervision agent is responsible for real-time safety constraint checks and compliance verification; and the trading decision agent is responsible for formulating and executing power market trading strategies. The agents communicate with each other through a unified message bus.

[0074] Prior to S150, steps B1 through B5 are included: B1. Establish the model to be trained; The steps of scoring the causal interpretability dimension of the current scheduling strategy and performing AI inference based on causal effect differences, counterfactual verification results, and link integrity are completed by the model. Before inference, the model needs to be built. First, a preliminary training model is built for training purposes.

[0075] B2. Distribute the model to be trained to each microgrid node so that each node can train it locally, and obtain the trained model parameters uploaded by each microgrid node. Microgrids contain various nodes that may belong to different operating entities or administrative regions, blurring data sovereignty boundaries and further increasing legal and trust barriers to data sharing. Data shows that by analyzing microgrid load curve data alone, production scheduling information for industrial users can be inferred with 78.6% accuracy. While federated learning has been introduced into the field of power dispatching, most existing solutions use simple FedAvg aggregation strategies, exposing gradient privacy. Attackers can recover more than 80% of the original training data through gradient inversion attacks.

[0076] This application presents a triple-privacy-protected collaborative scheduling framework integrating federated learning, secure multi-party computation, and differential privacy. While ensuring the accuracy of collaborative scheduling among multiple microgrid nodes, it achieves a zero-leakage data collaboration mode where raw data remains locally, model parameters are transmitted with encryption, and the privacy budget is quantifiable and traceable. The training model is distributed to microgrid nodes for local training. The central server distributes the global model to each node, which trains using local data and uploads the trained model parameters. The server then aggregates these parameters using a formula to create a new global model. In this way, each node contributes local knowledge, but the raw data never leaves its local machine.

[0077] B2, including steps C1-C3: C1. The model to be trained is distributed to each microgrid node, wherein each microgrid node generates a corresponding number of random fragments, retains the last fragment, and distributes the other fragments to the corresponding network nodes for local training. After training, the partial aggregation result of the encrypted text is uploaded with the gradient of the corresponding node. To prevent gradient inversion attacks, a secure multi-party computation protocol based on additive secret sharing is used to encrypt and aggregate the model gradients. After local training, each microgrid node k shares its gradient vectors using additive secret sharing. Each node k generates K-1 random partitions and sends the j-th partition to node j, while retaining the last partition.

[0078] The training is performed locally on each node, and after training, the aggregated results of the ciphertext are uploaded with the gradients of their respective nodes.

[0079] Following C1, steps D1-D2 are included: D1. Each microgrid node adds Gaussian noise with a calibration difference to the gradient and uploads a portion of the aggregated result of the encrypted text with the gradient of its respective node. D2. A global privacy budget counter tracks the accumulated privacy loss in real time, automatically stopping federated training when a preset threshold is reached. Building upon secure aggregation, a Gaussian-based differential privacy protection mechanism is further introduced to provide provable privacy guarantees for model parameters. Before uploading gradients at each node, norm clipping is performed on the gradients, followed by adding Gaussian noise representing the calibration difference. A smaller privacy budget indicates stronger privacy protection but also a greater loss of model accuracy.

[0080] Federated learning involves many rounds, each adding noise and consuming a portion of the privacy budget. The Rényi differential privacy computation framework is introduced for more precise privacy budget management. When the accumulated privacy loss approaches a preset threshold, the system automatically triggers an alarm and stops further federated training, ensuring that the overall privacy loss remains within a controllable range.

[0081] C2. Obtain the uploaded partial aggregation results and sum them to obtain variables; The aggregation server obtains encrypted fragments of the gradients from each node, rather than the original gradients, thus fundamentally eliminating the risk of gradient leakage. Each node, after receiving fragments from other nodes, performs partial aggregation locally. The resulting partial aggregation is then uploaded to the central server. The server only needs to sum the aggregated partial results to obtain the variables, but it can never access the original gradient information of any individual node.

[0082] C3. Based on the variables, determine the parameters of the trained model.

[0083] B3. Determine the verification loss of the node, wherein the verification loss of the node is the verification loss of the current microgrid node in the current round in the local area. L_k^(t) is the local validation loss of node k in round t.

[0084] B4. Using the verification loss of the node as a negative exponential modulation factor, the aggregation weight of the current microgrid node is obtained, wherein the smaller the verification loss, the higher the aggregation weight. Using L_k^(t) as a negative exponential modulation factor, the aggregate weight λ_k^(t) of the current microgrid node is obtained.

[0085] Unlike the classic FedAvg model, which only weights data by sample size, this model introduces a negative exponential modulation factor for the validation loss. This allows nodes with better training performance to receive higher aggregation weights, effectively addressing the problem of uneven data distribution in multi-microgrid scenarios. A smaller validation loss indicates better learning performance; assigning higher aggregation weights to smaller validation losses guides the model towards better learning outcomes.

[0086] B5. Based on the aggregated weights, the trained model parameters uploaded by each node are aggregated and updated to obtain the trained model, which is used to score the causal interpretability dimension of the current scheduling strategy and for AI scheduling based on the trained model.

[0087] Multiply the aggregated weights by the current model parameters to obtain the new aggregated and updated model parameters.

[0088] This application, while ensuring the accuracy of collaborative scheduling among multiple microgrid nodes, achieves a zero-leakage data collaboration mode where raw data remains locally, model parameters are transmitted with encryption, and privacy budgets are quantifiable and traceable. The aggregation weight of each microgrid node comprehensively considers the local training sample size and validation loss, and uses a negative exponential modulation factor for weighting, so that nodes with better training performance receive higher aggregation weights, in order to address the problem of non-independent and identically distributed data in multi-microgrid scenarios.

[0089] This application constructs a three-layer collaborative scheduling architecture consisting of a large inference model, a domain-specific intelligent agent, and a specialized small model. Each layer undertakes scheduling tasks of different granularities, forming a complete scheduling link from macro-strategy formulation to micro-device control.

[0090] The inference big model layer serves as the strategy layer. As the top-level strategy engine of the system, it is responsible for formulating global scheduling strategies, making multi-objective trade-off decisions, and performing inference analysis for complex scenarios. A large language model (LLM) enhanced with power domain knowledge is used as the inference engine, and parameters are efficiently fine-tuned using the LoRA (Low-Rank Adaptation) method. The inference big model is also equipped with a retrieval enhancement generation module, which injects relevant clauses from the power safety regulations knowledge graph as context into the inference process, ensuring that the generated scheduling strategies comply with industry standards. The RAG retrieval process employs a hybrid strategy of vector similarity and keyword retrieval to ensure a balance between recall and precision.

[0091] The domain agent layer serves as the coordination layer, responsible for decomposing the high-level strategies generated by the large inference model into executable sub-tasks and coordinating the coordinated operation of multiple specialized small models. Five types of domain agents are designed: a new energy forecasting agent responsible for scheduling photovoltaic and wind power output forecasting tasks; a load management agent responsible for load forecasting and demand response management; an energy storage scheduling agent responsible for optimizing battery system charging and discharging strategies; a safety supervision agent responsible for real-time safety constraint checks and compliance verification; and a trading decision agent responsible for formulating and executing electricity market trading strategies. All agents communicate via a unified message bus, with messages defined using a structured JSON Schema format, including fields such as task identifier, execution parameters, constraints, priority, and deadline. Agents use a state machine model to manage their lifecycle, comprising six states: idle, planning, execution, waiting, completion, and exception.

[0092] The specialized small model layer, serving as the execution layer, is deployed locally at each microgrid node and is responsible for specific prediction, optimization, and control tasks. These include: a photovoltaic output prediction model based on an LSTM-Attention architecture; a load prediction model based on TemporalConvolutional Network; an energy storage optimization model based on Deep Q-Network and its variants; and a power electronics control model based on Model Predictive Control (MPC). The inference latency of these small models is controlled at the millisecond level, fully meeting the timeliness requirements of real-time scheduling. This three-layer collaborative architecture solves the complete scheduling chain problem from macro-level strategy formulation to micro-level device control, which is the key difference from traditional single-model scheduling.

[0093] This application provides a reliable AI scheduling method, system, and computer device for microgrids. The method includes: acquiring multi-source data; performing conditional independence tests on the multi-source data, constructing a topology based on direct causal paths between variables to obtain a candidate causal graph, wherein the candidate causal graph uses prior knowledge in the power sector as constraints; simulating intervention on the candidate causal graph using the current scheduling strategy to calculate the causal effect differences caused by fluctuations in the current scheduling strategy; performing counterfactual reasoning verification on the candidate causal graph based on observational evidence of the distinguishing scheduling strategy and the current scheduling strategy to obtain a counterfactual verification result, wherein the distinguishing scheduling strategy is different from the current scheduling strategy; and scoring the current scheduling strategy on a causal interpretability dimension based on the causal effect differences, the counterfactual verification result, and link integrity to obtain an interpretability score for the current scheduling strategy and performing AI scheduling, wherein the link integrity refers to the completeness of causal link traceability, and the higher the interpretability score, the higher the interpretability of the current scheduling strategy. This application reveals the causal mechanism between variables and demonstrates counterfactual reasoning that changes in variables lead to changes in scheduling outcomes, thus improving the interpretability of scheduling strategies. It elevates the generation logic of scheduling decisions from the level of statistical correlation to the level of causal mechanisms, enabling the tracing of the causal driving factors of each scheduling instruction and significantly reducing the rate of human intervention. Furthermore, the causal graph uses prior knowledge in the power sector as constraints, ensuring the safety and compliance of scheduling and making AI scheduling results more reliable. This addresses the reliance on human intervention in the application of AI scheduling in microgrids.

[0094] Figure 2 This is a schematic block diagram of a trusted AI scheduling system for microgrids provided in an embodiment of this application. Figure 2 As shown, the microgrid trusted AI scheduling system includes a user interaction module, a causal reasoning engine module, a security and compliance module, and a scheduling module, wherein: The user interaction module is used to acquire data from multiple sources. The causal reasoning engine module is used to perform conditional independence tests on the multi-source data, construct a topological structure based on the direct causal paths between variables, and obtain a candidate causal graph between variables; The safety and compliance module is used to use prior knowledge in the power sector as constraints on the candidate causal graph. The causal reasoning engine module is also used to simulate intervention on the candidate causal graph with the current scheduling strategy, calculate the difference in causal effects brought about by the floating change of the current scheduling strategy; and perform counterfactual reasoning verification on the candidate causal graph based on observational evidence of the distinguishing scheduling strategy and the current scheduling strategy to obtain the counterfactual verification result, wherein the distinguishing scheduling strategy is different from the current scheduling strategy. The scheduling module is used to score the current scheduling strategy on the causal interpretability dimension based on the causal effect difference, the counterfactual verification result, and the link integrity, to obtain the interpretability score of the current scheduling strategy and perform AI scheduling. The link integrity refers to the completeness of the causal link traceability. The higher the interpretability score, the higher the interpretability of the current scheduling strategy.

[0095] In some embodiments, the microgrid trusted AI scheduling system further includes: a privacy computing module. Before scoring the current scheduling strategy on the causal interpretability dimension based on the causal effect difference, the counterfactual verification result, and the link integrity, and obtaining the interpretability score of the current scheduling strategy for AI scheduling, after establishing the model to be trained, the privacy computing module is used to distribute the model to be trained to each microgrid node for local training and to obtain the trained model parameters uploaded by each microgrid node; determine the verification loss of the node, wherein the verification loss of the node is the verification loss of the current microgrid node in the current round locally; use the verification loss of the node as a negative exponential modulation factor to obtain the aggregate weight of the current microgrid node, wherein the smaller the verification loss, the higher the aggregate weight; and aggregate and update the trained model parameters uploaded by each node based on the aggregate weight to obtain the trained model, which is used to score the current scheduling strategy on the causal interpretability dimension and for AI scheduling based on the trained model.

[0096] In summary, the microgrid trusted AI scheduling system in this application acquires multi-source data; performs conditional independence tests on the multi-source data; constructs a topology based on direct causal paths between variables to obtain candidate causal graphs, wherein the candidate causal graphs are constrained by prior knowledge in the power sector; simulates intervention on the candidate causal graphs using the current scheduling strategy to calculate the causal effect differences caused by fluctuations in the current scheduling strategy; verifies the candidate causal graphs using counterfactual reasoning based on observational evidence distinguishing the current scheduling strategy from the current scheduling strategy, obtaining counterfactual verification results, wherein the distinguishing scheduling strategy differs from the current scheduling strategy; and scores the current scheduling strategy on a causal interpretability dimension based on the causal effect differences, the counterfactual verification results, and link integrity, obtaining an interpretability score for the current scheduling strategy and performing AI scheduling, wherein the link integrity refers to the completeness of causal link traceability, and the higher the interpretability score, the higher the interpretability of the current scheduling strategy. This application reveals the causal interaction mechanism between variables and the counterfactual verification reasoning that changes in variables lead to changes in scheduling results, thus improving the interpretability of the scheduling strategy. By elevating the generation logic of dispatch decisions from the statistical correlation level to the causal mechanism level, the causal driving factors of each dispatch instruction can be traced, significantly reducing the rate of human intervention. Moreover, the causal graph uses prior knowledge in the power field as constraints, which can ensure the safety and compliance of dispatching, making the AI ​​dispatch results more reliable. This solves the problem of dependence on human intervention in the application of AI dispatching in microgrids.

[0097] It should be noted that those skilled in the art can clearly understand that the specific implementation process of the aforementioned microgrid trusted AI scheduling system and its various units can be found in the corresponding descriptions in the aforementioned method embodiments. For the sake of convenience and brevity, these descriptions will not be repeated here.

[0098] The aforementioned microgrid trusted AI scheduling system can be implemented as a computer program, which can be used in, for example... Figure 3 It runs on the computer device shown.

[0099] Please see Figure 3 , Figure 3 This is a schematic block diagram of a computer device 700 provided in an embodiment of this application. The computer device 700 can be a terminal or a server. The terminal can be an electronic device with communication functions, such as a smartphone, tablet, laptop, desktop computer, personal digital assistant, or wearable device. The server can be a standalone server or a server cluster composed of multiple servers.

[0100] See Figure 3The computer device 700 includes a processor 702, a memory, and a network interface 705 connected via a system bus 701. The memory may include a non-volatile storage medium 703 and internal memory 704.

[0101] The non-volatile storage medium 703 may store an operating system 7031 and a computer program 7032. The computer program 7032 includes program instructions that, when executed, cause the processor 702 to perform a microgrid trusted AI scheduling method.

[0102] The processor 702 provides computing and control capabilities to support the operation of the entire computer device 700.

[0103] The internal memory 704 provides an environment for the execution of the computer program 7032 in the non-volatile storage medium 703. When the computer program 7032 is executed by the processor 702, the processor 702 can execute a microgrid trusted AI scheduling method.

[0104] This network interface 705 is used for network communication with other devices. Those skilled in the art will understand that... Figure 3 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device 700 to which the present application is applied. The specific computer device 700 may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0105] The processor 702 is used to run the computer program 7032 stored in the memory to perform the following steps: Acquire multi-source data; Conditional independence is tested on the multi-source data, and a topological structure is constructed based on the direct causal path between variables to obtain a candidate causal graph between variables, wherein the candidate causal graph uses prior knowledge in the power field as a constraint. The candidate causal graph is simulated and intervened with the current scheduling strategy to calculate the difference in causal effects caused by the floating change of the current scheduling strategy. Based on observational evidence of the differentiated scheduling strategy and the current scheduling strategy, counterfactual reasoning is performed on the candidate causal graph to obtain a counterfactual verification result, wherein the differentiated scheduling strategy is different from the current scheduling strategy. Based on the causal effect differences, the counterfactual verification results, and the link integrity, the current scheduling strategy is scored on the causal interpretability dimension to obtain the interpretability score of the current scheduling strategy and perform AI scheduling. The link integrity refers to the completeness of the causal link traceability. The higher the interpretability score, the higher the interpretability of the current scheduling strategy.

[0106] It should be understood that in the embodiments of this application, the processor 702 may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.

[0107] It will be understood by those skilled in the art that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program includes program instructions and can be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the process steps of the embodiments of the above methods.

[0108] Based on observational evidence of the differentiated scheduling strategy and the current scheduling strategy, counterfactual reasoning is performed on the candidate causal graph to obtain a counterfactual verification result, wherein the differentiated scheduling strategy is different from the current scheduling strategy. Based on the causal effect differences, the counterfactual verification results, and the link integrity, the current scheduling strategy is scored on the causal interpretability dimension to obtain the interpretability score of the current scheduling strategy and perform AI scheduling. The link integrity refers to the completeness of the causal link traceability. The higher the interpretability score, the higher the interpretability of the current scheduling strategy.

[0109] The storage medium can be any computer-readable storage medium that can store program code, such as a USB flash drive, external hard drive, read-only memory (ROM), magnetic disk, or optical disk.

[0110] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0111] In the embodiments provided in this application, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are merely illustrative. For example, the division of each unit is only a logical functional division, and there may be other division methods in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.

[0112] The steps in the methods of this application embodiment can be adjusted, merged, or deleted according to actual needs. The units in the system of this application embodiment can be merged, divided, or deleted according to actual needs. Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0113] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a terminal, or a network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application.

[0114] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A microgrid trusted AI scheduling method, characterized in that, The method includes: Acquire multi-source data; Conditional independence is tested on the multi-source data, and a topological structure is constructed based on the direct causal path between variables to obtain a candidate causal graph between variables, wherein the candidate causal graph uses prior knowledge in the power field as a constraint. The candidate causal graph is simulated and intervened with the current scheduling strategy to calculate the difference in causal effects caused by the floating change of the current scheduling strategy. Based on observational evidence of the differentiated scheduling strategy and the current scheduling strategy, counterfactual reasoning is performed on the candidate causal graph to obtain a counterfactual verification result, wherein the differentiated scheduling strategy is different from the current scheduling strategy. Based on the causal effect differences, the counterfactual verification results, and the link integrity, the current scheduling strategy is scored on the causal interpretability dimension to obtain the interpretability score of the current scheduling strategy and perform AI scheduling. The link integrity refers to the completeness of the causal link traceability. The higher the interpretability score, the higher the interpretability of the current scheduling strategy.

2. The method of claim 1, wherein, The step of simulating intervention on the candidate causal graph using the current scheduling strategy and calculating the differences in causal effects caused by the floating change of the current scheduling strategy includes: The candidate causal graph is simulated and intervened using the current scheduling strategy to calculate the first causal effect brought about by the current scheduling strategy. By keeping the promiscuous variables fixed, the current scheduling strategy is changed in a single dimension. The promiscuous variables refer to variables other than the current single variable, and the current single variable is the single-dimensional control variable corresponding to the current scheduling strategy. The candidate causal graph is simulated and intervened with the current scheduling strategy that is changing with floating, and the second causal effect brought about by the current scheduling strategy that is changing with floating is calculated. The difference between the first causal effect and the second causal effect is calculated to obtain the difference in causal effects caused by the current scheduling strategy floating change.

3. The method of claim 1, wherein, Before the step of scoring the current scheduling strategy on the causal interpretability dimension based on the causal effect difference, the counterfactual verification result, and the link integrity, and obtaining the interpretability score of the current scheduling strategy and performing AI scheduling, includes: Establish the model to be trained; The model to be trained is distributed to each microgrid node for local training, and the trained model parameters uploaded by each microgrid node are obtained. Determine the verification loss of a node, wherein the verification loss of the node is the verification loss of the current microgrid node in the current round in the local area; The verification loss of the node is used as a negative exponential modulation factor to obtain the aggregation weight of the current microgrid node, wherein the smaller the verification loss, the higher the aggregation weight. Based on the aggregated weights, the trained model parameters uploaded by each node are aggregated and updated to obtain the trained model, which is then used to score the causal interpretability dimension of the current scheduling strategy and for AI scheduling.

4. The method of claim 3, wherein, The step of distributing the model to be trained to each microgrid node for local training and obtaining the trained model parameters uploaded by each microgrid node includes: The model to be trained is distributed to each microgrid node. Each microgrid node generates a corresponding number of random fragments, retains the last fragment, and distributes the other fragments to the corresponding network nodes for local training. After training, the aggregated results of the encrypted text are uploaded according to the gradient of their respective nodes. The uploaded partial aggregation results are obtained and summed to obtain the global aggregation gradient; Based on the global aggregated gradient, the parameters of the trained model are determined.

5. The method of claim 4, wherein, After the model to be trained is distributed to each microgrid node, the following steps are included: Each microgrid node adds Gaussian noise with a calibration difference to the gradient and uploads a portion of the aggregated result of the ciphertext with its corresponding node gradient. The accumulated privacy loss is tracked in real time by a global privacy budget counter, and federated training is automatically stopped when a preset threshold is reached.

6. The method according to claim 1, characterized in that, The step of performing conditional independence tests on the multi-source data, constructing a topological structure based on direct causal paths between variables, and obtaining a candidate causal graph between variables includes: Acquire pre-defined prior knowledge in the power sector; The candidate causal graph is subject to conditional constraints based on the prior knowledge in the power field, wherein the conditional constraints include at least one of expert knowledge constraints, temporal sequence constraints, and physical mechanism constraints.

7. The method according to claim 1, characterized in that, The step of performing conditional independence tests on the multi-source data, constructing a topological structure based on direct causal paths between variables, and obtaining a candidate causal graph between variables includes: Based on the topology of the candidate causal graph and the observation data, the maximum likelihood value corresponding to the candidate causal graph is determined, wherein the maximum likelihood value characterizes the degree of fit to the observation data; Based on the maximum likelihood value, a target candidate causal graph is selected from multiple candidate causal graphs to simulate intervention on the target candidate causal graph.

8. A trusted AI scheduling system for microgrids, characterized in that, The system includes: The user interaction module is used to acquire data from multiple sources. The causal reasoning engine module is used to perform conditional independence tests on the multi-source data, construct a topological structure based on the direct causal paths between variables, and obtain a candidate causal graph between variables; The safety and compliance module is used to use prior knowledge in the power sector as constraints on the candidate causal graph. The causal reasoning engine module is also used to simulate intervention on the candidate causal graph with the current scheduling strategy, calculate the difference in causal effects brought about by the floating change of the current scheduling strategy; and perform counterfactual reasoning verification on the candidate causal graph based on observational evidence of the distinguishing scheduling strategy and the current scheduling strategy to obtain the counterfactual verification result, wherein the distinguishing scheduling strategy is different from the current scheduling strategy. The scheduling module is used to score the current scheduling strategy on the causal interpretability dimension based on the causal effect difference, the counterfactual verification result, and the link integrity, to obtain the interpretability score of the current scheduling strategy and perform AI scheduling. The link integrity refers to the completeness of the causal link traceability. The higher the interpretability score, the higher the interpretability of the current scheduling strategy.

9. The system according to claim 8, characterized in that, The system further includes a privacy computing module. Before scoring the current scheduling strategy on the causal interpretability dimension based on the causal effect difference, the counterfactual verification result, and the link integrity, and obtaining the interpretability score of the current scheduling strategy for AI scheduling, after establishing the model to be trained, the privacy computing module is used to: distribute the model to be trained to each microgrid node for local training, and obtain the trained model parameters uploaded by each microgrid node; determine the verification loss of the node, wherein the verification loss of the node is the verification loss of the current microgrid node in the current round locally; use the verification loss of the node as a negative exponential modulation factor to obtain the aggregate weight of the current microgrid node, wherein the smaller the verification loss, the higher the aggregate weight; and aggregate and update the trained model parameters uploaded by each node based on the aggregate weight to obtain the trained model, which is used for scoring the current scheduling strategy on the causal interpretability dimension and for AI scheduling based on the trained model.

10. A computer device for trusted AI scheduling of microgrids, characterized in that, The system includes a memory, a processor, and a microgrid trusted AI scheduler stored in the memory and executable on the processor. The processor executes the microgrid trusted AI scheduler to implement the steps of the microgrid trusted AI scheduling method according to any one of claims 1 to 7.