A power regulation method and device for a power distribution network and a storage medium

By acquiring meteorological and load data in the distribution network and using power output prediction and decision models for reinforcement learning, a precise power regulation scheme is generated. This solves the problem of insufficient accuracy in power regulation of the distribution network under the scenario of new energy access, realizes proactive pre-control and intelligent upgrading, and ensures the safety and stability of the power grid.

CN122178284APending Publication Date: 2026-06-09GUANGZHOU POWER SUPPLY BUREAU GUANGDONG POWER GRID CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGZHOU POWER SUPPLY BUREAU GUANGDONG POWER GRID CO LTD
Filing Date
2026-03-04
Publication Date
2026-06-09

Smart Images

  • Figure CN122178284A_ABST
    Figure CN122178284A_ABST
Patent Text Reader

Abstract

This invention discloses a power regulation method, device, and storage medium for a power distribution network, comprising: acquiring meteorological monitoring data, measured values ​​of renewable energy output, and measured load values ​​of the power distribution network; inputting the meteorological monitoring data into a preset power output prediction model to predict the renewable energy output at the current moment; calculating the prediction deviation value at the current moment based on the renewable energy output prediction value, the load prediction value, and the measured renewable energy output value and the measured load value, wherein the load prediction value is obtained based on historical load data; inputting the prediction deviation value, the measured renewable energy output value, and the measured load value into a preset decision model for reinforcement learning decision-making to generate a power regulation scheme for the next moment; and using the power regulation scheme to control each regulation device in the power distribution network to perform power regulation operations. This invention can improve the accuracy of power regulation in a power distribution network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power systems, and more particularly to a power regulation method, apparatus, and storage medium for a power distribution network. Background Technology

[0002] As a crucial component of the power system, the distribution network directly serves end users, and its power balance directly impacts power quality and grid operational safety. With the large-scale integration of new energy sources such as wind and solar power, and the rapid development of diverse loads, the power fluctuations on both the source and load sides of the distribution network have significantly increased. New energy output is highly random and intermittent due to meteorological factors, while the electricity consumption behaviors of different types of loads—residential, industrial, and commercial—differ significantly and overlap, further exacerbating power fluctuations in the distribution network. Failure to effectively regulate the power output of the distribution network will lead to problems such as voltage exceeding limits, frequency deviations, and equipment overloads, and in severe cases, even cause large-scale power outages, threatening the safe and stable operation of the power grid.

[0003] Existing technologies typically employ model predictive control-based power regulation methods for distribution networks. These methods involve establishing a linearized system model for rolling optimization and formulating power regulation strategies. However, they suffer from significant drawbacks: Firstly, the linearized model used cannot accurately characterize the strong nonlinear fluctuations in renewable energy output, leading to large power prediction errors and poor power regulation accuracy. Secondly, the rolling optimization relies on precise system model parameters, but model mismatch issues are prominent in actual operation, causing regulation decisions to deviate from actual needs and making it difficult to meet the accuracy requirements of power balance in distribution networks with a high proportion of renewable energy integration. Summary of the Invention

[0004] This invention provides a power regulation method, device, and storage medium for power distribution networks, which can improve the accuracy of power regulation in power distribution networks.

[0005] In a first aspect, an embodiment of the present invention provides a power regulation method for a distribution network, comprising: Obtain meteorological monitoring data, measured values ​​of renewable energy output, and measured values ​​of load for the power distribution network; The meteorological monitoring data is input into a preset power output prediction model to predict the power output of new energy sources at the current moment. Based on the predicted power output of new energy sources, the predicted load, and the measured power output of new energy sources and the measured load, the prediction deviation value at the current moment is calculated. The power output prediction model is trained using historical new energy output data and historical meteorological data of the distribution network, and the predicted load value is predicted based on historical load data. The predicted deviation value, the measured value of the renewable energy output, and the measured value of the load are input into a preset decision model for reinforcement learning decision-making to generate a power regulation scheme for the next time moment. The power regulation scheme is then used to control each regulation device in the distribution network to perform power regulation operations. The preset decision model is trained using historical renewable energy output data and historical load data.

[0006] By acquiring meteorological monitoring data, measured renewable energy output, and measured load data from the distribution network, a complete data foundation is provided for subsequent forecasting and decision-making, thereby directly ensuring the accuracy of power regulation. Inputting meteorological monitoring data into the power output forecasting model to predict renewable energy output allows for in-depth analysis of the mapping relationship between meteorological factors and renewable energy output using historical data. This enables early prediction of renewable energy power generation fluctuations, effectively overcoming the lag in power gap detection caused by the strong randomness of renewable energy, and improving the accuracy of subsequent power regulation. Based on the renewable energy output forecast, the load forecast obtained from historical load data, and the difference between the measured renewable energy output and the measured load, a prediction deviation value is calculated. This allows for the construction of a dynamic feedback correction mechanism between the predicted and measured values, quantifying the difference. The uncertainty in model predictions is used for subsequent correction and regulation, avoiding error accumulation caused by open-loop control and further improving the accuracy of power regulation. Predicted deviations, measured renewable energy output, and measured load values ​​are input into a preset decision model for reinforcement learning decision-making to generate a power regulation scheme for the next time step. Leveraging the sequential decision-making advantages of reinforcement learning, a power regulation scheme adapted to the current operating state can be quickly output based on historical data training, achieving an intelligent upgrade from passive response to proactive pre-control and ensuring the accuracy of power regulation. By using the power regulation scheme to control various regulation devices in the distribution network to perform power adjustment operations, the global optimization decision can be accurately mapped to each execution device, ensuring the rigid implementation of regulation commands, thereby systematically improving the accuracy of power regulation in the distribution network. This invention can improve the accuracy of power regulation in distribution networks.

[0007] Furthermore, the step of inputting the meteorological monitoring data into a preset power output prediction model to predict the current new energy power output specifically includes: Based on the meteorological monitoring data, a spatiotemporal feature vector is calculated; The spatiotemporal feature vector is input into the multi-head attention layer of the encoder of the output prediction model for processing to obtain a multi-head self-attention feature vector, wherein the output prediction model includes the encoder and the decoder; The multi-head self-attention feature vector is input into the first feedforward neural network of the encoder for processing to obtain the first output feature vector; The first output feature vector is input into the decoder to perform masked multi-head self-attention calculation to obtain a masked attention feature vector, and cross-attention calculation is performed on the masked attention feature vector to obtain a cross-attention feature vector; The cross-attention feature vector is input into the second feedforward neural network of the decoder for processing to obtain the second output feature vector; The second output feature vector is input into the linear mapping layer of the decoder for processing to obtain a linear transformation vector; The linear transformation vector is processed by an activation function to obtain the predicted output value of the new energy source at the current moment.

[0008] By inputting meteorological monitoring data into the power output prediction model to predict the power output of new energy sources, historical data can be used to deeply explore the mapping relationship between meteorological factors and new energy power output, predict the fluctuation trend of new energy power generation in advance, effectively overcome the problem of delayed detection of power gap caused by the strong randomness of new energy sources, and improve the accuracy of subsequent power regulation.

[0009] Furthermore, the calculation of the spatiotemporal feature vector based on the meteorological monitoring data specifically includes: The meteorological monitoring data is standardized to obtain standardized feature data; The standardized feature data is embedded to obtain an embedding vector, and the embedding vector is position-encoded to obtain an encoded position vector. A linear transformation is performed on the encoded position vector to obtain the query matrix, key matrix, and value matrix; Based on the query matrix and key matrix, the attention weights are calculated; The spatiotemporal feature vector is calculated based on the attention weights and the value matrix.

[0010] By standardizing meteorological monitoring data to eliminate the influence of dimensions, embedding and fusing spatiotemporal information with location coding, and then calculating spatiotemporal feature vectors through a self-attention mechanism, the spatiotemporal correlation features between meteorological factors and new energy output can be accurately extracted, providing high-quality feature inputs for subsequent forecasts and further improving the accuracy of new energy output forecasts and subsequent power regulation.

[0011] Furthermore, the load forecast value is obtained based on historical load data, specifically including: Obtain the historical load data corresponding to each zone in the distribution network, wherein the zones include residential sub-zones, industrial sub-zones, and commercial sub-zones; Feature extraction is performed on each of the aforementioned historical load data to obtain several load features; The load characteristics corresponding to each of the aforementioned zones are input into a preset load prediction model to predict the first load prediction value corresponding to the residential sub-zone, the second load prediction value corresponding to the industrial sub-zone, and the third load prediction value corresponding to the commercial sub-zone. The first load forecast, the second load forecast, and the third load forecast are summed to obtain the load forecast value at the current time.

[0012] By collecting historical load data by different types of zones such as residential, industrial, and commercial, extracting features from each zone, and then summing the load forecasts for each zone to obtain the total load forecast, we can specifically explore the unique fluctuation patterns of different types of loads. This avoids the one-size-fits-all approach of a single model to different types of loads, thereby improving the overall accuracy of load forecasting and further enhancing the accuracy of subsequent power regulation.

