Timing sequence enhanced deep learning flood forecasting method, device, equipment and medium
By adopting a time-enhanced deep learning method in flood forecasting, combined with the Transformer module and principal component analysis method, the problems of short prediction period and model design limitations in the existing technology are solved, and more accurate and long-term flood forecasting effects are achieved.
Patent Information
- Application Number
- CN202411806975.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2044-12-10
AI Technical Summary
The existing deep learning models have a short forecast period in flood forecasting, making it difficult to achieve efficient and accurate simulation results. At the same time, there are many restrictions on the design of the coupled model, making it difficult to adjust the module interaction method, and the training process cannot share information independently.
The time-enhanced deep learning method is adopted to couple the Transformer module in the first time-domain convolutional neural network model to build a time-enhanced deep learning model, and combine the principal component analysis method to reduce the data dimensions, and set up an error correction model to improve prediction accuracy.
During the long forecast period, the prediction accuracy of flood forecasts was improved, the forecast period of flood forecasts was extended, the understanding of flood evolution process was improved, and more accurate prediction of future flood events was achieved.
Smart Images

Figure CN119761559A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of flood forecasting, and in particular to a time series enhanced deep learning flood forecasting method, device, equipment and medium. Background Art
[0002] Floods are considered to be one of the most common and destructive natural disasters, posing a huge threat to human life safety, infrastructure and socio-economic conditions. In flood prevention and disaster reduction, flood forecasting, as an important non-engineering measure, faces research hotspots and difficult issues in the field of hydrology, especially how to achieve accurate prediction of flood processes in the long foreseeable period.
[0003] In recent years, more and more deep learning models have been applied to flood forecasting. These models mine information from historical data, establish relationship models between flood flow, water level and its influencing factors, and achieve forecasting purposes by adjusting model parameters to improve performance.
[0004] However, current research mainly verifies whether deep learning is competent for flood forecasting tasks, and the forecast period obtained is short, making it difficult to achieve efficient and accurate simulation results. Moreover, most coupled deep learning models use a serial approach (for example, the output of a Transformer model is trained first and then used as the input of a TCN), which results in many design restrictions between modules, making it difficult to adjust the interaction mode of the modules, and the training process is relatively independent, so information cannot be directly shared during training. Summary of the invention
[0005] In order to overcome the shortcomings of the prior art, the present invention provides a time series enhanced deep learning flood forecasting method, which has better prediction accuracy in the long forecast period.
[0006] The second object of the present invention is to provide a time-series enhanced deep learning flood forecasting device.
[0007] The third object of the present invention is to provide a corresponding electronic device.
[0008] A fourth object of the present invention is to provide a computer-readable storage medium.
[0009] The technical solution of the present invention to solve the above technical problems is:
[0010] A time series enhanced deep learning flood forecasting method comprises the following steps:
[0011] Step S1: Collect hydrological and meteorological data from hydrological stations on the main stream of the basin, and pre-process the collected hydrological and meteorological data to obtain a data set;
[0012] Step S2: Use principal component analysis to reduce the dimension of the original data in the data set to obtain input data, and divide the input data into a training set and a validation set;
[0013] Step S3: Extend the accurate flood forecasting time and divide different flood forecasting periods;
[0014] Step S4: coupling a Transformer module in the first time-domain convolutional neural network model to construct a time-series enhanced deep learning model, wherein the time-series enhanced deep learning model includes a first residual block, a Transformer module, a second residual block, a Flatten flattening layer, a first Dense fully connected layer, and a second Dense fully connected layer; the input data passes through the first residual block, the Transformer module, the second residual block, the Flatten flattening layer, the first Dense fully connected layer, and the second Dense fully connected layer in sequence to obtain a model prediction value;
[0015] Step S5: setting hyperparameters of the time series enhanced deep learning model, training the constructed time series enhanced deep learning model through the training set, and then verifying the time series enhanced deep learning model through the verification set to obtain the trained time series enhanced deep learning model;
[0016] Step S6: Use the trained time series enhanced deep learning model to simulate flood flows in different forecast periods multiple times, obtain multiple simulation prediction values for different forecast periods, and use the determination coefficient R 2 Evaluate the simulated prediction values obtained;
[0017] Step S7: Calculate the difference between the model prediction value and the actual value at each time point in the multiple simulation results to obtain the error value at each time point; 2 The error value in the highest simulated prediction value is used as the output label, and the remaining error values are used as input data, and the training set and the validation set are divided again; the hyperparameters of the second time-domain convolutional neural network model are set, and the second time-domain convolutional neural network model is trained to obtain an error correction model, and the simulation error of the time series enhancement deep learning model is predicted by the trained error correction model to obtain an error correction value;
[0018] Step S8: Combine the time series enhanced deep learning model and the error correction model to obtain an improved time series enhanced deep learning flood forecasting model, wherein the flood forecasting model outputs a prediction result, which is the sum of the error correction value and the model prediction value.
[0019] A preferred embodiment of the present invention, in step S1, the hydrometeorological data of the main stream hydrological station in the basin include multi-year water level, flow, rainfall, evaporation and temperature; the water level and flow data directly reflect the flood process of the main stream of the basin, the rainfall and evaporation data reflect the indirect impact on the flood process of the basin from the water vapor circulation intensity, and the temperature data reflects the potential impact on the flood process of the basin. These factors interact with each other and jointly determine the formation and development of floods.
[0020] In a preferred embodiment of the present invention, in step S1, the preprocessing includes standardizing the hydrological and meteorological data.
[0021] A preferred solution of the present invention is, in step S2, the principal component analysis method is used to perform dimensionality reduction processing on the original data in the data set, and the principal components corresponding to the eigenvalues with a cumulative contribution rate greater than 80% are taken as the input data of the deep learning model for time series enhancement, and 80% of the input data is used as the training set of the deep learning model for time series enhancement, and the other 20% is used as the verification set of the deep learning model for time series enhancement.
[0022] A preferred embodiment of the present invention is that in step S3, the different flood forecast periods are divided as follows: the flood forecast period is divided into 3 days, 5 days, 7 days and 15 days, wherein the 3-day forecast period uses the input data of the previous 3 days to predict the flow rate of the day; the 5-day forecast period uses the input data of the previous 5 days to predict the flow rate of the day; the 7-day forecast period uses the input data of the previous 7 days to predict the flow rate of the day; and the 15-day forecast period uses the input data of the previous 15 days to predict the flow rate of the day.
[0023] In a preferred embodiment of the present invention, in step S5, the hyperparameters of the timing enhanced deep learning model include the number of neurons in each layer, the activation function, the optimizer, the loss function, the learning rate and the dropout rate; wherein, the number of neurons in the convolutional layers in the first residual block and the second residual block are both 128; the inner layer, the numerical model dimension and the number of multi-head attention heads of the Transformer module are set to 6, 16 and 8 respectively; the number of neurons in the first Dense fully connected layer and the second Dense fully connected layer are 64 and 1 respectively; the activation function is Relu; the optimizer is Adam; the loss function is MSE; the learning rate is set to 0.001; and the dropout rate is set to 0.2.
[0024] In a preferred embodiment of the present invention, in step S7, the second time-domain convolutional neural network model includes 2 residual blocks, 1 Flatten layer and 1 Dense fully connected layer; wherein the hyperparameters of the second time-domain convolutional neural network model are: the number of neurons in the convolutional layer in the residual block is 64; the number of neurons in the Dense fully connected layer is 1; the activation function is Relu; the optimizer is Adam; the loss function is MSE; the learning rate is set to 0.001; and the loss rate is set to 0.2.
[0025] A time series enhanced deep learning flood forecasting device, comprising:
[0026] Data collection module, used to collect hydrological and meteorological data from hydrological stations on the main stream of the basin;
[0027] A data processing module is used to perform standardization processing on the hydrological and meteorological data collected by the data collection module, and to perform dimensionality reduction processing on the standardized hydrological and meteorological data using a principal component analysis method;
[0028] The flood forecasting module includes a flood prediction module, an error correction module and a result output module, wherein the flood prediction module is used to predict the flood flow in different forecast periods according to the input hydrological and meteorological data, and output the model prediction value; the error correction module is used to perform error prediction on the model prediction value output by the flood prediction module, and output the error correction value; the result output module is used to add the model prediction value and the error correction value, and output the final flood prediction result.
[0029] An electronic device comprises a central processing unit and a memory, wherein the central processing unit is used to call and run a computer program stored in the memory to execute the steps of the time series enhanced deep learning flood forecasting method.
[0030] A computer-readable storage medium stores a computer program implemented according to the timing enhanced deep learning flood forecasting method in the form of computer-readable instructions. When the computer program is called and executed by a computer, the steps included in the corresponding method are executed.
[0031] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0032] 1. The time series enhanced deep learning flood forecasting method of the present invention can further optimize the model structure of deep learning in the field of flood forecasting to improve its prediction accuracy in the long-term forecast period. By combining the local feature extraction capability of the time domain convolutional neural network model (TCN) and the global time series modeling capability of the Transformer module, the performance of the flood forecasting model is improved.
[0033] 2. The time series enhanced deep learning model in the present invention adopts the model structure of the coupled Transformer module in the first time domain convolutional neural network model. This model structure can capture both local short-term dependencies and global long-term dependencies when processing time series data, and performs better in long-sequence flood forecasting tasks, thereby extending the forecast period of flood forecasting.
[0034] 3. The flood forecasting model in the present invention takes into account pre- and post-processing technologies to improve the flood forecasting model's understanding of the flood evolution process, thereby more accurately predicting future flood events. Therefore, the present invention has far-reaching significance for achieving accurate flood forecasting with a long foreseeable period and promoting the construction of smart water conservancy projects.
[0035] 4. The improved time-series enhanced deep learning flood forecasting model of the present invention, namely the PRE-TCN-T-POST model, combines time-series enhancement technology with pre-processing and post-processing technology to improve the efficiency and accuracy of processing long-forecast period, large-scale, multivariate flood data. The pre-processing part of the PRE-TCN-T-POST model in the present invention uses principal component analysis to reduce the dimension of the data, and then selects the time-series enhanced deep learning model (TCN-T) as the main body of the PRE-TCN-T-POST model. Through the repeated interaction of local features and global dependency information, the ability to extract time information is enhanced. In the post-processing stage of the PRE-TCN-T-POST model, an error correction model is used to further improve the accuracy of the simulation. Compared with traditional CNN, LSTM and t-TCN models, the PRE-TCN-T-POST model in the present invention demonstrates significant improvements in efficiency and accuracy when processing long-forecast, large-scale, and multivariate flood data by integrating the data dimensionality reduction capability of principal component analysis, the multi-features of the time-enhanced deep learning model (TCN-T), the long-sequence data processing advantages, and the fine-tuning function of the error correction model. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 Schematic diagram of the flow of the time series enhanced deep learning flood forecasting method of the present invention.
[0037] Figure 2 This is the location map of the Yichang hydrological station in the middle reaches of the Yangtze River.
[0038] Figure 3 This is the main structural diagram of the PRE-TCN-T-POST model of the Yichang hydrological station.
[0039] Figure 4 This is the flood flow simulation result of the PRE-TCN-T-POST model at the Yichang hydrological station for a three-day forecast period.
[0040] Figure 5This is the flood flow simulation result of the PRE-TCN-T-POST model at the Yichang hydrological station for a 5-day forecast period.
[0041] Figure 6 This is the flood flow simulation result of the PRE-TCN-T-POST model at the Yichang hydrological station for a 7-day forecast period.
[0042] Figure 7 This is the flood flow simulation result of the PRE-TCN-T-POST model at the Yichang hydrological station with a 15-day forecast period.
[0043] Figure 8 This is the main structural diagram of the CNN forecast model of Yichang Hydrological Station.
[0044] Fig. 9 This is the main structure diagram of the LSTM forecasting model of Yichang Hydrological Station.
[0045] Fig.10 This is the main structural diagram of the t-TCN model of Yichang Station.
[0046] Fig.11 This is the flood flow simulation result of the CNN, LSTM, and t-TCN models at Yichang Station with a 3-day forecast period.
[0047] Fig.12 This is the flood flow simulation result of the CNN, LSTM, and t-TCN models at Yichang Station with a 5-day forecast period.
[0048] Fig.13 This is the flood flow simulation result of the CNN, LSTM, and t-TCN models at Yichang Station for a 7-day forecast period.
[0049] Fig.14 This is the flood flow simulation result of the CNN, LSTM, and t-TCN models at Yichang Station for a 7-day forecast period. DETAILED DESCRIPTION
[0050] The present invention is further described in detail below in conjunction with embodiments and drawings, but the embodiments of the present invention are not limited thereto.
[0051] Example 1
[0052] The flood characteristics in the middle reaches of the Yangtze River are affected by multiple factors such as climate, topography and human activities. The hydrological situation is complex, and flood disasters are gradually emerging, bringing new challenges to local water resources management and agricultural production.
[0053] Therefore, the present invention selects the Yichang hydrological station in the middle reaches of the Yangtze River as a research example (such as Figure 2As shown in Figure 2, an improved time series enhanced deep learning flood forecasting model (PRE-TCN-T-POST) and traditional CNN, LSTM and TCN forecasting models are constructed to simulate flood flows at different forecast periods at the Yichang hydrological station.
[0054] See also Figure 1 The specific steps of the time series enhanced deep learning flood forecasting method of the present invention are:
[0055] Step S1: Collect hydrological and meteorological data from hydrological stations on the main stream of the basin, and pre-process the collected hydrological and meteorological data to obtain a data set;
[0056] In this embodiment, flood excerpt data of the Yichang Hydrological Station in the middle reaches of the Yangtze River from 2008 to 2020 are collected and organized, including water level, flow, rainfall, evaporation, and temperature, and these data are standardized; the water level and flow data are directly reflected in the flood process of the Yichang Hydrological Station, the rainfall and evaporation data reflect the indirect impact on the flood process of the Yichang Hydrological Station from the water vapor circulation intensity, and the temperature data reflects the potential impact on the flood process of the Yichang Hydrological Station.
[0057] Step S2: Use principal component analysis to reduce the dimension of the original data in the data set to obtain input data; divide the input data into a training set and a validation set;
[0058] In this embodiment, the standardized water level, flow, rainfall, evaporation, and temperature data of Yichang Hydrological Station are used as input data x∈R T×D (R is the data set, T is the length of the data sequence, and D is the feature dimension, which is composed of five dimensions here: water level, flow, rainfall, evaporation, and temperature). The principal component analysis method is used as pre-processing (PRE), and the principal component corresponding to the eigenvalue with a cumulative contribution rate greater than 80% is taken. (d pca The feature dimension after dimensionality reduction is used as the input data of the constructed deep learning model of time series enhancement, wherein 80% of the input data is used as the training set of the deep learning model of time series enhancement, and the other 20% is used as the verification set of the deep learning model of time series enhancement.
[0059] In this embodiment, the data of Yichang Hydrological Station from 2008 to 2018 are used as the training set of the time series enhanced deep learning model, and the data from 2019 to 2020 are used as the verification set of the time series enhanced deep learning model.
[0060] Step S3: Extend the accurate flood forecasting time and divide different flood forecasting periods;
[0061] This embodiment divides the flood forecast period into different categories: 3 days, 5 days, 7 days and 15 days, wherein the 3-day forecast period uses the input data of the previous 3 days to predict the flow rate of the day; the 5-day forecast period uses the input data of the previous 5 days to predict the flow rate of the day; the 7-day forecast period uses the input data of the previous 7 days to predict the flow rate of the day; and the 15-day forecast period uses the input data of the previous 15 days to predict the flow rate of the day.
[0062] Step S4: Coupling the Transformer module in the first time-domain convolutional neural network model (TCN1) to enhance the extraction intensity of data time information, and establishing a time-series enhanced deep learning model (TCN-T), wherein the time-series enhanced deep learning model (TCN-T) includes a first residual block, a Transformer module, a second residual block, a Flatten flattening layer, a first Dense fully connected layer, and a second Dense fully connected layer; wherein the first residual block and the second residual block are each provided with two convolutional layers; the input data passes through the first residual block, the Transformer module, the second residual block, the Flatten flattening layer, the first Dense fully connected layer, and the second Dense fully connected layer in sequence to obtain a model prediction value;
[0063] Since the time-domain convolutional neural network model (TCN) is both efficient and stable when processing multi-feature data and time series data; the multi-head self-attention mechanism in the Transformer module can dynamically weight the input of each time step, thereby more accurately capturing the correlation and importance between different time steps. The specific input data processing flow is:
[0064] First, the first residual block (i.e., residual block 1) of the first time-domain convolutional neural network model (TCN1) is used to extract the input data features and local temporal dependencies. The formula of the main processing process can be expressed as:
[0065]
[0066] y TCN1 =Relu(y1)+x1;
[0067] Where: y1 is the output of the convolution operation, w k is the convolution kernel, x t-d×k is the element input to the convolutional layer, d is the dilation rate, y TCN1 is the output result of the first residual block, Relu is the activation function, and x1 is the element input to the residual block;
[0068] The output shape after processing by the first residual block is Among them, d TCNis the feature dimension after processing by the first residual block.
[0069] Then take the output of the first residual block As the input of the Transformer module, the global temporal dependency is calculated. The formula of the main processing process can be expressed as:
[0070]
[0071] Among them, Q, L, and V are query, key, and value matrices, respectively, which are obtained by linearly transforming the input spatiotemporal sequence; d l is the dimension of the key;
[0072] The output shape after processing by the Transformer module is d t is the feature dimension after processing by the Transformer module, at this time d t With d TCN same.
[0073] Then the output of Transformer Passed to the second residual block (i.e., residual block 2), the first time domain convolutional neural network model (TCN1) will continue to process the input data and enhance its local time series information again. The main processing process is the same as that of the first residual block (residual block 1). The output result of the second residual block is processed by the Flatten layer, the first Dense fully connected layer, and the second Dense fully connected layer to obtain the model prediction value of the time series enhanced deep learning model (TCN-T);
[0074] Step S5: setting the hyperparameters of the time series enhanced deep learning model (TCN-T), training the constructed time series enhanced deep learning model through the training set, and then verifying the time series enhanced deep learning model through the verification set to obtain the trained time series enhanced deep learning model;
[0075] In this embodiment, the hyperparameters of the time-enhanced deep learning model (TCN-T) include the number of neurons in each layer, the activation function, the optimizer, the loss function, the learning rate and the dropout rate; wherein, the number of neurons in the convolutional layers in the first residual block and the second residual block are 128; the inner layer, the model dimension and the number of multi-head attention heads of the Transformer module are set to 6, 16 and 8 respectively; the number of neurons in the first Dense fully connected layer and the second Dense fully connected layer are 64 and 1 respectively; the activation function is Relu; the optimizer is Adam; the loss function is MSE; the learning rate is set to 0.001; the dropout rate is set to 0.2.
[0076] Step S6: Use the trained time series enhanced deep learning model to simulate flood flows in different forecast periods multiple times, obtain multiple simulation prediction values for different forecast periods, and use the determination coefficient R 2 Evaluate the simulated prediction values obtained;
[0077] Step S7: Calculate the difference between the model prediction value and the actual value at each time point in the multiple simulation results to obtain the error value at each time point; 2 The error value in the highest simulated prediction value is used as the output label, and the remaining error values are used as input data. The training set and the validation set are divided again, and the hyperparameters of the second time-domain convolutional neural network model (TCN2) are set. The second time-domain convolutional neural network model (TCN2) is trained to obtain an error correction model. The simulated error of the time series enhanced deep learning model (TCN-T) is predicted by the trained error correction model to obtain the error correction value.
[0078] In this embodiment, the second time-domain convolutional neural network model (TCN2) includes 2 residual blocks, 1 Flatten layer and 1 Dense fully connected layer; the hyperparameters of the second time-domain convolutional neural network model (TCN2) are: the number of neurons in the convolution layer in the residual block is 64; the number of neurons in the Dense fully connected layer is 1; the activation function is Relu; the optimizer is Adam; the loss function is MSE; the learning rate is set to 0.001; and the loss rate is set to 0.2.
[0079] Step S8: Combine the time series enhanced deep learning model (TCN-T) and the error correction model to obtain an improved time series enhanced deep learning flood forecasting model (PRE-TCN-T-POST), and the flood forecasting model (PRE-TCN-T-POST) outputs a prediction result, which is the sum of the error correction value and the model prediction value.
[0080] In order to verify the performance of the flood forecasting model (PRE-TCN-T-POST) in the present invention, the traditional CNN, LSTM and t-TCN models were constructed in this embodiment to simulate the flood flow of Yichang hydrological station in different forecast periods; the specific steps are as follows:
[0081] Step 1: The standardized water level, flow, rainfall, evaporation and temperature of the Yichang hydrological station are used as the input data of the model, and the measured flow data of the Yichang hydrological station is used as the label to establish the input and output structure of the model;
[0082] Step 2: Construct CNN prediction model, LSTM prediction model and t-TCN prediction model, where:
[0083] The CNN prediction model includes 3 convolutional layers, 3 maximum pooling layers, 1 Flatten layer and 2 Dense fully connected layers; the number of neurons in the convolutional layer is 256, 128 and 64 respectively; the number of neurons in the Dense fully connected layer is 64 and 1 respectively; the activation function is Relu, the optimizer is Adam, the loss function is MSE, the learning rate is 0.001 and the dropout rate is 0.2; the main structure of the CNN prediction model is as follows Figure 8 As shown;
[0084] The LSTM prediction model includes 2 LSTM layers and 1 Dense fully connected layer. The number of neurons in the LSTM layer is 256 and 128 respectively; the number of neurons in the Dense fully connected layer is 1; the activation function is Relu, the optimizer is Adam, the loss function is MSE, the learning rate is 0.001, and the dropout rate is 0.2. The main structure of the LSTM prediction model is as follows: Fig. 9 As shown;
[0085] The t-TCN prediction model uses a series connection between the Transformer and TCN neural network models without changing the original structure of the TCN neural network model. It includes 1 Transformer module, 2 residual blocks (each residual block contains 2 convolutional layers), 1 Flatten layer and 2 Dense fully connected layers. The inner layer, model dimension and multi-head attention head number of the Transformer module are set to 6, 16 and 8 respectively; the number of neurons in the convolutional layer is 128; the number of neurons in the Dense fully connected layer is 64 and 1 respectively; the activation function is Relu, the optimizer is Adam, the loss function is MSE, the learning rate is 0.001 and the loss rate is 0.2. The main structure of the t-TCN prediction model is as follows: Fig.10 As shown;
[0086] Step 3: Based on the input and output data training model of the traditional model, the flood flow of the Yichang hydrological station in different forecast periods is simulated, and the simulation results of the CNN forecast model, LSTM forecast model and t-TCN forecast model are obtained respectively. The simulation results are shown in Figure 3. Figure 11-Figure 14 As shown;
[0087] Step 4: By selecting corresponding evaluation indicators, the simulation results of the flood forecast model (PRE-TCN-T-POST) in the present invention are compared and analyzed with those of the traditional CNN forecast model, LSTM forecast model and t-TCN forecast model, and the simulation advantages of the flood forecast model (PRE-TCN-T-POST) in the present invention in different forecast periods are obtained; wherein the selected evaluation indicators include Nash efficiency coefficient (NSE), determination coefficient (R 2), root mean square error (RMSE) and mean absolute error (MAE), using NSE and R 2 The accuracy of the model simulation results is evaluated. The closer the value is to 1, the better the simulation effect is. RMSE and MAE are used to evaluate the error of the model simulation results. The smaller the value is, the smaller the error of the model results is. The specific formulas are:
[0088]
[0089]
[0090]
[0091]
[0092] Among them, Y i With P i are the real value and the simulated value respectively; Y' i With P' i are the average of the true value and the average of the simulated value, respectively.
[0093] Through NSE, R 2 , RMSE and MAE were used to compare and analyze the simulation results of the flood forecasting model (PRE-TCN-T-POST) in the present invention with those of the traditional CNN forecasting model, LSTM forecasting model and t-TCN forecasting model. The evaluation results are shown in Table 1.
[0094] Table 1 Results of evaluation indicators for four models at Yichang hydrological station under different forecast periods
[0095]
[0096] From Table 1, we can see that the NSE and R of the flood forecast model (PRE-TCN-T-POST) of the present invention are 3 days, 5 days, 7 days and 15 days respectively. 2 All of them are above 0.9 and are larger than the NSE and R of the traditional CNN prediction model, LSTM prediction model and t-TCN prediction model. 2 , which indicates that the flood forecasting model (PRE-TCN-T-POST) of the present invention with enhanced time series and pre- and post-processing has the highest simulation accuracy in long-forecast flood forecast simulation; in addition, the RMSE and MAE of the flood forecasting model (PRE-TCN-T-POST) of the present invention at forecast periods of 3 days, 5 days, 7 days, and 15 days are lower than those of the traditional CNN forecasting model, LSTM forecasting model, and t-TCN forecasting model, indicating that the flood forecasting model (PRE-TCN-T-POST) of the present invention has the lowest simulation error in long-forecast flood forecast simulation.
[0097] In summary, the present invention proposes an improved time series enhanced deep learning flood forecasting method, that is, a PRE-TCN-T-POST flood forecasting model is constructed, which combines time series enhancement technology with pre-processing and post-processing technology to improve the efficiency and accuracy of processing long-forecast period, large-scale, multivariate flood data; the pre-processing part of the PRE-TCN-T-POST flood forecasting model uses principal component analysis to reduce the dimension of the data, and then selects the TCN-T network as the main body of the PRE-TCN-T-POST flood forecasting model, through the repeated interaction of local features and global dependency information to enhance the ability to extract time information, and in the post-processing stage of the PRE-TCN-T-POST flood forecasting model, an error correction model is used to further improve the accuracy of the simulation. Compared with traditional CNN, LSTM and t-TCN models, the PRE-TCN-T-POST flood forecasting model demonstrates significant improvements in efficiency and accuracy when processing long-forecast period, large-scale, multivariate flood data by integrating the data dimensionality reduction capability of principal component analysis, the multi-feature and long-sequence data processing advantages of TCN-T, and the fine-tuning function of the error correction model.
[0098] Example 2
[0099] The time series enhanced deep learning flood forecasting device of the present invention comprises:
[0100] Data collection module, used to collect hydrological and meteorological data from hydrological stations on the main stream of the basin;
[0101] A data processing module is used to perform standardization processing on the hydrological and meteorological data collected by the data collection module, and to perform dimensionality reduction processing on the standardized hydrological and meteorological data using a principal component analysis method;
[0102] The flood forecasting module includes a flood prediction module, an error correction module and a result output module, wherein the flood prediction module is used to predict the flood flow in different forecast periods according to the input hydrological and meteorological data, and output the model prediction value; the error correction module is used to perform error prediction on the model prediction value output by the flood prediction module, and output the error correction value; the result output module is used to add the model prediction value and the error correction value, and output the final flood prediction result.
[0103] Example 3
[0104] The electronic device of the present invention comprises a central processing unit and a memory, wherein the central processing unit is used to call and run a computer program stored in the memory to execute the steps of the time-series enhanced deep learning flood forecasting method in Example 1.
[0105] Example 4
[0106] The computer-readable storage medium of the electronic device of the present invention stores a computer program implemented according to the timing enhanced deep learning flood forecasting method in Example 1 in the form of computer-readable instructions. When the computer program is called and executed by a computer, the steps included in the corresponding method are executed.
[0107] The above is a preferred embodiment of the present invention, but the embodiment of the present invention is not limited to the above content. Any other changes, modifications, substitutions, combinations, and simplifications that do not deviate from the spirit and principles of the present invention should be equivalent replacement methods and are included in the protection scope of the present invention.
Claims
1. A time series enhanced deep learning flood forecasting method, characterized in that: The following steps are involved: Step S1: Collect hydrological and meteorological data from hydrological stations on the main stream of the basin, and pre-process the collected hydrological and meteorological data to obtain a data set; Step S2: Use principal component analysis to reduce the dimension of the original data in the data set to obtain input data, and divide the input data into a training set and a validation set; Step S3: Extend the accurate flood forecasting time and divide different flood forecasting periods; Step S4: coupling a Transformer module in the first time-domain convolutional neural network model to construct a time-series enhanced deep learning model, wherein the time-series enhanced deep learning model includes a first residual block, a Transformer module, a second residual block, a Flatten flattening layer, a first Dense fully connected layer, and a second Dense fully connected layer; the input data passes through the first residual block, the Transformer module, the second residual block, the Flatten flattening layer, the first Dense fully connected layer, and the second Dense fully connected layer in sequence to obtain a model prediction value; Step S5: setting hyperparameters of the time series enhanced deep learning model, training the constructed time series enhanced deep learning model through the training set, and then verifying the time series enhanced deep learning model through the verification set to obtain the trained time series enhanced deep learning model; Step S6: Use the trained time series enhanced deep learning model to simulate flood flows in different forecast periods multiple times, obtain multiple simulation prediction values for different forecast periods, and use the determination coefficient R 2 Evaluate the simulated prediction values obtained; Step S7: Calculate the difference between the model prediction value and the actual value at each time point in the multiple simulation results to obtain the error value at each time point; 2 The error value in the highest simulated prediction value is used as the output label, and the remaining error values are used as input data, and the training set and the validation set are divided again; the hyperparameters of the second time-domain convolutional neural network model are set, and the second time-domain convolutional neural network model is trained to obtain an error correction model, and the simulation error of the time series enhancement deep learning model is predicted by the trained error correction model to obtain an error correction value; Step S8: Combine the time series enhanced deep learning model and the error correction model to obtain an improved time series enhanced deep learning flood forecasting model, wherein the flood forecasting model outputs a prediction result, which is the sum of the error correction value and the model prediction value.
2. The time series enhanced deep learning flood forecasting method according to claim 1 is characterized in that: In step S1, the hydrological and meteorological data of the main stream hydrological stations in the basin include multi-year water level, flow, rainfall, evaporation and temperature.
3. The time series enhanced deep learning flood forecasting method according to claim 2 is characterized in that: In step S1, the preprocessing includes standardizing the hydrological and meteorological data.
4. The time series enhanced deep learning flood forecasting method according to claim 1 is characterized in that: In step S2, the principal component analysis method is used to perform dimensionality reduction processing on the original data in the data set, and the principal components corresponding to the eigenvalues with a cumulative contribution rate greater than 80% are taken as the input data of the deep learning model of time series enhancement, and 80% of the input data is used as the training set of the deep learning model of time series enhancement, and the other 20% is used as the verification set of the deep learning model of time series enhancement.
5. The time series enhanced deep learning flood forecasting method according to claim 1 is characterized in that: In step S3, the flood forecast period is divided into different types: 3 days, 5 days, 7 days and 15 days, wherein the 3-day forecast period uses the input data of the previous 3 days to predict the flow rate of the day; the 5-day forecast period uses the input data of the previous 5 days to predict the flow rate of the day; the 7-day forecast period uses the input data of the previous 7 days to predict the flow rate of the day; and the 15-day forecast period uses the input data of the previous 15 days to predict the flow rate of the day.
6. The time series enhanced deep learning flood forecasting method according to claim 1 is characterized in that: In step S5, the hyperparameters of the timing enhanced deep learning model include the number of neurons in each layer, the activation function, the optimizer, the loss function, the learning rate and the dropout rate; wherein, the number of neurons in the convolutional layers in the first residual block and the second residual block are 128 each; the inner layer, the numerical model dimension and the number of multi-head attention heads of the Transformer module are set to 6, 16 and 8 respectively; the number of neurons in the first Dense fully connected layer and the second Dense fully connected layer are 64 and 1 respectively; the activation function is set to Relu; the optimizer is set to Adam; the loss function is MSE; the learning rate is set to 0.001; and the dropout rate is set to 0.
2.
7. The time series enhanced deep learning flood forecasting method according to claim 1 is characterized in that: In step S7, the second time-domain convolutional neural network model includes 2 residual blocks, 1 Flatten layer and 1 Dense fully connected layer; wherein, the hyperparameters of the second time-domain convolutional neural network model are: the number of neurons in the convolutional layer in the residual block is 64; the number of neurons in the Dense fully connected layer is 1; the activation function is set to Relu; the optimizer is set to Adam; the loss function is set to MSE; the learning rate is set to 0.001; and the loss rate is set to 0.
2.
8. A time series enhanced deep learning flood forecasting device using the time series enhanced deep learning flood forecasting method according to any one of claims 1 to 7, characterized in that: include: Data collection module, used to collect hydrological and meteorological data from hydrological stations on the main stream of the basin; The data processing module is used to perform standardization processing on the hydrological and meteorological data collected by the data collection module, and to perform dimensionality reduction processing on the standardized hydrological and meteorological data using the principal component analysis method; The flood forecasting module includes a flood prediction module, an error correction module and a result output module, wherein the flood prediction module is used to predict the flood flow in different forecast periods according to the input hydrological and meteorological data, and output the model prediction value; the error correction module is used to perform error prediction on the model prediction value output by the flood prediction module, and output the error correction value; The result output module is used to add the model prediction value and the error correction value to output the final flood prediction result.
9. An electronic device, comprising a central processing unit and a memory, characterized in that: The central processing unit is used to call and run a computer program stored in the memory to execute the steps of the time-series enhanced deep learning flood forecasting method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: It stores a computer program implemented according to the time-series enhanced deep learning flood forecasting method described in any one of claims 1 to 7 in the form of computer-readable instructions, and when the computer program is called and executed by a computer, the steps included in the corresponding method are executed.
Citation Information
Patent Citations
Power consumption probability prediction method based on neural network
CN114819372A
Flood prediction method and system based on TCN network, and storage medium
CN117273234A