A power and electricity balance method and device considering multi-scenario uncertainty

CN122844128APending Publication Date: 2026-09-29ELECTRIC POWER RES INST OF STATE GRID ZHEJIANG ELECTRIC POWER COMAPNY +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611041016.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-14
Publication Date
2026-09-29

AI Technical Summary

Technical Problem

[0005]同时,传统博弈优化方法通常侧重少量主体或单一场景下的策略均衡,难以适应多场景、多时序、大规模主体协同运行需求;传统强化学习方法虽然具备一定的自适应能力,但单主体独立训练存在数据利用效率低、泛化能力不足和训练稳定性差等问题

Benefits of technology

一方面,本发明通过构建涵盖极端工况、典型工况及过渡工况的多场景不确定性样本集,将新能源出力波动、负荷需求变化、储能状态演化、柔性负荷响应特性以及电网运行边界变化纳入统一建模框架,使得生成的调节策略能够适配不同运行场景,解决了传统方法在不确定性环境下适应性差的问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122844128A_ABST
    Figure CN122844128A_ABST
Patent Text Reader

Abstract

This invention pertains to the field of power and discloses a power balance method and apparatus considering uncertainties in multiple scenarios. The method includes: collecting operational data from multiple stakeholders and grid-side data to construct a multi-scenario uncertainty sample set, and establishing a multi-scenario, multi-time-series power balance model to quantify power shortages under different operational scenarios; constructing a federated game optimization model with the goal of maximizing comprehensive utility; each stakeholder training its adjustment strategy locally based on local private data and uploading model parameter updates to a federated aggregation server; the federated aggregation server calculating aggregation weights, weighting and aggregating the received model parameter updates to generate a global collaborative adjustment strategy; each stakeholder receiving suggested adjustment actions from the global collaborative adjustment strategy, modifying the feasibility of the suggested adjustment actions based on local operational constraints to obtain the actual implementation adjustment strategy; and statistically analyzing the execution effect of the actual implementation adjustment strategy and dynamically updating relevant parameters.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of power, and in particular relates to a power balance method and apparatus that takes into account uncertainties in multiple scenarios. Background Technology

[0002] With the continuous advancement of the construction of new power systems, a large number of diverse entities, such as distributed photovoltaic power, wind power, new energy storage, electric vehicles, flexible loads, microgrids, and virtual power plants, are being connected to distribution networks and regional power grids. The operation of the power system is gradually shifting from the traditional centralized unidirectional regulation mode to a collaborative regulation mode involving interaction among power sources, grids, loads, and storage. These diverse entities possess flexible regulation capabilities and can play a crucial role in power balance, renewable energy consumption, peak shaving and valley filling, and security support.

[0003] However, in actual operation, the participation of multiple stakeholders in power balance regulation still faces numerous challenges. On the one hand, renewable energy output is significantly affected by meteorological conditions, load demand is markedly influenced by user behavior, production plans, and temperature changes, energy storage resources are affected by state of charge, lifespan degradation, and charging / discharging constraints, and flexible loads are affected by comfort and production constraints, resulting in significant uncertainty and multi-scenario characteristics in the system's power shortage. On the other hand, different stakeholders have different operational goals and interests. Distributed power sources aim to increase the benefits of renewable energy consumption, energy storage providers aim to obtain regulation benefits and reduce lifespan degradation, flexible load providers aim to reduce energy costs and minimize response losses, while the grid side needs to maintain power balance and ensure the safe and stable operation of the grid. If only a centralized optimization method is adopted, it is difficult to fully reflect the rational decision-making behavior and fair participation needs of multiple stakeholders.

[0004] In related technologies, power balance optimization methods often rely on centralized data aggregation and unified optimization solutions. This requires each entity to upload complete operational data, load curves, equipment parameters, and pricing information, which can easily lead to data privacy leaks, heavy communication burdens, and insufficient participation from various entities. For market-oriented entities such as distributed power sources, new energy storage, flexible loads, and microgrids, their local operational data is often commercially sensitive and not suitable for direct upload to the dispatch center. Therefore, how to achieve collaborative optimization among multiple entities without sharing their original data is a pressing issue in the field of power system operation and dispatch.

[0005] Meanwhile, traditional game optimization methods usually focus on strategy equilibrium in a small number of subjects or a single scenario, which is difficult to adapt to the needs of multi-scenario, multi-time series, and large-scale subject collaborative operation. Although traditional reinforcement learning methods have a certain degree of adaptability, single-subject independent training has problems such as low data utilization efficiency, insufficient generalization ability and poor training stability. Summary of the Invention

[0006] In view of this, the present invention discloses a power balance method and apparatus that takes into account uncertainties in multiple scenarios, which can solve the shortcomings of related technologies.

[0007] To achieve the above objectives, the present invention discloses the following technical solution: According to a first aspect of the present invention, a power balance method considering uncertainties in multiple scenarios is proposed, comprising: The system collects operational data from multiple entities and grid-side data. The multiple entities include distributed power sources, new energy storage, flexible loads, microgrids, and virtual power plants. The grid-side data includes grid security constraint data, predicted output data, predicted load data, and market incentive data. Based on historical operating data, prediction error distribution and equipment status changes, a multi-scenario uncertainty sample set is constructed, and a multi-scenario, multi-time series power balance model is established to quantify the power shortage under different operating scenarios. A federated game optimization model is constructed with the goal of maximizing comprehensive utility, which is jointly determined by the principal's adjustment revenue, principal's adjustment cost, power balance deviation penalty, grid security risk penalty, and fair allocation deviation penalty. Each of the multiple stakeholders trains and adjusts its strategy locally based on local private data, and uploads the model parameter update to the federated aggregation server. The federated aggregation server calculates the aggregation weight based on the adjustable capacity, historical response reliability, local sample quality and scene coverage of each subject, and performs weighted aggregation on the received model parameter update amount to generate a global collaborative adjustment strategy. Each of the multiple entities receives the suggested adjustment actions output by the global collaborative adjustment strategy, and makes feasibility corrections to the suggested adjustment actions based on local operational constraints to obtain the actual implementation adjustment strategy. The actual execution effect of the adjustment strategy is statistically analyzed, and the subject response reliability, incentive price, revenue sharing coefficient and scenario weight are dynamically updated. Then, rolling optimization is performed in the next scheduling cycle.

[0008] Preferably, the step of constructing a multi-scenario uncertainty sample set based on historical operating data, prediction error distribution, and equipment status changes includes: Collect historical typical day data on photovoltaic power output, wind power output, load demand, energy storage status of charge and grid operation boundary, and combine weather forecast error, new energy power output forecast error and load forecast error to generate an initial scenario library; The initial scenario library is compressed using a scenario reduction algorithm to retain representative scenarios covering extreme, typical, and transitional operating conditions, and each scenario is assigned a corresponding scenario probability weight. For each scheduling period under each representative scenario, the power shortage for that period is calculated based on the load demand, the predicted output of distributed power sources, and the planned external exchange power, and is used as the input to the power balance model.

[0009] Preferably, the multi-scenario, multi-time-series power balance model includes the following constraints: The power balance constraint requires that the sum of the regulation power of all multiple entities and the reserve regulation power of the upper-level power grid match the power shortage in the current scenario and current time period. Energy storage operation constraints include the dynamic recursive relationship of energy storage state of charge, upper and lower limits of charging and discharging power constraints, charging and discharging efficiency constraints, and mutual exclusion constraints of charging and discharging states. Power grid safety constraints, including the upper and lower limits of node voltage and the limits of line power flow, are used to correlate the relationship between power regulation and changes in the power grid operating status through preset sensitivity coefficients.