[0013] Furthermore, the step of inputting the load characteristics corresponding to each of the partitions into a preset load prediction model to predict the first load prediction value corresponding to the residential sub-area, the second load prediction value corresponding to the industrial sub-area, and the third load prediction value corresponding to the commercial sub-area specifically includes: The load characteristics corresponding to the residential sub-area are input into the load prediction model, and each decision tree in the load prediction model is used to perform path traversal matching on the load characteristics to obtain several first load scores. Based on each first load score, the first load prediction value corresponding to the residential sub-area is calculated. The load characteristics corresponding to the industrial sub-area are input into the load prediction model, and the load characteristics are traversed and matched by each decision tree in the load prediction model to obtain several second load scores. Based on each second load score, the second load prediction value corresponding to the industrial sub-area is calculated. The load characteristics corresponding to the commercial sub-area are input into the load prediction model, and the load characteristics are traversed and matched by each decision tree in the load prediction model to obtain several third load scores. Based on each third load score, the third load prediction value corresponding to the commercial sub-area is calculated. In this way, for each partition, the load characteristics are traversed and matched separately through multiple decision trees within the load forecasting model, and the load scores output by each decision tree are integrated and calculated. By leveraging the advantages of ensemble learning to combine the judgment results of multiple weak learners, the stability and accuracy of load forecasting can be effectively improved, avoiding overfitting or misjudgment of a single tree, and further improving the accuracy of subsequent power regulation.

[0014] Furthermore, the step of inputting the predicted deviation value, the measured value of the renewable energy output, and the measured value of the load into a preset decision model for reinforcement learning decision-making to generate a power regulation scheme for the next time step specifically includes: Based on the predicted deviation value, the measured value of the new energy output, and the measured value of the load, the operating state vector at the current moment is obtained; The running state vector is input into the evaluation network of the decision model, so that the running state vector is dimension-matched through the input layer of the evaluation network to obtain the input vector, wherein the evaluation network includes the input layer, the hidden layer and the output layer; The input vector is input into the hidden layer for processing to obtain a hidden feature vector, and the hidden feature vector is input into the output layer for action value mapping to obtain an action value evaluation vector; Each element in the action value assessment vector is filtered to obtain the target action value assessment value, and the target control parameters are determined based on the target action value assessment value. Based on the target control parameters, the power control scheme for the next time step is generated.

[0015] By inputting the predicted deviation value, the measured value of new energy output, and the measured value of load into the preset decision model, reinforcement learning is used to generate the power regulation scheme for the next moment. The sequential decision-making advantage of reinforcement learning can be utilized to quickly output a power regulation scheme that is adapted to the current operating state based on historical data training, realizing an intelligent upgrade from passive response to active pre-control and ensuring the accuracy of power regulation.

[0016] Furthermore, generating the power control scheme for the next time step based on the target control parameters specifically includes: Based on the target control parameters, determine the power adjustment amount of the energy storage system, the output adjustment amount of the distributed power source, the adjustment amount of the interruptible load, and the power adjustment amount of the inter-grid switching. Based on the power adjustment amount of the energy storage system, determine the power allocation target of the energy storage system at the next moment; Based on the distributed power output adjustment, determine the distributed power allocation target for the next moment; Based on the interruptible load adjustment amount, determine the interruptible load shedding target for the next moment; Based on the inter-network switching power adjustment amount, determine the inter-network switching power allocation target for the next moment; Based on the power allocation target of the energy storage system, the power allocation target of the distributed power source, the interruptible load shedding target, and the power allocation target of the inter-grid switching, the power regulation scheme for the next moment is generated.

[0017] By transforming the target control parameters into specific control resource allocation targets such as energy storage, distributed power sources, interruptible loads, and inter-grid power exchange, abstract decision results can be transformed into specific executable instructions, ensuring that various types of control equipment can coordinate and operate according to unified scheduling, and ensuring the accurate implementation of power control schemes.

[0018] Furthermore, the step of using the power regulation scheme to control each regulating device in the distribution network to perform power regulation operations specifically includes: Based on the power regulation scheme, determine the total global adjustment amount; A communication network is constructed based on the communication topology data of each control device in the distribution network. Initialize the initial iterative adjustment amount of each of the aforementioned control devices, and iteratively update each of the initial iterative adjustment amounts using the adjacency data of the communication network and the global total adjustment amount until a preset convergence condition is met, thereby obtaining the target adjustment amount of each of the aforementioned control devices; Based on each of the target adjustment amounts, power adjustment commands corresponding to each of the control devices are generated, so as to control the corresponding control devices to perform power adjustment operations using each of the power adjustment commands.

[0019] By determining the total global regulation amount based on the power regulation scheme and constructing a communication network based on the communication topology data of each regulation device, and then using an iterative update method to allow each regulation device to autonomously adjust its own regulation amount based on neighbor information and the total global regulation amount until the convergence condition is met, the global regulation task can be distributed and decomposed to each device for execution. This avoids excessive dependence on the central node, improves the response speed of regulation commands and system reliability, ensures that the precise power regulation scheme can be executed efficiently in complex scenarios, and realizes the precise implementation of power regulation in the distribution network.

[0020] Secondly, an embodiment of the present invention provides a power regulation device for a power distribution network, comprising a first module, a second module and a third module; The first module is used to acquire meteorological monitoring data, measured values ​​of new energy output, and measured values ​​of load of the power distribution network; The second module is used to input the meteorological monitoring data into a preset power output prediction model to predict the new energy power output forecast value at the current moment. Based on the new energy power output forecast value, the load forecast value, and the measured new energy power output value and the measured load value, the prediction deviation value at the current moment is calculated. The power output prediction model is trained using historical new energy power output data and historical meteorological data of the distribution network, and the load forecast value is predicted based on historical load data. The third module is used to input the predicted deviation value, the measured value of the renewable energy output, and the measured value of the load into a preset decision model for reinforcement learning decision-making, generate a power regulation scheme for the next moment, and use the power regulation scheme to control each regulation device in the distribution network to perform power regulation operations. The preset decision model is trained using historical renewable energy output data and historical load data.

[0021] The first module acquires meteorological monitoring data, measured renewable energy output, and measured load data from the distribution network, providing a complete data foundation for subsequent forecasting and decision-making, thereby directly ensuring the accuracy of power regulation. The second module inputs meteorological monitoring data into the power output prediction model to predict renewable energy output. It can utilize historical data to deeply mine the mapping relationship between meteorological factors and renewable energy output, predicting the fluctuation trend of renewable energy generation in advance, effectively overcoming the lag in power gap detection caused by the strong randomness of renewable energy, and improving the accuracy of subsequent power regulation. Based on the renewable energy output prediction, the load prediction obtained from historical data, and the difference between the measured renewable energy output and the measured load, a prediction deviation value is calculated. This allows for the construction of a dynamic feedback correction mechanism between the predicted and measured values. The uncertainty of the model prediction is used for subsequent correction and regulation, avoiding the accumulation of errors caused by open-loop control and further improving the accuracy of power regulation. The third module inputs the predicted deviation value, the measured value of renewable energy output, and the measured value of load into the preset decision model for reinforcement learning decision-making to generate the power regulation scheme for the next moment. It can take advantage of the sequential decision-making advantage of reinforcement learning to quickly output a power regulation scheme adapted to the current operating state based on historical data training, realizing the intelligent upgrade from passive response to active pre-control and ensuring the accuracy of power regulation. By using the power regulation scheme to control the power regulation operation of each regulation device in the distribution network, the global optimization decision can be accurately mapped to each execution device, ensuring the rigid implementation of regulation commands, thereby systematically improving the accuracy of power regulation in the distribution network.

[0022] Thirdly, another embodiment of the present invention provides a computer-readable storage medium, the computer-readable storage medium including a stored computer program, wherein, when the computer program is executed, it controls the device or apparatus where the computer-readable storage medium is located to perform a power regulation method for a power distribution network. Attached Figure Description

[0023] To more clearly illustrate the technical solution of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0024] Figure 1This is a flowchart illustrating one embodiment of a power regulation method for a power distribution network provided in this application; Figure 2 This is a flowchart illustrating steps S201 to S207 provided in this application; Figure 3 This is a flowchart illustrating steps S301 to S304 provided in this application; Figure 4 This is a flowchart illustrating steps S401 to S405 provided in this application; Figure 5 This is a schematic diagram of the structure of a power regulation device for a power distribution network provided in this application. Detailed Implementation

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

[0026] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the application; the terms “comprising” and “having”, and any variations thereof, in the specification, claims, and foregoing description of the drawings are intended to cover non-exclusive inclusion.

[0027] In the description of the embodiments of this application, technical terms such as "first" and "second" are used only to distinguish different objects and should not be construed as indicating or implying relative importance or implicitly specifying the number, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly defined.

[0028] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0029] In the description of the embodiments in this application, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship.

[0030] In the description of the embodiments of this application, the term "multiple" refers to two or more (including two), similarly, "multiple sets" refers to two or more (including two sets), and "multiple pieces" refers to two or more (including two pieces).

