Photovoltaic power generation power prediction method, device, medium and equipment

CN117134318BActive Publication Date: 2026-10-13ZHEJIANG ANJI INTELLIGENT ELECTRONICS HLDG CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310864288.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-13
Publication Date
2026-10-13
Estimated Expiration
2043-07-13

AI Technical Summary

Benefits of technology

[0021]借由上述技术方案,本申请提供的一种光伏发电功率预测方法、装置、介质及设备,首先对于涵盖了天气因素、光伏设备自身属性等方面的原始特征数据进行处理,得到初始训练集,并计算每个特征的置换重要性,由此针对置换重要性较高的目标特征进行特征衍生处理,并对衍生特征进行多策略选择,最终得到目标训练集,以目标训练集训练预测模型,此后可利用该模型对光伏发电功率进行预测。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117134318B_ABST
    Figure CN117134318B_ABST
Patent Text Reader

Abstract

The application provides a photovoltaic power generation power prediction method, device, medium and equipment, wherein the method comprises: acquiring original feature data for photovoltaic power prediction, the original features comprising at least one of time features, natural condition features and panel parameter features; processing the original feature data to screen out an initial training set; calculating the permutation importance of each feature for the initial training set; selecting target features based on the permutation importance and performing feature derivation processing on the target features to obtain derived features; performing multi-strategy feature selection on the derived features, and collecting the features obtained by the multi-strategy feature selection to obtain a target training set; training a photovoltaic power prediction model with the target training set, and using the photovoltaic power prediction model to predict photovoltaic power generation power. The application can improve the accuracy and stability of photovoltaic power generation power prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of photovoltaic power generation prediction technology, and in particular to a photovoltaic power generation prediction method, apparatus, medium and equipment. Background Technology

[0002] Photovoltaic power generation is a technology that directly converts light energy into electrical energy using the photovoltaic effect at the semiconductor interface. It mainly consists of three parts: solar panels (modules), a controller, and an inverter. The main components are made up of electronic components. Solar cells are connected in series and then encapsulated for protection to form large-area solar cell modules. Combined with components such as power controllers, this forms a photovoltaic power generation device.

[0003] Photovoltaic power generation forecasting can provide the power output of photovoltaic (PV) devices over a future period, offering crucial information for power dispatching and optimization in virtual power plants. This helps virtual power plants better understand the power generation status of PV devices, adjust power output promptly, and ensure reliable power supply. Therefore, accurately forecasting PV power generation is a technical problem that needs to be solved by those skilled in the art. Summary of the Invention

[0004] In view of this, this application provides a method, apparatus, medium and electronic equipment for predicting photovoltaic power generation, the main purpose of which is to accurately predict photovoltaic power generation.

[0005] According to one aspect of this application, a method for predicting photovoltaic power generation is provided, comprising:

[0006] Obtain raw feature data for photovoltaic power prediction, wherein the raw features include at least one of time features, natural condition features, and panel parameter features;

[0007] The original feature data is processed to select an initial training set;

[0008] For the initial training set, calculate the permutation importance of each feature;

[0009] Based on the permutation importance, target features are selected, and feature derivation processing is performed on the target features to obtain derived features;

[0010] A multi-strategy feature selection is performed on the derived features, and the features obtained from the multi-strategy feature selection are summarized to obtain the target training set;

[0011] A photovoltaic power prediction model is trained using the target training set, and then the photovoltaic power prediction model is used to predict photovoltaic power generation.

[0012] According to one aspect of this application, a photovoltaic power generation prediction device is provided, comprising:

[0013] The data acquisition unit is used to acquire raw feature data for photovoltaic power prediction, wherein the raw features include at least one of time features, natural condition features, and panel parameter features;

[0014] The feature processing unit is used to process the original feature data and select an initial training set.

[0015] The permutation importance calculation unit is used to calculate the permutation importance of each feature for the initial training set;

[0016] The feature derivation unit is used to select target features based on the permutation importance and perform feature derivation processing on the target features to obtain derived features;

[0017] The feature selection unit is used to perform multi-strategy feature selection on the derived features, and to summarize the features obtained by multi-strategy feature selection to obtain the target training set.

[0018] The model training and prediction unit is used to train the photovoltaic power prediction model with the target training set and to use the photovoltaic power prediction model to predict photovoltaic power generation.

