Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Fig. 1 is an application environment diagram of a power generation data prediction method of a power station in one embodiment. Referring to fig. 1, the power generation data prediction method of the power plant is applied to a power generation data prediction system of the power plant. The power generation data prediction system of the power station includes a terminal 110 and a server 120. The terminal 110 and the server 120 are connected through a network. The method comprises the steps that a terminal or a server obtains environment data and corresponding power generation data in a first preset time period, the environment data and the corresponding power generation data in the first preset time period are input into a prediction model, the environment data and the corresponding power generation data are trained according to the prediction model to obtain a trained prediction model, the environment data in a second preset time period are obtained, the environment data in the second preset time period are input into the trained prediction model, and the predicted power generation data of a power station in the second preset time period are obtained. The terminal 110 may specifically be a desktop terminal or a mobile terminal, and the mobile terminal may specifically be at least one of a mobile phone, a tablet computer, a notebook computer, and the like. The server 120 may be implemented as a stand-alone server or a server cluster composed of a plurality of servers.
As shown in FIG. 2, in one embodiment, a method of generating data prediction for a power plant is provided. The embodiment is mainly illustrated by applying the method to the terminal 110 (or the server 120) in fig. 1. Referring to fig. 2, the method for predicting the power generation data of the power station specifically includes the following steps:
step S201, acquiring environmental data and corresponding power generation data within a first preset time period.
Specifically, the first preset time refers to a preset time, and the time can be customized, such as setting to 1 day, 2 days, 3 days, and the like. The environmental data refers to environmental data near the power station, including but not limited to illumination radiation intensity, temperature, wind speed, wind direction, air humidity, and the like, the power generation data refers to power data sent by the power station, the power generation data may be electric quantity, and the electric quantity may be represented by power generation power. And acquiring environmental data and power generation data in preset time.
In one embodiment, before acquiring the environmental data and the corresponding power generation data within the first preset time period, the method further includes: the method comprises the steps of collecting original environment data and corresponding original power generation data in a first preset time period, and carrying out data preprocessing on the original environment data and the corresponding original power generation data to obtain corresponding environment data and power generation data. Wherein the pre-processing comprises at least one of sampling, drying, screening, smoothing, and the like. The data are preprocessed, so that the operation speed of the data can be increased, the data interference caused by unnecessary information can be reduced, and the accuracy of a data processing result can be improved.
Step S202, inputting the environmental data and the corresponding power generation data in the first preset time period into a prediction model, and training the environmental data and the corresponding power generation data according to the prediction model to obtain a trained prediction model.
Specifically, the prediction model refers to a predefined network model, which may be a deep neural network model, a cyclic network model, or the like, and different prediction models may be selected according to requirements, such as selecting an LSTM (Long Short-Term Memory) in the cyclic network model, or the like, where the basic structure of the selected model may be customized and adjusted according to requirements. The environment data and the corresponding power generation data are trained through the training model, the relation between the environment data and the corresponding power generation data is learned, and the trained prediction model is obtained when the relation learned through the prediction model meets the requirement.
In one embodiment, training the environmental data according to the predictive model to obtain a trained predictive model comprises: the training data are predicted through the prediction model, corresponding power generation training prediction data are obtained, the difference degree between the power generation training prediction data and the corresponding power generation data is calculated, when the difference degree does not meet a preset convergence condition, model parameters of the prediction model are updated, and the trained prediction model is obtained until the difference degree between the power generation training prediction data and the corresponding power generation data meets the preset convergence condition.
Specifically, the power generation training prediction data refers to power generation data predicted by the prediction model according to the environmental data. The power generation data is acquired real data, the real power generation data corresponding to the environment data and the prediction model are used for predicting the environment data, the obtained power generation training prediction data are compared, the difference degree between the power generation training prediction data and the corresponding power generation data is calculated, model parameters of the prediction model are updated according to the difference degree until a preset convergence condition is met, and the trained prediction model is obtained. The preset convergence condition is a predefined condition parameter for measuring the prediction capability of the prediction model, the condition parameter may be a difference between the power generation training prediction data and the corresponding power generation data, the difference may be a difference between the two, or a value obtained by performing a custom operation on the difference, and when the difference is less than or equal to the preset difference, the model converges to obtain the trained prediction model.
Step S203, obtaining environmental data in a second preset time period, inputting the environmental data in the second preset time period into the trained prediction model, and obtaining predicted power generation data of the power station in the second preset time period.
Specifically, the first preset time period is a second preset time period, and the second preset time is a preset time, and the time can be customized, for example, the time is defined as 1 day, 2 days, 3 days, and the like. The first preset time period is the time between the second preset time periods, and if the first preset time is 3 days, the second preset time is 3 days, and the second preset time period is from 7 am to 6 pm of today, the first preset time period is from 7 am to 6 pm of the first three days before. And acquiring environmental data of a second preset time period, wherein the environmental data can be input into the trained prediction model according to announcement data of the weather station, and the environmental data is predicted through the trained prediction model to obtain predicted power generation data of the power station in the second preset time period.
In one embodiment, the first preset time period is an adjacent historical time period to the second preset time period.
The power generation data prediction method of the power station comprises the steps of obtaining environmental data and corresponding power generation data in a first preset time period, inputting the environmental data and the corresponding power generation data in the first preset time period into a prediction model, training the environmental data and the corresponding power generation data according to the prediction model to obtain a trained prediction model, obtaining environmental data in a second preset time period, and inputting the environmental data in the second preset time period into the trained prediction model to obtain predicted power generation data of the power station in the second preset time period. . The model is trained through the data of the first preset time, the power generation data of the second preset time is deduced through the environmental data of the second preset time, the difference of the environmental data in different seasons is large, the environmental data learning model can be adopted, the prediction capability of the model can be improved by carrying out data deduction according to the learned model, the relation between the environmental data and the power generation data is adopted, the future power generation data can be predicted according to the future environment, and the power generation data can be better predicted. The method can predict the generated energy of the photovoltaic power station to a certain extent on the premise of weather forecast data, and is convenient for equipment detection personnel to compare the predicted generated energy with the actual generated energy, so that equipment faults are accurately judged. Meanwhile, the generated power is predicted in advance, the power transmission system of the power grid can be correspondingly adjusted, and the stability of the power transmission system is ensured.
In one embodiment, as shown in fig. 3, the method for predicting power generation data of the power station further includes:
in step S301, a sample data set including historical environmental data and corresponding historical power generation data is acquired.
Step S302, the sample data set is segmented according to different segmentation time lengths to obtain a plurality of candidate test sample sets and corresponding candidate training sample sets.
Step S303, training the candidate training sample sets corresponding to different segmentation durations through the prediction model, and verifying the candidate training sample sets corresponding to the different segmentation durations to obtain verification results of the different segmentation durations.
Step S304, determining a first preset time and a second preset time according to the verification results of different segmentation durations.
Specifically, the sample data set is a set of data obtained by sampling historical environmental data and corresponding historical power generation data. The historical environmental data refers to the existing objective environmental data, and the historical power generation data refers to the real power generation data of the power station. The division duration refers to a time length of a divided sample data set, for example, the division duration includes a division duration of a training sample set and a division duration of a corresponding test sample set, the training sample set obtained after division is used as a candidate training sample set, the test sample set is used as a candidate test sample set, for example, the divided sample data set of one day is used as the training sample set, the next sample data set is used as the test sample set, or the sample data sets of two days are used as the training sample set, the sample data sets of the last two days are used as the test sample set, or the sample data sets of the first three days are used as the training sample set, and the sample data set of the next day is used as the test sample set. Training the same prediction model for training the training sample sets corresponding to different segmentation durations, verifying the prediction model obtained by training the training sample sets corresponding to the test sample sets, and determining the optimal segmentation duration according to the verification result, namely determining the corresponding first preset time and the second preset time. The prediction capabilities of the test models obtained by training different training sample sets are different, and the test models obtained by the same training samples are used for different test data prediction results, for example, the test models are different when the training data of the first day and the training data of the second day are used for training, and the prediction capabilities of the test models are different when the data of the third day are used for testing and the data of the third day and the testing of the fourth day are used for testing. Therefore, by segmenting the training sample sets with different durations and the corresponding test sample sets, which segmentation method is more effective can be effectively analyzed, so that the prediction capability of the model is improved, and the prediction accuracy is improved.
In one embodiment, step S303 includes:
step S3031, predicting historical environmental data in each candidate training sample set by using the prediction model to obtain historical power generation prediction data corresponding to each historical environmental data.
Step S3032, calculating the difference degree between each historical power generation prediction data and the corresponding historical power generation data, and updating the parameters of the corresponding prediction model according to each difference degree until the prediction model meets the preset convergence condition to obtain each candidate trained prediction model.
Step S3033, predicting each historical environmental data in the corresponding test sample set by each candidate trained prediction model to obtain test power generation prediction data corresponding to each candidate trained prediction model.
Step S3034, determining the verification result of each candidate trained prediction model according to the difference between each test power generation data and each historical power generation data in the corresponding test sample set.
Specifically, the historical power generation prediction data is obtained by predicting historical environment data in a candidate training sample set through a prediction model, the power generation data corresponding to the historical environment is real power generation data, the power generation data corresponding to the historical environment is used as expected output data of the prediction model to train the prediction model, whether the model is converged is determined according to the difference between the historical power generation prediction data and the corresponding real power generation data, when the difference meets the preset model difference, parameters of the model are updated, and a common gradient descent method and an end-to-end training method can be adopted as an updating method, so that the model is converged, and candidate trained prediction models corresponding to the candidate training sample sets are obtained. And testing the models trained with different segmentation durations to obtain the segmentation duration which best meets the requirement, thereby improving the prediction capability of the prediction model.
In one embodiment, the prediction model includes an input layer, a first fully-connected layer, a hidden layer, and a second fully-connected layer, and step S203 includes:
step S2031, inputting the environment data in the second preset time period according to the input rule of the input layer, and obtaining the output data of the input layer.
Step S2032, inputting the output data into the first full connection layer, and transforming the output data through the activation function of the first full connection layer to obtain transformed data.
Step S2033, inputting the transformed data into the hidden layer, and predicting the transformed data through the hidden layer to obtain a plurality of prediction results.
And S2034, inputting each prediction result into a second full-connection layer, and weighting the prediction results through the second full-connection layer to obtain the power generation data of the power station.
Specifically, the input rule is a self-defined rule, and output data obtained by different input rules are different. And inputting the environment data in the second preset time period into the input layer according to the input rule to obtain corresponding output data, and inputting the output data into the first full connection layer, wherein the first full connection layer is provided with an activation function, and the activation function comprises but is not limited to a sigmod function and/or a hyperbolic tangent tanh function and the like. The output data of the input layer is transformed by the activation function, so that the data becomes more complex and is not a simple linear relation. The method comprises the steps of inputting transformation data into a hidden layer, predicting the data through the hidden layer, wherein the hidden layer is provided with a plurality of hidden neurons, the hidden layer can be a hidden layer of an LSTM model, the LSTM model can well process data with a time sequence relation, and the trend of the time sequence data can be predicted. And inputting the prediction result into a second full-connection layer, and weighting the prediction result output by the hidden layer through a weighting coefficient of the second full-connection to obtain a total prediction result, namely the predicted power generation data of the power station. And a full-connection layer is added in the LSTM model, and the data is transformed through an activation function of the first full-connection layer, so that the data is more complex, more association relations can be learned when the hidden layer learns the relation between the data, and the prediction capability of the model is improved.
In one embodiment, step S201 includes:
in step S2011, sampling environmental data and sampling power generation data at each sampling time point within a first preset time period are acquired.
Step S2012, performing data fusion on the sampling environment data and the corresponding sampling power generation data according to the time sequence of each sampling time point, to obtain fused data.
And S2013, calculating a sample mean and a sample variance of the fusion data, and screening the fusion data according to the sample mean and the sample variance to obtain screening data.
And step S2014, drying the screening data to obtain environmental data and corresponding power generation data.
Specifically, the sampling time point is a preset time point, for example, sampling can be set every 2 minutes or three minutes to obtain corresponding sampling data, where the sampling data includes environment data and power generation data, which are respectively used as sampling environment data and sampling power generation data, the sampling environment data and the sampling power generation data are fused according to the sampling time point, each sample includes sampling environment data and corresponding sampling power generation data, and for example, sampling environment data at 10 am and 10 min corresponds to power generation data at 10 am. The sample mean and sample variance of the entire fused data are calculated. And screening the fusion data according to the sample mean value and the sample variance, and weighting the sample mean value and the sample variance to obtain a corresponding sample threshold value, wherein the sample comprises a first threshold value and a second threshold value, and the first threshold value is smaller than the second threshold value. And screening the fusion data through the first threshold and the second threshold to obtain corresponding screening data. And drying the screened data, wherein the drying can be performed by adopting a mean filtering mode to obtain the dried data. The influence brought by noise point data can be reduced by drying the data, so that the accuracy of the model test is improved.
In a specific embodiment, the method for predicting the power generation data of the power station includes:
raw data is collected. The method comprises the steps of collecting generated power of a photovoltaic power station in a period of time and environmental data in the period of time, wherein the generated power comprises illumination radiation intensity B, temperature AT, wind speed WS, wind direction WD, air humidity AH and the like, and forming a data set (X, Y) ═ { B, AT, WS, WD, AH, P }, wherein the (X) ═ { B, AT, WS, WD, AH } represents a sample characteristic data set, and the (Y) ═ { P } represents a sample label data set.
And performing fusion of the generated energy and the weather data on the original data according to the time sequence. In the data acquisition process, the original data often has a certain abnormal value due to the influence of the acquisition device or external factors, and the original data can be screened through statistics. The specific screening steps comprise: a) calculating the sample mean value and the sample standard deviation of each characteristic sample in the time period; b) eliminating samples larger than the mean value of the characteristic samples plus 3 times of sample standard deviations and samples smaller than the mean value of the characteristic samples minus 3 times of sample standard deviations from the characteristic samples, and effectively eliminating the influence of abnormal values by adopting the data screening method; c) moving average with the length of a moving window of 3 is carried out on each characteristic data, and abnormal noise is eliminated; d) because the variation fluctuation of the generated energy of the photovoltaic power station is small, 10 minutes are used as sample time points, and the upper and lower average values of the sample are filled in missing values existing in the continuous time points; e) and carrying out normalization processing on the data set.
The training data set and the test data set are segmented. And (4) segmenting the training set and the test set by adopting a sliding verification method. Let DtSelecting D for the data set of the current time periodt-1Using the time period data set as a training data set training model, and selecting DtAnd taking the time period data set as a test data set for testing the model effect. The training set selection being in accumulation mode, i.e. reselected (D)t-1+Dt) And (3) training the model as a new training data set, performing model test as a test data set, and verifying the robustness of the model by analogy.
The method comprises the following steps of taking 4-day effective historical data of an experimental power station as modeling sample data, sorting sample data sets with the time interval of 10 minutes to 17 minutes and 20 minutes from 07 hours to 17 hours and the time interval of 2 minutes by a data screening method, and dividing the sample data sets into the following three groups according to the training test set dividing method: (D)1,D2),(D1+D2,D3),(D1+D2+D3,D4) And the left data set in each bracket is a training data set, the right data set in each bracket is a testing data set, and each group of data is respectively used for training and testing the model.
A cyclic neural network model is defined as a prediction model, an LSTM model is adopted as a core training prediction model, and a fully-connected structural layer is further added in an algorithm complete framework as a data input initial layer. The prediction model includes: the device comprises an input layer, a first full-connection layer, a hidden layer and a second full-connection layer. Wherein, the input layer inputs the characteristic data set as X; first fully-connected layer: setting 32 neuron nodes, adopting hyperbolic tangent tanh as an activation function, and enabling the relation between the input function and the output function of the layer to be as shown in formula (1):
hiding the layer: the layer is designed into an LSTM model with 50 hidden neurons, and has a certain prediction effect on ordinal data trend mainly through the memory capacity of the LSTM model; second full connection layer: and the second full-connection layer is used for carrying out weighting processing on the data output by the hidden layer to obtain final power generation prediction data.
Model training and testing according to the method of training data set and testing data set, inputting each divided training data set into a defined prediction model, defining the weight matrix W in the prediction model as W ═ WijAnd an offset matrix b ═ biAnd performing iterative training on the prediction model according to a back propagation algorithm theory, updating parameters W and b in the prediction model by using a gradient descent algorithm, knowing that the prediction model meets a preset convergence condition, and obtaining a candidate trained prediction model.
And (5) verifying the model. And testing the corresponding test set data input model by using the candidate trained prediction model to obtain a corresponding test result, and performing inverse normalization processing to obtain the finally processed data, namely the test set power generation amount prediction data. And (3) verifying the candidate trained prediction model by adopting a sliding verification method, taking the mean square error between the power generation prediction data and the real data as a final evaluation index, wherein the calculation formula of the mean square error MSE is shown as the formula (2):
wherein X is a sample characteristic data set, Y is a prediction label, yi is real power generation data,
and generating prediction data obtained by predicting the model according to the environment data corresponding to the yi.
According to the power generation data prediction method of the power station, the prediction model is trained by adopting data of the previous days of the prediction time, the adaptability of the prediction model is improved, so that the prediction accuracy of the prediction model is improved, aiming at models corresponding to different environment training, the LSTM model can be used for processing and predicting the time sequence with relatively long interval and delay, the power generation data is related to the environment, the relation between the previous power generation data and the environment data can be obtained by learning, so that the future power generation data can be deduced according to the future environment data, and the data prediction is realized. The prediction accuracy of the sequence data of the traditional LSTM algorithm is improved by adding the full-connection layer, and compared with the traditional method, the photovoltaic power station power generation amount prediction based on the recurrent neural network has the prediction capability in the user-defined time period.
FIGS. 2-3 are flow diagrams illustrating a method for generating data prediction for a power plant according to one embodiment. It should be understood that although the various steps in the flow charts of fig. 2-3 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-3 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 4, there is provided a power generation data prediction apparatus 200 of a power plant, including:
the data acquisition module 201 is configured to acquire environmental data and corresponding power generation data within a first preset time period.
The model training module 202 is configured to input the environmental data and the corresponding power generation data in the first preset time period into the prediction model, and train the environmental data and the corresponding power generation data according to the prediction model to obtain a trained prediction model.
And the data prediction module 203 is configured to obtain environmental data in a second preset time period, input the environmental data in the second preset time period into the trained prediction model, and obtain predicted power generation data of the power station in the second preset time period.
In one embodiment, model training module 202 includes:
and the data prediction unit is used for predicting the training data through the prediction model to obtain corresponding power generation training prediction data.
And the model updating unit is used for calculating the difference between the power generation training prediction data and the corresponding power generation data, updating the model parameters of the prediction model when the difference does not meet the preset convergence condition, and obtaining the trained prediction model until the difference between the power generation training prediction data and the corresponding power generation data meets the preset convergence condition.
In one embodiment, the power generation data prediction apparatus 200 of the power station further includes:
and the historical data acquisition module is used for acquiring a sample data set containing historical environment data and corresponding historical power generation data.
And the data segmentation module is used for segmenting the sample data set according to different segmentation durations to obtain a plurality of candidate test sample sets and corresponding candidate training sample sets.
And the verification module is used for training the candidate training sample sets corresponding to different segmentation durations through the prediction model and verifying the corresponding candidate training sample sets to obtain verification results of different segmentation durations.
And the division time determining module is used for determining first preset time and second preset time according to the verification results of different division durations.
In one embodiment, the verification module 303 includes:
and the historical data prediction unit is used for predicting the historical environmental data in each candidate training sample set through the prediction model to obtain historical power generation prediction data corresponding to each historical environmental data.
And the candidate model determining unit is used for calculating the difference degree between each historical power generation prediction data and the corresponding historical power generation data, updating the parameters of the corresponding prediction model according to each difference degree until the prediction model meets the preset convergence condition, and obtaining each candidate trained prediction model.
And the testing unit is used for predicting each historical environment data in the corresponding testing sample set through each candidate trained prediction model to obtain testing power generation prediction data corresponding to each candidate trained prediction model.
And the verification unit is used for determining the verification result of each candidate trained prediction model according to the difference between each test power generation data and each historical power generation data in the corresponding test sample set.
In one embodiment, the data prediction module 203 comprises:
and the input unit is used for inputting the environmental data in a second preset time period according to the input rule of the input layer to obtain the output data of the input layer.
And the transformation unit is used for inputting the output data into the first full connection layer and transforming the output data through the activation function of the first full connection layer to obtain transformed data.
And the prediction unit is used for inputting the transformation data into the hidden layer, predicting the transformation data through the hidden layer and obtaining a plurality of prediction results.
And the prediction result calculation unit is used for inputting each prediction result into the second full-connection layer, and weighting the prediction results through the second full-connection layer to obtain the power generation data of the power station.
In one embodiment, the data acquisition module 201 includes:
and the sampling data acquisition unit is used for acquiring sampling environment data and sampling power generation data of each sampling time point in a first preset time period.
And the data fusion unit is used for carrying out data fusion on the sampling environment data and the corresponding sampling power generation data according to the time sequence of each sampling time point to obtain fusion data.
And the data screening unit is used for calculating the sample mean value and the sample variance of the fusion data, and screening the fusion data according to the sample mean value and the sample variance to obtain screening data.
And the dryness removal normalization unit is used for performing dryness removal treatment on the screening data to obtain environmental data and corresponding power generation data.
FIG. 5 is a diagram illustrating an internal structure of a computer device in one embodiment. The computer device may specifically be the terminal 110 (or the server 120) in fig. 1. As shown in fig. 5, the computer apparatus includes a processor, a memory, a network interface, an input device, and a display screen connected through a system bus. Wherein the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program that, when executed by the processor, causes the processor to implement a method of generating data prediction for a power plant. The internal memory may also have a computer program stored therein, which when executed by the processor, causes the processor to perform a method of generating data for a power plant. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 5 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, the power generation data prediction apparatus of the power station provided in the present application may be implemented in the form of a computer program that is executable on a computer device such as that shown in fig. 5. The memory of the computer device may store therein various program modules constituting the power generation data prediction means of the power plant, such as a data acquisition module 201, a model training module 202, and a data prediction module 203 shown in fig. 4. The respective program modules constitute computer programs that cause processors to execute the steps in the power generation data prediction method of the power plant of the respective embodiments of the present application described in the present specification.
For example, the computer device shown in fig. 5 may be used to obtain the environmental data and the corresponding power generation data within the first preset time period through the data obtaining module 201 in the power generation data prediction apparatus of the power station shown in fig. 4. The computer device may input the environmental data and the corresponding power generation data within the first preset time period into the prediction model through the model training module 202, and train the environmental data and the corresponding power generation data according to the prediction model to obtain a trained prediction model. The computer equipment can acquire the environmental data in the second preset time period through the data prediction module 203, and input the environmental data in the second preset time period into the trained prediction model to obtain the predicted power generation data of the power station in the second preset time period.
In one embodiment, a computer device is provided, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program: the method comprises the steps of obtaining environmental data and corresponding power generation data in a first preset time period, inputting the environmental data and the corresponding power generation data in the first preset time period into a prediction model, training the environmental data and the corresponding power generation data according to the prediction model to obtain a trained prediction model, obtaining environmental data in a second preset time period, inputting the environmental data in the second preset time period into the trained prediction model to obtain predicted power generation data of a power station in the second preset time period, wherein the first preset time period is a historical time period of the second preset time period.
In one embodiment, training the environmental data and the corresponding power generation data according to the prediction model to obtain a trained prediction model comprises: the training data are predicted through the prediction model, corresponding power generation training prediction data are obtained, the difference degree between the power generation training prediction data and the corresponding power generation data is calculated, when the difference degree does not meet a preset convergence condition, model parameters of the prediction model are updated, and the trained prediction model is obtained until the difference degree between the power generation training prediction data and the corresponding power generation data meets the preset convergence condition.
In one embodiment, the processor, when executing the computer program, further performs the steps of: the method comprises the steps of obtaining a sample data set containing historical environment data and corresponding historical power generation data, segmenting the sample data set according to different segmentation durations to obtain a plurality of candidate test sample sets and corresponding candidate training sample sets, training the candidate training sample sets corresponding to the different segmentation durations through a prediction model, verifying the candidate training sample sets corresponding to the different segmentation durations to obtain verification results of the different segmentation durations, and determining first preset time and second preset time according to the verification results of the different segmentation durations.
In one embodiment, training candidate training sample sets corresponding to different segmentation durations through a prediction model, and verifying the corresponding candidate training sample sets to obtain verification results of the different segmentation durations, including: the method comprises the steps of predicting historical environmental data in each candidate training sample set through a prediction model to obtain historical power generation prediction data corresponding to each historical environmental data, calculating the difference degree between each historical power generation prediction data and the corresponding historical power generation data, updating parameters of the corresponding prediction model according to each difference degree until the prediction model meets a preset convergence condition to obtain each candidate trained prediction model, predicting each historical environmental data in the corresponding test sample set through each candidate trained prediction model to obtain test power generation prediction data corresponding to each candidate trained prediction model, and determining the verification result of each candidate trained prediction model according to the difference between each test power generation data and each historical power generation data in the corresponding test sample set.
In one embodiment, the prediction model includes an input layer, a first fully-connected layer, a hidden layer and a second fully-connected layer, and the inputting environmental data in a second preset time period into the trained prediction model to obtain predicted power generation data of the power station in the second preset time period includes: the method comprises the steps of inputting environmental data in a second preset time period according to input rules of an input layer to obtain output data of the input layer, inputting the output data into a first full-connection layer, converting the output data through an activation function of the first full-connection layer to obtain conversion data, inputting the conversion data into a hidden layer, predicting the conversion data through the hidden layer to obtain a plurality of prediction results, inputting each prediction result into a second full-connection layer, and weighting the prediction results through the second full-connection layer to obtain power generation data of a power station.
In one embodiment, acquiring environmental data and corresponding power generation data within a first preset time period comprises: the method comprises the steps of obtaining sampling environment data and sampling power generation data of each sampling time point in a first preset time period, conducting data fusion on the sampling environment data and the corresponding sampling power generation data according to the time sequence of each sampling time point to obtain fusion data, calculating a sample mean value and a sample variance of the fusion data, screening the fusion data according to the sample mean value and the sample variance to obtain screening data, and conducting drying treatment on the screening data to obtain the environment data and the corresponding power generation data.
In one embodiment, the environmental data includes illumination radiation intensity, temperature, wind speed, wind direction, and air humidity.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of: the method comprises the steps of obtaining environmental data and corresponding power generation data in a first preset time period, inputting the environmental data and the corresponding power generation data in the first preset time period into a prediction model, training the environmental data and the corresponding power generation data according to the prediction model to obtain a trained prediction model, obtaining environmental data in a second preset time period, inputting the environmental data in the second preset time period into the trained prediction model to obtain predicted power generation data of a power station in the second preset time period, wherein the first preset time period is a historical time period of the second preset time period.
In one embodiment, training the environmental data and the corresponding power generation data according to the prediction model to obtain a trained prediction model comprises: the training data are predicted through the prediction model, corresponding power generation training prediction data are obtained, the difference degree between the power generation training prediction data and the corresponding power generation data is calculated, when the difference degree does not meet a preset convergence condition, model parameters of the prediction model are updated, and the trained prediction model is obtained until the difference degree between the power generation training prediction data and the corresponding power generation data meets the preset convergence condition.
In one embodiment, the processor, when executing the computer program, further performs the steps of: the method comprises the steps of obtaining a sample data set containing historical environment data and corresponding historical power generation data, segmenting the sample data set according to different segmentation durations to obtain a plurality of candidate test sample sets and corresponding candidate training sample sets, training the candidate training sample sets corresponding to the different segmentation durations through a prediction model, verifying the candidate training sample sets corresponding to the different segmentation durations to obtain verification results of the different segmentation durations, and determining first preset time and second preset time according to the verification results of the different segmentation durations.
In one embodiment, training candidate training sample sets corresponding to different segmentation durations through a prediction model, and verifying the corresponding candidate training sample sets to obtain verification results of the different segmentation durations, including: the method comprises the steps of predicting historical environmental data in each candidate training sample set through a prediction model to obtain historical power generation prediction data corresponding to each historical environmental data, calculating the difference degree between each historical power generation prediction data and the corresponding historical power generation data, updating parameters of the corresponding prediction model according to each difference degree until the prediction model meets a preset convergence condition to obtain each candidate trained prediction model, predicting each historical environmental data in the corresponding test sample set through each candidate trained prediction model to obtain test power generation prediction data corresponding to each candidate trained prediction model, and determining the verification result of each candidate trained prediction model according to the difference between each test power generation data and each historical power generation data in the corresponding test sample set.
In one embodiment, the prediction model includes an input layer, a first fully-connected layer, a hidden layer and a second fully-connected layer, and the inputting environmental data in a second preset time period into the trained prediction model to obtain predicted power generation data of the power station in the second preset time period includes: the method comprises the steps of inputting environmental data in a second preset time period according to input rules of an input layer to obtain output data of the input layer, inputting the output data into a first full-connection layer, converting the output data through an activation function of the first full-connection layer to obtain conversion data, inputting the conversion data into a hidden layer, predicting the conversion data through the hidden layer to obtain a plurality of prediction results, inputting each prediction result into a second full-connection layer, and weighting the prediction results through the second full-connection layer to obtain predicted power generation data of a power station.
In one embodiment, acquiring environmental data and corresponding power generation data within a first preset time period comprises: the method comprises the steps of obtaining sampling environment data and sampling power generation data of each sampling time point in a first preset time period, conducting data fusion on the sampling environment data and the corresponding sampling power generation data according to the time sequence of each sampling time point to obtain fusion data, calculating a sample mean value and a sample variance of the fusion data, screening the fusion data according to the sample mean value and the sample variance to obtain screening data, and conducting drying treatment on the screening data to obtain the environment data and the corresponding power generation data.
In one embodiment, the environmental data includes illumination radiation intensity, temperature, wind speed, wind direction, and air humidity.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a non-volatile computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the program is executed. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The foregoing are merely exemplary embodiments of the present invention, which enable those skilled in the art to understand or practice the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.