[0031] In the description of the embodiments of this application, unless otherwise expressly specified and limited, technical terms such as "installation," "connection," "joining," and "fixing" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. For those skilled in the art, the specific meaning of the above terms in the embodiments of this application can be understood according to the specific circumstances.

[0032] In the power system field, precise regulation of distribution network power is a crucial prerequisite for ensuring power quality and safe grid operation. Existing regulation methods mainly employ rolling optimization strategies based on model predictive control, but these methods have significant drawbacks: Firstly, the linearized models used cannot accurately characterize the strong nonlinear fluctuations in renewable energy output, resulting in large power prediction errors and insufficient regulation accuracy. Secondly, while rolling optimization relies on precise system model parameters, model mismatch is a prominent issue in actual operation, causing regulation decisions to deviate from actual needs and failing to meet the accuracy requirements of distribution network power balance in scenarios with a high proportion of renewable energy integration.

[0033] See Figure 1 In order to improve the accuracy of power regulation in distribution networks, an embodiment of the present invention provides a power regulation method for distribution networks, including steps S101 to S103. Step S101: Obtain meteorological monitoring data, measured output of new energy sources, and measured load of the power distribution network; In some embodiments, acquiring meteorological monitoring data, measured values ​​of renewable energy output, and measured values ​​of load in the distribution network specifically includes: for each balance zone of the distribution network, collecting meteorological monitoring data strongly correlated with renewable energy output through meteorological monitoring devices deployed in the balance zone, specifically including light intensity, wind speed, temperature, and cloud cover; and collecting measured values ​​of renewable energy output and measured values ​​of load of all renewable energy stations in the balance zone in real time through the power grid data acquisition and monitoring system.

[0034] For example, acquiring meteorological monitoring data, measured values ​​of renewable energy output, and measured values ​​of load in the distribution network may also include: acquiring network structure data of the distribution network from the power grid geographic information system. The network structure data includes topology and equipment information such as feeder connection relationships, switch station locations, distribution transformer capacity, and power supply range. Based on this network structure data and combined with the source and load characteristics within the distribution network, the distribution network is divided into several relatively independent power balance zones. The principle of division is to ensure that each balance zone has clear electrical connections and similar source and load characteristics. For example, it can be divided based on the power supply range of feeders, the service area boundaries of substations, or administrative regions. After the division is completed, power regulation can be performed separately for each balance zone.

[0035] Step S102: Input the meteorological monitoring data into the preset power output prediction model to predict the new energy power output prediction value at the current moment. Based on the new energy power output prediction value, the load prediction value, and the measured new energy power output value and the measured load value, calculate the prediction deviation value at the current moment. The power output prediction model is trained using historical new energy power output data and historical meteorological data of the distribution network, and the load prediction value is predicted based on historical load data. In some embodiments, the power output prediction model is trained using historical renewable energy power output data and historical meteorological data of the distribution network. Specifically, this includes: aligning the collected historical renewable energy power output data and historical meteorological data according to the spatiotemporal range of the equilibrium zone, setting the time granularity to a preset time threshold (e.g., 15 minutes), spatially covering the entire equilibrium zone to form a sample set. Each sample in the sample set contains historical meteorological data for a specific moment, corresponding to the historical renewable energy power output data for the two moments preceding that moment. The sample set contains sample data from multiple moments. The sample set is then standardized to obtain a standardized sample set. This standardized sample set is input into the Transformer model for training. The training process aims to minimize the prediction error, using a weighted mean square error as the loss function. By adjusting the weight coefficients for different time periods, the model's penalty for peak-period prediction errors is strengthened, making the Transformer model more focused on the accuracy of renewable energy power output prediction during peak periods. The Transformer model parameters are optimized using the Adam optimizer for iterative updates. By calculating the gradient of the loss function with respect to the parameters, the model parameters are gradually adjusted until the Transformer model converges, thus obtaining the trained power output prediction model.

[0036] It should be noted that the data from different renewable energy power stations within the equilibrium zone have different dimensions, which can affect the model training effect. Therefore, the sample set needs to be standardized.

[0037] In some embodiments, the power output prediction model is a relevant formula trained using historical renewable energy power output data and historical meteorological data of the distribution network, specifically including: Standardized formula: ; In the formula: These are the standardized eigenvalues; These are the original eigenvalues; This represents the mean of this characteristic within the equilibrium region; The standard deviation of this characteristic within the equilibrium region; Weighted mean squared error loss function: ; In the formula, m is the sample size; These are weighting coefficients, set according to the characteristics of different time periods (e.g., peak hours). =1.5, flat segment =1.0); Contribute to the practical development of new energy; To predict output; The iteration formula for the Adam optimizer: ; In the formula, Represents model parameters; For learning rate, ; This represents the gradient of the loss function with respect to the parameters.

[0038] It should be noted that by increasing the weight of peak periods in the weighting settings, the Transformer model can strengthen the penalty for peak period prediction errors, making the Transformer model pay more attention to the prediction accuracy of new energy output during peak periods.

[0039] See Figure 2 In some embodiments, the step of inputting the meteorological monitoring data into a preset power output prediction model to predict the current new energy power output specifically includes steps S201 to S207: Step S201: Based on the meteorological monitoring data, calculate the spatiotemporal feature vector; In some embodiments, calculating the spatiotemporal feature vector based on the meteorological monitoring data specifically includes: standardizing the meteorological monitoring data to obtain standardized feature data; embedding the standardized feature data to obtain an embedding vector, and encoding the embedding vector to obtain an encoded position vector; performing a linear transformation on the encoded position vector to obtain a query matrix, a key matrix, and a value matrix; calculating attention weights based on the query matrix and the key matrix; and calculating the spatiotemporal feature vector based on the attention weights and the value matrix. Specifically, meteorological monitoring data including light intensity, wind speed, temperature, and cloud cover are standardized to obtain standardized feature data. The standardized feature data are then mapped to a high-dimensional feature representation using an embedding weight matrix, resulting in an embedding vector. A location-specific code integrating spatial location and time-series information is superimposed on the embedding vector to obtain a coded location vector. This location code, through periodic variations of sine and cosine functions, enables the model to distinguish features at different spatiotemporal locations. A multi-head self-attention mechanism is constructed, using three different linear transformation matrices to map the coded location vector, generating a query matrix, a key matrix, and a value matrix. The query matrix and key matrix are substituted into the attention weight formula to obtain attention weights. The attention weights are normalized using the Softmax function to obtain normalized attention weights. Finally, the normalized attention weights are weighted and aggregated with the value matrix to obtain a spatiotemporal feature vector that fully captures the spatiotemporal correlation between meteorological monitoring data and new energy output.

[0040] It should be noted that the equilibrium zone spatial correlation factor is used to strengthen the correlation with spatial features within the equilibrium zone, making the model pay more attention to spatially related features within the region.

[0041] In some embodiments, the formula for calculating the spatiotemporal feature vector based on the meteorological monitoring data specifically includes: The specific formula for converting standardized feature data into feature vectors and adding positional encoding is as follows: ; In the formula, To embed the weight matrix, Input feature dimensions to the equilibrium region. For model dimensions; A unique location code for the equilibrium zone is created, integrating spatial location and temporal series information; For standardized feature data Formula for calculating the location code of the balanced zone: ; In the formula, For time indexing; For spatial grid indexing within the equilibrium region; For spatiotemporal weighting coefficients; For dimension indexing; For model dimensions; The formula for the self-attention mechanism: ; In the formula, A weight matrix adapted for the equilibrium region; This is the encoded position vector; For query matrix; The key matrix; It is a value matrix; The formula for calculating attention weights is: ; In the formula, It is the spatial correlation factor of the equilibrium region; The number of features; It is the scaling factor; For query matrix; The key matrix; The formula for calculating spatiotemporal eigenvectors: ; In the formula, The number of features; Let represent the degree of contribution of the j-th position feature to the i-th position feature; It is a value matrix.

[0042] By standardizing meteorological monitoring data to eliminate the influence of dimensions, embedding and fusing spatiotemporal information with location coding, and then calculating spatiotemporal feature vectors through a self-attention mechanism, the spatiotemporal correlation features between meteorological factors and new energy output can be accurately extracted, providing high-quality feature inputs for subsequent forecasts and further improving the accuracy of new energy output forecasts and subsequent power regulation.

[0043] Step S202: Input the spatiotemporal feature vector into the multi-head attention layer of the encoder of the output prediction model for processing to obtain a multi-head self-attention feature vector, wherein the output prediction model includes the encoder and the decoder; In some embodiments, the spatiotemporal feature vector is input into the multi-head attention layer of the encoder of the power output prediction model for processing to obtain a multi-head self-attention feature vector. The power output prediction model includes the encoder and the decoder, specifically including: inputting the spatiotemporal feature vector into the multi-head attention layer of the encoder in the power output prediction model constructed by the Transformer model; capturing the spatiotemporal correlation between meteorological monitoring data and new energy power output through multiple sets of parallel attention heads; each attention head has an independent query, key, and value weight matrix, and performs linear transformation on the input to obtain the query matrix, key matrix, and value matrix, and independently performs self-attention calculation; concatenating the output results of all attention heads and performing linear transformation through the output weight matrix to obtain the multi-head self-attention feature vector.