[0010] Preferably, in the federated game optimization model, each agent trains its local strategy with the goal of maximizing its own overall utility, and the overall utility is calculated as follows: The main body's adjustment revenue is calculated based on the product of the actual adjustment power provided by the main body and the market incentive price; The main adjustment cost includes the life loss cost of energy storage charging and discharging, the comfort loss cost of flexible load response, or the production offset loss cost, and is fitted using a quadratic cost function; The penalty for power balance deviation is proportional to the square of the difference between the power shortage and the actual total regulation power; The penalties for power grid safety risks are related to the degree of node voltage exceedance or line power flow exceedance caused by regulation actions; The fair apportionment of deviation penalties is related to the degree of deviation of each entity's regulatory responsibility from its adjustable capacity.

[0011] Preferably, the weighted aggregation of the received model parameter updates includes: For each round of federated training, the adjustable capacity, historical response reliability, local sample quality and scene coverage of each subject are weighted and summed according to the preset weight coefficients to calculate the aggregate weight of each subject. Subjects with larger adjustable capacity, higher response reliability, better sample quality and higher scene coverage correspond to higher aggregate weights. Calculate the consistency score of the update direction for each dimension of the model parameter update volume uploaded by all participating entities. The consistency score is the average absolute value of the sign of the update direction of all entities in that dimension. Set a consistency threshold. When the consistency score of the update direction of a certain dimension is not lower than the threshold, retain all the update amount of that dimension. When the consistency score is lower than the threshold, reduce the update amount of that dimension according to the proportion of the consistency score to generate a consistency masking vector. The aggregate weights of each subject are multiplied by the consistency masking vector, and the model parameter update amounts of all subjects are weighted and fused to obtain the updated global model parameters.

[0012] Preferably, the feasibility modification of the suggested adjustment action based on local operating constraints includes: Based on the suggested adjustment actions output by the global collaborative adjustment strategy, the target action with the smallest deviation from the suggested action and satisfying all local constraints is found in the local action space to form the actual execution adjustment strategy. For the energy storage entity, the local constraints include upper and lower limits of state of charge, upper and lower limits of charge and discharge power, and mutual exclusion constraints of charge and discharge. The corrected actions shall not lead to overcharging or over-discharging of the energy storage. For flexible load subjects, the local constraints include user comfort constraints, production plan continuity constraints, and maximum interruptible / transferable duration constraints. The modified actions must not exceed the user's preset comfort boundary or production plan boundary. For distributed power sources, the local constraints include maximum available output constraints, output ramp-up rate constraints, and grid connection safety constraints. The corrected actions must not cause the grid voltage or frequency to exceed the limit. If there is an unmet remaining power shortage, the federated aggregation server will prioritize allocating the remaining shortage to entities that still have the capacity to adjust upwards or downwards. If all entities have no adjustment capacity, the server will call upon the backup resources of the upper-level power grid or implement load shedding measures to ensure system balance.

[0013] Preferably, the dynamic updating of the subject response reliability, incentive price, revenue sharing coefficient, and scenario weight includes: Based on the deviation ratio between the actual adjusted power and the recommended adjusted power of each subject, the response reliability of each subject is updated using the moving average method. The smaller the deviation between the actual value and the recommended value, the greater the improvement in response reliability. The overall contribution of each entity is calculated, which is obtained by weighting four dimensions: actual regulation power, response reliability level, response speed, and safety support contribution. The total adjustment revenue of the system is allocated according to the proportion of each entity's comprehensive contribution to the total contribution of all participating entities. The entity with the higher comprehensive contribution receives the higher allocation revenue. Based on the deviation between the actual occurrence probability and the predicted probability of each scenario in this round, the probability weight of each scenario in the next cycle is dynamically adjusted to achieve adaptive updating of scenario weights.

[0014] According to a second aspect of the present invention, a power balancing device considering uncertainties in multiple scenarios is proposed, comprising: Data Acquisition Unit: Collects operational data from multiple entities and grid-side data. The multiple entities include distributed power sources, new energy storage, flexible loads, microgrids, and virtual power plants. The grid-side data includes grid security constraint data, predicted output data, predicted load data, and market incentive data. The first building unit: Based on historical operating data, prediction error distribution and equipment status changes, a multi-scenario uncertainty sample set is constructed, and a multi-scenario, multi-time series power balance model is established to quantify the power gap under different operating scenarios; The second building unit is to construct a federated game optimization model with the goal of maximizing comprehensive utility. The comprehensive utility is jointly determined by the principal's adjustment revenue, principal's adjustment cost, power balance deviation penalty, grid security risk penalty, and fair allocation deviation penalty. Training Unit: Each multi-entity entity trains and adjusts its strategy locally based on its local private data, and uploads the updated model parameters to the federated aggregation server; Aggregation Unit: The federated aggregation server calculates the aggregation weight based on the adjustable capacity, historical response reliability, local sample quality and scene coverage of each subject, and performs weighted aggregation on the received model parameter update amount to generate a global collaborative adjustment strategy. Correction Unit: Each multi-entity receives the suggested adjustment actions output by the global collaborative adjustment strategy, and performs feasibility correction on the suggested adjustment actions in combination with local operating constraints to obtain the actual execution adjustment strategy; Update Unit: Calculates the actual execution effect of the adjustment strategy, dynamically updates the subject response reliability, incentive price, revenue sharing coefficient and scenario weight, and enters the next scheduling cycle for rolling optimization.

[0015] Preferably, the first building unit is specifically used for: Collect historical typical day data on photovoltaic power output, wind power output, load demand, energy storage status of charge and grid operation boundary, and combine weather forecast error, new energy power output forecast error and load forecast error to generate an initial scenario library; The initial scenario library is compressed using a scenario reduction algorithm to retain representative scenarios covering extreme, typical, and transitional operating conditions, and each scenario is assigned a corresponding scenario probability weight. For each scheduling period under each representative scenario, the power shortage for that period is calculated based on the load demand, the predicted output of distributed power sources, and the planned external exchange power, and is used as the input to the power balance model.

[0016] Preferably, in the federated game optimization model, each agent trains its local strategy with the goal of maximizing its own overall utility, and the overall utility is calculated as follows: The main body's adjustment revenue is calculated based on the product of the actual adjustment power provided by the main body and the market incentive price; The main adjustment cost includes the life loss cost of energy storage charging and discharging, the comfort loss cost of flexible load response, or the production offset loss cost, and is fitted using a quadratic cost function; The penalty for power balance deviation is proportional to the square of the difference between the power shortage and the actual total regulation power; The penalties for power grid safety risks are related to the degree of node voltage exceedance or line power flow exceedance caused by regulation actions; The fair apportionment of deviation penalties is related to the degree of deviation of each entity's regulatory responsibility from its adjustable capacity.

[0017] Preferably, the polymerization unit is specifically used for: For each round of federated training, the adjustable capacity, historical response reliability, local sample quality and scene coverage of each subject are weighted and summed according to the preset weight coefficients to calculate the aggregate weight of each subject. Subjects with larger adjustable capacity, higher response reliability, better sample quality and higher scene coverage correspond to higher aggregate weights. Calculate the consistency score of the update direction for each dimension of the model parameter update volume uploaded by all participating entities. The consistency score is the average absolute value of the sign of the update direction of all entities in that dimension. Set a consistency threshold. When the consistency score of the update direction of a certain dimension is not lower than the threshold, retain all the update amount of that dimension. When the consistency score is lower than the threshold, reduce the update amount of that dimension according to the proportion of the consistency score to generate a consistency masking vector. The aggregate weights of each subject are multiplied by the consistency masking vector, and the model parameter update amounts of all subjects are weighted and fused to obtain the updated global model parameters.

