Photovoltaic power short-term probability prediction method and device based on multi-scale space-time attention and adaptive shape-preserving quantile calibration
By employing a multi-scale spatiotemporal attention and adaptive conformal quantile calibration method, the problems of multi-scale feature characterization and meteorological coupling modeling in photovoltaic power prediction are solved, achieving high accuracy and reliability in photovoltaic power prediction, which is applicable to dispatching decisions and risk perception in new power systems.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-29
- Publication Date
- 2026-04-07
AI Technical Summary
Existing photovoltaic power prediction methods have shortcomings in characterizing multi-scale time series features, modeling meteorological nonlinear coupling relationships, and predictive interval reliability. They are difficult to balance prediction accuracy, interval reliability, and engineering applicability, which limits their application value in new power systems.
A multi-scale spatiotemporal attention and adaptive conformal quantile calibration method is adopted. Multi-scale temporal features are extracted by dilated convolution branches, and the coupling relationship of meteorological variables is characterized by graph attention mechanism. The prediction interval is optimized by quantile regression and conformal quantile calibration, so as to realize multi-scale dynamic modeling of photovoltaic power and statistical consistency of prediction interval.
It improves the ability to characterize multi-scale features of photovoltaic power prediction, explicitly expresses meteorological nonlinear coupling relationships, enhances the model's adaptability under different meteorological conditions, and ensures the reliability and compactness of the prediction interval through adaptive conformal quantile calibration, providing stable and reliable technical support.
Smart Images