[0044] It should be noted that the encoder is composed of multiple identical encoder layers stacked together, and each encoder layer contains two sub-layers, namely a multi-head attention layer and a first feedforward neural network.

[0045] In some embodiments, the spatiotemporal feature vector is input into the multi-head attention layer of the encoder of the output prediction model for processing to obtain a multi-head self-attention feature vector, wherein the output prediction model includes relevant formulas of the encoder and decoder, specifically including: Formula for calculating multi-head self-attention feature vectors: ; ; In the formula, , and These are the query, key, and value weight matrices for the k-th attention head, respectively. This is the weight matrix after concatenating the outputs from multiple sources; It is a spatiotemporal feature vector; The total number of attention heads; Concat indicates the concatenation operation.

[0046] Step S203: Input the multi-head self-attention feature vector into the first feedforward neural network of the encoder for processing to obtain the first output feature vector; In some embodiments, the multi-head self-attention feature vector is input into the first feedforward neural network of the encoder for processing to obtain the first output feature vector. Specifically, this includes: inputting the multi-head self-attention feature vector into the first feedforward neural network of the current encoder layer for processing to obtain the output of the encoder layer; the output is used as the input of the next encoder layer, and is processed sequentially through multiple stacked encoder layers, and finally the last encoder layer outputs the first output feature vector.

[0047] In some embodiments, the multi-head self-attention feature vector is input into the first feedforward neural network of the encoder for processing to obtain a relevant formula for the first output feature vector, specifically including: The processing logic formula for the first feedforward neural network is as follows: ; In the formula, , This is the weight matrix; , For bias; The input is the multi-head self-attention feature vector; This is the ReLU activation function.

[0048] Step S204: Input the first output feature vector into the decoder to perform mask multi-head self-attention calculation to obtain mask attention feature vector, and perform cross attention calculation on the mask attention feature vector to obtain cross attention feature vector; In some embodiments, the first output feature vector is input into the decoder for masked multi-head self-attention calculation to obtain a masked attention feature vector, and cross-attention calculation is performed on the masked attention feature vector to obtain a cross-attention feature vector. Specifically, this includes: the decoder receiving the first output feature vector from the encoder as context information, and simultaneously receiving the input of a target sequence, which includes a start marker and the renewable energy output values ​​from previous times; performing masked multi-head self-attention calculation on the target sequence input to obtain a masked attention feature vector; using this masked attention feature vector as a query, and the first output feature vector from the encoder as a key and value, inputting it into the cross-attention layer for encoder-decoder cross-attention calculation to obtain a cross-attention feature vector. It should be noted that in cross attention, the query comes from the decoder, and the key and value come from the encoder. This enables the decoder to effectively obtain the most relevant context information to the current time to be predicted from the input sequence information extracted by the encoder, realizing information interaction and feature fusion between the encoder and decoder. The decoder is composed of multiple identical decoder layers stacked together. Each decoder layer contains three sub-layers, namely the masked multi-head self-attention layer, the cross attention layer (also called the encoder-decoder attention layer), and the second feedforward neural network.

[0049] In some embodiments, the first output feature vector is input into the decoder for masked multi-head self-attention calculation to obtain a masked attention feature vector, and cross-attention calculation is performed on the masked attention feature vector to obtain the relevant formula for the cross-attention feature vector, specifically including: Multi-head self-attention calculation formula for mask: ; Cross-attention calculation formula: ; In the formula, It is a lower triangular mask matrix; , , This is the decoder weight matrix; , , For attention weights; This is the first output feature vector; This is the masked attention feature vector.

[0050] Step S205: Input the cross-attention feature vector into the second feedforward neural network of the decoder for processing to obtain the second output feature vector; In some embodiments, the cross-attention feature vector is input into the second feedforward neural network of the decoder for processing to obtain the second output feature vector. Specifically, this includes: inputting the cross-attention feature vector into the second feedforward neural network of the current decoder layer for processing to obtain the output of the decoder layer; the output is used as the input of the next decoder layer and is processed sequentially through multiple stacked decoder layers. Each decoder layer contains a masked multi-head attention layer, a cross-attention layer, and a second feedforward neural network. After being processed layer by layer by multiple decoder layers, the second output feature vector is finally output by the last decoder layer.

[0051] Step S206: Input the second output feature vector into the linear mapping layer of the decoder for processing to obtain a linear transformation vector; In some embodiments, the second output feature vector is input into the linear mapping layer of the decoder for processing to obtain a linear transformation vector. Specifically, this includes: inputting the second output feature vector into the linear mapping layer of the decoder for processing. The linear mapping layer is a fully connected layer whose function is to map the high-dimensional feature space output by the decoder to an output space that matches the dimension of the prediction target, i.e., the single-dimensional numerical space of the new energy output value; and performing a linear transformation on the second output feature vector through a trainable weight matrix and a bias term to obtain a linear transformation vector.

[0052] Step S207: Apply an activation function to the linear transformation vector to obtain the predicted value of the new energy output at the current moment; In some embodiments, the linear transformation vector is processed by an activation function to obtain the predicted value of the new energy output at the current time. Specifically, this includes: inputting the linear transformation vector into a ReLU activation function to eliminate the non-negative physical characteristic of the new energy output value, thereby obtaining the predicted value of the new energy output at the current time.

[0053] In some embodiments, the second output feature vector is input into the linear mapping layer of the decoder for processing to obtain a linear transformation vector, and the linear transformation vector is processed by an activation function to obtain a relevant formula for the predicted value of the new energy output at the current time, specifically including: ; In the formula, To output the weight matrix; σ is the output bias; σ is the ReLU activation function; Let t be the predicted output value of new energy sources at time t; The second output feature vector is the input.

[0054] By inputting meteorological monitoring data into the power output prediction model to predict the power output of new energy sources, historical data can be used to deeply explore the mapping relationship between meteorological factors and new energy power output, predict the fluctuation trend of new energy power generation in advance, effectively overcome the problem of delayed detection of power gap caused by the strong randomness of new energy sources, and improve the accuracy of subsequent power regulation.

[0055] See Figure 3 In some embodiments, the load forecast value is obtained by forecasting based on historical load data, specifically including steps S301 to S304; Step S301: Obtain the historical load data corresponding to each zone in the distribution network, wherein the zone includes residential sub-zones, industrial sub-zones and commercial sub-zones; In some embodiments, historical load data corresponding to each zone in the distribution network is acquired, wherein the zones include residential sub-zones, industrial sub-zones, and commercial sub-zones. Specifically, this includes: dividing the entire balanced zone into multiple load data collection sub-zones according to user type based on the load characteristics of each balanced zone in the distribution network; collecting daily electricity load sequences of residential users in the residential sub-zone and associating them with features such as the number of households, temperature, and holiday identifiers; collecting production load sequences of industrial users in the industrial sub-zone and associating them with features such as production line operating rate, industry type, and production shifts; collecting load sequences of commercial users in the commercial load sub-zone and associating them with features such as business hours, customer flow, weather conditions, and holidays; after completing the data collection for each sub-zone, aligning all data according to the spatiotemporal range of the balanced zone and unifying the time granularity to a preset time threshold (e.g., 15 minutes) to form a basic dataset for load forecasting.

[0056] Step S302: Extract features from each of the historical load data to obtain several load features; In some embodiments, feature extraction is performed on each of the historical load data to obtain several load features, specifically including: the feature extraction process is divided into two parts: basic feature extraction and specific feature construction. Basic feature extraction covers three categories: time features, meteorological features, and historical load features. Time features include hourly index, weekday index, and seasonal coding; meteorological features include temperature, rainfall, and wind force level; historical load features include the load of the previous moment, the same period of the previous day, and the same period of the previous week; specific feature construction adds characteristic features for different balance zone types. For example, in urban core areas, a commuting index calculated based on traffic flow during the morning peak (7:00-9:00) and evening peak (17:00-19:00) is added; in industrial parks, a production plan coefficient based on enterprise production scheduling plans with values ​​of 0-1 is added; and in rural balance zones, an agricultural electricity consumption coefficient based on irrigation cycles and crop growth stages is added. These features together constitute the load feature vector used for prediction.

[0057] In some embodiments, feature extraction is performed on each of the historical load data to obtain several relevant formulas for load features, specifically including: Formulaic expression of basic features: : In the formula, Indexed by hour; Index of days within the week; Seasonal coding; For temperature; Rainfall; Wind force rating; The load for the previous time period; This is the load for the same period of the previous day; This is the load for the same period of the previous week.