[0018] Preferably, the correction unit is specifically used for: Based on the suggested adjustment actions output by the global collaborative adjustment strategy, the target action with the smallest deviation from the suggested action and satisfying all local constraints is found in the local action space to form the actual execution adjustment strategy. For the energy storage entity, the local constraints include upper and lower limits of state of charge, upper and lower limits of charge and discharge power, and mutual exclusion constraints of charge and discharge. The corrected actions shall not lead to overcharging or over-discharging of the energy storage. For flexible load subjects, the local constraints include user comfort constraints, production plan continuity constraints, and maximum interruptible / transferable duration constraints. The modified actions must not exceed the user's preset comfort boundary or production plan boundary. For distributed power sources, the local constraints include maximum available output constraints, output ramp-up rate constraints, and grid connection safety constraints. The corrected actions must not cause the grid voltage or frequency to exceed the limit. If there is an unmet remaining power shortage, the federated aggregation server will prioritize allocating the remaining shortage to entities that still have the capacity to adjust upwards or downwards. If all entities have no adjustment capacity, the server will call upon the backup resources of the upper-level power grid or implement load shedding measures to ensure system balance.

[0019] Preferably, the update unit is specifically used for: Based on the deviation ratio between the actual adjusted power and the recommended adjusted power of each subject, the response reliability of each subject is updated using the moving average method. The smaller the deviation between the actual value and the recommended value, the greater the improvement in response reliability. The overall contribution of each entity is calculated, which is obtained by weighting four dimensions: actual regulation power, response reliability level, response speed, and safety support contribution. The total adjustment revenue of the system is allocated according to the proportion of each entity's comprehensive contribution to the total contribution of all participating entities. The entity with the higher comprehensive contribution receives the higher allocation revenue. Based on the deviation between the actual occurrence probability and the predicted probability of each scenario in this round, the probability weight of each scenario in the next cycle is dynamically adjusted to achieve adaptive updating of scenario weights.

[0020] According to a third aspect of the present invention, an electronic device is provided, comprising: processor; Memory used to store processor-executable instructions; The processor implements the steps of the method as described in the first aspect by running the executable instructions.

[0021] According to a fourth aspect of the invention, a computer-readable storage medium is provided having computer instructions stored thereon that, when executed by a processor, implement the steps of the method as described in the first aspect.

[0022] As can be seen from the above technical solutions, the beneficial effects of the power balance method and device for considering uncertainties in multiple scenarios disclosed in this invention are as follows: On the one hand, this invention constructs a multi-scenario uncertainty sample set covering extreme operating conditions, typical operating conditions, and transitional operating conditions, and incorporates new energy output fluctuations, load demand changes, energy storage state evolution, flexible load response characteristics, and grid operation boundary changes into a unified modeling framework, so that the generated regulation strategy can be adapted to different operating scenarios, solving the problem of poor adaptability of traditional methods in uncertain environments.

[0023] On the other hand, the present invention adopts a federated learning mechanism, in which each multi-entity uses private data locally for policy training only, and uploads only the model parameter update amount without uploading sensitive information such as original running data, user load curves, and device status details, thus avoiding the risk of data privacy leakage, reducing the communication transmission pressure of the system, and increasing the enthusiasm of the participants.

[0024] Furthermore, the federated game optimization model constructed in this invention incorporates the subject's adjustment benefits, adjustment costs, and system-level power balance deviations, grid security risks, and fair allocation of responsibilities into a unified comprehensive utility function. This not only safeguards the economic interests and participation fairness of each subject but also ensures the safe and stable operation of the power grid. Attached Figure Description

[0025] Figure 1 This is a flowchart of an exemplary embodiment of a power balance method that considers uncertainties in multiple scenarios; Figure 2 This is an exemplary embodiment of an architecture diagram of a power balance system that considers uncertainties in multiple scenarios; Figure 3 This is a schematic diagram of a local policy training and federated aggregation process provided in an exemplary embodiment; Figure 4 This is a schematic diagram of a multi-scenario rolling optimization and revenue sharing process provided in an exemplary embodiment; Figure 5 This is a schematic structural diagram of a device provided in an exemplary embodiment; Figure 6 This is a block diagram of an exemplary embodiment of a power balancing device that takes into account uncertainties in multiple scenarios. Detailed Implementation

[0026] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with one or more embodiments of the present invention. Rather, they are merely examples of apparatuses and methods consistent with some aspects of one or more embodiments of the present invention as detailed in the appended claims.

[0027] It should be noted that the steps of the corresponding methods in other embodiments are not necessarily performed in the order shown and described in this invention. In some other embodiments, the methods may include more or fewer steps than those described in this invention. Furthermore, a single step described in this invention may be broken down into multiple steps in other embodiments; and multiple steps described in this invention may be combined into a single step in other embodiments.

[0028] To address the shortcomings of related technologies, this invention proposes a power balance method and apparatus that considers uncertainties in multiple scenarios.

[0029] Figure 1 This is a flowchart illustrating an exemplary embodiment of a power balance method that considers uncertainties across multiple scenarios. For example... Figure 1 As shown, the method may include the following steps: Step 101: Collect operational data from multiple entities and grid-side data. The multiple entities include distributed power sources, new energy storage, flexible loads, microgrids, and virtual power plants. The grid-side data includes grid security constraint data, predicted output data, predicted load data, and market incentive data.

[0030] The distributed power source operation data may include photovoltaic power output, wind power output, upper and lower limits of controllable distributed power source output, and ramping constraints; the new energy storage operation data includes rated energy storage capacity, upper and lower limits of charge and discharge power, state of charge, charge and discharge efficiency, and lifetime loss parameters; the flexible load operation data includes load reduction, load transfer, interruptible load, response time, and user comfort constraints; the grid security constraint data includes node voltage upper and lower limits, line power flow limits, and grid security margin.

[0031] It should be noted that by acquiring data from multiple stakeholders and the power grid, a data foundation can be provided for subsequent multi-scenario modeling, game utility construction, local policy training, and federated aggregation.

[0032] Step 102: Based on historical operating data, prediction error distribution and equipment status changes, construct a multi-scenario uncertainty sample set, and establish a multi-scenario, multi-time series power balance model to quantify the power shortage under different operating scenarios.

[0033] Specifically, the construction of a multi-scenario uncertainty sample set based on historical operating data, prediction error distribution, and equipment status changes includes: collecting photovoltaic output, wind power output, load demand, energy storage charge status, and grid operation boundary data for typical historical days; combining weather prediction errors, new energy output prediction errors, and load prediction errors to generate an initial scenario library; compressing the initial scenario library using a scenario reduction algorithm to retain representative scenarios covering extreme, typical, and transitional operating conditions; assigning corresponding scenario probability weights to each scenario; and for each scheduling period under each representative scenario, calculating the power shortage for that scenario during that period based on the load demand, distributed power generation prediction output, and planned external exchange power, which serves as the input to the power balance model.

[0034] Build a collection of scenes and scheduling time set The multi-scenario uncertainty sample is represented as: ; The multi-scenario uncertainty sample set can be generated from historical typical days, weather forecast errors, new energy forecast errors, load forecast errors, and equipment status changes. It can also retain representative typical scenarios through scenario reduction methods.