[0019] According to one aspect of this application, a storage medium is provided, wherein a computer program is stored in the storage medium, and the computer program is configured to execute the above-described photovoltaic power generation prediction method when it is run.

[0020] According to one aspect of this application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the above-described photovoltaic power generation prediction method.

[0021] Using the above technical solution, this application provides a photovoltaic power generation prediction method, device, medium, and equipment. First, the original feature data covering weather factors, photovoltaic equipment attributes, etc., are processed to obtain an initial training set. The permutation importance of each feature is calculated. Then, feature derivation processing is performed on the target features with high permutation importance, and multiple strategies are selected for the derived features to finally obtain the target training set. The prediction model is trained with the target training set, and then the model can be used to predict photovoltaic power generation.

[0022] This application's embodiments incorporate improvements to existing photovoltaic (PV) prediction technologies. In addition to the original time-point features and irradiance data, it adds weather attributes (sunny, cloudy, overcast), temperature, wind speed, the tilt angle between sunlight and the PV receiving panel, and the tilt angle between the PV panel and the ground. This richer feature set allows for more accurate predictions. Furthermore, based on permutation importance, a subset of important features are retained and derived. After multi-scale feature selection, the XGBoost model is used as the PV power prediction model for training and prediction. This fully utilizes important features, more closely approximating reality and resulting in more accurate predictions. Moreover, the XGBoost model exhibits excellent generalization ability, reducing the risk of overfitting and underfitting. It is also highly robust to noise and missing values ​​in the data, effectively handling outliers and remaining unaffected by noise, thus ensuring prediction stability.

[0023] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description

[0024] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0025] Figure 1 A flowchart of a photovoltaic power generation prediction method provided in an embodiment of this application is shown;

[0026] Figure 2 A schematic diagram of a photovoltaic power generation prediction method provided in an embodiment of this application is shown;

[0027] Figure 3 A schematic diagram of a photovoltaic power generation prediction device provided in an embodiment of this application is shown. Detailed Implementation

[0028] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, and not all of them. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present application. It should be noted that, unless otherwise specified, the embodiments and features in the embodiments of the present application can be combined with each other.

[0029] Photovoltaic power generation prediction results are influenced by a variety of factors. Currently, most photovoltaic power plant modeling still uses traditional static modeling methods, requiring more refined dynamic modeling methods that consider the combined influence of more practical factors, such as weather conditions and the inherent properties of photovoltaic equipment. This application's embodiments add some improvements to existing photovoltaic prediction technologies. Based on the original time-point features and irradiance data, it adds weather attributes (sunny, cloudy, overcast), temperature, wind speed, the tilt angle between sunlight and the photovoltaic receiving panel, and the tilt angle between the photovoltaic panel and the ground. According to permutation importance, some important feature information is retained and derived from these important features. After multi-scale feature selection, the XGBoost model is used as the photovoltaic power prediction model for training and prediction.

[0030] See Figure 1 The diagram shows a flowchart of a photovoltaic power generation prediction method provided in an embodiment of this application, including steps S101-S106.

[0031] S101: Obtain raw feature data for photovoltaic power prediction. The raw features include at least one of the following: time features, natural condition features, and panel parameter features.

[0032] As mentioned earlier, photovoltaic power generation prediction results are influenced by a variety of factors. Unlike traditional static modeling methods, this application adopts a more refined dynamic modeling method, taking into account the combined influence of more practical factors, such as weather conditions and the inherent properties of photovoltaic equipment. This application adds some improvements to existing photovoltaic prediction technologies, adding weather attributes (sunny, cloudy, overcast), temperature, wind speed, the tilt angle between sunlight and the photovoltaic receiving panel, and the tilt angle between the photovoltaic panel and the ground, to the original time-point characteristics and irradiance data.

[0033] Among them, time characteristics may include illumination time point characteristics and irradiance characteristics; natural condition characteristics may include weather attribute characteristics (sunny, cloudy, overcast), temperature characteristics, wind speed characteristics, and solar radiation characteristics; panel parameter characteristics may include photovoltaic receiving panel tilt angle characteristics and photovoltaic panel tilt angle with the ground characteristics.

[0034] S102: Process the original feature data to select the initial training set.