[0058] Step S303: Input the load characteristics corresponding to each zone into the preset load prediction model to predict the first load prediction value corresponding to the residential sub-zone, the second load prediction value corresponding to the industrial sub-zone, and the third load prediction value corresponding to the commercial sub-zone. In some embodiments, the training process of the load forecasting model specifically includes: using an XGBoost ensemble learning model for load forecasting; dividing the collected historical load data and extracted load feature data into a training set and a validation set according to a preset ratio (e.g., 7:3); using the training set for model training and the validation set for model tuning; the model is ensembled from K decision trees, with the output of the k-th tree being... The final predicted load is the sum of the outputs of all trees. Training aims to improve the accuracy of load prediction in the balanced zone, constructing an objective function consisting of a loss term (using squared loss) that measures the deviation between predicted and actual values, and a regularization term that controls model complexity. A greedy algorithm adds one decision tree in each iteration. The selection of the tree needs to minimize the current prediction residual and add a regularization term; the goal of model training is to find a set of decision trees that minimizes the overall objective function value; during training, the model hyperparameters are adjusted through cross-validation, including the maximum tree depth, learning rate, minimum leaf node weight, etc., to prevent overfitting and improve generalization ability; after training, the model prediction accuracy is measured by mean absolute percentage error (MAPE).

[0059] In some embodiments, the relevant formulas for the training process of the load prediction model specifically include: Objective function: ; ; When the greedy algorithm generates a decision tree, the conditions for generating a new tree in each round are as follows: ; In the formula, This represents the total number of training samples; For sample index; For the loss term, squared loss is used. ; For the first Load forecast values ​​for each sample; For the first The actual load value corresponding to each sample; The total number of decision trees; For decision tree indexing; This is a regularization term used to control tree complexity and avoid overfitting; The number of leaves; For the first The weight values ​​of each leaf node; , The regularization coefficient; This is the output of the k-th decision tree; For the front The predicted load value for each tree; For the current candidate decision tree, the first Predicted values ​​for each sample; The structure formula of the load forecasting model is as follows: ; In the formula, This is the load forecast value; The total number of decision trees; For the first The output function of each decision tree; The input load characteristics; The formula for Mean Absolute Percentage Error (MAPE): ; In the formula, This represents the actual load. For load forecasting; This represents the number of samples.

[0060] It should be noted that, based on practical verification, the overall MAPE of the trained load forecasting model is controlled within 5%, and exhibits differentiated accuracy for different load types: industrial loads, due to their strong continuity and relatively stable patterns, have a MAPE ≤ 3%; commercial loads, with moderate volatility, have a MAPE ≤ 6%; and residential loads, influenced by lifestyle habits and random events, have high randomness and a MAPE ≤ 7%.

[0061] In some embodiments, the step of inputting the load characteristics corresponding to each of the partitions into a preset load forecasting model to predict a first load forecast value corresponding to the residential sub-area, a second load forecast value corresponding to the industrial sub-area, and a third load forecast value corresponding to the commercial sub-area specifically includes: inputting the load characteristics corresponding to the residential sub-area into the load forecasting model, using each decision tree in the load forecasting model to perform path traversal matching on the load characteristics to obtain several first load scores, and calculating the first load forecast value corresponding to the residential sub-area based on each first load score; inputting the load characteristics corresponding to the industrial sub-area into the load forecasting model, using each decision tree in the load forecasting model to perform path traversal matching on the load characteristics to obtain several second load scores, and calculating the second load forecast value corresponding to the industrial sub-area based on each second load score; inputting the load characteristics corresponding to the commercial sub-area into the load forecasting model, using each decision tree in the load forecasting model to perform path traversal matching on the load characteristics to obtain several third load scores, and calculating the third load forecast value corresponding to the commercial sub-area based on each third load score. Specifically, for the load characteristics of each partition, each decision tree in the load forecasting model will perform path traversal based on the feature values. Starting from the root node, it determines whether to move to the left or right child node based on the splitting condition of each node, eventually landing on a leaf node, where the weight of the leaf node is determined. This is the load score of the tree; all The load scores of each tree are added together to obtain the load forecast value for that zone, which is the first load forecast value for the corresponding residential sub-zone, the second load forecast value for the corresponding industrial sub-zone, and the third load forecast value for the corresponding commercial sub-zone.

[0062] In this way, for each partition, the load characteristics are traversed and matched separately through multiple decision trees within the load forecasting model, and the load scores output by each decision tree are integrated and calculated. By leveraging the advantages of ensemble learning to combine the judgment results of multiple weak learners, the stability and accuracy of load forecasting can be effectively improved, avoiding overfitting or misjudgment of a single tree, and further improving the accuracy of subsequent power regulation.

[0063] Step S304: Sum the first load forecast value, the second load forecast value, and the third load forecast value to obtain the load forecast value at the current time. In some embodiments, the first load forecast value, the second load forecast value, and the third load forecast value are summed to obtain the load forecast value at the current time. Specifically, this includes substituting the first load forecast value, the second load forecast value, and the third load forecast value into the summation formula to obtain the load forecast value at the current time.

[0064] Summation formula: ; In the formula, , , These are the first load forecast values ​​for the corresponding residential sub-area, the second load forecast values ​​for the corresponding industrial sub-area, and the third load forecast values ​​for the corresponding commercial sub-area.

[0065] By collecting historical load data by different types of zones such as residential, industrial, and commercial, extracting features from each zone, and then summing the load forecasts for each zone to obtain the total load forecast, we can specifically explore the unique fluctuation patterns of different types of loads. This avoids the one-size-fits-all approach of a single model to different types of loads, thereby improving the overall accuracy of load forecasting and further enhancing the accuracy of subsequent power regulation.

[0066] In some embodiments, the prediction deviation value at the current moment is calculated based on the predicted value of renewable energy output, the predicted value of load, and the measured value of renewable energy output and the measured value of load. Specifically, this includes comparing the predicted value of renewable energy output with the obtained measured value of renewable energy output, and simultaneously comparing the predicted value of load with the obtained measured value of load, calculating the source-load prediction difference caused by prediction uncertainty at the current moment, and obtaining the prediction deviation value.

[0067] Step S103: Input the predicted deviation value, the measured value of the new energy output and the measured value of the load into the preset decision model for reinforcement learning decision-making, generate the power regulation scheme for the next moment, and use the power regulation scheme to control each regulation device in the distribution network to perform power regulation operation. The preset decision model is trained using historical new energy output data and historical load data. In some embodiments, the preset decision model is trained using historical renewable energy output data and historical load data. Specifically, it includes: constructing a Markov Decision Process (MDP) model, whose core elements include a state space, action space, and reward function. The state space consists of variables reflecting the real-time operating status of each balance zone in the distribution network, including real-time renewable energy output, real-time total load, energy storage state of charge, key node voltage, system frequency, and source-load prediction deviation. The action space defines all executable control actions in the balance zone, including energy storage charging and discharging power adjustment, distributed power output adjustment, interruptible load shedding, and power exchange adjustment with the upper-level grid. The reward function aims to guide the control strategy to simultaneously optimize power balance, economy, and security. By penalizing real-time power deviation, the cost of different control methods, and voltage and frequency exceedances, the agent learns to make the comprehensive optimal decision during training. The model is trained using the DDQN (Dual Deep Q-Network) algorithm. The core of DDQN lies in using two neural networks with the same structure but different parameter update methods—an evaluation network and a... The target network and evaluation network are used to evaluate the Q-values ​​of each action in the current state in real time and are responsible for action selection. The target network is used to calculate the target Q-value, providing a stable learning objective. During training, the agent interacts with the simulated environment. Based on the current state space vector, the evaluation network outputs the Q-values ​​of each action and uses an ε-greedy strategy to select the action space vector for execution, obtaining an immediate reward and transferring to the state space vector of the next state. Experience samples (including the current state space vector S(t), the current action space vector A(t), the current reward R(t), and the state space vector S(t+1) of the next state) are stored in the experience pool. During training, a batch of samples is randomly sampled from the experience pool, and the target network is used to calculate the temporal difference target value. The mean square error between the predicted Q-value of the evaluation network and the target value is used as the loss function. The parameters of the evaluation network are updated through backpropagation. The parameters of the target network do not participate in real-time updates but are periodically copied from the evaluation network through soft updates, thereby maintaining the stability of the objective and effectively solving the overestimation problem in traditional DQN. Through repeated iterative training until the model converges, the trained decision model is obtained.

