Flood grading diffusion intelligent forecasting method based on AEDD-RCNN
The flood data is dimensionally reduced and classified through the AEDD-RCNN method, and combined with the denoising diffusion model and the RCNN neural network for data expansion, solving the problem of low flood forecasting accuracy caused by scarcity of observation sites, and achieving more efficient and accurate flood forecasting.
Patent Information
- Application Number
- CN202411691089.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-03-18
AI Technical Summary
Due to the few observation sites, there is limited flood data available for training, limiting the generalization ability and prediction accuracy of the model.
The intelligent forecasting method for flood hierarchical diffusion based on AEDD-RCNN is used to process and classify historical flood rainstorm data through AE data dimensionality reduction and K-mean clustering, and combine the denoising diffusion model and the RCNN neural network for data expansion and prediction.
It improves the accuracy and efficiency of flood forecasting, enhances the generalization ability of the model, and can more accurately predict flood conditions in mountainous areas with data shortages.
Smart Images

Figure CN119644470A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a flood graded diffusion intelligent forecasting method based on AEDD-RCNN. Background Art
[0002] With the improvement of computing power and the development of big data technology, machine learning and deep learning models have begun to be applied to flood forecasting. These models can process a large amount of historical data, explore the complex relationship between rainfall-flood flow process data, and improve the accuracy and efficiency of forecasting. In the field of deep learning, especially in the complex task of flood forecasting, the quality and quantity of the data set have a decisive influence on the performance of the model. Due to the small number of observation sites, the data available for training is limited, which limits the generalization ability and prediction accuracy of the model. Summary of the invention
[0003] The technical problem to be solved by the present invention is to provide a flood graded diffusion intelligent forecasting method based on AEDD-RCNN.
[0004] The technical solution of the flood graded diffusion intelligent forecasting method based on AEDD-RCNN of the present invention is implemented as follows: The flood graded diffusion intelligent forecasting method based on AEDD-RCNN comprises the following steps in sequence:
[0005] 1. Collection and processing of historical flood and rainstorm data in river basins at observation stations in mountainous areas with insufficient data
[0006] Collect and process historical flood and rainstorm data in the basin area of mountain observation stations with insufficient data, that is, hourly historical rainfall and flood flow process data of 20 to 29 stations lasting 48 hours each;
[0007] 2. AE Dimensionality Reduction and Data Classification of Historical Flood and Heavy Rainfall Datasets in Watersheds of Mountainous Areas with Lack of Data (1). AE Dimensionality Reduction of Historical Flood and Heavy Rainfall Datasets in Watersheds of Mountainous Areas with Lack of Data
[0008] a. Normalize the historical flood and rainstorm data collected and processed in step 1, that is, the hourly historical rainfall and flood flow process data of 20 to 29 events lasting 48 hours each in the watershed area of the data-deficient mountain observation station to the interval [0,1] to form a normalized historical flood and rainstorm data set of the data-deficient mountain observation station watershed area; the sum of the normalized historical flood and rainstorm data sets of the data-deficient mountain observation station watershed area constitutes the normalized historical flood and rainstorm data set of the data-deficient mountain observation station watershed area;
[0009] b. Input the normalized historical flood and rainstorm data set of the watershed area of the mountainous area observation station with insufficient data described in step 2(1)a into the AE data dimensionality reduction model to reconstruct the data and obtain the reconstructed data set of the normalized historical flood and rainstorm data set of the watershed area of the mountainous area observation station with insufficient data in the AE data dimensionality reduction model;
[0010] c. Using the error between the reconstructed dataset of the historical flood and rainstorm dataset of the watershed area of the observation station in the mountainous area with insufficient data after normalization described in step 2(1)b and the historical flood and rainstorm dataset of the watershed area of the observation station in the mountainous area with insufficient data after normalization described in step 2(1)a as the loss function, network training is performed. After the network training is completed, the hidden vector of the historical flood and rainstorm dataset of the watershed area of the observation station in the mountainous area with insufficient data after normalization described in step 2(1)a in the AE data dimensionality reduction model is obtained;
[0011] ②. AE dimensionality reduction data classification of historical flood and rainstorm datasets in river basins with missing data from observation stations in mountainous areas
[0012] Perform K-means clustering on the hidden vectors of the historical flood and rainstorm data set in the watershed area of the observation station in the mountainous area with insufficient data after normalization in step 2(1)c in the AE data dimensionality reduction model, and classify the historical flood and rainstorm data set in the watershed area of the observation station in the mountainous area with insufficient data after normalization in step 2(1)a according to the result of the K-means clustering; input the cluster center of the hidden vectors of the historical flood and rainstorm data set in the watershed area of the observation station in the mountainous area with insufficient data after normalization in step 2(1)c in the AE data dimensionality reduction model into the decoder of the AE data dimensionality reduction model to obtain the cluster center of the historical flood and rainstorm data set in the watershed area of the observation station in the mountainous area with insufficient data after normalization in step 2(1)a; use the cluster center of the historical flood and rainstorm data set in the watershed area of the observation station in the mountainous area with insufficient data after normalization in step 2(1)a to classify the floods described in step 1;
[0013] 3. De-noising Diffusion Model (DDPM) Expansion of Historical Flood and Heavy Rainfall Datasets in Watersheds with Lack of Data in Mountainous Areas
[0014] The historical flood and rainstorm data sets of the watershed areas of the observation stations in the mountainous area with insufficient data after normalization according to step 2(1)a of the flood classification in step 2(2) are respectively placed in different denoising diffusion models. First, the forward diffusion process is used to add noise to the historical flood and rainstorm data sets of the watershed areas of the observation stations in the mountainous area with insufficient data after normalization according to step 2(1)a of the flood classification in step 2(2). Then, the reverse diffusion process U-net neural network is used to train and denoise the noise-added historical flood and rainstorm data sets of the watershed areas of the observation stations in the mountainous area with insufficient data after normalization according to step 2(1)a of the flood classification in step 2(2). The deterministic inverse method is used for sampling to obtain 50 flood and rainstorm data sets generated from the historical flood and rainstorm data sets of the watershed areas of the observation stations in the mountainous area with insufficient data after normalization according to step 2(1)a of the flood classification in step 2(2). The normalized historical flood and rainstorm datasets of the watershed area of the observation station in the mountainous area with insufficient data in step 2(1)a of the flood classification in step 2(2) are combined with the 50 flood and rainstorm datasets generated according to the normalized historical flood and rainstorm datasets of the watershed area of the observation station in the mountainous area with insufficient data in step 2(1)a of the flood classification in step 2(2) to obtain the normalized historical flood and rainstorm datasets of the watershed area of the observation station in the mountainous area with insufficient data in step 2(1)a after the flood classification in step 2(2) is expanded, and the normalized historical flood and rainstorm datasets of the watershed area of the observation station in the mountainous area with insufficient data in step 2(1)a after the flood classification in step (2)② is normalized to the interval [0,1] to form the normalized historical flood and rainstorm datasets of the watershed area of the observation station in the mountainous area with insufficient data in step 2(2) after the flood classification in step 2(1)a is expanded;
[0015] The forward diffusion process is expressed by formula (1) as follows:
[0016]
[0017] In formula (1): x t is the data at time step t; α t is the variance scheduling parameter; x t-1 is the data of time step t-1; ∈ t is the noise sampled from the standard normal distribution N(0~1);
[0018] The update of each step of the reverse diffusion process is defined by formula (2):
[0019]
[0020] In formula (2): x t-1 is the data of time step t-1; αt is the variance scheduling parameter; x t is the data at time step t; is the noise predicted by the model at time step t;
[0021] The noise prediction model is expressed by formula (3) as follows:
[0022]
[0023] In formula (3): is the noise predicted by the model at time step t; f θ is the prediction function parameterized as a neural network; θ is the model parameter; x t is the data at time step t;
[0024] The deterministic inverse method performs fast sampling via formula (4):
[0025]
[0026] In formula (4): x t-1 is the data of time step t-1; α t is the variance scheduling parameter; x t is the data at time step t; α t-1 is the variance scheduling parameter at time step t-1; is the noise predicted by the model at time step t;
[0027] Formula (5) represents the main loss term of the total loss function in the reverse diffusion process:
[0028]
[0029] In formula (5): L primary is the main loss term, i.e., reconstruction loss or noise prediction loss; ∈ i is the actual noise of the i-th sample at the current time step; is the noise of the i-th sample predicted by the model at the current time step; N is the number of samples in the batch; i=1 means starting from the first sample;
[0030] Formula (6) represents the distance loss term of the total loss function in the reverse diffusion process:
[0031]
[0032] In formula (6): L distance is the distance loss term; x start,i is the i-th sample output by the model; c is the cluster center; N is the number of samples in the batch; ||·||2 represents the L2 norm (Euclidean distance); i=1 means starting from the first sample;
[0033] The total loss function in the reverse diffusion process expressed by formula (7) is the weighted sum of the main loss term and the distance loss term:
[0034] L total =L primary +α·L distance (7)
[0035] In formula (7): L total is the total loss function; L primary is the main loss term, i.e., reconstruction loss or noise prediction loss; L distance is the distance loss term; α is a hyperparameter used to balance the importance of the two loss terms;
[0036] The initial convolutional layer of the U-Net neural network is expressed by formula (8) as follows:
[0037] x′=ReLU(Conv1D(x,W init )+b init ) (8)
[0038] In formula (8), x' is the time series after convolution; x is the one-dimensional time series of input; W init and b init are the weights and biases of the initial convolutional layer; ReLU is the activation function; Conv1D is the one-dimensional convolution function;
[0039] The U-Net neural network downsampling is expressed by formula (9) as follows:
[0040]
[0041] In formula (9): is the feature map after downsampling of the lth layer; ReLU is the activation function; Conv1D is the one-dimensional convolution function; It is the feature sequence after downsampling at the l-1th layer; and They are the weights and biases of the lth downsampling convolutional layer respectively; is the feature sequence after the lth layer of pooling; MaxPool1D is the one-dimensional maximum pooling operation; kernel_size refers to the size of the kernel;
[0042] The middle layer of the U-Net neural network is expressed by formula (10) as follows:
[0043]
[0044] In formula (10): x mid It refers to the feature sequence of the middle layer; ReLU is the activation function; Conv1D is the one-dimensional convolution function; is the feature map of the last downsampled layer; L is the number of downsampled layers; W mid and b mid are the weights and biases of the middle layers respectively;
[0045] The U-Net neural network upsampling is expressed by formula (11) as follows:
[0046]
[0047] In formula (11): is the feature map after upsampling at layer l; ReLU is the activation function; convTranspose1D is the one-dimensional transposed convolution; It is the feature sequence after upsampling at the l-1th layer; and
[0048] They are the weights and biases of the lth upsampling convolutional layer respectively; is the feature sequence after the concatenation of the lth layer; Concat is the concatenation operation; It is the feature sequence after downsampling at the L-1th layer;
[0049] The skip connection of the U-Net neural network is expressed by formula (12) as follows:
[0050]
[0051] In formula (12): is the feature sequence after concatenation of the lth layer; It is the feature map after upsampling at layer l; is the feature sequence after concatenation of the L-1th layer; + represents the concatenation operation of the jump connection;
[0052] The final convolutional layer of the U-Net neural network is expressed by formula (13) as follows:
[0053]
[0054] In formula (13): is the output of the network; Conv1D is a one-dimensional convolution function; is the feature sequence after concatenation of the lth layer; W final and b final are the weights and biases of the final convolutional layer, respectively;
[0055] The calculation of query, key, and value of the U-Net neural network self-attention mechanism is expressed as follows by formula (14):
[0056]
[0057] In formula (14), Q, K, and V represent query, key, and value respectively; W Q , W K With W V They represent the learnable weight matrices respectively; X is the input feature matrix;
[0058] The calculation of the attention score of the U-Net neural network self-attention mechanism is expressed by formula (15) as follows:
[0059]
[0060] In formula (15), Scores represents the attention score; d k is the dimension of the key vector; is a scaling factor used to prevent the result from being too large when calculating the dot product; Q represents query; K T Refers to the transpose of a matrix;
[0061] The calculation of the attention weight of the U-Net neural network self-attention mechanism is expressed by formula (16) as follows:
[0062] Weights=softmax(Scores) (16)
[0063] In formula (16), Weights represents the attention weight; Scores represents the attention score; softmax represents the normalized exponential function; the softmax function is used to normalize each attention score so that the sum of the attention weights at each position is 1;
[0064] The calculation of the output of the U-Net neural network self-attention mechanism is expressed by formula (17) as follows:
[0065] Output=Weights·V (17)
[0066] In formula (17), Weights represents the attention weight; V represents the matrix value; Output represents the final output;
[0067] The multi-head attention mechanism after the expansion of the self-attention mechanism of the U-Net neural network is shown in formula (18):
[0068] MultiHead(Q,K,V)=Concat(head1,head2,...,head h )W O (18)
[0069] In formula (18), MultiHead(Q,K,V) represents multi-head attention; each head i =Attention(QWi Q ,KW i K ,VW i V ), Attention represents the attention mechanism function; Q, K and V represent query, key and value respectively; W i Q represents the weight matrix of the query; W i K represents the weight matrix of the key; W i V The weight matrix representing the value; Concat is a concatenation operation; (head1, head2, ..., head h ) refers to different heads; W O is another learnable weight matrix used to perform a linear transformation on the concatenated output;
[0070] The multi-layer perceptron sinusoidal position encoding is expressed by formula (19) as follows:
[0071]
[0072] In formula (19), φ(x) represents the multilayer perceptron sinusoidal position encoding; x1 represents the original position encoding; ω ij represents the frequency of the jth random selection of the ith data point; b ij represents the jth randomly selected phase of the ith data point; M is the number of random features in each dimension; D is the original dimension of the data;
[0073] 4. Extended Dataset RCNN Neural Network Hierarchical Training
[0074] In step 3, the normalized and expanded historical flood and rainstorm datasets in the watershed area of the observation station in the mountainous area with insufficient data according to the flood classification in step 2(2) are used to train a small residual convolutional neural network (RCNN). Except for one historical flood and rainstorm dataset with different flood classifications randomly selected from the historical flood and rainstorm datasets in the watershed area of the observation station in the mountainous area with insufficient data according to the flood classification in step 2(1)a, the remaining historical flood and rainstorm datasets in the watershed area of the observation station in the mountainous area with insufficient data according to the flood classification in step 2(2) are used as a validation set to verify the training results. The parameters of the RCNN neural network model initially proposed include the number of hidden layers, the number of hidden layer nodes and the number of epoch iterations.
[0075] The specific calculation of the RCNN neural network model Conv1d prediction is expressed by formula (20) as follows:
[0076]
[0077] In formula (20): is the output of the jth node in the lth layer; i is an index used to traverse the set M j All input units in ; Mj is the range of the number of nodes i; Represents the value of the i-th input unit in the l-1th layer; is the convolution kernel, * indicates the convolution operation; is the bias term; f is the activation function;
[0078] 5. Evaluation of prediction results
[0079] The flood prediction results of the RCNN trained on the historical flood and rainstorm data sets of the data-deficient mountain observation stations in the basin area after the normalization of the flood classification in step 2(2) in step 4, except for the validation set, are compared and analyzed with the measured flood data results of the validation set using four indicators: mean absolute error (MAE), root mean square error (RMSE), Nash efficiency coefficient (NSE) and correlation coefficient (R). The lower the values of the mean absolute error (MAE) and root mean square error (RMSE), the higher the prediction accuracy, and the higher the values of the NSE and R, the higher the prediction accuracy. MAE, RMSE, NSE and R are respectively expressed by formulas (21)-(24) as follows:
[0080]
[0081] In formulas (21)-(24): MAE is the mean absolute error; RMSE is the root mean square error; NSE is the Nash efficiency coefficient; R is the correlation coefficient; n is the forecast period; is the forecast flood flow process data at time t within the forecast period; is the measured flood flow process data at time t; It is the average value of the measured flood flow process data.
[0082] In the flood hierarchical diffusion intelligent forecasting method based on AEDD-RCNN of the present invention, AEDD-RCNN is the abbreviation of autoencoder hierarchical denoising diffusion residual convolutional neural network.
[0083] The data-deficient mountainous area in the flood graded diffusion intelligent forecasting method based on AEDD-RCNN of the present invention refers to a mountainous area where the hydrological stations in the mountainous area are scarce and there are less than at least 30 hourly historical rainfall and flood flow process data with a duration of 48 hours for each station.
[0084] The flood graded diffusion intelligent forecasting method based on AEDD-RCNN of the present invention has the characteristic of high forecasting accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0085] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0086] Figure 1 It is a flow chart of the flood graded diffusion intelligent forecasting method based on AEDD-RCNN of the present invention;
[0087] Figure 2 This is a flood classification and diffusion intelligent forecasting method embodiment 1 of the present invention based on AEDD-RCNN, which is a result diagram of flood intelligent forecasting of flood classification 1 in Huangtai Bridge area of Xiaoqing River in Shandong Province;
[0088] Figure 3 This is a flood classification and diffusion intelligent forecasting method based on AEDD-RCNN of the present invention, Example 1, flood classification 2, flood intelligent forecasting result diagram of Huangtai Bridge area of Xiaoqing River in Shandong Province;
[0089] Figure 4 This is an example of the flood classification and diffusion intelligent forecasting method based on AEDD-RCNN of the present invention. Implementation example 1 is the flood classification 3 intelligent forecasting result diagram of the Huangtai Bridge area of Xiaoqing River in Shandong Province. DETAILED DESCRIPTION
[0090] Example 1
[0091] 1. Software Source
[0092] Python 3.8
[0093] 2. The flood graded diffusion intelligent forecasting method based on AEDD-RCNN of the present invention
[0094] (1) Collection and processing of historical flood and rainstorm data in the basin area of Huangtaiqiao observation station of Xiaoqing River in mountainous areas where data is missing
[0095] The hourly rainfall data of 25 rainfall events, each lasting 48 hours, were collected from five rainfall stations in the basin area of the Huangtai Bridge observation station of Xiaoqing River in Shandong Province from 1996 to 2019, including the second rainfall event in 1996, the fourth rainfall event in 1998, the first rainfall event in 2004, the first rainfall event in 2005, the first rainfall event in 2007, the first rainfall event in 2009, the second rainfall event in 2010, the first rainfall event in 2012, the third rainfall event in 2013, the second rainfall event in 2015, the fourth rainfall event in 2016, the second rainfall event in 2018 and the first rainfall event in 2019. The hourly flood flow process data recorded by the Huangtai Bridge hydrological station of the Xiaoqing River; the hourly centroid rainfall of 25 sessions, each lasting 48 hours, in the Huangtai Bridge catchment area of the Xiaoqing River is obtained by performing inverse distance weighted interpolation on the hourly rainfall data of the 25 sessions, each lasting 48 hours. The hourly centroid rainfall of 25 sessions, each lasting 48 hours, in the Huangtai Bridge catchment area of the Xiaoqing River is combined with the hourly flood flow process data to obtain the hourly rainfall and flood flow process data of 25 sessions, each lasting 48 hours, in the watershed area of the Huangtai Bridge observation station of the Xiaoqing River in the data-deficient mountainous area from 1996 to 2019;
[0096] (2) AE dimensionality reduction and data classification of historical flood and rainstorm datasets in the Huangtaiqiao observation station of Xiaoqing River in mountainous areas with insufficient data
[0097] ①. AE Dimensionality Reduction of Historical Flood and Rainstorm Dataset in the Huangtaiqiao Observation Station of Xiaoqing River in Mountainous Areas with Lack of Data
[0098] a. The 25 flood and rainstorm data, each lasting 48 hours, collected and processed in step (1) from 1996 to 2019 in the watershed area of the Huangtai Bridge observation station of the Xiaoqing River in the data-deficient mountainous area, that is, the hourly rainfall and flood flow process data, each lasting 48 hours, from 1996 to 2019, are normalized to the interval [0,1] to form a normalized 25 historical flood and rainstorm data sets in the watershed area of the Huangtai Bridge observation station of the Xiaoqing River in the data-deficient mountainous area; the sum of the normalized 25 historical flood and rainstorm data sets in the watershed area of the Huangtai Bridge observation station of the Xiaoqing River in the data-deficient mountainous area constitutes the normalized historical flood and rainstorm data set in the watershed area of the Huangtai Bridge observation station of the Xiaoqing River in the data-deficient mountainous area;
[0099] b. Input the normalized historical flood and rainstorm data set of the Huangtai Bridge observation station in the Xiaoqing River in the mountainous area with insufficient data described in step (2) ①a into the AE data dimensionality reduction model for data reconstruction to obtain a normalized historical flood and rainstorm data set of the Huangtai Bridge observation station in the Xiaoqing River in the mountainous area with insufficient data reconstructed in the AE data dimensionality reduction model;
[0100] c. Using the reconstructed data set of the historical flood and rainstorm data set of the Huangtai Bridge observation station in the watershed area of the Xiaoqing River in the data-deficient mountainous area after normalization described in step (2) ①b in the AE data dimensionality reduction model and the error between the historical flood and rainstorm data set of the Huangtai Bridge observation station in the watershed area of the Xiaoqing River in the data-deficient mountainous area after normalization described in step (2) ①a as the loss function for network training, the hidden vector of the historical flood and rainstorm data set of the Huangtai Bridge observation station in the watershed area of the Xiaoqing River in the data-deficient mountainous area after normalization described in step (2) ①a in the AE data dimensionality reduction model is obtained after the network training is completed;
[0101] ②. AE dimensionality reduction data classification of historical flood and rainstorm datasets in the Huangtai Bridge observation station of Xiaoqing River in mountainous areas with insufficient data
[0102] K-means clustering is performed on the hidden vectors of the historical flood and rainstorm data set of the watershed area of the Huangtai Bridge observation station of the Xiaoqing River in the data-deficient mountainous area after normalization in step (2) ①c in the AE data dimensionality reduction model. According to the result of the K-means clustering, the historical flood and rainstorm data set of the watershed area of the Huangtai Bridge observation station of the Xiaoqing River in the data-deficient mountainous area after normalization in step (2) ①a is divided into three types. The three types of historical flood and rainstorm data set of the watershed area of the Huangtai Bridge observation station of the Xiaoqing River in the data-deficient mountainous area respectively include (6, 7 and 12) historical flood and rainstorm data sets in the watershed area of the Huangtai Bridge observation station of the Xiaoqing River in the data-deficient mountainous area; the historical flood and rainstorm data set of the watershed area of the Huangtai Bridge observation station of the Xiaoqing River in the data-deficient mountainous area after normalization in step (2) ①c is clustered in the hidden vectors of the AE data dimensionality reduction model. The center of the cluster of the historical flood and rainstorm data set in the watershed area of the Huangtai Bridge observation station of the Xiaoqing River in the mountainous area with insufficient data after normalization in step (2) ①a is obtained. The cluster of the historical flood and rainstorm data set in the watershed area of the Huangtai Bridge observation station of the Xiaoqing River in the mountainous area with insufficient data after normalization in step (2) ①a is divided into 3 flood levels, namely flood level 1, flood level 2 and flood level 3. The flood levels 1-3 include (6, 7 and 12) floods respectively. The flood level results of the historical flood and rainstorm data set in the watershed area of the Huangtai Bridge observation station of the Xiaoqing River in the mountainous area with insufficient data after normalization are shown in Table 1. Table 2 shows the cluster of the flood level of the historical flood and rainstorm data set in the watershed area of the Huangtai Bridge observation station of the Xiaoqing River in the mountainous area with insufficient data after normalization.
[0103] Table 1 Flood classification results of the historical flood and rainstorm dataset in the Huangtaiqiao observation station of Xiaoqing River in the data-deficient mountainous area after normalization
[0104]
[0105] Table 2 Normalized cluster center points of flood classification in the historical flood and rainstorm dataset of the Huangtai Bridge observation station in the Xiaoqing River basin in the data-deficient mountainous area
[0106]
[0107] (3) Denoising Diffusion Model DDPM Expansion of Historical Flood and Rainstorm Dataset in the Huangtaiqiao Observation Station of Xiaoqing River in Mountainous Areas with Lack of Data
[0108] According to step (2) ② of the flood classification 1-3, step (2) ①a of the Xiaoqing River Huangtai Bridge observation station in the data-deficient mountainous area, the normalized historical flood and rainstorm data sets in the watershed area (6, 7 and 12) of the Xiaoqing River Huangtai Bridge observation station in the data-deficient mountainous area are respectively placed in three different denoising diffusion models. First, a forward diffusion process is used to add noise to the normalized historical flood and rainstorm data sets in the watershed area (6, 7 and 12) of the Xiaoqing River Huangtai Bridge observation station in the data-deficient mountainous area according to step (2) ② of the flood classification 1-3. Then, a reverse diffusion process U-net neural network is used to perform noise addition on the normalized historical flood and rainstorm data sets in the watershed area (6, 7 and 12) of the Xiaoqing River Huangtai Bridge observation station in the data-deficient mountainous area according to step (2) ② of the flood classification 1-3. The historical flood and rainstorm data sets of (6, 7 and 12) in the area are trained and denoised, and the deterministic inverse method is used for sampling to obtain the (25, 25 and 25), (50, 50 and 50) and (100, 100 and 100) flood and rainstorm data sets generated by the (6, 7 and 12) historical flood and rainstorm data sets in the watershed area of the Huangtai Bridge observation station of the Xiaoqing River in the data-deficient mountainous area after normalization according to step (2) ①a of the flood classification 1-3 described in step (2) ②. The historical flood and rainstorm data sets of (6, 7 and 12) in the watershed area of the Huangtai Bridge observation station of the Xiaoqing River in the data-deficient mountainous area after normalization according to step (2) ①a of the flood classification 1-3 described in step (2) ② are respectively compared with the historical flood and rainstorm data sets of (6, 7 and 12) in the watershed area of the Huangtai Bridge observation station of the Xiaoqing River in the data-deficient mountainous area after normalization according to step (2) ①a of the flood classification 1-3 described in step (2) ②. The (25, 25 and 25), (50, 50 and 50) and (100, 100 and 100) flood and rainstorm datasets generated by the normalized (6, 7 and 12) historical flood and rainstorm datasets in the watershed area of the Huangtai Bridge observation station of the Xiaoqing River in the data-deficient mountainous area are merged to obtain the expanded flood classifications 1-3 of step (2) ②, namely, the (25, 25 and 25), (50, 50 and 50) and (100, 100 and 100) flood and rainstorm datasets in the watershed area of the Huangtai Bridge observation station of the Xiaoqing River in the data-deficient mountainous area [(6+25)=31, (7+25)=32 and (12+25)=37], [(6+50)=56, (7+50)=57 and (12+50)=62] and [(6+100)=106, (7+100)=106] =107 and (12+100)=112] historical flood and rainstorm data sets, the historical flood and rainstorm data sets of (31, 32 and 37), (56, 57 and 62) and (106, 107 and 112) in the watershed area of the observation station in the mountainous area with insufficient data after normalization in step (2) ①a after the expansion of the flood classification 1-3 in step (2) ② are normalized to the interval [0,1] to form the historical flood and rainstorm data sets of (31, 32 and 37), (56, 57 and 62) and (106, 107 and 112) in the watershed area of the Huangtai Bridge observation station in the Xiaoqing River in the mountainous area with insufficient data after normalization in step (2) ①a after the expansion of the flood classification 1-3 in step (2) ②;Table 3 shows the denoising diffusion model parameter settings; Table 4 shows the U-net network parameter settings;
[0109] Table 3 Denoising diffusion model parameter settings
[0110]
[0111] Table 4 U-net network parameter settings
[0112] Dimension doubling sequence of each layer Number of channels Sine Learning Dimension Sine position embedding θ Attention head dimension Number of attention heads (1,2,4,8) 3 16 10000 32 4
[0113] (4) Extended dataset RCNN neural network hierarchical training
[0114] In step (3), the normalized expanded step (2) ①a of the flood classification 1-3 according to step (2) ② includes the historical flood and rainstorm data sets of (31, 32 and 37), (56, 57 and 62) and (106, 107 and 112) in the watershed area of the Huangtai Bridge observation station of the Xiaoqing River in the data-deficient mountainous area, except for the historical flood and rainstorm data sets of (6, 7 and 12) in the watershed area of the Huangtai Bridge observation station of the Xiaoqing River in the data-deficient mountainous area according to step (2) ②, and arbitrarily selects 20182 fields of flood classification 1 serial number 6, 2004 fields of flood classification 2 serial number 7 and 199 fields of flood classification 3 serial number 12 in Table 1. The 84 historical flood and rainstorm data sets were used as the validation set. The rest were normalized according to step (2)② and expanded according to step (2)①a. The Xiaoqing River Huangtai Bridge observation station basin area in the data-deficient mountainous area [(5+25)=30, (6+25)=31 and (11+25)=36], [(5+50)=55, (6+50)=56 and (11+50)=61] and [(5+100)=105, (6+100)=106 and (11+100)=111] historical flood and rainstorm data sets were used to train the small residual convolutional neural network RCNN separately. The parameters of the preliminary proposed RCNN neural network model are shown in Table 5.
[0115] Table 5 RCNN neural network model parameter settings
[0116] Flood classification Learning Rate Neurons Decaying Neurons Decay rate 1 0.5 1800 1500 0.5 2 0.5 1800 1500 0.5 3 0.3 500 400 0.3
[0117] (5) Evaluation of prediction results
[0118] After the normalization of step (4) and the expansion of step (2) ② for flood classification 1-3, except for the validation set, the flood prediction results of RCNN trained on the historical flood and rainstorm datasets of (30, 31 and 36), (55, 56 and 61) and (105, 106 and 111) in the Huangtai Bridge observation station of Xiaoqing River in the data-deficient mountainous area are AEDD-RCNN (25), AEDD-RCNN (50) and AEDD-RCNN (100) are respectively verified using the validation set described in step (4); the NSE values and R values, RMSE and MAE of the flood prediction results of AEDD-RCNN (25), AEDD-RCNN (50), AEDD-RCNN (100), CNN (convolutional neural network without extended dataset) and RCNN are shown in Table 6, and the flood intelligent forecasting result graph of flood classification 1 is shown in the attached figure. Figure 2 , flood classification 2 flood intelligent forecast result diagram is attached Figure 3 , flood level 3 flood intelligent forecast result diagram is attached Figure 4
[0119] Table 6 Flood prediction results for the Huangtai Bridge observation station in the Xiaoqing River basin in the mountainous area where data is missing
[0120]
[0121] From the comparison of flood prediction results of AEDD-RCNN(25), AEDD-RCNN(50) and AEDD-RCNN(100) in Table 6, it can be seen that the NSE value of 0.91 and R value of 0.96 of the flood prediction result AEDD-RCNN(50) are higher than the NSE value of 0.58 and R value of 0.92 of the flood prediction result AEDD-RCNN(25) and the NSE value of 0.68 and R value of 0.93 of the flood prediction result AEDD-RCNN(100). The RMSE value of 8.94 and MAE value of 6.83 of flood prediction result AEDD-RCNN(50) are lower than the RMSE value of 18.57 and MAE value of 14.09 of flood prediction result AEDD-RCNN(25) and the RMSE value of 17.14 and MAE value of 13.08 of flood prediction result AEDD-RCNN(100), indicating that flood prediction results AEDD-RCNN(25) are better than those of AEDD-RCNN(100). Results AEDD-RCNN(50) has higher prediction accuracy. From the comparison of flood prediction results AEDD-RCNN(50), CNN flood prediction results and RCNN flood prediction results in Table 6, it can be seen that the NSE value of AEDD-RCNN(50) (0.91) and R value of 0.96 are higher than the NSE value of 0.75 and R value of 0.92 of CNN flood prediction results and the NSE value of 0.77 and R value of 0.92 of RCNN flood prediction results. The RMSE value of 8.94 and MAE value of 6.83 of AEDD-RCNN(50) are lower than the RMSE value of 14.83 and MAE value of 12.01 of CNN flood prediction results and the RMSE value of 14.98 and MAE value of 11.35 of RCNN flood prediction results. This shows that the flood prediction results AEDD-RCNN(50) have higher prediction accuracy than the CNN flood prediction results and RCNN flood prediction results, and are more suitable for flood forecasting in mountainous areas with insufficient data.
[0122] The embodiment illustrates that the flood graded diffusion intelligent forecasting method based on AEDD-RCNN of the present invention uses the historical flood and rainstorm data of the Huangtai Bridge observation station of Xiaoqing River in the data-deficient mountainous area normalized to the interval of [0,1], that is, 25 hourly historical rainfall and flood flow process data of each lasting 48 hours from 1996 to 2019, and the error between the reconstructed data set obtained in the AE data dimensionality reduction model and the normalized historical flood and rainstorm data set of the Huangtai Bridge observation station of Xiaoqing River in the data-deficient mountainous area is used as the loss function for network training to obtain the normalized data-deficient mountainous area Huangtai Bridge observation station of Xiaoqing River The result of K-means clustering of hidden vectors of historical flood and rainstorm data set in AE data dimensionality reduction model divides the types of historical flood and rainstorm data set in the watershed area of Huangtai Bridge observation station of Xiaoqing River in mountainous area with insufficient data after normalization, and inputs the cluster center of the hidden vector into the decoder of AE data dimensionality reduction model to obtain the cluster center of historical flood and rainstorm data set in the watershed area of Huangtai Bridge observation station of Xiaoqing River in mountainous area with insufficient data after normalization, so as to realize flood classification of historical flood and rainstorm data set in the watershed area of Huangtai Bridge observation station of Xiaoqing River in mountainous area with insufficient data after normalization; according to flood classification 1-3, the historical flood and rainstorm data set in the watershed area of Huangtai Bridge observation station of Xiaoqing River in mountainous area with insufficient data after normalization is classified into types of historical flood and rainstorm data set in the watershed area of Huangtai Bridge observation station of Xiaoqing River in mountainous area with insufficient data after normalization. The historical flood and rainstorm datasets of the (6, 7 and 12) sites in the basin area of the station were placed in three different denoising diffusion models, and noise was added. The U-net network was used for training and denoising. The deterministic inverse method was used for sampling. The (50, 50 and 50) flood and rainstorm datasets generated by the (6, 7 and 12) historical flood and rainstorm datasets of the observation site basin area in the data-deficient mountainous area after normalization according to flood classification 1-3 were obtained. The (6, 7 and 12) historical flood and rainstorm datasets of the Huangtai Bridge observation site in the Xiaoqing River in the data-deficient mountainous area after normalization according to flood classification 1-3 and the (50, 50 and 50) flood and rainstorm datasets generated by them were obtained. The merged and normalized data were normalized to the interval of [0,1], and the expanded and normalized data of historical flood and rainstorms (56, 57 and 62) in the watershed area of the Huangtai Bridge observation station of Xiaoqing River in the data-deficient mountainous area were obtained according to flood classification 1-3. Except for the (6, 7 and 12) historical flood and rainstorm data sets in the watershed area of the Huangtai Bridge observation station of Xiaoqing River in the data-deficient mountainous area after normalization according to flood classification 1-3, one of the different flood classifications 1-3 was randomly selected as the validation set, and the (55, 56 and 61) historical flood and rainstorm data sets were used to train the small RCNN to obtain the flood prediction result AEDD-RCNN (50);The average NSE and R values of the flood prediction results AEDD-RCNN (50) for flood classifications 1-3 are higher than those of the flood prediction results RCNN and CNN. The average RMSE and MAE values of the flood prediction results AEDD-RCNN (50) for flood classifications 1-3 are lower than those of the flood prediction results RCNN and CNN. This indicates that the hourly historical rainfall and flood flow process data of the Huangtai Bridge observation station in the Xiaoqing River in the data-deficient mountainous area (6, 7 and 12) for 48 hours are normalized to flood classifications 1-3. The number of flood events and flood data of different flood classifications 1-3 in the historical flood and rainstorm data set of the Huangtai Bridge observation station of Xiaoqing River in the data-deficient mountainous area (56, 57 and 62) after normalization and expansion according to flood classification 1-3 and the flood data of the Huangtai Bridge observation station of Xiaoqing River in the data-deficient mountainous area (55, 56 and 61) after normalization and expansion according to flood classification 1-3 and the flood data fully meet the requirements of machine learning and deep learning models, so the flood classification diffusion intelligent forecasting method based on AEDD-RCNN of the present invention has the characteristics of high forecasting accuracy. ;
Claims
1. A flood graded diffusion intelligent forecasting method based on AEDD-RCNN, comprising the following steps in sequence: (1) Collection and processing of historical flood and rainstorm data in river basins with missing data at observation stations in mountainous areas Collect and process historical flood and rainstorm data in the basin area of mountain observation stations with insufficient data, that is, hourly historical rainfall and flood flow process data of 20 to 29 stations lasting 48 hours each; (2) AE dimensionality reduction and data classification of historical flood and rainstorm datasets in river basins with missing data from observation stations in mountainous areas ①. AE Dimensionality Reduction of Historical Flood and Rainfall Datasets in River Basins with Lack of Data from Mountainous Observation Stations a. normalizing the historical flood and rainstorm data of each data-deficient mountain observation station basin area collected and processed in step (1), i.e., the hourly historical rainfall and flood flow process data of 20 to 29 data points each lasting 48 hours, to the interval [0,1] to form a normalized historical flood and rainstorm data set of each data-deficient mountain observation station basin area; the sum of the normalized historical flood and rainstorm data sets of each data-deficient mountain observation station basin area constitutes the normalized historical flood and rainstorm data set of the data-deficient mountain observation station basin area; b. Input the normalized historical flood and rainstorm data set of the watershed area of the mountain observation station with insufficient data in step (2) ①a into the AE data dimensionality reduction model for data reconstruction to obtain the normalized historical flood and rainstorm data set of the watershed area of the mountain observation station with insufficient data in the AE data dimensionality reduction model; c. Using the error between the reconstructed data set of the historical flood and rainstorm data set of the watershed area of the observation station in the mountainous area with insufficient data after normalization described in step (2) ①b and the historical flood and rainstorm data set of the watershed area of the observation station in the mountainous area with insufficient data after normalization described in step (2) ①a as the loss function, network training is performed, and the hidden vector of the historical flood and rainstorm data set of the watershed area of the observation station in the mountainous area with insufficient data after normalization described in step (2) ①a in the AE data dimensionality reduction model is obtained after the network training is completed; ②. AE dimensionality reduction data classification of historical flood and rainstorm datasets in river basins with missing data from observation stations in mountainous areas K-means clustering is performed on the hidden vectors of the historical flood and rainstorm data set in the watershed area of the observation station in the mountainous area with insufficient data after normalization in step (2) ①c in the AE data dimensionality reduction model, and the historical flood and rainstorm data set in the watershed area of the observation station in the mountainous area with insufficient data after normalization in step (2) ①a is classified into types according to the result of the K-means clustering; the cluster center of the hidden vectors of the historical flood and rainstorm data set in the watershed area of the observation station in the mountainous area with insufficient data after normalization in step (2) ①c in the AE data dimensionality reduction model is input into the decoder of the AE data dimensionality reduction model to obtain the cluster center of the historical flood and rainstorm data set in the watershed area of the observation station in the mountainous area with insufficient data after normalization in step (2) ①a, and the cluster center of the historical flood and rainstorm data set in the watershed area of the observation station in the mountainous area with insufficient data after normalization in step (2) ①a is used to classify the floods described in step (1); (3) Expansion of the DDPM model for the historical flood and rainstorm dataset in the basin area with insufficient data from observation stations in mountainous areas The historical flood and rainstorm data sets of the watershed area of the observation station in the mountainous area with insufficient data after normalization according to step (2) ② of the flood classification in step (2) ①a are respectively placed in different denoising diffusion models. First, the forward diffusion process is used to add noise to the historical flood and rainstorm data sets of the watershed area of the observation station in the mountainous area with insufficient data after normalization according to step (2) ② of the flood classification in step (2) ①a. Then, the reverse diffusion process U-net neural network is used to train and denoise the historical flood and rainstorm data sets of the watershed area of the observation station in the mountainous area with insufficient data after normalization according to step (2) ② of the flood classification in step (2) ①a. The deterministic inverse method is used for sampling to obtain 50 flood and rainstorm data sets generated by the historical flood and rainstorm data sets of the watershed area of the observation station in the mountainous area with insufficient data after normalization according to step (2) ② of the flood classification in step (2) ①a. The normalized historical flood and rainstorm datasets of the watershed area of the observation station in the mountainous area with insufficient data in step (2)② of the flood classification in step (2)①a are combined with the 50 flood and rainstorm datasets generated according to the normalized historical flood and rainstorm datasets of the watershed area of the observation station in the mountainous area with insufficient data in step (2)② of the flood classification in step (2)①a to obtain the normalized historical flood and rainstorm datasets of the watershed area of the observation station in the mountainous area with insufficient data in step (2)② after the flood classification in step (2)②, and the normalized historical flood and rainstorm datasets of the watershed area of the observation station in the mountainous area with insufficient data in step (2)①a after the flood classification in step (2)② are normalized to the interval of [0,1] to form the normalized historical flood and rainstorm datasets of the watershed area of the observation station in the mountainous area with insufficient data in step (2)② after the flood classification in step (2)②; The forward diffusion process is expressed by formula (1) as follows: The update of each step of the reverse diffusion process is defined by formula (2): The noise prediction model is expressed by formula (3) as follows: The deterministic inverse method performs fast sampling via formula (4): In formulas (1)-(4): x t is the data at time step t; α t is the variance scheduling parameter; x t-1 is the data of time step t-1; ∈ t is the noise sampled from the standard normal distribution N(0~1); is the noise predicted by the model at time step t; f θ is the prediction function parameterized as a neural network; θ is the model parameter; α t-1 is the variance scheduling parameter at time step t-1; Formula (5) represents the main loss term of the total loss function in the reverse diffusion process: Formula (6) represents the distance loss term of the total loss function in the reverse diffusion process: The total loss function in the reverse diffusion process expressed by formula (7) is the weighted sum of the main loss term and the distance loss term: L total =L primary +α·L distance (7) In formulas (5)-(7): L primary is the main loss term, i.e., reconstruction loss or noise prediction loss; ∈ i is the actual noise of the i-th sample at the current time step; is the noise of the i-th sample predicted by the model at the current time step; N is the number of samples in the batch; i=1 means starting from the first sample; L distance is the distance loss term; x start,i is the i-th sample output by the model; c is the cluster center; ||·||2 represents the L2 norm (Euclidean distance); L total is the total loss function; α is a hyperparameter used to balance the importance of the two loss terms; The initial convolutional layer of the U-Net neural network is expressed by formula (8) as follows: x′=ReLU(Conv1D(x,W init )+b init ) (8) The U-Net neural network downsampling is expressed by formula (9) as follows: The middle layer of the U-Net neural network is expressed by formula (10) as follows: The U-Net neural network upsampling is expressed by formula (11) as follows: The skip connection of the U-Net neural network is expressed by formula (12) as follows: The final convolutional layer of the U-Net neural network is expressed by formula (13) as follows: In formulas (8)-(13): x' is the time series after convolution; x is the one-dimensional time series of input; W init and b init are the weights and biases of the initial convolutional layer; ReLU is the activation function; Conv1D is the one-dimensional convolution function; It is the feature map after downsampling at the lth layer; It is the feature sequence after downsampling at the l-1th layer; and They are the weights and biases of the lth downsampling convolutional layer respectively; is the feature sequence after the lth layer of pooling; MaxPool1D is the one-dimensional maximum pooling operation; kernel_size refers to the size of the kernel; x mid It refers to the characteristic sequence of the middle layer; It is the feature map of the last downsampled layer; L is the number of downsampling layers; W mid and b mid are the weights and biases of the middle layers respectively; It is the feature map after upsampling at layer l; convTranspose1D is a one-dimensional transposed convolution; It is the feature sequence after upsampling at the l-1th layer; and They are the weights and biases of the lth upsampling convolutional layer respectively; is the feature sequence after the concatenation of the lth layer; Concat is the concatenation operation; is the feature sequence after downsampling at the L-1th layer; + represents the concatenation operation of the jump connection; is the output of the network; W final and b final are the weights and biases of the final convolutional layer, respectively; The calculation of query, key, and value of the U-Net neural network self-attention mechanism is expressed as follows by formula (14): The calculation of the attention score of the U-Net neural network self-attention mechanism is expressed by formula (15) as follows: The calculation of the attention weight of the U-Net neural network self-attention mechanism is expressed by formula (16) as follows: Weights=softmax(Scores) (16) The calculation of the output of the U-Net neural network self-attention mechanism is expressed by formula (17) as follows: Output=Weights·V (17) The multi-head attention mechanism after the expansion of the self-attention mechanism of the U-Net neural network is shown in formula (18): MultiHead(Q,K,V)=Concat(head1,head2,...,head h )W O (18) In formulas (14)-(18), Q, K, and V represent query, key, and value respectively; W Q , W K With W V They represent the learnable weight matrices respectively; X is the input feature matrix; Scores represents the attention score; d k is the dimension of the key vector; is a scaling factor used to prevent the result from being too large when calculating the dot product; K T Refers to the transpose of the matrix; Weights refers to the attention weight; softmax represents the normalized exponential function; each attention score is normalized using the softmax function so that the sum of the attention weights at each position is 1; V represents the matrix value; Output represents the final output; MultiHead(Q,K,V) represents multi-head attention; each head i =Attention(QW i Q ,KW i K ,VW i V ), Attention represents the attention mechanism function; W i Q represents the weight matrix of the query; W i K represents the weight matrix of the key; W i V The weight matrix representing the value; Concat is a concatenation operation; (head1, head2, ..., head h ) refers to different heads; W O is another learnable weight matrix used to perform a linear transformation on the concatenated output; The multi-layer perceptron sinusoidal position encoding is expressed by formula (19) as follows: In formula (19), φ(x) represents the multilayer perceptron sinusoidal position encoding; x1 represents the original position encoding; ω ij represents the frequency of the jth random selection of the ith data point; b ij represents the jth randomly selected phase of the ith data point; M is the number of random features in each dimension; D is the original dimension of the data; (4) Extended dataset RCNN neural network hierarchical training In step (3), the historical flood and rainstorm data sets of various floods in the watershed area of the observation station in the mountainous area with insufficient data after normalization according to step (2)② and after expansion of step (2)①a are used as validation sets to verify the training results, and the rest of the historical flood and rainstorm data sets of various floods in the watershed area of the observation station in the mountainous area with insufficient data after normalization according to step (2)② and after expansion of step (2)①a are used to train a small residual convolutional neural network RCNN separately. The parameters of the RCNN neural network model initially proposed include the number of hidden layers, the number of hidden layer nodes and the number of epoch iterations; The specific calculation of the RCNN neural network model Conv1d prediction is expressed by formula (20) as follows: In formula (20): is the output of the jth node in the lth layer; i is an index used to traverse the collection M j All input units in M j is the range of the number of nodes i; Represents the value of the i-th input unit in the l-1th layer; is the convolution kernel, * indicates the convolution operation; is the bias term; f is the activation function; (5) Evaluation of prediction results The flood prediction results of the RCNN trained on the normalized historical flood and rainstorm data sets of the observation stations in the data-deficient mountainous area and the verification set measured flood data are compared and analyzed using four indicators: mean absolute error (MAE), root mean square error (RMSE), Nash efficiency coefficient (NSE) and correlation coefficient (R). The lower the values of the mean absolute error (MAE) and root mean square error (RMSE), the higher the prediction accuracy. The higher the values of the NSE and R, the higher the prediction accuracy. MAE, RMSE, NSE and R are respectively expressed by formulas (21)-(24) as follows: In formulas (21)-(24): MAE is the mean absolute error; RMSE is the root mean square error; NSE is the Nash efficiency coefficient; R is the correlation coefficient; n is the forecast period; is the forecast flood flow process data at time t within the forecast period; is the measured flood flow process data at time t; It is the average value of the measured flood flow process data.
Citation Information
Cited By
Flood forecasting method fusing physical mechanism and conditional denoising diffusion model
CN122133082A