[0035] A multi-scenario, multi-time-series power balance model can include the following constraints: The power balance constraint requires that the sum of the regulation power of all multiple entities and the reserve regulation power of the upper-level power grid match the power shortage in the current scenario and current time period. The power shortage is expressed as: ; The power balance constraint is expressed as: ; in, It is a collection of multiple subjects. as the main body In the scene Next period Adjustable power, Regulating power provided to the upstream power grid or backup resources For the scene Next period The power shortage This represents the residual in the power balance.

[0036] Energy storage operation constraints include dynamic recursive relationships of energy storage state of charge, upper and lower limits of charging and discharging power constraints, charging and discharging efficiency constraints, and mutual exclusion constraints of charging and discharging states.

[0037] For the energy storage device, its state of charge update formula is expressed as: ; in, as the main body In the scene Next period The state of charge of energy storage, as the main body In the scene Next period The state of charge of energy storage, For energy storage charging power, For energy storage discharge power, For charging efficiency, For discharge efficiency, For the rated capacity of energy storage, This is the scheduling time interval.

[0038] Power grid safety constraints, including the upper and lower limits of node voltage and the limits of line power flow, are used to correlate the relationship between power regulation and changes in the power grid operating status through preset sensitivity coefficients.

[0039] Node voltage constraints and line power flow constraints are expressed as follows: ; ; in, To adjust the previous node voltage, as the main body Adjusting power to nodes Voltage sensitivity, To adjust the front line The trend as the main body Adjusting power for the line Sensitivity to trends, For the line Capacity limits.

[0040] Step 103: Construct a federated game optimization model with the goal of maximizing comprehensive utility. The comprehensive utility is jointly determined by the principal's adjustment revenue, principal's adjustment cost, power balance deviation penalty, grid security risk penalty, and fair allocation deviation penalty.

[0041] In this invention, the federated game refers to a situation where, under the condition that the original operating data of multiple agents are not uploaded centrally, each agent independently trains its strategy based on its local operating data, local operating constraints, and its own utility function, and uploads the local model parameter updates to the federated aggregation server. The federated aggregation server weights and aggregates the local model parameter updates according to each agent's adjustable capacity, response reliability, sample quality, and scenario coverage to form a global collaborative adjustment strategy. Each agent then modifies its strategy based on the global collaborative adjustment strategy and its local set of actionable actions, thereby achieving collaborative optimization of power balance among multiple agents under privacy protection conditions.

[0042] Specifically, the federated game includes game participants, a strategy space, a utility function, an information exchange mechanism, and a strategy coordination mechanism. Game participants include at least one of the following: distributed power generation entities, novel energy storage entities, flexible load entities, microgrid entities, and virtual power plant entities. The strategy space includes the output adjustment, energy storage charging and discharging, load reduction or transfer, reserve capacity declaration, and response bidding that each entity can choose under different scenarios and time periods. The utility function describes the relationship between the entity's adjustment benefits, adjustment costs, power balance deviation, grid security risk, and fair allocation deviation. The information exchange mechanism constrains each entity to only upload model parameter updates, not raw operating data. The strategy coordination mechanism coordinates the local strategies of each entity through federated aggregation, incentive price updates, response reliability updates, and benefit sharing mechanisms, so that the local optimal response of each entity gradually approaches the system-level coordinated adjustment target.

[0043] In one embodiment, in the federated game optimization model, each agent trains its local strategy with the goal of maximizing its own comprehensive utility. The comprehensive utility is calculated as follows: the agent's adjustment revenue is calculated based on the product of the actual adjustment power provided by the agent and the market incentive price; the agent's adjustment cost includes the life loss cost of energy storage charging and discharging, the comfort loss cost of flexible load response, or the production offset loss cost, and is fitted using a quadratic cost function; the power balance deviation penalty is proportional to the square of the difference between the power gap and the actual total adjustment power; the grid security risk penalty is related to the degree of node voltage exceedance or line power flow exceedance caused by the adjustment action; and the fair allocation deviation penalty is related to the degree of deviation between the adjustment responsibility borne by each agent and its adjustable capacity.

[0044] In the aforementioned federated game process, each entity does not passively accept scheduling instructions, but rather selects an adjustment strategy with the goal of maximizing its overall utility while satisfying local operational constraints. Simultaneously, the scheduling center or federated aggregation server does not directly acquire the entities' raw data for centralized optimization, but rather forms a globally coordinated adjustment strategy based on the model parameter updates uploaded by each entity. Therefore, the federated game can simultaneously address the issues of unwillingness among multiple entities to share data and inconsistent interests among entities, achieving a balance between privacy protection, interest coordination, and system power balance.

[0045] The multi-party federated game process can be represented as follows: ; in, This represents a federated game model for the balance of electricity supply among multiple stakeholders. This represents the set of multiple participants in the game. This represents the set of possible actions for each entity. This represents the set of comprehensive utility functions of each subject. Represents the local data set of each entity. This represents the set of global collaborative adjustment strategies formed by the federated aggregation server.

[0046] main body Given other subject strategies and global coordinated adjustment strategy parameters Under these conditions, its local optimal response is expressed as: ; in, Representing the subject In the scene The optimal response strategy under these circumstances Representing the subject The set of local actionable actions Indicates excluding the main body The strategy combination of other entities, Indicates the first Round-based global collaborative adjustment strategy parameters, Representing the subject Comprehensive objective function under multiple scenario conditions.

[0047] When each agent satisfies the policy stability condition during the iterative process of maximizing local utility, aggregating global policies, and making local executable adjustments, a collaborative equilibrium policy in the federated game is obtained: ; in, Representing the subject The federal game collaborative equilibrium strategy Indicates excluding the main body The combination of equilibrium strategies of other entities, This represents the global collaborative adjustment strategy parameters after federated aggregation converges or meets the preset stopping conditions. Representing the subject The set of local actionable actions Representing the subject Comprehensive objective function under multiple scenario conditions.

[0048] Furthermore, the main body In the scene and time period The combined utility function is expressed as follows: ; in, as the main body In the scene Next period The overall effect Adjusting income as the main body Adjusting costs as the main body Penalty for power balance deviation, Punishment for power grid safety risks To fairly distribute the penalties for deviations, , and These are the weighting coefficients for balance deviation, safety risk, and fair allocation, respectively.

[0049] The penalty for power balance deviation is expressed as follows: ; The main adjustment cost is expressed as: ; in, For the scene Next period Power balance deviation penalty To address the power shortage, as the main body Adjustable power, Regulating power provided to the upstream power grid or backup resources; as the main body Adjustment costs, , and To adjust the cost coefficient, This includes energy storage lifespan loss, load comfort loss, or production offset loss.

[0050] By constructing a comprehensive utility function, the economic interests of the stakeholders, the power grid security requirements, the power balance target, and the responsibility for fair regulation can be unified into the same optimization framework, thereby improving the initiative and consistency of the participation of multiple stakeholders in regulation.

[0051] Step 104: Each multi-entity trains and adjusts its strategy locally based on its local private data, and uploads the updated model parameters to the federated aggregation server.

[0052] main body Build local policy function ,in, as the main body Local policy parameters, For local status, For local actions; main body The local training objective is represented as: ; in, as the main body The cumulative effect of discounts As a discount factor, as the main body During the period The overall effect.

[0053] main body After local training is complete, generate the local model parameter update values: ; in, as the main body In the The amount of local model parameter updates during federated training. as the main body go through Parameters of the model after local training For the first Round global model parameters.