[0035] The purpose of processing the raw feature data is to extract as many features as possible from the raw data for the model to use. If the raw data is not processed and a large number of features are input into the model, the model training time will be too long. Therefore, by processing features, irrelevant or duplicate features are removed, and the number of features is reduced while ensuring the effectiveness of the features. This can improve the accuracy of the model, reduce the complexity of the model, and reduce the training time of the model.

[0036] In this embodiment of the application, the processing of the original feature data may include three steps: first, data preprocessing; second, feature initial screening; and third, feature engineering.

[0037] (1) Data preprocessing

[0038] For unprocessed raw data, the data features may contain outliers, not belonging to the same dimension, information redundancy, unusable qualitative features, missing values, and low information utilization. For outliers, outlier removal is necessary, for example, using an isolation forest to check for outliers and then pruning or removing them. For dimensionless features, data from different data cells can be converted to the same data cell; common dimensionless features include standardization and interval scaling. For information redundancy, such as certain quantitative features whose effective information is interval division, binarization can solve this problem. For unusable qualitative features, they need to be converted to quantitative features. For missing values, they need to be added. For low information utilization, quantitative variables can be multinomialized or other transformations can be performed to achieve nonlinearity.

[0039] After data preprocessing, we need to select meaningful features to input into machine learning algorithms and models for training. Generally, feature selection is considered from two aspects:

[0040] (2) Feature Filtering

[0041] After data preprocessing, meaningful features need to be selected for model training. Feature selection is typically considered from two aspects:

[0042] Whether a feature is divergent: If a feature is not divergent, for example, if the variance is close to 0, it means that the samples are basically the same in terms of this feature, and this feature does not play a role in distinguishing the samples.

[0043] Feature relevance to target: Features that are highly relevant to the target should be selected preferentially.

[0044] Based on the form of feature selection, feature selection methods can be divided into three types: Filtering, which scores each feature according to its divergence or relevance, sets a threshold or a number of features to be selected, and then selects features; Wrapper, which selects or excludes several features each time based on the objective function (usually a prediction performance score); and Embedded, which first uses certain algorithms and models to train and obtain the weight coefficients of each feature, and then selects features according to the coefficients from largest to smallest.

[0045] In one implementation, the feature selection process may include two parts: initial screening and feature engineering. The initial screening includes comparing the feature distribution of the preprocessed feature set with a pre-set feature validation set and removing features with inconsistent distributions. The feature engineering process may include performing feature selection based on at least one of the statistical results of numerical variable feature statistics, timestamp feature statistics, and interactive feature statistics to obtain an initial training set.

[0046] S103: For the initial training set, calculate the permutation importance of each feature.

[0047] In the embodiments of this application, the permutation importance of features is calculated by training the model using the above-described embedding method.

[0048] Permutation Importance is a commonly used type of feature importance. It means that if a feature is replaced with a randomly permuted value, the model score will decrease.

[0049] In one implementation, for an initial training set, the permutation importance of each feature is calculated, including: training a photovoltaic power prediction model (e.g., an XGBoost model) with the initial training set; making predictions on the initial training set, calculating accuracy scores, and determining the permutation importance of each feature based on the accuracy scores. The step of making predictions on the initial training set, calculating accuracy scores, and determining the permutation importance of each feature based on the accuracy scores further includes: permuting the value of the i-th feature in the initial training set while keeping other features unchanged, generating a permuted training set; inputting the permuted training set into the photovoltaic power prediction model (e.g., an XGBoost model) to obtain the prediction accuracy scores; and determining the permutation importance of the i-th feature based on the difference coefficient of the accuracy scores. The above steps for calculating permutation importance can be repeated several times and averaged to avoid the influence of random permutation uncertainty.

[0050] Assuming this embodiment uses the XGBoost model as the photovoltaic power generation prediction model, the XGBoost model is trained using an initial training set, and the permutation importance of each feature is determined based on the model's prediction results. In the subsequent step (S106), the model is trained again based on the selected derived features to obtain the final prediction result. Therefore, in one implementation, this embodiment trains the model at least twice: first, the model is trained using the initial training set to calculate the permutation importance of each feature, using this permutation importance for feature selection and derivation; then, the model is trained again using the target training set to obtain the final prediction result.