Figure CN121808341A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to photovoltaic power prediction technology, and in particular to a photovoltaic power short-term probability prediction method and device based on multi-scale spatiotemporal attention and adaptive conformal sub-quantile calibration. BACKGROUND
[0002] As a form of power generation with solar radiation as the energy source, the output power of photovoltaic power generation is jointly affected by many meteorological factors such as solar irradiance, cloud cover changes, atmospheric transparency, environmental temperature and wind speed, and presents obvious randomness, intermittency and strong volatility characteristics in the time scale, especially in the short time scale. With the increase of photovoltaic power generation installed capacity and access capacity, the uncertainty of photovoltaic power output brings higher requirements for power balance, reserve capacity configuration, peak regulation and frequency regulation operation and system safety and stability of the power system. Therefore, the research on photovoltaic power prediction and uncertainty quantification has important engineering significance for improving the reliability of power system operation.
[0003] At present, photovoltaic power prediction technology is gradually developing from traditional deterministic prediction to probabilistic prediction. The deterministic prediction method usually only gives a single point power value at a certain time in the future, and it is difficult to describe the distribution characteristics and potential operation risks of prediction errors, and it is difficult to meet the actual needs of power system for reserve capacity configuration, risk assessment and fine scheduling under the condition of high proportion of new energy grid connection. The probabilistic prediction can quantitatively express the uncertainty of photovoltaic output by constructing the prediction interval or probability distribution form, which can provide more risk-aware decision basis for dispatching departments. However, under complex and variable actual meteorological conditions, the existing probabilistic prediction methods still have problems such as insufficient ability to describe multi-scale time sequence characteristics, insufficient modeling of nonlinear coupling relationship between meteorological variables, limited model stability and generalization ability under different weather conditions, and difficulty in meeting the target confidence level of prediction interval coverage rate under limited sample conditions, which leads to the difficulty in balancing reliability and compactness of prediction interval, and restricts the engineering application effect in the operation and dispatching of new type power system.
[0004] Under the background of accelerating the construction of new power systems and high-proportion grid-connected operation of new energy, photovoltaic power output presents significant randomness, intermittency and strong non-stationary characteristics, which puts forward higher requirements for safe and stable operation and dispatching decision of power systems. Although the existing photovoltaic power probability prediction method has realized the description of uncertainty to a certain extent, it is still difficult to simultaneously consider prediction accuracy, interval reliability and engineering applicability under the influence of complex weather conditions and multi-time scale coupling, mainly in the following aspects: first, the existing method is insufficient in describing the multi-scale time sequence dynamic characteristics of photovoltaic power, and it is difficult to effectively represent the high-frequency cloud disturbance and low-frequency diurnal evolution trend at the same time; second, there is a complex nonlinear coupling relationship between weather variables, and the traditional feature modeling method is difficult to accurately describe the synergistic influence mechanism of different weather factors on photovoltaic output; third, under different weather conditions and load operation conditions, the stability and generalization ability of the probability prediction model are still limited, and the prediction performance is easy to fluctuate significantly with the change of weather distribution; fourth, affected by the limited training samples and data distribution instability, the coverage rate of the prediction interval is often difficult to meet the target confidence level, resulting in difficulty in balancing the interval reliability and interval compactness, which restricts the application value of probability prediction results in actual dispatching.
[0005] Therefore, it is urgent to propose a new type of photovoltaic power short-term probability prediction method which can consider multi-scale time dynamic modeling, weather nonlinear correlation description and prediction interval statistical consistency guarantee, so as to solve the problems of existing technology in multi-scale time sequence expression deficiency, weather coupling modeling roughness and difficulty in stable guarantee of prediction interval reliability, thereby providing more reliable technical support for safe and stable operation of new power system and high proportion of new energy consumption. SUMMARY
[0006] In view of the problems existing in the prior art, the purpose of the present application is to provide a new type of photovoltaic power short-term probability prediction method and equipment which can consider multi-scale time dynamic modeling, weather nonlinear correlation description and prediction interval statistical consistency guarantee.
[0007] In order to achieve the above-mentioned purpose of the application, the present application provides the following technical scheme:
[0008] A photovoltaic power short-term probability prediction method based on multi-scale spatio-temporal attention and adaptive shape-preserving subinterval calibration, comprising the following steps:
[0009] (1) preprocessing the historical weather time series data and the historical photovoltaic power time series data before the current time, and merging to obtain photovoltaic prediction time series data at each time;
[0010] (2) input the photovoltaic prediction time series data at different times into multiple dilated convolution branches with different hole rates respectively, obtain multi-scale time series features, and adopt a self-attention mechanism to perform adaptive global weighted aggregation on the multi-scale time series features at different times to obtain implicit multi-scale time series features representing time characteristics;
[0011] (3) taking each meteorological variable in the current time's meteorological data as a node, constructing a meteorological variable graph, and adopting a graph attention mechanism to perform weighted coupling on each meteorological variable to obtain meteorological spatial coupling features representing spatial characteristics;
[0012] (4) performing weighted fusion on the implicit multi-scale time series features and the meteorological spatial coupling features to obtain collaborative fusion features;
[0013] (5) determining a quantile regression prediction model according to the collaborative fusion features, wherein the quantile regression prediction model is a photovoltaic power distribution function at each confidence level predicted based on the collaborative fusion features;
[0014] (6) determining a photovoltaic power prediction interval at the current time according to the quantile regression prediction model, and performing initial calibration on the photovoltaic power prediction interval according to a target confidence level based on a shape-preserving quantile idea;
[0015] (7) performing scaling on the initial calibrated photovoltaic power prediction interval by using a scaling factor to obtain a final photovoltaic power prediction interval for output.
[0016] A computer program product includes a computer program, which, when executed by a processor, implements the above method.
[0017] A computer device includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor executes the computer program to implement the above method.
[0018] Compared with the prior art, the present application has the beneficial effects that: the present application implicitly simulates multi-resolution observation angles in the original time domain through multi-branch different cavity rate expansion convolution, and realizes end-to-end collaborative modeling of local cloud disturbance and long-term day-night cycle characteristics of photovoltaic power sequence by combining global receptive field of self-attention mechanism, avoiding the problems of complex process, parameter sensitivity and high engineering maintenance cost of traditional methods based on modal decomposition; by constructing a meteorological variable graph structure and introducing a graph attention mechanism, the nonlinear coupling relationship between meteorological elements such as irradiance, temperature, humidity and wind speed is explicitly described, overcoming the defects of traditional methods that only simply splice meteorological variables without considering the physical correlation mechanism; further, by introducing a weather condition adaptive spatio-temporal feature fusion mechanism, the time feature and the space feature can dynamically adjust the weight distribution under different meteorological conditions, effectively improving the synchronous adaptability of the model to sunny stable conditions and cloudy and sudden conditions; at the probability prediction level, the quantile regression is used to directly output the prediction interval at multiple confidence levels, and on this basis, combined with the conformal quantile calibration and the golden section adaptive optimization strategy, the prediction interval is as compact as possible while ensuring the statistical consistency of the target coverage, solving the problems that the traditional deterministic prediction cannot quantify uncertainty and the interval of some probability prediction methods is too wide and the reliability is insufficient. Therefore, the present application has obvious advantages in multi-scale feature description depth, meteorological mechanism expression ability, complex weather adaptability, probability prediction reliability and engineering practicability, and can provide stable and reliable technical support for photovoltaic output scheduling decision, reserve capacity configuration and risk perception operation in new power systems. BRIEF DESCRIPTION OF DRAWINGS
[0019] Figure 1 is a flowchart of a photovoltaic power short-term probability prediction method based on multi-scale spatio-temporal attention and adaptive conformal quantile calibration provided by an embodiment of the present application;
[0020] Figure 2 is a comparison result of the prediction interval of the method of the present application and the measured photovoltaic power;
[0021] Figure 3 is a structural diagram of a computer device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0022] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application.
[0023] Embodiment one
[0024] An embodiment of the present application provides a photovoltaic power short-term probability prediction method based on multi-scale spatio-temporal attention and adaptive conformal quantile calibration, as shown in Figure 1 , comprising the following steps:
[0025] (1) Preprocess the historical meteorological time series data and the historical photovoltaic power time series data before the current time, and merge to obtain photovoltaic prediction time series data at each time.
[0026] Step (1) specifically comprises:
[0027] (1.1) Obtain the historical meteorological time series data and the historical photovoltaic power time series data before the current time, and perform normalization processing on the data;
[0028] Photovoltaic prediction involves multi-source heterogeneous data. Meteorological data (such as solar irradiance, ambient temperature, relative humidity, wind speed, cloud cover, etc.) and photovoltaic power data differ significantly in dimension, numerical range and statistical distribution. If directly input into the model, it may lead to unbalanced feature supply, affecting the model convergence direction and prediction accuracy. The present application first normalizes the original data to eliminate the influence of dimension, making features with different physical meanings comparable, improving the integrity and continuity of the data, and reducing the disturbance of meteorological fluctuations on the stability of modeling. The normalization method is as follows:
[0029]
[0030] In the formula, is the normalized data, is the original data, is the minimum value in the original data, is the maximum value in the original data.
[0031] (1.2) From the normalized historical meteorological time series data and the normalized historical photovoltaic power time series data, collect meteorological data and photovoltaic power data within a preset time window before the current time, combine the meteorological data and photovoltaic power data at each time to obtain photovoltaic prediction time series data at each time.
[0032] Specifically, the length of the preset time window is L, and the photovoltaic prediction time series data at each time is is the normalized photovoltaic power and meteorological data.
[0033] (2) Input photovoltaic prediction time series data at different times into multiple dilated convolution branches with different hole rates to obtain multi-scale time series features, and use a self-attention mechanism to adaptively globally weight and aggregate the multi-scale time series features at different times to obtain implicit multi-scale time series features representing time characteristics.
[0034] In view of the complex time sequence characteristics that the photovoltaic power sequence has both local severe fluctuations and long-term periodic evolution, a data-driven implicit multi-scale feature decoupling mechanism is provided. Unlike traditional modeling strategies that rely on explicit signal processing and time-frequency separation such as VMD, CEEMDAN and wavelet transform, this step directly simulates multi-resolution observation angles from the original time sequence by constructing multiple branches of dilated convolution branches with different hole rates, realizes end-to-end extraction of multi-level dynamic features, and further introduces a global receptive field of the self-attention mechanism to adaptively weight the feature contribution of different time positions, thereby realizing the collaborative modeling of the local mutation characteristics and the long-term periodic characteristics of the photovoltaic power sequence. Specifically, it comprises:
[0035] (2.1) input the photovoltaic prediction time sequence data at different times into multiple parallel dilated convolution branches with different hole rates, and output a scale of time sequence features from each dilated convolution branch:
[0036]
[0037] In the formula, represents the time sequence feature output by the s th dilated convolution branch at the time t, t represents the current time, L represents the preset time window size, is a nonlinear activation function, , is the parameter obtained by training in the s th dilated convolution branch, is the length of the convolution kernel, is the hole rate of the s th dilated convolution branch, and by setting an increasing hole rate sequence , the implicit decoupling modeling of dynamic features of different time scales such as short-term severe disturbance, medium-term meteorological change and long-term diurnal evolution can be realized without any explicit signal decomposition. S is the number of dilated convolution branches. represents the photovoltaic prediction input sample located in the preset time window and having a time index , wherein the input sample includes the photovoltaic power historical data corresponding to the time and the meteorological prediction feature vector time-aligned therewith.
[0038] (2.2) the multi-scale time sequence features output by each dilated convolution branch are spliced in the channel dimension to obtain the multi-scale joint time sequence feature representation at the time t:
[0039]
[0040] (2.3) For the multi-scale joint temporal feature representation of each time point within the preset window, a self-attention mechanism is used to calculate the attention weights in order to model the long-term dependency relationship between different historical time points and the current prediction:
[0041] , , , ,
[0042] In the formula, , , They represent The query matrix, key matrix, and value matrix at each time step. , , These are the weight parameters obtained during training; for Attention weight at any given moment; Represents the query matrix AND key matrix The feature dimension is used to scale the inner product result to avoid the attention weight distribution becoming unstable due to the increase in feature dimension.
[0043] (2.4) Using attention weights, the multi-scale joint temporal feature representations of the features at each time step are globally weighted and aggregated to obtain the implicit multi-scale temporal features at the current time step:
[0044]
[0045] In the formula, This represents the implicit multi-scale temporal characteristics at the current moment.
[0046] This feature comprehensively characterizes the dynamic evolution information of photovoltaic power sequences across multiple time scales. It can not only respond quickly to high-frequency local abrupt changes caused by cloud-induced disturbances, but also form a stable characterization of diurnal cycles and gradual meteorological changes, providing a unified temporal feature basis for subsequent coupled meteorological variable modeling and probabilistic prediction.
[0047] (3) Take each meteorological variable in the meteorological data at the current moment as a node, construct a meteorological variable graph, and use the graph attention mechanism to perform weighted coupling on each meteorological variable to obtain the meteorological spatial coupling feature that represents the spatial characteristics.
[0048] To avoid the problem of insufficient expression of meteorological physical mechanism caused by inputting meteorological elements as independent exogenous variables into the model, the meteorological information is re-modeled from the perspective of "correlation structure between variables", and a meteorological variable coupling representation method based on graph attention mechanism is introduced to realize the explicit expression of the influence mechanism of meteorological driving factors on photovoltaic output.
[0049] (3.1) Each meteorological variable in the current time meteorological data is taken as a node to construct a meteorological variable graph, and the initial embedding vector of the variable is obtained by linear mapping of each node:
[0050]
[0051] In the formula, , respectively represent the initial embedding vector, the observation value of node i at t time, represent the mapping matrix trained, and t is the current time;
[0052] (3.2) Calculate the attention score of any two nodes:
[0053]
[0054]
[0055] In the formula, , respectively represent the normalized attention score, the non-normalized attention score of node i and j at t time, represent the non-normalized attention score of node i and k at t time, represent the adjacent node set having a connection relationship with node i; represent the activation function, represent the parameter matrix trained, represent the initial embedding vector of node j at t time, represent splicing, represent the attention weight vector in the graph attention mechanism, which is used to jointly weight the two meteorological variable node features after linear transformation to depict the correlation strength between different meteorological variables;
[0056] (3.3) According to the attention score, the adjacent nodes of each node are weighted to obtain the updated embedding vector of the node:
[0057]
[0058] represent the updated embedding vector of node i at t time, represent the softmax function, denotes the parameter matrix trained by the training process.
[0059] (3.4) Pooling operation is performed on the updated embedding vectors of all nodes to obtain the meteorological space coupling feature at time t :
[0060]
[0061] wherein, denotes the pooling operation, and M denotes the number of nodes. The comprehensive driving effect of multiple meteorological factors on the change of photovoltaic power is described at the variable correlation level, providing a structured meteorological information basis for subsequent spatiotemporal collaborative fusion.
[0062] (4) The implicit multi-scale time series feature and the meteorological space coupling feature are weighted and fused to obtain the collaborative fusion feature.
[0063] On the basis of the implicit multi-scale time series feature and the meteorological space coupling feature, this step further constructs a weather condition adaptive spatiotemporal feature collaborative fusion mechanism to overcome the problem that the traditional fixed weight fusion method is difficult to balance local disturbance and overall trend under different meteorological conditions. Specifically, it includes:
[0064] (4.1) The implicit multi-scale time series feature and the meteorological space coupling feature are jointly mapped to obtain a joint feature vector , denotes splicing;
[0065] (4.2) The joint feature vector is nonlinearly mapped to obtain an implicit working condition vector reflecting the current weather state :
[0066]
[0067] wherein, denotes the function, , denotes the parameter matrix trained by the training process.
[0068] (4.3) An adaptive gating weight is constructed according to the implicit working condition vector :
[0069]
[0070] wherein, denotes the softmax function, , denotes the parameter matrix trained by the training process.
[0071] (4.4) implicitly multi-scale time-series features and meteorological space coupling features are weightedly fused, so as to realize dynamic weighted fusion of time information and space information under different weather conditions, and obtain collaborative fusion features :
[0072]
[0073] In the formula, represents an element-by-element multiplication operation, which is used for dimension-by-dimension self-adaptive adjustment of the time-series features and the meteorological coupling features under different meteorological working conditions, so as to enhance the representation ability of the fusion features to photovoltaic power fluctuations.
[0074] (5) determining a quantile regression prediction model according to the collaborative fusion features.
[0075] The quantile regression prediction model is a conditional distribution function of photovoltaic power under each confidence level with the collaborative fusion features as a condition. Specifically,
[0076]
[0077] In the formula, represents photovoltaic predicted power under a confidence level , , represents a parameter obtained by training, represents the collaborative fusion features.
[0078] Thus, the photovoltaic power conditional distribution representation under multiple confidence levels is obtained in a single model, which lays a foundation for subsequent prediction interval calibration based on statistical consistency.
[0079] (6) determining a photovoltaic power prediction interval at the current time according to the quantile regression prediction model, and performing initial calibration on the photovoltaic power prediction interval according to a target confidence level based on a conformal quantile idea.
[0080] In order to make the prediction interval meet the target confidence level in a statistical sense, a non-consistency measure of conformal quantile calibration is introduced on an independent calibration set in this step, and then calibration is performed. Specifically, it includes:
[0081] (6.1) using the quantile regression prediction model to calculate photovoltaic predicted power , of each sample n under the maximum confidence level L and the minimum confidence level U in a preset calibration set:
[0082] (6.2) according to the photovoltaic predicted power , Calculate the non-consistency score of each sample :
[0083]
[0084] In the formula, Pn represents the true photovoltaic power of sample n;
[0085] (6.3) Sort the non-consistency scores of all samples from small to large to obtain , and obtain the target confidence level The corresponding index value , Pn represents the index value of the sample with the highest non-consistency score;
[0086] (6.4) Obtain the index value The corresponding non-consistency score As the calibration offset , the photovoltaic power prediction interval of the current time output by the quantile regression prediction model under the maximum confidence level L and the minimum confidence level U , Calibration, to obtain the initial calibrated photovoltaic power prediction interval:
[0087]
[0088] Pn represents the initial calibrated photovoltaic power prediction interval.
[0089] This step ensures that the interval coverage rate on the calibration set is not less than the target confidence level , which belongs to a statistically consistent calibration method with theoretical guarantee.
[0090] (7) Scale the initial calibrated photovoltaic power prediction interval using a scaling factor to obtain the final photovoltaic power prediction interval for output.
[0091] On the basis of preliminary calibration, this step further introduces a scaling factor to automatically compress the prediction interval width while ensuring coverage. Specifically, it includes:
[0092] (7.1) Scale the initial calibrated photovoltaic power prediction interval using different scaling factors v to obtain the scaled photovoltaic power prediction interval:
[0093]
[0094] (7.2) Calculate the interval coverage rate PICP and the normalized interval average width PINAW under different scaling factors v on the preset calibration set:
[0095]
[0096]
[0097] wherein, is an indicator function, is the sample power range (max-min), and a comprehensive optimization objective is constructed, represents an independent calibration sample set divided from the historical photovoltaic power data, the set does not participate in model parameter training, and is only used for prediction interval coverage consistency evaluation and scaling factor optimization;
[0098] (7.3) constructing an objective function , and solving to obtain an optimal scaling factor Specifically, a golden section method is used for one-dimensional search of v in a given search interval , left and right endpoints are iteratively updated, until the interval length is less than a preset precision or the iteration number reaches an upper limit, and the optimal scaling factor is obtained:
[0099]
[0100] (7.4) scaling the initial calibrated photovoltaic power prediction interval using the optimal scaling factor , and the final initial calibrated photovoltaic power prediction interval is .
[0101] and according to actual scheduling requirements, multiple prediction intervals at different confidence levels are provided, which provides a quantitative basis for backup capacity configuration, power balance constraints and risk-aware operation strategies.
[0102] To verify the effectiveness of the short-term probabilistic photovoltaic power prediction method proposed in the present application, simulation experiments are performed using actual operation data of a 40MW grid-connected photovoltaic power station in northern China. The data is from the SCADA system of the power station and the synchronous meteorological observation system, with a time resolution of 15 minutes, meeting the needs of ultra-short-term scheduling prediction. The data includes photovoltaic active power and various meteorological elements such as solar irradiance, environmental temperature, relative humidity, wind speed, wind direction, and cloud cover, which can fully reflect the dynamic change characteristics of photovoltaic output under different weather conditions. The experimental data covers multiple consecutive months, including sunny, cloudy and disturbed weather and other typical operating scenarios. Before the experiment, the original power data and meteorological data are normalized according to the method described in step 1 of the present application, and supervised learning samples are constructed based on a sliding time window.
[0103] In the feature modeling stage, the time series encoding module combined with implicit multi-scale dilated convolution and self-attention is constructed according to step 2 to perform end-to-end implicit multi-scale modeling on the cloud-induced high-frequency disturbance and diurnal low-frequency variation characteristics in the photovoltaic power sequence; the weather variable graph attention model is constructed according to step 3 to dynamically learn the nonlinear coupling relationship between the irradiance, temperature, humidity, wind speed and other meteorological elements; then the weather adaptive feature fusion mechanism is introduced according to step 4 to dynamically weight the time features and spatial features according to the implicit weather state, and output the photovoltaic power probability prediction results at multiple quantile levels.
[0104] After obtaining the initial quantile prediction results, the prediction interval is adaptively calibrated according to steps 5 and 6. By calculating the inconsistency score on the independent calibration set and introducing the golden section search to optimize the interval scaling factor, the prediction interval can meet the target confidence level coverage constraint while maintaining the interval compactness as much as possible. Finally, the photovoltaic power prediction interval at 80%, 85%, 90% and 95% confidence levels is output.
[0105] To verify the superiority of the method, a comparison test is conducted between the method and typical probability prediction models such as Quantile-SVR, Quantile-GRU, Quantile-LSTM and Quantile-Transformer. Each model is trained and tested under the same training set and test set conditions, and the continuous ranking probability score (CRPS), prediction interval coverage (PICP) and prediction interval normalized average width (PINAW) are used as evaluation indicators. The probability prediction performance index statistical results of each model at a 90% confidence level are shown in Table 1.
[0106] Table 1 Comparison of probability prediction indicators of each model at a 90% prediction interval Model CRPS PICP 90 ]]> PINAW 90 ]]> Quantile-SVR 0.4758 0.7242 0.0064 Quantile-GRU 0.0908 0.8181 0.0053 Quantile-LSTM 0.0995 0.7572 0.0044 Quantile-Transformer 0.0954 0.8241 0.0041 Inventive method 0.0400 0.8140 0.3116
[0107] As can be seen from Table 1, without calibration, the method achieves the minimum value of 0.0400 in the CRPS indicator, indicating that it has the best overall fitting ability for the photovoltaic power probability distribution; at the same time, it maintains a good balance between the prediction interval coverage and the interval width, indicating that the constructed spatiotemporal collaborative modeling structure can effectively represent the photovoltaic output uncertainty.
[0108] On this basis, the prediction interval of each model is further adaptively calibrated, and the probability prediction performance indicators after calibration are shown in Table 2.
[0109] As can be seen from Table 2, after adaptive conformal quantile calibration, the coverage rates of the prediction intervals of each model are significantly close to the target confidence level of 90%. Among them, the method has a PICP of 0.9010, which is closest to the target confidence level, and the PINAW of 0.0820, which is the narrowest among all models.90 Under the premise of = 0.9053, the narrow prediction interval width is still maintained, and the reliability and compactness comprehensive performance is better than that of the Quantile-SVR method. Compared with other deep learning comparison models, the method of the application has better comprehensive performance in probability distribution modeling ability, interval coverage reliability and interval compactness.
[0110] Table 2 Comparison of probability prediction indicators of each model after calibration under 90% prediction interval Model CRPS PICP 90 ]]> PINAW 90 ]]> Quantile-SVR 0.4484 0.8733 0.5331 Quantile-GRU 0.0887 0.9221 0.3039 Quantile-LSTM 0.0902 0.9157 0.2610 Quantile-Transformer 0.0932 0.9130 0.2369 Inventive method 0.0453 0.9053 0.3870
[0111] At the same time, Figure 2 shows the comparison results of the prediction interval and the actual power of the method of the application. It can be seen that the prediction interval covers reasonably as a whole, and is consistent with the actual power change trend. When the power level changes rapidly, the prediction interval can be adjusted accordingly, which reflects the adaptive representation ability to the uncertainty change; when the power change is relatively flat, the interval width tends to converge, which shows that the model can keep the compactness of the prediction result while ensuring the reliability. The results fully show that the application has the advantages of stability and interpretability in engineering application.
[0112] From the above experimental results, it can be seen that the short-term probabilistic prediction method of photovoltaic power proposed by the application based on implicit multi-scale feature decoupling, meteorological variable graph attention modeling, weather adaptive feature fusion and adaptive shape-preserving quantile calibration can stably output prediction intervals that meet the target confidence level requirement under different meteorological conditions, and is significantly better than existing comparison models in prediction accuracy and uncertainty reliability, and has good engineering application value.
[0113] Example two
[0114] The embodiment of the present application also provides a computer program product, such as an app on a mobile phone, a tablet computer, an installation program on a computer, etc., which comprises computer programs / instructions, and the computer programs / instructions are executed by a processor to implement the method in the embodiment one. The code for executing the computer executable program of the present application can be written in one or more programming languages or combinations thereof, including object oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" language or similar programming languages. The program code can be executed entirely on a user computer, partially on a user computer, as an independent software package, partially on a user computer and partially on a remote computer, or entirely on a remote computer or server. In the case involving a remote computer, the remote computer can be connected to the user computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, through the Internet by using an Internet service provider).
[0115] Embodiment three
[0116] Figure 3 is a structural schematic diagram of a computer device provided by the embodiment of the present application, and the embodiment of the present application provides services for the implementation of the method in the above embodiment one of the present application. As shown in the figure, the device can comprise a memory 301 storing computer executable programs; a processor 302 coupled with the memory 301; the processor 302 invokes the computer executable programs stored in the memory 301, and is used for executing the steps in the method described in the embodiment one. Figure 3
[0117] The memory 301 can comprise a computer system readable medium in the form of volatile memory, such as a random access memory (RAM) and / or a cache memory. The device can further comprise other removable / non removable, volatile / non volatile computer system storage media. For example, the memory 301 can be used to read and write to a non removable, non volatile magnetic media, commonly known as a "hard disk drive". Programs / utilities with a set of (at least one) program modules can be stored in, for example, the memory 301, and such program modules include but are not limited to an operating system, one or more application programs, other program modules, and program data, each of which or some combination thereof can include the implementation of a network environment. The computer executable programs of the program modules generally perform the functions and / or methods in the embodiments described in the present application.
[0118] The processor 302 performs various function applications and data processing by running the programs stored in the memory 301, such as implementing the method provided by the embodiment one of the present application.
[0119] The code of a computer program can be written in one or more programming languages, including object oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as the "C" programming language or similar programming languages.
[0120] It should be understood that the above embodiments and the description in the specification are only the principles, main features and advantages of the present application, and various changes and improvements can be made to the present application without departing from the spirit and scope of the present application, and these changes and improvements all fall within the protection scope of the present application.
Claims
1. A short-term probabilistic prediction method for photovoltaic power based on multi-scale spatiotemporal attention and adaptive conformal quantile calibration, characterized in that, Includes the following steps: (1) Preprocess the historical meteorological time series data and historical photovoltaic power time series data before the current time and merge them to obtain the photovoltaic prediction time series data for each time. (2) The photovoltaic prediction time series data at different times are input into multiple dilated convolution branches with different hole rates to obtain multi-scale time series features. The self-attention mechanism is used to adaptively global weighted aggregate the multi-scale time series features at different times to obtain implicit multi-scale time series features that characterize time characteristics. (3) Take each meteorological variable in the meteorological data at the current moment as a node, construct a meteorological variable graph, and use the graph attention mechanism to perform weighted coupling on each meteorological variable to obtain the meteorological spatial coupling characteristics that characterize the spatial characteristics; (4) The implicit multi-scale temporal features and meteorological spatial coupling features are weighted and fused to obtain the synergistic fused features; (5) Determine the quantile regression prediction model based on the synergistic integration characteristics, wherein the quantile regression prediction model is the photovoltaic power distribution function at each confidence level for the synergistic integration characteristics prediction; (6) Determine the photovoltaic power prediction interval at the current moment based on the quantile regression prediction model, and perform initial calibration of the photovoltaic power prediction interval according to the target confidence level based on the shape-preserving quantile idea; (7) The photovoltaic power prediction range after initial calibration is scaled by a scaling factor to obtain the final photovoltaic power prediction range for output.
2. The photovoltaic power short-term probabilistic prediction method based on multi-scale spatiotemporal attention and adaptive conformal quantile calibration according to claim 1, characterized in that, Step (1) specifically includes: (1.1) Obtain historical meteorological time series data and historical photovoltaic power time series data prior to the current moment, and normalize the data; (1.2) Collect meteorological data and photovoltaic power data within a preset time window before the current time from the normalized historical meteorological time series data and historical photovoltaic power time series data, and merge the meteorological data and photovoltaic power data at each time to obtain the photovoltaic prediction time series data at each time.
3. The photovoltaic power short-term probabilistic prediction method based on multi-scale spatiotemporal attention and adaptive conformal quantile calibration according to claim 1, characterized in that, Step (2) specifically includes: (2.1) Input the photovoltaic prediction time series data at different times into multiple parallel dilated convolution branches with different hole ratios, and output a time series feature of one scale from each dilated convolution branch: , In the formula, express The temporal feature output by the s-th dilated convolution branch at time t represents the current time, and L represents the preset time window size. It is a non-linear activation function. , The parameters obtained through training are for the s-th dilated convolutional branch. The kernel length is 1. Let S be the dilatation rate of the s-th dilated convolution branch, and let S be the number of dilated convolution branches. This indicates that it is within a preset time window and the time index is... Photovoltaic forecast time series data; (2.2) The multi-scale temporal features output by each dilated convolution branch are concatenated along the channel dimension to obtain... Multi-scale joint temporal feature representation at time points : , (2.3) For the multi-scale joint temporal feature representation at each time point within the preset window, a self-attention mechanism is used to calculate the attention weights: , , , , In the formula, , , They represent The query matrix, key matrix, and value matrix at each time step. , , These are the weight parameters obtained during training; for Attention weights at each moment; Representing the query matrix AND key matrix Feature dimensions; (2.4) Using attention weights, the multi-scale joint temporal feature representations of the features at each time step are globally weighted and aggregated to obtain the implicit multi-scale temporal features at the current time step: , In the formula, This represents the implicit multi-scale temporal characteristics at the current moment.
4. The photovoltaic power short-term probabilistic prediction method based on multi-scale spatiotemporal attention and adaptive conformal quantile calibration according to claim 1, characterized in that, Step (3) specifically includes: (3.1) Construct a meteorological variable graph by treating each meteorological variable in the current meteorological data as a node, and obtain the initial embedding vector of the variable by linear mapping of each node: , In the formula, , Let represent the initial embedding vector and the observed value of node i at time t, respectively. This represents the mapping matrix obtained through training, where t is the current time step. (3.2) Calculate the attention score for any two nodes: , , In the formula, , Let i and j represent the normalized attention score and the non-normalized attention score at time t, respectively. This represents the nonnormalized attention scores of nodes i and k at time t. Represents the set of adjacent nodes that are connected to node i; This represents the activation function. This represents the parameter matrix obtained during training. Let represent the initial embedding vector of node j at time t. Indicates splicing, This represents the attention weight vector in the graph attention mechanism; (3.3) For each node, weight the neighboring nodes according to the attention score to obtain the updated embedding vector of that node: , This represents the updated embedding vector of node i at time t. This represents the softmax function. This represents the parameter matrix obtained during training; (3.4) Perform pooling operation on the updated embedding vectors of all nodes to obtain the meteorological spatial coupling features at time t. : , In the formula, This indicates pooling operations, and M represents the number of nodes.
5. The photovoltaic power short-term probabilistic prediction method based on multi-scale spatiotemporal attention and adaptive conformal quantile calibration according to claim 1, characterized in that, Step (4) specifically includes: (4.1) Implicit multi-scale temporal features and meteorological spatial coupling characteristics Perform joint mapping to obtain joint feature vectors. , Indicates splicing; (4.2) Joint feature vector Nonlinear mapping yields an implicit working condition vector reflecting the current weather conditions. : , In the formula, express function, , This represents the parameter matrix obtained during training; (4.3) Based on the implicit working condition vector Constructing adaptive gating weights : , In the formula, This represents the softmax function. , This represents the parameter matrix obtained during training; (4.4) Implicit multi-scale temporal features and meteorological spatial coupling characteristics Weighted fusion is performed to obtain synergistic fusion characteristics. : , In the formula, This indicates element-wise multiplication.
6. The photovoltaic power short-term probabilistic prediction method based on multi-scale spatiotemporal attention and adaptive conformal quantile calibration according to claim 1, characterized in that, The quantile regression prediction model mentioned in step (5) is specifically as follows: , In the formula, Indicates at confidence level The predicted photovoltaic power is below. , This represents the parameters obtained during training. It indicates the characteristics of collaborative integration.
7. The photovoltaic power short-term probabilistic prediction method based on multi-scale spatiotemporal attention and adaptive conformal quantile calibration according to claim 1, characterized in that, Step (6) specifically includes: (6.1) Using a quantile regression prediction model, the photovoltaic predicted power of each sample n in the preset calibration set is calculated at the maximum confidence level L and the minimum confidence level U. , : (6.2) Based on the photovoltaic power forecast , Calculate the inconsistency score for each sample : , In the formula, This represents the actual photovoltaic power of sample n; (6.3) Sort all samples by their inconsistency scores from smallest to largest to obtain the target confidence level. Corresponding index value , This represents the index value of the sample with the highest inconsistency score; (6.4) Obtain the index value Corresponding Inconsistency Score As calibration offset The quantile regression prediction model outputs the photovoltaic power prediction at the current time at the maximum confidence level L and the minimum confidence level U. , After calibration, the initial calibrated photovoltaic power prediction range is obtained: , This indicates the photovoltaic power prediction range after initial calibration.
8. The photovoltaic power short-term probabilistic prediction method based on multi-scale spatiotemporal attention and adaptive conformal quantile calibration according to claim 7, characterized in that, Step (7) specifically includes: (7.1) The photovoltaic power prediction range after initial calibration is scaled using different scaling factors v to obtain the scaled photovoltaic power prediction range: , (7.2) Calculate the interval coverage PICP and normalized interval average width PINAW under different scaling factors v on the preset calibration set: , , In the formula, For indicator functions, For the sample power range, construct a comprehensive optimization objective. This represents the set of independent calibration samples obtained from historical photovoltaic power data; (7.3) Constructing the objective function The optimal scaling factor is obtained by solving the problem. : , (7.4) Use the optimal scaling factor The photovoltaic power prediction range after initial calibration is scaled to obtain the final photovoltaic power prediction range after initial calibration. .
9. A computer program product, comprising a computer program, characterized in that: When the computer program is executed by a processor, it implements the method of any one of claims 1-8.
10. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: The processor executes the computer program to implement the method as described in any one of claims 1-8.