[0068] In some embodiments, the preset decision model is a relevant formula trained using historical renewable energy output data and historical load data, specifically including: State space vector: ; In the formula, For time; Measured values ​​of renewable energy output in the equilibrium zone; This represents the measured load value in the balanced zone. This represents the state of charge (SOC) value of the energy storage system. These are the voltage values ​​at critical nodes; The system frequency reflects the active power balance of the power grid. This represents the predicted deviation value; Action space vector: ; In the formula, For time; It refers to the energy storage charging and discharging power, used for flexible power adjustment; For the output adjustment of distributed thermal power / gas turbines; It is the interruptible load shelving capacity to cope with emergency power shortages; This refers to the adjustment amount of power exchanged with the upstream power grid; Reward function: ; ; ; ; ; In the formula, These are weighting coefficients used to balance the priorities of different objectives; This is a power balance reward item; This is an economic incentive item; This is a security-related bonus item. for Real-time power deviation; Measured values ​​of renewable energy output in the equilibrium zone; For the output adjustment of distributed thermal power / gas turbines; It refers to the energy storage charging and discharging power, used for flexible power adjustment; Adjustment amount of power exchanged with the upper-level power grid This represents the measured load value in the balanced zone. This represents the measured load value in the balanced zone. , , Cost coefficients for different control methods; It is the interruptible load shelving capacity to cope with emergency power shortages; and The upper and lower limits for safe voltage operation; The upper limit for safe operation of the frequency; These are the voltage values ​​at critical nodes; For system frequency; The relevant formulas for calculating the time-difference target value of the target network are as follows: ; In the formula, The reward value is the result of performing an action in the current state, reflecting the benefits of the current control action in the distribution network; This is a discount factor used to weigh the importance of current rewards against future rewards; and These are the parameter sets for the evaluation network and the target network, respectively. The function is used to select the optimal action that the evaluation network considers in the next state; Loss function: ; In the formula, The batch sample size is randomly drawn from the experience pool; To predict the Q value; The target Q value; For sample index; The set of parameters for evaluating the network includes all weight matrices and bias terms; For the first The running state vector of each sample; For the first Action vectors of each sample; Soft update mechanism: ; In the formula, This is a soft update coefficient; and These are the parameter sets for the evaluation network and the target network, respectively.

[0069] It should be noted that due to the uncertainty in source load forecasting, the forecast deviation will be used to correct control decisions.

[0070] See Figure 4 In some embodiments, the step of inputting the predicted deviation value, the measured value of the new energy output and the measured value of the load into a preset decision model for reinforcement learning decision-making to generate a power regulation scheme for the next moment specifically includes steps S401 to S405. Step S401: Based on the predicted deviation value, the measured value of the new energy output, and the measured value of the load, obtain the operating state vector at the current moment; In some embodiments, the current operating state vector is obtained based on the predicted deviation value, the measured value of the new energy output, and the measured value of the load. Specifically, this includes: integrating the acquired measured value of the new energy output and the measured value of the load with the calculated predicted deviation value, and combining the energy storage charge state, key node voltage, and system frequency obtained from the distribution network real-time monitoring system to jointly construct the operating state vector.

[0071] Step S402: Input the running state vector into the evaluation network of the decision model, so as to perform dimension matching on the running state vector through the input layer of the evaluation network to obtain the input vector, wherein the evaluation network includes the input layer, the hidden layer and the output layer; In some embodiments, the running state vector is input into the evaluation network of the decision model to perform dimension matching on the running state vector through the input layer of the evaluation network to obtain an input vector. The evaluation network includes the input layer, hidden layer, and output layer, specifically including: matching the dimensions of the running state vector to the hidden layer. The running state vector S(t) is input into the evaluation network, which is a three-layer fully connected neural network. The number of neurons in its input layer is equal to the dimension of the state vector. Strict matching is used to ensure that the state information can be fully received by the network. The input layer maps each element in the running state vector to the corresponding input neuron, completing the dimensional matching from the state space to the network input space, and obtaining the input vector.

[0072] Step S403: Input the input vector into the hidden layer for processing to obtain a hidden feature vector, and input the hidden feature vector into the output layer for action value mapping to obtain an action value evaluation vector; In some embodiments, the input vector is input into the hidden layer for processing to obtain a hidden feature vector, and the hidden feature vector is then input into the output layer for action value mapping to obtain an action value evaluation vector. Specifically, this includes: inputting the input vector into a first hidden layer for processing, where the layer is set to 2... The system uses several neurons and applies a ReLU activation function to perform a non-linear transformation on the input vector to initially extract the correlation between key features in the state, obtaining an output result. This output result is then input into the second hidden layer, which is configured with... The network employs a ReLU activation function to perform a nonlinear transformation, further enhancing its ability to represent complex operational states, ultimately yielding a hidden feature vector. This hidden feature vector is then input into the output layer, where the number of neurons is proportional to the dimension of the action space. Matching is achieved by mapping the hidden feature vectors to the Q-value of each possible modulating action through a linear transformation, thus obtaining a... An action value evaluation vector is defined in dimension 1, where each element represents the expected cumulative reward for performing the corresponding action in the current state.

[0073] In some embodiments, the input vector is input into the hidden layer for processing to obtain a hidden feature vector, and the hidden feature vector is then input into the output layer for action value mapping to obtain a relevant formula for the action value evaluation vector, specifically including: The processing logic of the first hidden layer: ; In the formula, This is the weight matrix from the input layer to the first hidden layer; S(t) is the bias; S(t) is the input vector; The processing logic of the second hidden layer: ; In the formula, This is the weight matrix from the first hidden layer to the second hidden layer; The bias is S(t); S(t) is the output of the first hidden layer. Output layer processing logic: ; In the formula, This is the weight matrix from the second hidden layer to the output layer; For bias; This is the hidden feature vector.

[0074] It should be noted that the target network and the evaluation network have the same processing flow, both receiving the running state vector and transforming it through the input layer to the hidden layer to the output layer. However, the core role of the target network is to provide a stable reference benchmark for action values ​​during model training, rather than participating in real-time decision-making. Its output is the target Q-value vector. , and These are the weight matrix and bias of the target network's output layer, respectively. The parameter update frequency of this output is much lower than that of the evaluation network. During the training phase, it is soft-updated once every T steps, while the parameters are fixed during the application phase. The values ​​are more stable, which can avoid the value assessment bias caused by real-time parameter fluctuations in the evaluation network. However, in the application stage of the decision-making model, the output of the target network is only used as an implicit benchmark and does not directly participate in action selection.

[0075] Step S404: Filter each element in the action value assessment vector to obtain the target action value assessment value, and determine the target control parameter based on the target action value assessment value; In some embodiments, each element in the action value evaluation vector is filtered to obtain a target action value evaluation value, and a target control parameter is determined based on the target action value evaluation value. Specifically, this includes: evaluating all action value elements in the action value evaluation vector, determining the target action value evaluation value with the largest Q value through the arg max function, and the action parameter corresponding to the target action value evaluation value is the target control parameter that the decision model believes to be in the current state.

[0076] Step S405: Based on the target control parameters, generate the power control scheme for the next time step.

[0077] In some embodiments, generating the power control scheme for the next time step based on the target control parameters specifically includes: determining the energy storage system power adjustment amount, distributed power output adjustment amount, interruptible load adjustment amount, and inter-grid exchange power adjustment amount based on the target control parameters; determining the energy storage system power allocation target for the next time step based on the energy storage system power adjustment amount; determining the distributed power allocation target for the next time step based on the distributed power output adjustment amount; determining the interruptible load shedding target for the next time step based on the interruptible load adjustment amount; determining the inter-grid exchange power allocation target for the next time step based on the inter-grid exchange power adjustment amount; and generating the power control scheme for the next time step based on the energy storage system power allocation target, the distributed power allocation target, the interruptible load shedding target, and the inter-grid exchange power allocation target. Specifically, the power adjustment amounts for the energy storage system, distributed power generation, interruptible load, and inter-grid exchange power are determined from the target control parameters. Based on the allocation target calculation formulas corresponding to these four types of data, the power allocation targets for the energy storage system, distributed power generation, interruptible load shedding, and inter-grid exchange power at the next time moment are calculated respectively. The power control scheme for the next time moment is then constructed based on these specific power allocation targets.

[0078] In some embodiments, generating the relevant formulas for the power control scheme at the next moment based on the target control parameters specifically includes: Formula for calculating the power allocation target of energy storage system: ; In the formula, It represents the charging and discharging power of the energy storage system at the current moment; This refers to the power adjustment amount of the energy storage system; Formula for calculating the target power allocation of distributed power sources: ; In the formula, Currently contributing power to distributed power sources; It is the output adjustment amount of distributed power sources; Formula for calculating the interruptible load shedding target: ; In the formula, This refers to the amount of interruptible load adjustment. Formula for calculating the target power allocation for inter-network switching: ; In the formula, This is the current power exchanged with the upstream power grid; This refers to the power adjustment amount for inter-network switching.

[0079] By transforming the target control parameters into specific control resource allocation targets such as energy storage, distributed power sources, interruptible loads, and inter-grid power exchange, abstract decision results can be transformed into specific executable instructions, ensuring that various types of control equipment can coordinate and operate according to unified scheduling, and ensuring the accurate implementation of power control schemes.

[0080] By inputting the predicted deviation value, the measured value of new energy output, and the measured value of load into the preset decision model, reinforcement learning is used to generate the power regulation scheme for the next moment. The sequential decision-making advantage of reinforcement learning can be utilized to quickly output a power regulation scheme that is adapted to the current operating state based on historical data training, realizing an intelligent upgrade from passive response to active pre-control and ensuring the accuracy of power regulation.

