Power prediction method and device, equipment, program product and storage medium

By extracting and fusion the historical data of offshore photovoltaic power stations, and optimizing the power prediction model with the converter structure and adaptive weight module, the problem of high computational complexity and difficult model adaptability in the existing technology is solved, and efficient and accurate ultra-short-term power prediction is achieved.

CN120030327APending Publication Date: 2025-05-23CHINA RESOURCES POWER TECH RES INST CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510122391.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-26
Publication Date
2025-05-23

AI Technical Summary

Technical Problem

When the prior art faces large-scale high-frequency data of floating photovoltaic power stations on the sea, the calculation complexity has increased sharply, resulting in low ultra-short-term power prediction efficiency, and the model structure is static, making it difficult to adaptively process high volatility data in complex environments, resulting in inaccurate prediction results.

Method used

By obtaining historical data of photovoltaic power stations, a pre-set spatial feature extraction algorithm and a temporal feature extraction algorithm are used to perform feature extraction and feature fusion, and the input features of the power prediction model are obtained. When the model does not meet the preset conditions, the model is optimized using the transformer structure and adaptive weight module to obtain a target prediction model that meets the conditions.

Benefits of technology

It effectively reduces the computational complexity of the power prediction model, enables the model to quickly and accurately predict power under limited computing resources, and improves prediction efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120030327A_ABST
    Figure CN120030327A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a power prediction method and device, equipment, a program product and a storage medium. The method comprises the steps of obtaining historical data of a photovoltaic power station; wherein the historical data comprises meteorological data, operation data and environment state data of a historical time period; performing feature extraction and feature fusion on the historical data according to a preset spatial feature extraction algorithm and a time feature extraction algorithm to obtain predetermined input features of a power prediction model; when the power prediction model does not meet the preset condition, optimizing the power prediction model based on the input characteristics, a converter structure of the power prediction model and an adaptive weight module to obtain a target prediction model meeting the preset condition; and performing power prediction on the photovoltaic power station based on the target prediction model. According to the method, ultra-short-term power prediction can be carried out on the offshore photovoltaic power station under limited computing resources by utilizing the power prediction model, and stable operation of power dispatching and a system is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the technical field of power analysis, and in particular to a power prediction method, device, equipment, program product, and storage medium. Background Art

[0002] Offshore floating photovoltaic power stations are power generation systems that use ocean space to float photovoltaic modules on the water through floating support structures. Compared with land-based photovoltaic systems, offshore photovoltaic power stations are located in a more complex environment and are affected by multiple factors such as waves, tides, and wind speed, resulting in greater fluctuations in the power output of photovoltaic modules.

[0003] At present, the regression model based on support vector machine (SVR) is often used for ultra-short-term power prediction of offshore floating photovoltaic power stations. SVR trains the model by combining historical data and environmental data of photovoltaic power stations, and predicts the power output in the next few minutes to tens of minutes through the model. However, when facing large-scale high-frequency data (such as minute-level sampling data), the computational complexity of SVR will increase sharply with the increase in the number of samples. This makes SVR not efficient enough when facing ultra-short-term power prediction with real-time response. In addition, the SVR model structure is relatively static, and it is difficult to adaptively process the highly volatile data in the complex environment of offshore floating photovoltaic power stations, resulting in inaccurate prediction results. Summary of the invention

[0004] The embodiments of the present invention provide a power prediction method, apparatus, device, program product and storage medium, which can effectively reduce the computational complexity of the power prediction model, so that the model can still quickly and accurately predict the power of an offshore photovoltaic power station under limited computing resources, thereby improving the efficiency and accuracy of power prediction.

[0005] In a first aspect, an embodiment of the present invention provides a power prediction method, comprising:

[0006] Acquire historical data of the photovoltaic power station; wherein the historical data includes meteorological data, operation data and environmental status data of the historical period;

[0007] Extracting and fusing features of the historical data according to a preset spatial feature extraction algorithm and a temporal feature extraction algorithm to obtain input features of a predetermined power prediction model;

[0008] When the power prediction model does not meet the preset conditions, optimizing the power prediction model based on the input characteristics, the converter structure of the power prediction model and the adaptive weight module to obtain a target prediction model that meets the preset conditions;

[0009] Power prediction is performed on the photovoltaic power station based on the target prediction model.

[0010] In a second aspect, an embodiment of the present invention provides a power prediction device, the device comprising:

[0011] A data acquisition module, used to acquire historical data of the photovoltaic power station; wherein the historical data includes meteorological data, operation data and environmental status data of the historical period;

[0012] A data analysis module, used to extract and fuse features from the historical data according to a preset spatial feature extraction algorithm and a preset temporal feature extraction algorithm, so as to obtain input features of a predetermined power prediction model;

[0013] A model optimization module, used for optimizing the power prediction model based on the input characteristics, the converter structure of the power prediction model and the adaptive weight module when the power prediction model does not meet the preset conditions, so as to obtain a target prediction model that meets the preset conditions;

[0014] A power prediction module is used to perform power prediction on the photovoltaic power station based on the target prediction model.

[0015] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a power prediction method as described in any one of the embodiments of the present invention is implemented.

[0016] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a power prediction method as described in any one of the embodiments of the present invention.

[0017] In a fifth aspect, an embodiment of the present invention provides a computer program product, including a computer program, which, when executed by a processor, implements a power prediction method as described in any one of the embodiments of the present invention.

