Distributed photovoltaic output prediction method and device, electronic equipment and storage medium

The photovoltaic power generation prediction method, which utilizes multi-scale time processing and inter-site dependency extraction, solves the problems of low prediction accuracy and data dependency in existing technologies, achieving higher accuracy and more stable photovoltaic power generation prediction.

CN120601529BActive Publication Date: 2025-10-21SHENZHEN UNIV

Patent Information

Application Number
CN202511087272.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-05
Publication Date
2025-10-21
Estimated Expiration
2045-08-05

AI Technical Summary

Technical Problem

Existing photovoltaic power prediction technologies suffer from low prediction accuracy when faced with the complex environment and rapidly changing weather conditions of distributed photovoltaic systems. They also rely on high-cost external meteorological data, lack a unified systematic modeling framework, and struggle to effectively handle multi-scale time-series characteristics.

Method used

By acquiring power generation data from multiple photovoltaic sites, performing multi-scale time processing and extracting inter-site dependencies, and utilizing a Transformer encoder and multi-head self-attention mechanism, a multi-scale prediction model is constructed. The prediction results are then fused to mitigate nighttime anomalies and form a unified modeling framework.

Benefits of technology

It improves the accuracy and adaptability of photovoltaic power generation forecasts, reduces reliance on high-cost meteorological data, and enhances the model's adaptability and forecasting performance in complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120601529B_ABST
    Figure CN120601529B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of power control, in particular to a distributed photovoltaic output prediction method and device, an electronic device and a storage medium, photovoltaic power generation data of multiple photovoltaic stations in a target region is acquired through a preset time period, a multi-station photovoltaic power generation data sequence is generated, multi-scale time processing is performed on the sequence, a multi-station multi-scale sequence is obtained, the sequence is input into a preset target photovoltaic output prediction model, the model outputs a prediction result corresponding to each scale, and each scale prediction result is fused to obtain a comprehensive prediction result of each photovoltaic station. The application does not depend on high-precision meteorological observation and high-cost external meteorological data, a systematic modeling framework is constructed through multi-scale processing and result fusion, complex multi-scale time sequence characteristics are effectively processed, and the accuracy and applicability of distributed photovoltaic output prediction are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of power control technology, and in particular to a distributed photovoltaic output prediction method, device, electronic device, and storage medium. Background Art

[0002] With the widespread adoption of distributed photovoltaic systems, the volatility and uncertainty of their generated power are becoming increasingly pronounced, becoming a significant factor affecting grid scheduling and safe operation. To improve prediction accuracy, current photovoltaic power prediction technologies primarily include physical, statistical, and machine learning models.

[0003] Physical models are based on the physical operating mechanisms and environmental conditions of photovoltaic systems. They derive power generation by calculating the impact of meteorological factors (e.g., solar radiation, module temperature, and wind speed) on power output. These models offer good interpretability, but they rely heavily on high-precision on-site meteorological observation data, have limited adaptability to complex environments, and lack flexibility, resulting in low forecast accuracy. Statistical models rely on the trend and cyclical characteristics of historical power data to construct time series forecasting models, such as ARIMA and Markov models. While computationally efficient, these models often assume data stationarity or trend predictability, making their forecasting performance insufficient when faced with rapidly changing weather conditions and complex nonlinear fluctuations. In recent years, machine learning methods have been widely used due to their powerful nonlinear modeling capabilities. Without explicit assumptions about data distribution, they can improve forecasting accuracy by training models using historical data to learn complex nonlinear relationships. Deep learning models such as long-short-term memory (LSTM) networks are particularly effective in capturing the temporal dependencies in power generation data and can effectively leverage historical trend information to improve short-term forecasting accuracy. However, machine learning often relies on expensive external meteorological data such as numerical weather forecasts, satellite imagery, and sky imaging, which poses applicability and cost bottlenecks in large-scale distributed photovoltaic scenarios. Furthermore, time-correlation learning mechanisms have been introduced to enhance the model's ability to learn dynamic patterns of power fluctuations. However, the lack of a unified and efficient systematic modeling framework to handle complex multi-scale time series features limits the model's overall predictive effectiveness. Summary of the Invention

[0004] In order to overcome the deficiencies of the prior art, the present invention provides a distributed photovoltaic output prediction method, device, electronic device and storage medium to achieve a more accurate prediction of the power generated by a distributed photovoltaic system.

[0005] A first aspect of the present application provides a distributed photovoltaic output prediction method, the method comprising:

[0006] Acquire photovoltaic power generation data of each photovoltaic site in a target area according to a preset time period, and generate a multi-site photovoltaic power generation data sequence;

