A large-scale model-guided risk scheduling method and system for multi-energy microgrids

By employing a dual-timescale collaborative optimization architecture, combined with deep reinforcement learning and a large language model, the problems of blind exploration of the action space and violation of physical constraints in multi-energy microgrid scheduling are solved. This enables safe and efficient risk-aware multi-energy microgrid collaborative scheduling, improving the convergence efficiency and robustness of the scheduling strategy.

CN122371352APending Publication Date: 2026-07-10WUHAN UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
WUHAN UNIV
Filing Date
2026-06-10
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

Existing multi-energy microgrid scheduling methods suffer from several drawbacks when dealing with risk-sensitive tasks in large-scale continuous action spaces. These include blind action space exploration strategies, difficulty in quickly converging to a safe and feasible region, and the direct control of large language models, which can easily generate inoperable actions that violate physical constraints, threatening the safe and stable operation of the system.

Method used

A dual-timescale collaborative optimization architecture is adopted, combining deep reinforcement learning and a large language model. By constructing a physical model of a multi-energy microgrid and a Markov decision process, an inner-loop real-time control and an outer-loop inference loop are designed. The logical reasoning of the large language model guides deep reinforcement learning to achieve risk-aware collaborative scheduling of the multi-energy microgrid.

Benefits of technology

It significantly improves the convergence efficiency and sample utilization of reinforcement learning, ensures the economy of scheduling strategies and robustness in extreme scenarios, and effectively balances the operating costs and risk control of multi-energy microgrids.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122371352A_ABST
    Figure CN122371352A_ABST
Patent Text Reader

Abstract

This invention discloses a large-model-guided risk scheduling method and system for multi-energy microgrids. First, a physical model of the multi-energy microgrid is constructed and reconstructed as a Markov decision process considering conditional value of risk (CVaR). Second, a dual-timescale deep reinforcement learning architecture integrating large language model inference is built, designing an inner-loop real-time control loop and an outer-loop LLM inference loop. Third, an inference-driven action space exploration mechanism is established, using LLM to achieve directional bias injection and adaptive variance modulation, explicitly guiding the exploration direction and intensity of reinforcement learning. Finally, the CVaR index is integrated into risk-aware exploration and control, iteratively optimizing and outputting the optimal unit output and reserve capacity scheduling scheme. This invention significantly improves the convergence efficiency and sample utilization of reinforcement learning, ensures the economy of the scheduling strategy and its robustness in extreme scenarios, balances the operating cost and risk control of multi-energy microgrids, and possesses strong engineering practicality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power system microgrid optimization scheduling technology, and particularly to a method for energy management and collaborative scheduling of multi-energy microgrids. More specifically, it relates to a large-scale model-guided risk scheduling method and system for multi-energy microgrids. Background Technology

[0002] Currently, the low-carbon and clean transformation of energy structures has become a global consensus. Against this backdrop, multi-energy microgrid (MEMG) systems, which integrate renewable energy sources such as wind and solar power, have attracted widespread attention from academia and industry due to their significant advantages in improving energy efficiency and reducing carbon emissions. A MEMG is an integrated energy system that deeply couples multiple energy flows—electricity, gas, and heat—achieving coordinated operation of power, natural gas, and heating networks through core equipment such as combined heat and power (CHP) units, gas-fired boilers, and energy storage systems.

[0003] However, the actual operation of multi-energy microgrids still faces many core challenges. On the one hand, renewable energy sources such as photovoltaic and wind power have inherent intermittency and strong randomness, resulting in significant uncertainty in the power output at the microgrid source end. On the other hand, the strong coupling characteristics of multiple heterogeneous energy flows such as electricity, gas, and heat make the system topology highly complex. Traditional deterministic optimization scheduling schemes, which only aim to minimize expected operating costs, have weak disturbance resistance and poor operational robustness. Under severe conditions such as extreme weather and sudden load changes, traditional scheduling methods are prone to causing serious power imbalances, wind and solar curtailment, or load shedding accidents, threatening the safe and stable operation of the system. Therefore, introducing risk metrics such as Conditional Value at Risk (CVaR) into scheduling decisions to proactively avoid tail-end extreme risks has become an urgent need in the field of multi-energy microgrid scheduling. Traditional mathematical programming methods based on model predictive control and two-stage robust optimization are prone to the curse of dimensionality when dealing with high-dimensional multi-energy microgrid scheduling problems involving nonlinear equipment models and massive random variables. The computational complexity increases exponentially, making it impossible to meet the timeliness requirements of intraday real-time scheduling.

[0004] In recent years, Deep Reinforcement Learning (DRL) technology has been widely applied in the field of microgrid energy management due to its advantages of model-free optimization and trial-and-error interactive learning. However, existing mainstream DRL algorithms (such as DDPG, TD3, and SAC) have two core inherent defects when dealing with risk-sensitive multi-energy microgrid scheduling tasks in a large-scale continuous action space: First, existing action space exploration strategies mainly rely on heuristic random noise such as Gaussian noise and Ornstein-Uhlenbeck noise. Blind random trial and error leads to extremely low algorithm sample utilization and makes it difficult to quickly converge to a safe and feasible scheduling region. Second, standard reinforcement learning agents lack long-term global behavior diagnosis and logical reasoning capabilities, and are prone to getting trapped in local optima or generating high-risk scheduling decisions during long-term scheduling processes.

[0005] Meanwhile, Large Language Models (LLMs), with their powerful contextual understanding and cross-domain logical reasoning capabilities, have been initially applied in fields such as power system load forecasting and non-intrusive load monitoring. However, if LLMs are directly used for end-to-end physical control of microgrid devices, the inherent "illusion" phenomenon and reasoning bias of large models can easily generate inactive actions that violate the physical constraints of the power system, directly threatening the safe and stable operation of the microgrid.

[0006] In summary, overcoming the aforementioned technical bottlenecks and, while avoiding the security risks of direct control by LLM, fully leveraging its logical reasoning capabilities to guide DRL agents to achieve safe and efficient risk-aware exploration is a core technical problem that urgently needs to be solved in the field of intelligent scheduling of multi-energy microgrids. Summary of the Invention

[0007] To address the shortcomings in the aforementioned background technology, this invention provides a large-model-guided risk scheduling method for multi-energy microgrids. This method employs a dual-timescale collaborative optimization architecture, namely a fast inner-loop DRL (Deep Reinforcement Learning) bottom-level real-time execution architecture and a slow outer-loop LLM (Large Language Model) top-level periodic inference architecture. Through the deep integration of LLM's logical inference and DRL's real-time control, the economic, safe, and low-carbon collaborative scheduling of multi-energy microgrids is achieved.

