Distributed photovoltaic cluster short-term output prediction method, system, device and medium
Patent Information
- Application Number
- CN202611084648.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-21
- Publication Date
- 2026-09-29
AI Technical Summary
[0004]有鉴于此,本发明提供了一种分布式光伏集群短期出力预测方法、系统、设备和介质,解决了分布式光伏集群出力预测的准确性和可靠性较差的技术问题
[0065]从以上技术方案可以看出,本发明通过将目标光伏集群分别在历史时序窗口和预测时序窗口的出力时序数据和气象时序数据进行拼接,得到时序序列张量,还根据出力时序数据和气象时序数据,确定各气象要素与光伏平均出力的互信息,并将各气象要素按照各所述互信息进行加权,基于多头自注意力机制,对加权后的气象要素进行非线性特征提取,通过精确量化各气象要素与集群平均出力的互信息权重,实现对突发辐照度、温度等剧变气象事件的敏感捕捉,并在潜在空间内动态聚焦关键气象维度。还通过自编码器与谱聚类算法从目标光伏集群中的各分布式光伏站点的历史平均出力中提取隐含特征,并构建静态邻接图,根据出力时序数据,结合融合后的气象特征,确定动态响应嵌入值,并对静态邻接图和动态响应嵌入值融合,构建伪空间图,基于空间注意力对时序序列张量和伪空间图进行空间注意力特征提取,得到空间注意力特征,基于多头图注意力,利用空间注意力特征通过多个注意力头并行学习不同维度的拓扑关系,得到多头图注意力特征,将多头图注意力特征输入至长短期记忆网络模型中进行训练,从而利用训练好的出力预测模型预测目标光伏集群在未来预设时刻的出力预测结果。
Smart Images