[0018] In an embodiment of the present invention, historical data of a photovoltaic power station is obtained; wherein the historical data includes meteorological data, operation data and environmental status data of a historical period; feature extraction and feature fusion are performed on the historical data according to a preset spatial feature extraction algorithm and a temporal feature extraction algorithm to obtain a predetermined input feature of a power prediction model; when the power prediction model does not meet the preset conditions, the power prediction model is optimized based on the input features, the converter structure of the power prediction model and the adaptive weight module to obtain a target prediction model that meets the preset conditions; and power prediction of the photovoltaic power station is performed based on the target prediction model. The method of the embodiment of the present invention can analyze the nonlinear relationship and spatiotemporal dependency between meteorological factors and power output by extracting temporal features and spatial features from historical data, and screen out more accurate and important data, so as to facilitate the subsequent reduction of the computational complexity of the power prediction model, and at the same time obtain more accurate input features. By combining the converter structure and the adaptive weight module, the power prediction model can automatically adjust the weight according to the characteristics of the input data to obtain the optimal power prediction model. Further, the power prediction model can be used to quickly respond to the power output of the offshore photovoltaic power station in the next few minutes to tens of minutes under limited computing resources to ensure the stable operation of power dispatch and system. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0020] Figure 1 A first flow chart of a power prediction method provided by an embodiment of the present invention;

[0021] Figure 2 A second flow chart of a power prediction method provided by an embodiment of the present invention;

[0022] Figure 3 A flow chart of a method for performing ultra-short-term power prediction provided by an embodiment of the present invention;

[0023] Figure 4 A schematic diagram of the structure of a power prediction device provided by an embodiment of the present invention;

[0024] Figure 5 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0025] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.

[0026] Figure 1 This is a first flow chart of a power prediction method provided in an embodiment of the present invention. The method in the embodiment of the present invention can effectively reduce the computational complexity of the power prediction model, so that the model can still quickly and accurately predict the power of the offshore photovoltaic power station under limited computing resources, thereby improving the efficiency and accuracy of power prediction. The information collected in the method in the embodiment of the present invention is information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with the relevant laws, regulations and standards of the relevant countries and regions, take necessary confidentiality measures, do not violate public order and good customs, and provide corresponding operation entrances for users to choose to authorize or refuse. The method can be executed by a power prediction device provided in an embodiment of the present invention, and the device can be implemented in software and / or hardware. The following embodiments will be described by taking the device integrated in an electronic device as an example. The electronic device can be a proxy server or a computer device equipped with a virtual proxy server, etc., refer to Figure 1 , the method may specifically include the following steps:

[0027] Step 101: Obtain historical data of a photovoltaic power station.

[0028] Among them, historical data includes meteorological data, operating data and environmental status data of the offshore photovoltaic power station in the historical period. Meteorological data include wind speed, temperature, humidity and radiation intensity. Operating data includes photovoltaic power output data. Environmental status data includes wave height and tidal data. Specifically, when it is necessary to make ultra-short-term power prediction of the offshore photovoltaic power station (such as in the next few minutes, the next half hour or the next 4 hours), or when it is necessary to train the power prediction model, meteorological data can be obtained from the meteorological sensor of the photovoltaic power station at a preset frequency, operating data can be obtained from the photovoltaic power generation monitoring system, and environmental status data can be obtained from the marine environment monitoring system.

[0029] Step 102: extract and fuse features from historical data according to a preset spatial feature extraction algorithm and a preset temporal feature extraction algorithm to obtain input features of a predetermined power prediction model.

[0030] Among them, the spatial feature extraction algorithm is used to identify and analyze the local correlation of different meteorological data in historical data and generate a spatial feature map. Spatial feature extraction algorithms include convolutional neural networks, principal component analysis, and linear discriminant. Temporal feature extraction algorithms are used to identify and analyze the dependencies of time series in historical data to obtain temporal features. Temporal feature extraction algorithms include bidirectional gated recurrent units, long short-term memory networks, and attention mechanisms. Feature extraction is to extract information that is helpful for analysis and prediction from raw data, thereby reducing the complexity of the data, removing redundant information, and reducing computational costs. Feature fusion is to combine features from different sources or different extraction methods into a unified feature set. The power prediction model is a predetermined model for ultra-short-term power prediction of offshore photovoltaic power stations based on historical data. The input features are obtained by feature extraction and feature fusion of historical data, and are used to train the power prediction model.

[0031] The spatial feature extraction algorithm in this scheme can be a convolutional neural network (CNN), and the temporal feature extraction algorithm can be a bidirectional gated recurrent unit (BiGRU). Specifically, after obtaining historical data, CNN can be used to identify local patterns and spatial relationships in meteorological data and environmental status data, for example, to identify the spatial correlation of the effects of wind speed and temperature on photovoltaic panel power output. BiGRU captures the time series information of photovoltaic power output data, thereby extracting the temporal dependency of photovoltaic power output data, that is, how past power output affects future output. After obtaining the spatial features extracted by CNN and the temporal features extracted by BiGRU, the spatial features and the temporal features are combined into a unified feature vector, and the input features of the power prediction model are obtained based on the combined feature vector. The input features contain spatial information and temporal information that are crucial to the power prediction of photovoltaic power stations.