[0008] The first aspect of this invention provides a risk scheduling method for multi-energy microgrids guided by a large-scale model, comprising: A physical model of a multi-energy microgrid is constructed, taking into account multi-energy coupling interaction and carbon emission constraints. The physical model of the multi-energy microgrid includes the physical constraints of key nodes and the mathematical model of operating costs. The physical model of the multi-energy microgrid is reconstructed into a Markov decision process oriented towards risk-aware multi-energy collaborative scheduling; A dual-timescale deep reinforcement learning architecture integrating large language model reasoning is constructed. An inner loop real-time control loop and an outer loop reasoning loop are designed. During long-cycle training, a slow outer loop triggering mechanism is used to wake up the large language model. Through the designed system-level prompt word engineering, the agent's data from past scheduling cycles is input in natural language form to perform macro-behavioral diagnosis and output the orientation bias vector and variance scaling factor. Based on the orientation bias vector and variance scaling factor, the action space exploration guided by the large language model is carried out to obtain a well-trained deep reinforcement learning scheduling strategy model. Online real-time energy scheduling for multi-energy microgrids is based on a well-trained deep reinforcement learning scheduling strategy model.

[0009] In one implementation, a multi-energy microgrid physical model considering multi-energy coupling interactions and carbon emission constraints is constructed, including: Physical constraint models for the upper and lower limits of output, ramp rate, and energy conversion efficiency of the electric / heat interaction interface, gas boiler, cogeneration unit, electric energy storage and thermal energy storage system in the multi-energy microgrid are performed respectively. A carbon emission quota trading mechanism is introduced to calculate the carbon trading cost of the system. An auxiliary smoothing function is used to construct a differentiable approximation of the conditional risk value that takes into account power imbalance and load shedding penalty loss. This forms a risk measurement model that can be embedded in the training process of a deep reinforcement learning model, serving as a physical model of a multi-energy microgrid that takes into account multi-energy coupling interaction and carbon emission constraints.

[0010] In one implementation, the multi-energy microgrid physical model is reconstructed into a Markov decision process for risk-aware multi-energy collaborative scheduling, including: The problem of continuous power output scheduling of multi-source heterogeneous devices in a microgrid is abstracted into a reinforcement learning standard operating environment. Design a Markov decision process for risk-aware multi-energy collaborative scheduling, including state space, action space, and reward function. The state space includes time period information, electrical load power, thermal load power, time-of-use electricity price, real-time photovoltaic output, electrical energy storage charge status, and thermal energy storage heat status. The action space includes the output ratio of cogeneration units, the output ratio of gas boilers, the charging and discharging ratio of electrical energy storage, the charging and discharging ratio of thermal energy storage, and the photovoltaic consumption ratio. The reward function includes the daily operating economic cost of multi-energy microgrids, the environmental cost of carbon environmental trading, and conditional risk penalties.

[0011] In one implementation, the reward function is obtained in the following ways: The ultimate cost function is calculated based on the deterministic costs, which include the environmental costs of carbon trading and the economic costs of daily operation, as well as the conditional risk penalty term. The reward function is derived from the ultimate cost function.

[0012] In one implementation, through a designed system-level prompt word engineering, data from past scheduling cycles is input into the agent in natural language form to perform macroscopic behavioral diagnosis and output an orientation bias vector and variance scaling factor, including: Through the design of a system-level prompt word engineering, the large language model is given the role of an expert in both energy system scheduling and deep reinforcement learning. Input the agent's time-series action trajectory, cumulative reward data, renewable energy curtailment rate, peak-valley energy storage operation data, and unit collaborative operation data in the form of natural language. The big language model does not intervene in the power flow calculation and performs macro-behavioral diagnosis, including matching degree diagnosis of energy storage charging and discharging behavior and peak-valley arbitrage principle, controllable unit output coordination diagnosis, renewable energy curtailment behavior diagnosis, and agent convergence and local optimal state diagnosis. Based on the macroscopic behavioral diagnosis results, two intervention parameters are output: an orientation bias vector and a variance scaling factor. The orientation bias vector is used to provide a bias center for the exploration noise in the action space, while the variance scaling factor is used to dynamically adjust the intensity of the exploration noise.

[0013] In one implementation, an action space exploration based on adaptive bias injection and variance adjustment guided by a large language model, using a directional bias vector and a variance scaling factor, yields a well-trained deep reinforcement learning scheduling strategy model, including: The underlying deep reinforcement learning network employs a deep deterministic policy gradient algorithm. When generating the next exploration action, it incorporates the orientation bias vector output by the large language model and the adaptive variance scaling factor into the exploration noise to generate guided exploration actions. By using a physical constraint cutoff mechanism, actions are ensured to conform to the equipment's operating boundaries, thereby enabling risk perception and exploration. By iterating through experience replay and soft updating of the target network, the parameters of the deep reinforcement learning network are iterated until convergence, resulting in a well-trained deep reinforcement learning scheduling strategy model.

[0014] In one implementation, online real-time energy scheduling of multi-energy microgrids is performed based on a well-trained deep reinforcement learning scheduling strategy model, including: The random perturbation term and large language model of the well-trained deep reinforcement learning scheduling strategy model are removed. The trained decision network outputs the optimal unit output and reserve capacity scheduling scheme based on the real-time operating status of the multi-energy microgrid.

[0015] Based on the same inventive concept, a second aspect of this invention provides a large-model guided multi-energy microgrid risk scheduling system, comprising: The microgrid physical model construction module is used to construct a multi-energy microgrid physical model that takes into account multi-energy coupling interaction and carbon emission constraints. The multi-energy microgrid physical model includes the physical constraints of key nodes and the mathematical model of operating costs. The Markov decision process design module is used to reconstruct the physical model of the multi-energy microgrid into a Markov decision process oriented towards risk-aware multi-energy collaborative scheduling. The deep reinforcement learning architecture building module is used to build a dual-timescale deep reinforcement learning architecture that integrates large language model inference. It designs an inner real-time control loop and an outer inference loop. In long-cycle training, a slow outer loop triggering mechanism is used to wake up the large language model. Through the designed system-level prompt word engineering, the agent is input with data from past scheduling cycles in natural language form to perform macro-behavioral diagnosis and output the orientation bias vector and variance scaling factor. The action space exploration module is used for adaptive bias injection and variance adjustment of the action space guided by the large language model based on the orientation bias vector and variance scaling factor, so as to obtain a well-trained deep reinforcement learning scheduling strategy model. The online scheduling module is used for online real-time energy scheduling of multi-energy microgrids based on a well-trained deep reinforcement learning scheduling strategy model.

[0016] Based on the same inventive concept, a third aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is used to implement the above-described large-model guided multi-energy microgrid risk scheduling method.

[0017] Based on the same inventive concept, a fourth aspect of the present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, it is used to implement the above-described large-model guided multi-energy microgrid risk scheduling method.

