Intelligent data processing method and system for green electricity
Through graph attention fusion and reinforcement learning algorithms, a comprehensive feature vector and supply and demand balance model are generated, which solves the dynamic problems of green power generation prediction and grid supply and demand balance, and achieves efficient and stable green energy utilization.
Patent Information
- Application Number
- CN202510340340.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-21
- Publication Date
- 2025-07-08
- Estimated Expiration
- 2045-03-21
AI Technical Summary
In the prior art, the multi-source data fusion capability of the green power generation prediction model is limited, and the supply and demand balance model lacks dynamicity, making it difficult to achieve efficient utilization and stable power grid operation.
By collecting multi-source data, using graph attention fusion method to generate comprehensive feature vectors, building a green electricity generation prediction model, and using reinforcement learning algorithm to define state space and reward functions, building a supply and demand balance model, and generating an optimal scheduling strategy.
It improves the capture capability of multi-source data correlation, improves the accuracy and robustness of future power generation forecasts, enhances the intelligent management of power grid supply and demand balance, and achieves more efficient and stable green energy utilization.
Smart Images

Figure CN120278436A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power grid management, and particularly to a data intelligent processing method and system for green electricity. Background Art
[0002] With the transformation of the global energy structure and the promotion of sustainable development goals, green electricity, as a clean energy source, has become a research hotspot in the energy field in terms of its efficient utilization and intelligent scheduling. The power generation of green electricity is affected by multiple factors such as meteorological conditions and equipment operation status, showing volatility and uncertainty, which poses a huge challenge to the power grid's supply-demand balance. In recent years, data-driven artificial intelligence technologies have been widely applied in the field of green electricity. In the prior art, prediction models based on time series analysis, convolutional neural network (CNN), and long short-term memory network (LSTM) have improved the prediction accuracy of green electricity generation to a certain extent, but there are still deficiencies in multi-source data fusion and the modeling of long-term dependence relationships. In addition, existing scheduling strategies mostly adopt static rules or simple optimization algorithms, lacking the real-time response ability to dynamic supply-demand changes, and it is difficult to achieve the efficient utilization of green electricity and the stable operation of the power grid.
[0003] The main deficiencies of the prior art are reflected in the following two aspects: First, the fusion ability of multi-source data is limited. Existing methods usually process meteorological data, equipment operation data, and electricity consumption data independently, lacking an effective feature fusion mechanism, resulting in the difficulty for the model to comprehensively capture the complex correlations among multi-source data. Second, the dynamic and intelligent degree of the supply-demand balance model is insufficient. Existing scheduling strategies are mostly based on fixed rules or local optimization algorithms, and it is difficult to adapt to the dynamic changes in green electricity generation and electricity consumption demand, and it is impossible to achieve the global optimal supply-demand balance. These problems limit the efficient utilization of green electricity and the stable operation of the power grid, and there is an urgent need for an intelligent processing method that can deeply fuse multi-source data and dynamically optimize the supply-demand balance. Summary of the Invention
[0004] In view of the above existing problems, the present invention is proposed.
[0005] Therefore, the present invention provides a data intelligent processing method for green electricity to solve the problems of insufficient multi-source data fusion and insufficient dynamic nature of the supply-demand balance model.
[0006] To solve the above technical problems, the present invention provides the following technical solutions:
[0007] In a first aspect, the present invention provides a data intelligent processing method for green electricity, which includes collecting multi-source data, preprocessing the multi-source data, extracting multi-source features based on the multi-source data, and generating a comprehensive feature vector through a graph attention fusion method. The multi-source data includes real-time meteorological data, equipment operation data, and historical electricity consumption data; constructing a green electricity generation prediction model and training it using historical multi-source data, and predicting the electricity generation for a future period of time through the trained green electricity generation prediction model; adopting a reinforcement learning algorithm to define a state space, an action space, and a reward function, constructing a green electricity supply-demand balance model, obtaining the optimal value of the supply-demand balance based on the electricity generation for a future period of time and the user electricity demand, and generating an optimal scheduling strategy according to the optimal value of the supply-demand balance.
[0008] As a preferred solution of the data intelligent processing method for green electricity according to the present invention, wherein: the preprocessing includes data cleaning, normalization, missing value processing, data alignment, and denoising.
[0009] As a preferred solution of the data intelligent processing method for green electricity according to the present invention, wherein: the steps of extracting multi-source features based on the multi-source data and generating a comprehensive feature vector through a graph attention fusion method are as follows:
[0010] Based on the real-time meteorological data, extract meteorological features through wavelet transform and principal component analysis;
[0011] Based on the equipment operation data, extract equipment operation features through time series analysis and convolutional neural network;
[0012] Based on the historical electricity consumption data, extract electricity consumption features through Fourier transform;
[0013] Input the multi-source features into a support vector machine, and map the meteorological features, equipment operation features, and electricity consumption features to a high-dimensional space through an RBF kernel to identify the correlation between features;
[0014] Use a two-level graph attention mechanism including a local level and a global level to construct the multi-source features into graph-structured data, where each multi-source feature is used as a node and the correlation between the multi-source features is used as an edge;
[0015] Based on the graph-structured data, at the local level, use a single-layer GAT to learn the relationship between nodes and directly adjacent nodes, and at the global level, use a cross-layer attention mechanism to learn the relationship between nodes and indirectly adjacent nodes;
[0016] Based on the relationship between nodes and directly adjacent nodes and indirectly adjacent nodes, through a multi-head attention mechanism, fuse the attention weights at different levels to generate a comprehensive feature vector F, and the expression is:
[0017]
[0018] Among them, K is the number of heads of the multi-head attention mechanism, and Q k is the query vector of the k-th attention head, and K k is the key vector of the k-th attention head, and V k is the value matrix of the k-th attention head, d k is the dimension of the multi-source features, and T is the transpose symbol.
[0019] As a preferred solution of the data intelligent processing method for green electricity described in the present invention, wherein: the steps of constructing a green electricity generation prediction model and training it with historical multi-source data are as follows:
[0020] Based on the statistical characteristics and distribution of historical green electricity generation, initialize the number of TCN layers, the number of neurons, and the learning rate;
[0021] Construct an input layer based on the dimension of the input data;
[0022] Construct a hidden layer based on the initialized number of TCN layers, the number of neurons, and the learning rate to capture the long-term dependencies in the feature vectors in time series format;
[0023] Use an activation function to construct a fully connected layer to output the green electricity generation with consistent dimensions;
[0024] Construct a green electricity generation prediction model based on the input layer, the hidden layer, and the fully connected layer;
[0025] Use historical multi-source data to train the green electricity generation prediction model, use the mean square error as the loss function, update the parameters of the green electricity generation prediction model by backpropagation, and dynamically adjust the learning rate using the Adam optimizer.
[0026] As a preferred solution of the data intelligent processing method for green electricity described in the present invention, wherein: the steps of predicting the electricity generation in a future period through the trained green electricity generation prediction model are as follows:
[0027] Perform time step division on the comprehensive feature vector F to generate a feature vector in time series format and perform normalization processing;
[0028] Input the normalized feature vector in time series format into the green electricity generation prediction model to predict the electricity generation in a future period. The expression is:
[0029] Y t+1:t+T = ReLU(TCN(X t-L+1:t ; W1, b1))·W2 + b2;
[0030] Among them, Y t+1:t+Trepresents the power generation from time step t+1 to time step t+T, TCN represents the Temporal Convolutional Network, X t-L+1:t represents the feature vector in the normalized time series format from time step t-L+1 to time step t, W1 represents the weight of the TCN layer, b1 represents the bias parameter of the TCN layer, W2 is the weight of the fully connected layer, b2 represents the bias parameter of the fully connected layer, T represents the length of the future time period, and t represents the current time.
[0031] As a preferred solution of the data intelligent processing method for green electricity described in the present invention, wherein: the state space, action space, and reward function are defined by using the reinforcement learning algorithm, and a green electricity supply-demand balance model is constructed, and the specific steps are as follows:
[0032] Based on the green electricity generation, electricity demand, grid status, and meteorological conditions at the current time step, the state space S is defined t ;
[0033] Based on the allocation ratio of green electricity, the charge and discharge behavior of energy storage, and the grid load regulation, the action space A is defined t ;
[0034] Based on the historical electricity consumption data, the electricity demand of users in the future period is analyzed by using ARIMA, and the expression is:
[0035] D′ t+1:t+T = ARIMA(D t-L+1:t ; p, d, q);
[0036] wherein, D′ t+1:t+T is the electricity demand of users from time step t+1 to time step t+T, D t-L+1:t is the electricity consumption of users from time step t-L+1 to time step t, p is the order of the regression term of ARIMA, d is the order of differencing of ARIMA, q is the order of the moving average term of ARIMA, and L represents the length of the historical time window;
[0037] Based on the historical supply-demand balance, the power generation and the electricity demand of users in the future period, the reward function R is defined t ;
[0038] Based on the state space S t 、action space A t and the reward function R t , a green electricity supply-demand balance model is constructed through the deep Q network and combined with the experience replay mechanism.
[0039] As a preferred solution of the data intelligent processing method for green electricity described in the present invention, wherein: based on the power generation and the electricity demand of users in the future period, the optimal value of the supply-demand balance is obtained through the green electricity supply-demand balance model, and the expression is:
[0040]
[0041] Among them, Q(S t , A t ; θ) represents the expected value of the future cumulative reward obtained by executing action A t under state S t , where γ represents the discount factor, S t+1 represents the state space at time t + 1, A t+1 represents the action space at time t + 1, θ represents the learning parameter in the deep Q-network, and R t is the reward function;
[0042] Through the expected value Q(S t , A t ; θ) of the future cumulative reward, the optimal action A′ t is selected;
[0043] Based on the optimal action A′ t , the optimal value of supply-demand balance is obtained;
[0044] According to the optimal value of supply-demand balance, an optimal scheduling strategy is generated by dynamically controlling energy storage charging, power grid dispatching, and load regulation.
[0045] In a second aspect, the present invention provides a data intelligent processing system for green electricity, including a feature fusion module, a power generation prediction module, and a strategy generation module; the feature fusion module is used to collect multi-source data, preprocess the multi-source data, extract multi-source features based on the multi-source data, and generate a comprehensive feature vector through a graph attention fusion method; the power generation prediction module is used to construct a green electricity generation prediction model, train it using historical multi-source data, and predict the power generation for a future period through the trained green electricity generation prediction model; the strategy generation module is used to define the state space, action space, and reward function using a reinforcement learning algorithm, construct a green electricity supply-demand balance model, obtain the optimal value of supply-demand balance based on the power generation for a future period and the user electricity demand, and generate an optimal scheduling strategy according to the optimal value of supply-demand balance.
[0046] In a third aspect, the present invention provides a computer device, including a memory and a processor, where the memory stores a computer program, and: when the computer program is executed by the processor, any step of the data intelligent processing method for green electricity as described in the first aspect of the present invention is implemented.
[0047] Fourthly, the present invention provides a computer-readable storage medium with a computer program stored thereon, wherein: when the computer program is executed by a processor, any step of the data intelligent processing method for green electricity as described in the first aspect of the present invention is implemented.
[0048] The beneficial effects of the present invention are as follows: By combining real-time meteorological data, equipment operation data, and historical electricity consumption data, and using advanced feature extraction techniques and graph attention fusion mechanisms to generate comprehensive feature vectors, the ability to capture the complex correlation of multi-source data is greatly improved. Subsequently, a time series convolutional network (TCN) is used to construct and train a green electricity generation prediction model, effectively improving the accuracy and robustness of future power generation prediction. These two steps not only optimize the power generation prediction of green electricity, but also enhance the intelligent management of the power grid supply-demand balance through dynamic adjustment strategies, achieving more efficient and stable utilization of green energy. Description of the Drawings
[0049] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention, and those of ordinary skill in the art can obtain other drawings based on these drawings without creative efforts.
[0050] Figure 1 It is a flowchart of the data intelligent processing method for green electricity in Embodiment 1.
[0051] Figure 2 It is a schematic diagram of the data intelligent processing system for green electricity in Embodiment 1. Detailed Embodiments
[0052] To make the above objects, features, and advantages of the present invention more obvious and understandable, the detailed embodiments of the present invention will be described in detail below with reference to the drawings in the specification.
[0053] Many specific details are set forth in the following description to facilitate a thorough understanding of the present invention, but the present invention may be practiced in other ways different from those described herein. Those skilled in the art can make similar extensions without departing from the spirit of the present invention, so the present invention is not limited by the specific embodiments disclosed below.
[0054] Secondly, the so-called "one embodiment" or "embodiment" herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The appearances of "in one embodiment" in different places in this specification do not all refer to the same embodiment, nor are they separate or alternative embodiments that exclude each other with other embodiments.
[0055] Embodiment 1, referring to Figure 1And Figure 2 , which is the first embodiment of the present invention. This embodiment provides a data intelligent processing method for green electricity, including the following steps:
[0056] S1. Collect multi-source data, preprocess the multi-source data, extract multi-source features based on the multi-source data, and generate a comprehensive feature vector through the graph attention fusion method.
[0057] The multi-source data includes real-time meteorological data, equipment operation data, and historical electricity consumption data.
[0058] Furthermore, the real-time meteorological data covers parameters such as temperature, humidity, and wind speed, which are regularly collected and recorded by a sensor network distributed in different geographical locations. The equipment operation data involves performance indicators of power generation equipment such as power output, efficiency, and fault information, which are obtained and transmitted in real time through monitoring devices integrated inside the equipment. The historical electricity consumption data contains the electricity consumption of users at different time periods, which is summarized based on the data regularly uploaded by smart meters. These detailed data provide a solid foundation for subsequent processing and analysis.
[0059] The preprocessing includes data cleaning, normalization, missing value processing, data alignment, and denoising.
[0060] Furthermore, during the data cleaning process, a comprehensive check is carried out on the error values and outliers existing in the multi-source data. For each record in the real-time meteorological data, equipment operation data, and historical electricity consumption data, data points that do not conform to the actual physical meaning are identified and corrected or deleted by setting reasonable threshold ranges.
[0061] The normalization process aims to adjust data from different sources to the same scale for easy comprehensive processing and comparison. In specific operations, linear transformation methods are applied to each index in the real-time meteorological data, equipment operation data, and historical electricity consumption data respectively, so that the numerical values of each feature are mapped into a predefined interval, such as [0,1] or [-1,1], thereby eliminating the influence caused by dimensional differences.
[0062] In the face of possible missing value situations, appropriate strategies are adopted to fill in the real-time meteorological data, equipment operation data, and historical electricity consumption data. According to the specific characteristics of the missing values, methods such as mean filling, median filling, or time series prediction-based methods are selected for estimation and supplementation.
[0063] To achieve the effective fusion of multi-source data, in the data alignment stage, the real-time meteorological data, equipment operation data, and historical electricity consumption data from different timestamps need to be synchronously adjusted according to a unified time reference. This involves precise timestamp matching to ensure that all related data can be compared and analyzed at the same time point, thereby improving the accuracy of feature extraction.
[0064] Based on real-time meteorological data, meteorological features are extracted through wavelet transform and principal component analysis.
[0065] Furthermore, first, the wavelet transform is applied to decompose the original meteorological data into components of different scales to capture the detailed information and trends in weather changes. For example, for temperature data, it can be decomposed into a high-frequency part (such as short-term temperature fluctuations) and a low-frequency part (such as diurnal or seasonal variations). Subsequently, principal component analysis (PCA) is used to reduce the dimensionality of these decomposed components, thereby extracting the most representative meteorological features.
[0066] Based on device operation data, device operation features are extracted through time series analysis and convolutional neural network.
[0067] Furthermore, first, the time series analysis method is used to identify the change patterns of parameters such as the output power of the device over time. For example, by analyzing the hourly output power records of a wind turbine in the past month, the periodicity of its working state and potential fault warning signals can be found. Then, a convolutional neural network (CNN) is used to perform in-depth feature learning on these time series data.
[0068] Based on historical electricity consumption data, electricity consumption features are extracted through Fourier transform.
[0069] Furthermore, first, the Fourier transform is used to transform the daily electricity consumption data of users from the time domain to the frequency domain. For example, considering the daily electricity consumption of a household user in a year, through the Fourier transform, it can be clearly seen which frequency components dominate, which reflects the user's electricity consumption habits (such as higher electricity consumption during daily peak hours).
[0070] The multi-source features are input into a support vector machine, and the meteorological features, device operation features, and electricity consumption features are mapped to a high-dimensional space through an RBF kernel to identify the correlations between the features.
[0071] Using a two-level graph attention mechanism including a local level and a global level, the multi-source features are constructed into graph-structured data, where each multi-source feature is used as a node and the correlations between the multi-source features are used as edges.
[0072] It should be noted that each multi-source feature is first regarded as an independent node in the graph-structured data. For example, the temperature feature in real-time meteorological data, the efficiency feature in equipment operation data, and the consumption feature in historical electricity consumption data each become a node. Then, the edges are defined by analyzing the correlations between these features. For instance, how temperature changes affect the equipment operation efficiency, or how the equipment operation status changes the user's electricity consumption pattern. It is further processed using a two-level graph attention mechanism that includes a local level and a global level. At the local level, a single-layer graph attention network (GAT) is used to learn the relationship between each node and its directly adjacent nodes, such as analyzing the impact of the equipment's performance under a specific weather condition on power consumption. At the global level, a cross-layer attention mechanism is utilized to explore the complex connections between nodes and indirectly adjacent nodes, for example, evaluating the potential impact of long-term meteorological trends on the overall power grid load.
[0073] Based on the graph-structured data, at the local level, a single-layer GAT is used to learn the relationship between nodes and directly adjacent nodes, and at the global level, a cross-layer attention mechanism is used to learn the relationship between nodes and indirectly adjacent nodes.
[0074] It should be noted that first, a single-layer graph attention network (GAT) is applied at the local level. By calculating the attention coefficients between each node and its directly adjacent nodes, their relationship is learned. For example, in a network composed of multiple sensors, a certain sensor node adjusts its perception weight according to the data of its directly adjacent neighbor nodes to better reflect the local environmental characteristics. Then, at the global level, a cross-layer attention mechanism is adopted. This process allows nodes to explore and learn the relationship with indirectly adjacent nodes. For example, in the above sensor network, even if two sensor nodes are not directly adjacent, they can still influence each other through a series of intermediate nodes. The cross-layer attention mechanism can identify and quantify this long-distance dependence relationship, thereby enhancing the understanding and expression of the dynamics of the entire network.
[0075] It should also be noted that the cross-layer attention mechanism is a technique used in graph neural networks, aiming to capture the complex relationships between nodes and their indirectly adjacent nodes. Specifically, in graph-structured data, each node is not only associated with its directly adjacent neighbor nodes but may also affect nodes at greater distances through a series of intermediate nodes. The cross-layer attention mechanism quantifies this long-distance dependence by transmitting information between different layers and calculating the indirect attention coefficients between nodes. This process first establishes the connection between a node and its directly adjacent neighbor nodes at the local level and then expands layer by layer, using the representations learned in the previous layer to update the feature representations of the current layer nodes, thereby realizing the learning of the deep relationships of the entire graph structure. In this way, even if two nodes are not directly adjacent, their potential interactions can be captured through multi-step propagation, and finally a more comprehensive and accurate node feature expression can be obtained.
[0076] Based on the relationships between nodes and their directly adjacent nodes as well as indirectly adjacent nodes, through the multi-head attention mechanism, the attention weights at different layers are fused to generate the comprehensive feature vector F, and the expression is:
[0077]
[0078] where K is the number of heads of the multi-head attention mechanism, Q k is the query vector of the k-th attention head, K k is the key vector of the k-th attention head, V k is the value matrix of the k-th attention head, d k is the dimension of the multi-source features, and T is the transpose symbol.
[0079] It should be noted that the multi-head attention mechanism is an enhanced processing technique used to generate the comprehensive feature vector F based on the relationships between nodes and their directly adjacent nodes as well as indirectly adjacent nodes. In this mechanism, multiple attention heads (K) are first defined, and each attention head independently learns the feature representations in different subspaces. Specifically, for each attention head k, the relevance between nodes is measured by calculating the product of the query vector Q k and the transpose of the key vector K k and dividing by the square root of d k (the dimension of the multi-source features), and then the softmax function is applied to normalize these scores to obtain the attention weights between nodes. The value matrix V k is then weighted and summed according to these weights to capture the information within a specific subspace. Finally, the results of all attention heads are concatenated or averaged to form the comprehensive feature vector F.
[0080] S2. Build a green power generation prediction model and train it using historical multi-source data. Through the trained green power generation prediction model, predict the power generation for a period of time in the future.
[0081] Based on the statistical characteristics and distribution of historical green power generation, initialize the number of TCN layers, neurons, and learning rate.
[0082] Build an input layer based on the dimension of the input data.
[0083] It should be noted that the input layer is designed according to the dimension of the input data first. For example, if the input data includes real-time meteorological data, equipment operation data, and historical electricity consumption data, each data type has its specific number of features. Assuming that the total number of features after merging these data is N, the input layer is designed to accept a vector with a dimension of N.
[0084] Build a hidden layer based on the initialized number of TCN layers, neurons, and learning rate to capture the long-term dependencies in the feature vector in the time series format.
[0085] It should be noted that when building the hidden layer, a hidden layer is created according to parameters such as the preset number of Temporal Convolutional Network (TCN) layers, the number of neurons in each layer, and the learning rate. For example, to effectively capture the long-term dependencies in the feature vector of the time series involved in green power generation prediction, several TCN layers can be set, each layer contains a certain number of neurons, and an appropriate learning rate is used to adjust the speed of parameter update.
[0086] Build a fully connected layer using an activation function to output the green power generation with a consistent dimension.
[0087] It should be noted that in order to convert the features learned by the hidden layer into specific green power generation prediction values, a fully connected layer is added at the end of the green power generation prediction model, and an activation function is applied to this layer. For example, choose ReLU as the activation function, which can suppress the negative part while maintaining the positive part, helping to introduce non-linearity and making the green power generation prediction model more expressive. The design of the fully connected layer is based on the dimension of the input layer to ensure that the finally output green power generation matches the input dimension.
[0088] Build a green power generation prediction model based on the input layer, hidden layer, and fully connected layer.
[0089] Train the green power generation prediction model using historical multi-source data, use the mean squared error as the loss function, update the parameters of the green power generation prediction model by backpropagation, and dynamically adjust the learning rate using the Adam optimizer.
[0090] It should be noted that when training the green power generation prediction model, historical multi-source data, including real-time meteorological data, equipment operation data, and historical electricity consumption data, are first used as training samples and input into the green power generation prediction model. The mean square error (MSE) between the output of the green power generation prediction model and the actual green power generation is calculated to evaluate the prediction error, and it is used as the loss function. Next, the backpropagation algorithm is used to update the parameters of the green power generation prediction model to minimize this loss function. In this process, the Adam optimizer automatically adjusts the learning rate according to the direction of gradient descent, ensuring rapid convergence in the initial stage of training and slowing down the change of the learning rate when approaching the optimal solution to improve accuracy and stability. For example, when processing one year of historical data, for the difference between the predicted value and the true power generation for each day, by continuously adjusting the parameters of the green power generation prediction model, the predicted value gradually approaches the true value, thus achieving accurate prediction of the green power generation volume.
[0091] The comprehensive feature vector F is divided into time steps to generate a feature vector in time series format and is normalized.
[0092] The normalized feature vector in time series format is input into the green power generation prediction model to predict the power generation for a future period, and the expression is:
[0093] Y t+1:t+T = ReLU(TCN(X t-L+1:t ; W1, b1))·W2 + b2;
[0094] where, Y t+1:t+T represents the power generation from time step t + 1 to time step t + T, TCN represents the temporal convolutional network, X t-L+1:t represents the normalized feature vector in time series format from time step t - L + 1 to time step t, W1 represents the weight of the TCN layer, b1 represents the bias parameter of the TCN layer, W2 is the weight of the fully connected layer, b2 represents the bias parameter of the fully connected layer, T represents the length of the future period, and t represents the current time.
[0095] It should be noted that when predicting the green power generation volume, first, the normalized feature vector X t-L+1:t , that is, the data from time step t - L + 1 to time step t, is input into the temporal convolutional network (TCN). The TCN layer processes the input data using its internal weight W1 and bias parameter b1 to capture the long-term dependencies in the time series. The output after being processed by the TCN layer introduces non-linearity through the ReLU activation function to enhance the expression ability of the green power generation prediction model. Subsequently, this output is multiplied by the weight W2 of the fully connected layer and added with the bias parameter b2, and finally, the power generation Y from time step t + 1 to time step t + T within the future period is calculated. t+1:t+TFor example, based on the hourly meteorological, equipment operation, and electricity consumption data of the past week, the hourly power generation for the next 24 hours can be predicted.
[0096] S3. Define the state space, action space, and reward function using a reinforcement learning algorithm, and construct a green electricity supply-demand balance model. Based on the power generation and user electricity demand for a period of time in the future, obtain the optimal value of the supply-demand balance, and generate an optimal scheduling strategy according to the optimal value of the supply-demand balance.
[0097] Define the state space S based on the green electricity generation, electricity demand, grid status, and meteorological conditions at the current time step t 。
[0098] It should be noted that relevant information at the current time step is first collected, including the real-time generation of green electricity, the electricity demand of users, the overall status of the power grid, and the current meteorological conditions. For example, at a specific moment, assume that the green electricity generation equipment is generating electricity according to the wind speed and light intensity, while recording the total electricity demand of users at that moment and the status of other power sources in the power grid (such as the output of thermal power plants). In addition, meteorological parameters such as temperature and humidity that affect electricity demand and production need to be considered. By integrating this multi-dimensional information, a state space S that comprehensively reflects the current power supply-demand situation and its environmental impact is constructed. t 。
[0099] Define the action space A based on the allocation ratio of green electricity, the charge and discharge behavior of energy storage, and the grid load regulation t 。
[0100] It should be noted that a feasible action set needs to be determined based on how to adjust the allocation ratio of green electricity, manage the charge and discharge process of the energy storage system, and perform dynamic regulation of the grid load. For example, considering increasing the allocation ratio of green energy during the day when solar energy is abundant, and relying on the energy storage system to supply power at night to maintain a stable output. At the same time, according to the change of the grid load, adjust the charge and discharge strategy of the energy storage device in a timely manner, such as charging during low load periods and discharging during high load periods to relieve the grid pressure. In addition, it may also involve balancing the overall grid load by adjusting the usage time and intensity of non-critical loads. In this way, the action space A t covers not only operations directly related to power production and storage, but also various control measures that indirectly affect the stability of the power grid.
[0101] Based on historical electricity consumption data, use ARIMA to analyze the electricity demand of users for a period of time in the future. The expression is:
[0102] D′ t+1:t+T =ARIMA(D t-L+1:t ;p,d,q);
[0103] Among them, D′ t+1:t+T is the user's electricity demand from time step t + 1 to time step t + T, D t-L+1:t is the electricity consumption of the user from time step t - L + 1 to time step t, p is the order of the regression term of ARIMA, d is the differencing order of ARIMA, q is the order of the moving average term of ARIMA, and L represents the length of the historical time window.
[0104] Based on the historical supply - demand balance, the power generation volume and the user's electricity demand in a future period of time, a reward function R t .
[0105] It should be noted that, first, an evaluation framework is constructed based on the historical supply - demand balance data, the predicted power generation volume in a future period of time, and the user's electricity demand. Specifically, by analyzing the past supply - demand balance state, the effectiveness and efficiency of power distribution under different conditions are understood. Then, combined with the prediction of future power generation volume and the estimation of user electricity demand, it is determined how to optimally schedule power resources in the future time period to meet the demand while avoiding waste. The reward function R t is comprehensively designed according to these factors, aiming to maximize the supply - demand matching degree while minimizing the unmet demand or excess supply. For example, during the high - temperature period in summer, considering the peak electricity consumption caused by air - conditioner use, if it is predicted that the green power generation volume is sufficient, those actions that can effectively use the energy storage system to smooth the load peak are rewarded; on the contrary, if the power generation volume is insufficient, the strategies of reducing non - essential loads or optimizing the allocation of limited power resources are rewarded, so as to ensure the stable operation of the power grid and improve the overall energy utilization efficiency.
[0106] Based on the state space S t , the action space A t and the reward function R t , a green - power supply - demand balance model is constructed through a deep Q - network combined with an experience replay mechanism.
[0107] It should be noted that the experience replay mechanism is a technique used to enhance the learning process. It is constructed based on past experience data and improves the learning efficiency and effect by storing and randomly sampling previous decision - making steps. In this mechanism, information such as each state transition, the action taken, and the reward obtained is recorded to form an experience pool. Subsequently, in the learning process, instead of relying only on the most recent experience, samples are randomly drawn from the experience pool for training, which can break the correlation between data and make the learning more stable and efficient. For example, when optimizing the green - power supply - demand balance model, the experience replay mechanism can utilize the information about the state space S t , the action space A t and the reward function R tThe data helps the green power supply-demand balance model better understand the selection of optimal strategies in various situations, thereby improving the accuracy of predicting and responding to future supply-demand situations.
[0108] Based on the power generation and user electricity demand in a future period, through the green power supply-demand balance model, the optimal value of supply-demand balance is obtained, and the expression is:
[0109]
[0110] Among them, Q(S t ,A t ; θ) represents the expected value of the future cumulative reward obtained by performing action A t under state S t based on the deep Q-network parameter θ. γ represents the discount factor. S t+1 represents the state space at time t+1, A t+1 represents the action space at time t+1, θ represents the learning parameter in the deep Q-network, and R t is the reward function.
[0111] It should be noted that first, based on the power generation and user electricity demand in a future period, the green power supply-demand balance model is used to evaluate the effects of different strategies. Specifically, for the state space S t and action space A t at each time step t, the expected value Q(S t ,A t ; θ) of the future cumulative reward after performing a specific action is calculated through the deep Q-network parameter θ. In this calculation process, the reward value R t at the current moment is added to the maximum possible Q value at the next moment, and the latter is weighted by the discount factor γ and is achieved by finding the action in the action space A t+1 at the next state S t+1 that can generate the maximum Q value. In this way, the value estimates of taking various actions in each state can be gradually iteratively updated until the optimal strategy that maximizes the future cumulative reward is found, thereby ensuring the best match between power supply and demand. For example, in the face of an upcoming electricity peak, this mechanism can help determine the most appropriate energy storage release or the proportion of increasing other power source outputs to achieve the best state of supply-demand balance.
[0112] Through the expected value Q(S t ,A t ; θ) of the future cumulative reward, the optimal action A′ t is selected.
[0113] Based on the optimal action A′ t , the optimal value of supply-demand balance is obtained.
[0114] It should be noted that during the determination of the optimal action A' t in the process, first calculate the expected value Q(S t , A t ; θ) of the future cumulative reward for each possible action, based on the current state space S t and the action space A t . By comparing these expected values, select the action that can generate the highest future cumulative reward as the optimal action A' t . Specifically, for the state S t at each time step t, evaluate the Q-values corresponding to all available actions A t , and select the action with the maximum Q-value to execute. Next, according to the selected optimal action A' t , adjust operations such as the green power allocation ratio, energy storage charge and discharge behavior, and grid load regulation to achieve the optimal value of supply-demand balance. This process ensures that in any given state, the actions taken are in the direction of maximizing the long-term reward, ultimately achieving the goal of optimizing power resource allocation and maintaining grid stability. For example, when it is predicted that the electricity demand will exceed the green power supply in the future, choose to increase the power output of energy storage devices or adjust the usage time of non-critical loads to maintain the best balance between supply and demand.
[0115] According to the optimal value of supply-demand balance, generate an optimal scheduling strategy through dynamic control of energy storage charging, grid dispatching, and load regulation.
[0116] Furthermore, strategies for supply exceeding demand: Energy storage charging: Store the excess green power in the energy storage system. Grid dispatching: Transmit the excess green power to other regions or the grid. Load regulation: Increase the power supply to low-priority loads.
[0117] Strategies for supply falling short of demand: Energy storage discharging: Release electrical energy from the energy storage system to supplement the gap. Grid dispatching: Import electrical energy from other regions or the grid. Load regulation: Reduce the power supply to low-priority loads.
[0118] Strategies for supply-demand balance: Maintain the current scheduling strategy and optimize the operating efficiency of the energy storage system and the grid.
[0119] This embodiment also provides a data intelligent processing system for green electricity, including: a feature fusion module, a power generation prediction module, and a policy generation module; the feature fusion module is used to collect multi-source data, preprocess the multi-source data, extract multi-source features based on the multi-source data, and generate a comprehensive feature vector through the graph attention fusion method; the power generation prediction module is used to construct a green electricity generation prediction model, train it using historical multi-source data, and predict the power generation for a period of time in the future through the trained green electricity generation prediction model; the policy generation module is used to define the state space, action space, and reward function using the reinforcement learning algorithm, construct a green electricity supply-demand balance model, obtain the optimal value of the supply-demand balance based on the power generation and user electricity demand for a period of time in the future, and generate an optimal scheduling policy according to the optimal value of the supply-demand balance.
[0120] This embodiment also provides a computer device applicable to the case of the data intelligent processing method for green electricity, including: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the data intelligent processing method for green electricity proposed in the above embodiment.
[0121] This computer device can be a terminal, which includes a processor, a memory, a communication interface, a display screen, and an input device connected through a system bus. Among them, the processor of this computer device is used to provide computing and control capabilities. The memory of this computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of this computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a carrier network, NFC (Near Field Communication), or other technologies. The display screen of this computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of this computer device can be a touch layer covered on the display screen, or a button, a trackball, or a touchpad set on the outer shell of the computer device, or an external keyboard, a touchpad, or a mouse, etc.
[0122] This embodiment also provides a storage medium, on which a computer program is stored. When the program is executed by a processor, it implements the data intelligent processing method for green electricity as proposed in the above embodiment; the storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0123] In summary, the present invention combines real-time meteorological data, equipment operation data, and historical electricity consumption data, and uses advanced feature extraction techniques and graph attention fusion mechanisms to generate comprehensive feature vectors, greatly improving the ability to capture the complex correlations of multi-source data. Subsequently, a time series convolutional network (TCN) is used to construct and train a green electricity generation prediction model, effectively improving the accuracy and robustness of future power generation prediction. These two steps not only optimize the power generation prediction of green electricity, but also enhance the intelligent management of the power grid supply-demand balance through dynamic adjustment strategies, achieving more efficient and stable utilization of green energy.
[0124] Embodiment 2, referring to Table 1, is the second embodiment of the present invention. To further verify the technical solution of the present invention, experimental simulation data of the data intelligent processing method for green electricity is given.
[0125] To verify the innovation and advantages of the multi-source data intelligent processing method in optimizing the green electricity supply-demand balance, the experiment first collected real-time meteorological data, equipment operation data, and historical electricity consumption data within 30 days and performed preprocessing, including data cleaning, normalization, missing value processing, data alignment, and denoising. Outliers were identified and corrected by setting reasonable threshold ranges, and missing values were filled using time series prediction methods.
[0126] Subsequently, techniques such as wavelet transform, principal component analysis, time series analysis, convolutional neural network, and Fourier transform were used to extract multi-source features, and support vector machines and RBF kernels were used to map to a high-dimensional space to identify the correlations between features. Then, a two-level graph attention mechanism was applied to construct graph-structured data, and local and global level relationships were learned through a single-layer GAT and cross-layer attention mechanism, and finally a comprehensive feature vector F was generated.
[0127] Based on the comprehensive feature vector F, a green power generation prediction model including a TCN layer and a fully connected layer was constructed, trained using historical multi-source data, and the effects of different strategies were evaluated through a deep Q-network combined with an experience replay mechanism to select the optimal action to achieve the best value of supply-demand balance. This process ensured accurate prediction of future power generation and formulation of an efficient scheduling strategy.
[0128] The existing technology mentioned in this experiment specifically adopted a traditional green power supply-demand balance management strategy based on statistical and simple machine learning methods. This included using basic time series analysis for power generation prediction, processing multi-source data using simple linear regression or decision tree models, and relying on fixed rules or thresholds for grid scheduling and load regulation mechanisms.
[0129] Specifically, as shown in Table 1:
[0130] Table 1 Comparison Table of Experimental Data for Optimizing Green Power Supply-Demand Balance
[0131]
[0132] Through the data analysis of the above table, it can be clearly seen that the present invention is significantly superior to the existing technical solutions in multiple key indicators. For example, in terms of the accuracy of power generation prediction, the present invention reached 91.8%, while the existing technology was only 74.2%. This indicates that the present invention can more accurately predict future power generation and provides a more reliable basis for grid scheduling. In addition, the effectiveness of the scheduling strategy of the present invention reached 84.7%, while the effectiveness of the existing technology was only 61.5%. This means that the present invention not only improves the prediction accuracy but also can more effectively formulate a scheduling strategy to ensure the best match between power supply and demand.
[0133] In summary, the present invention shows significant advantages in terms of technical performance, economic benefits, and user experience, especially its novelty can be more prominently reflected in extreme cases.
[0134] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention, and they should all be covered within the scope of the claims of the present invention.
Claims
1. A data intelligent processing method for green electricity, characterized in that: including Collecting multi-source data, preprocessing the multi-source data, extracting multi-source features based on the multi-source data, and generating a comprehensive feature vector through a graph attention fusion method, where the multi-source data includes real-time meteorological data, equipment operation data, and historical electricity consumption data; Constructing a green power generation prediction model and training it using historical multi-source data, and predicting the power generation for a future period through the trained green power generation prediction model; Adopting a reinforcement learning algorithm to define the state space, action space, and reward function, constructing a green power supply-demand balance model, obtaining the optimal value of supply-demand balance based on the power generation and user electricity demand for a future period, and generating an optimal scheduling strategy according to the optimal value of supply-demand balance.
2. The data intelligent processing method for green electricity according to claim 1, characterized in that: The preprocessing includes data cleaning, normalization, missing value processing, data alignment, and denoising.
3. The data intelligent processing method for green electricity according to claim 2, wherein: The steps of extracting multi-source features based on the multi-source data and generating a comprehensive feature vector through a graph attention fusion method are as follows: Based on the real-time meteorological data, extracting meteorological features through wavelet transform and principal component analysis; Based on the equipment operation data, extracting equipment operation features through time series analysis and convolutional neural network; Based on the historical electricity consumption data, extracting electricity consumption features through Fourier transform; Inputting the multi-source features into a support vector machine, and mapping the meteorological features, equipment operation features, and electricity consumption features to a high-dimensional space through an RBF kernel to identify the correlation between features; Using a two-level graph attention mechanism including a local level and a global level to construct the multi-source features into graph-structured data, where each multi-source feature is used as a node and the correlation between the multi-source features is used as an edge; Based on the graph-structured data, at the local level, using a single-layer GAT to learn the relationship between nodes and directly adjacent nodes, and at the global level, using a cross-layer attention mechanism to learn the relationship between nodes and indirectly adjacent nodes; Based on the relationship between nodes and directly adjacent nodes as well as indirectly adjacent nodes, through a multi-head attention mechanism, fusing the attention weights of different levels to generate a comprehensive feature vector F, and the expression is: Among them, K is the number of heads of the multi-head attention mechanism, and Q k is the query vector of the k-th attention head, and K k is the key vector of the k-th attention head, and V k is the value matrix of the k-th attention head, d k is the dimension of the multi-source features, and T is the transpose symbol.
4. The data intelligent processing method for green electricity according to claim 3, wherein: The steps of constructing a green power generation prediction model and training it using historical multi-source data are as follows: Initializing the number of TCN layers, the number of neurons, and the learning rate based on the statistical characteristics and distribution of historical green power generation; Constructing an input layer based on the dimension of the input data; Constructing a hidden layer based on the initialized number of TCN layers, the number of neurons, and the learning rate to capture the long-term dependencies in the feature vector in time series format; Using an activation function to construct a fully connected layer to output the green power generation with consistent dimensions; Constructing a green power generation prediction model based on the input layer, hidden layer, and fully connected layer; Training the green power generation prediction model using historical multi-source data, using the mean squared error as the loss function, backpropagating to update the parameters of the green power generation prediction model, and dynamically adjusting the learning rate using the Adam optimizer.
5. The data intelligent processing method for green electricity according to claim 4, characterized in that: The steps of predicting the power generation for a future period through the trained green power generation prediction model are as follows: Performing time step division on the comprehensive feature vector F to generate a feature vector in time series format and performing normalization processing; Input the feature vector in the format of normalized time series into the green power generation prediction model to predict the power generation for a period of time in the future. The expression is as follows: Y t+1:t+T = ReLU(TCN(X t-L+1:t ; W1, b1)) · W2 + b2; Among them, Y t+1:t+T represents the power generation from time step t+1 to time step t+T. TCN represents the Temporal Convolutional Network. X t-L+1:t represents the feature vector in the normalized time series format from time step t-L+1 to time step t. W1 represents the weight of the TCN layer, b1 represents the bias parameter of the TCN layer, W2 is the weight of the fully connected layer, b2 represents the bias parameter of the fully connected layer, T represents the length of the future time period, and t represents the current time.
6. The data intelligent processing method for green electricity according to claim 5, characterized in that: The state space, action space, and reward function are defined using the reinforcement learning algorithm, and a green power supply-demand balance model is constructed. The specific steps are as follows: Define the state space S based on the green electricity generation, electricity demand, grid status, and meteorological conditions at the current time step t ; Define the action space A based on the allocation ratio of green electricity, the charge and discharge behavior of energy storage, and the grid load regulation t ; Based on historical electricity consumption data, use ARIMA to analyze the electricity consumption demand of users for a period of time in the future. The expression is as follows: D′ t+1:t+T = ARIMA(D t-L+1:t ; p, d, q); where D′ t+1:t+T is the user's electricity demand from time step t + 1 to time step t + T, D t-L+1:t is the electricity consumption of the user from time step t - L + 1 to time step t, p is the order of the regression term of ARIMA, d is the differencing order of ARIMA, q is the order of the moving average term of ARIMA, and L represents the length of the historical time window; Define the reward function R based on historical supply-demand balance, power generation, and user electricity demand over a period of time in the future t ; Based on the state space S t , the action space A t and the reward function R t , a green power supply-demand balance model is constructed through the deep Q-network and combined with the experience replay mechanism.
7. The data intelligent processing method for green electricity according to claim 6, wherein: Based on the power generation and user electricity consumption demand for a period of time in the future, obtain the optimal value of supply-demand balance through the green power supply-demand balance model. The expression is as follows: where Q(S t , A t ; θ) represents the expected value of the future cumulative reward obtained by executing action A t under state S t , γ represents the discount factor, S t+1 represents the state space at time t + 1, A t+1 represents the action space at time t + 1, θ represents the learning parameter in the deep Q-network, and R t is the reward function; By the expected value Q(S t , A t ; θ) of future cumulative rewards, select the optimal action A′ t ; Based on the optimal action A′ t , obtain the optimal value of supply-demand balance; According to the optimal value of supply-demand balance, generate an optimal scheduling strategy by dynamically controlling energy storage charging, grid dispatching, and load regulation.
8. A data intelligent processing system for green electricity, based on the data intelligent processing method for green electricity according to any one of claims 1 to 7, characterized in that: It includes a feature fusion module, a power generation prediction module, and a strategy generation module; The feature fusion module is used to collect multi-source data, preprocess the multi-source data, extract multi-source features based on the multi-source data, and generate a comprehensive feature vector through the graph attention fusion method; The power generation prediction module is used to construct a green power generation prediction model, train it using historical multi-source data, and predict the power generation for a period of time in the future through the trained green power generation prediction model; The strategy generation module is used to define the state space, action space, and reward function using the reinforcement learning algorithm, construct a green power supply-demand balance model, obtain the optimal value of supply-demand balance based on the power generation and user electricity consumption demand for a period of time in the future, and generate an optimal scheduling strategy according to the optimal value of supply-demand balance.
9. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that: When the processor executes the computer program, it implements the steps of the data intelligent processing method for green power according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the steps of the data intelligent processing method for green power according to any one of claims 1 to 7.
Citation Information
Patent Citations
Photovoltaic power prediction method based on multistage Gate-SA-TCN
CN113095596A
Ionized layer TEC pre-earthquake abnormal signal identification method based on artificial intelligence technology
CN119167002A
New energy green electricity transaction quantity reporting strategy algorithm based on deep learning
CN119398228A
Cited By
Carbon emission factor prediction method and device, electronic equipment and storage medium
CN121724195A