[0032] In an optional implementation, after obtaining the historical data, the historical data can be cleaned and standardized to obtain standardized historical data; the standardized historical data can be subjected to meteorological variable correlation analysis through a predetermined convolutional neural network to obtain spatial features of the standardized historical data; wherein the spatial features include local meteorological features and local power features; the standardized historical data can be subjected to time series feature analysis through a bidirectional gated recurrent unit to obtain time features of the standardized historical data; the spatial features and time features can be fused according to a predetermined activation function to obtain input features.

[0033] Step 103: When the power prediction model does not meet the preset conditions, the power prediction model is optimized based on the input characteristics, the converter structure of the power prediction model and the adaptive weight module to obtain a target prediction model that meets the preset conditions.

[0034] Among them, the preset conditions are pre-determined based on domain big data, model features of the power prediction model, and historical data, and are used to determine whether the power prediction model can accurately perform power prediction. The preset conditions can be conditions such as the preset loss function reaching convergence or the number of iterations of the power prediction model reaching the preset number. The target prediction model is a trained model that can accurately perform power prediction. The Transformer structure adopts an encoder-decoder structure, where the encoder is used to encode the input sequence and the decoder is used to decode the output of the encoder to obtain the target sequence. Both the encoder and the decoder are composed of multiple stacked self-attention layers and feedforward neural network layers. The Transformer structure can support the model to pay attention to other related words in the input sequence when processing a word, thereby obtaining context information. The self-attention mechanism of the Transformer structure in this scheme can perform time-series weighted processing on the input features, supporting the power prediction model to assign different weights to features of different time steps when processing sequence data to adapt to different prediction tasks and environmental conditions. The adaptive weight module can dynamically adjust the weight parameters of the model by combining reinforcement learning with meteorological data and environmental data. This dynamic adjustment capability enables the model to adapt to changing environmental conditions, thereby improving the accuracy and reliability of predictions. The adaptive weight module in this solution can adjust the weight parameters based on meteorological data and environmental status data through a reinforcement learning algorithm. For example, if the power prediction model has a large prediction error under specific weather conditions, the adaptive weight module can increase the attention to these specific weather conditions and optimize the power prediction model through a reinforcement learning algorithm to obtain the target prediction model.

[0035] In an optional implementation, when the power prediction model does not meet the preset conditions, the input features can be input into the power prediction model, and the input features can be time-weighted through the self-attention mechanism to obtain the feature weights of the input features; the feature weights can be dynamically adjusted based on the adaptive weight module to obtain the weight parameters of the input features. Through the power prediction model, the input features are power predicted according to the weight parameters to obtain the output features corresponding to the input features; the error between the output features and the corresponding actual power is calculated through the fully connected layer, and the model parameters of the power prediction model are adjusted based on the error to obtain the target prediction model.

[0036] Step 104: Perform power prediction for the photovoltaic power station based on the target prediction model.

[0037] Specifically, the target prediction model is used to perform ultra-short-term power prediction for offshore photovoltaic power stations. After obtaining the target prediction model, the data to be predicted for power prediction of the photovoltaic power station is collected, such as current and recent meteorological data, operation data of the photovoltaic power station, and environmental status data. After obtaining the data to be predicted, the local patterns and spatial relationships in the data to be predicted are identified and extracted by the spatial feature extraction algorithm to obtain the spatial features of the data to be predicted. At the same time, the temporal feature extraction algorithm is used to capture the temporal dependency of the operation data and extract the temporal features of the data to be predicted. The spatial features and temporal features are fused to obtain the input features. The input features are input into the target prediction model, which calculates the input features and outputs the power prediction value of the offshore photovoltaic power station in the future (such as 15 minutes to 240 minutes). The power output value predicted by the target prediction model is sent to the user, and the user can perform power dispatching, system operation management, and maintenance plan formulation for the offshore photovoltaic power station based on the power output value.

[0038] In this solution, after obtaining the power prediction value, the actual power output value corresponding to the power prediction value can be obtained. The error between the actual power output value and the power prediction value is obtained, and the prediction accuracy of the target prediction model is evaluated based on the error, and the target prediction model is optimized based on the evaluation result. Through this error feedback mechanism, the target prediction model can be continuously optimized to reduce the prediction error of ultra-short-term power prediction and improve its prediction performance.

[0039] The technical solution of this embodiment obtains historical data of the photovoltaic power station; the historical data includes meteorological data, operation data and environmental status data of the historical period; the historical data is feature extracted and feature fused according to the preset spatial feature extraction algorithm and time feature extraction algorithm to obtain the input features of the predetermined power prediction model; when the power prediction model does not meet the preset conditions, the power prediction model is optimized based on the input features, the converter structure of the power prediction model and the adaptive weight module to obtain the target prediction model that meets the preset conditions; the photovoltaic power station is predicted based on the target prediction model. The technical solution of this embodiment can analyze the nonlinear relationship and spatiotemporal dependency between meteorological factors and power output by extracting time features and spatial features from historical data, and screen out more accurate and important data, which is convenient for subsequent reduction of the calculation complexity of the power prediction model, and more accurate input features can be obtained. By combining the converter structure and the adaptive weight module, the power prediction model can automatically adjust the weight according to the characteristics of the input data to obtain the optimal power prediction model. Further, the power prediction model can be used to quickly respond to the power output of the offshore photovoltaic power station in the next few minutes to tens of minutes under limited computing resources to ensure the stable operation of power dispatch and system.