[0051] S104: Select target features based on permutation importance, and perform feature derivation processing on the target features to obtain derived features.

[0052] In this embodiment, in order to purposefully select target features based on permutation importance for features with high importance, feature derivation processing is performed only on the target features. For example, a permutation importance threshold is set, and features with permutation importance higher than this threshold are identified as target features, and subsequent derivation processing is performed on the target features.

[0053] Feature derivation refers to constructing new features based on the original features in order to increase the accuracy and interpretability of the model.

[0054] Feature derivation includes, but is not limited to: statistical derivation, time-series feature derivation, multinomial feature derivation, cross-combination derivation, exponential feature derivation, and grouped summary derivation. For example, statistical derivation is based on indicator calculation and statistics to derive features; multinomial feature derivation generates new features through power functions; cross-combination feature derivation combines two or more features; exponential feature derivation generates new features by calculating exponential functions of data; and grouped summary derivation is based on feature grouping and data statistics.

[0055] S105: Perform multi-strategy feature selection on the derived features, and summarize the features obtained by multi-strategy feature selection to obtain the target training set.

[0056] Multi-strategy feature selection refers to selecting derived features from multiple perspectives based on multiple strategies (multi-scale) to ultimately determine the target training set.

[0057] In one implementation,

[0058] Multi-strategy feature selection strategies include, but are not limited to: robust feature selection strategies, relevant feature selection strategies, and noncollinear feature selection strategies.

[0059] in,

[0060] 1. The process of selecting derived features based on a robust feature selection strategy may include: randomly shuffling each derived feature, calculating the performance loss of the photovoltaic power prediction model based on the shuffled derived features, calculating the importance score of the derived features based on the performance loss, and selecting derived features based on the importance score.

[0061] 2. The process of selecting derived features based on the relevant feature selection strategy may include: determining the correlation coefficient between derived features, calculating the correlation strength between derived features based on the correlation coefficient, and selecting derived features that are strongly correlated with the target variable based on the correlation strength.

[0062] 3. The process of selecting derived features based on the noncollinearity feature selection strategy may include: calculating the variance inflation factor of the i-th feature, determining the correlation between the i-th feature and other features based on the variance inflation factor, and selecting derived features based on the correlation.

[0063] S106: Train the photovoltaic power prediction model with the target training set, and use the photovoltaic power prediction model to predict photovoltaic power generation.

[0064] In this embodiment, a model based on the gradient boosting algorithm can be used. Gradient boosting is a type of boosting algorithm. Its main idea is to generate multiple weak learners, each aiming to fit the negative gradient of the loss function of the previously accumulated model, thus reducing the accumulated model loss in the direction of the negative gradient. Furthermore, it linearly combines base learners with different weights, allowing high-performing learners to be reused. Gradient boosting uses gradient descent in the function space to correct the model, making it better, and the final accumulated model is an approximately optimal function model.

[0065] Common gradient boosting algorithms include XGBoost (eXtreme Gradient Boosting), whose main advantage lies in reducing model error. Therefore, it employs multiple base learners, each relatively simple to avoid overfitting. The next learner learns from the results of the previous base learners. The basic idea is to continuously generate new trees, each learning from the difference between the previous tree and the target value, thereby reducing model bias. In other words, the sum of the results of all trees is the model's prediction for a sample. At each step, a better tree is selected / generated based on the objective function. The objective function consists of two parts: model error (the difference between the true and predicted values) and model structural error (a regularization term used to limit model complexity). When solving for the objective function of a binary tree, knowing the first and second derivatives of the loss function and which leaf node the sample falls on, i.e., calculating the first and second derivatives for each leaf node, allows us to determine the objective function.

[0066] As can be seen, Xgboost can handle large-scale datasets, has good generalization ability, reduces the risk of overfitting and underfitting, is highly robust to noise and missing values ​​in the data, can effectively handle outliers, and is not affected by noise. Therefore, in one embodiment of this application, the Xgboost model can be selected for training and prediction.

[0067] Therefore, in the photovoltaic power generation prediction method provided by the embodiments of this application, the original feature data covering weather factors, photovoltaic equipment attributes, etc. are first processed to obtain an initial training set. The Xgboost model is trained for the first time using the initial training set. The permutation importance of each feature can be calculated through the prediction results. Feature derivation processing is performed on the target features with high permutation importance, and multiple strategies are selected for the derived features to finally obtain the target training set. The Xgboost model is trained again with the target training set to obtain the prediction result of photovoltaic power generation.