[0007] Performing multi-scale time processing on the multi-site photovoltaic power generation data sequence to obtain a multi-site multi-scale sequence;

[0008] Inputting the multi-site multi-scale sequence into a preset target photovoltaic output prediction model, so that the photovoltaic output prediction model outputs a prediction result corresponding to each scale in the multi-site multi-scale sequence;

[0009] The prediction results of each scale are integrated to obtain a comprehensive prediction result of each photovoltaic site.

[0010] In an optional embodiment, the method further comprises:

[0011] The following formula is used to predict abnormalities at night based on the comprehensive prediction results to obtain the final prediction result:

[0012] ;

[0013] in, is the final prediction result of the i-th photovoltaic site, is the comprehensive prediction result of the i-th photovoltaic site.

[0014] In an optional embodiment, inputting the multi-site multi-scale sequence into a preset target photovoltaic output prediction model so that the photovoltaic output prediction model outputs a prediction result corresponding to each scale in the multi-site multi-scale sequence includes:

[0015] Extracting inter-site dependency relationships based on each scale sequence in the multi-site multi-scale sequence;

[0016] Perform block embedding operations on each scale sequence after extracting inter-site dependencies;

[0017] Each time scale after the block embedding operation is passed through the encoder layer of the target photovoltaic output prediction model, and the prediction result corresponding to each scale is output.

[0018] In an optional embodiment, extracting inter-site dependency relationships based on each scale sequence in the multi-site multi-scale sequence includes:

[0019] Each of the above scale sequences is first embedded into the word segment on the variable dimension; the embedding operation is based on the MLP transformation, which converts the dimension Map to , and we get a C-dimensional The embedding matrix of word scores , ;

[0020] The word segments are processed using the multi-head self-attention mechanism in the Transformer encoder in the target photovoltaic output prediction model to perform interactions between word segments; the multi-head self-attention operation is expressed as , x is the input word score;

[0021] The word segments processed by multi-head self-attention are projected back to the original scale time step of the subsequent layer. The projection operation is based on the transformation of MLP. Map to .

[0022] In an optional embodiment, the block embedding operation on each scale sequence after the inter-site dependency relationship extraction includes:

[0023] Using the target photovoltaic output prediction model, a one-dimensional convolution operation is used to divide each scale sequence after the inter-site dependency is extracted into blocks;

[0024] The position information of each block is added using the position embedding of the Transformer encoder, and each block is encoded using the value embedding implemented by the linear layer.

[0025] In an optional embodiment, fusing the prediction results of each scale to obtain the comprehensive prediction result of each photovoltaic site includes:

[0026] The prediction results of each scale are linearly combined using the following formula to obtain the comprehensive prediction result:

[0027] ;

[0028] in, is the comprehensive prediction result of T time steps for the ith photovoltaic site, is the prediction result of the mth scale, is the weight corresponding to the prediction result of the mth scale.

[0029] In an optional embodiment, performing multi-scale time processing on the multi-site photovoltaic power generation data sequence to obtain a multi-site multi-scale sequence includes:

[0030] downsampling past observations of each photovoltaic site in the multi-site photovoltaic power generation data series into multiple scales using an average pooling operation to obtain a set of multi-scale time series representations corresponding to each photovoltaic site;

[0031] The multi-scale time series representation of each photovoltaic site is integrated to obtain the multi-site multi-scale sequence.

[0032] A second aspect of the present application provides a distributed photovoltaic output prediction device, the device comprising:

[0033] An acquisition module is used to acquire photovoltaic power generation data of each photovoltaic site in a target area according to a preset time period, and generate a multi-site photovoltaic power generation data sequence;

[0034] a processing module, configured to perform multi-scale time processing on the multi-site photovoltaic power generation data sequence to obtain a multi-site multi-scale sequence;

[0035] A prediction module, configured to input the multi-site multi-scale sequence into a preset target photovoltaic output prediction model, so that the photovoltaic output prediction model outputs a prediction result corresponding to each scale in the multi-site multi-scale sequence;

[0036] The fusion module is used to fuse the prediction results of each scale to obtain a comprehensive prediction result of each photovoltaic site.

[0037] A third aspect of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the distributed photovoltaic output prediction method when executing the computer program.

[0038] A fourth aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the above-mentioned distributed photovoltaic output prediction method when executed by a processor.

[0039] In summary, the distributed photovoltaic output prediction method, device, electronic device, and storage medium provided in this application have at least one of the following technical effects:

[0040] 1. The photovoltaic power generation data of each photovoltaic site in the target area is obtained according to a preset time period to generate a multi-site photovoltaic power generation data series. This is not limited to relying on high-precision on-site meteorological observation data. Starting from the actual photovoltaic power generation data, it overcomes the limitations of the physical model due to its reliance on meteorological data to a certain extent, improves its adaptability and flexibility to different environmental conditions, and helps to improve prediction accuracy.