[0081] In some embodiments, controlling each control device in the distribution network to perform power regulation operations using the power regulation scheme specifically includes: determining the global total regulation amount according to the power regulation scheme; constructing a communication network based on the acquired communication topology data of each control device in the distribution network; initializing the initial iterative regulation amount of each control device, and iteratively updating each initial iterative regulation amount using the adjacency data of the communication network and the global total regulation amount until a preset convergence condition is met to obtain the target regulation amount of each control device; generating a power regulation command corresponding to each control device based on each target regulation amount, so as to control the corresponding control device to perform power regulation operations using each power regulation command. Specifically, the total global regulation amount that requires the joint efforts of all participating devices is extracted from the power regulation scheme. This total global regulation amount is the total power that needs to be increased or decreased in the entire distribution network balance zone. Based on the communication topology data (including geographical location and electrical connection relationships) of all participating regulation devices (including energy storage devices, distributed power sources, and adjustable load control terminals) in the balance zone, a communication network represented in the form of an undirected graph is constructed for information exchange. During initialization, an initial iterative regulation amount is set for each regulation device. This initial value can be allocated according to the rated capacity ratio of the device or uniformly set to zero. A consensus algorithm is used to iteratively update the regulation amount of each regulation device. In each iteration t, each device i updates its own regulation amount according to the iterative formula based on the current regulation amount of its neighboring device j, the global total target, and its own regulation weight. Through multiple iterations, the regulation amounts of each regulation device gradually become consistent and converge to an allocation scheme that satisfies the global total target. When the convergence criterion is met, the regulation amount of each regulation device is the final target regulation amount. After convergence, each control device will generate specific power regulation commands according to the final determined target regulation amount, and control the control devices to perform power regulation operations. For energy storage devices, if the corresponding target regulation amount is positive, discharge will be performed to supplement the power of the distribution network; if it is negative, charging will be performed to store excess energy. Distributed power sources will adjust their output to the sum of the current output and the corresponding target regulation amount to flexibly adapt to the power demand of the distribution network. Adjustable loads will cut off the corresponding load amount according to the corresponding target regulation amount.

[0082] In some embodiments, the relevant formulas for controlling the power regulation operations of various control devices in the power distribution network using the power regulation scheme specifically include: The undirected graph form of a communication network: ; In the formula, To control the set of device nodes; For communication edges, if device i and device j can communicate directly, then And define the adjacency matrix. , This indicates that nodes i and j have a communication connection; otherwise... ; Definition and constraints of adjustment quantities during the iterative update process of control equipment: Energy storage device regulation capacity: ; In the formula, The adjustment of the charging and discharging power of energy storage device i at time t, with positive values ​​indicating discharging and negative values ​​indicating charging, in kW; Constraints on the replacement of energy storage devices: ; In the formula, This is the maximum charging power; This represents the maximum discharge power. Distributed power regulation: ; In the formula, The output adjustment of distributed power source i at time t, a positive value indicates an increase in output, and a negative value indicates a decrease in output, in kW; Distributed power supply update constraints: In the formula, Minimum output; To maximize output; Adjustable load adjustment amount: ; In the formula, The power cut off by the adjustable load i at time t, with positive values ​​indicating the load cut off, in kW; Adjustable load update constraints: ; In the formula, Maximum removable power; Iterative formula for consensus algorithm: ; In the formula, For equipment i exist t Adjustment amount at any given time; These are adjacency matrix elements used to describe devices in the device communication topology. i With neighboring devices j The connection relationship; This is the neighbor interaction gain coefficient, used to determine the strength of the impact of the difference in adjustment between neighboring devices on the current device's adjustment update; The global target correction coefficient is associated with the global total adjustment. The deviation from the sum of the adjustments of all equipment; For equipment i The adjustment weights are configured based on factors such as equipment adjustment capabilities and response priorities. This refers to the total global adjustment. Let i be the set of neighboring nodes of device i; Convergence criteria: ; In the formula, Used to measure the maximum change in the adjustment amount of all control devices at adjacent iteration times; The convergence threshold for equipment adjustment; It is the sum of the adjustments made by all control devices at time t; This refers to the total global adjustment. This is the total adjustment deviation threshold.

[0083] By determining the total global regulation amount based on the power regulation scheme and constructing a communication network based on the communication topology data of each regulation device, and then using an iterative update method to allow each regulation device to autonomously adjust its own regulation amount based on neighbor information and the total global regulation amount until the convergence condition is met, the global regulation task can be distributed and decomposed to each device for execution. This avoids excessive dependence on the central node, improves the response speed of regulation commands and system reliability, ensures that the precise power regulation scheme can be executed efficiently in complex scenarios, and realizes the precise implementation of power regulation in the distribution network.

[0084] By acquiring meteorological monitoring data, measured renewable energy output, and measured load data from the distribution network, a complete data foundation is provided for subsequent forecasting and decision-making, thereby directly ensuring the accuracy of power regulation. Inputting meteorological monitoring data into the power output forecasting model to predict renewable energy output allows for in-depth analysis of the mapping relationship between meteorological factors and renewable energy output using historical data. This enables early prediction of renewable energy power generation fluctuations, effectively overcoming the lag in power gap detection caused by the strong randomness of renewable energy, and improving the accuracy of subsequent power regulation. Based on the renewable energy output forecast, the load forecast obtained from historical load data, and the difference between the measured renewable energy output and the measured load, a prediction deviation value is calculated. This allows for the construction of a dynamic feedback correction mechanism between the predicted and measured values, quantifying the difference. The uncertainty in model predictions is used for subsequent correction and regulation, avoiding error accumulation caused by open-loop control and further improving the accuracy of power regulation. Predicted deviations, measured renewable energy output, and measured load values ​​are input into a preset decision model for reinforcement learning decision-making to generate a power regulation scheme for the next time step. Leveraging the sequential decision-making advantages of reinforcement learning, a power regulation scheme adapted to the current operating state can be quickly output based on historical data training, achieving an intelligent upgrade from passive response to proactive pre-control and ensuring the accuracy of power regulation. By using the power regulation scheme to control various regulation devices in the distribution network to perform power adjustment operations, the global optimization decision can be accurately mapped to each execution device, ensuring the rigid implementation of regulation commands, thereby systematically improving the accuracy of power regulation in the distribution network. This invention can improve the accuracy of power regulation in distribution networks.

[0085] See Figure 5 Based on the above method embodiments, corresponding device embodiments are provided; One embodiment of the present invention provides a power regulation device for a power distribution network, including a first module 100, a second module 200 and a third module 300; The first module 100 is used to acquire meteorological monitoring data, measured values ​​of new energy output, and measured values ​​of load of the power distribution network; The second module 200 is used to input the meteorological monitoring data into a preset power output prediction model to predict the new energy power output prediction value at the current moment. Based on the new energy power output prediction value, the load prediction value, and the measured new energy power output value and the measured load value, the prediction deviation value at the current moment is calculated. The power output prediction model is trained using historical new energy power output data and historical meteorological data of the distribution network, and the load prediction value is predicted based on historical load data. The third module 300 is used to input the predicted deviation value, the measured value of the renewable energy output, and the measured value of the load into a preset decision model for reinforcement learning decision-making, generate a power regulation scheme for the next moment, and use the power regulation scheme to control each regulation device in the distribution network to perform power regulation operation. The preset decision model is trained using historical renewable energy output data and historical load data.

[0086] The first module acquires meteorological monitoring data, measured renewable energy output, and measured load data from the distribution network, providing a complete data foundation for subsequent forecasting and decision-making, thereby directly ensuring the accuracy of power regulation. The second module inputs meteorological monitoring data into the power output prediction model to predict renewable energy output. It can utilize historical data to deeply mine the mapping relationship between meteorological factors and renewable energy output, predicting the fluctuation trend of renewable energy generation in advance, effectively overcoming the lag in power gap detection caused by the strong randomness of renewable energy, and improving the accuracy of subsequent power regulation. Based on the renewable energy output prediction, the load prediction obtained from historical data, and the difference between the measured renewable energy output and the measured load, a prediction deviation value is calculated. This allows for the construction of a dynamic feedback correction mechanism between the predicted and measured values. The uncertainty of the model prediction is used for subsequent correction and regulation, avoiding the accumulation of errors caused by open-loop control and further improving the accuracy of power regulation. The third module inputs the predicted deviation value, the measured value of renewable energy output, and the measured value of load into the preset decision model for reinforcement learning decision-making to generate the power regulation scheme for the next moment. It can take advantage of the sequential decision-making advantage of reinforcement learning to quickly output a power regulation scheme adapted to the current operating state based on historical data training, realizing the intelligent upgrade from passive response to active pre-control and ensuring the accuracy of power regulation. By using the power regulation scheme to control the power regulation operation of each regulation device in the distribution network, the global optimization decision can be accurately mapped to each execution device, ensuring the rigid implementation of regulation commands, thereby systematically improving the accuracy of power regulation in the distribution network.

[0087] It is understood that the above-described device embodiments correspond to the method embodiments of the present invention, and can implement the power regulation method for a power distribution network provided by any of the above-described method embodiments of the present invention.