[0068] This application's embodiments incorporate improvements to existing photovoltaic (PV) prediction technologies. In addition to the original time-point features and irradiance data, it adds weather attributes (sunny, cloudy, overcast), temperature, wind speed, the tilt angle between sunlight and the PV receiving panel, and the tilt angle between the PV panel and the ground. This richer feature set allows for more accurate predictions. Furthermore, based on permutation importance, a subset of important features are retained and derived. After multi-scale feature selection, the XGBoost model is used as the PV power prediction model for training and prediction. This fully utilizes important features, more closely approximating reality and resulting in more accurate predictions. Moreover, the XGBoost model exhibits excellent generalization ability, reducing the risk of overfitting and underfitting. It is also highly robust to noise and missing values ​​in the data, effectively handling outliers and remaining unaffected by noise, thus ensuring prediction stability.

[0069] The photovoltaic power generation prediction method provided in this application embodiment will be illustrated by a specific example below.

[0070] See Figure 2 The diagram shows a schematic of a photovoltaic power generation prediction method provided in an embodiment of this application. Figure 2 The process includes raw data, data preprocessing, initial feature screening, feature engineering, initial training of the XGBoost model, feature derivation, multi-strategy feature selection, retraining of the XGBoost model, and finally obtaining the prediction result.

[0071] The following is a detailed explanation of each part.

[0072] 1. Raw data

[0073] One part contains data such as temperature, wind speed, irradiance, time information, weather attributes (sunny, cloudy, rainy), tilt angle between the photovoltaic receiving panel and the ground, and angle between the photovoltaic receiving panel and the sunlight; the other part contains historical photovoltaic power data.

[0074] 2. Data Preprocessing

[0075] For example, using isolated forests to detect outliers allows outliers to be pruned or removed.

[0076] 3. Initial screening of features

[0077] Filter out features whose distributions are inconsistent between the training and validation sets to avoid overfitting.

[0078] 4. Feature Engineering

[0079] Feature selection is performed based on statistical characteristics (variance, maximum, minimum, median, summation) of numerical variables corresponding to categorical variables, statistical characteristics within timestamps, and interaction characteristics.

[0080] 5. Xbgoost model training

[0081] Permutation importance is calculated based on the training results. It is a commonly used type of feature importance. Permutation importance means that replacing a feature with a randomly permuted value will lead to a decrease in the model score.

[0082] The permutation importance can be calculated through the following steps: train the model using the training dataset (Xtrain, ytrain); make predictions on the training dataset (Xtrain, yhat) and calculate the accuracy score (score, the higher the score, the better); calculate the permutation importance of each feature (feature_i).

[0083] The specific methods for calculating the importance of permutations may include the following steps:

[0084] (1) Permutate the value of the i-th feature in the training dataset (featurei), keeping other features unchanged. Generate the permuted training dataset (Xtrain_permuted);

[0085] (2) Make predictions using the trained model and the Xtrainpermuted dataset (yhatpermuted);

[0086] (3) Calculate the corresponding accuracy score (score_permuted);

[0087] (4) The permutation importance of each feature is the corresponding difference coefficient (score_permuted-score).

[0088] (5) Repeat the above steps several times and take the average value to avoid the uncertainty of random permutation.

[0089] 6. Feature Derivation

[0090] In photovoltaic power prediction scenarios, feature derivation is often implemented for engineering processing of sample data, especially when there are few feature variables. In the embodiments of this application, important features are derived according to permutation importance, mainly including conventional statistical derivation, time series feature derivation, multinomial feature derivation, cross-combination derivation, and grouped summary derivation.

[0091] 7 Multi-strategy Feature Selection

[0092] Strategies may include: robust feature selection strategy (Null Importance), relevant feature selection strategy (Pearson-Correlation), and noncollinear feature selection strategy (VIF).

[0093] (1) Robust Feature Selection Strategy (Null Importance)