[0041] 2. Through multi-scale time processing, data characteristics at different time scales can be captured, including short-term fluctuations caused by rapidly changing weather conditions and complex nonlinear characteristics such as long-term trends. This enables the model to better adapt to changes in data at different time scales, breaking through the assumptions of statistical models on data stationarity or trend predictability, thereby improving prediction performance.

[0042] 3. The method of constructing a target photovoltaic output prediction model and integrating multi-scale prediction results has formed a relatively unified and efficient systematic modeling framework, which can comprehensively process complex multi-scale time series characteristics and give full play to the advantages of data at different time scales, thereby improving the overall prediction effect of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 This is a flow chart of a distributed photovoltaic output prediction method shown in an embodiment of the present application;

[0044] Figure 2 1 is a schematic diagram of a photovoltaic output prediction model according to an embodiment of the present application;

[0045] Figure 3 This is a functional module diagram of a distributed photovoltaic output prediction device shown in an embodiment of the present application;

[0046] Figure 4 It is a structural diagram of an electronic device shown in an embodiment of the present application. DETAILED DESCRIPTION

[0047] The present invention will be further described below with reference to the accompanying drawings and examples.

[0048] The following will clearly and completely describe the concept, specific structure and technical effects of the present invention in combination with the embodiments and drawings, so as to fully understand the purpose, characteristics and effects of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention. In addition, all the connection / connection relationships involved in the patent do not refer to the direct connection of components, but refer to the fact that a better connection structure can be formed by adding or reducing connection accessories according to the specific implementation situation. The various technical features in the invention can be combined interactively without conflicting with each other.

[0049] Reference Figure 1 2 is a flow chart of a distributed photovoltaic output prediction method according to an embodiment of the present application, and the distributed photovoltaic output prediction method includes the following steps.

[0050] S11 , obtaining photovoltaic power generation data of each of a plurality of photovoltaic sites in a target area according to a preset time period, and generating a multi-site photovoltaic power generation data sequence.

[0051] In some embodiments, the electronic device can obtain actual power generation data from multiple photovoltaic sites over the past L time steps (i.e., a preset time period) to obtain a multi-site photovoltaic power generation data sequence. The dimension of the multi-site photovoltaic power generation data sequence is L×C, where C represents the number of photovoltaic sites. This is a multi-site photovoltaic power generation data sequence with a lookback window length of L: , where each time step t are all vectors of dimension C, and the i-th photovoltaic power station sequence with length L is represented as:

[0052] .

[0053] S12, performing multi-scale time processing on the multi-site photovoltaic power generation data sequence to obtain a multi-site multi-scale sequence.

[0054] For the multi-site photovoltaic power generation data series, the electronic device uses the average pooling operation to downsample the past observations into M scales, and a set of multi-scale time series representations corresponding to each photovoltaic site can be obtained:

[0055] ;

[0056] in, , , is the number of time steps at scale m, .

[0057] In the hierarchical representation structure of the multi-scale time series representation corresponding to each station, the lowest level sequence Maintaining the integrity of the original input sequence can capture the most subtle temporal changes and local features; as the level increases, the sequence is gradually downsampled and aggregated, and higher-level sequences can capture more macro-scale change patterns and long-term trends; finally, the multi-scale time series representation obtained from the above processing for each photovoltaic site is integrated to form a multi-site multi-scale sequence.

[0058] Multi-scale representation enables simultaneous modeling of dependencies across different time scales, helping to capture the hierarchical structure of time series. Furthermore, multi-scale representation provides a natural way to integrate information across different time scales, enhancing the model's ability to model time series features. Compared to traditional single-scale modeling methods, this multi-scale representation framework can more comprehensively characterize temporal dependency patterns in time series data, providing richer feature representations for subsequent forecasting tasks.

[0059] In other embodiments, after obtaining the multi-site photovoltaic power generation data sequence, the electronic device inputs the multi-site photovoltaic power generation data sequence into the constructed initial photovoltaic output prediction model, so as to perform multi-scale time processing on the multi-site photovoltaic power generation data sequence through the initial photovoltaic output prediction model to obtain a multi-site multi-scale sequence. Figure 2 According to the same embodiment as above, by downsampling the multi-site photovoltaic power generation data series through the target photovoltaic output prediction model, the multi-scale time series representation corresponding to each site can be obtained, and the multi-site multi-scale sequence can be obtained by combining the multi-scale time series representations corresponding to all sites.