Figure CN122844091A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of distributed photovoltaic technology, and in particular to a method, system, device and medium for predicting the short-term output of a distributed photovoltaic cluster. Background Technology
[0002] Distributed photovoltaic (PV) systems are characterized by small individual capacity, dispersed deployment, and irregular spatial distribution. The unique micro-topographical differences in coastal and complex terrain areas, along with the orientation of the PV arrays, lead to significant power output variations among neighboring PV installations under similar regional weather conditions. Furthermore, the economic constraints of deploying large-scale precision meteorological monitoring equipment on the user side further increase the difficulty of forecasting.
[0003] In recent years, with the development of smart grid technology, some new photovoltaic cluster output prediction methods have been proposed, such as cluster-based photovoltaic cluster output prediction methods and spatial coordinate-based photovoltaic cluster output prediction methods. However, existing methods mostly classify similar time series into one category for photovoltaic cluster output prediction, but ignore the spatial visibility of the site, shading effect and local microclimate differences, resulting in poor accuracy and reliability of distributed photovoltaic cluster output prediction. Summary of the Invention
[0004] In view of this, the present invention provides a method, system, device and medium for short-term power output prediction of distributed photovoltaic clusters, which solves the technical problem of poor accuracy and reliability of power output prediction of distributed photovoltaic clusters.
[0005] The first aspect of this invention provides a method for short-term power output prediction of distributed photovoltaic clusters, comprising:
[0006] Acquire the output time-series data of the target photovoltaic cluster in historical time-series windows and forecast time-series windows, as well as meteorological time-series data under various meteorological factors;
[0007] The power output time series data and the meteorological time series data are concatenated according to the historical time series window and the prediction time series window to obtain the time series tensor;
[0008] Based on the power output time series data and meteorological time series data, the mutual information between each meteorological element and the average photovoltaic power output is determined, and each meteorological element is weighted according to the mutual information. Based on the multi-head self-attention mechanism, nonlinear feature extraction is performed on the weighted meteorological elements to obtain the fused meteorological features.
[0009] Hidden features are extracted from the historical average power output of each distributed photovoltaic site in the target photovoltaic cluster using an autoencoder and spectral clustering algorithm, and a static adjacency graph is constructed.
[0010] Based on the output time series data and the fused meteorological characteristics, the dynamic response embedding value is determined, and the static adjacency graph and the dynamic response embedding value are fused to construct a pseudo-space graph;
[0011] Spatial attention features are extracted from the temporal sequence tensor and the pseudo-spatial graph based on spatial attention.
[0012] Based on multi-head graph attention, the spatial attention features are used to learn topological relationships of different dimensions in parallel through multiple attention heads to obtain multi-head graph attention features;
[0013] The multi-head image attention features are input into a long short-term memory network model for training to obtain a trained output prediction model.
[0014] The power output time-series data and meteorological time-series data of the target photovoltaic cluster in the current calculation period are obtained, and combined with the trained power output prediction model, the power output prediction result of the target photovoltaic cluster at a future preset time is obtained.
[0015] Preferably, the step of concatenating the power output time series data and the meteorological time series data according to historical time series windows and prediction time series windows to obtain a time series tensor includes:
[0016] The power output time series data and the meteorological time series data are standardized.
[0017] Based on the time data of the data sampling, a historical time feature matrix and a predicted time feature matrix containing hour features, weekday features and weekend identification features are constructed according to the historical time series window and the predicted time series window, respectively.
[0018] Based on the standardized power output time series data, the standardized meteorological time series data, the historical time feature matrix and the predicted time feature matrix, the historical time series data matrix and the predicted time series data matrix are divided according to the historical time series window and the predicted time series window;
[0019] The historical time series data matrix and the predicted time series data matrix are concatenated in time series to obtain the time series sequence tensor.
[0020] Preferably, the step involves determining the mutual information between each meteorological element and the average photovoltaic output based on the power output time-series data and meteorological time-series data, weighting each meteorological element according to its mutual information, and performing nonlinear feature extraction on the weighted meteorological elements based on a multi-head self-attention mechanism to obtain fused meteorological features, including:
[0021] Based on the power output time-series data of all distributed photovoltaic sites at the same time, determine the average power output data of all distributed photovoltaic sites at the same time.
[0022] For each meteorological element, the mutual information between the meteorological element and the average output data is determined based on the average output data and the meteorological time series data under the meteorological element.
[0023] The mutual information is truncated with negative weights, and the mutual information after truncating negative weights is normalized to obtain the weight vector of the meteorological element.
[0024] Based on the multi-head self-attention mechanism, the meteorological time series data of each meteorological element are weighted and fused according to the weight vector of each meteorological element to obtain the fused meteorological features.
[0025] Preferably, the step of extracting latent features from the historical average power output of each distributed photovoltaic site in the target photovoltaic cluster using an autoencoder and spectral clustering algorithm, and constructing a static adjacency graph, includes:
[0026] For each batch of input power output time series data for each distributed photovoltaic site, the implicit features of the power output time series data are extracted through multi-layer linear mapping and activation autoencoder.
[0027] Based on the implicit features of all the distributed photovoltaic sites, the Gaussian kernel similarity between each distributed photovoltaic site is determined, and a Gaussian kernel similarity matrix is formed.
[0028] The clustering algorithm is used to determine the clusters of the Gaussian kernel similarity matrix, and a graph Laplacian matrix is constructed.
[0029] The graph Laplacian matrix is subjected to eigenvalue decomposition using spectral decomposition, and the maximum spectral gap corresponding to the graph Laplacian matrix is determined as the cluster number.
[0030] The implicit features of each distributed photovoltaic site are clustered according to the number of clusters using a spectral clustering algorithm to obtain the cluster label of each distributed photovoltaic site;
[0031] Based on the cluster labels of each distributed photovoltaic (PV) site and the Gaussian kernel similarity between each PV site, the static adjacency value of each PV site is determined, and based on the static adjacency value of each PV site, the static adjacency graph of the PV sites is determined.
[0032] Preferably, the step of determining the dynamic response embedding value based on the output time-series data and the fused meteorological characteristics, and fusing the static adjacency graph and the dynamic response embedding value to construct a pseudo-spatial graph includes:
[0033] The fused meteorological features are input into the linear layer to obtain the baseline output before the prediction bias.
[0034] The output deviation is determined based on the reference output and the pre-acquired actual output.
[0035] After splicing the fused meteorological features and the output deviation, the spliced vector is input into the GRU embedding network. By capturing the temporal dependency between the meteorological features and the output deviation, the time step hidden state is generated as the dynamic response embedding value.
[0036] Based on the cosine similarity of the dynamic response embedding values, a dynamic similarity matrix is constructed for all the dynamic response embedding values.
[0037] The dynamic similarity matrix and the static adjacency graph are weighted and fused according to a preset fusion coefficient to obtain the pseudo-space graph.
[0038] Preferably, the step of extracting spatial attention features from the temporal sequence tensor and the pseudo-spatial graph based on spatial attention to obtain spatial attention features includes:
[0039] The base score is determined based on the time series tensor;
[0040] The attention score is determined based on the base score and the pseudo-space graph;
[0041] The attention score is normalized, and the temporal sequence tensor is weighted and calculated based on the normalized attention score to obtain the spatial attention feature;
[0042] Accordingly, the multi-head graph attention feature, which utilizes the spatial attention features to learn topological relationships of different dimensions in parallel through multiple attention heads to obtain multi-head graph attention features, includes:
[0043] The spatial attention features are split according to the number of attention heads, and each split spatial attention feature is input to each attention head for linear mapping to obtain the attention linear mapping feature corresponding to each attention head;
[0044] Using the aforementioned attention linear mapping feature, the head-inside edge attention score corresponding to each attention head is determined;
[0045] The edge attention scores within the head are normalized to obtain edge weights. The attention linear mapping features of each attention head are aggregated based on the edge weights to obtain the multi-head graph attention features.
[0046] Preferably, the long short-term memory network model includes a first-layer long short-term memory network and a second-layer long short-term memory network;
[0047] The step of inputting the multi-head image attention features into a long short-term memory network model for training to obtain a trained output prediction model includes:
[0048] The multi-head image attention features are input into the first layer long short-term memory network, and feature extraction and time series modeling are performed on the multi-head image attention features to output the first layer hidden state features.
[0049] The first layer hidden state features are input into the second layer long short-term memory network, and feature extraction and time series modeling are performed on the first layer hidden state features to output the second layer hidden state features.
[0050] The process is repeated, inputting the hidden state features of the second layer back into the second layer of the long short-term memory network for iterative processing. During each iteration, the hidden state features of each layer are recorded, and the negative log-likelihood loss function value is calculated based on the hidden state features.
[0051] The parameters of the long short-term memory network model are updated based on the negative log-likelihood loss function value using the backpropagation algorithm.
[0052] Training stops when the preset number of iterations is reached or the preset convergence condition is met, and the trained power prediction model is obtained.
[0053] Secondly, the present invention also provides a short-term output prediction system for distributed photovoltaic clusters, comprising:
[0054] The data acquisition module is used to acquire the output time-series data of the target photovoltaic cluster in historical time-series windows and forecast time-series windows, as well as meteorological time-series data under various meteorological elements.
[0055] The tensor determination module is used to concatenate the power output time series data and the meteorological time series data according to the historical time series window and the prediction time series window to obtain a time series tensor.
[0056] The meteorological feature fusion module is used to determine the mutual information between each meteorological element and the average photovoltaic output based on the output time series data and the meteorological time series data, and to weight each meteorological element according to the mutual information. Based on the multi-head self-attention mechanism, nonlinear feature extraction is performed on the weighted meteorological elements to obtain the fused meteorological features.
[0057] The static graph determination module is used to extract hidden features from the historical average power output of each distributed photovoltaic site in the target photovoltaic cluster through an autoencoder and a spectral clustering algorithm, and to construct a static adjacency graph.
[0058] The pseudo-spatial graph determination module is used to determine the dynamic response embedding value based on the output time series data and the fused meteorological characteristics, and to fuse the static adjacency graph and the dynamic response embedding value to construct a pseudo-spatial graph.
[0059] The spatial attention module is used to extract spatial attention features from the temporal sequence tensor and the pseudo-spatial graph based on spatial attention, so as to obtain spatial attention features;
[0060] The multi-head graph attention module is used to learn topological relationships of different dimensions in parallel through multiple attention heads based on multi-head graph attention and the spatial attention features, thereby obtaining multi-head graph attention features.
[0061] The prediction model training module is used to input the multi-head image attention features into the long short-term memory network model for training, so as to obtain a trained output prediction model.
[0062] The power output prediction module is used to acquire the power output time series data and meteorological time series data of the target photovoltaic cluster in the current calculation period, and combine them with the trained power output prediction model to obtain the power output prediction result of the target photovoltaic cluster at a future preset time.
[0063] Thirdly, the present invention also provides an electronic device, the electronic device including a memory and a processor, the memory storing a computer program, the computer program being executed by the processor causing the processor to perform the steps of the distributed photovoltaic cluster short-term output prediction method as described in the first aspect.
[0064] Fourthly, the present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed, implements the steps of the distributed photovoltaic cluster short-term output prediction method as described in the first aspect.
[0065] As can be seen from the above technical solutions, this invention splices the output time-series data and meteorological time-series data of the target photovoltaic cluster in historical time-series windows and predicted time-series windows respectively to obtain a time-series tensor. It also determines the mutual information between each meteorological element and the average output of photovoltaic based on the output time-series data and meteorological time-series data, and weights each meteorological element according to the mutual information. Based on the multi-head self-attention mechanism, nonlinear feature extraction is performed on the weighted meteorological elements. By accurately quantifying the mutual information weights between each meteorological element and the average output of the cluster, it achieves sensitive capture of sudden meteorological events such as drastic changes in irradiance and temperature, and dynamically focuses on key meteorological dimensions in the potential space. Furthermore, implicit features are extracted from the historical average power output of each distributed photovoltaic site in the target photovoltaic cluster using an autoencoder and spectral clustering algorithm, and a static adjacency graph is constructed. Based on the power output time series data and combined with the fused meteorological features, the dynamic response embedding value is determined, and the static adjacency graph and the dynamic response embedding value are fused to construct a pseudo-spatial graph. Spatial attention features are extracted from the time series tensor and the pseudo-spatial graph based on spatial attention to obtain spatial attention features. Based on multi-head graph attention, the spatial attention features are used to learn the topological relationships of different dimensions in parallel through multiple attention heads to obtain multi-head graph attention features. The multi-head graph attention features are input into the long short-term memory network model for training, thereby using the trained power output prediction model to predict the power output prediction results of the target photovoltaic cluster at a preset time in the future.
[0066] This invention, by introducing a pseudo-spatial graph to fuse static adjacency graphs and dynamic response embeddings, enables more accurate topological characterization in complex meteorological fluctuation scenarios, effectively solving the problem that static graph structures in traditional methods are difficult to adapt to short-term dynamic changes in power output. Through the joint processing of temporal sequence tensors and pseudo-spatial graphs using a spatial attention mechanism, the information representation of key spatiotemporal regions can be adaptively enhanced. By inputting multi-head graph attention features into a long short-term memory network model for training, the accuracy and robustness of power output prediction are improved. Attached Figure Description
[0067] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0068] Figure 1 This is an application environment diagram of a short-term output prediction method for distributed photovoltaic clusters provided in an embodiment of the present invention;
[0069] Figure 2A flowchart illustrating a short-term output prediction method for a distributed photovoltaic cluster, as provided in an embodiment of the present invention;
[0070] Figure 3 This is a schematic diagram of the structure of a distributed photovoltaic cluster short-term output prediction system provided in an embodiment of the present invention;
[0071] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0072] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0073] The short-term output prediction method for distributed photovoltaic clusters provided in this application can be applied to, for example... Figure 1In the application environment shown, terminal 101 communicates with server 102 via a network. A data storage system can store the data that server 102 needs to process. The data storage system can be integrated onto server 102 or placed on a cloud or other network server. Terminal 101 or server 102 acquires the output time-series data of the target photovoltaic cluster under historical and predicted time-series windows, and meteorological time-series data under various meteorological elements; the output time-series data and meteorological time-series data are concatenated according to historical and predicted time-series windows to obtain a time-series tensor; based on the output time-series data and meteorological time-series data, the mutual information between each meteorological element and the average photovoltaic output is determined, and each meteorological element is weighted according to its mutual information. Based on a multi-head self-attention mechanism, nonlinear feature extraction is performed on the weighted meteorological elements to obtain fused meteorological features; implicit features are extracted from the historical average output of each distributed photovoltaic site in the target photovoltaic cluster using an autoencoder and spectral clustering algorithm, and a static adjacency graph is constructed; based on... The power output time series data, combined with fused meteorological features, is used to determine the dynamic response embedding value. The static adjacency graph and the dynamic response embedding value are then fused to construct a pseudo-spatial graph. Spatial attention features are extracted from the time series tensor and the pseudo-spatial graph based on spatial attention. Multi-head graph attention features are obtained by learning different dimensions of topological relationships in parallel using multiple attention heads based on the spatial attention features. These multi-head graph attention features are then input into a long short-term memory network model for training, resulting in a trained power output prediction model. Finally, the power output time series data and meteorological time series data of the target photovoltaic cluster for the current calculation period are obtained, and combined with the trained power output prediction model, the power output prediction result of the target photovoltaic cluster at a predetermined future time is obtained.
[0074] Terminal 101 can be, but is not limited to, various personal computers, laptops, smartphones, and tablets.
[0075] Server 102 can be a standalone physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides cloud computing services.
[0076] like Figure 2 As shown in the embodiments of this application, a method for short-term output prediction of distributed photovoltaic clusters is provided, which is applied to... Figure 1 Taking terminal 101 or server 102 as an example, the explanation includes the following steps S1 to S9. Wherein:
[0077] Step S1: Obtain the output time series data of the target photovoltaic cluster in the historical time series window and the prediction time series window, as well as the meteorological time series data under various meteorological elements.
[0078] The power output time-series data includes historical power output time-series data and target power output time-series data, while the meteorological time-series data includes historical meteorological time-series data and predicted meteorological time-series data. For example, the system collects power output data and meteorological data for the photovoltaic cluster for the 24 hours preceding the current moment and meteorological data for the next 6 hours, and then obtains the target power output time-series data.
[0079] Meteorological factors are key factors affecting photovoltaic power output, including but not limited to solar radiation intensity, ambient temperature, wind speed, wind direction, humidity, and cloud cover.
[0080] Step S2: Concatenate the power output time series data and meteorological time series data according to the historical time series window and the prediction time series window to obtain the time series tensor.
[0081] The time-series tensor is a multi-dimensional data structure that integrates power output and meteorological information for historical and forecast periods, providing a unified data framework for subsequent analysis. In practice, the power output time-series data and meteorological time-series data within the historical and forecast time-series windows need to be aligned and concatenated in chronological order to ensure that each time point contains complete power output and meteorological information, thereby constructing a time-series tensor that reflects the changes in photovoltaic cluster power output over time and under varying meteorological conditions.
[0082] Step S3: Based on the power output time series data and meteorological time series data, determine the mutual information between each meteorological element and the average photovoltaic power output, and weight each meteorological element according to its mutual information. Based on the multi-head self-attention mechanism, perform nonlinear feature extraction on the weighted meteorological elements to obtain the fused meteorological features.
[0083] Mutual information is an indicator reflecting the degree of interdependence between two variables. By calculating the mutual information between each meteorological element and the average photovoltaic output, the influence of different meteorological elements on photovoltaic output can be quantified. Furthermore, the meteorological elements are weighted according to the magnitude of the mutual information, giving more weight to meteorological elements with a greater impact on photovoltaic output in subsequent analyses. The multi-head self-attention mechanism can automatically capture the complex nonlinear relationships between the weighted meteorological elements and extract richer and more comprehensive meteorological features through parallel processing by multiple attention heads.
[0084] Step S4: Extract hidden features from the historical average output of each distributed photovoltaic site in the target photovoltaic cluster using an autoencoder and spectral clustering algorithm, and construct a static adjacency graph.
[0085] Among them, an autoencoder is an unsupervised learning algorithm that automatically learns the low-dimensional representation of data through an encoding-decoding process, thereby uncovering hidden features in the data. In this embodiment, an autoencoder is used to process the historical average power output data of each distributed photovoltaic (PV) site to extract hidden features that reflect the similarity of power output between sites. Spectral clustering is a graph-based clustering method that can transform the similarity relationships between data points into edge weights in a graph and achieve data clustering by finding the optimal partition in the graph. Combining the hidden features extracted by the autoencoder, a static adjacency graph is constructed using the spectral clustering algorithm. This graph can intuitively display the static relationships between distributed PV sites.
[0086] Step S5: Based on the output time series data and combined with the fused meteorological characteristics, determine the dynamic response embedding value, and fuse the static adjacency graph and the dynamic response embedding value to construct a pseudo-space graph.
[0087] To address the issue that static graph structures cannot reflect short-term power output response differences, dynamic response embedding is extracted to achieve dynamic graph adjacency adjustment for strong connections within the same cluster and weak connections between different clusters under drastic weather changes. The dynamic response embedding value is a quantitative indicator that reflects the dynamic changes in photovoltaic cluster output with weather conditions. It comprehensively considers output time-series data and fused meteorological characteristics, enabling it to capture the response characteristics of photovoltaic output under different weather conditions.
[0088] After obtaining the dynamic response embedding value, it is fused with the static adjacency graph to construct a pseudo-spatial graph. The pseudo-spatial graph not only includes the static relationships between distributed photovoltaic (PV) sites but also incorporates dynamic meteorological response information, thus more comprehensively reflecting the power output characteristics of the PV cluster. This fusion method helps improve the accuracy and robustness of subsequent power output prediction, as both static relationships and dynamic meteorological responses are important factors affecting PV power output.
[0089] Step S6: Extract spatial attention features from temporal sequence tensors and pseudo-spatial graphs based on spatial attention to obtain spatial attention features.
[0090] Spatial attention (SA) is a mechanism that focuses on the importance of different spatial locations within data. In this embodiment, by processing the time-series tensor and pseudo-spatial graph using the spatial attention mechanism, it can automatically identify and emphasize spatial location information that is more critical to photovoltaic power output prediction. Specifically, the spatial attention mechanism calculates an attention weight for each spatial location, reflecting the relative importance of that location information in the prediction task. By applying these weights to the original data, spatial attention features are obtained. These features are more focused on spatial regions that significantly influence the prediction results, thereby improving the accuracy and efficiency of the prediction model.
[0091] Step S7: Based on multi-head graph attention, use spatial attention features to learn topological relationships of different dimensions in parallel through multiple attention heads to obtain multi-head graph attention features.
[0092] Among them, Graph Attention Network with Multiple Heads (GAN) is a mechanism that can simultaneously capture multiple complex topological relationships in data. In this embodiment, by further processing spatial attention features through the GAN mechanism, the topological relationships between distributed photovoltaic sites in the photovoltaic cluster can be learned in parallel from different dimensions.
[0093] Each attention head focuses on learning a specific topology. Through parallel learning of multiple attention heads, more comprehensive and detailed multi-head graph attention features can be obtained. These features can more accurately reflect the complex relationships between various sites in the photovoltaic cluster.
[0094] Step S8: Input the multi-head image attention features into the long short-term memory network model for training to obtain a trained output prediction model.
[0095] Among them, Long Short-Term Memory (LSTM) networks effectively solve the gradient vanishing and gradient exploding problems that exist in traditional recurrent neural networks when processing long sequence data by introducing a gating mechanism. In this embodiment, multi-head graph attention features are input into the LSTM model for training. The LSTM model can automatically capture long-term dependencies and temporal patterns in these features. By continuously adjusting the model parameters, the model can more accurately predict the future output of the photovoltaic cluster. After sufficient training, the resulting output prediction model has strong generalization ability and prediction accuracy, which can provide strong support for the operation and maintenance of photovoltaic clusters.
[0096] Step S9: Obtain the power output time series data and meteorological time series data of the target photovoltaic cluster in the current calculation period, and combine them with the trained power output prediction model to obtain the power output prediction result of the target photovoltaic cluster at a future preset time.
[0097] Specifically, during the current calculation period, real-time power output time-series data and corresponding meteorological time-series data of the target photovoltaic cluster are acquired. By inputting this real-time data into a previously trained power output prediction model, the model can accurately predict the power output of the photovoltaic cluster at a preset time in the future, utilizing the complex topological relationships and time-series patterns it has learned internally.
[0098] It should be noted that, in this embodiment, the output time-series data and meteorological time-series data of the target photovoltaic cluster in the historical time-series window and the prediction time-series window are spliced together to obtain a time-series tensor. Based on the output time-series data and meteorological time-series data, the mutual information between each meteorological element and the average output of the photovoltaic cluster is determined. Each meteorological element is weighted according to its mutual information. Based on the multi-head self-attention mechanism, nonlinear feature extraction is performed on the weighted meteorological elements. By accurately quantifying the mutual information weights between each meteorological element and the average output of the cluster, the system can sensitively capture sudden meteorological events such as drastic changes in irradiance and temperature, and dynamically focus on key meteorological dimensions within the potential space. Furthermore, this method extracts latent features from the historical average power output of each distributed photovoltaic site in the target photovoltaic cluster using an autoencoder and spectral clustering algorithm, and constructs a static adjacency graph. Based on the power output time series data and combined with the fused meteorological features, a dynamic response embedding value is determined. The static adjacency graph and the dynamic response embedding value are then fused to construct a pseudo-spatial graph. Spatial attention features are extracted from the time series tensor and the pseudo-spatial graph based on spatial attention, resulting in spatial attention features. Based on multi-head graph attention, the spatial attention features are used to learn different dimensions of topological relationships in parallel through multiple attention heads, resulting in multi-head graph attention features. These multi-head graph attention features are then input into a long short-term memory network model for training, thereby using the trained power output prediction model to predict the power output of the target photovoltaic cluster at a predetermined time in the future. This embodiment of the application, by introducing a pseudo-spatial graph to fuse the static adjacency graph and the dynamic response embedding, can achieve more accurate topological relationship characterization in complex meteorological fluctuation scenarios, effectively solving the problem that the static graph structure in traditional methods is difficult to adapt to short-term dynamic changes in power output. By using a spatial attention mechanism to jointly process temporal sequence tensors and pseudo-spatial graphs, the information representation of key spatiotemporal regions can be adaptively enhanced. By inputting multi-head graph attention features into a long short-term memory network model for training, the accuracy and robustness of output prediction can be improved.
[0099] In some embodiments, power output time series data and meteorological time series data are concatenated according to historical time series windows and forecast time series windows to obtain a time series tensor, including:
[0100] Step S201: Standardize the power output time series data and meteorological time series data.
[0101] Wherein, it is assumed that the sampling time length is The index is The cluster contains A distributed photovoltaic site, indexed as follows: .
[0102] The power output time series data and meteorological time series data are written in matrix form respectively, resulting in the photovoltaic cluster power output matrix:
[0103]
[0104] In the formula, The output of distributed photovoltaic site j at sampling time t.
[0105] It has Various meteorological elements, indexed as The meteorological matrix is denoted as
[0106] In the formula, Let t be the meteorological data of meteorological element k at sampling time t.
[0107] While making the data dimensionless, the differences in the degree of variation among the variables were also eliminated, and the photovoltaic cluster output matrix and meteorological matrix were standardized respectively:
[0108]
[0109]
[0110]
[0111] In the formula: and The first The average and standard deviation of each meteorological event. This is the standardized meteorological data. Similarly, defining the output of a photovoltaic cluster, the standardized output data is as follows:
[0112]
[0113] A standardized meteorological matrix is constructed using standardized meteorological data and standardized output data. and the standardized photovoltaic cluster output matrix .
[0114] Step S202: Based on the time data of the data sampling, construct a historical time feature matrix and a predicted time feature matrix containing hourly features, weekday features and weekend identifier features according to the historical time series window and the predicted time series window, respectively.
[0115] The time series window of the historical time feature matrix is consistent with the historical time series window, and the time series window of the predicted time feature matrix is consistent with the predicted time series window.
[0116] The time feature is used to capture the time-related output patterns of the time series, focusing on the time patterns that are strongly correlated with photovoltaic output (such as intraday irradiance changes and intraweek electricity consumption differences), without introducing redundant information.
[0117] The hourly characteristics reflect intraday periodicity (e.g., strong irradiance and high output at noon, and no output in the early morning); the weekly characteristics reflect intraweekly periodicity (e.g., the difference in electricity load between weekdays and weekends indirectly affects the output adjustment related to photovoltaic consumption); the weekend identification characteristics are binary features, clearly distinguishing between weekdays and weekends, and strengthening the capture of weekly patterns.
[0118] Based on the time data (such as timestamps) from the data sampling, the hour value is extracted from the timestamp, with a value range of (0-23). The day of the week feature is extracted to determine the day of the week corresponding to the timestamp, with a value range of (1-7). The weekend identifier feature is obtained by binarizing the day of the week feature, with weekends (Saturday = 6, Sunday = 7) taking a value of 1 and weekdays (1-5) taking a value of 0, resulting in a time feature matrix. The historical time feature matrix is obtained by dividing the time feature matrix into historical time series windows and prediction time series windows. and prediction time feature matrix .
[0119] Step S203: Based on the standardized output time series data, standardized meteorological time series data, historical time feature matrix and predicted time feature matrix, divide the historical time series data matrix and predicted time series data matrix according to the historical time series window and the predicted time series window.
[0120] The standardized power output time series data and standardized meteorological time series data are divided into historical time series windows and forecast time series windows to obtain historical power output time series matrix, historical meteorological time series matrix and forecast meteorological time series matrix, and the target power output data of the target photovoltaic cluster is obtained to construct the target power output matrix; the time series window of the target power output matrix is consistent with the forecast time series window.
[0121] For example, let the total number of samples be... :
[0122] In the formula, The length of the history window; To predict the window length.
[0123] right Constructing a historical output time series matrix Historical meteorological time series matrix Historical time feature matrix Predicting meteorological time series matrix Prediction time feature matrix Work towards the goal The historical power output time series matrix, historical meteorological time series matrix, and historical time feature matrix are combined to obtain the historical time series data matrix. The predicted meteorological time series matrix, target power output matrix, and predicted time feature matrix are combined to obtain the predicted time series data matrix.
[0124] Step S204: Concatenate the historical time series data matrix and the predicted time series data matrix to obtain a time series sequence tensor.
[0125] This process involves concatenating historical and predicted time-series data matrices along the time dimension to form a time-series tensor containing complete historical and predictive information. This tensor integrates not only standardized power output and meteorological data but also time features such as hourly, weekday, and weekend identifiers, providing multi-dimensional spatiotemporal information input for subsequent models. During the concatenation process, it is crucial to ensure the temporal continuity between the historical and predicted time-series windows to avoid information gaps. The concatenated time-series tensor is stored using a three-dimensional structure (number of stations × time step × feature dimension), where the feature dimension encompasses power output values, various meteorological elements (such as irradiance, temperature, and wind speed), and time characteristics, thus comprehensively characterizing the spatiotemporal dynamics of the photovoltaic cluster. The feature vector for a single station at a given time is defined as follows:
[0126]
[0127] Among them Take history ,right make All nodes With time Stacking yields a time sequence tensor. .
[0128] In some embodiments, based on power output time-series data and meteorological time-series data, the mutual information between each meteorological element and the average photovoltaic power output is determined, and each meteorological element is weighted according to its mutual information. Based on a multi-head self-attention mechanism, nonlinear feature extraction is performed on the weighted meteorological elements to obtain fused meteorological features, including:
[0129] Step S301: Determine the average output data of all distributed photovoltaic stations at the same time based on the output time sequence data of all distributed photovoltaic stations at the same time.
[0130] The average output of all stations at the same time is used to obtain a scalar sequence:
[0131]
[0132] In the formula, This is for average output.
[0133] Step S302: For each meteorological element, determine the mutual information between the meteorological element and the average output data based on the average output data and the meteorological time series data under the meteorological element.
[0134] Let the random variable Indicates the first Distribution of meteorological characteristics Indicates the average output of photovoltaic power, then the first Inter-information between meteorological elements and output Defined as:
[0135]
[0136] based on Sample The K-nearest neighbor estimator is used to approximate the nearest neighbors. .
[0137] For joint samples Order No. The nth sample in two-dimensional space The nearest neighbor distance is:
[0138]
[0139] In the formula: For the first The set of K nearest neighbor indices of a point (excluding itself); The distance is the Chebyshev distance.
[0140] At this distance, To be in a one-dimensional meteorological space, with the sample meteorological value The distance is less than The number of neighbors; Within a one-dimensional force-output space, and The distance is less than The number of neighbors. Then the mutual information estimator is:
[0141]
[0142] In the formula: K is the nearest neighbor number hyperparameter; It is the Digamma function; This is for the correction of the total number of samples.
[0143] Step S303: Truncate the negative weights of the mutual information and normalize the mutual information after truncating the negative weights to obtain the weight vector of meteorological elements.
[0144] Among them, the preliminary mutual information values of M features Let it be a vector To avoid negative values and ensure the sum is 1, negative weights are truncated on the mutual information, i.e.:
[0145]
[0146] At the same time, the mutual information after truncating negative weights After normalization, the weight vector of meteorological elements is obtained:
[0147]
[0148] In the formula, For the k-th mutual information, This is the l-th mutual information.
[0149] Step S304: Based on the multi-head self-attention mechanism, the meteorological time series data of each meteorological element are weighted and fused according to the weight vector of each meteorological element to obtain the fused meteorological features.
[0150] Wherein, the weight vector is denoted as Meteorological time series data of meteorological elements After weighted fusion, we get:
[0151]
[0152] In the formula, The weighted meteorological characteristics.
[0153] Reduce dimensionality to potential dimensionality Define a learnable linear projection matrix The features obtained after projection are To capture interaction information at different positions within a time sequence, a multi-head attention mechanism is introduced. First, a query vector is generated through a linear transformation. The key vector K and the value vector V. Where:
[0154]
[0155]
[0156]
[0157] In the formula, , and To query the weight matrices of the vectors, key vectors, and value vectors.
[0158] Calculate attention score And weighted:
[0159]
[0160] To prevent the loss of original information, attention score Perform residual join and normalization:
[0161]
[0162] In the formula, To ensure that the integrated meteorological features focus on the meteorological dimensions most relevant to the output, and also take into account the dependencies within the time series, the subsequent prediction models should be designed to integrate these meteorological features.
[0163] In some embodiments, latent features are extracted from the historical average power output of each distributed photovoltaic site in the target photovoltaic cluster using an autoencoder and spectral clustering algorithm, and a static adjacency graph is constructed, including:
[0164] Step S401: For the output time series data of each distributed photovoltaic site input in each batch, extract the implicit features of the output time series data through multi-layer linear mapping and activation autoencoder.
[0165] in,
[0166] For the power output time-series data of each distributed photovoltaic (PV) site, an autoencoder model is constructed, consisting of an encoder and a decoder. The encoder part, through a combination of multiple linear mappings (such as fully connected layers) and activation functions (such as ReLU, Sigmoid, etc.), progressively compresses the high-dimensional power output time-series data into low-dimensional latent feature representations:
[0167]
[0168] In the formula, As a latent feature, For the station's power output vector, For activation function, These are the weight matrices for the first and second layers of the autoencoder, respectively. , These are the biases for the first and second layers of the autoencoder, respectively.
[0169] Specifically, let the number of nodes in the input layer be the dimension of the input time-series data. By progressively reducing the number of nodes, the latent feature layer is finally obtained at the end of the encoder, and its number of nodes represents the desired dimension of the latent features. The decoder is symmetrical to the encoder structure, reconstructing the original output time-series data from the latent features through inverse multi-layer linear mapping and activation functions. During training, the parameters of the autoencoder are optimized by minimizing the reconstruction error (such as mean squared error), ensuring that the extracted latent features retain the key information from the original data to the greatest extent possible.
[0170] Step S402: Based on the implicit features of all distributed photovoltaic sites, determine the Gaussian kernel similarity between each distributed photovoltaic site and form a Gaussian kernel similarity matrix.
[0171] Among them, the implicit features of all sites Define Gaussian kernel similarity :
[0172]
[0173] By aggregating the Gaussian kernel similarity between each distributed photovoltaic site into a Gaussian kernel similarity matrix .
[0174] Step S403: Use the spectral clustering algorithm to determine the clusters of the Gaussian kernel similarity matrix and construct the graph Laplacian matrix.
[0175] Among them, the spectral clustering algorithm is used to automatically determine the clusters, and the graph Laplacian matrix is constructed as follows:
[0176]
[0177] in, , It is a degree matrix.
[0178] Step S404: Perform eigenvalue decomposition on the graph Laplacian matrix using spectral decomposition, and determine the maximum spectral gap corresponding to the graph Laplacian matrix as the cluster number.
[0179] Among them, spectral decomposition is used for calculation. eigenvalues Searching for the largest spectral gap :
[0180]
[0181] Specifically, by determining the location of the largest spectral gap, the corresponding number of eigenvectors is used as the optimal number of clusters to define the clustering structure of distributed photovoltaic sites. This process automatically identifies the implicit inter-cluster boundaries in the data by analyzing the spectral characteristics of the graph Laplacian matrix, ensuring that the clustering results reflect the actual similarity between sites while avoiding over-segmentation or merging.
[0182] Step S405: Use the spectral clustering algorithm to cluster the implicit features of each distributed photovoltaic site according to the number of clusters to obtain the cluster label of each distributed photovoltaic site.
[0183] The latent features are sorted by spectral clustering algorithm. Clustering of feature vectors yields cluster labels for each site. .
[0184] Step S406: Determine the static adjacency value of each distributed photovoltaic site based on the cluster label of each distributed photovoltaic site and the Gaussian kernel similarity between each distributed photovoltaic site, and determine the static adjacency graph of the distributed photovoltaic sites based on the static adjacency value of each distributed photovoltaic site.
[0185] Among them, a static adjacency matrix is constructed. :
[0186]
[0187] In the formula, , These are the static adjacency values of distributed photovoltaic sites i and j, respectively.
[0188] In some embodiments, based on output time-series data and combined with fused meteorological characteristics, a dynamic response embedding value is determined, and the static adjacency graph and the dynamic response embedding value are fused to construct a pseudo-spatial graph, including:
[0189] Step S501: Input the fused meteorological features into the linear layer to obtain the baseline output before prediction bias.
[0190] Among them, the meteorological characteristics fused at each moment within the sliding window Input a linear layer to obtain the baseline output before prediction bias. :
[0191]
[0192] In the formula, This is the corresponding weight matrix; For the corresponding bias.
[0193] Step S502: Determine the output deviation based on the reference output and the pre-acquired actual output.
[0194] Among them, the actual standardized output at each moment is taken. Difference from baseline forecast:
[0195]
[0196] In the formula, This is the output deviation.
[0197] Step S503: After splicing the fused meteorological features and power output deviation, the spliced vector is input into the GRU embedding network. By capturing the temporal dependency between meteorological features and power output deviation, the time step hidden state is generated as the dynamic response embedding value.
[0198] Among them, the fused meteorological features and output deviations are spliced together, and the spliced vector is obtained. The input is embedded in a GRU (Gated Recurrent Unit Embedded Network) network. By capturing the temporal dependency between meteorological features and power output deviation, the network can dynamically adjust its internal state to adapt to temporal changes, generating time-step hidden states as dynamic response embedding values.
[0199]
[0200] In this context, the hidden state at the final time step (the hidden state at the last time step of the time series) serves as the dynamic response embedding value. .
[0201] Step S504: Construct a dynamic similarity matrix for all dynamic response embedding values based on the cosine similarity of the dynamic response embedding values.
[0202] Among them, for each batch Dynamic Embedded Collections The cosine similarity is calculated to construct the dynamic similarity matrix of all dynamic response embeddings. ,in:
[0203]
[0204] In the formula, Let T be the cosine similarity and T be the matrix transpose.
[0205] Step S505: The dynamic similarity matrix and the static adjacency graph are weighted and fused according to the preset fusion coefficients to obtain the pseudo-space graph.
[0206] The design process for the fusion coefficient is as follows:
[0207] Calculate the average standard deviation of historical meteorological data over time. :
[0208]
[0209] In the formula: This refers to the latitude of the weather.
[0210] The fusion coefficients were obtained through two fully connected layers and a Sigmoid algorithm. :
[0211]
[0212] In the formula: and This is the corresponding weight matrix; and For the corresponding bias.
[0213] Finally, the adjacency matrices are merged to construct a pseudo-space graph:
[0214]
[0215] In the formula, The pseudo-spatial graph is then fed into a spatial attention and graph attention network to capture the spatiotemporal dependencies between sites.
[0216] In some embodiments, spatial attention features are extracted from temporal sequence tensors and pseudo-spatial graphs based on spatial attention to obtain spatial attention features, including:
[0217] Step S601: Determine the basic score based on the time series tensor.
[0218] Among them, for each historical moment and each node Extract node feature vectors And calculate the query vector Key vector :
[0219]
[0220]
[0221] Based on the query vector Key vector Determine the base score :
[0222] In the formula, This is the attention scaling factor.
[0223] Step S602: Determine the attention score based on the base score and the pseudospace graph.
[0224] The attention score is determined by fusing the pseudo-space graph and the baseline score.
[0225]
[0226] In the formula, These are learnable multiplicative scaling factors; The coefficients of the learnable logarithmic bias term; This is a logarithmic shift constant to prevent log(0) from occurring.
[0227] Step S603: Normalize the attention score, and calculate the spatial attention features by weighting the temporal sequence tensor based on the normalized attention score.
[0228] The attention score is obtained by normalizing the attention score using Softmax. The spatial attention features are obtained by weighting the temporal sequence tensor based on the normalized attention scores. :
[0229]
[0230] In the formula, Let be the feature vector of the b-th batch.
[0231] Accordingly, based on multi-head graph attention, spatial attention features are utilized to learn topological relationships of different dimensions in parallel through multiple attention heads, resulting in multi-head graph attention features, including:
[0232] Step S701: Split the spatial attention features according to the number of attention heads, and input each split spatial attention feature into each attention head for linear mapping to obtain the attention linear mapping feature corresponding to each attention head.
[0233] This involves further utilizing a graph attention layer after spatial attention to perform non-linear aggregation of node neighborhood information. This incorporates spatial attention features. enter The first attention point, for the first First, perform a linear mapping to obtain the attention linear mapping features corresponding to each attention head. :
[0234]
[0235] In the formula: This is the weight matrix.
[0236] Step S702: Utilize the attention linear mapping feature to determine the head-inside edge attention score corresponding to each attention head.
[0237] The intracranial attention score is as follows:
[0238]
[0239] In the formula, For a leaky ReLU activation function, Let h be the feature embedding of node j at time t.
[0240] Step S703: Normalize the attention scores within the head to obtain the edge weights, and aggregate the attention linear mapping features of each attention head based on the edge weights to obtain the multi-head graph attention features.
[0241] Among them, the multi-head image attention feature is:
[0242]
[0243] in,
[0244] In the formula, The edge weight is denoted as .
[0245] In some embodiments, the Long Short-Term Memory (LSTM) network model includes a first-layer LSTM network and a second-layer LSTM network; in this case, multi-head image attention features are input into the LSTM network model for training to obtain a trained output prediction model, including:
[0246] Step S801: Input the multi-head image attention features into the first layer of the long short-term memory network, perform feature extraction and time series modeling on the multi-head image attention features, and output the first layer of hidden state features.
[0247] Among them, for each time step Extract the attention output from the multi-head graph, flatten the batch and node dimensions to obtain the sequence input. .
[0248] Next, for the flattened input sequence, at time step There is an input vector. And maintain the cell state of the previous step. With hidden state .
[0249] LSTM performs the following calculations in each step:
[0250] (1) Gate of Oblivion:
[0251]
[0252] (2) Input gate:
[0253]
[0254] (3) Candidate cell status:
[0255]
[0256] (4) Update cell state:
[0257]
[0258] (5) Output gate:
[0259]
[0260] (6) Hidden state:
[0261]
[0262] In the formula: These are learnable weights; For bias; It is the sigmoid activation function; This is for element-wise multiplication.
[0263] Step S802: Input the first-layer hidden state features into the second-layer long short-term memory network, perform feature extraction and time series modeling on the first-layer hidden state features, and output the second-layer hidden state features.
[0264] The second LSTM layer then incorporates the first LSTM layer's... As the second layer input, iterate using the same gating mechanism. Finally, Return .
[0265] Step S803: Repeat the process of inputting the hidden state features of the second layer into the second layer long short-term memory network for iterative processing. In each iteration, record the hidden state features of each layer and calculate the negative log-likelihood loss function value based on the hidden state features.
[0266] For each step and batch ,node Calculate the mean with standard deviation :
[0267]
[0268]
[0269]
[0270] In the formula, These are the weight vector and bias of the mean output layer, respectively. , These are the weight vector and bias of the standard deviation output layer, respectively.
[0271] Output Gaussian distribution parameters and with negative log-likelihood loss As the training objective, among which:
[0272]
[0273]
[0274] In the formula, B is the training batch size. The actual output for batch b, time step (T+t), and site i.
[0275] Step S804: Update the parameters of the Long Short-Term Memory network model using the backpropagation algorithm based on the negative log-likelihood loss function value.
[0276] Specifically, the parameters of the Long Short-Term Memory (LSTM) network model are continuously adjusted and optimized by minimizing the negative log-likelihood loss function. During each iteration, based on the calculated negative log-likelihood loss function value, the error is fed back layer by layer from the output layer to the input layer using the backpropagation algorithm, updating the learnable weights and biases in each layer of the LTM network. As the number of iterations increases, the negative log-likelihood loss function value gradually decreases. Iteration stops when the preset number of iterations is reached or the negative log-likelihood loss function value converges to a certain level. At this point, the trained power output prediction model is obtained, which can accurately predict the short-term power output of distributed photovoltaic clusters based on input meteorological characteristics and other information.
[0277] Step S805: When the iteration reaches the preset number of iterations or the preset convergence condition is met, stop training and obtain the trained output prediction model.
[0278] The preset number of iterations is a fixed value set based on factors such as the actual data scale, model complexity, and computing resources. The preset convergence condition is usually a threshold value for the negative log-likelihood loss function. When the change in the negative log-likelihood loss function value is less than this threshold in a series of consecutive iterations, the model is considered to have converged. After meeting the above conditions for stopping training, the resulting trained power output prediction model has its internal parameters adjusted to a relatively optimal state through extensive data training and optimization. It can effectively capture the complex relationship between input meteorological characteristics and other information and the short-term power output of distributed photovoltaic clusters, thus enabling relatively accurate prediction of the short-term power output of distributed photovoltaic clusters based on input information in practical applications.
[0279] Based on the same inventive concept, this application also provides a distributed photovoltaic cluster short-term output prediction system for implementing the above-mentioned distributed photovoltaic cluster short-term output prediction method.
[0280] The solution provided by this system is similar to the solution described in the above method. Therefore, the specific limitations of one or more embodiments of the distributed photovoltaic cluster short-term output prediction system provided below can be found in the limitations of the distributed photovoltaic cluster short-term output prediction method above, and will not be repeated here.
[0281] like Figure 3 As shown in the figure, this application provides a short-term output prediction system for distributed photovoltaic clusters, including:
[0282] The data acquisition module 100 is used to acquire the output time series data of the target photovoltaic cluster in the historical time series window and the prediction time series window, as well as the meteorological time series data under various meteorological elements.
[0283] Tensor determination module 200 is used to concatenate power output time series data and meteorological time series data according to historical time series windows and prediction time series windows to obtain time series tensors;
[0284] The meteorological feature fusion module 300 is used to determine the mutual information between each meteorological element and the average photovoltaic output based on the output time series data and meteorological time series data, and to weight each meteorological element according to the mutual information. Based on the multi-head self-attention mechanism, nonlinear feature extraction is performed on the weighted meteorological elements to obtain the fused meteorological features.
[0285] The static graph determination module 400 is used to extract hidden features from the historical average power output of each distributed photovoltaic site in the target photovoltaic cluster through an autoencoder and spectral clustering algorithm, and to construct a static adjacency graph.
[0286] The pseudo-spatial graph determination module 500 is used to determine the dynamic response embedding value based on the output time series data and the fused meteorological characteristics, and to fuse the static adjacency graph and the dynamic response embedding value to construct a pseudo-spatial graph.
[0287] The spatial attention module 600 is used to extract spatial attention features from temporal sequence tensors and pseudo-spatial graphs based on spatial attention, and obtain spatial attention features.
[0288] The multi-head graph attention module 700 is used to learn topological relationships of different dimensions in parallel through multiple attention heads based on multi-head graph attention, utilizing spatial attention features to obtain multi-head graph attention features;
[0289] The prediction model training module 800 is used to input the multi-head image attention features into the long short-term memory network model for training, and obtain the trained output prediction model.
[0290] The power output prediction module 900 is used to acquire the power output time series data and meteorological time series data of the target photovoltaic cluster in the current calculation period, and combine them with the trained power output prediction model to obtain the power output prediction result of the target photovoltaic cluster at a future preset time.
[0291] In some embodiments, the tensor determination module 200 is configured to:
[0292] Standardize the power output time series data and meteorological time series data;
[0293] Based on the time data sampled, a historical time feature matrix and a predicted time feature matrix containing hourly features, weekday features, and weekend identifier features are constructed according to the historical time series window and the predicted time series window, respectively.
[0294] Based on the standardized output time series data, standardized meteorological time series data, historical time feature matrix and predicted time feature matrix, the historical time series data matrix and the predicted time series data matrix are divided according to the historical time series window and the predicted time series window;
[0295] The historical time series data matrix and the predicted time series data matrix are concatenated to obtain a time series sequence tensor.
[0296] In some embodiments, the meteorological feature fusion module 300 is used for:
[0297] Based on the power output time-series data of all distributed photovoltaic sites at the same time, determine the average power output data of all distributed photovoltaic sites at the same time.
[0298] For each meteorological element, the mutual information between the meteorological element and the average output data is determined based on the average output data and the meteorological time series data under the meteorological element.
[0299] The mutual information is truncated with negative weights, and the truncated mutual information is normalized to obtain the weight vector of meteorological elements.
[0300] Based on the multi-head self-attention mechanism, the meteorological time series data of each meteorological element are weighted and fused according to the weight vector of each meteorological element to obtain the fused meteorological features.
[0301] In some embodiments, the static diagram determination module 400 is configured to:
[0302] For each batch of input power output time series data of each distributed photovoltaic site, the implicit features of the power output time series data are extracted through multi-layer linear mapping and activation autoencoder.
[0303] Based on the implicit characteristics of all distributed photovoltaic sites, the Gaussian kernel similarity between each distributed photovoltaic site is determined, and a Gaussian kernel similarity matrix is formed.
[0304] The spectral clustering algorithm is used to determine the clusters of the Gaussian kernel similarity matrix, and the graph Laplacian matrix is constructed.
[0305] Spectral decomposition is used to perform eigenvalue decomposition on the graph Laplacian matrix, and the maximum spectral gap corresponding to the graph Laplacian matrix is determined as the cluster number.
[0306] The implicit features of each distributed photovoltaic site are clustered according to the number of clusters using the spectral clustering algorithm to obtain the cluster label of each distributed photovoltaic site;
[0307] Based on the cluster labels of each distributed photovoltaic (PV) site and the Gaussian kernel similarity between each PV site, the static adjacency value of each PV site is determined, and the static adjacency graph of the PV sites is determined based on the static adjacency value of each PV site.
[0308] In some embodiments, the pseudo-space map determination module 500 is used for:
[0309] The fused meteorological features are input into the linear layer to obtain the baseline output before the prediction bias.
[0310] The output deviation is determined based on the benchmark output and the pre-acquired actual output.
[0311] After splicing the fused meteorological features and power output deviation, the spliced vector is input into the GRU embedding network. By capturing the temporal dependency between meteorological features and power output deviation, the time step hidden state is generated as the dynamic response embedding value.
[0312] Based on the cosine similarity of the dynamic response embeddings, a dynamic similarity matrix is constructed for all dynamic response embeddings;
[0313] The dynamic similarity matrix and the static adjacency graph are weighted and fused according to preset fusion coefficients to obtain a pseudo-space graph.
[0314] In some embodiments, the spatial attention module 600 is used for:
[0315] The base score is determined based on the time series tensor;
[0316] The attention score is determined based on the baseline score and the pseudospace graph;
[0317] The attention score is normalized, and the temporal sequence tensor is weighted and calculated based on the normalized attention score to obtain the spatial attention features.
[0318] Multi-head image attention module 700, used for:
[0319] The spatial attention features are split according to the number of attention heads, and each split spatial attention feature is input into each attention head for linear mapping to obtain the attention linear mapping feature corresponding to each attention head;
[0320] By utilizing the linear attention mapping feature, the head-inside edge attention score corresponding to each attention head is determined;
[0321] The attention scores within the head are normalized to obtain the edge weights. The attention linear mapping features of each attention head are aggregated based on the edge weights to obtain the multi-head graph attention features.
[0322] In some embodiments, the long short-term memory network model includes a first-layer long short-term memory network and a second-layer long short-term memory network;
[0323] Prediction model training module 800, used for:
[0324] The multi-head image attention features are input into the first layer of the long short-term memory network, and feature extraction and time series modeling are performed on the multi-head image attention features to output the first layer of hidden state features.
[0325] The first-layer hidden state features are input into the second-layer long short-term memory network to perform feature extraction and time series modeling on the first-layer hidden state features, and output the second-layer hidden state features.
[0326] The process is repeated, inputting the hidden state features of the second layer back into the second layer of the long short-term memory network for iterative processing. During each iteration, the hidden state features of each layer are recorded, and the negative log-likelihood loss function value is calculated based on the hidden state features.
[0327] The parameters of the long short-term memory network model are updated based on the negative log-likelihood loss function value using the backpropagation algorithm.
[0328] Training stops once the preset number of iterations is reached or the preset convergence condition is met, and the trained power output prediction model is obtained.
[0329] like Figure 4 As shown, this application provides an electronic device 10, which includes a memory 20 and a processor 30. The memory 20 stores a computer program. When the computer program is executed by the processor 30, the processor 30 performs the steps of the distributed photovoltaic cluster short-term output prediction method as described in the above embodiment.
[0330] This application provides a computer-readable storage medium storing a computer program thereon, which, when executed, implements the steps of the distributed photovoltaic cluster short-term output prediction method as described in the above embodiments.
[0331] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, electronic devices, and computer storage media described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0332] It should be noted that the terms "comprising" and "having" and any variations thereof in the specification, claims and accompanying drawings of this invention are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to such processes, methods, products or devices.
[0333] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0334] In the embodiments provided by this invention, it should be understood that the disclosed systems, electronic devices, computer storage media, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between devices or units through some interfaces, and may be electrical, mechanical, or other forms.
[0335] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0336] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0337] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for executing all or part of the steps of the methods described in the various embodiments of the present invention through a computer device (which may be a personal computer, a server, or a network device, etc.). The aforementioned storage medium includes: USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, optical disks, and other media capable of storing program code.
[0338] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for predicting the short-term output of a distributed photovoltaic cluster, characterized in that, include: Acquire the output time-series data of the target photovoltaic cluster in historical time-series windows and forecast time-series windows, as well as meteorological time-series data under various meteorological factors; The power output time series data and the meteorological time series data are concatenated according to the historical time series window and the prediction time series window to obtain the time series tensor; Based on the power output time series data and meteorological time series data, the mutual information between each meteorological element and the average photovoltaic power output is determined, and each meteorological element is weighted according to the mutual information. Based on the multi-head self-attention mechanism, nonlinear feature extraction is performed on the weighted meteorological elements to obtain the fused meteorological features. Hidden features are extracted from the historical average power output of each distributed photovoltaic site in the target photovoltaic cluster using an autoencoder and spectral clustering algorithm, and a static adjacency graph is constructed. Based on the output time series data and the fused meteorological characteristics, the dynamic response embedding value is determined, and the static adjacency graph and the dynamic response embedding value are fused to construct a pseudo-space graph; Spatial attention features are extracted from the temporal sequence tensor and the pseudo-spatial graph based on spatial attention. Based on multi-head graph attention, the spatial attention features are used to learn topological relationships of different dimensions in parallel through multiple attention heads to obtain multi-head graph attention features; The multi-head image attention features are input into a long short-term memory network model for training to obtain a trained output prediction model. The power output time-series data and meteorological time-series data of the target photovoltaic cluster in the current calculation period are obtained, and combined with the trained power output prediction model, the power output prediction result of the target photovoltaic cluster at a future preset time is obtained.
2. The method for short-term output prediction of distributed photovoltaic clusters according to claim 1, characterized in that, The step of concatenating the power output time series data and the meteorological time series data according to historical time series windows and predicted time series windows to obtain a time series tensor includes: The power output time series data and the meteorological time series data are standardized. Based on the time data of the data sampling, a historical time feature matrix and a predicted time feature matrix containing hour features, weekday features and weekend identification features are constructed according to the historical time series window and the predicted time series window, respectively. Based on the standardized power output time series data, the standardized meteorological time series data, the historical time feature matrix and the predicted time feature matrix, the historical time series data matrix and the predicted time series data matrix are divided according to the historical time series window and the predicted time series window; The historical time series data matrix and the predicted time series data matrix are concatenated in time series to obtain the time series sequence tensor.
3. The method for short-term output prediction of distributed photovoltaic clusters according to claim 1, characterized in that, The process involves determining the mutual information between each meteorological element and the average photovoltaic output based on the power output time-series data and meteorological time-series data, weighting each meteorological element according to its mutual information, and performing nonlinear feature extraction on the weighted meteorological elements based on a multi-head self-attention mechanism to obtain fused meteorological features, including: Based on the power output time-series data of all distributed photovoltaic sites at the same time, determine the average power output data of all distributed photovoltaic sites at the same time. For each meteorological element, the mutual information between the meteorological element and the average output data is determined based on the average output data and the meteorological time series data under the meteorological element. The mutual information is truncated with negative weights, and the mutual information after truncating negative weights is normalized to obtain the weight vector of the meteorological element. Based on the multi-head self-attention mechanism, the meteorological time series data of each meteorological element are weighted and fused according to the weight vector of each meteorological element to obtain the fused meteorological features.
4. The method for short-term output prediction of distributed photovoltaic clusters according to claim 1, characterized in that, The step of extracting latent features from the historical average power output of each distributed photovoltaic site in the target photovoltaic cluster using an autoencoder and spectral clustering algorithm, and constructing a static adjacency graph, includes: For each batch of input power output time series data for each distributed photovoltaic site, the implicit features of the power output time series data are extracted through multi-layer linear mapping and activation autoencoder. Based on the implicit features of all the distributed photovoltaic sites, the Gaussian kernel similarity between each distributed photovoltaic site is determined, and a Gaussian kernel similarity matrix is formed. The clustering algorithm is used to determine the clusters of the Gaussian kernel similarity matrix, and a graph Laplacian matrix is constructed. The graph Laplacian matrix is subjected to eigenvalue decomposition using spectral decomposition, and the maximum spectral gap corresponding to the graph Laplacian matrix is determined as the cluster number. The implicit features of each distributed photovoltaic site are clustered according to the number of clusters using a spectral clustering algorithm to obtain the cluster label of each distributed photovoltaic site; Based on the cluster labels of each distributed photovoltaic (PV) site and the Gaussian kernel similarity between each PV site, the static adjacency value of each PV site is determined, and based on the static adjacency value of each PV site, the static adjacency graph of the PV sites is determined.
5. The method for short-term output prediction of distributed photovoltaic clusters according to claim 1 or 4, characterized in that, The step of determining the dynamic response embedding value based on the output time-series data and the fused meteorological characteristics, and fusing the static adjacency graph and the dynamic response embedding value to construct a pseudo-spatial graph includes: The fused meteorological features are input into the linear layer to obtain the baseline output before the prediction bias. The output deviation is determined based on the reference output and the pre-acquired actual output. After splicing the fused meteorological features and the output deviation, the spliced vector is input into the GRU embedding network. By capturing the temporal dependency between the meteorological features and the output deviation, the time step hidden state is generated as the dynamic response embedding value. Based on the cosine similarity of the dynamic response embedding values, a dynamic similarity matrix is constructed for all the dynamic response embedding values. The dynamic similarity matrix and the static adjacency graph are weighted and fused according to a preset fusion coefficient to obtain the pseudo-space graph.
6. The method for short-term output prediction of distributed photovoltaic clusters according to claim 1, characterized in that, The spatial attention feature extraction based on spatial attention of the temporal sequence tensor and the pseudo-spatial graph yields spatial attention features, including: The base score is determined based on the time series tensor; The attention score is determined based on the base score and the pseudo-space graph; The attention score is normalized, and the temporal sequence tensor is weighted and calculated based on the normalized attention score to obtain the spatial attention feature; Accordingly, the multi-head graph attention feature, which utilizes the spatial attention features to learn topological relationships of different dimensions in parallel through multiple attention heads to obtain multi-head graph attention features, includes: The spatial attention features are split according to the number of attention heads, and each split spatial attention feature is input to each attention head for linear mapping to obtain the attention linear mapping feature corresponding to each attention head; Using the aforementioned attention linear mapping feature, the head-inside edge attention score corresponding to each attention head is determined; The edge attention scores within the head are normalized to obtain edge weights. The attention linear mapping features of each attention head are aggregated based on the edge weights to obtain the multi-head graph attention features.
7. The method for short-term output prediction of distributed photovoltaic clusters according to claim 1, characterized in that, The long short-term memory network model includes a first-layer long short-term memory network and a second-layer long short-term memory network; The step of inputting the multi-head image attention features into a long short-term memory network model for training to obtain a trained output prediction model includes: The multi-head image attention features are input into the first layer long short-term memory network, and feature extraction and time series modeling are performed on the multi-head image attention features to output the first layer hidden state features. The first layer hidden state features are input into the second layer long short-term memory network, and feature extraction and time series modeling are performed on the first layer hidden state features to output the second layer hidden state features. The process is repeated, inputting the hidden state features of the second layer back into the second layer of the long short-term memory network for iterative processing. During each iteration, the hidden state features of each layer are recorded, and the negative log-likelihood loss function value is calculated based on the hidden state features. The parameters of the long short-term memory network model are updated based on the negative log-likelihood loss function value using the backpropagation algorithm. Training stops when the preset number of iterations is reached or the preset convergence condition is met, and the trained power prediction model is obtained.
8. A short-term output prediction system for distributed photovoltaic clusters, characterized in that, include: The data acquisition module is used to acquire the output time-series data of the target photovoltaic cluster in historical time-series windows and forecast time-series windows, as well as meteorological time-series data under various meteorological elements. The tensor determination module is used to concatenate the power output time series data and the meteorological time series data according to the historical time series window and the prediction time series window to obtain a time series tensor. The meteorological feature fusion module is used to determine the mutual information between each meteorological element and the average photovoltaic output based on the output time series data and the meteorological time series data, and to weight each meteorological element according to the mutual information. Based on the multi-head self-attention mechanism, nonlinear feature extraction is performed on the weighted meteorological elements to obtain the fused meteorological features. The static graph determination module is used to extract hidden features from the historical average power output of each distributed photovoltaic site in the target photovoltaic cluster through an autoencoder and a spectral clustering algorithm, and to construct a static adjacency graph. The pseudo-spatial graph determination module is used to determine the dynamic response embedding value based on the output time series data and the fused meteorological characteristics, and to fuse the static adjacency graph and the dynamic response embedding value to construct a pseudo-spatial graph. The spatial attention module is used to extract spatial attention features from the temporal sequence tensor and the pseudo-spatial graph based on spatial attention, so as to obtain spatial attention features; The multi-head graph attention module is used to learn topological relationships of different dimensions in parallel through multiple attention heads based on multi-head graph attention and the spatial attention features, thereby obtaining multi-head graph attention features. The prediction model training module is used to input the multi-head image attention features into the long short-term memory network model for training, so as to obtain a trained output prediction model. The power output prediction module is used to acquire the power output time series data and meteorological time series data of the target photovoltaic cluster in the current calculation period, and combine them with the trained power output prediction model to obtain the power output prediction result of the target photovoltaic cluster at a future preset time.
9. An electronic device, characterized in that, The electronic device includes a memory and a processor. The memory stores a computer program, which, when executed by the processor, causes the processor to perform the steps of the distributed photovoltaic cluster short-term output prediction method as described in any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed, it implements the steps of the short-term output prediction method for distributed photovoltaic clusters as described in any one of claims 1-7.