[0094] The Null Importance method estimates the importance of each feature by randomly shuffling each feature and calculating the model's performance loss. The main idea is to take the logarithm of the ratio of the feature importance under the true label to the feature importance after shuffling. In most cases, the Null Importance method can more accurately assess feature importance and help eliminate randomness and bias in feature selection. Its calculation formula is as follows:

[0095]

[0096] (2) Relevant Feature Selection Strategy (Pearson-Correlation)

[0097] The Pearson-Correlation method uses correlation coefficients to help identify the strength of correlation between features, thus finding features that are strongly correlated with the target variable. This method can also reduce the number of features, thereby improving the efficiency and accuracy of the model. The Pearson-Correlation formula is as follows:

[0098]

[0099] (3) Noncollinear Feature Selection Strategy (VIF)

[0100] Variance Inflation Factor (VIF) helps identify multicollinearity among features, indicating strong correlations that may lead to model instability or inaccurate parameter estimation. By calculating the VIF, the variance inflation factor of each feature can be determined, thus assessing its correlation with other features. The formula for calculating the VIF is as follows:

[0101]

[0102] Among them, R i This is the negative correlation coefficient between the independent variable and the other independent variables in a regression analysis. A larger variance inflation factor (VIF) indicates a greater likelihood of multicollinearity among the independent variables. Generally, if the VIF exceeds 10, the regression model exhibits severe multicollinearity.

[0103] Suppose that the feature sets after feature selection using Null Importance, Pearson-Correlation, and VIF are S1, S2, and S3, respectively, and the final feature set S f for:

[0104] S f =S1∩S2∩S3

[0105] 8. Retraining the XgBoost model

[0106] XGBoost can handle large-scale datasets, has good generalization ability, reduces the risk of overfitting and underfitting, is highly robust to noise and missing values ​​in the data, can effectively handle outliers, and is not affected by noise. Therefore, XGBoost model is chosen for training and prediction.

[0107] See Figure 3 The diagram shows a schematic representation of a photovoltaic power generation prediction device provided in an embodiment of this application.

[0108] The photovoltaic power generation prediction device includes:

[0109] The data acquisition unit 301 is used to acquire raw feature data for photovoltaic power prediction, wherein the raw features include at least one of time features, natural condition features, and panel parameter features.

[0110] The feature processing unit 302 is used to process the original feature data and select an initial training set;

[0111] The permutation importance calculation unit 303 is used to calculate the permutation importance of each feature for the initial training set;

[0112] The feature derivation unit 304 is used to select a target feature based on the permutation importance and perform feature derivation processing on the target feature to obtain a derived feature;

[0113] The feature selection unit 305 is used to perform multi-strategy feature selection on the derived features, and to summarize the features obtained by multi-strategy feature selection to obtain the target training set.

[0114] The model training and prediction unit 306 is used to train the photovoltaic power prediction model with the target training set and to use the photovoltaic power prediction model to predict photovoltaic power generation.

[0115] In one implementation,

[0116] The time characteristics include at least one of the characteristics of irradiation time point and irradiance; the natural condition characteristics include at least one of the characteristics of weather attributes, temperature, wind speed, and sunlight; the panel parameter characteristics include at least one of the characteristics of photovoltaic receiving panel tilt angle and photovoltaic panel tilt angle with ground.

[0117] In one implementation, the feature processing unit 302 is specifically used for:

[0118] Data preprocessing: Detect outliers in the original feature data and remove abnormal data;

[0119] Feature filtering process: The feature set after data preprocessing is compared with the feature validation set beforehand, and features with inconsistent distributions are removed; and / or, based on at least one of the statistical results of numerical variable feature statistics, timestamp feature statistics, and interaction feature statistics, feature filtering is performed to obtain the initial training set.

[0120] In one implementation, the permutation importance calculation unit 303 is specifically used to: train the photovoltaic power prediction model with the initial training set, make predictions on the initial training set, calculate the accuracy score, and determine the permutation importance of each feature based on the accuracy score.

[0121] In one implementation, the permutation importance calculation unit 303 is specifically used to: permutate the value of the i-th feature in the initial training set while keeping other features unchanged, to generate a permuted training set; input the permuted training set into the photovoltaic power prediction model to obtain the prediction accuracy score; and determine the permutation importance of the i-th feature based on the difference coefficient of the accuracy score.