[0060] Using multi-site power generation data (also known as multi-site photovoltaic power generation data series) as input, a downsampling strategy is used to divide the multi-site photovoltaic power generation data series into multiple time scales, including fine-scale series that retain the original granularity and multi-level coarse-scale series. These time series at different scales correspond to short-term fluctuations and long-term trends in the power generation process, providing a rich data foundation for subsequent multi-level feature learning.

[0061] S13: inputting the multi-site multi-scale sequence into a preset target photovoltaic output prediction model, so that the photovoltaic output prediction model outputs a prediction result corresponding to each scale in the multi-site multi-scale sequence.

[0062] In some embodiments, the electronic device can use the Transformer model as a photovoltaic output prediction model, obtain a target photovoltaic output prediction model through multi-site multi-scale sequence training, and use the target photovoltaic output prediction model to predict any subsequent photovoltaic site received to obtain the corresponding prediction result. Figure 2The target photovoltaic output prediction model proposed in this application includes downsampling, a variable-dimensional Transformer encoder, block embedding, a time-dimensional Transformer encoder, and nighttime anomaly mitigation. The Transformer encoder structure itself uses a standard multi-head self-attention and feedforward network combination (i.e., a vanilla Transformer block). The Transformer encoder's self-attention mechanism models the dependencies between downsampled multi-site photovoltaic power generation data sequences. The self-attention mechanism calculates the correlation weights between each variable and other variables, thereby capturing the complex relationships between variables. The feedforward neural network in the encoder further performs nonlinear transformations on features, enhancing the model's expressive power. Block embedding includes block, position, and value embedding. Block embedding divides each scaled sequence, after variable-dimensional processing, into small blocks of fixed length. Position embedding adds position information to each block, enabling the model to perceive the order of blocks in the sequence. Value embedding is implemented through a linear layer, encoding the data values ​​within each block and mapping the original data into a vector space more suitable for model processing. By adding a prediction layer (typically a fully connected layer) to the output of the time-dimension Transformer encoder, the encoded features are mapped to the prediction target space, outputting predicted values ​​for future time steps, such as future power values ​​in photovoltaic output forecasting. The target photovoltaic output forecasting model effectively processes multivariate time series data, capturing inter-variable and temporal dependencies while mitigating the impact of abnormal data, thereby improving forecast accuracy and reliability.

[0063] In an optional embodiment, inputting the multi-site multi-scale sequence into a preset target photovoltaic output prediction model so that the photovoltaic output prediction model outputs a prediction result corresponding to each scale in the multi-site multi-scale sequence includes:

[0064] Extracting inter-site dependency relationships based on each scale sequence in the multi-site multi-scale sequence;

[0065] Perform block embedding operations on each scale sequence after extracting inter-site dependencies;

[0066] Each time scale after the block embedding operation is passed through the encoder layer of the target photovoltaic output prediction model, and the prediction result corresponding to each scale is output.

[0067] (1) Extraction and processing of inter-site dependency relationships.

[0068] Because there are potential correlations between photovoltaic power plants driven by common external conditions and spatiotemporal characteristics, including relationships that exhibit a certain time lag. For example, adjacent photovoltaic sites may be affected by similar cloud cover patterns, and cloud cover patterns will propagate from one site to another over time, resulting in correlated fluctuations in solar irradiance. Factors such as geographical coordinates, altitude differences, prevailing wind direction, and local environmental conditions (such as humidity, aerosols, and temperature gradients) together form a complex network of interdependencies. This application explicitly models spatiotemporal and time-lagged relationships, which can more effectively capture the underlying dynamics of photovoltaic power output and may reduce the impact of noise and irrelevant changes. The electronic device inputs the multi-site multi-scale sequence into the target photovoltaic output prediction model, and extracts the dependency relationships for each photovoltaic site through the Transformer encoder of the target photovoltaic output prediction model.

[0069] First, for each scale sequence of each site, each scale sequence is first embedded into a token on the variable dimension, rather than a token on the time dimension across multiple variables. Then, these tokens are processed using multi-head self-attention in the Transformer encoder to interact with each other and are individually projected back to the original scale time steps of the subsequent layer. The formula is as follows:

[0070] ;

[0071] ;

[0072] ;

[0073] in, , Contains C dimensions The word embedding of Represents the multi-head self-attention operation of the variable dimension. Embedding operation and projection operations , are all based on MLP transformations.

[0074] The above method is used to extract the dependencies between sites. The sequences of each scale are mapped to the word scores on the corresponding variable dimension and then restored to their original time scale after interaction. The dependency extraction module processes the multiple sequences obtained by downsampling the original power generation sequence. The corresponding input sequence at each time scale is , Indicates the number of time steps at this scale, and C represents the number of sites. In the photovoltaic site dependency extraction module, the input is a two-dimensional sequence at this scale. , the output is a time series of the same size, which has integrated the collaborative relationship between PV sites.