[0040] Figure 2 The second flow chart of a power prediction method provided by an embodiment of the present invention is a refinement of the above embodiment. The specific method can be as follows Figure 2 As shown, the method may include the following steps:

[0041] Step 201: Obtain historical data of a photovoltaic power station.

[0042] Among them, historical data includes meteorological data, operation data and environmental status data for historical periods.

[0043] Step 202: Perform data cleaning and data standardization on the historical data to obtain standardized historical data.

[0044] Among them, data cleaning is used to remove noise from historical data, fill missing values, and handle abnormal points, so as to ensure the integrity and consistency of historical data. Data standardization is used to convert data of different dimensions and ranges in historical data to a unified scale to eliminate the impact of dimensions. Specifically, historical data is data obtained from different sensors or different data systems. After obtaining historical data, data that exceeds the reasonable range can be identified according to the pre-set reasonable range of each type of data, and abnormal values ​​can be replaced by interpolation methods (such as linear interpolation or polynomial interpolation). For example, assuming that the reasonable range of temperature data is -20℃ to 50℃, if the temperature value of a data point is 60℃, it is identified as an abnormal value and replaced with the linear interpolation result of the adjacent data points. In this scheme, the wavelet denoising method can be used to filter out high-frequency noise. For example, for radiation intensity data, the high-frequency noise part can be removed by wavelet transform decomposition, and then reconstructed to obtain denoised radiation intensity data.

[0045] After cleaning the historical data, the mean-standard deviation standardization method is used to scale the historical data to a mean of 0 and a standard deviation of 1 using the following formula: Among them, x represents the original data point, μ is the mean of the data, and σ is the standard deviation of the data. In this solution, for features with high importance (such as wind speed, temperature, etc.), their physical meaning must be maintained after standardization. For example, for wind speed data, its unit (such as m / s) must be retained after standardization so that it can be restored to the original physical quantity in the subsequent analysis process. Standardizing historical data can eliminate the dimensional influence in the data, making it easier to uniformly process data from different sources in the future.

[0046] Step 203: Perform meteorological variable correlation analysis on the standardized historical data through a predetermined convolutional neural network to obtain the spatial characteristics of the standardized historical data.

[0047] Among them, spatial features include local meteorological features and local power features. In the process of data feature extraction, CNN can extract features with complex spatial correlation from high-dimensional data (historical data). Specifically, meteorological data include wind speed, temperature, solar radiation, etc. The relationship between meteorological data is complex and has spatiotemporal dimensions. CNN performs convolution operations on meteorological data through convolution kernels, thereby effectively extracting local features and capturing the potential impact of various meteorological factors on power output. In photovoltaic power prediction, CNN can extract complex nonlinear relationships from historical data and capture local features and interdependencies of historical data. The convolution layer of CNN can capture local correlations between meteorological variables, and the pooling layer of CNN can reduce the dimension of features and retain important information. Through multi-layer convolution operations, CNN can analyze the spatial relationship between different meteorological variables, such as the correlation between wind speed and temperature, or the relationship between radiation intensity and power output. By inputting standardized historical data into CNN, spatial features including local meteorological features (such as local wind speed changes, local temperature changes, etc.) and local power features (such as the correlation between local power fluctuations and meteorological variables) can be obtained.

[0048] Step 204: Determine input features of the power prediction model based on the spatial features, the standardized historical data, and the predetermined bidirectional gated recurrent unit.

[0049] Among them, BiGRU is an improved recurrent neural network structure suitable for processing sequence data with time dependency. BiGRU can capture more comprehensive contextual relationships and time dependencies in the sequence by processing the forward and reverse information of the sequence simultaneously. Specifically, in the photovoltaic power prediction of offshore photovoltaic power stations, the power output depends not only on the current meteorological conditions, but also on the influence of past weather conditions. Therefore, BiGRU can be used to extract the time features in the standardized historical data, and obtain the input features of the power prediction model based on the time features and spatial features. In this scheme, optionally, the input features of the power prediction model are determined based on spatial features, standardized historical data and a predetermined bidirectional gated recurrent unit, including the following steps A1-A2:

[0050] Step A1: Perform time series feature analysis on the standardized historical data through a bidirectional gated recurrent unit to obtain the time features of the standardized historical data.

[0051] Specifically, BiGRU consists of two GRU (Gated Recurrent Unit, GRU) layers, namely the forward GRU layer and the backward GRU layer. The forward GRU layer processes data step by step from the starting point of the time series backward, and the backward GRU layer processes data step by step from the end point of the time series forward. When processing each time step, the forward GRU layer extracts the data dependency from the previous to the current step, while the backward GRU layer extracts the data dependency from the current to the subsequent step. In the BiGRU output stage, the output results of the forward GRU layer and the backward GRU layer are spliced ​​together, so that the power prediction model can refer to the information of the previous and next time steps at the same time, so as to have more comprehensive context information for each time step. A gating mechanism is introduced in BiGRU. By regulating the reset gate and the update gate, the power prediction model can selectively retain or forget information during training, thereby effectively alleviating the gradient vanishing problem. Therefore, BiGRU is particularly suitable for photovoltaic power prediction work that requires processing a large amount of historical data. The reset gate is used to control the information storage of each time step, so as to accumulate important features in a shorter time. The update gate can retain important features for a long time through weight adjustment, avoiding the loss of early key information in long sequences. After obtaining the standardized historical data, the table-converted historical data is input into BiGRU, which processes the forward and reverse information of the sequence at the same time, captures a more comprehensive contextual relationship in the sequence, and obtains the time features corresponding to the standardized historical data.