[0122] In one implementation, the feature derivation unit 304 is specifically used to perform at least one of the following on the target feature: statistical derivation processing, time-series feature derivation processing, multinomial feature derivation processing, cross-combination derivation processing, and grouping summary derivation processing.

[0123] In one implementation, the feature selection unit 305 is specifically used for:

[0124] The derived features are selected based on at least one of a robust feature selection strategy, a relevant feature selection strategy, and a noncollinear feature selection strategy;

[0125] in,

[0126] The selection of derived features based on a robust feature selection strategy includes: randomly shuffling each derived feature, calculating the performance loss of the photovoltaic power prediction model based on the shuffled derived features, calculating the importance score of the derived features based on the performance loss, and selecting derived features based on the importance score.

[0127] Selecting derived features based on a relevant feature selection strategy includes: determining the correlation coefficient between derived features, calculating the correlation strength between derived features based on the correlation coefficient, and selecting derived features that are strongly correlated with the target variable based on the correlation strength.

[0128] The selection of derived features based on the noncollinearity feature selection strategy includes: calculating the variance inflation factor of the i-th feature, determining the correlation degree between the i-th feature and other features based on the variance inflation factor, and selecting derived features based on the correlation degree.

[0129] Embodiments of this application also provide a storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above method embodiments when running.

[0130] Optionally, in this embodiment, the storage medium may be configured to store a computer program for performing the following steps:

[0131] Obtain raw feature data for photovoltaic power prediction, wherein the raw features include at least one of time features, natural condition features, and panel parameter features;

[0132] The original feature data is processed to select an initial training set;

[0133] For the initial training set, calculate the permutation importance of each feature;

[0134] Based on the permutation importance, target features are selected, and feature derivation processing is performed on the target features to obtain derived features;

[0135] A multi-strategy feature selection is performed on the derived features, and the features obtained from the multi-strategy feature selection are summarized to obtain the target training set;

[0136] The photovoltaic power prediction model is trained using the target training set to obtain the photovoltaic power prediction results.

[0137] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing computer programs, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0138] Embodiments of this application also provide an electronic device, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.

[0139] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.

[0140] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:

[0141] Obtain raw feature data for photovoltaic power prediction, wherein the raw features include at least one of time features, natural condition features, and panel parameter features;

[0142] The original feature data is processed to select an initial training set;

[0143] For the initial training set, calculate the permutation importance of each feature;

[0144] Based on the permutation importance, target features are selected, and feature derivation processing is performed on the target features to obtain derived features;

[0145] A multi-strategy feature selection is performed on the derived features, and the features obtained from the multi-strategy feature selection are summarized to obtain the target training set;

[0146] The photovoltaic power prediction model is trained using the target training set to obtain the photovoltaic power prediction results.

[0147] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.

[0148] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0149] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0150] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

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

[0152] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0153] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.

[0154] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A method for predicting photovoltaic power generation, characterized in that, include: Obtain raw feature data for photovoltaic power prediction, wherein the raw features include at least one of time features, natural condition features, and panel parameter features; The original feature data is processed to select an initial training set; For the initial training set, calculate the permutation importance of each feature; Based on the permutation importance, target features are selected, and feature derivation processing is performed on the target features to obtain derived features; Multi-strategy feature selection is performed on the derived features, and the features obtained from the multi-strategy feature selection are summarized to obtain the target training set; A photovoltaic power prediction model is trained using the target training set, and the photovoltaic power prediction model is used to predict photovoltaic power generation. The step of calculating the permutation importance of each feature for the initial training set includes: training a photovoltaic power prediction model with the initial training set, permuting the value of the i-th feature in the initial training set while keeping other features unchanged, and generating a permuted training set; inputting the permuted training set into the photovoltaic power prediction model to obtain the prediction accuracy score; and determining the permutation importance of the i-th feature based on the difference coefficient of the accuracy score. The multi-strategy feature selection for derived features includes: selecting derived features based on at least one of robust feature selection strategy, relevant feature selection strategy, and noncollinear feature selection strategy; The selection of derived features based on a robust feature selection strategy includes: randomly shuffling each derived feature, calculating the performance loss of the photovoltaic power prediction model based on the shuffled derived features, calculating the importance score of the derived features based on the performance loss, and selecting derived features based on the importance score. Selecting derived features based on a relevant feature selection strategy includes: determining the correlation coefficient between derived features, calculating the correlation strength between derived features based on the correlation coefficient, and selecting derived features that are strongly correlated with the target variable based on the correlation strength. The selection of derived features based on the noncollinearity feature selection strategy includes: calculating the variance inflation factor of the i-th feature, determining the correlation degree between the i-th feature and other features based on the variance inflation factor, and selecting derived features based on the correlation degree. The features obtained from multi-strategy feature selection are summarized, including: feature sets selected by robust feature selection strategy, relevant feature selection strategy, and noncollinearity feature selection strategy, respectively. , , The final feature set for: = ∩ ∩ .