[0075] Compared with the existing method of improving prediction performance by processing each channel independently, when the data exhibit weak multivariate correlation or high noise level, simply combining multiple channels may introduce additional noise and fail to fully utilize the relationship between variables. By explicitly modeling these spatiotemporal and time-lagged relationships, this application can more effectively capture the underlying dynamics of photovoltaic power output and may reduce the impact of noise and irrelevant changes.

[0076] At each time scale, the target PV output forecast model incorporates an Inter-Site Dependency Extraction (ISDE) module, using a Transformer encoder to interactively model multi-site PV power generation data sequences at different PV sites in the variable dimension. This ISDE effectively captures potential spatial correlations between sites and time lags caused by factors such as cloud movement and meteorological system evolution, enabling the model to fully integrate shared and complementary information from multiple sites.

[0077] After modeling cross-site dependencies, the model transforms time series at various scales into fixed-length time blocks through patching. Each time block is encoded using both value and position embeddings to form a standardized block-level input sequence. Subsequently, a block-level self-attention mechanism is applied to the temporal dimension based on a standard Transformer encoder to deeply characterize short-term patterns within blocks and long-term dependencies across blocks, effectively balancing short-term local perturbations with long-term stable trends.

[0078] (2) Block embedding processing.

[0079] Furthermore, after the inter-site dependency extraction process is completed, each scale sequence after the inter-site dependency extraction process can be subjected to block embedding. The target photovoltaic output forecasting model uses block-by-block representation to finely model the time dependency within each scale, thereby capturing short-term fluctuations and long-term trends at different resolutions. For each scale sequence, the target photovoltaic output forecasting model uses a one-dimensional convolution operation to divide it into smaller blocks, where each block contains a fixed number of consecutive time steps. The length of the block is denoted as P. is the number of blocks at each scale. The set of sequences at all scales after block division is ,in , is the matrix at the mth scale. The position embedding of the Transformer encoder is then used to add the position information of each block, and the value embedding implemented by the linear layer is used to encode the corresponding data value in each block. The block embedding process follows , The representation of Sum value embedding The result of the addition is recorded as a specific symbol and has the same shape as the original sequence matrix.

[0080] Specifically, the block embedding process can be expressed as:

[0081] ;

[0082] ;

[0083] Among them, position embedding Sum value embedding The result after addition is recorded as and Have the same shape.

[0084] (3) Block-level self-attention mechanism processing.

[0085] In photovoltaic power generation forecasting, capturing temporal relationships is crucial because environmental conditions change over time. After completing block embedding, for each time scale divided into smaller blocks, the target photovoltaic output forecast model uses a Transformer encoder composed of multiple attention blocks using a block-level self-attention mechanism. Each multi-head attention block also includes layer normalization and a feedforward network with residual connections. Each time scale is independently passed through its encoder layer and the corresponding prediction result is output. Specifically, the following formula is used:

[0086] ;

[0087] ;

[0088] ;

[0089] ;

[0090] in, represents the kth encoder layer, is the representation of the mth scale in the kth Transformer encoder layer, and Equivalent to , Represents the self-attention operation in the time dimension.

[0091] It should be noted that in the prediction stage, each scale is equipped with an independent prediction module to generate prediction results at the corresponding time scale.

[0092] This application proposes a Transformer-based multi-scale distributed photovoltaic power prediction model, also known as the target photovoltaic output prediction model. Through a multi-scale time processing module, it effectively captures the fine-grained short-term fluctuations and macro trend changes in the photovoltaic power generation process; in the design of the attention mechanism, the model adopts a block-level self-attention mechanism in the time dimension to model dynamic features at different time scales, thereby obtaining more comprehensive semantic information; at the same time, the self-attention mechanism is applied in the variable (feature) dimension to extract complex correlations across sites, thereby achieving more accurate prediction of the power generation power of distributed photovoltaic systems.

[0093] S14, fusing the prediction results of each scale to obtain a comprehensive prediction result of each photovoltaic site.

[0094] In the target PV output prediction model, predictions are generated jointly at multiple scales, and each scale has a unique contribution to the final output. Specifically, each scale has a dedicated predictor that processes the corresponding downsampled feature map to generate predictions. The prediction result of the mth scale can be expressed as:

[0095] ;

[0096] in, , is a linear layer. After obtaining the prediction results of all scales, they are integrated through linear combination to form a comprehensive prediction result, which combines the information of fine-grained and coarse-grained temporal patterns. Specifically, the integration uses a set of learnable parameters to weight the prediction results of each scale:

[0097] ;