[0054] like Figure 2 As shown, each entity only uploads the model parameter update amount, and does not upload the original operating data, user load curves, equipment status details and quotation details, thereby achieving collaborative optimization under privacy protection.

[0055] Step 105: The federated aggregation server calculates the aggregation weight based on the adjustable capacity, historical response reliability, local sample quality and scene coverage of each subject, and performs weighted aggregation on the received model parameter update amount to generate a global collaborative adjustment strategy.

[0056] Specifically, the weighted aggregation of the received model parameter updates includes: for each round of federated training, weighting and summing the adjustable capacity, historical response reliability, local sample quality, and scene coverage of each subject according to preset weight coefficients to calculate the aggregation weight of each subject, wherein subjects with larger adjustable capacity, higher response reliability, better sample quality, and higher scene coverage correspond to higher aggregation weights; calculating the consistency score of the update direction for each dimension of the model parameter updates uploaded by all participating subjects, wherein the consistency score is the average absolute value of the update direction sign of all subjects in that dimension; setting a consistency threshold, wherein when the consistency score of the update direction of a certain dimension is not lower than the threshold, all updates of that dimension are retained, and when the consistency score is lower than the threshold, the update volume of that dimension is attenuated according to the proportion of the consistency score to generate a consistency masking vector; multiplying the aggregation weight of each subject with the consistency masking vector, and weightedly fusing the model parameter updates of all subjects to obtain the updated global model parameters.

[0057] like Figure 3 As shown, the main body In the The weights in round federated aggregation are represented as follows: ; in, as the main body In the Aggregation weights in round-fed aggregation, as the main body Adjustable capacity, as the main body Response reliability, as the main body Local sample quality, as the main body Scene coverage , , and These are the weighting coefficients.

[0058] The consistency score for model parameter update direction is represented as follows: ; in, For the first The model parameter component is at the th . Consistency score of update direction in round-fed aggregation as the main body The uploaded number Update amount of each model parameter component It is a symbolic function.

[0059] Construct a masking coefficient based on the consistency score: ; in, For the first The masking coefficients of each model parameter component. This is the consistency threshold.

[0060] The global model parameter update is represented as: ; in, For the first Round global model parameters, For the first Round global model parameters, The global learning rate, as the main body Federal aggregation weights, For gradient consistency masking vectors, For element-wise multiplication, The increment of the model parameters after local training relative to the current global model parameters is used, rather than the gradient of the loss function.

[0061] By introducing a consistent update direction masking mechanism, we can weaken parameter updates with large discrepancies between different subjects and reduce the adverse effects of abnormal samples, abnormal subjects, or local extreme scenarios on the global collaborative adjustment strategy.

[0062] Step 106: Each multi-entity receives the suggested adjustment actions output by the global collaborative adjustment strategy, and makes feasibility corrections to the suggested adjustment actions based on local operating constraints to obtain the actual implementation adjustment strategy.

[0063] Specifically, the feasibility correction of the suggested adjustment actions based on local operational constraints includes: using the suggested adjustment actions output by the global coordinated adjustment strategy as a benchmark, finding the target action with the smallest deviation from the suggested action and satisfying all local constraints within the local feasible action space, and forming an actual execution adjustment strategy; for energy storage entities, the local constraints include upper and lower limits of state of charge constraints, upper and lower limits of charging and discharging power constraints, and charging and discharging mutual exclusion constraints, and the corrected action must not lead to overcharging or over-discharging of energy storage; for flexible load entities, the local constraints include user comfort constraints, production plan continuity constraints, and maximum interruptible / transferable duration constraints, and the corrected action must not exceed the user's preset comfort boundary or production plan boundary; for distributed power entities, the local constraints include maximum available output constraints, output ramp-up rate constraints, and grid connection safety constraints, and the corrected action must not lead to grid voltage or frequency exceeding limits; if there is an unmet remaining power shortage, the federated aggregation server will preferentially allocate the remaining shortage to entities that still have upward or downward adjustment margins, and if all entities have no adjustment margins, the upper-level grid reserve resources or load shedding measures will be called to ensure system balance.

[0064] The suggested actions output by the global coordinated regulation strategy are represented as follows: ; main body Based on local actionable set Perform projection correction: ; in, as the main body The final action performed Suggested actions output for the global strategy. The main local action set, For local execution costs, Adjust the weight for cost.

[0065] For energy storage entities, executable corrections include charge / discharge power boundaries, state of charge boundaries, and charge / discharge mutual exclusion constraints; for flexible load entities, executable corrections include comfort constraints, production planning constraints, and response time constraints; for distributed power entities, executable corrections include maximum available output constraints, ramping constraints, and grid connection safety constraints.

[0066] The federal aggregation server or scheduling coordination node calculates the remaining balance deviation based on the actual executable actions of each subject after correction, and redistributes the remaining deviation to subjects that still have adjustment margins; if it still cannot meet the requirements, it calls on backup resources or the upper-level grid to adjust the power.

[0067] Step 107: Statistically analyze the actual execution effect of the adjustment strategy, dynamically update the subject response reliability, incentive price, revenue sharing coefficient and scenario weight, and enter the next scheduling cycle for rolling optimization.

[0068] Specifically, such as Figure 4 As shown, the dynamic updating of subject response reliability, incentive price, revenue sharing coefficient, and scenario weight includes: updating the response reliability of each subject using a moving average method based on the deviation ratio between the actual execution adjustment power and the suggested adjustment power; the smaller the deviation between the actual execution value and the suggested value, the greater the improvement in response reliability; calculating the comprehensive contribution of each subject, which is obtained by weighting four dimensions: actual adjustment power, response reliability level, response speed, and security support contribution; allocating the total system adjustment revenue according to the proportion of each subject's comprehensive contribution to the total contribution of all participating subjects, with subjects with higher comprehensive contributions receiving higher allocated revenue; and dynamically adjusting the probability weight of each scenario in the next cycle based on the deviation between the actual occurrence probability and the predicted probability of each scenario in the current round, achieving adaptive updating of scenario weights.

[0069] The subject response reliability update is represented as: ; in, For the updated response reliability, To ensure the reliability of the response before the update, To suggest adjusting the power, To actually perform power regulation, The reliability update factor.

[0070] The overall contribution of the main body is expressed as follows: ; The main entity's revenue sharing is represented as follows: ; in, as the main body The overall contribution Contribute to rapid response, Contribute to security support to Weighted by contribution level; as the main body The gains obtained This represents the total adjustment benefit of the system.

[0071] By continuously updating the response reliability and revenue sharing coefficients, entities that respond promptly, execute accurately, and contribute significantly to security can obtain higher returns, thereby increasing the enthusiasm of diverse entities to participate in the long-term regulation of power balance.

[0072] In one aspect, this invention constructs a multi-scenario uncertainty sample set covering extreme, typical, and transitional operating conditions, incorporating new energy output fluctuations, load demand changes, energy storage state evolution, flexible load response characteristics, and grid operation boundary changes into a unified modeling framework. This enables the generated regulation strategies to adapt to different operating scenarios, solving the problem of poor adaptability of traditional methods in uncertain environments.

[0073] On the other hand, the present invention adopts a federated learning mechanism, in which each multi-entity uses private data locally for policy training only, and uploads only the model parameter update amount without uploading sensitive information such as original running data, user load curves, and device status details, thus avoiding the risk of data privacy leakage, reducing the communication transmission pressure of the system, and increasing the enthusiasm of the participants.