[0018] Compared with the prior art, the advantages and beneficial technical effects of the present invention are as follows: This invention discloses a large-model-guided risk scheduling method for multi-energy microgrids. First, a physical model of the multi-energy microgrid is constructed and reconstructed as a Markov decision process that takes into account Conditional Value at Risk (CVaR) to quantify the risk cost under extreme scenarios. Second, a dual-timescale deep reinforcement learning architecture integrating Large Language Model (LLM) inference is built, designing an hourly inner-loop real-time control loop and a daily outer-loop LLM inference loop. Third, an inference-driven action space exploration mechanism is established, using LLM to achieve directional bias injection and adaptive variance modulation, explicitly guiding the exploration direction and intensity of reinforcement learning. Finally, the CVaR index is integrated into risk-aware exploration and control, and the optimal unit output and reserve capacity scheduling scheme is output through iterative optimization. This invention significantly improves the convergence efficiency and sample utilization of reinforcement learning, ensures the economy of the scheduling strategy and its robustness under extreme scenarios, effectively balances the operating cost and risk control of multi-energy microgrids, and possesses strong engineering practicality. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 A schematic diagram illustrating a large-model-guided risk scheduling method for multi-energy microgrids provided in an embodiment of the present invention; Figure 2 This is a framework diagram of the overall environment and energy flow of the multi-energy microgrid (MEMG) system in an embodiment of the present invention; Figure 3 This is a flowchart illustrating the dual-timescale collaborative operation of a reinforcement learning algorithm guided by a large language model in an embodiment of the present invention. Detailed Implementation

[0021] Example 1 This embodiment provides a large-model-guided risk scheduling method for multi-energy microgrids. Please refer to [link to relevant documentation]. Figure 1 ,include: S1: Construct a physical model of a multi-energy microgrid that takes into account multi-energy coupling interaction and carbon emission constraints, wherein the physical model of the multi-energy microgrid includes physical constraints of key nodes and mathematical models of operating costs.

[0022] Specifically, S1 is implemented in the following way: S1.1: Physical constraint modeling of output upper and lower limits, ramp rate, and energy conversion efficiency for the electric / heat interaction interface, gas boiler, cogeneration unit, electric energy storage and thermal energy storage system in the multi-energy microgrid; S1.2: Introduce a carbon emission quota trading mechanism to calculate the carbon trading cost of the system. Use an auxiliary function to construct a differentiable approximation to construct a differentiable approximation of the conditional risk value that takes into account power imbalance and load shedding penalty loss. This forms a risk measurement model that can be embedded in the training process of a deep reinforcement learning model, serving as a physical model of a multi-energy microgrid that takes into account multi-energy coupling interaction and carbon emission constraints.

[0023] Specifically, please see Figure 2 This section presents a framework diagram of the overall environment and energy flow of a multi-energy microgrid (MEMG) system. The physical model of the MEMG constructed in this step provides a basic physical environment interface for the intelligent agent. The auxiliary smoothing function refers to the auxiliary function introduced when constructing a differentiable approximation of the conditional value at risk (CVaR). That is, formula (1.25).

[0024] In practical implementation, the natural gas network within the multi-energy microgrid system is responsible for supplying fuel to the combined heat and power (CHP) units and gas-fired boilers, while the electrical and thermal energy systems provide scheduling flexibility. The physical constraints and operating cost mathematical models for each key node are as follows: 1.1 External Interaction Interface Constraints: Active power exchange between microgrid and external power grid and the amount of heat power input from the external heating network Each is limited by the capacity of the tie line: (1.1) (1.2) The resulting costs of purchasing and selling electricity and heat are constrained by the electricity price discount factor m and the piecewise function: (1.3) (1.4) (1.5) in, Let t represent the amount of active power exchanged between the microgrid and the external power grid during time period t. This represents the physical lower limit of the electrical power exchanged between the microgrid and the external power grid. This represents the physical upper limit of the electrical power exchanged between the microgrid and the external power grid. The amount of heat power transferred from the external heating network to the microgrid during time period t. The physical upper limit of the heat power input to the external heating network. The electricity cost for the microgrid's interaction with the external power grid during time period t. The unit price at which the microgrid purchases electricity from the external power grid during time period t. The unit price for electricity sold by the microgrid to the external power grid during time period t. The cost of the microgrid purchasing heat from the external heat network during time period t. This represents the fixed unit price for purchasing heat from the external heating network. m is the discount factor between the microgrid's electricity sales price and the electricity purchase price.

[0025] 1.2 Constraints for Gas-fired Boilers (GB): Natural gas consumption of gas-fired boilers With heat output It satisfies a linear transformation relationship and is limited by an absolute output threshold and a ramp rate: (1.6) (1.7) (1.8) Fuel costs and operating expenses are calculated as follows: (1.9) (1.10) in, The heat output of the gas-fired boiler during time period t. The energy conversion efficiency coefficient of a gas-fired boiler. Let t represent the natural gas consumption of the gas-fired boiler during the time period t. This represents the lower limit of the thermal power output of a gas-fired boiler. This represents the upper limit of the thermal power output of a gas-fired boiler. for Thermal power output of gas-fired boilers during certain periods The maximum permissible rate of ramp-up (power change) for a gas-fired boiler. The fuel purchase cost of the gas-fired boiler during time period t. This refers to the unit price for purchasing natural gas. The daily equipment operation and maintenance costs of the gas-fired boiler during time period t. This is the operation and maintenance cost coefficient per unit heat output of a gas-fired boiler.

[0026] 1.3 Constraints on Combined Heat and Power (CHP) Units: CHP unit generates heat as a byproduct of electrical energy conversion. and direct combustion heat generation From electrical power and gas volume Decide: (1.11) (1.12) Constrained by capacity and ramping requirements: (1.13) (1.14) Gas consumption costs exhibit a quadratic convex function characteristic: (1.15) in, The heat generated as a byproduct during the electrical energy conversion process of the combined heat and power (CHP) unit in time period t. The electrothermal conversion ratio of a combined heat and power (CHP) unit. This represents the electrical power output of the combined heat and power (CHP) unit during time period t. Among them, The heat generated by the direct combustion of natural gas in the cogeneration unit during time period t. The coefficient of performance for heat production of direct-fired natural gas. This represents the amount of natural gas injected into the direct-fired section of the cogeneration unit during time period t. Among these, This represents the lower limit of the electrical power output of a combined heat and power (CHP) unit. This represents the upper limit of the electrical power output of a combined heat and power (CHP) unit. for Electricity output of cogeneration units during specific time periods. This represents the maximum ramp rate of the combined heat and power (CHP) unit. The total gas consumption cost of the cogeneration unit during time period t. This is a fixed constant term in the unit's gas consumption cost. The coefficient of the linear term, The coefficient of the quadratic term.