[0098] in, is the comprehensive prediction result of T time steps for the ith photovoltaic site, is the weight corresponding to the prediction result of the mth scale.

[0099] It should be noted that this application uses the target photovoltaic output prediction model to individually predict the power generation data of each site in the future T time steps, rather than predicting all photovoltaic sites at the same time.

[0100] The outputs of all scales are fused through a set of learnable weighting coefficients to form the final integrated forecast value. This weighted fusion mechanism allows the model to dynamically balance fine-scale and coarse-scale contributions under different weather conditions and temporal characteristics, thereby achieving more adaptable integrated forecast performance.

[0101] In an optional embodiment, the method further comprises:

[0102] The following formula is used to predict abnormalities at night based on the comprehensive prediction results to obtain the final prediction result:

[0103] ;

[0104] in, is the final prediction result of the i-th photovoltaic site, is the comprehensive prediction result of the i-th photovoltaic site.

[0105] To further improve the reliability and stability of predictions, electronic devices can be equipped with a nighttime anomaly mitigation module. This module uses a simple ReLU function to effectively determine nighttime anomalies in the comprehensive prediction results obtained by the photovoltaic output prediction model. The formula is as follows:

[0106] ;

[0107] in, is the final forecast result for the ith PV site. By automatically setting any negative or unrealistic values ​​to zero at night, the need for manual intervention is reduced, making the entire process more efficient and improving the accuracy of the forecast.

[0108] Through the above optional implementation, the Nighttime Anomaly Mitigation (NAM) module is integrated into the model design. It uses a simple and effective ReLU activation function to automatically avoid unreasonable prediction values ​​at night, further improving the stability and consistency of the overall model in all-weather applications.

[0109] This application effectively integrates multi-scale features and spatial correlations through a series of systematic processes, including downsampling - inter-site interaction modeling - block embedding - block-level time series modeling - multi-scale fusion - anomaly correction, to form a complete modeling framework that adapts to the needs of distributed photovoltaic prediction, namely the photovoltaic output prediction model. By introducing multi-scale time processing, inter-site dependency modeling and block-level self-attention mechanism, the accuracy and stability of distributed photovoltaic power prediction are effectively improved without relying on high-cost external meteorological data. The target photovoltaic output prediction model can simultaneously characterize multi-scale time features and cross-site spatial correlations, enhance the adaptability to complex dynamic weather changes, and improve the consistency of all-weather predictions through the nighttime anomaly mitigation mechanism. It has good generalization capabilities and engineering application value.

[0110] Reference Figure 3 , which is a functional module diagram of a distributed photovoltaic output prediction device shown in an embodiment of the present application.