[0074] Furthermore, the federated game optimization model constructed in this invention incorporates the subject's adjustment benefits, adjustment costs, and system-level power balance deviations, grid security risks, and fair allocation of responsibilities into a unified comprehensive utility function. This not only safeguards the economic interests and participation fairness of each subject but also ensures the safe and stable operation of the power grid.

[0075] This invention introduces a weighted mechanism based on adjustable capacity, response reliability, sample quality, and scene coverage in the federated aggregation stage, and combines it with update direction consistency masking technology to effectively reduce the interference of abnormal subjects, low-quality samples, or extreme scenarios on the global model, thereby improving the stability of the federated aggregation process and the generalization ability of the global collaborative adjustment strategy.

[0076] This invention ensures that regulation commands meet the overall needs of the power grid while strictly complying with the local physical constraints and operational preferences of each entity through a "global issuance-local correction" mechanism. At the same time, through a revenue-sharing mechanism based on comprehensive contribution, entities that respond promptly and execute accurately receive higher returns, thus forming a virtuous and long-term incentive mechanism.

[0077] Figure 5 This is a schematic structural diagram of a device provided in an exemplary embodiment. Please refer to... Figure 5At the hardware level, the device includes a processor 502, an internal bus 504, a network interface 506, memory 508, and non-volatile memory 510, and may also include other hardware required for its functions. One or more embodiments of the present invention can be implemented in software, for example, the processor 502 reads the corresponding computer program from the non-volatile memory 510 into memory 508 and then runs it. Of course, in addition to software implementation, one or more embodiments of the present invention do not exclude other implementation methods, such as logic devices or a combination of hardware and software, etc. That is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0078] Please refer to Figure 6 A power balancing device that considers uncertainties in multiple scenarios can be applied to, for example... Figure 6 The device shown, in order to implement the technical solution of the present invention, includes: The data acquisition unit 601 is used to acquire operational data of multiple entities and grid-side data. The multiple entities include distributed power sources, new energy storage, flexible loads, microgrids and virtual power plants. The grid-side data includes grid security constraint data, predicted output data, predicted load data and market incentive data. The first building unit 602 is used to build a multi-scenario uncertainty sample set based on historical operating data, prediction error distribution and equipment status changes, and to establish a multi-scenario multi-time series power balance model to quantify the power gap under different operating scenarios. The second construction unit 603 is used to construct a federated game optimization model with the goal of maximizing comprehensive utility. The comprehensive utility is jointly determined by the principal adjustment revenue, the principal adjustment cost, the power balance deviation penalty, the grid security risk penalty, and the fair allocation deviation penalty. Training unit 604 is used for each multi-entity to train and adjust strategies locally based on local private data, and to upload the model parameter update to the federated aggregation server. The aggregation unit 605 is used by the federated aggregation server to calculate the aggregation weight based on the adjustable capacity, historical response reliability, local sample quality and scene coverage of each subject, and to perform weighted aggregation on the received model parameter update amount to generate a global collaborative adjustment strategy. The correction unit 606 is used to receive the suggested adjustment actions output by the global collaborative adjustment strategy from each of the multiple entities, and to make feasibility corrections to the suggested adjustment actions in combination with local operating constraints to obtain the actual execution adjustment strategy. The update unit 607 is used to statistically analyze the actual execution effect of the adjustment strategy, dynamically update the subject response reliability, incentive price, revenue sharing coefficient and scenario weight, and enter the next scheduling cycle for rolling optimization.

[0079] Optionally, the first building unit 602 is specifically used for: Collect historical typical day data on photovoltaic power output, wind power output, load demand, energy storage status of charge and grid operation boundary, and combine weather forecast error, new energy power output forecast error and load forecast error to generate an initial scenario library; The initial scenario library is compressed using a scenario reduction algorithm to retain representative scenarios covering extreme, typical, and transitional operating conditions, and each scenario is assigned a corresponding scenario probability weight. For each scheduling period under each representative scenario, the power shortage for that period is calculated based on the load demand, the predicted output of distributed power sources, and the planned external exchange power, and is used as the input to the power balance model.

[0080] Optionally, the multi-scenario, multi-time-series power balance model includes the following constraints: The power balance constraint requires that the sum of the regulation power of all multiple entities and the reserve regulation power of the upper-level power grid match the power shortage in the current scenario and current time period. Energy storage operation constraints include the dynamic recursive relationship of energy storage state of charge, upper and lower limits of charging and discharging power constraints, charging and discharging efficiency constraints, and mutual exclusion constraints of charging and discharging states. Power grid safety constraints, including the upper and lower limits of node voltage and the limits of line power flow, are used to correlate the relationship between power regulation and changes in the power grid operating status through preset sensitivity coefficients.

[0081] Optionally, in the federated game optimization model, each agent trains its local strategy with the goal of maximizing its own overall utility, and the overall utility is calculated as follows: The main body's adjustment revenue is calculated based on the product of the actual adjustment power provided by the main body and the market incentive price; The main adjustment cost includes the life loss cost of energy storage charging and discharging, the comfort loss cost of flexible load response, or the production offset loss cost, and is fitted using a quadratic cost function; The penalty for power balance deviation is proportional to the square of the difference between the power shortage and the actual total regulation power; The penalties for power grid safety risks are related to the degree of node voltage exceedance or line power flow exceedance caused by regulation actions; The fair apportionment of deviation penalties is related to the degree of deviation of each entity's regulatory responsibility from its adjustable capacity.

[0082] Optionally, the aggregation unit 605 is specifically used for: For each round of federated training, the adjustable capacity, historical response reliability, local sample quality and scene coverage of each subject are weighted and summed according to the preset weight coefficients to calculate the aggregate weight of each subject. Subjects with larger adjustable capacity, higher response reliability, better sample quality and higher scene coverage correspond to higher aggregate weights. Calculate the consistency score of the update direction for each dimension of the model parameter update volume uploaded by all participating entities. The consistency score is the average absolute value of the sign of the update direction of all entities in that dimension. Set a consistency threshold. When the consistency score of the update direction of a certain dimension is not lower than the threshold, retain all the update amount of that dimension. When the consistency score is lower than the threshold, reduce the update amount of that dimension according to the proportion of the consistency score to generate a consistency masking vector. The aggregate weights of each subject are multiplied by the consistency masking vector, and the model parameter update amounts of all subjects are weighted and fused to obtain the updated global model parameters.

[0083] Optionally, the correction unit 606 is specifically used for: Based on the suggested adjustment actions output by the global collaborative adjustment strategy, the target action with the smallest deviation from the suggested action and satisfying all local constraints is found in the local action space to form the actual execution adjustment strategy. For the energy storage entity, the local constraints include upper and lower limits of state of charge, upper and lower limits of charge and discharge power, and mutual exclusion constraints of charge and discharge. The corrected actions shall not lead to overcharging or over-discharging of the energy storage. For flexible load subjects, the local constraints include user comfort constraints, production plan continuity constraints, and maximum interruptible / transferable duration constraints. The modified actions must not exceed the user's preset comfort boundary or production plan boundary. For distributed power sources, the local constraints include maximum available output constraints, output ramp-up rate constraints, and grid connection safety constraints. The corrected actions must not cause the grid voltage or frequency to exceed the limit. If there is an unmet remaining power shortage, the federated aggregation server will prioritize allocating the remaining shortage to entities that still have the capacity to adjust upwards or downwards. If all entities have no adjustment capacity, the server will call upon the backup resources of the upper-level power grid or implement load shedding measures to ensure system balance.