[0027] 1.4 Dynamic Constraints of Generalized Energy Storage Systems (EES / TES): The equation for the charge / thermal state evolution of any energy storage is: (1.16) Where y is the energy storage type index (representing electrical energy storage or thermal energy storage). Let y be the stored energy state of the energy storage device during time period t. for The stored energy status of time-period energy storage device y. The charging efficiency of energy storage devices. The discharge efficiency of energy storage devices. Let y be the absolute value of the charging power of the energy storage device during time period t. Let y be the absolute value of the discharge power of the energy storage device during time period t. This is a Boolean indicator variable (0 or 1) for the charging status. This is a Boolean indicator variable for the discharge status (0 or 1). The time step is the time step for a single discrete time period.

[0028] Charge / discharge mutual exclusion command variables and safety dead zone constraints: (1.17) in, A unified representation of the charging status indicator variable (equivalent to) ), Discharge state indicator variable for unified representation (equivalent to) The sum of the two should not exceed 1 to ensure that they are not charged and discharged at the same time.

[0029] (1.18) in, The percentage of the energy storage device's state of charge or thermal charge (capacity percentage) during time period t. The lower limit of the safe dead zone for the device's permissible state. The upper limit of the safe dead zone allowed by the device.

[0030] Throughput maintenance cost accounting: (1.19) in, The total operation and maintenance cost of all energy storage systems during time period t. The unit throughput power operation and maintenance cost coefficient for electric energy storage. The unit throughput heat power operation and maintenance cost coefficient for thermal energy storage. The charging and discharging power of the electrical energy storage during time period t. The charge and discharge heat power of the thermal energy storage during time period t.

[0031] 1.5 Carbon Emissions and Conditional Value at Risk (CVaR) Measurement Constraints: Real-time carbon emissions of the system Compared with the benchmark carbon quota Determine carbon trading fees : (1.20) in, This represents the actual total carbon emissions of the system during time period t. The carbon intensity factor per unit of heat generated by the CHP unit. This represents the total heat output of the CHP unit. The unit carbon emission intensity factor of gas-fired boilers. The carbon intensity factor per unit of electricity purchased from the external power grid. The unit carbon emission intensity factor for purchasing heat from external heat networks.

[0032] (1.21) in, The total baseline carbon allowance obtained by the system during time period t. This is the unit carbon quota factor for CHP units. This refers to the unit carbon quota coefficient for GB units. Incentive coefficient per unit of carbon allowance for renewable energy output The renewable energy output of the photovoltaic unit during time period t is the power output of the photovoltaic unit during time period t.

[0033] (1.22) in, The environmental cost of carbon trading during period t. This refers to the unit carbon price in the carbon trading market.

[0034] For imbalance risk, an auxiliary variable is introduced to approximate the extreme risk loss (VaR) of non-traditional distributions. Given a confidence level, the original risk assessment function and the reconstructed differentiable convex auxiliary assessment function are as follows: (1.23) in, For confidence level The Value at Risk (VaR) measurement function is as follows: Let X be the risk confidence level (e.g., 95%), X be the microgrid scheduling decision variable, and Y be the system uncertainty environmental variable. Let L(X,Y) be the threshold variable used to find the minimum loss quantile, L(X,Y) be the extreme value penalty loss function encountered by the system, and P(Y) be the probability density function of the random environment variable Y.

[0035] (1.24) (1.25) in, To reconstruct the conditional value at risk (CVaR) auxiliary objective function, As an auxiliary optimization variable used to continuously approximate VaR values, This indicates that the non-negative part of the function value is taken (i.e., greater than 0 is retained, and less than 0 is taken as 0).

[0036] Minimizing this yields an unbiased estimate of the theoretical CVaR: (1.26) (1.27) in, This is the final calculated minimum conditional value-at-risk penalty term. N is the total number of discretely sampled random scenarios, and s is the numerical index of the specific scenario. Let be the probability weight of the s-th random scenario occurring in reality.

[0037] S2: Reconstruct the physical model of the multi-energy microgrid into a Markov decision process for risk-aware multi-energy collaborative scheduling.

[0038] Specifically, the continuous output scheduling problem of multi-source heterogeneous devices within a microgrid is abstracted into a reinforcement learning standard environment. By integrating daily operational economic costs, carbon compliance costs, and conditional risk penalties, a composite reward feedback function is constructed using risk preference factors, ensuring that the agent's optimization objective is strictly aligned with the system's overall robust economic performance.

[0039] S2 can be implemented in the following way: S2.1: The continuous output scheduling problem of multi-source heterogeneous devices in a microgrid is abstracted into a reinforcement learning standard operating environment; S2.2: Design the state space, action space, and reward function of a Markov decision process for risk-aware multi-energy collaborative scheduling. The state space includes time period information, electrical load power, thermal load power, time-of-use electricity price, real-time photovoltaic output, electrical energy storage charge status, and thermal energy storage heat status. The action space includes the output ratio of cogeneration units, the output ratio of gas boilers, the charging and discharging ratio of electrical energy storage, the charging and discharging ratio of thermal energy storage, and the photovoltaic consumption ratio. The reward function includes the daily operating economic cost of multi-energy microgrids, carbon environmental trading costs, and conditional risk penalties.

[0040] In practice, to enable the AI ​​agent to seamlessly take over physical control, this step wraps the high-dimensional constraints into a reinforcement learning environment. The environment feeds back the observed state. The microgrid encapsulates external electricity and gas prices, renewable energy output forecasts, and real-time SoC (State of Charge) status of its internal energy storage media. Correspondingly, it contains continuous joint control action vectors issued by the intelligent agent. It consists of dimensionless instructions for the five core regulation resources of the microgrid: (2.1) in, , , , and These represent the controllable power output ratio of combined heat and power (CHP) units and gas-fired boiler (GB) units, the charge and discharge ratio of electric energy storage (EES) and thermal energy storage (TES), and the new energy output utilization rate of photovoltaic (PV) units, respectively.

[0041] To enable intelligent agents to learn to avoid tail-end extreme events that could lead to large-scale power outages while ensuring daily economic operation, this invention utilizes a risk coefficient. The weighted softening process includes the daily deterministic costs of carbon trading and equipment depreciation. Penalty for extreme value imbalance Fusion into the ultimate cost function : (2.2) in, Represents the reward function, Indicates the risk coefficient. This refers to the deterministic costs that include both the environmental costs of carbon trading and the economic costs of daily operations. This is a conditional risk penalty item.

[0042] It is then negativeened and used as an immediate reward signal for step-by-step updates under the MDP framework. The gradient is then backpropagated back to the value network. (2.3) It should be noted that the daily operating economic cost is represented by the symbol in formula (2.2). The carbon trading cost is represented by the symbol in formula (1.22). This indicates the actual carbon emissions Exceeding carbon quotas The resulting environmental compliance costs.

[0043] S3: Construct a dual-timescale deep reinforcement learning architecture that integrates large language model reasoning. Design an inner-loop real-time control loop and an outer-loop reasoning loop. In long-cycle training, a slow outer-loop triggering mechanism is used to wake up the large language model. Through the designed system-level prompt word engineering, the agent is input with data from past scheduling cycles in natural language form to perform macro-behavioral diagnosis and output the orientation bias vector and variance scaling factor.