[0052] Step A2: The spatial features and the temporal features are fused according to a preset activation function to obtain input features.

[0053] The activation function is used to perform nonlinear transformation on spatial features and temporal features. Specifically, after obtaining temporal features and spatial features, a pre-set activation function is used to perform nonlinear transformation on the spatial features and temporal features, and the spatial features and temporal features processed by the activation function are weighted or concatenated to obtain the final input features.

[0054] BiGRU is used to analyze the time series features of standardized historical data, extract the time features of the data, and combine the time features with the spatial features through activation functions and feature fusion technology to obtain more comprehensive input features. It not only captures the time dependency of the data, but also enhances the representation ability of the features, providing high-quality input features for the subsequent power prediction model.

[0055] Step 205: When the power prediction model does not meet the preset conditions, the input features are input into the power prediction model, and the input features are weighted analyzed through the self-attention mechanism of the converter structure and the adaptive weight module to obtain the weight parameters of the input features.

[0056] Among them, the preset conditions are predetermined based on domain big data, model characteristics of the power prediction model, and historical data, and are used to determine whether the power prediction model can accurately perform power prediction. The preset conditions may be conditions such as a preset loss function reaching convergence or the number of iterations of the power prediction model reaching a preset number. When the power prediction model does not meet the preset conditions, it indicates that the model parameters of the power prediction model need to be adjusted. In this solution, the input features are weighted by the self-attention mechanism of the converter structure and the adaptive weight module to obtain the weight parameters of the input features, including the following steps B1-B2:

[0057] Step B1: Perform temporal weighted processing on the input features through the self-attention mechanism to obtain the feature weights of the input features.

[0058] Among them, the Transformer structure adopts an encoder-decoder structure, and both the encoder and the decoder are composed of multi-layer stacked self-attention layers and feedforward neural network layers. The self-attention mechanism is a feature weighting method that can dynamically assign weights to each time step in the input features. The self-attention mechanism automatically identifies which time steps are more important to the power prediction task and assigns higher weights by calculating the relationship between the input features. In the power prediction process, the input features include time series data (such as meteorological data and power output, etc.). The importance of these data at different time steps may be different. For example, meteorological conditions at certain time points may have a greater impact on photovoltaic power output. In an optional embodiment, the input features are mapped into three vectors: a query vector, a key vector, and a value vector. The query vector is used to represent the focus of the current time step, the key vector is used to represent the information of other time steps, and the value vector contains the actual feature content. For each time step, the similarity between the query vector and all key vectors is calculated to obtain the closeness of the relationship between the two time steps, thereby obtaining the importance and attention score of the time step to the power prediction task. The attention score is normalized using a pre-set normalization function to convert the score into a probability distribution form, that is, the attention weight. Use the normalized attention weights to perform weighted summation on the value vector to obtain the weighted feature representation, that is, generate the feature weight.

[0059] Feature weights are generated for each time step. These weights reflect the importance of the input features in the time series and can help the model better focus on information that is more helpful for the prediction task. Feature weights are calculated dynamically and can be automatically adjusted according to changes in input data, thereby improving the adaptability and flexibility of the model.

[0060] Step B2: Dynamically adjust the feature weights based on the adaptive weight module to obtain the weight parameters of the input features.

[0061] The adaptive weight module can automatically adjust the weights according to the dynamic characteristics of the input features. In the power prediction task, the weights of the input features need to be dynamically adjusted according to different time steps and feature importance. The adaptive weight module assigns a learnable weight to each feature by learning the importance of the input features. The learnable weights are continuously updated during the training process to reflect the actual contribution of the feature in the prediction task. At each time step, the adaptive weight module adjusts the weights according to the dynamic characteristics of the input features. For example, if a feature contributes more to the prediction task at a certain time step, a higher weight is assigned to it; otherwise, the weight is reduced, and finally the weight parameter of the input feature is obtained. Through the dynamic adjustment mechanism of the weight module, the weight allocation can be automatically adjusted according to the changes in the input data, ensuring that the power prediction model can better adapt to different input conditions.

[0062] By using the self-attention mechanism to perform time-series weighted processing on input features, it is possible to dynamically assign weights to each time step, highlighting important information and suppressing unimportant information. Further, by dynamically adjusting feature weights through the adaptive weight module, it is possible to automatically optimize weight assignment according to changes in input data, thereby obtaining input feature weight parameters that better meet the requirements of power prediction tasks. This not only improves the power prediction model's ability to understand input features, but also enhances the power prediction model's adaptability and prediction performance, providing strong support for achieving efficient and accurate power prediction.

[0063] Step 206: Optimize the parameters of the power prediction model based on the weight parameters and the fully connected layer of the power prediction model to obtain a target prediction model.

[0064] Specifically, after obtaining the weight parameters, the power prediction model is used to calculate the input features under the weight parameters, and the power prediction model is optimized according to the calculated power prediction values ​​to obtain the target prediction model. In this solution, optionally, the power prediction model is optimized based on the weight parameters and the fully connected layer of the power prediction model to obtain the target prediction model, including: using the power prediction model to perform power prediction on the input features according to the weight parameters to obtain the output features corresponding to the input features; calculating the error between the output features and the corresponding actual power through the fully connected layer, and adjusting the model parameters of the power prediction model based on the error to obtain the target prediction model.