[0088] It should be noted that the device embodiments described above are merely illustrative, and some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the device embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can specifically be implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.

[0089] Based on the above-described method embodiments, another embodiment of the present invention provides a computer-readable storage medium including a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to execute a power regulation method for a power distribution network as described in any of the above-described method embodiments of the present invention.

[0090] The modules / units integrated in the device / terminal equipment, if implemented as software functional units and sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.

[0091] Based on the above-described embodiment of a power regulation method for a power distribution network, another embodiment of the present invention provides a terminal device, which includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements a power regulation method for a power distribution network according to any embodiment of the present invention.

[0092] For example, in this embodiment, the computer program can be divided into one or more modules, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the terminal device.

[0093] The terminal device may be a desktop computer, laptop, handheld computer, or cloud server, etc. The terminal device may include, but is not limited to, a processor and a memory.

[0094] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the terminal device, connecting all parts of the terminal device via various interfaces and lines.

[0095] Based on the above-described method embodiments, another embodiment of the present invention provides a computer program product, including a computer program or instructions, which, when executed by a communication device, implements a power regulation method for a power distribution network.

[0096] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A power regulation method for a power distribution network, characterized in that, include: Obtain meteorological monitoring data, measured values ​​of renewable energy output, and measured values ​​of load for the power distribution network; The meteorological monitoring data is input into a preset power output prediction model to predict the power output of new energy sources at the current moment. Based on the predicted power output of new energy sources, the predicted load, and the measured power output of new energy sources and the measured load, the prediction deviation value at the current moment is calculated. The power output prediction model is trained using historical new energy output data and historical meteorological data of the distribution network, and the predicted load value is predicted based on historical load data. The predicted deviation value, the measured value of the renewable energy output, and the measured value of the load are input into a preset decision model for reinforcement learning decision-making to generate a power regulation scheme for the next time moment. The power regulation scheme is then used to control each regulation device in the distribution network to perform power regulation operations. The preset decision model is trained using historical renewable energy output data and historical load data.

2. The power regulation method for a distribution network as described in claim 1, characterized in that, The step of inputting the meteorological monitoring data into a preset power output prediction model to predict the current power output value of new energy sources specifically includes: Based on the meteorological monitoring data, a spatiotemporal feature vector is calculated; The spatiotemporal feature vector is input into the multi-head attention layer of the encoder of the output prediction model for processing to obtain a multi-head self-attention feature vector, wherein the output prediction model includes the encoder and the decoder; The multi-head self-attention feature vector is input into the first feedforward neural network of the encoder for processing to obtain the first output feature vector; The first output feature vector is input into the decoder to perform masked multi-head self-attention calculation to obtain a masked attention feature vector, and cross-attention calculation is performed on the masked attention feature vector to obtain a cross-attention feature vector; The cross-attention feature vector is input into the second feedforward neural network of the decoder for processing to obtain the second output feature vector; The second output feature vector is input into the linear mapping layer of the decoder for processing to obtain a linear transformation vector; The linear transformation vector is processed by an activation function to obtain the predicted output value of the new energy source at the current moment.

3. The power regulation method for a distribution network as described in claim 2, characterized in that, The calculation of the spatiotemporal feature vector based on the meteorological monitoring data specifically includes: The meteorological monitoring data is standardized to obtain standardized feature data; The standardized feature data is embedded to obtain an embedding vector, and the embedding vector is position-encoded to obtain an encoded position vector. A linear transformation is performed on the encoded position vector to obtain the query matrix, key matrix, and value matrix; Based on the query matrix and key matrix, the attention weights are calculated; The spatiotemporal feature vector is calculated based on the attention weights and the value matrix.

4. The power regulation method for a distribution network as described in claim 1, characterized in that, The load forecast values ​​are obtained based on historical load data, and specifically include: Obtain the historical load data corresponding to each zone in the distribution network, wherein the zones include residential sub-zones, industrial sub-zones, and commercial sub-zones; Feature extraction is performed on each of the aforementioned historical load data to obtain several load features; The load characteristics corresponding to each of the aforementioned zones are input into a preset load prediction model to predict the first load prediction value corresponding to the residential sub-zone, the second load prediction value corresponding to the industrial sub-zone, and the third load prediction value corresponding to the commercial sub-zone. The first load forecast, the second load forecast, and the third load forecast are summed to obtain the load forecast value at the current time.

5. The power regulation method for a distribution network as described in claim 4, characterized in that, The step of inputting the load characteristics corresponding to each of the partitions into a preset load prediction model to predict the first load prediction value corresponding to the residential sub-zone, the second load prediction value corresponding to the industrial sub-zone, and the third load prediction value corresponding to the commercial sub-zone specifically includes: The load characteristics corresponding to the residential sub-area are input into the load prediction model, and each decision tree in the load prediction model is used to perform path traversal matching on the load characteristics to obtain several first load scores. Based on each first load score, the first load prediction value corresponding to the residential sub-area is calculated. The load characteristics corresponding to the industrial sub-area are input into the load prediction model, and the load characteristics are traversed and matched by each decision tree in the load prediction model to obtain several second load scores. Based on each second load score, the second load prediction value corresponding to the industrial sub-area is calculated. The load characteristics corresponding to the commercial sub-area are input into the load prediction model, and the decision trees in the load prediction model are used to perform path traversal matching on the load characteristics to obtain several third load scores. Based on each third load score, the third load prediction value corresponding to the commercial sub-area is calculated.

6. The power regulation method for a distribution network as described in claim 1, characterized in that, The step of inputting the predicted deviation value, the measured value of the new energy output, and the measured value of the load into a preset decision model for reinforcement learning decision-making to generate a power regulation scheme for the next time step specifically includes: Based on the predicted deviation value, the measured value of the new energy output, and the measured value of the load, the operating state vector at the current moment is obtained; The running state vector is input into the evaluation network of the decision model, so that the running state vector is dimension-matched through the input layer of the evaluation network to obtain the input vector, wherein the evaluation network includes the input layer, the hidden layer and the output layer; The input vector is input into the hidden layer for processing to obtain a hidden feature vector, and the hidden feature vector is input into the output layer for action value mapping to obtain an action value evaluation vector; Each element in the action value assessment vector is filtered to obtain the target action value assessment value, and the target control parameters are determined based on the target action value assessment value. Based on the target control parameters, the power control scheme for the next time step is generated.

7. The power regulation method for a distribution network as described in claim 6, characterized in that, The step of generating the power control scheme for the next time step based on the target control parameters specifically includes: Based on the target control parameters, determine the power adjustment amount of the energy storage system, the output adjustment amount of the distributed power source, the adjustment amount of the interruptible load, and the power adjustment amount of the inter-grid switching. Based on the power adjustment amount of the energy storage system, determine the power allocation target of the energy storage system at the next moment; Based on the distributed power output adjustment, determine the distributed power allocation target for the next moment; Based on the interruptible load adjustment amount, determine the interruptible load shedding target for the next moment; Based on the inter-network switching power adjustment amount, determine the inter-network switching power allocation target for the next moment; Based on the power allocation target of the energy storage system, the power allocation target of the distributed power source, the interruptible load shedding target, and the power allocation target of the inter-grid switching, the power regulation scheme for the next moment is generated.

8. The power regulation method for a distribution network as described in claim 1, characterized in that, The method of controlling various control devices in the distribution network to perform power regulation operations using the power regulation scheme specifically includes: Based on the power regulation scheme, determine the total global adjustment amount; A communication network is constructed based on the communication topology data of each control device in the distribution network. Initialize the initial iterative adjustment amount of each of the aforementioned control devices, and iteratively update each of the initial iterative adjustment amounts using the adjacency data of the communication network and the global total adjustment amount until a preset convergence condition is met, thereby obtaining the target adjustment amount of each of the aforementioned control devices; Based on each of the target adjustment amounts, power adjustment commands corresponding to each of the control devices are generated, so as to control the corresponding control devices to perform power adjustment operations using each of the power adjustment commands.

9. A power regulation device for a power distribution network, characterized in that, It includes Module 1, Module 2, and Module 3; The first module is used to acquire meteorological monitoring data, measured values ​​of new energy output, and measured values ​​of load of the power distribution network; The second module is used to input the meteorological monitoring data into a preset power output prediction model to predict the new energy power output forecast value at the current moment. Based on the new energy power output forecast value, the load forecast value, and the measured new energy power output value and the measured load value, the prediction deviation value at the current moment is calculated. The power output prediction model is trained using historical new energy power output data and historical meteorological data of the distribution network, and the load forecast value is predicted based on historical load data. The third module is used to input the predicted deviation value, the measured value of the renewable energy output, and the measured value of the load into a preset decision model for reinforcement learning decision-making, generate a power regulation scheme for the next moment, and use the power regulation scheme to control each regulation device in the distribution network to perform power regulation operations. The preset decision model is trained using historical renewable energy output data and historical load data.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program, wherein, when the computer program is executed, it controls the device or apparatus containing the computer-readable storage medium to perform the power regulation method for a power distribution network as described in any one of claims 1 to 8.