[0044] Specifically, please see Figure 3 This is a flowchart of the dual-timescale collaborative operation of the reinforcement learning algorithm guided by the large language model in this embodiment of the invention.

[0045] The dual-timescale deep reinforcement learning architecture employs a macro-policy defect diagnosis and feature evaluation mechanism driven by Large Language Model (LLM) inference. During long-term training, a slow outer-loop triggering mechanism is used to wake up the LLM. Through carefully designed system-level cue word engineering, the LLM is given the dual roles of energy management expert and AI scholar, and its temporal action trajectories from past scheduling cycles are input in natural language. The LLM does not need to intervene in specific power flow calculations but focuses on macro-behavioral diagnosis, such as assessing whether the charging and discharging timing of energy storage systems conforms to peak-valley arbitrage economic principles, or whether renewable energy is being excessively abandoned.

[0046] Specifically, through a designed system-level prompt word engineering, data from past scheduling cycles is input into the agent in natural language form to perform macroscopic behavioral diagnosis and output orientation bias vectors and variance scaling factors, including: S3.1: Through the design of system-level prompt word engineering, the large language model is given the identity and role of an expert in both energy system scheduling and deep reinforcement learning. S3.2: Input the agent's time-series action trajectory, cumulative reward data, renewable energy curtailment rate, peak-valley energy storage operation data, and unit collaborative operation data in natural language form. The large language model does not intervene in power flow calculation and performs macro-behavioral diagnosis, including matching degree diagnosis of energy storage charging and discharging behavior and peak-valley arbitrage principle, controllable unit output coordination diagnosis, renewable energy curtailment behavior diagnosis, and agent convergence and local optimal state diagnosis. S3.3: Based on the macroscopic behavioral diagnosis results, output two intervention parameters: orientation bias vector and variance scaling factor. The orientation bias vector is used to provide a bias center for the exploration noise in the action space, and the variance scaling factor is used to dynamically adjust the intensity of the exploration noise.

[0047] The "Macro-Strategy Defect Diagnosis and Feature Evaluation Mechanism" refers to a reasoning and evaluation mechanism that, during long-cycle reinforcement learning training, periodically wakes up the Large Language Model (LLM) in a slow outer loop to perform semantic-level macro-analysis of the agent's historical scheduling behavior trajectory in a non-real-time manner. This identifies structural defects and inefficient operational characteristics at the strategy level. The mechanism uses Natural Language Prompt Engineering (NLP) as its interface, inputting standardized action sequences and cumulative performance indicators from multiple past complete rounds into the LLM. This allows the LLM to act as both an energy management expert and an AI scholar, diagnosing macro-level behavioral deviations from a global perspective, such as whether energy storage charging and discharging timings conform to peak-valley arbitrage economic principles, whether there is unnecessary abandonment of renewable energy, and whether multi-energy coupling equipment coordination is mismatched. The LLM does not participate in underlying power flow calculations and real-time control; it only outputs structured exploration modulation parameters—directional bias vectors and variance scaling factors—based on the diagnostic conclusions to guide the underlying deep reinforcement learning agent to implement more directional and risk-aware explorations in subsequent training. This mechanism organically decouples the logical reasoning of LLM from the trial-and-error learning process of deep reinforcement learning, making up for the inherent shortcomings of traditional reinforcement learning algorithms in lacking long-term policy introspection and behavioral interpretability.

[0048] The slow outer loop triggering mechanism refers to the low-frequency, periodic activation of the Large Language Model (LLM) module in the dual-timescale collaborative optimization architecture constructed in this invention. Specifically, the LLM does not participate in computation at every time step or in every scheduling round. Instead, it is only actively awakened by the system once after the deep reinforcement learning agent completes a fixed number of full scheduling cycles (e.g., every K rounds) to perform a macro-level policy diagnosis and parameter output. Afterward, it enters a dormant state and does not intervene in the time-by-time real-time control process of the fast inner loop. This mechanism, by extending the time interval of LLM inference, reduces computational overhead and communication latency while fundamentally ensuring the real-time performance and security of the underlying physical control.

[0049] The slow outer-loop triggering mechanism and the macro-policy defect diagnosis and feature evaluation mechanism are related as time-series scheduling and function execution. The former specifies the timing and triggering conditions for LLM intervention in training, i.e., "when and at what frequency to start"; the latter describes the specific reasoning tasks and work content actually performed by the LLM after it is activated, i.e., "what to do after activation". Together, they constitute the LLM-assisted training closed loop: the slow outer-loop triggering mechanism provides a periodic execution window for macro-policy diagnosis, while the diagnosis and feature evaluation mechanism uses this window to complete the semantic analysis of the agent's historical behavior and the generation of modulation parameters. Together, they decouple the high-level guidance and low-level control of the reinforcement learning training process by the LLM.

[0050] The relationship between macro-level behavioral diagnosis and agent decision-making is a hierarchical collaborative one, characterized by "guidance during training and complete decoupling during execution." After the large language model diagnoses policy defects in the agent's historical scheduling trajectory in the slow outer loop, it does not directly intervene in the real-time action output of the fast inner loop. Instead, it uses the orientation bias vector and variance scaling factor as exploration modulation parameters to statistically influence the action exploration distribution of deep reinforcement learning in subsequent training, guiding the agent to converge towards high-value, low-risk regions. After training, both the large language model and exploration noise are removed, and the agent's final scheduling decision is entirely generated autonomously by the well-trained Actor network. Therefore, macro-level behavioral diagnosis plays the role of a "policy optimization coach" during training, indirectly improving the economy and robustness of agent decision-making by improving the learning path, rather than replacing or directly manipulating the decision itself.

[0051] Specifically, this step is the core innovation of this invention. In order to fundamentally solve the blindness and inefficiency of the zero-mean Gaussian noise exploration mechanism in the DRL algorithm, this invention proposes to introduce a large language model as an external, round-periodic exploration regulator (LLMModulator). This mechanism is divided into two core sub-modules, which are triggered after every fixed K rounds.

[0052] 3.1 Policy Reflection and Behavioral Diagnosis Module This invention assigns LLM (Limited Lerger Module) the role of an expert in both energy system scheduling and deep reinforcement learning through a standardized system cue word framework. During training, instead of directly inputting a reward scalar into the LLM, the DRL agent's operational data from the past K rounds is input into the LLM in a standardized time-series trajectory format. The input information includes: a description of the multi-energy microgrid scheduling task, system operation constraints, continuous time-series action trajectories (including EES / TES charging and discharging time-series states, and the coordinated output ratio of CHP and GB units), cumulative reward data, renewable energy curtailment rate, and peak-valley energy storage operation data.