[0065] After determining the weight parameters, input features (including weight parameters) are input into the power prediction model. The power prediction model calculates based on the input features and outputs the predicted power value, i.e., the output features. After obtaining the output features, a fully connected layer is used to map the output features of the model to the final power prediction value. The error between the predicted power and the actual power is calculated using the loss function. The error between the model output and the actual power is calculated using the following formula, and the model parameters are adjusted based on the error: Among them, y i is the actual power, y′ i is the prediction power (output feature), and N is the number of data. Further, the back propagation algorithm is used to calculate the gradient of the loss function to the model parameters. Through the chain rule, the gradient of each layer is calculated by propagating forward from the output layer step by step. After multiple iterative trainings, the model parameters are continuously optimized using a pre-set optimization algorithm (such as the Adam algorithm), and finally a target prediction model that meets the preset conditions is obtained.

[0066] The power prediction model is used to predict the input features, calculate the error between the output features and the actual power, and adjust the model parameters through back propagation to finally generate an optimized target prediction model. This improves the prediction accuracy of the power prediction model and enhances its ability to adapt to complex data, providing strong support for efficient and accurate power prediction.

[0067] Step 207: Perform power prediction for the photovoltaic power station based on the target prediction model.

[0068] In the technical solution of this embodiment, historical data of a photovoltaic power station is obtained. The historical data includes meteorological data, operating data and environmental status data of a historical period. The historical data is cleaned and standardized to obtain standardized historical data. The standardized historical data is subjected to meteorological variable association analysis through a predetermined convolutional neural network to obtain spatial features of the standardized historical data; wherein the spatial features include local meteorological features and local power features. The input features of the power prediction model are determined based on the spatial features, the standardized historical data and the predetermined bidirectional gated cyclic unit. When the power prediction model does not meet the preset conditions, the input features are input into the power prediction model, and the input features are weighted and analyzed through the self-attention mechanism of the converter structure and the adaptive weight module to obtain the weight parameters of the input features. The power prediction model is optimized based on the weight parameters and the fully connected layer of the power prediction model to obtain the target prediction model. The photovoltaic power station is predicted based on the target prediction model. The technical solution of this embodiment performs preprocessing such as standardization on the historical data, which lays the foundation for determining the input features. Features with complex spatial correlations are extracted through CNN, and temporal features in standardized historical data are extracted through BiGRU. The input features obtained by combining spatial features and temporal features enable the power prediction model to better focus on the most important features in different time and space dimensions, thereby improving the prediction accuracy of the power prediction model. Through the Transformer structure and adaptive weight module, weights can be dynamically assigned to each time step to highlight important information and suppress unimportant information. The weight allocation is automatically optimized according to the changes in the input data, so as to obtain input feature weight parameters that better meet the requirements of the power prediction task. This not only improves the power prediction model's ability to understand the input features, but also enhances the adaptability and prediction performance of the power prediction model.

[0069] Figure 3 The flowchart of the method for ultra-short-term power prediction provided by the embodiment of the present invention is a refinement of the above embodiment. The specific method can be as follows Figure 3 As shown, the method may include the following steps:

[0070] Step 301: Obtain the data to be predicted of the photovoltaic power station; perform feature extraction and feature fusion on the data to be predicted according to the spatial feature extraction algorithm and the temporal feature extraction algorithm to obtain the features to be predicted of the target prediction model.

[0071] When it is necessary to make an ultra-short-term power forecast for a photovoltaic power station, collect the relevant data of the photovoltaic power station to be predicted (data to be predicted). The data to be predicted include meteorological data: such as wind speed, temperature, humidity and solar radiation intensity; photovoltaic power output data: the recent power output data of the photovoltaic power station; environmental status data: such as wave height and tide (for offshore photovoltaic power stations). After obtaining the data to be predicted, it is necessary to extract and fuse the features of these data to generate a feature vector suitable for model input. In this solution, CNN is used to extract the spatial correlation in the data to be predicted to obtain spatial features. BiLSTM is used to extract the time dependency in the data to be predicted to obtain temporal features. The spatial features and temporal features are fused to generate the features to be predicted.

[0072] Step 302: Input the feature to be predicted into the target prediction model, perform power prediction on the feature to be predicted through the target prediction model, and obtain a power prediction value corresponding to the feature to be predicted.

[0073] After obtaining the features to be predicted, the features to be predicted are input into the target prediction model. The features to be predicted are forward propagated through each layer of the target prediction model, and finally the power prediction value output by the target prediction model is obtained.

[0074] Step 303: Send the power prediction value to the user, so that the user can manage the power of the photovoltaic power station based on the power prediction value.

[0075] After the power prediction value is obtained, it is sent to the user through the network or data interface. The user can plan power dispatch, adjust power generation plan or perform equipment maintenance in advance according to the power prediction value, thereby optimizing the operating efficiency of the offshore photovoltaic power station. For example, the load distribution of the power grid can be arranged according to the prediction value to ensure the stable operation of the power grid.