[0084] Optionally, the update unit 607 is specifically used for: Based on the deviation ratio between the actual adjusted power and the recommended adjusted power of each subject, the response reliability of each subject is updated using the moving average method. The smaller the deviation between the actual value and the recommended value, the greater the improvement in response reliability. The overall contribution of each entity is calculated, which is obtained by weighting four dimensions: actual regulation power, response reliability level, response speed, and safety support contribution. The total adjustment revenue of the system is allocated according to the proportion of each entity's comprehensive contribution to the total contribution of all participating entities. The entity with the higher comprehensive contribution receives the higher allocation revenue. Based on the deviation between the actual occurrence probability and the predicted probability of each scenario in this round, the probability weight of each scenario in the next cycle is dynamically adjusted to achieve adaptive updating of scenario weights.

[0085] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which can take the form of a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email sending and receiving device, game console, tablet computer, wearable device, or any combination of these devices.

[0086] In a typical configuration, a computer includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0087] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0088] Computer-readable media, including both permanent and non-permanent, removable and non-removable media, can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0089] For any other form of computer-readable medium (or computer-readable storage medium) as described above, computer instructions may be stored thereon, which, when executed by a processor, implement one or more of the above embodiments, thereby realizing the technical solution of the present invention.

[0090] The present invention also proposes a computer program that, when executed by a processor, implements one or more of the embodiments described above, thereby realizing the technical solution of the present invention. This computer program may be specifically recorded on the above-described or other computer-readable media, and the present invention does not impose any limitations on this.

[0091] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0092] The foregoing has described specific embodiments of the invention. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims may be performed in a different order than that shown in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0093] The terminology used in one or more embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to limit the invention. The singular forms “a,” “the,” and “the” used in one or more embodiments of the invention and in the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0094] It should be understood that although the terms first, second, third, etc., may be used to describe various information in one or more embodiments of the present invention, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first information may also be referred to as second information without departing from the scope of one or more embodiments of the present invention, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to a determination."

[0095] The above description is merely a preferred embodiment of one or more embodiments of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of one or more embodiments of the present invention should be included within the protection scope of one or more embodiments of the present invention.

Claims

1. A power balance method considering uncertainties in multiple scenarios, characterized in that, include: The system collects operational data from multiple entities and grid-side data. The multiple entities include distributed power sources, new energy storage, flexible loads, microgrids, and virtual power plants. The grid-side data includes grid security constraint data, predicted output data, predicted load data, and market incentive data. Based on historical operating data, prediction error distribution and equipment status changes, a multi-scenario uncertainty sample set is constructed, and a multi-scenario, multi-time series power balance model is established to quantify the power shortage under different operating scenarios. A federated game optimization model is constructed with the goal of maximizing comprehensive utility, which is jointly determined by the principal's adjustment revenue, principal's adjustment cost, power balance deviation penalty, grid security risk penalty, and fair allocation deviation penalty. Each of the multiple stakeholders trains and adjusts its strategy locally based on local private data, and uploads the model parameter update to the federated aggregation server. The federated aggregation server calculates the aggregation weight based on the adjustable capacity, historical response reliability, local sample quality and scene coverage of each subject, and performs weighted aggregation on the received model parameter update amount to generate a global collaborative adjustment strategy. Each of the multiple entities receives the suggested adjustment actions output by the global collaborative adjustment strategy, and makes feasibility corrections to the suggested adjustment actions based on local operational constraints to obtain the actual implementation adjustment strategy. The actual execution effect of the adjustment strategy is statistically analyzed, and the subject response reliability, incentive price, revenue sharing coefficient and scenario weight are dynamically updated. Then, rolling optimization is performed in the next scheduling cycle.

2. The method according to claim 1, characterized in that, The multi-scenario uncertainty sample set constructed based on historical operating data, prediction error distribution, and equipment status changes includes: Collect historical typical day data on photovoltaic power output, wind power output, load demand, energy storage charge status and grid operation boundary, and combine weather forecast error, new energy output forecast error and load forecast error to generate an initial scenario library; The initial scenario library is compressed using a scenario reduction algorithm to retain representative scenarios covering extreme, typical, and transitional operating conditions, and each scenario is assigned a corresponding scenario probability weight. For each scheduling period under each representative scenario, the power shortage for that period is calculated based on the load demand, the predicted output of distributed power sources, and the planned external exchange power, and is used as the input to the power balance model.

3. The method according to claim 1, characterized in that, The multi-scenario, multi-time-series power balance model includes the following constraints: The power balance constraint requires that the sum of the regulation power of all multiple entities and the reserve regulation power of the upper-level power grid match the power shortage in the current scenario and current time period. Energy storage operation constraints include the dynamic recursive relationship of energy storage state of charge, upper and lower limits of charging and discharging power constraints, charging and discharging efficiency constraints, and mutual exclusion constraints of charging and discharging states. Power grid safety constraints, including the upper and lower limits of node voltage and the limits of line power flow, are used to correlate the relationship between power regulation and changes in the power grid operating status through preset sensitivity coefficients.

4. The method according to claim 1, characterized in that, In the federated game optimization model, each agent trains its local strategy with the goal of maximizing its own overall utility. The overall utility is calculated as follows: The main body's adjustment revenue is calculated based on the product of the actual adjustment power provided by the main body and the market incentive price; The main adjustment cost includes the life loss cost of energy storage charging and discharging, the comfort loss cost of flexible load response, or the production offset loss cost, and is fitted using a quadratic cost function; The penalty for power balance deviation is proportional to the square of the difference between the power shortage and the actual total regulation power; The penalties for power grid safety risks are related to the degree of node voltage exceedance or line power flow exceedance caused by regulation actions; The fair apportionment of deviation penalties is related to the degree of deviation of each entity's regulatory responsibility from its adjustable capacity.

5. The method according to claim 1, characterized in that, The weighted aggregation of the received model parameter updates includes: For each round of federated training, the adjustable capacity, historical response reliability, local sample quality and scene coverage of each subject are weighted and summed according to the preset weight coefficients to calculate the aggregate weight of each subject. Subjects with larger adjustable capacity, higher response reliability, better sample quality and higher scene coverage correspond to higher aggregate weights. Calculate the consistency score of the update direction for each dimension of the model parameter update volume uploaded by all participating entities. The consistency score is the average absolute value of the sign of the update direction of all entities in that dimension. Set a consistency threshold. When the consistency score of the update direction of a certain dimension is not lower than the threshold, retain all the update amount of that dimension. When the consistency score is lower than the threshold, reduce the update amount of that dimension according to the proportion of the consistency score to generate a consistency masking vector. The aggregate weights of each subject are multiplied by the consistency masking vector, and the model parameter update amounts of all subjects are weighted and fused to obtain the updated global model parameters.

6. The method according to claim 1, characterized in that, The feasibility modification of the proposed adjustment actions based on local operational constraints includes: Based on the suggested adjustment actions output by the global collaborative adjustment strategy, the target action with the smallest deviation from the suggested action and satisfying all local constraints is found in the local action space to form the actual execution adjustment strategy. For the energy storage entity, the local constraints include upper and lower limits of state of charge, upper and lower limits of charge and discharge power, and mutual exclusion constraints of charge and discharge. The corrected actions shall not lead to overcharging or over-discharging of the energy storage. For flexible load subjects, the local constraints include user comfort constraints, production plan continuity constraints, and maximum interruptible / transferable duration constraints. The modified actions must not exceed the user's preset comfort boundary or production plan boundary. For distributed power sources, the local constraints include maximum available output constraints, output ramp-up rate constraints, and grid connection safety constraints. The corrected actions must not cause the grid voltage or frequency to exceed the limit. If there is an unmet remaining power shortage, the federated aggregation server will prioritize allocating the remaining shortage to entities that still have the capacity to adjust upwards or downwards. If all entities have no adjustment capacity, the server will call upon the backup resources of the upper-level power grid or implement load shedding measures to ensure system balance.