[0053] Based on the aforementioned cue word framework and the input runtime data, LLM performs macro-behavioral diagnosis, identifies policy defects of the DRL agent, and forms diagnostic conclusions.

[0054] 3.2 Exploration strategy generation module Based on the above diagnostic results, LLM generates two specific parameters (intervention parameters) to directly guide the reinforcement learning algorithm's exploration process in the next cycle: 3.2.1 Directional bias vector (DBI) b The orientation bias vector is used to provide a bias center for the exploration noise in the action space, guiding the DRL agent to explore high-value, low-risk action areas. Based on the diagnostic conclusions, the LLM determines whether the value of each action dimension should be increased or decreased, and assigns a corresponding bias value to each action dimension. For example, if a serious solar power curtailment behavior is diagnosed, the LLM will assign a positive bias value to the PV dimension, encouraging the agent to increase the proportion of solar power consumption. To avoid disrupting the stability of the learned strategy, the bias value of each dimension is strictly limited to the bounded interval [-0.2, 0.2].

[0055] 3.2.2 Adaptive variance modulation (AVM) α The variance scaling factor is used to dynamically adjust the intensity of exploration noise, balancing the algorithm's exploration and utilization. The LLM dynamically adjusts this parameter based on the agent's macroscopic performance trend: if the diagnostics detect that the agent's reward has stagnated for a long time and is trapped in a local optimum, the LLM will output a variance scaling factor greater than 1, causing the algorithm to enter the active exploration phase and expand the action space search range; if the diagnostics detect that the agent's reward is continuously increasing and the policy is gradually stabilizing, the LLM will output a variance scaling factor less than 1, causing the algorithm to enter the fine-tuning phase, narrowing the exploration range, and achieving stable convergence in high-reward regions.

[0056] Ultimately, LLM strictly followed the prompts and output the two key parameters, the orientation bias vector b and the variance scaling factor α, in JSON object format.

[0057] S4: Based on the orientation bias vector and variance scaling factor, the action space is explored under the guidance of a large language model, resulting in a well-trained deep reinforcement learning scheduling strategy model.

[0058] Specifically, S4 can be implemented in the following way: S4.1: The underlying deep reinforcement learning network adopts a deep deterministic policy gradient algorithm. When generating the next exploration action, the orientation bias vector output by the large language model and the adaptive variance scaling factor are constructed into the exploration noise to generate guided exploration actions. S4.2: Ensure actions conform to equipment operating boundaries through physical constraint cutoff mechanisms to achieve risk perception and exploration; S4.3: Through experience replay and soft update of the target network, the parameters of the deep reinforcement learning network are iterated until convergence, resulting in a well-trained deep reinforcement learning scheduling strategy model.

[0059] Specifically, during training, this step dynamically generates action exploration noise with directional risk avoidance capabilities through directional bias injection and adaptive variance adjustment, guiding the agent to converge efficiently. Specifically, the underlying DRL network implicitly superimposes this bias and adaptive variance when generating the next exploration action. This mechanism utilizes prior knowledge to avoid high-risk tail actions while preserving the safety margin of the underlying neural network's physical constraints, achieving an efficient risk-aware exploration mechanism.

[0060] In practice, a standard Actor-Critic network is deployed in the underlying microsecond-level control inner loop. The Actor network learns a deterministic policy that maps states to actions, including the Actor network itself. and Critic Network ,in, This represents a deterministic policy network (Actor network) consisting of parameters θ, whose input is the observation state of the current time period. The output is the original continuous scheduling action vector without noise disturbance; Indicates by parameters The constructed action value evaluation network (Critic network) takes the state as its input. With action The output is an estimate of the expected cumulative reward for performing the action in that state. Together, these two constitute the Actor-Critic decision-making and evaluation system, responsible for action generation and value evaluation, respectively.