[0076] The technical solution of this embodiment is to obtain the data to be predicted of the photovoltaic power station; extract and fuse the features of the data to be predicted according to the spatial feature extraction algorithm and the temporal feature extraction algorithm to obtain the features to be predicted of the target prediction model; input the features to be predicted into the target prediction model, perform power prediction on the features to be predicted through the target prediction model, and obtain the power prediction value corresponding to the features to be predicted; send the power prediction value to the user so that the user can manage the power of the photovoltaic power station based on the power prediction value. The technical solution of this embodiment can effectively cope with the complex marine environment and perform ultra-short-term power prediction in real time, providing a solid technical foundation for realizing more efficient and accurate offshore photovoltaic power prediction.

[0077] Figure 4 The present invention provides a schematic diagram of the structure of a power prediction device, which is suitable for executing the power prediction method provided by the present invention. Figure 4As shown, the device may specifically include:

[0078] The data acquisition module 401 is used to acquire historical data of the photovoltaic power station; wherein the historical data includes meteorological data, operation data and environmental status data of the historical period;

[0079] The data analysis module 402 is used to extract and fuse features from the historical data according to a preset spatial feature extraction algorithm and a temporal feature extraction algorithm to obtain input features of a predetermined power prediction model;

[0080] A model optimization module 403 is used to optimize the power prediction model based on the input characteristics, the converter structure of the power prediction model and the adaptive weight module when the power prediction model does not meet the preset conditions, so as to obtain a target prediction model that meets the preset conditions;

[0081] The power prediction module 404 is used to perform power prediction on the photovoltaic power station based on the target prediction model.

[0082] Optionally, the data analysis module 402 is specifically used to: perform data cleaning and data standardization processing on the historical data to obtain standardized historical data;

[0083] Performing meteorological variable correlation analysis on the standardized historical data through a predetermined convolutional neural network to obtain spatial features of the standardized historical data; wherein the spatial features include meteorological local features and power local features;

[0084] An input feature of the power prediction model is determined based on the spatial feature, the standardized historical data, and a predetermined bidirectional gated recurrent unit.

[0085] Optionally, the data analysis module 402 is further used to: perform time series feature analysis on the standardized historical data through the bidirectional gated recurrent unit to obtain time features of the standardized historical data;

[0086] The spatial feature and the temporal feature are fused according to a preset activation function to obtain the input feature.

[0087] Optionally, the model optimization module 403 is specifically used to: when the power prediction model does not meet the preset conditions, input the input features into the power prediction model, perform weight analysis on the input features through the self-attention mechanism of the converter structure and the adaptive weight module, and obtain the weight parameters of the input features;

[0088] Parameters of the power prediction model are optimized based on the weight parameters and the fully connected layer of the power prediction model to obtain the target prediction model.

[0089] Optionally, the model optimization module 403 is further used to: perform time-series weighted processing on the input features through the self-attention mechanism to obtain feature weights of the input features;

[0090] The feature weight is dynamically adjusted based on the adaptive weight module to obtain the weight parameter of the input feature.

[0091] Optionally, the model optimization module 403 is further used to: perform power prediction on the input feature according to the weight parameter through the power prediction model to obtain an output feature corresponding to the input feature;

[0092] The error between the output feature and the corresponding actual power is calculated through the fully connected layer, and the model parameters of the power prediction model are adjusted based on the error to obtain the target prediction model.

[0093] Optionally, the power prediction module 404 is specifically used to: obtain the data to be predicted of the photovoltaic power station;

[0094] Performing feature extraction and feature fusion on the data to be predicted according to the spatial feature extraction algorithm and the temporal feature extraction algorithm to obtain features to be predicted of the target prediction model;

[0095] Inputting the feature to be predicted into the target prediction model, performing power prediction on the feature to be predicted through the target prediction model, and obtaining a power prediction value corresponding to the feature to be predicted;

[0096] The power prediction value is sent to a user, so that the user manages power of the photovoltaic power station based on the power prediction value.

[0097] The power prediction device provided in the embodiment of the present invention can execute the power prediction method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method. For the contents not described in detail in this embodiment, reference can be made to the description in any method embodiment of the present invention.

[0098] An embodiment of the present invention also provides a computer program product.

[0099] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer program products, which can include one or more computer programs, which can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor, which can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0100] Figure 5 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention, referring to Figure 5 , Figure 5 The electronic device 12 shown is only an example and should not limit the functions and scope of use of the embodiments of the present application. Figure 5 As shown, the electronic device 12 is in the form of a general purpose computing device. The components of the electronic device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that connects various system components (including the system memory 28 and the processing unit 16).

[0101] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.

[0102] The electronic device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 12, including volatile and non-volatile media, removable and non-removable media.

[0103] The system memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The electronic device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Figure 5 not shown, usually called a "hard drive"). Although Figure 5 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical medium) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present application.

[0104] A program / utility 40 having a set (at least one) of program modules 46 may be stored, for example, in the memory 28, such program modules 46 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 46 generally perform the functions and / or methods of the embodiments described herein.