7. The method according to claim 1, characterized in that, The dynamically updated entity response reliability, incentive price, revenue sharing coefficient, and scenario weight include: Based on the deviation ratio between the actual adjusted power and the recommended adjusted power of each subject, the response reliability of each subject is updated using the moving average method. The smaller the deviation between the actual value and the recommended value, the greater the improvement in response reliability. The overall contribution of each entity is calculated, which is obtained by weighting four dimensions: actual regulation power, response reliability level, response speed, and safety support contribution. The total adjustment revenue of the system is allocated according to the proportion of each entity's comprehensive contribution to the total contribution of all participating entities. The entity with the higher comprehensive contribution receives the higher allocation revenue. Based on the deviation between the actual occurrence probability and the predicted probability of each scenario in this round, the probability weight of each scenario in the next cycle is dynamically adjusted to achieve adaptive updating of scenario weights.

8. A power balancing device considering uncertainties in multiple scenarios, characterized in that, include: Data Acquisition Unit: Collects operational data from multiple entities and grid-side data. The multiple entities include distributed power sources, new energy storage, flexible loads, microgrids, and virtual power plants. The grid-side data includes grid security constraint data, predicted output data, predicted load data, and market incentive data. The first building unit: Based on historical operating data, prediction error distribution and equipment status changes, a multi-scenario uncertainty sample set is constructed, and a multi-scenario, multi-time series power balance model is established to quantify the power gap under different operating scenarios; The second building unit is to construct a federated game optimization model with the goal of maximizing comprehensive utility. The comprehensive utility is jointly determined by the principal's adjustment revenue, principal's adjustment cost, power balance deviation penalty, grid security risk penalty, and fair allocation deviation penalty. Training Unit: Each multi-entity entity trains and adjusts its strategy locally based on its local private data, and uploads the updated model parameters to the federated aggregation server; Aggregation Unit: The federated aggregation server calculates the aggregation weight based on the adjustable capacity, historical response reliability, local sample quality and scene coverage of each subject, and performs weighted aggregation on the received model parameter update amount to generate a global collaborative adjustment strategy. Correction Unit: Each multi-entity receives the suggested adjustment actions output by the global collaborative adjustment strategy, and performs feasibility correction on the suggested adjustment actions in combination with local operating constraints to obtain the actual execution adjustment strategy; Update Unit: Calculates the actual execution effect of the adjustment strategy, dynamically updates the subject response reliability, incentive price, revenue sharing coefficient and scenario weight, and enters the next scheduling cycle for rolling optimization.

9. The apparatus according to claim 8, characterized in that, The first building unit is specifically used for: Collect historical typical day data on photovoltaic power output, wind power output, load demand, energy storage status of charge and grid operation boundary, and combine weather forecast error, new energy power output forecast error and load forecast error to generate an initial scenario library; The initial scenario library is compressed using a scenario reduction algorithm to retain representative scenarios covering extreme, typical, and transitional operating conditions, and each scenario is assigned a corresponding scenario probability weight. For each scheduling period under each representative scenario, the power shortage for that period is calculated based on the load demand, the predicted output of distributed power sources, and the planned external exchange power, and is used as the input to the power balance model.

10. The apparatus according to claim 8, characterized in that, In the federated game optimization model, each agent trains its local strategy with the goal of maximizing its own overall utility. The overall utility is calculated as follows: The main body's adjustment revenue is calculated based on the product of the actual adjustment power provided by the main body and the market incentive price; The main adjustment cost includes the life loss cost of energy storage charging and discharging, the comfort loss cost of flexible load response, or the production offset loss cost, and is fitted using a quadratic cost function; The penalty for power balance deviation is proportional to the square of the difference between the power shortage and the actual total regulation power; The penalties for power grid safety risks are related to the degree of node voltage exceedance or line power flow exceedance caused by regulation actions; The fair apportionment of deviation penalties is related to the degree of deviation of each entity's regulatory responsibility from its adjustable capacity.

11. The apparatus according to claim 8, characterized in that, The aggregation unit is specifically used for: For each round of federated training, the adjustable capacity, historical response reliability, local sample quality and scene coverage of each subject are weighted and summed according to the preset weight coefficients to calculate the aggregate weight of each subject. Subjects with larger adjustable capacity, higher response reliability, better sample quality and higher scene coverage correspond to higher aggregate weights. Calculate the consistency score of the update direction for each dimension of the model parameter update volume uploaded by all participating entities. The consistency score is the average absolute value of the sign of the update direction of all entities in that dimension. Set a consistency threshold. When the consistency score of the update direction of a certain dimension is not lower than the threshold, retain all the update amount of that dimension. When the consistency score is lower than the threshold, reduce the update amount of that dimension according to the proportion of the consistency score to generate a consistency masking vector. The aggregate weights of each subject are multiplied by the consistency masking vector, and the model parameter update amounts of all subjects are weighted and fused to obtain the updated global model parameters.

12. The apparatus according to claim 8, characterized in that, The correction unit is specifically used for: Based on the suggested adjustment actions output by the global collaborative adjustment strategy, the target action with the smallest deviation from the suggested action and satisfying all local constraints is found in the local action space to form the actual execution adjustment strategy. For the energy storage entity, the local constraints include upper and lower limits of state of charge, upper and lower limits of charge and discharge power, and mutual exclusion constraints of charge and discharge. The corrected actions shall not lead to overcharging or over-discharging of the energy storage. For flexible load subjects, the local constraints include user comfort constraints, production plan continuity constraints, and maximum interruptible / transferable duration constraints. The modified actions must not exceed the user's preset comfort boundary or production plan boundary. For distributed power sources, the local constraints include maximum available output constraints, output ramp-up rate constraints, and grid connection safety constraints. The corrected actions must not cause the grid voltage or frequency to exceed the limit. If there is an unmet remaining power shortage, the federated aggregation server will prioritize allocating the remaining shortage to entities that still have the capacity to adjust upwards or downwards. If all entities have no adjustment capacity, the server will call upon the backup resources of the upper-level power grid or implement load shedding measures to ensure system balance.

13. The apparatus according to claim 8, characterized in that, The update unit is specifically used for: Based on the deviation ratio between the actual adjusted power and the recommended adjusted power of each subject, the response reliability of each subject is updated using the moving average method. The smaller the deviation between the actual value and the recommended value, the greater the improvement in response reliability. The overall contribution of each entity is calculated, which is obtained by weighting four dimensions: actual regulation power, response reliability level, response speed, and safety support contribution. The total adjustment revenue of the system is allocated according to the proportion of each entity's comprehensive contribution to the total contribution of all participating entities. The entity with the higher comprehensive contribution receives the higher allocation revenue. Based on the deviation between the actual occurrence probability and the predicted probability of each scenario in this round, the probability weight of each scenario in the next cycle is dynamically adjusted to achieve adaptive updating of scenario weights.

14. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor implements the steps of the method as described in any one of claims 1-7 by running the executable instructions.

15. A computer-readable storage medium storing computer instructions thereon, characterized in that, When executed by the processor, this instruction implements the steps of the method as described in any one of claims 1-7.