Model training method, optical power prediction method, device, equipment and storage medium
By performing characteristic engineering processing of the historical meteorological data of photovoltaic power plants and training machine learning models, using forecast meteorological data to predict optical power, the problem of low prediction efficiency of photovoltaic power plants in the existing technology is solved, and efficient and accurate optical Power prediction.
Patent Information
- Application Number
- CN202110124736.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-01-29
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2041-01-29
AI Technical Summary
Existing photovoltaic power plants are inefficient when predicting optical power, mainly due to climate differences in different locations and multiple influencing factors, resulting in large amounts of manual calculations and low efficiency.
By obtaining historical meteorological data and optical power, feature engineering is performed to extract trend characteristics, train machine learning models, use forecast meteorological data to predict optical power, reduce manual calculations, and improve prediction efficiency and accuracy.
It realizes optical power prediction without manual calculation, improves prediction efficiency and accuracy, can learn short-term changes in historical meteorological data, and improves the accuracy of predicting optical power.
Smart Images

Figure CN112906757B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of photovoltaic power generation technology, and in particular to a model training method, an optical power prediction method, a device, an equipment and a storage medium. Background Art
[0002] Photovoltaic power generation refers to a technology that uses the photovoltaic effect on the surface of semiconductors to convert light energy into electrical energy. Due to the uncertainty of irradiation intensity (a quantitative value that measures the intensity of light), the power of photovoltaic power generation (i.e., light power) may change dramatically, thus causing an impact on the power grid, so it is necessary to predict light power.
[0003] At present, the staff of photovoltaic power plants usually predict the optical power based on historical weather data and the optical power of the photovoltaic power plant or other photovoltaic power plants corresponding to the historical weather data, combined with their own experience, and according to the weather data corresponding to the time period when the optical power prediction needs to be made.
[0004] Due to the different climates at different photovoltaic power plants and the large number of factors that affect light power in weather data, a large amount of manual calculations are required in the process of predicting light power, resulting in low efficiency. Summary of the invention
[0005] The present application provides a model training method, an optical power prediction method, an apparatus, a device and a storage medium, which can improve the efficiency of predicting optical power. The technical solution is as follows:
[0006] According to one aspect of the present application, a model training method is provided, the method comprising:
[0007] Obtain historical meteorological data and historical optical power at historical moments;
[0008] Performing feature engineering processing on the historical meteorological data to obtain trend features corresponding to the historical meteorological data, wherein the trend features are used to reflect the change characteristics of the historical meteorological data;
[0009] A machine learning model is trained based on the historical meteorological data, the trend characteristics and the historical optical power, and the machine learning model is used to predict the optical power based on the forecast meteorological data.
[0010] According to another aspect of the present application, a method for predicting optical power is provided, the method comprising:
[0011] Obtaining forecast meteorological data at a forecast time within a first forecast period;
[0012] Performing feature engineering processing on the forecast meteorological data to obtain trend features corresponding to the forecast meteorological data, wherein the trend features are used to reflect the change characteristics of the forecast meteorological data;
[0013] The forecast meteorological data and the trend characteristics are input into a machine learning model to output predicted optical power. The machine learning model is trained through historical meteorological data, historical trend characteristics corresponding to the historical meteorological data, and historical optical power.
[0014] According to another aspect of the present application, a model training device is provided, the device comprising:
[0015] An acquisition module is used to obtain historical meteorological data and historical optical power at historical moments;
[0016] A processing module, used for performing feature engineering processing on the historical meteorological data to obtain trend features corresponding to the historical meteorological data, wherein the trend features are used to reflect the change characteristics of the historical meteorological data;
[0017] A training module is used to train a machine learning model based on the historical meteorological data, the trend characteristics and the historical optical power, and the machine learning model is used to predict the optical power based on the forecast meteorological data.
[0018] In an optional design, the trend feature includes at least one of a multiple feature, a time series feature, a discretization feature, a meteorological lag feature, a meteorological future feature, a meteorological change rate feature, a meteorological change trend feature, and a dynamic radiation intensity feature;
[0019] Among them, the multiple features are used to reflect the characteristics of the historical meteorological data under different indexes, the time series features are used to reflect the time period corresponding to the historical meteorological data, the discretization features are used to reflect the stage change characteristics of the historical meteorological data, the meteorological lag features are used to reflect the characteristics of the meteorological data before the historical meteorological data, the meteorological future features are used to reflect the characteristics of the meteorological data after the historical meteorological data, the meteorological change rate features are used to reflect the change rate of the historical meteorological data, the meteorological change trend features are used to reflect the change amplitude of the historical meteorological data, and the dynamic radiation features are used to reflect the differences in historical meteorological data from different sources.
[0020] In an optional design, the historical meteorological data includes irradiance intensity data, the trend characteristics include multiple characteristics; and the processing module is used to:
[0021] The irradiation intensity data is subjected to at least one of an increase index processing and a decrease index processing to obtain the multiple features.
[0022] In an optional design, the trend feature includes a time series feature; and the processing module is used to:
[0023] The time period in which the historical moment corresponding to the historical meteorological data lies is determined as the time series feature.
[0024] In an optional design, the historical meteorological data includes irradiance intensity data, the trend characteristics include discretization characteristics; and the processing module is used to:
[0025] The irradiation intensity data is discretized to obtain the discretized features.
[0026] In an optional design, the trend feature includes a meteorological hysteresis feature; the processing module is used to:
[0027] Determining the first historical meteorological data at the first historical moment as the meteorological lag feature corresponding to the second historical meteorological data;
[0028] The second historical moment corresponding to the second historical meteorological data is after the first historical moment.
[0029] In an optional design, the trend characteristics include future meteorological characteristics; the processing module is used to:
[0030] Determining the third historical meteorological data at the third historical moment as the meteorological lag feature corresponding to the fourth historical meteorological data;
[0031] Among them, the fourth historical moment corresponding to the fourth historical meteorological data is before the third historical moment.
[0032] In an optional design, the historical meteorological data includes irradiance intensity data, the trend characteristics include meteorological change rate characteristics; and the processing module is used to:
[0033] Determine the quotient of the difference between the irradiance intensity data at the fifth historical moment and the irradiance intensity data at the sixth historical moment and the irradiance intensity data at the sixth historical moment as the meteorological change rate characteristic corresponding to the historical meteorological data at the fifth historical moment;
[0034] Among them, the fifth historical moment is after the sixth historical moment.
[0035] In an optional design, the historical meteorological data includes irradiance intensity data, and the trend characteristics include meteorological change trend characteristics; the processing module is used to:
[0036] The difference between the irradiance intensity data at the seventh historical moment and the average irradiance intensity corresponding to the target historical period is determined as the meteorological change trend characteristic corresponding to the historical meteorological data at the seventh historical moment;
[0037] Among them, the seventh historical moment is after the target historical period.
[0038] In an optional design, the historical meteorological data belongs to at least two sources, the historical meteorological data includes irradiance intensity data, and the trend characteristics include dynamic irradiance intensity characteristics; the processing module is used to:
[0039] The average value of at least two irradiance intensity data from different sources at the same historical moment and at least one of the sum and difference between the standard deviations of the at least two irradiance intensity data are determined as the dynamic irradiance intensity characteristic corresponding to the historical meteorological data at the historical moment.
[0040] In an optional design, the machine learning model includes at least two sub-machine learning models, and the apparatus further includes:
[0041] A partitioning module, used for partitioning the data set according to the historical moments to obtain a training set and a validation set, wherein the data set includes the historical meteorological data, the trend characteristics, and the historical optical power;
[0042] The training module is used to train the at least two sub-machine models by cross-validation according to the training set and the validation set.
[0043] According to another aspect of the present application, an optical power prediction device is provided, the device comprising:
[0044] An acquisition module, used to acquire the forecast meteorological data at the prediction time within the first prediction period;
[0045] A processing module, used for performing feature engineering processing on the forecast meteorological data to obtain trend features corresponding to the forecast meteorological data, wherein the trend features are used to reflect the change characteristics of the forecast meteorological data;
[0046] The prediction module is used to input the forecast meteorological data and the trend characteristics into a machine learning model and output the predicted optical power. The machine learning model is trained through historical meteorological data, historical trend characteristics corresponding to the historical meteorological data, and historical optical power.
[0047] In an optional design, the machine learning model includes at least two sub-machine learning models; the prediction module is used to:
[0048] Inputting the forecast meteorological data and the trend characteristics into the sub-machine learning model, and outputting at least two predicted optical powers;
[0049] The arithmetic mean of the at least two predicted optical powers is determined as the predicted optical power to be output; or the weighted average of the at least two predicted optical powers is determined as the predicted optical power to be output.
[0050] In an optional design, the acquisition module is used to:
[0051] Acquire forecast meteorological data at a forecast time within a second forecast period, wherein the second forecast period includes the first forecast period;
[0052] The prediction module is used to:
[0053] Inputting the forecast meteorological data and trend characteristics corresponding to the second prediction period into the machine learning model, and outputting the predicted optical power of the second prediction period;
[0054] The predicted optical power of the second prediction period, among the predicted optical powers of the second prediction period, that belongs to the first prediction period is output.
[0055] According to another aspect of the present application, a computer device is provided, which includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the model training method or the optical power prediction method as described above.
[0056] According to another aspect of the present application, a computer-readable storage medium is provided, in which at least one program code is stored, and the program code is loaded and executed by a processor to implement the model training method or optical power prediction method as described above.
[0057] According to another aspect of the present application, a computer program product or a computer program is provided, the computer program product or the computer program including computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the model training method or the optical power prediction method provided in various optional implementations of the above aspects.
[0058] The beneficial effects of the technical solution provided by this application include at least:
[0059] By training the machine learning model based on historical meteorological data and historical optical power at historical moments, the machine learning model can predict optical power based on forecast meteorological data. When predicting optical power through the machine learning model, no manual calculation is required, thereby improving the efficiency of predicting optical power. In addition, feature engineering processing of historical meteorological data can enable the machine learning model to learn the short-term variation characteristics of historical meteorological data, thereby improving the accuracy of predicting optical power. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0061] Figure 1 is a schematic diagram of a process for implementing optical power prediction provided by an exemplary embodiment of the present application;
[0062] Figure 2 is a flowchart of a model training method provided by an exemplary embodiment of the present application;
[0063] Figure 3 is a flow chart of an optical power prediction method provided by an exemplary embodiment of the present application;
[0064] Figure 4 is a flow chart of an optical power prediction method provided by another exemplary embodiment of the present application;
[0065] Figure 5 is a schematic diagram of an implementation process of predicting optical power provided in an embodiment of the present application;
[0066] Figure 6 is a structural schematic diagram of a model training device provided by an exemplary embodiment of the present application;
[0067] Figure 7 is a structural schematic diagram of a model training device provided by another exemplary embodiment of the present application;
[0068] Figure 8 is a structural schematic diagram of an optical power prediction device provided by an exemplary embodiment of the present application;
[0069] Fig. 9 It is a schematic diagram of the structure of a server provided by an exemplary embodiment of the present application.
[0070] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application. DETAILED DESCRIPTION
[0071] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0072] Figure 1 FIG. 1 is a schematic diagram of a process for implementing optical power prediction provided by an exemplary embodiment of the present application. Figure 1 As shown, in stage 101 of training the machine learning model, the computer device obtains historical meteorological data and historical optical power at historical moments, and performs data cleaning on the acquired historical meteorological data and historical optical power. Afterwards, the computer device performs feature engineering processing on the historical meteorological data to obtain trend features corresponding to the historical meteorological data. The trend features are used to reflect the changing characteristics of the historical meteorological data. The trend features include at least one of multiple features, time series features, discretization features, meteorological lag features, meteorological future features, meteorological change rate features, meteorological change trend features, and dynamic irradiation intensity features. Afterwards, the computer device trains the machine learning model based on the historical meteorological data, trend features, and historical optical power. The machine learning model is used to predict optical power based on forecast meteorological data. The machine learning model includes at least two sub-machine learning models. When training the machine learning model, the computer device divides the data set consisting of historical meteorological data, trend features, and historical optical power into a training set and a validation set, and trains the machine learning based on the test set and the validation set in a cross-validation manner.
[0073] In the stage 102 of using the machine learning model to predict the optical power, the computer device obtains the forecast meteorological data at the prediction time in the first prediction period, and performs data cleaning on the obtained data. After that, the computer device performs feature engineering processing on the forecast meteorological data in the first prediction period to obtain the trend characteristics corresponding to the forecast meteorological data. The trend characteristics are used to reflect the changing characteristics of the forecast meteorological data. The process of data cleaning and feature engineering processing of the forecast meteorological data by the computer device is the same as the process of data cleaning and feature engineering processing of the historical meteorological data when training the machine model. After that, the computer device inputs the forecast meteorological data and trend characteristics into the trained machine learning model and outputs the predicted optical power. The machine learning model is obtained by training the above-mentioned historical meteorological data, the historical trend characteristics corresponding to the historical meteorological data, and the historical optical power. The machine learning model includes at least two sub-machine learning models. When the computer device predicts the optical power through the machine learning model, the arithmetic mean or weighted average of the optical power predicted by each sub-machine learning model is determined as the predicted optical power outputted finally. Optionally, the computer device can also obtain the forecast meteorological data at the prediction time in the second prediction period, and the second prediction period includes the first prediction period. Then, the forecast meteorological data and trend characteristics corresponding to the second forecast period are input into the machine learning model, and the predicted optical power of the second forecast period is output. And the predicted optical power of the second forecast period that belongs to the first forecast period is output.
[0074] When predicting optical power in the above manner, no manual calculation is required, thereby improving the efficiency of predicting optical power. In addition, feature engineering of historical meteorological data can enable the machine learning model to learn the short-term variation characteristics of historical meteorological data, thereby improving the accuracy of predicting optical power.
[0075] Figure 2 FIG. 1 is a flow chart of a model training method provided by an exemplary embodiment of the present application. The method can be used in a computer device or a client on a computer device. Figure 2 As shown, the method includes:
[0076] Step 201: Obtain historical meteorological data and historical optical power at historical moments.
[0077] The historical meteorological data includes irradiance intensity data, which is used to quantify the intensity of light. The historical meteorological data can also include temperature, humidity, wind speed, and air pressure. The historical moment belongs to a historical period, which is any period in the past. For each historical moment, the historical meteorological data corresponds to the historical light power. The historical light power is the power generated by the photovoltaic power plant through photovoltaics at the historical moment corresponding to the historical light power. The historical meteorological data is the meteorological data of the area where the power plant is located.
[0078] Optionally, the historical meteorological data includes multiple sources, such as provided by different weather forecast service providers, that is, at the same historical moment, the historical light power corresponds to multiple historical meteorological data. Moreover, the historical meteorological data and the corresponding historical light power belong to different photovoltaic power plants, that is, at the same historical moment, there are multiple sets of corresponding historical meteorological data and historical light power.
[0079] The historical meteorological data and historical optical power acquired by the computer equipment are uploaded by the management personnel of the photovoltaic power plant, or are acquired by the computer equipment from a server providing meteorological forecast services.
[0080] Step 202: Perform feature engineering processing on the historical meteorological data to obtain trend features corresponding to the historical meteorological data.
[0081] The trend feature is used to reflect the change characteristics of historical meteorological data. Optionally, the trend feature includes at least one of multiple features, time series features, discretization features, meteorological lag features, meteorological future features, meteorological change rate features, meteorological change trend features, and dynamic irradiance intensity features. The trend feature can reflect the change characteristics of historical meteorological data in a short period of time.
[0082] Among them, multiple features are used to reflect the characteristics of historical meteorological data under different indexes. Time series features are used to reflect the time period corresponding to historical meteorological data. Discretization features are used to reflect the stage change characteristics of historical meteorological data. Meteorological lag features are used to reflect the characteristics of meteorological data before historical meteorological data. Meteorological future features are used to reflect the characteristics of meteorological data after historical meteorological data. Meteorological change rate features are used to reflect the rate of change of historical meteorological data. Meteorological change trend features are used to reflect the magnitude of change in historical meteorological data. Dynamic irradiation features are used to reflect the differences in historical meteorological data from different sources.
[0083] Step 203: Train a machine learning model based on historical meteorological data, trend characteristics, and historical optical power.
[0084] The machine learning model is used to predict optical power based on forecast meteorological data. Optionally, the machine learning model includes at least one of a linear regression model, a random forest model, and an Extreme Gradient Boosting (XGBoost) model. The computer device trains the machine learning model based on a data sequence consisting of historical meteorological data, trend characteristics, and historical optical power belonging to the same historical moment.
[0085] In summary, the method provided in this embodiment trains a machine learning model based on historical meteorological data and historical optical power at historical moments, and the machine learning model can predict optical power based on forecast meteorological data. When predicting optical power through the machine learning model, no manual calculation is required, thereby improving the efficiency of predicting optical power. In addition, feature engineering processing of historical meteorological data can enable the machine learning model to learn the short-term variation characteristics of historical meteorological data, thereby improving the accuracy of predicting optical power.
[0086] Figure 3 FIG. 1 is a flow chart of an optical power prediction method provided by an exemplary embodiment of the present application. The method can be used in a computer device or a client on a computer device. Figure 3 As shown, the method includes:
[0087] Step 301: Obtain the forecast meteorological data at the prediction time within the first prediction period.
[0088] The first prediction period is the period for which light power prediction is required. For example, if the light power of tomorrow needs to be predicted, the first prediction period is from 00:00 to 24:00 tomorrow. The forecast meteorological data includes irradiation intensity data, and can also include temperature, humidity, wind speed, and air pressure. The forecast meteorological data is data for the area where the photovoltaic power plant for which light power prediction is required is located.
[0089] The forecast weather data at the forecast time within the first forecast period obtained by the computer device is uploaded by the manager of the photovoltaic power plant, or is obtained by the computer device from a server providing weather forecast services according to the first forecast period selected by the manager of the photovoltaic power plant.
[0090] Step 302: Perform feature engineering processing on the forecast meteorological data to obtain trend features corresponding to the forecast meteorological data.
[0091] The trend feature is used to reflect the changing characteristics of the forecast meteorological data. Optionally, the trend feature includes at least one of multiple features, time series features, discretization features, meteorological lag features, meteorological future features, meteorological change rate features, meteorological change trend features, and dynamic irradiance intensity features. The trend feature can reflect the changing characteristics of the forecast meteorological data in the short term. The process of the computer device performing feature engineering on the forecast meteorological data is the same as the process of performing feature engineering on the historical meteorological data when training a machine model for predicting optical power.
[0092] Step 303: Input the forecast meteorological data and trend characteristics into the machine learning model and output the predicted optical power.
[0093] The machine learning model is trained through historical meteorological data, historical trend features corresponding to the historical meteorological data, and historical optical power. When predicting optical power based on forecast meteorological data, the computer equipment also performs feature engineering on the forecast meteorological data. In addition, the dimensions of the data included in the forecast meteorological data are the same as those of the historical meteorological data. Therefore, data alignment of the input data can be guaranteed.
[0094] Optionally, the machine learning model includes at least one of a linear regression model, a random forest model, and an extreme gradient boosting model (XGBoost). The computer device can predict the predicted optical power at the same prediction moment through the machine learning model based on the forecast meteorological data and trend characteristics belonging to the same prediction moment, so as to finally obtain the predicted optical power within the first prediction period.
[0095] In summary, the method provided in this embodiment performs feature engineering on the forecast meteorological data, and predicts the optical power through a machine learning model based on the forecast meteorological data and trend characteristics. When the optical power is predicted by the machine learning model, no manual calculation is required, thereby improving the efficiency of predicting the optical power.
[0096] Figure 4 FIG. 1 is a flow chart of an optical power prediction method provided by another exemplary embodiment of the present application. The method can be used in a computer device or a client on a computer device. Figure 4 As shown, the method includes:
[0097] Step 401: Obtain historical meteorological data and historical optical power at historical moments.
[0098] The historical meteorological data includes irradiance intensity data, which is used to quantify the intensity of light. The historical meteorological data can also include temperature, humidity, wind speed, and air pressure. Among them, the influence of irradiance intensity data on optical power is greater than the influence of meteorological data in other dimensions on optical power. The historical moment belongs to a historical period, which is any period in the past. For each historical moment, the historical meteorological data corresponds to historical optical power. The historical optical power is the power generated by photovoltaic power plants through photovoltaics at the historical moment corresponding to the historical optical power. The historical meteorological data is the meteorological data of the area where the power plant is located.
[0099] When the computer equipment obtains historical meteorological data and historical optical power, it will also perform data cleaning on the historical meteorological data and historical optical power. For example, the computer equipment will process the data that does not meet the consistency, invalid data, and data with missing values in the historical meteorological data. In addition, the computer equipment will roughly estimate the optical power based on the polynomial regression method according to the historical meteorological data obtained, and compare the optical power with the obtained historical optical power, thereby achieving data cleaning of the historical optical power.
[0100] Step 402: Perform feature engineering processing on the historical meteorological data to obtain trend features corresponding to the historical meteorological data.
[0101] The trend feature is used to reflect the change characteristics of historical meteorological data. Optionally, the trend feature includes at least one of multiple features, time series features, discretization features, meteorological lag features, meteorological future features, meteorological change rate features, meteorological change trend features, and dynamic irradiation intensity features.
[0102] Among them, multiple features are used to reflect the characteristics of historical meteorological data under different indexes. Time series features are used to reflect the time period corresponding to historical meteorological data. Discretization features are used to reflect the stage change characteristics of historical meteorological data. Meteorological lag features are used to reflect the characteristics of meteorological data before historical meteorological data. Meteorological future features are used to reflect the characteristics of meteorological data after historical meteorological data. Meteorological change rate features are used to reflect the rate of change of historical meteorological data. Meteorological change trend features are used to reflect the magnitude of change in historical meteorological data. Dynamic irradiation features are used to reflect the differences in historical meteorological data from different sources.
[0103] Optionally, the historical meteorological data includes irradiance intensity data, and the trend characteristics include multiple characteristics. The computer device performs at least one of increasing index processing and decreasing index processing on the irradiance intensity data to obtain multiple characteristics. For example, if the irradiance intensity data at a certain historical moment is a, the computer device will calculate a 2 as well as The computer device can also perform at least one of increasing index processing and decreasing index processing on data of other dimensions (such as humidity) in the historical meteorological data, and use them as the multiple features corresponding to the historical meteorological data.
[0104] Optionally, the trend feature includes a time series feature. The computer device determines the time period of the historical moment corresponding to the historical meteorological data as a time series feature. For example, historical moment 1 is 15:00 on August 1, 2020, and historical moment 2 is 15:00 on August 2, 2020. The computer device determines that 15:00 on August 1, 2020 belongs to the 31st week of the year, and determines that 15:00 on August 2, 2020 belongs to the 32nd week of the year. The computer device determines the 31st week of the year as the time series feature of the historical meteorological data corresponding to historical moment 1, and determines the 32nd week of the year as the time series feature of the historical meteorological data corresponding to historical moment 2.
[0105] Optionally, the historical meteorological data includes irradiance intensity data, and the trend characteristics include discretization characteristics. The computer device discretizes the irradiance intensity data to obtain discretization characteristics. For example, the computer device determines the preset interval to which the irradiance intensity at a historical moment belongs according to the preset interval, and determines the value corresponding to the preset interval as the discretization characteristic of the historical meteorological data. The preset interval is determined by the computer device. For example, the preset intervals include [0, 30), [30, 100) and [100, ∞), and the corresponding values are 1, 2 and 3 respectively. When the irradiance intensity data is 15, the corresponding discretization characteristic is 1. When the irradiance intensity is 50, the corresponding discretization characteristic is 2. When the irradiance intensity is 150, the corresponding discretization characteristic is 3. The computer device can also discretize data of other dimensions in the historical meteorological data to obtain discretization characteristics.
[0106] Optionally, the trend feature includes a meteorological lag feature. The computer device determines the first historical meteorological data of the first historical moment as the meteorological lag feature corresponding to the second historical meteorological data. The second historical moment corresponding to the second historical meteorological data is after the first historical moment. For example, the computer device determines the meteorological lag feature according to a first preset interval. The first preset interval is determined by the computer device, for example, 30 minutes. The computer device determines the first historical moment 30 minutes before the second historical moment based on the first preset interval, and determines the first historical meteorological data of the first historical moment as the meteorological lag feature corresponding to the second historical meteorological data. When determining the meteorological lag feature, the computer device only uses the irradiance intensity data in the historical meteorological data.
[0107] Optionally, the trend feature includes a meteorological future feature. The computer device determines the third historical meteorological data of the third historical moment as the meteorological lag feature corresponding to the fourth historical meteorological data. The fourth historical moment corresponding to the fourth historical meteorological data is before the third historical moment. For example, the computer device determines the meteorological future feature according to a second preset interval. The second preset interval is determined by the computer device, for example, 30 minutes. The computer device determines the third historical moment 30 minutes after the fourth historical moment based on the second preset interval, and determines the third historical meteorological data of the third historical moment as the meteorological future feature corresponding to the fourth historical meteorological data. When determining the meteorological future feature, the computer device only uses the irradiance intensity data in the historical meteorological data.
[0108] Optionally, the historical meteorological data includes irradiance intensity data, and the trend feature includes a meteorological change rate feature. The computer device determines the difference between the irradiance intensity data at the fifth historical moment and the irradiance intensity data at the sixth historical moment, and the quotient of the irradiance intensity data at the sixth historical moment as the meteorological change rate feature corresponding to the historical meteorological data at the fifth historical moment. The fifth historical moment is after the sixth historical moment. For example, the meteorological change rate feature Rd corresponding to the historical meteorological data at the fifth historical moment is i satisfy:
[0109]
[0110] Among them, R i represents the irradiance data at the i-th historical moment (the fifth historical moment), R i-1 represents the radiation intensity data of a historical moment before the i-th historical moment. At this time, the computer device determines a historical moment before the fifth historical moment as the sixth historical moment.
[0111] Optionally, the historical meteorological data includes irradiance intensity data, and the trend feature includes a meteorological change trend feature. The computer device determines the difference between the irradiance intensity data at the seventh historical moment and the average value of the irradiance intensity corresponding to the target historical period as the meteorological change trend feature corresponding to the historical meteorological data at the seventh historical moment. The seventh historical moment is after the target historical period. The target historical period is determined by the computer device. For example, the meteorological change trend feature Rt corresponding to the historical meteorological data at the seventh historical moment is j satisfy:
[0112]
[0113] Among them, R j represents the irradiance data at the jth historical moment (the seventh historical moment), R k Indicates the kth 1 To k2 The radiation intensity data of a historical moment between historical moments (target historical period), mean() means calculating the average value.
[0114] Optionally, the historical meteorological data belongs to at least two sources, the historical meteorological data includes irradiance intensity data, and the trend feature includes a dynamic irradiance intensity feature. The computer device determines at least one of an average value of at least two irradiance intensity data from different sources at the same historical moment and a sum and a difference between standard deviations of at least two irradiance intensity data as the dynamic irradiance intensity feature corresponding to the historical meteorological data at the historical moment. For example, the dynamic irradiance intensity feature Ry corresponding to the historical meteorological data at a certain historical moment m satisfy:
[0115]
[0116] in, It represents the average value of the irradiance intensity data of all sources at a certain historical moment. Represents the standard deviation of the irradiance intensity data of all sources at a certain historical moment.
[0117] Step 403: Train a machine learning model based on historical meteorological data, trend characteristics, and historical optical power.
[0118] The machine learning model is used to predict optical power based on forecast meteorological data. Optionally, the machine learning model includes at least one of a linear regression model, a random forest model, and an Extreme Gradient Boosting (XGBoost) model. Exemplarily, the computer device trains the machine learning model based on an array consisting of historical meteorological data of all historical moments, trend features corresponding to the historical meteorological data, and historical optical power corresponding to the array. For example, the array corresponding to any historical moment is [historical meteorological data, multiple features, time series features, discretization features, meteorological lag features, meteorological future features, meteorological rate of change features, meteorological change trend features, and dynamic irradiation intensity features].
[0119] Optionally, the machine learning model includes at least two sub-machine learning models. Among them, the sub-machine learning models are completely identical, partially identical or different. The computer device divides the data set according to historical moments to obtain a training set and a validation set. The data set includes historical meteorological data, trend characteristics and historical optical power. Among them, the division rule is determined by the computer device. For example, the computer device divides the data belonging to the first 90% of the historical moments in time in all historical moments into a training set, and divides the data belonging to the last 10% of the historical moments into a validation set. After that, the computer device trains at least two sub-machine models in a cross-validation manner according to the training set and the validation set. The computer device uses the validation set corresponding to the training set of a sub-machine learning model to verify another sub-machine learning model. In addition, the computer device can divide different training sets and validation sets according to different rules to train the sub-machine learning model, and determine the final model parameters of the sub-machine learning model manually or based on whether the performance parameters set by the computer device are met, thereby completing the training of the machine learning model.
[0120] Step 404: Obtain the forecast meteorological data for the prediction time within the first prediction period.
[0121] The first prediction period is the period for which light power prediction is required. The forecast meteorological data includes irradiation intensity data, and can also include temperature, humidity, wind speed, air pressure, etc. The forecast meteorological data is data of the area where the photovoltaic power plant for which light power prediction is required is located.
[0122] Step 405: Perform feature engineering processing on the forecast meteorological data to obtain trend features corresponding to the forecast meteorological data.
[0123] The trend feature is used to reflect the changing characteristics of the forecast meteorological data. Optionally, the trend feature includes at least one of multiple features, time series features, discretization features, meteorological lag features, meteorological future features, meteorological change rate features, meteorological change trend features, and dynamic irradiation intensity features. The process of the computer device performing feature engineering on the forecast meteorological data is the same as the process of performing feature engineering on historical meteorological data when training a machine model for predicting optical power. In addition, the dimension of the data included in the forecast meteorological data is the same as that of the historical meteorological data. This ensures data alignment of the data input into the machine learning model.
[0124] Step 406: Input the forecast meteorological data and trend characteristics into the machine learning model and output the predicted optical power.
[0125] The machine learning model is obtained by training historical meteorological data, historical trend features corresponding to the historical meteorological data, and historical optical power. Optionally, the machine learning model includes at least one of a linear regression model, a random forest model, and an Extreme Gradient Boosting (XGBoost) model.
[0126] Optionally, the machine learning model includes at least two sub-machine learning models. The sub-machine learning models are completely identical, partially identical, or different. The computer device inputs the forecast meteorological data and trend characteristics into the sub-machine learning model, thereby outputting at least two predicted optical powers. The computer device then determines the arithmetic mean of the at least two predicted optical powers as the output predicted optical power, or determines the weighted average of the at least two predicted optical powers as the output predicted optical power. The weight corresponding to each of the at least two predicted optical powers is determined by the computer device. For example, the staff of a photovoltaic power plant manually marks the weight of the predicted optical power output by each sub-machine learning model in the computer device according to the accuracy of the trained sub-machine learning model.
[0127] For example, Figure 5 FIG. 1 is a schematic diagram of the implementation process of predicting optical power provided by the embodiment of the present application. Figure 5 As shown, the computer device performs feature engineering processing on the obtained forecast meteorological data to obtain trend features corresponding to the forecast meteorological data. Then, the forecast meteorological data and trend features are respectively input into sub-model 1, sub-model 2, sub-model 3, sub-model 4 and sub-model 5 of the machine learning model, so as to obtain prediction results 1, prediction results 2, prediction results 3, prediction results 4 and prediction results 5. Among them, the data input into sub-model 1 is data 1, the data input into sub-model 2 is data 2, the data input into sub-model 3 is data 3, the data input into sub-model 4 is data 4, the data input into sub-model 5 is data 5, and data 1, data 2, data 3, data 4 and data 5 are the same. Then, the computer device takes the average value of all prediction results as the predicted optical power outputted finally.
[0128] Optionally, the computer device can also obtain the forecast meteorological data at the forecast time in the second forecast period. The second forecast period includes the first forecast period. For example, the first forecast period is from 12:00 to 24:00 tomorrow, and the second forecast period is from 00:00 tomorrow to 12:00 the day after tomorrow. The computer device inputs the forecast meteorological data and trend characteristics corresponding to the second forecast period into the machine learning model, and outputs the predicted optical power of the second forecast period. Then, the predicted optical power of the second forecast period, which belongs to the first forecast period, is output.
[0129] It should be noted that the above-mentioned computer device can be a server, such as a server, or a server cluster composed of several servers, or a virtual server in a cloud computing service center, etc., which is not limited here. The server is used to implement the above-mentioned service of predicting optical power. The above-mentioned computer device can also be a smart phone, a tablet computer, a desktop computer and a laptop computer, etc. In this case, the computer device predicts optical power by installing a client that can implement the above-mentioned service of predicting optical power.
[0130] In summary, the method provided in this embodiment trains a machine learning model based on historical meteorological data and historical optical power at historical moments, and the machine learning model can predict optical power based on forecast meteorological data. When the machine learning model predicts optical power, no manual calculation is required, thereby improving the efficiency of predicting optical power.
[0131] In addition, feature engineering of historical meteorological data can enable the machine learning model to learn the changing characteristics of historical meteorological data in different dimensions, thereby improving the accuracy of predicting optical power. Training at least two sub-machine models by cross-validation can improve the efficiency of training the machine learning model and improve the accuracy of the trained machine learning model in predicting optical power. The arithmetic mean or weighted average of at least two predicted optical powers output by the sub-machine learning model is determined as the output predicted optical power, which can take into account the features learned by different sub-machine learning models, thereby enhancing the reliability of the output optical power. The forecast meteorological data at the prediction time in the second prediction period is used to predict the optical power of the first prediction period. The meteorological forecast data before and after the first prediction period can be used to increase the features used in the prediction of the machine learning model. Since there is a logical relationship between meteorological changes, the accuracy of the predicted optical power can be improved.
[0132] It should be noted that the sequence of the method steps provided in the embodiments of the present application can be appropriately adjusted, and the steps can be increased or decreased accordingly according to the circumstances. Any technician familiar with the technical field can easily think of the changed methods within the technical scope disclosed in the present application, and they should be included in the protection scope of the present application, so they will not be repeated here.
[0133] Figure 6 1 is a schematic diagram of the structure of a model training device provided by an exemplary embodiment of the present application. The device can be used in a computer device or a client on a computer device. Figure 6 As shown, the device 60 includes:
[0134] The acquisition module 601 is used to acquire historical meteorological data and historical optical power at historical moments.
[0135] The processing module 602 is used to perform feature engineering processing on the historical meteorological data to obtain trend features corresponding to the historical meteorological data. The trend features are used to reflect the change characteristics of the historical meteorological data.
[0136] The training module 603 is used to train a machine learning model based on historical meteorological data, trend characteristics and historical optical power. The machine learning model is used to predict optical power based on forecast meteorological data.
[0137] In an optional design, the trend feature includes at least one of multiple features, time series features, discretization features, meteorological lag features, meteorological future features, meteorological change rate features, meteorological change trend features, and dynamic irradiation intensity features. Among them, the multiple features are used to reflect the characteristics of historical meteorological data under different indexes, the time series features are used to reflect the time period corresponding to the historical meteorological data, the discretization features are used to reflect the stage change characteristics of the historical meteorological data, the meteorological lag features are used to reflect the characteristics of the meteorological data before the historical meteorological data, the meteorological future features are used to reflect the characteristics of the meteorological data after the historical meteorological data, the meteorological change rate features are used to reflect the change rate of the historical meteorological data, the meteorological change trend features are used to reflect the change amplitude of the historical meteorological data, and the dynamic irradiation features are used to reflect the differences in historical meteorological data from different sources.
[0138] In an optional design, the historical meteorological data includes irradiance intensity data, and the trend characteristics include multiple characteristics. The processing module 602 is used to:
[0139] At least one of increasing index processing and decreasing index processing is performed on the irradiation intensity data to obtain multiple features.
[0140] In an optional design, the trend feature includes a time series feature. Processing module 602 is used to:
[0141] The time period of the historical moment corresponding to the historical meteorological data is determined as the time series feature.
[0142] In an optional design, the historical meteorological data includes irradiance intensity data, and the trend characteristics include discretization characteristics. The processing module 602 is used to:
[0143] The irradiation intensity data is discretized to obtain discretized features.
[0144] In an optional design, the trend feature includes a meteorological hysteresis feature. Processing module 602 is used to:
[0145] The first historical meteorological data at the first historical moment is determined as the meteorological lag feature corresponding to the second historical meteorological data, wherein the second historical moment corresponding to the second historical meteorological data is after the first historical moment.
[0146] In an optional design, the trend feature includes a future feature of the weather. The processing module 602 is used to:
[0147] The third historical meteorological data at the third historical moment is determined as the meteorological lag feature corresponding to the fourth historical meteorological data, wherein the fourth historical moment corresponding to the fourth historical meteorological data is before the third historical moment.
[0148] In an optional design, the historical meteorological data includes irradiance intensity data, and the trend characteristics include meteorological change rate characteristics. The processing module 602 is used to:
[0149] The difference between the irradiance intensity data at the fifth historical moment and the irradiance intensity data at the sixth historical moment and the quotient of the irradiance intensity data at the sixth historical moment are determined as the meteorological change rate characteristic corresponding to the historical meteorological data at the fifth historical moment, wherein the fifth historical moment is after the sixth historical moment.
[0150] In an optional design, the historical meteorological data includes irradiance intensity data, and the trend characteristics include meteorological change trend characteristics. The processing module 602 is used to:
[0151] The difference between the irradiance intensity data at the seventh historical moment and the average irradiance intensity corresponding to the target historical period is determined as the meteorological change trend characteristic corresponding to the historical meteorological data at the seventh historical moment, wherein the seventh historical moment is after the target historical period.
[0152] In an optional design, the historical meteorological data belongs to at least two sources, the historical meteorological data includes irradiance intensity data, and the trend characteristics include dynamic irradiance intensity characteristics. Processing module 602 is used to:
[0153] An average value of at least two irradiance intensity data from different sources at the same historical moment and at least one of a sum and a difference between standard deviations of at least two irradiance intensity data are determined as dynamic irradiance intensity characteristics corresponding to historical meteorological data at the historical moment.
[0154] In an optional design, the machine learning model includes at least two sub-machine learning models, such as Figure 7 As shown, the device 60 also includes:
[0155] The division module 604 is used to divide the data set according to historical moments to obtain a training set and a validation set. The data set includes historical meteorological data, trend characteristics, and historical optical power.
[0156] The training module 603 is used to train at least two sub-machine models using a cross-validation method according to a training set and a validation set.
[0157] Figure 8FIG. 1 is a schematic diagram of the structure of an optical power prediction device provided by an exemplary embodiment of the present application. The device can be used in a computer device or a client on a computer device. Figure 8 As shown, the device 80 includes:
[0158] The acquisition module 801 is used to acquire the forecast meteorological data at the prediction time within the first prediction period.
[0159] The processing module 802 is used to perform feature engineering processing on the forecast meteorological data to obtain trend features corresponding to the forecast meteorological data, and the trend features are used to reflect the change characteristics of the forecast meteorological data.
[0160] The prediction module 803 is used to input the forecast meteorological data and trend characteristics into the machine learning model and output the predicted optical power. The machine learning model is obtained by training the historical meteorological data, the historical trend characteristics corresponding to the historical meteorological data, and the historical optical power.
[0161] In an optional design, the machine learning model includes at least two sub-machine learning models. Prediction module 803 is used to:
[0162] The forecast meteorological data and trend characteristics are input into the sub-machine learning model to output at least two predicted optical powers. The arithmetic mean of the at least two predicted optical powers is determined as the output predicted optical power, or the weighted average of the at least two predicted optical powers is determined as the output predicted optical power.
[0163] In an optional design, the acquisition module 801 is used to:
[0164] Obtain forecast meteorological data at a forecast time within a second forecast period, where the second forecast period includes the first forecast period.
[0165] The prediction module 803 is used to:
[0166] The forecast meteorological data and trend characteristics corresponding to the second forecast period are input into the machine learning model, and the predicted optical power of the second forecast period is output. Among the predicted optical powers of the second forecast period, the predicted optical powers belonging to the first forecast period are output.
[0167] It should be noted that the model training device provided in the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the model training device provided in the above embodiment belongs to the same concept as the model training method embodiment. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0168] Similarly, the optical power prediction device provided in the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the optical power prediction device provided in the above embodiment belongs to the same concept as the optical power prediction method embodiment. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0169] An embodiment of the present application also provides a computer device, which includes: a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, at least one program, a code set or an instruction set is loaded and executed by the processor to implement the model training method or optical power prediction method provided by the above-mentioned method embodiments.
[0170] Optionally, the computer device is a server. Fig. 9 It is a schematic diagram of the structure of a server provided by an exemplary embodiment of the present application.
[0171] The server 900 includes a central processing unit (CPU) 901, a system memory 904 including a random access memory (RAM) 902 and a read-only memory (ROM) 903, and a system bus 905 connecting the system memory 904 and the central processing unit 901. The computer device 900 also includes a basic input / output system (I / O system) 906 for facilitating information transmission between various components in the computer device, and a large-capacity storage device 907 for storing an operating system 913, application programs 914 and other program modules 915.
[0172] The basic input / output system 906 includes a display 908 for displaying information and an input device 909 such as a mouse and a keyboard for user inputting information. The display 908 and the input device 909 are connected to the central processing unit 901 through an input / output controller 910 connected to the system bus 905. The basic input / output system 906 may also include an input / output controller 910 for receiving and processing inputs from a plurality of other devices such as a keyboard, a mouse, or an electronic stylus. Similarly, the input / output controller 910 also provides output to a display screen, a printer, or other types of output devices.
[0173] The mass storage device 907 is connected to the central processing unit 901 via a mass storage controller (not shown) connected to the system bus 905. The mass storage device 907 and its associated computer-readable storage medium provide non-volatile storage for the server 900. That is, the mass storage device 907 may include a computer-readable storage medium (not shown) such as a hard disk or a compact disc read-only memory (CD-ROM) drive.
[0174] Without loss of generality, the computer-readable storage medium may include computer storage media and communication media. Computer storage media include volatile and non-volatile, removable and non-removable media implemented by any method or technology for storing information such as computer-readable storage instructions, data structures, program modules or other data. Computer storage media include RAM, ROM, Erasable Programmable Read Only Memory (EPROM), Electronically Erasable Programmable Read-Only Memory (EEPROM), flash memory or other solid-state storage devices, CD-ROM, Digital Versatile Disc (DVD) or other optical storage, cassettes, tapes, disk storage or other magnetic storage devices. Of course, those skilled in the art will know that the computer storage medium is not limited to the above. The above-mentioned system memory 904 and mass storage device 907 can be collectively referred to as memory.
[0175] The memory stores one or more programs, and the one or more programs are configured to be executed by one or more central processing units 901. The one or more programs contain instructions for implementing the above-mentioned method embodiments. The central processing unit 901 executes the one or more programs to implement the methods provided by the above-mentioned method embodiments.
[0176] According to various embodiments of the present application, the server 900 can also be connected to a remote server on the network through a network such as the Internet. That is, the server 900 can be connected to the network 912 through a network interface unit 911 connected to the system bus 905, or the network interface unit 911 can be used to connect to other types of networks or remote server systems (not shown).
[0177] The memory also includes one or more programs, which are stored in the memory and include steps executed by the server in the method provided in the embodiment of the present application.
[0178] A computer-readable storage medium is also provided in an embodiment of the present application. At least one program code is stored in the computer-readable storage medium. When the program code is loaded and executed by a processor of a computer device, the model training method or optical power prediction method provided in the above-mentioned method embodiments is implemented.
[0179] The present application also provides a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the model training method or the optical power prediction method provided by the above-mentioned method embodiments.
[0180] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned readable storage medium may be a read-only memory, a disk or an optical disk, etc.
[0181] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent switching, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A model training method, characterized in that: The method comprises: Obtain historical meteorological data and historical optical power at each historical moment in the historical period; Performing feature engineering processing on the historical meteorological data to obtain trend features corresponding to the historical meteorological data; Training a machine learning model according to an array consisting of the historical meteorological data corresponding to each historical moment and trend features corresponding to the historical meteorological data, and the historical optical power corresponding to the array, wherein the machine learning model is used to predict optical power according to the forecast meteorological data; Among them, the trend characteristics corresponding to the historical meteorological data include at least one of multiple characteristics, time series characteristics, discretization characteristics, meteorological lag characteristics, meteorological future characteristics, meteorological change rate characteristics, meteorological change trend characteristics and dynamic radiation intensity characteristics; the multiple characteristics are used to reflect the characteristics of the historical meteorological data under different indexes, the time series characteristics are used to reflect the time period corresponding to the historical meteorological data, the discretization characteristics are used to reflect the stage change characteristics of the historical meteorological data, the meteorological lag characteristics are used to reflect the characteristics of the meteorological data before the historical meteorological data, the meteorological future characteristics are used to reflect the characteristics of the meteorological data after the historical meteorological data, the meteorological change rate characteristics are used to reflect the change rate of the historical meteorological data, the meteorological change trend characteristics are used to reflect the change amplitude of the historical meteorological data, and the dynamic radiation intensity characteristics are used to reflect the differences in historical meteorological data from different sources.
2. The method according to claim 1, characterized in that: The historical meteorological data includes irradiance intensity data, and the trend characteristics include the multiple characteristics; the feature engineering processing of the historical meteorological data to obtain the trend characteristics corresponding to the historical meteorological data includes: The irradiation intensity data is subjected to at least one of an increase index processing and a decrease index processing to obtain the multiple features.
3. The method according to claim 1, characterized in that The trend feature includes the time series feature; the feature engineering process is performed on the historical meteorological data to obtain the trend feature corresponding to the historical meteorological data, including: The time period of the historical moment corresponding to the historical meteorological data is determined as the time series feature.
4. The method according to claim 1, characterized in that The historical meteorological data includes irradiance intensity data, and the trend feature includes the discretization feature; the feature engineering process is performed on the historical meteorological data to obtain the trend feature corresponding to the historical meteorological data, including: The irradiation intensity data is discretized to obtain the discretized features.
5. The method according to claim 1, characterized in that: The trend feature includes the meteorological lag feature; the feature engineering process is performed on the historical meteorological data to obtain the trend feature corresponding to the historical meteorological data, including: Determining the first historical meteorological data at the first historical moment as the meteorological lag feature corresponding to the second historical meteorological data; The second historical moment corresponding to the second historical meteorological data is after the first historical moment.
6. The method according to claim 1, characterized in that The trend feature includes the future weather feature; the feature engineering process is performed on the historical weather data to obtain the trend feature corresponding to the historical weather data, including: Determine the third historical meteorological data at the third historical moment as the future meteorological feature corresponding to the fourth historical meteorological data; Among them, the fourth historical moment corresponding to the fourth historical meteorological data is before the third historical moment.
7. The method according to claim 1, characterized in that The historical meteorological data includes irradiance intensity data, and the trend characteristics include the meteorological change rate characteristics; the feature engineering processing of the historical meteorological data to obtain the trend characteristics corresponding to the historical meteorological data includes: Determine the quotient of the difference between the irradiance intensity data at the fifth historical moment and the irradiance intensity data at the sixth historical moment and the irradiance intensity data at the sixth historical moment as the meteorological change rate characteristic corresponding to the historical meteorological data at the fifth historical moment; Among them, the fifth historical moment is after the sixth historical moment.
8. The method according to claim 1, characterized in that The historical meteorological data includes irradiance intensity data, and the trend characteristics include the meteorological change trend characteristics; the feature engineering processing of the historical meteorological data to obtain the trend characteristics corresponding to the historical meteorological data includes: Determine the difference between the irradiance intensity data at the seventh historical moment and the average value of the irradiance intensity data corresponding to the target historical period as the meteorological change trend feature corresponding to the historical meteorological data at the seventh historical moment; Among them, the seventh historical moment is after the target historical period.
9. The method according to claim 1, characterized in that: The historical meteorological data belongs to at least two sources, the historical meteorological data includes irradiance intensity data, and the trend characteristics include the dynamic irradiance intensity characteristics; the feature engineering processing of the historical meteorological data to obtain the trend characteristics corresponding to the historical meteorological data includes: The average value of at least two irradiance intensity data from different sources at the same historical moment and at least one of the sum and difference between the standard deviations of the at least two irradiance intensity data are determined as the dynamic irradiance intensity characteristic corresponding to the historical meteorological data at the same historical moment.
10. The method according to any one of claims 1 to 9, characterized in that: The machine learning model includes at least two sub-machine learning models, and the method further includes: Dividing the data set according to historical moments to obtain a training set and a validation set, the data set including the historical meteorological data, the trend characteristics, and the historical optical power; The at least two sub-machine learning models are trained using a cross-validation method based on the training set and the validation set.
11. A method for predicting optical power, characterized in that: The method comprises: Obtaining forecast meteorological data at a forecast time within a first forecast period; Performing feature engineering processing on the forecast meteorological data to obtain trend features corresponding to the forecast meteorological data; Input the forecast meteorological data and the trend features corresponding to the forecast meteorological data into a machine learning model, and output the predicted optical power, wherein the machine learning model is obtained by training an array consisting of historical meteorological data corresponding to each historical moment in a historical period and historical trend features corresponding to the historical meteorological data, and historical optical power corresponding to the array, and the trend features corresponding to the historical meteorological data are obtained by performing feature engineering processing on the historical meteorological data; Among them, the trend characteristics corresponding to the historical meteorological data include at least one of multiple characteristics, time series characteristics, discretization characteristics, meteorological lag characteristics, meteorological future characteristics, meteorological change rate characteristics, meteorological change trend characteristics and dynamic radiation intensity characteristics; the multiple characteristics are used to reflect the characteristics of the historical meteorological data under different indexes, the time series characteristics are used to reflect the time period corresponding to the historical meteorological data, the discretization characteristics are used to reflect the stage change characteristics of the historical meteorological data, the meteorological lag characteristics are used to reflect the characteristics of the meteorological data before the historical meteorological data, the meteorological future characteristics are used to reflect the characteristics of the meteorological data after the historical meteorological data, the meteorological change rate characteristics are used to reflect the change rate of the historical meteorological data, the meteorological change trend characteristics are used to reflect the change amplitude of the historical meteorological data, and the dynamic radiation intensity characteristics are used to reflect the differences in historical meteorological data from different sources.
12. The method according to claim 11, characterized in that The machine learning model includes at least two sub-machine learning models; the forecast meteorological data and the trend features corresponding to the forecast meteorological data are input into the machine learning model, and the predicted optical power is output, including: Inputting the forecast meteorological data and trend features corresponding to the forecast meteorological data into the sub-machine learning model, and outputting at least two predicted optical powers; The arithmetic mean of the at least two predicted optical powers is determined as the predicted optical power to be output; or the weighted average of the at least two predicted optical powers is determined as the predicted optical power to be output.
13. The method according to claim 11 or 12, characterized in that: The step of obtaining the forecast meteorological data at the forecast time within the first forecast period includes: Acquire forecast meteorological data at the prediction time within a second prediction period, wherein the second prediction period includes the first prediction period; The step of inputting the forecast meteorological data and the trend features corresponding to the forecast meteorological data into a machine learning model and outputting the predicted optical power comprises: Inputting the forecast meteorological data and the trend characteristics corresponding to the second prediction period into the machine learning model, and outputting the predicted optical power of the second prediction period; The predicted optical power of the second prediction period, among the predicted optical powers of the second prediction period, that belongs to the first prediction period is output.
14. A model training device, characterized in that: The device comprises: An acquisition module is used to acquire historical meteorological data and historical optical power at each historical moment in a historical period; A processing module, used for performing feature engineering processing on the historical meteorological data to obtain trend features corresponding to the historical meteorological data; A training module, used for training a machine learning model according to an array consisting of the historical meteorological data corresponding to each historical moment and the trend characteristics corresponding to the historical meteorological data, and the historical optical power corresponding to the array, wherein the machine learning model is used to predict the optical power according to the forecast meteorological data; Among them, the trend characteristics corresponding to the historical meteorological data include at least one of multiple characteristics, time series characteristics, discretization characteristics, meteorological lag characteristics, meteorological future characteristics, meteorological change rate characteristics, meteorological change trend characteristics and dynamic radiation intensity characteristics; the multiple characteristics are used to reflect the characteristics of the historical meteorological data under different indexes, the time series characteristics are used to reflect the time period corresponding to the historical meteorological data, the discretization characteristics are used to reflect the stage change characteristics of the historical meteorological data, the meteorological lag characteristics are used to reflect the characteristics of the meteorological data before the historical meteorological data, the meteorological future characteristics are used to reflect the characteristics of the meteorological data after the historical meteorological data, the meteorological change rate characteristics are used to reflect the change rate of the historical meteorological data, the meteorological change trend characteristics are used to reflect the change amplitude of the historical meteorological data, and the dynamic radiation intensity characteristics are used to reflect the differences in historical meteorological data from different sources.
15. An optical power prediction device, characterized in that: The device comprises: An acquisition module, used to acquire the forecast meteorological data at the prediction time within the first prediction period; A processing module, used for performing feature engineering processing on the forecast meteorological data to obtain trend features corresponding to the forecast meteorological data; A prediction module, used for inputting the forecast meteorological data and the trend features corresponding to the forecast meteorological data into a machine learning model, and outputting the predicted optical power, wherein the machine learning model is obtained by training an array consisting of historical meteorological data corresponding to each historical moment in a historical period and historical trend features corresponding to the historical meteorological data, and historical optical power corresponding to the array, and the trend features corresponding to the historical meteorological data are obtained by performing the feature engineering processing on the historical meteorological data; Among them, the trend characteristics corresponding to the historical meteorological data include at least one of multiple characteristics, time series characteristics, discretization characteristics, meteorological lag characteristics, meteorological future characteristics, meteorological change rate characteristics, meteorological change trend characteristics and dynamic radiation intensity characteristics; the multiple characteristics are used to reflect the characteristics of the historical meteorological data under different indexes, the time series characteristics are used to reflect the time period corresponding to the historical meteorological data, the discretization characteristics are used to reflect the stage change characteristics of the historical meteorological data, the meteorological lag characteristics are used to reflect the characteristics of the meteorological data before the historical meteorological data, the meteorological future characteristics are used to reflect the characteristics of the meteorological data after the historical meteorological data, the meteorological change rate characteristics are used to reflect the change rate of the historical meteorological data, the meteorological change trend characteristics are used to reflect the change amplitude of the historical meteorological data, and the dynamic radiation intensity characteristics are used to reflect the differences in historical meteorological data from different sources.
16. A computer device, characterized in that: The computer device includes a processor and a memory, wherein the memory stores at least one program, and the at least one program is loaded and executed by the processor to implement the model training method as described in any one of claims 1 to 10 or the optical power prediction method as described in any one of claims 11 to 13.
17. A computer-readable storage medium, characterized in that: At least one program code is stored in the computer-readable storage medium, and the program code is loaded and executed by the processor to implement the model training method described in any one of claims 1 to 10 or the optical power prediction method described in any one of claims 11 to 13.