[0105] The electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, etc.), may communicate with one or more devices that enable a user to interact with the electronic device 12, and / or may communicate with any device that enables the electronic device 12 to communicate with one or more other computing devices (e.g., a network card, a modem, etc.). Such communication may be performed via an input / output (I / O) interface 22. Furthermore, the electronic device 12 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 20. As shown, the network adapter 20 communicates with other modules of the electronic device 12 via the bus 18. It should be understood that although Figure 5 Not shown, other hardware and / or software modules may be used in conjunction with the electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0106] The processing unit 16 executes various functional applications and data processing by running the program stored in the system memory 28, for example, implementing a power prediction method provided by an embodiment of the present invention: obtaining historical data of a photovoltaic power station; wherein the historical data includes meteorological data, operating data and environmental status data of a historical period; performing feature extraction and feature fusion on the historical data according to a preset spatial feature extraction algorithm and a temporal feature extraction algorithm to obtain input features of a predetermined power prediction model; when the power prediction model does not meet the preset conditions, optimizing the power prediction model based on the input features, the converter structure of the power prediction model and the adaptive weight module to obtain a target prediction model that meets the preset conditions; and performing power prediction on the photovoltaic power station based on the target prediction model.

[0107] The embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, a power prediction method as provided in all the embodiments of the present invention is implemented: obtaining historical data of a photovoltaic power station; wherein the historical data includes meteorological data, operation data and environmental status data of a historical period; extracting and fusion features of the historical data according to a preset spatial feature extraction algorithm and a temporal feature extraction algorithm to obtain input features of a predetermined power prediction model; when the power prediction model does not meet the preset conditions, the power prediction model is optimized based on the input features, the converter structure of the power prediction model and the adaptive weight module to obtain a target prediction model that meets the preset conditions; and power prediction of the photovoltaic power station is performed based on the target prediction model. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium may be, for example, but not limited to, an electronic device, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection with one or more conductors, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction-executing electronic device, apparatus, or device.

[0108] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction-executing electronic device, apparatus, or device.

[0109] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0110] Computer program code for performing the operations of the present invention may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0111] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. A power prediction method, characterized in that: The method comprises: Acquire historical data of the photovoltaic power station; wherein the historical data includes meteorological data, operation data and environmental status data of the historical period; Extracting and fusing features of the historical data according to a preset spatial feature extraction algorithm and a temporal feature extraction algorithm to obtain input features of a predetermined power prediction model; When the power prediction model does not meet the preset conditions, optimizing the power prediction model based on the input characteristics, the converter structure of the power prediction model and the adaptive weight module to obtain a target prediction model that meets the preset conditions; Power prediction is performed on the photovoltaic power station based on the target prediction model.

2. The method according to claim 1, characterized in that: The historical data is subjected to feature extraction and feature fusion according to a preset spatial feature extraction algorithm and a time lifting extraction algorithm to obtain input features of a predetermined power prediction model, including: Performing data cleaning and data standardization processing on the historical data to obtain standardized historical data; Performing meteorological variable correlation analysis on the standardized historical data through a predetermined convolutional neural network to obtain spatial features of the standardized historical data; wherein the spatial features include meteorological local features and power local features; An input feature of the power prediction model is determined based on the spatial feature, the standardized historical data, and a predetermined bidirectional gated recurrent unit.

3. The method according to claim 2, characterized in that Determining input features of the power prediction model based on the spatial features, the standardized historical data, and a predetermined bidirectional gated recurrent unit includes: Performing time series feature analysis on the standardized historical data through the bidirectional gated cyclic unit to obtain time features of the standardized historical data; The spatial feature and the temporal feature are fused according to a preset activation function to obtain the input feature.

4. The method according to claim 1, characterized in that: When the power prediction model does not meet the preset conditions, the power prediction model is optimized based on the input characteristics, the converter structure of the power prediction model and the adaptive weight module to obtain a target prediction model that meets the preset conditions, including: When the power prediction model does not meet the preset conditions, the input features are input into the power prediction model, and the input features are weighted by the self-attention mechanism of the converter structure and the adaptive weight module to obtain the weight parameters of the input features; Parameters of the power prediction model are optimized based on the weight parameters and the fully connected layer of the power prediction model to obtain the target prediction model.

5. The method according to claim 4, characterized in that The input features are weighted by the self-attention mechanism of the transformer structure and the adaptive weight module to obtain weight parameters of the input features, including: Performing time-series weighted processing on the input features through the self-attention mechanism to obtain feature weights of the input features; The feature weight is dynamically adjusted based on the adaptive weight module to obtain the weight parameter of the input feature.

6. The method according to claim 4, characterized in that Optimizing the parameters of the power prediction model based on the weight parameters and the fully connected layer of the power prediction model to obtain the target prediction model includes: By using the power prediction model, power prediction is performed on the input feature according to the weight parameter to obtain an output feature corresponding to the input feature; The error between the output feature and the corresponding actual power is calculated through the fully connected layer, and the model parameters of the power prediction model are adjusted based on the error to obtain the target prediction model.

7. The method according to claim 1, characterized in that Performing power prediction on the photovoltaic power station based on the target prediction model includes: Obtaining the data to be predicted of the photovoltaic power station; Performing feature extraction and feature fusion on the data to be predicted according to the spatial feature extraction algorithm and the temporal feature extraction algorithm to obtain features to be predicted of the target prediction model; Inputting the feature to be predicted into the target prediction model, performing power prediction on the feature to be predicted through the target prediction model, and obtaining a power prediction value corresponding to the feature to be predicted; The power prediction value is sent to a user, so that the user manages power of the photovoltaic power station based on the power prediction value.

8. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the computer program implements a power prediction method according to any one of claims 1 to 7.

9. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the power prediction method as described in any one of claims 1-7 is implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the power prediction method as described in any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Intelligent calculation center energy consumption prediction method, apparatus and device, and storage medium

    CN121051480A