Method, device, electronic equipment and medium for predicting reservoir inflow value
By forming a predictive feature sequence and using pre-trained machine learning models for iterative updates, the problem that the existing technology is difficult to accurately predict the incoming flow of the reservoir is solved, and accurate prediction of the reservoir flow is achieved, and flood control and power generation planning of hydropower stations is supported.
Patent Information
- Application Number
- CN202110341420.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-30
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2041-03-30
AI Technical Summary
The existing timing prediction methods are difficult to accurately predict the inlet flow value of the reservoir. The traditional statistical timing model is low in operation efficiency, the linear regression model is difficult to achieve long-sequence period prediction, and the deep learning model is poor in stability, making it difficult to accurately predict the reservoir flow.
By determining the description information of multiple historical moments, the initialized predictive feature sequence is formed, and the sequence is iteratively updated using pre-trained machine learning models such as xgboost and lightgbm until the end iteration condition is met, and the final prediction result is obtained to determine the inbound traffic value.
Accurate prediction of reservoir flow has been achieved, helping hydropower stations reasonably arrange flood control and power generation plans, avoid flood disasters, and improve the economic benefits of power generation.
Smart Images

Figure CN112989705B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of computer technology, and in particular to a method, device, electronic equipment and medium for predicting an inflow flow value of a reservoir. Background Art
[0002] For hydropower stations, power generation is the main source of economic benefits, and water is the raw material for production. How to accurately predict the flow value entering the hydropower station reservoir to help the hydropower station make reasonable arrangements for flood control and power generation planning and scheduling, and achieve the goal of avoiding flood disasters and improving the economic benefits of power generation is a key issue of concern in the industry.
[0003] At present, the flow value entering the hydropower station reservoir is mainly predicted by time series prediction methods, for example, through traditional statistical time series models, linear regression models or long short-term memory artificial neural networks; however, these methods are difficult to accurately predict the flow value entering the hydropower station reservoir; for example, the traditional statistical time series model cannot accurately determine the influencing factor corresponding to each parameter, and the model operation efficiency is low; it is difficult to achieve periodic prediction of long sequences for machine learning models such as linear regression; deep learning models such as long short-term memory artificial neural networks have poor stability and it is difficult to accurately predict the flow value entering the hydropower station reservoir. Summary of the invention
[0004] The embodiments of the present invention provide a method, device, electronic device and medium for predicting the inflow flow value of a reservoir, so as to achieve accurate prediction of the flow value flowing into the reservoir.
[0005] In a first aspect, an embodiment of the present invention provides a method for predicting an inflow value of a reservoir, comprising:
[0006] According to the prediction time corresponding to the target reservoir, multiple historical moments are determined, and an initialized prediction feature sequence is formed according to multiple descriptive information of the target reservoir at each historical moment;
[0007] Iteratively updating the prediction feature sequence using at least one pre-trained prediction model until an iteration termination condition is met;
[0008] When the iteration termination condition is met, the final prediction results corresponding to each prediction model are obtained, and the predicted inflow flow value of the target reservoir at the prediction time is determined according to each of the final prediction results.
[0009] In a second aspect, an embodiment of the present invention further provides a device for predicting an inflow flow value of a reservoir, comprising:
[0010] An initialized prediction feature sequence generation module is used to determine multiple historical moments according to the prediction moment corresponding to the target reservoir, and form an initialized prediction feature sequence according to multiple descriptive information of the target reservoir at each historical moment;
[0011] A prediction feature sequence iteration module, used to iteratively update the prediction feature sequence using at least one pre-trained prediction model until an iteration termination condition is met;
[0012] The inflow flow value prediction module is used to obtain the final prediction results corresponding to each prediction model when the end iteration condition is met, and determine the predicted inflow flow value of the target reservoir at the prediction time based on each of the final prediction results.
[0013] In a third aspect, an embodiment of the present invention further provides an electronic device, the electronic device comprising:
[0014] one or more processors;
[0015] a storage device for storing one or more programs,
[0016] When the one or more programs are executed by the one or more processors, the one or more processors implement the method for predicting the inflow flow value of a reservoir as described in any one of the embodiments of the present invention.
[0017] In a fourth aspect, an embodiment of the present invention further provides a storage medium comprising computer executable instructions, characterized in that the computer executable instructions, when executed by a computer processor, are used to execute a method for predicting the inflow value of a reservoir as in any embodiment of the present invention.
[0018] The embodiment of the present invention determines multiple historical moments according to the prediction moment corresponding to the target reservoir, and forms an initialized prediction feature sequence according to multiple description information of the target reservoir at each historical moment; iteratively updates the prediction feature sequence using at least one pre-trained prediction model until an end iteration condition is met; obtains the final prediction result corresponding to each prediction model when the end iteration condition is met, and determines the predicted inflow flow value of the target reservoir at the prediction moment according to each final prediction result, thereby realizing accurate prediction of the flow value flowing into the reservoir. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 It is a flow chart of a method for predicting an inflow flow value of a reservoir in Embodiment 1 of the present invention;
[0020] Figure 2 It is a flow chart of a method for predicting an inflow flow value of a reservoir in Embodiment 2 of the present invention;
[0021] Figure 3 It is a flow chart of a method for predicting an inflow flow value of a reservoir in Embodiment 3 of the present invention;
[0022] Figure 4 It is a flow chart of a method for predicting an inflow flow value of a reservoir in Embodiment 3 of the present invention;
[0023] Figure 5 It is a schematic diagram of the structure of a device for predicting the inflow flow value of a reservoir in a fourth embodiment of the present invention;
[0024] Figure 6 It is a structural schematic diagram of an electronic device in Embodiment 5 of the present invention. DETAILED DESCRIPTION
[0025] The embodiments of the present invention are further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the embodiments of the present invention, rather than to limit the embodiments of the present invention. It is also necessary to explain that, for ease of description, only parts related to the embodiments of the present invention are shown in the accompanying drawings, rather than all structures.
[0026] Embodiment 1
[0027] Figure 1 This is a flowchart of a method for predicting the inflow flow value of a reservoir provided in the first embodiment of the present invention. This embodiment is applicable to the case of predicting the flow value flowing into the reservoir at the prediction time. The method can be executed by a device for predicting the inflow flow value of the reservoir. The device can be implemented by software and / or hardware and integrated in an electronic device that executes the method. The electronic device involved in this embodiment can be a computer, a server or a tablet computer, etc. Specifically, refer to Figure 1 , the method specifically comprises the following steps:
[0028] Step 110: determine a plurality of historical moments according to the prediction moment corresponding to the target reservoir, and form an initialized prediction feature sequence according to a plurality of descriptive information of the target reservoir at each historical moment.
[0029] The target reservoir may be any reservoir or lake, such as a power station reservoir or a natural lake, which is not limited in this embodiment. The prediction time may be any future time, such as 8 am tomorrow or 10 pm the day after tomorrow, which is not limited in this embodiment.
[0030] The description information includes statistical values or time series characteristics of the target reservoir's runoff flow, rainfall flow, forecast rainfall, and environmental data at each historical moment, which are not limited in this embodiment. The statistical value may be mean, sum, maximum value, minimum value, variance, skewness, or kurtosis, etc.; the time series characteristics may be absolute energy value, absolute sum of first-order differences, autoregressive coefficient, or approximate entropy, etc.
[0031] In an optional implementation of this embodiment, in the process of determining the inflow value of the target reservoir at the prediction moment, multiple historical moments can be determined, and based on multiple descriptive information of the target reservoir at each historical moment, an initialized prediction feature sequence corresponding to the prediction moment is formed.
[0032] For example, if the prediction time is February 26, the determined historical moments can be February 19-February 25; further, the historical inflow flow values of the target reservoir from February 19 to February 25 can be obtained, and the descriptive information at each historical moment can be generated based on the historical inflow flow values, and then the descriptive information can be arranged in sequence to form an initialized prediction feature sequence.
[0033] It should be noted that, in this embodiment, the actual rainfall at the prediction time is represented by the forecast rainfall at the prediction time in the initialized prediction feature sequence.
[0034] Step 120: Use at least one pre-trained prediction model to iteratively update the prediction feature sequence until an iteration termination condition is met.
[0035] Among them, the prediction model can be a machine learning model such as xgboot, lightgbm or catboost, which is not limited in this embodiment.
[0036] The iteration condition may be a period condition. For example, the period is set to 7. After 7 iterations, it can be determined that the iteration termination condition is met.
[0037] In an optional implementation of this embodiment, after the initialized prediction feature sequence is formed, the prediction feature sequence can be iteratively updated using at least one pre-trained prediction model until an iteration termination condition is met.
[0038] Exemplarily, after forming an initialized prediction feature sequence, the prediction feature sequence can be input into the xgboot and lightgbm prediction models to obtain two prediction results, and the two prediction results are weighted averaged, and the calculation result is concatenated with the prediction feature sequence to generate a new prediction feature sequence; further, continue to input the new prediction feature sequence into the xgboot and lightgbm prediction models until the iteration end condition is met.
[0039] Step 130: Obtain the final prediction results corresponding to each prediction model when the iteration termination condition is met, and determine the predicted inflow value of the target reservoir at the prediction time according to each final prediction result.
[0040] In an optional implementation of this embodiment, after the iterative update is completed, the final prediction results corresponding to each prediction model when the iteration conditions are met can be obtained, and the predicted inflow flow value of the target reservoir at the prediction time can be determined based on each final prediction result.
[0041] In the above example, the prediction feature sequence is input into the xgboot and lightgbm prediction models to obtain two prediction results, and the weighted average of the two prediction results is calculated, and the calculation result is spliced with the prediction feature sequence to generate a new prediction feature sequence; further, the operation of inputting the new prediction feature sequence into the xgboot and lightgbm prediction models is continued until the iteration end condition is met, and the iterative update of the prediction feature sequence is stopped, and the final prediction results corresponding to the xgboot and lightgbm prediction models at the end of the last round of iterations are obtained, and the predicted inflow flow value of the target reservoir at the prediction time is determined according to each final prediction result.
[0042] The scheme of this embodiment determines multiple historical moments according to the predicted moment corresponding to the target reservoir, and forms an initialized prediction feature sequence according to multiple description information of the target reservoir at each historical moment; iteratively updates the prediction feature sequence using at least one pre-trained prediction model until the end of iteration condition is met; obtains the final prediction result corresponding to each prediction model when the end of iteration condition is met, and determines the predicted inflow flow value of the target reservoir at the predicted moment according to each final prediction result, thereby realizing accurate prediction of the flow value flowing into the reservoir, which can help hydropower stations to make reasonable arrangements for flood control and power generation planning and scheduling, avoid flood disasters and improve the economic benefits of power generation.
[0043] Embodiment 2
[0044] Figure 2This is a flow chart of a method for predicting the inflow value of a reservoir in the second embodiment of the present invention. This embodiment is a further refinement of the above technical solutions. The technical solution in this embodiment can be combined with various optional solutions in one or more of the above embodiments. Figure 2 As shown, the method for predicting the inflow value of a reservoir may include the following steps:
[0045] Step 210: determine a plurality of historical moments according to the prediction moment corresponding to the target reservoir, and form an initialized prediction feature sequence according to a plurality of descriptive information of the target reservoir at each historical moment.
[0046] Step 220: Use a plurality of similar prediction models trained in advance to iteratively update the prediction feature sequence until an iteration termination condition is met.
[0047] Among them, the model structures and / or model parameters of different prediction models are not exactly the same; in this embodiment, the different prediction models can be xgboot, lightgbm and catboost models based on the GBDT (Gradient Boosting Decision Tree) framework, or other models, which are not limited in this embodiment.
[0048] In an optional implementation of this embodiment, after the initialized prediction feature sequence is formed, the prediction feature sequence can be iteratively updated using pre-trained xgboot, lightgbm and catboost prediction models respectively.
[0049] Optionally, the prediction feature sequence is iteratively updated using multiple pre-trained prediction models of the same type until the iteration end condition is met, which may include: inputting the prediction feature sequence into each prediction model respectively, and obtaining the prediction results output by each prediction model respectively; after updating the prediction feature sequence using each prediction result, returning to execute the operation of inputting the prediction feature sequence into each prediction model respectively until the iteration end condition is met.
[0050] In an optional implementation of this embodiment, using each prediction result to update the prediction feature sequence may include: performing a weighted average operation on the prediction results output by each prediction model to generate a reference prediction result; splicing the reference prediction result with the prediction feature sequence to generate a new prediction feature sequence, and updating the prediction feature sequence to the new prediction feature sequence.
[0051] In a specific example of this embodiment, after the initialized prediction feature sequence is formed, the initialized prediction feature sequence can be input into the xgboot, lightgbm and catboost prediction models respectively, and the xgboot, lightgbm and catboost prediction models respectively output prediction results corresponding to the prediction feature sequence. It can be understood that since the model structure and model parameters of each prediction model are not exactly the same, then for the same prediction feature sequence, the prediction results output by different prediction models are not exactly the same.
[0052] Furthermore, the prediction results corresponding to the prediction feature sequences output by the xgboot, lightgbm and catboost prediction models can be respectively subjected to weighted average operation, and the prediction results can be concatenated with the prediction feature sequences to generate new prediction feature sequences, and the generated new prediction feature sequences can be respectively input into the xgboot, lightgbm and catboost prediction models until the iteration termination conditions are met.
[0053] Step 230: When the conditions for ending the iteration are met, the prediction results currently output by each prediction model are obtained as the final prediction results; and the final prediction results are weighted averaged according to the prediction weights corresponding to each prediction model to obtain the predicted inflow value of the target reservoir at the prediction time.
[0054] The prediction weights corresponding to the prediction models may be the same or different, and may be any numerical value, which is not limited in this embodiment.
[0055] In an optional implementation of this embodiment, after the iteration is completed, the prediction result currently output by each prediction model when the iteration termination condition is met can be further obtained, and the prediction result can be used as the final prediction result; according to the prediction weight corresponding to each prediction model, each prediction result is weighted averaged to obtain the predicted inflow flow value of the target reservoir at the prediction time.
[0056] For example, the final prediction results output by the xgboot, lightgbm and catboost prediction models can be weighted averaged to obtain the predicted inflow value of the target reservoir at the prediction time.
[0057] In a specific example of this embodiment, the single prediction results of the three models xgboost, lightgbm and catboost can be weighted averaged by the following formula:
[0058] Y predict= αY predict_xgboost +βY predict_lightgbm +γYpredict_catboost
[0059] Among them, α, β and γ are prediction weight values.
[0060] The scheme of this embodiment, after determining multiple historical moments according to the prediction moment corresponding to the target reservoir and forming an initialized prediction feature sequence according to multiple descriptive information of the target reservoir at each historical moment, can also use multiple pre-trained similar prediction models to iteratively update the prediction feature sequence until the iteration termination condition is met, and the inflow flow value can be predicted by the prediction results of different prediction models, thereby improving the prediction accuracy of the inflow flow value.
[0061] Embodiment 3
[0062] Figure 3 This is a flow chart of a method for predicting the inflow value of a reservoir in the third embodiment of the present invention. This embodiment is a further refinement of the above technical solutions. The technical solution in this embodiment can be combined with various optional solutions in one or more of the above embodiments. Figure 3 As shown, the method for predicting the inflow value of a reservoir may include the following steps:
[0063] Step 310: determine a plurality of historical moments according to the prediction moment corresponding to the target reservoir, and form an initialized prediction feature sequence according to a plurality of descriptive information of the target reservoir at each historical moment.
[0064] Step 320: Obtain sample data corresponding to the target reservoir, and generate training data based on the sample data; use the training data to train at least two set machine learning models respectively to obtain each prediction model.
[0065] Among them, the sample data include: runoff flow, rainfall flow, forecast rainfall and environmental data, etc. The runoff flow can be the water flow from other rivers flowing into the target reservoir at a certain moment; the rainfall flow can be the precipitation monitored by the observation station at a certain moment; the forecast rainfall can be the weather forecast's prediction of the target precipitation at a certain moment; the environmental forecast can include the temperature, wind force or wind direction at a certain moment, etc.
[0066] In an optional implementation of this embodiment, before using at least one pre-trained prediction model to iteratively update the prediction feature sequence, sample data of historical moments corresponding to the target reservoir can also be used to generate training data; further, multiple prediction models can be simultaneously trained based on the training data.
[0067] In an optional implementation of the present embodiment, obtaining sample data corresponding to the target reservoir may include: obtaining the confluence flow from the upstream and / or the river channel to the target reservoir at every first set time interval; obtaining the rainfall flow monitored by each observation station associated with the target reservoir at every second set time interval; obtaining the forecast rainfall predicted by the rainfall forecast within a third set time interval; and obtaining environmental data monitored by an environmental sensor at every fourth time interval, the environmental data including temperature, wind speed or wind direction.
[0068] It should be noted that the above-mentioned first set time interval, second set time interval, third set time interval and fourth time interval can be the same, for example, all are 3 hours or 1 hour, etc.; they can also be different, for example, the first set time interval is 3 hours, the second set time interval, the third set time interval and the fourth time interval are 1 hour, etc., which is not limited in this embodiment.
[0069] In an optional implementation of the present embodiment, generating training data based on sample data may include: preprocessing each sample data to obtain target sample data; extracting features of each target sample data to obtain multiple description information corresponding to each historical moment, and screening each description information to generate a training feature sequence corresponding to each historical moment; and determining each training feature sequence as training data.
[0070] Exemplarily, preprocessing each sample data to obtain target sample data can include: using global maximum and minimum value normalization processing for runoff flow, rainfall flow, temperature and average wind speed data; encoding wind direction data in accordance with the national standard: GB / T37301-2019 Technical Specifications for Ground Meteorological Data Service Products; processing missing values for runoff flow, rainfall flow and forecast rainfall, etc.
[0071] In an optional implementation of this embodiment, feature extraction is performed on each target sample data to obtain multiple descriptive information corresponding to each moment, which may include: determining the target inflow corresponding to the target historical moment, and the reference inflow at each moment before the target historical moment; determining the statistical value of the inflow within each set time range according to the target inflow and each reference inflow; the statistical value includes: mean, sum, maximum, minimum, variance, skewness or kurtosis; and / or, determining at least one time series feature according to the target inflow and each reference inflow; the time series feature includes: absolute energy value, absolute sum of first-order differences, autoregressive coefficient or approximate entropy. It should be noted that, when making long-term predictions of inflow, actual rainfall is an important factor affecting the prediction results, but the actual rainfall is not available within the predicted time (observation value), so the target inflow involved in this embodiment can be filled by the forecast rainfall.
[0072] Exemplarily, if the target historical moment is t, the inflow flow value at moment t and the reference inflow flow values at each moment before moment t (for example, t-1, t-2, t-3, ..., t-w1, where w1 is any positive integer, for example, 56 or 60, etc.) can be determined; further, the time difference sliding window technology can be adopted, the sliding window size is w1, and the statistical value of the inflow flow in the calculation interval [ti, t], where i = period1*j, j = 1, 2, ..., w1 / period1; where period1 can also be any numerical value, or it can be obtained by calculating the autocorrelation coefficient and partial correlation coefficient of the original inflow flow sequence, which is not limited in this embodiment.
[0073] It should be noted that skewness is a measure of the direction and degree of skewness of the statistical data distribution, and is a numerical feature of the degree of asymmetry of the statistical data distribution. By definition, skewness is the third-order standardized moment of the sample; kurtosis is also called the kurtosis coefficient; it is a characteristic number that characterizes the height of the peak of the probability density distribution curve at the mean value. Intuitively, kurtosis reflects the sharpness of the peak. The kurtosis of a random variable is calculated as: the ratio of the fourth-order central moment of the random variable to the square of the variance.
[0074] Furthermore, the target inflow flow in each sliding window and each reference inflow flow can be extracted to determine at least one time series feature. It should be noted that the number of target inflow flow values and reference inflow flow values in each sliding window is the same; exemplarily, the extracted time series features may include: abs_energy (absolute energy value), which returns the absolute energy of the time series data; absolute_sum_of_changes (absolute sum of first-order differences), which returns the sum of the absolute values of the first-order difference results of the time series data; agg_autocorrelation (aggregate statistical features of each order autocorrelation coefficient), which is the aggregate statistical features of each order autocorrelation coefficient; agg_linear_tren d (linear regression based on block time series aggregation values), returns the linear regression of block aggregation of time series data; approximate_entropy (approximate entropy), measures the periodicity, unpredictability and volatility of time series data; ar_coefficient (autoregressive coefficient), measures the periodicity, unpredictability and volatility of time series data; augmented_dickey_fuller (extended Dickey-Fuller test - ADF test), tests whether an autoregressive model has a unit root, and measures the stationarity of time series data; autocorrelation (lag order autocorrelation), calculates the autocorrelation of lag order lagged time series data; binned _entropy (group entropy), divide the entire sequence into max_bins buckets by value, then put each value into the corresponding bucket, and then calculate the entropy; benford_correlation (group correlation), divide the entire sequence into max_bins buckets by value, then put each value into the corresponding bucket, and then calculate the correlation; c3 (non-linear measurement of time series data), non-linear measurement of time series data; change_quantiles (descriptive statistics of time series data in a given interval), descriptive statistics of time series data in a given interval; cid_ce (complexity of time series data), used to evaluate the complexity of time series, the more complex the sequence, the more valleys and peaks; count_abo ve (percentage above the specified value), returns the percentage of the sequence above the specified value; count_above_mean (number of values above the mean), counts the number of values above the mean of the time series data; count_below (percentage below the specified value), returns the percentage of the sequence below the specified value; cwt_coefficients (Ricker wavelet analysis), continuous wavelet analysis, Ricker wavelet is a commonly used wavelet type in seismic exploration, and Ricker wavelet is strictly derived based on the wave equation; energy_ratio_by_chunks (block local entropy ratio), after dividing the time series data into blocks, calculates the entropy ratio of the target block data to the entropy of the whole.When the data is not evenly distributed, the excess data will be scattered in the previous blocks; fft_aggregated (spectral statistics of absolute Fourier transform), returns the spectral centroid, kurtosis, skewness and other values after absolute Fourier transform; fft_coefficient (Fourier transform coefficient), calculates the coefficients of one-dimensional discrete Fourier sequence based on the fast Fourier transform algorithm; friedrich_coefficients (polynomial coefficients of Langevin model fitting), based on the polynomial coefficients of Langevin fitting of the kinetic model; large_standard_deviation (whether the standard deviation is times the range), whether the standard deviation is r times the data range; longest_strike_above_mean (longest continuous sequence length above the mean), returns the length of the longest continuous subsequence in x that is greater than the mean of x; longest_strike_below_mean (longest continuous sequence length below the mean), returns the length of the longest continuous subsequence in x that is less than the mean of x; mean_second_derivative_central (mean of the center of the second-order derivative), returns the average approximation of the center of the second-order derivative.
[0075] Furthermore, screening each description information to generate a training feature sequence corresponding to each historical moment may include: calculating the correlation coefficient between each feature, eliminating features with correlations lower than a set threshold, and generating a training feature sequence based on the remaining features.
[0076] In the specific implementation, the correlation coefficient between each training feature sequence and the target inflow flow value can be calculated to remove the feature variables with low correlation; the Spearman rank correlation coefficient between each training feature sequence is calculated, and then a training feature sequence is selected from the feature information whose linear correlation is greater than a predetermined threshold (it can be randomly selected); the feature importance output by the GBDT algorithm can also be used to screen features whose feature importance is greater than the specified threshold.
[0077] In an optional implementation of the present embodiment, after generating multiple training feature sequences, each training feature sequence can be randomly grouped to form a training data set, a validation data set and a test data set; further, the training sets are used to train three prediction models, namely xgboost, lightgbm and catboost, respectively; in the training process of the prediction model, random search and Bayesian optimization methods can be used to optimize hyperparameters, and 5-fold cross validation can be used, and the validation function is MAPE (mean absolute percentage error).
[0078] Step 330: Use at least one pre-trained prediction model to iteratively update the prediction feature sequence until an iteration termination condition is met.
[0079] Step 340: Obtain the final prediction results corresponding to each prediction model when the iteration termination condition is met, and determine the predicted inflow value of the target reservoir at the prediction time according to each final prediction result.
[0080] The solution of this embodiment can also obtain sample data corresponding to the target reservoir and generate training data based on the sample data before using at least one pre-trained prediction model to iteratively update the prediction feature sequence; use the training data to train at least two set machine learning models respectively to obtain each prediction model, thereby providing a basis for subsequently accurately determining the inflow flow value flowing into the target reservoir at the prediction time.
[0081] In order to enable those skilled in the art to better understand the prediction method of the reservoir inflow value of this embodiment, Figure 4 is a flow chart of a method for predicting the inflow value of a reservoir in Embodiment 3 of the present invention, with reference to Figure 4 , the method specifically comprises the following steps:
[0082] Step 410: Obtain the runoff flow, rainfall flow, forecast rainfall and environmental data within a specified time range.
[0083] Step 420: Process the data using a data processing module.
[0084] Step 430: extract features of each processed data through a feature extraction module.
[0085] Step 440: Screen each feature through the feature screening module and generate an initial training set and a validation set.
[0086] Step 450: Specify the prediction period and the number of predictions.
[0087] Step 460: Model training.
[0088] Step 470: Model prediction.
[0089] Step 471, summarize the prediction results.
[0090] Step 472: Update the predicted number.
[0091] Step 480: Whether the current prediction times are less than the specified prediction period.
[0092] If yes, execute step 481;
[0093] Otherwise, execute step 482.
[0094] Step 481: splice the grade inbound flow prediction value to the inbound flow sequence data, and use the feature extraction module and feature screening module to update the training set.
[0095] Multiple prediction models are obtained based on the training set and the validation set.
[0096] Step 482: Output the inbound flow prediction result.
[0097] The embodiments of the present invention achieve accurate prediction of reservoir inflow based on a large amount of historical data and available monitoring data, bringing significant safety and economic value to reservoir-based production.
[0098] Embodiment 4
[0099] Figure 5 This is a schematic diagram of the structure of a device for predicting the inflow flow value of a reservoir in the fourth embodiment of the present invention. The device can execute the method for predicting the inflow flow value of the reservoir involved in the above embodiments. Figure 5 The device includes: an initialized prediction feature sequence generation module 510, a prediction feature sequence iteration module 520 and an inflow flow value prediction module 530.
[0100] The initialized prediction feature sequence generation module 510 is used to determine a plurality of historical moments according to the prediction moment corresponding to the target reservoir, and to form an initialized prediction feature sequence according to a plurality of descriptive information of the target reservoir at each historical moment;
[0101] A prediction feature sequence iteration module 520, configured to iteratively update the prediction feature sequence using at least one pre-trained prediction model until an iteration termination condition is met;
[0102] The inflow flow value prediction module 530 is used to obtain the final prediction results corresponding to each prediction model when the end iteration condition is met, and determine the predicted inflow flow value of the target reservoir at the prediction time according to each of the final prediction results.
[0103] The solution of this embodiment is to determine multiple historical moments according to the prediction moment corresponding to the target reservoir through the initialized prediction feature sequence generation module, and form an initialized prediction feature sequence according to multiple description information of the target reservoir at each historical moment; to iteratively update the prediction feature sequence using at least one pre-trained prediction model through the prediction feature sequence iteration module until the end of iteration condition is met; to obtain the final prediction result corresponding to each prediction model when the end of iteration condition is met through the inflow flow value prediction module, and to determine the predicted inflow flow value of the target reservoir at the prediction moment according to each of the final prediction results, thereby realizing accurate prediction of the flow value flowing into the reservoir.
[0104] In an optional implementation of this embodiment, the prediction feature sequence iteration module 520 is specifically configured to
[0105] Iteratively updating the prediction feature sequence using a plurality of similar prediction models trained in advance until an iteration termination condition is met;
[0106] Among them, the model structures and / or model parameters of different prediction models are not completely the same.
[0107] In an optional implementation of this embodiment, the prediction feature sequence iteration module 520 is further specifically configured to:
[0108] Inputting the prediction feature sequences into the prediction models respectively, and obtaining the prediction results outputted by the prediction models respectively;
[0109] After the prediction feature sequence is updated using each prediction result, the operation of inputting the prediction feature sequence into each prediction model is returned to be executed until the iteration termination condition is met.
[0110] In an optional implementation of this embodiment, the prediction feature sequence iteration module 520 is further specifically configured to:
[0111] Perform weighted average calculation on the prediction results output by each prediction model to generate a reference prediction result;
[0112] The reference prediction result is concatenated with the prediction feature sequence to generate a new prediction feature sequence, and the prediction feature sequence is updated to the new prediction feature sequence.
[0113] In an optional implementation of this embodiment, the inflow flow value prediction module 530 is specifically used to
[0114] When the iteration termination condition is met, the prediction result currently output by each prediction model is obtained as each of the final prediction results;
[0115] According to the prediction weights corresponding to the prediction models, the final prediction results are weighted averaged to obtain the predicted inflow value of the target reservoir at the prediction time.
[0116] In an optional implementation of this embodiment, the device for predicting the inflow value of a reservoir further includes: a prediction model generating module for
[0117] Acquire sample data corresponding to the target reservoir, and generate training data according to the sample data; the sample data includes: confluence flow, rainfall flow, forecast rainfall and environmental data;
[0118] The training data is used to train at least two set machine learning models respectively to obtain each prediction model.
[0119] In an optional implementation of this embodiment, the prediction model generation module is specifically used to
[0120] Obtaining the confluence flow from the upstream and / or the river channel to the target reservoir at every first set time interval;
[0121] acquiring the rainfall flow monitored by each observation station associated with the target reservoir at every second set time interval;
[0122] Obtaining the predicted rainfall amount predicted by the rainfall forecast within a third set time interval;
[0123] and acquiring environmental data monitored by the environmental sensor at every fourth time interval, the environmental data comprising temperature, wind speed or wind direction;
[0124] Correspondingly, the prediction model generation module is also specifically used for
[0125] Preprocessing each of the sample data to obtain target sample data;
[0126] Extracting features from each of the target sample data to obtain a plurality of description information corresponding to each historical moment, and screening each of the description information to generate a training feature sequence corresponding to each historical moment;
[0127] Determining each of the training feature sequences as training data;
[0128] Among them, the prediction model generation module is also specifically used for
[0129] Determine a target inflow flow corresponding to a target historical moment, and a reference inflow flow at each moment before the target historical moment; wherein the target inflow flow is determined by the forecast rainfall;
[0130] Determine the statistical value of the inflow flow within each set time range according to the target inflow flow and each reference inflow flow; the statistical value includes: mean, sum, maximum value, minimum value, variance, skewness or kurtosis; and / or,
[0131] Determine at least one time series feature according to the target inflow flow and each reference inflow flow; the time series feature includes: absolute energy value, absolute sum of first-order differences, autoregressive coefficient or approximate entropy;
[0132] Correspondingly, the prediction model generation module is also specifically used for
[0133] The correlation coefficients between the features are calculated, features with correlations lower than a set threshold are eliminated, and the training feature sequence is generated based on the remaining features.
[0134] The device for predicting the inflow flow value of a reservoir provided in an embodiment of the present invention can execute the method for predicting the inflow flow value of a reservoir provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0135] Embodiment 5
[0136] Figure 6 A schematic diagram of the structure of an electronic device provided in Embodiment 5 of the present invention is shown in FIG. Figure 6 As shown, the electronic device includes a processor 60, a memory 61, an input device 62 and an output device 63; the number of the processor 60 in the electronic device can be one or more. Figure 6 A processor 60 is taken as an example; the processor 60, the memory 61, the input device 62 and the output device 63 in the electronic device can be connected by a bus or other means. Figure 6 The example of connecting through bus is taken in the following.
[0137] The memory 61, as a computer-readable storage medium, can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the method for predicting the inflow value of a reservoir in the embodiment of the present invention (for example, the initialized prediction feature sequence generation module 510, the prediction feature sequence iteration module 520 and the inflow value prediction module 530 in the device for predicting the inflow value of a reservoir). The processor 60 executes various functional applications and data processing of the electronic device by running the software programs, instructions and modules stored in the memory 61, that is, realizes the above-mentioned method for predicting the inflow value of a reservoir.
[0138] The memory 61 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the terminal, etc. In addition, the memory 61 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 61 may further include a memory remotely arranged relative to the processor 60, and these remote memories may be connected to the electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0139] The input device 62 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the electronic device. The output device 63 may include a display device such as a display screen.
[0140] Embodiment 6
[0141] Embodiment 6 of the present invention further provides a storage medium comprising computer executable instructions, wherein the computer executable instructions are used to execute a method for predicting an inflow flow value of a reservoir when executed by a computer processor, the method comprising:
[0142] According to the prediction time corresponding to the target reservoir, multiple historical moments are determined, and an initialized prediction feature sequence is formed according to multiple descriptive information of the target reservoir at each historical moment;
[0143] Iteratively updating the prediction feature sequence using at least one pre-trained prediction model until an iteration termination condition is met;
[0144] When the iteration termination condition is met, the final prediction results corresponding to each prediction model are obtained, and the predicted inflow flow value of the target reservoir at the prediction time is determined according to each of the final prediction results.
[0145] Of course, the storage medium containing computer executable instructions provided in an embodiment of the present invention is not limited to the method operations described above, and can also execute related operations in the method for predicting the inflow flow value of a reservoir provided in any embodiment of the present invention.
[0146] Through the above description of the implementation methods, the technicians in the relevant field can clearly understand that the present invention can be implemented by means of software and necessary general hardware, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, a read-only memory (ROM), a random access memory (RAM), a flash memory (FLASH), a hard disk or an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0147] It is worth noting that in the embodiment of the above-mentioned device for predicting the inflow flow value of the reservoir, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.
[0148] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A method for predicting the inflow value of a reservoir, It is characterized in that include: According to the prediction moment corresponding to the target reservoir, multiple historical moments are determined, and according to multiple descriptive information of the target reservoir at each historical moment, an initialized prediction feature sequence is formed, wherein the descriptive information is the statistical value or time series feature of the runoff flow, rainfall flow, forecast rainfall and environmental data of the target reservoir at each historical moment; Iteratively updating the prediction feature sequence using at least one pre-trained prediction model until an iteration termination condition is met, wherein the prediction feature sequence is iteratively updated by weighted average operation; Obtaining the final prediction results corresponding to each prediction model when the iteration termination condition is met, and determining the predicted inflow flow value of the target reservoir at the prediction time according to each of the final prediction results; Obtaining the final prediction results corresponding to each prediction model when the iteration termination condition is met, and determining the predicted inflow flow value of the target reservoir at the prediction time according to each of the final prediction results, including: When the iteration termination condition is met, the prediction result currently output by each prediction model is obtained as each of the final prediction results; According to the prediction weights corresponding to the prediction models, the final prediction results are weighted averaged to obtain the predicted inflow value of the target reservoir at the prediction time; The iterative updating of the prediction feature sequence by weighted average operation includes: Perform weighted average calculation on the prediction results output by each prediction model to generate a reference prediction result; The reference prediction result is concatenated with the prediction feature sequence to generate a new prediction feature sequence, and the prediction feature sequence is updated to the new prediction feature sequence.
2. The method according to claim 1, It is characterized in that Iteratively updating the prediction feature sequence using at least one pre-trained prediction model until an iteration termination condition is met, including: Iteratively updating the prediction feature sequence using a plurality of similar prediction models trained in advance until an iteration termination condition is met; Among them, the model structures and / or model parameters of different prediction models are not completely the same.
3. The method according to claim 2, It is characterized in that Iteratively updating the prediction feature sequence using a plurality of similar pre-trained prediction models until an iteration termination condition is met, including: Inputting the prediction feature sequences into the prediction models respectively, and obtaining the prediction results outputted by the prediction models respectively; After the prediction feature sequence is updated using each prediction result, the operation of inputting the prediction feature sequence into each prediction model is returned to be executed until the iteration termination condition is met.
4. The method according to any one of claims 1 to 3, It is characterized in that Before iteratively updating the prediction feature sequence using at least one pre-trained prediction model, the method further includes: Acquire sample data corresponding to the target reservoir, and generate training data according to the sample data; the sample data includes: confluence flow, rainfall flow, forecast rainfall and environmental data; The training data is used to train at least two set machine learning models respectively to obtain each prediction model.
5. The method according to claim 4, It is characterized in that The acquiring of sample data corresponding to the target reservoir includes at least one of the following: Obtaining the confluence flow from the upstream and / or the river channel to the target reservoir at every first set time interval; acquiring the rainfall flow monitored by each observation station associated with the target reservoir at every second set time interval; Obtaining the predicted rainfall amount predicted by the rainfall forecast within a third set time interval; and acquiring environmental data monitored by the environmental sensor at every fourth time interval, the environmental data comprising temperature, wind speed or wind direction; Accordingly, generating training data according to the sample data includes: Preprocessing each of the sample data to obtain target sample data; Extracting features from each of the target sample data to obtain a plurality of description information corresponding to each historical moment, and screening each of the description information to generate a training feature sequence corresponding to each historical moment; Determining each of the training feature sequences as training data; The feature extraction of each target sample data to obtain a plurality of description information corresponding to each moment includes: Determine a target inflow flow corresponding to a target historical moment, and a reference inflow flow at each moment before the target historical moment; wherein the target inflow flow is determined by the forecast rainfall; Determine the statistical value of the inflow flow within each set time range according to the target inflow flow and each reference inflow flow; the statistical value includes: mean, sum, maximum value, minimum value, variance, skewness or kurtosis; and / or, Determine at least one time series feature according to the target inflow flow and each reference inflow flow; the time series feature includes: absolute energy value, absolute sum of first-order differences, autoregressive coefficient or approximate entropy; Accordingly, the description information is screened to generate a training feature sequence corresponding to each historical moment, including: The correlation coefficients between the features are calculated, features with correlations lower than a set threshold are eliminated, and the training feature sequence is generated based on the remaining features.
6. A device for predicting the inflow value of a reservoir, It is characterized in that include: The initialized prediction feature sequence generation module is used to determine multiple historical moments according to the prediction moment corresponding to the target reservoir, and form an initialized prediction feature sequence according to multiple description information of the target reservoir at each historical moment, wherein the description information is the statistical value or time series feature processed by the confluence flow, rainfall flow, forecast rainfall and environmental data of the target reservoir at each historical moment; A prediction feature sequence iteration module, used to iteratively update the prediction feature sequence using at least one pre-trained prediction model until an iteration termination condition is met, wherein the prediction feature sequence is iteratively updated by weighted average operation; The inflow flow value prediction module is used to obtain the final prediction results corresponding to each prediction model when the end iteration condition is met, and determine the predicted inflow flow value of the target reservoir at the prediction time according to each of the final prediction results; The inflow flow value prediction module is specifically used for: When the iteration termination condition is met, the prediction result currently output by each prediction model is obtained as each of the final prediction results; According to the prediction weights corresponding to the prediction models, the final prediction results are weighted averaged to obtain the predicted inflow value of the target reservoir at the prediction time; Wherein, the prediction feature sequence iteration module is further configured to: Perform weighted average calculation on the prediction results output by each prediction model to generate a reference prediction result; The reference prediction result is concatenated with the prediction feature sequence to generate a new prediction feature sequence, and the prediction feature sequence is updated to the new prediction feature sequence.
7. An electronic device, It is characterized in that The electronic device comprises: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method for predicting the inflow value of a reservoir as described in any one of claims 1-5.
8. A storage medium containing computer executable instructions, It is characterized in that The computer executable instructions, when executed by a computer processor, are used to execute the method for predicting the inflow value of a reservoir as described in any one of claims 1-5.