[0061] When the training process begins, at each time step, the orientation bias vector b and the noise scaling factor α generated by LLM in step S3 are embedded into the decision execution phase. After the deterministic Actor network outputs the original action, the perturbation noise variable intervened by LLM is introduced. t and combined with feasible action boundaries in the environment The cutting process ultimately results in the action a being applied to the environment. t for: (4.1) In the formula, ( () is a trimming function that ensures the final executed action does not exceed the physical boundaries of the device. .

[0062] Unlike traditional methods, the exploration noise in this invention t It is no longer a simple zero-mean Gaussian distribution, but follows a normal distribution dynamically modulated by LLM: (4.2) Where σ base Let I ∈ R be the base standard deviation. N×N It is an identity matrix.

[0063] After the agent performs the above actions, the environment returns a risk assessment reward R. t And transition to the next state s t+1 Empirical tuples (s) t ,a t ,R t ,s t+1 Store it in the experience replay pool D.

[0064] During the network update phase, a small batch of samples is drawn to check the Critic parameters. To optimize, minimize the TD error loss function: (4.3) In the formula, [ ] indicates calculating the expected mean of a small batch of samples; t is the index of the discrete scheduling period.

[0065] Introducing soft updates to the target network μ θ With Q Used to calculate target value This is to stabilize the training: (4.4) Subsequently, the Actor network parameters θ are updated based on the deterministic policy gradient theorem, driving the policy towards maximizing the Q-value: (4.5) After each update, the parameters of the target network are slowly synchronized to the main network using a soft update coefficient τ: (4.6) (4.7) in, Let the gradient of the policy objective function with respect to the Actor parameters be denoted as . The gradient of the action output by the Critic network represents the direction of value enhancement in the action space. The gradient of the Actor network output with respect to its parameters. These are the main network parameters of the Critic network and the Actor network, respectively. , The target network parameters for the Critic network and the Actor network are... This is a soft update coefficient used to achieve slow and smooth updates of the target network, maintaining training stability.

[0066] Through thousands of rounds of iterative iteration, and guided by the directional pruning of external LLM logic reasoning, the agent greatly reduces trial and error in invalid regions and quickly converges to a globally optimal strategy that includes features such as maximizing renewable energy, forward arbitrage of storage devices, and suppression of fossil fuels.

[0067] S5: Online real-time energy scheduling of multi-energy microgrids based on a well-trained deep reinforcement learning scheduling strategy model.

[0068] S5 includes: The random perturbation term and large language model of the well-trained deep reinforcement learning scheduling strategy model are removed. The trained decision network outputs the optimal unit output and reserve capacity scheduling scheme based on the real-time operating status of the multi-energy microgrid.

[0069] In the specific implementation process, when the multi-energy microgrid completes model training and is put into online testing / actual operation, the large model random disturbance terms in equations (4.1) and (4.2) are completely removed. t And the LLM regulation module, where the agent directly outputs actions based on the trained Actor neural network: a t = μ θ ( This indicates that the strategy of the present invention not only inherits the expert-level risk-resistant wisdom and long-cycle planning capabilities endowed by LLM, but also meets the millisecond-level low-latency response requirements of the actual physical power grid for scheduling.

[0070] The LLM adjustment module includes the following: The "macro-strategy defect diagnosis and feature evaluation mechanism" constructed in step S3 is to perform strategy diagnosis by triggering LLM through a slow outer loop and output exploratory intervention parameters.

[0071] Step S4 receives the orientation bias vector b and variance scaling factor α output by the LLM and injects them into the LLM modulator part of the underlying DRL action exploration process.

[0072] During the online testing / actual operation phase, the aforementioned LLM adjustment module and the disturbance noise generated by it were removed, and only the trained Actor network was retained to make deterministic decisions in order to meet the requirements of real-time scheduling for response speed and security.

[0073] Reference 1 (CN120598324A) discloses a scheduling framework based on DRL, and Reference 2 (CN121052542A) discloses a technique using LLM to assist in generating strategies and reward functions. However, this invention differs fundamentally from the combination of the above references and represents a significant technological advancement. Specifically, this invention does not use LLM for static MDP element design, but innovatively constructs a dual-timescale architecture that decouples slow outer-loop LLM inference with fast inner-loop DRL control. In this architecture, LLM acts as a "coach," periodically performing macroscopic diagnosis of the historical behavioral trajectory of the DRL agent and outputting a directional bias vector and variance scaling factor to dynamically modulate the exploration noise distribution of the inner-loop DRL, thereby directly injecting expert-level prior knowledge and risk perception signals into the exploration process of the action space. This technical solution specifically addresses the two inherent defects of existing DRL methods: low exploration efficiency and lack of proactive tail risk avoidance capabilities in complex and risk-sensitive scenarios. Furthermore, while achieving efficient training, it fundamentally prevents control safety risks that may be caused by LLM illusions through architectural decoupling. Therefore, this invention is not a simple superposition of references 1 and 2, but rather proposes a novel "reasoning-guided exploration" paradigm at the level of DRL learning mechanism, which has outstanding substantive features and significant progress.

[0074] Overall, the advantages of this invention are: 1. Significantly Improved Solution and Exploration Efficiency: The model proposed in this invention utilizes macroscopic reasoning and logical diagnosis from a large language model to replace the blind, heuristic, random trial-and-error exploration mechanism of traditional reinforcement learning. By outputting explicit bias and variance parameters, it endows the agent with directional exploration capabilities, avoiding redundant searches in meaningless or high-risk action spaces, and significantly shortening training convergence time.

[0075] 2. Ensuring the physical realism and resilience of scheduling: The model innovatively introduces a Conditional Value at Risk (CVaR) evaluation mechanism in the reinforcement learning environment. Combined with physical constraints, this enables the agent to explicitly perceive and avoid adverse scheduling behaviors dominated by tail risks (such as wind curtailment and load shedding), ensuring that the final generated control strategy guarantees both operational economy and avoids overly aggressive approaches.

[0076] 3. Reduce the operational risks of direct control by large models: The model adopts a dual-timescale architecture to decouple inference from control. The large language model is only responsible for generating mathematical parameters to guide reinforcement learning to explore the distribution in the slow outer loop, without directly participating in the physical execution of the underlying devices in the fast inner loop. This fundamentally blocks the risk of end-to-end microgrid operation collapse caused by the "illusion" of large models.

[0077] Example 2 Based on the same inventive concept, this embodiment discloses a large-model-guided multi-energy microgrid risk scheduling system, including: The microgrid physical model construction module is used to construct a multi-energy microgrid physical model that takes into account multi-energy coupling interaction and carbon emission constraints. The multi-energy microgrid physical model includes the physical constraints of key nodes and the mathematical model of operating costs. The Markov decision process design module is used to reconstruct the physical model of the multi-energy microgrid into a Markov decision process oriented towards risk-aware multi-energy collaborative scheduling. The deep reinforcement learning architecture building module is used to build a dual-timescale deep reinforcement learning architecture that integrates large language model inference. It designs an inner real-time control loop and an outer inference loop. In long-cycle training, a slow outer loop triggering mechanism is used to wake up the large language model. Through the designed system-level prompt word engineering, the agent is input with data from past scheduling cycles in natural language form to perform macro-behavioral diagnosis and output the orientation bias vector and variance scaling factor. The action space exploration module is used for adaptive bias injection and variance adjustment of the action space guided by the large language model based on the orientation bias vector and variance scaling factor, so as to obtain a well-trained deep reinforcement learning scheduling strategy model. The online scheduling module is used for online real-time energy scheduling of multi-energy microgrids based on a well-trained deep reinforcement learning scheduling strategy model.

[0078] Since the system in Embodiment 2 of this invention is the same system used in the large-model-guided multi-energy microgrid risk scheduling method in Embodiment 1, those skilled in the art can understand the specific structure and variations of this system based on the method described in Embodiment 1 of this invention, and therefore will not be repeated here. All systems used in the method of Embodiment 1 of this invention fall within the scope of protection of this invention.

[0079] Example 3 Based on the same inventive concept, the present invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the method described in Embodiment 1.

[0080] Those skilled in the art should understand that all or part of the steps in the methods of the above embodiments can be implemented by a computer program instructing related hardware (such as a personal computer, server, or network device); the computer program can be stored in a computer-readable storage medium, and when the program is executed by a processor, it can perform all or part of the steps of the methods described in the various embodiments of the present invention.

[0081] Since the computer-readable storage medium described in Embodiment 3 of this invention is the same computer-readable storage medium used in implementing the large-model-guided multi-energy microgrid risk scheduling method in Embodiment 1 of this invention, those skilled in the art can understand the specific structure and variations of this computer-readable storage medium based on the method described in Embodiment 1 of this invention, and therefore will not be repeated here. All computer-readable storage media used in the method of Embodiment 1 of this invention fall within the scope of protection of this invention.

[0082] Example 4 Based on the same inventive concept, the present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method described in Embodiment 1.

[0083] Since the computer device described in Embodiment 4 of this invention is the same computer device used to implement the large-model-guided multi-energy microgrid risk scheduling method in Embodiment 1 of this invention, those skilled in the art can understand the specific structure and variations of this computer device based on the method described in Embodiment 1 of this invention, and therefore will not be repeated here. All computer devices used in the method of Embodiment 1 of this invention fall within the scope of protection of this invention.

[0084] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0085] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0086] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention. Clearly, those skilled in the art can make various modifications and variations to the embodiments of the invention without departing from the spirit and scope of the invention. Thus, if these modifications and variations of the embodiments of the invention fall within the scope of the claims of the invention and their equivalents, the invention also intends to include these modifications and variations.

Claims