[0111] In some embodiments, the distributed photovoltaic output prediction device 30 may include a plurality of functional modules composed of computer program segments. The computer program of each program segment of the distributed photovoltaic output prediction device 30 may be stored in a memory of an electronic device and executed by at least one processor to perform (see Figure 1 The distributed photovoltaic output prediction function (described in the preceding text) can be divided into multiple functional modules based on the functions they perform. These functional modules may include: an acquisition module 301, a processing module 302, a prediction module 303, and a fusion module 304. A module, as referred to herein, refers to a series of computer program segments that can be executed by at least one processor and perform fixed functions, and is stored in a memory. In this embodiment, the functions of each module will be described in detail in subsequent embodiments.

[0112] The acquisition module 301 is configured to acquire photovoltaic power generation data of each of a plurality of photovoltaic sites within a target area according to a preset time period, and generate a multi-site photovoltaic power generation data sequence.

[0113] The processing module 302 is configured to perform multi-scale time processing on the multi-site photovoltaic power generation data sequence to obtain a multi-site multi-scale sequence.

[0114] The prediction module 303 is configured to input the multi-site multi-scale sequence into a preset target photovoltaic output prediction model, so that the photovoltaic output prediction model outputs a prediction result corresponding to each scale in the multi-site multi-scale sequence.

[0115] The fusion module 304 is configured to fuse the prediction results at each scale to obtain a comprehensive prediction result for each photovoltaic site.

[0116] The prediction module 303 is further configured to predict nighttime anomalies based on the comprehensive prediction results using the following formula to obtain a final prediction result:

[0117] ;

[0118] in, is the final prediction result of the i-th photovoltaic site, is the comprehensive prediction result of the i-th photovoltaic site.

[0119] The prediction module 303 is further specifically configured to: extract inter-site dependencies based on each scale sequence in the multi-site multi-scale sequence; perform a block embedding operation on each scale sequence after the inter-site dependency extraction; and pass each time scale after the block embedding operation through the encoder layer of the target photovoltaic output prediction model to output a prediction result corresponding to each scale.

[0120] The prediction module 303 is further specifically configured to: first embed each scale sequence into a word segment on a variable dimension; wherein the embedding operation is based on the MLP transformation, Map to , and we get a C-dimensional The embedding matrix of word scores , ; The word segments are processed using the multi-head self-attention mechanism in the Transformer encoder in the target photovoltaic output prediction model to perform interactions between word segments; wherein the multi-head self-attention operation is expressed as , x The word score after multi-head self-attention processing is projected back to the original scale time step of the subsequent layer. The projection operation is based on the transformation of MLP. Map to .

[0121] The prediction module 303 is further specifically configured to: divide each scale sequence after the inter-site dependency is extracted into blocks using a one-dimensional convolution operation through the target photovoltaic output prediction model; add the position information of each block using the position embedding of the Transformer encoder, and encode each block through the value embedding implemented by the linear layer.

[0122] The fusion module 304 is further specifically configured to linearly combine the prediction results of each scale using the following formula to obtain the comprehensive prediction result:

[0123] ;

[0124] in, is the comprehensive prediction result of T time steps for the ith photovoltaic site, is the prediction result of the mth scale, is the weight corresponding to the prediction result of the mth scale.

[0125] The processing module 302 is further specifically configured to: downsample the past observation values ​​of each photovoltaic site in the multi-site photovoltaic power generation data sequence into multiple scales using an average pooling operation to obtain a set of multi-scale time series representations corresponding to each photovoltaic site; and integrate the multi-scale time series representations of each photovoltaic site to obtain the multi-site multi-scale sequence.

[0126] It should be understood that the various variations and specific embodiments of the distributed photovoltaic output prediction method provided in the above embodiments are also applicable to the distributed photovoltaic output prediction device of this embodiment. Through the above detailed description of the distributed photovoltaic output prediction method, those skilled in the art can clearly know the implementation method of the distributed photovoltaic output prediction device in this embodiment. For the sake of brevity of the specification, it will not be described in detail here.

[0127] See Figure 4 FIG. 1 is a schematic diagram of the structure of an electronic device according to an embodiment of the present application. In a preferred embodiment of the present application, the electronic device 4 includes a memory 41 , at least one processor 42 and at least one communication bus 43 .

[0128] Those skilled in the art should understand that Figure 4 The structure of the electronic device shown does not constitute a limitation of the embodiments of the present application, and can be either a bus structure or a star structure. The electronic device 4 can also include more or less other hardware or software than shown in the figure, or a different component arrangement.

[0129] In some embodiments, the electronic device 4 is a device capable of automatically performing numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application-specific integrated circuits, programmable gate arrays, digital processors, and embedded devices. The electronic device 4 may also include user devices, which include but are not limited to any electronic product capable of human-computer interaction with a user via a keyboard, mouse, remote control, touchpad, or voice-controlled device, such as a personal computer, tablet computer, smartphone, digital camera, etc.

[0130] In the above embodiments provided in the present application, it should be understood that the disclosed methods, devices, computer-readable storage media, and electronic devices can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the modules is merely a logical function division. In actual implementation, there may be other division methods, such as multiple components or modules can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or components or modules, which can be electrical, mechanical or other forms.

[0131] The components described as separate parts may or may not be physically separate, and the components shown as components may or may not be physical modules, that is, they may be located in one place or distributed across multiple network modules. Some or all of these components may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0132] In addition, the functional modules in various embodiments of the present invention may be integrated into a single processing module, or each component may exist physically separately, or two or more modules may be integrated into a single module. The aforementioned integrated modules may be implemented in the form of hardware or software functional modules.

[0133] If the integrated module is implemented as a software functional module 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, or the portion 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 causing a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes various media that can store program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0134] It should be noted that for the aforementioned method embodiments, for ease of description, they are all expressed as a series of action combinations. However, those skilled in the art should be aware that the present invention is not limited by the order of the actions described, because according to the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.

[0135] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0136] The above is a specific description of the preferred implementation of the present invention, but the invention is not limited to the embodiments. Those skilled in the art can make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of this application.

Claims