2. The method according to claim 1, characterized in that, The time characteristics include at least one of the characteristics of irradiation time point and irradiance; the natural condition characteristics include at least one of the characteristics of weather attributes, temperature, wind speed, and sunlight; the panel parameter characteristics include at least one of the characteristics of photovoltaic receiving panel tilt angle and photovoltaic panel tilt angle with ground.

3. The method according to claim 1, characterized in that, The process of processing the original feature data to select an initial training set includes: Data preprocessing: Detect outliers in the original feature data and remove abnormal data; Feature filtering process: The feature set after data preprocessing is compared with the feature validation set beforehand, and features with inconsistent distributions are removed; and / or, based on at least one of the statistical results of numerical variable feature statistics, timestamp feature statistics, and interaction feature statistics, feature filtering is performed to obtain the initial training set.

4. The method according to claim 1, characterized in that, The feature derivation process for the target features includes: The target feature is subjected to at least one of the following: statistical derivation processing, time-series feature derivation processing, multinomial feature derivation processing, cross-combination derivation processing, and grouping summary derivation processing.

5. A photovoltaic power generation prediction device, characterized in that, include: The data acquisition unit is used to acquire raw feature data for photovoltaic power prediction, wherein the raw features include at least one of time features, natural condition features, and panel parameter features; The feature processing unit is used to process the original feature data and select an initial training set. The permutation importance calculation unit is used to calculate the permutation importance of each feature for the initial training set; The feature derivation unit is used to select target features based on the permutation importance and perform feature derivation processing on the target features to obtain derived features; The feature selection unit is used to perform multi-strategy feature selection on the derived features, and summarizes the features obtained by multi-strategy feature selection to obtain the target training set; The model training and prediction unit is used to train the photovoltaic power prediction model with the target training set and to use the photovoltaic power prediction model to predict photovoltaic power generation. The permutation importance calculation unit is further configured to: train a photovoltaic power prediction model using the initial training set, permutate the value of the i-th feature in the initial training set while keeping other features unchanged, and generate a permuted training set; input the permuted training set into the photovoltaic power prediction model to obtain the prediction accuracy score; and determine the permutation importance of the i-th feature based on the difference coefficient of the accuracy score. The feature selection unit is also used to: select derived features based on at least one of robust feature selection strategy, relevant feature selection strategy, and noncollinear feature selection strategy; The selection of derived features based on a robust feature selection strategy includes: randomly shuffling each derived feature, calculating the performance loss of the photovoltaic power prediction model based on the shuffled derived features, calculating the importance score of the derived features based on the performance loss, and selecting derived features based on the importance score. Selecting derived features based on a relevant feature selection strategy includes: determining the correlation coefficient between derived features, calculating the correlation strength between derived features based on the correlation coefficient, and selecting derived features that are strongly correlated with the target variable based on the correlation strength. The selection of derived features based on the noncollinearity feature selection strategy includes: calculating the variance inflation factor of the i-th feature, determining the correlation degree between the i-th feature and other features based on the variance inflation factor, and selecting derived features based on the correlation degree. The feature sets after feature selection using robust feature selection strategy, relevant feature selection strategy, and noncollinearity feature selection strategy are respectively , , The final feature set for: = ∩ ∩ .

6. A storage medium, characterized in that, The storage medium stores a computer program, wherein the computer program is configured to execute the method described in any one of claims 1 to 4 when it is run.

7. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the method as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Method and system for retraining machine learning model

    CN110956278A

  • Prediction model training method and device, prediction method and device, electronic equipment and storage medium

    CN115204260A