1. A risk scheduling method for multi-energy microgrids guided by a large model, characterized in that, include: A physical model of a multi-energy microgrid is constructed, taking into account multi-energy coupling interaction and carbon emission constraints. The physical model of the multi-energy microgrid includes the physical constraints of key nodes and the mathematical model of operating costs. The physical model of the multi-energy microgrid is reconstructed into a Markov decision process oriented towards risk-aware multi-energy collaborative scheduling; A dual-timescale deep reinforcement learning architecture integrating large language model reasoning is constructed. An inner loop real-time control loop and an outer loop reasoning loop are designed. During long-cycle training, a slow outer loop triggering mechanism is used to wake up the large language model. Through the designed system-level prompt word engineering, the agent's data from past scheduling cycles is input in natural language form to perform macro-behavioral diagnosis and output the orientation bias vector and variance scaling factor. Based on the orientation bias vector and variance scaling factor, the action space exploration guided by the large language model is carried out to obtain a well-trained deep reinforcement learning scheduling strategy model. Online real-time energy scheduling for multi-energy microgrids is based on a well-trained deep reinforcement learning scheduling strategy model.

2. The large-model-guided multi-energy microgrid risk scheduling method as described in claim 1, characterized in that, Constructing a physical model for a multi-energy microgrid that considers multi-energy coupling interactions and carbon emission constraints, including: Physical constraint models for the upper and lower limits of output, ramp rate, and energy conversion efficiency of the electric / heat interaction interface, gas boiler, cogeneration unit, electric energy storage and thermal energy storage system in the multi-energy microgrid are performed respectively. A carbon emission quota trading mechanism is introduced to calculate the carbon trading cost of the system. An auxiliary smoothing function is used to construct a differentiable approximation of the conditional risk value that takes into account power imbalance and load shedding penalty loss. This forms a risk measurement model that can be embedded in the training process of a deep reinforcement learning model, serving as a physical model of a multi-energy microgrid that takes into account multi-energy coupling interaction and carbon emission constraints.

3. The large-model-guided multi-energy microgrid risk scheduling method as described in claim 1, characterized in that, The physical model of the multi-energy microgrid is reconstructed into a Markov decision process for risk-aware multi-energy collaborative scheduling, including: The problem of continuous power output scheduling of multi-source heterogeneous devices in a microgrid is abstracted into a reinforcement learning standard operating environment. Design a Markov decision process for risk-aware multi-energy collaborative scheduling, including state space, action space, and reward function. The state space includes time period information, electrical load power, thermal load power, time-of-use electricity price, real-time photovoltaic output, electrical energy storage charge status, and thermal energy storage heat status. The action space includes the output ratio of cogeneration units, the output ratio of gas boilers, the charging and discharging ratio of electrical energy storage, the charging and discharging ratio of thermal energy storage, and the photovoltaic consumption ratio. The reward function includes the daily operating economic cost of multi-energy microgrids, the environmental cost of carbon environmental trading, and conditional risk penalties.

4. The large-model-guided multi-energy microgrid risk scheduling method as described in claim 3, characterized in that, The reward function can be obtained in the following ways: The ultimate cost function is calculated based on the deterministic costs, which include the environmental costs of carbon trading and the economic costs of daily operation, as well as the conditional risk penalty term. The reward function is derived from the ultimate cost function.

5. The large-model-guided multi-energy microgrid risk scheduling method as described in claim 1, characterized in that, Through a designed system-level prompting word engineering approach, data from past scheduling cycles is input into the agent in natural language form. Macro-level behavioral diagnosis is performed, and the output includes an orientation bias vector and a variance scaling factor, comprising: Through the design of a system-level prompt word engineering, the large language model is given the role of an expert in both energy system scheduling and deep reinforcement learning. Input the agent's time-series action trajectory, cumulative reward data, renewable energy curtailment rate, peak-valley energy storage operation data, and unit collaborative operation data in the form of natural language. The big language model does not intervene in the power flow calculation and performs macro-behavioral diagnosis, including matching degree diagnosis of energy storage charging and discharging behavior and peak-valley arbitrage principle, controllable unit output coordination diagnosis, renewable energy curtailment behavior diagnosis, and agent convergence and local optimal state diagnosis. Based on the macroscopic behavioral diagnosis results, two intervention parameters are output: an orientation bias vector and a variance scaling factor. The orientation bias vector is used to provide a bias center for the exploration noise in the action space, while the variance scaling factor is used to dynamically adjust the intensity of the exploration noise.

6. The large-model-guided multi-energy microgrid risk scheduling method as described in claim 1, characterized in that, Based on the action space exploration of large language models guided by directional bias vectors and variance scaling factors, a mature deep reinforcement learning scheduling strategy model is obtained, including: The underlying deep reinforcement learning network employs a deep deterministic policy gradient algorithm. When generating the next exploration action, it incorporates the orientation bias vector output by the large language model and the adaptive variance scaling factor into the exploration noise to generate guided exploration actions. By using a physical constraint cutoff mechanism, actions are ensured to conform to the equipment's operating boundaries, thereby enabling risk perception and exploration. By iterating through experience replay and soft updating of the target network, the parameters of the deep reinforcement learning network are iterated until convergence, resulting in a well-trained deep reinforcement learning scheduling strategy model.

7. The large-model-guided multi-energy microgrid risk scheduling method as described in claim 1, characterized in that, Online real-time energy scheduling for multi-energy microgrids is based on a well-trained deep reinforcement learning scheduling strategy model, including: The random perturbation term and large language model of the well-trained deep reinforcement learning scheduling strategy model are removed. The trained decision network outputs the optimal unit output and reserve capacity scheduling scheme based on the real-time operating status of the multi-energy microgrid.

8. A large-scale model-guided multi-energy microgrid risk scheduling system, characterized in that, include: The microgrid physical model construction module is used to construct a multi-energy microgrid physical model that takes into account multi-energy coupling interaction and carbon emission constraints. The multi-energy microgrid physical model includes the physical constraints of key nodes and the mathematical model of operating costs. The Markov decision process design module is used to reconstruct the physical model of the multi-energy microgrid into a Markov decision process oriented towards risk-aware multi-energy collaborative scheduling. The deep reinforcement learning architecture building module is used to build a dual-timescale deep reinforcement learning architecture that integrates large language model inference. It designs an inner real-time control loop and an outer inference loop. In long-cycle training, a slow outer loop triggering mechanism is used to wake up the large language model. Through the designed system-level prompt word engineering, the agent is input with data from past scheduling cycles in natural language form to perform macro-behavioral diagnosis and output the orientation bias vector and variance scaling factor. The action space exploration module is used for adaptive bias injection and variance adjustment of the action space guided by the large language model based on the orientation bias vector and variance scaling factor, so as to obtain a well-trained deep reinforcement learning scheduling strategy model. The online scheduling module is used for online real-time energy scheduling of multi-energy microgrids based on a well-trained deep reinforcement learning scheduling strategy model.

9. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements the large model-guided multi-energy microgrid risk scheduling method as described in any one of claims 1 to 7.

10. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the large model-guided multi-energy microgrid risk scheduling method as described in any one of claims 1 to 7.