1. A distributed photovoltaic output prediction method, characterized in that: The method comprises: Acquire photovoltaic power generation data of each photovoltaic site in a target area according to a preset time period, and generate a multi-site photovoltaic power generation data sequence; Performing multi-scale time processing on the multi-site photovoltaic power generation data sequence to obtain a multi-site multi-scale sequence; Inputting the multi-site multi-scale sequence into a preset target photovoltaic output prediction model so that the photovoltaic output prediction model outputs a prediction result corresponding to each scale in the multi-site multi-scale sequence; comprising: extracting inter-site dependencies based on each scale sequence in the multi-site multi-scale sequence; performing a block embedding operation on each scale sequence after the inter-site dependency extraction; passing each time scale after the block embedding operation through the encoder layer of the target photovoltaic output prediction model, and outputting a prediction result corresponding to each scale; The prediction results of each scale are integrated to obtain a comprehensive prediction result of each photovoltaic site; The extraction of inter-site dependency relationships based on each scale sequence in the multi-site multi-scale sequence includes: first embedding each scale sequence into a word segment on a variable dimension; wherein the embedding operation is based on the MLP transformation, Map to , and we get a C-dimensional The embedding matrix of word scores , ; The word segments are processed using the multi-head self-attention mechanism in the Transformer encoder in the target photovoltaic output prediction model to perform interactions between word segments; wherein the multi-head self-attention operation is expressed as , x The word score after multi-head self-attention processing is projected back to the original scale time step of the subsequent layer. The projection operation is based on the transformation of MLP. Map to .

2. The distributed photovoltaic output prediction method according to claim 1, characterized in that: The method further comprises: The following formula is used to predict abnormalities at night based on the comprehensive prediction results to obtain the final prediction result: ; in, is the final prediction result of the i-th photovoltaic site, is the comprehensive prediction result of the i-th photovoltaic site.

3. The distributed photovoltaic output prediction method according to claim 1, characterized in that: The block embedding operation for each scale sequence after the inter-site dependency extraction includes: Using the target photovoltaic output prediction model, a one-dimensional convolution operation is used to divide each scale sequence after the inter-site dependency is extracted into blocks; The position information of each block is added using the position embedding of the Transformer encoder, and each block is encoded using the value embedding implemented by the linear layer.

4. The distributed photovoltaic output prediction method according to claim 1, characterized in that: The fusion of the prediction results of each scale to obtain the comprehensive prediction result of each photovoltaic site includes: The prediction results of each scale are linearly combined using the following formula to obtain the comprehensive prediction result: ; in, is the comprehensive prediction result of T time steps for the ith photovoltaic site, is the prediction result of the mth scale, is the weight corresponding to the prediction result of the mth scale.

5. The distributed photovoltaic output prediction method according to claim 1, characterized in that: The performing multi-scale time processing on the multi-site photovoltaic power generation data sequence to obtain a multi-site multi-scale sequence includes: downsampling past observations of each photovoltaic site in the multi-site photovoltaic power generation data series into multiple scales using an average pooling operation to obtain a set of multi-scale time series representations corresponding to each photovoltaic site; The multi-scale time series representation of each photovoltaic site is integrated to obtain the multi-site multi-scale sequence.

6. A distributed photovoltaic output prediction device, characterized in that: The device comprises: An acquisition module is used to acquire photovoltaic power generation data of each photovoltaic site in a target area according to a preset time period, and generate a multi-site photovoltaic power generation data sequence; a processing module, configured to perform multi-scale time processing on the multi-site photovoltaic power generation data sequence to obtain a multi-site multi-scale sequence; A prediction module is configured to input the multi-site multi-scale sequence into a preset target photovoltaic output prediction model so that the photovoltaic output prediction model outputs a prediction result corresponding to each scale in the multi-site multi-scale sequence; the prediction module includes: extracting inter-site dependencies based on each scale sequence in the multi-site multi-scale sequence; performing a block embedding operation on each scale sequence after the inter-site dependency extraction; passing each time scale after the block embedding operation through the encoder layer of the target photovoltaic output prediction model, and outputting a prediction result corresponding to each scale; A fusion module, configured to fuse the prediction results of each scale to obtain a comprehensive prediction result of each photovoltaic site; The prediction module is also used to first embed each of the above scale sequences into word segments on the variable dimension; wherein the embedding operation is based on the MLP transformation, which transforms the dimension Map to , and we get a C-dimensional The embedding matrix of word scores , ; The word segments are processed using the multi-head self-attention mechanism in the Transformer encoder in the target photovoltaic output prediction model to perform interactions between word segments; wherein the multi-head self-attention operation is expressed as , x The word score after multi-head self-attention processing is projected back to the original scale time step of the subsequent layer. The projection operation is based on the transformation of MLP. Map to .

7. An electronic device, characterized in that: The method comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the distributed photovoltaic output prediction method according to any one of claims 1 to 5 are implemented.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the distributed photovoltaic output prediction method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Multi-scale hybrid photovoltaic power generation power prediction method and related equipment

    CN119670938A

  • Inception-BiLSTM-based offshore wind power prediction method

    CN120377222A

Cited By

  • Photovoltaic cluster power prediction method based on step-by-step spatial feature clustering and improved graph attention network

    CN121688847A