Regional flood forecasting method and system based on lstm-transformer and multi-modal data fusion
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-14
- Publication Date
- 2026-08-11
AI Technical Summary
这类模型虽然具备明确的物理水文学机制和可解释性,但在现代大区域多流域协同预报的复杂场景下,暴露出了无法克服的严重技术缺陷:首先是参数校准极其困难,物理水文模型内部包含大量高度非线性的经验参数,这类参数严重依赖高精度的土壤物理属性、地质结构及精细地形下垫面观测数据,需要耗费大量时间针对单一流域进行反复人工调参校准,在少资料地区或无资料流域(Ungauged Basins)几乎无法应用;其次是大规模并行计算效率较低,面对大区域、数百个流域进行大范围实时多步滚动预报时,物理机制方程需要进行极其繁重的时空离散化数值求解,耗费大量的传统计算资源,计算耗时长,根本无法满足现代智慧防汛对秒级、毫秒级实时短临预警的高时效要求
Smart Images

Figure CN122548699A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of runoff prediction technology, and in particular to a regional flood forecasting method and system based on LSTM-Transformer and multimodal data fusion. Background Technology
[0002] Floods, as one of the most frequent, sudden, and destructive natural disasters, pose extremely severe challenges to the safety of life and property, urban infrastructure construction, and optimal water resource allocation in modern society. Accurate and timely rainfall-runoff forecasting (i.e., flood forecasting) is the core support for flood control command and dispatch, flood risk assessment, advance evacuation of people, and refined reservoir management.
[0003] Traditional flood forecasting methods primarily rely on physics-driven hydrological models (such as the widely used Xin'anjiang model and Shaanbei model in China, and the internationally common VIC and MIKE models). While these models possess clear physical-hydrological mechanisms and interpretability, they exhibit serious and insurmountable technical shortcomings in the complex scenarios of modern large-area, multi-basin collaborative forecasting: First, parameter calibration is extremely difficult. Physical-hydrological models contain a large number of highly nonlinear empirical parameters, which heavily depend on high-precision soil physical properties, geological structure, and detailed topographic surface observation data. This requires significant time for repeated manual parameter adjustments and calibrations for a single basin, making them virtually unusable in areas with limited or no data (ungauged basins). Second, large-scale parallel computing is inefficient. When conducting large-scale, real-time, multi-step rolling forecasts for large areas and hundreds of basins, the physical mechanism equations require extremely complex spatiotemporal discretization numerical solutions, consuming substantial traditional computing resources and resulting in long computation times. This simply cannot meet the high timeliness requirements of modern smart flood control for second- and millisecond-level real-time short-term early warnings.
[0004] With the explosive development of artificial intelligence and big data technologies, data-driven models, represented by Long Short-Term Memory (LSTM) networks, have demonstrated superior fitting advantages over traditional models in hydrological time series modeling. LSTMs, through carefully designed forgetting gates, input gates, and output gate control mechanisms, can effectively capture short-term dynamic dependencies in hydrological time series. However, existing deep learning flood forecasting methods tend to build "local models" for single watersheds. This approach leads to overfitting of the model to historical hydrological curves of a specific watershed. When the watershed faces extreme weather events, or when the model needs to be directly transferred to neighboring watersheds lacking historical flow observation data, the generalization ability and robustness of the local model experience a precipitous drop. If researchers simply mix massive amounts of multi-basin data from different geographical regions and underlying surfaces to train a "Regional Model," the resulting heterogeneous hydrological data will cause severe update conflicts and "gradient cancellation" phenomena in the neuron weights within the large model. This is because the geometric slopes, vertical soil permeability, and vegetation cover types of each watershed are completely different, resulting in strong spatial heterogeneity. Ultimately, the overall prediction accuracy of the mixed-trained regional model will lag significantly behind that of the localized model.
[0005] Furthermore, while Transformer models based on self-attention can effectively model long-distance temporal dependencies, their direct application to hydrological rainfall-runoff nonlinear modeling often results in an overemphasis on global features across the entire sequence, lacking sufficient sensitivity to continuous and dramatic fluctuations and short-term evolutionary trends (such as the details of sudden rises and falls triggered by instantaneous heavy rainfall). The core technical bottleneck in the development of large-scale cross-basin hydrological forecasting models lies in how to perfectly integrate the static underlying surface properties of the watershed to effectively decouple the spatial heterogeneity problem and organically combine the topological advantages of LSTM and Transformer. Summary of the Invention
[0006] To address the above issues, this invention proposes a regional flood forecasting method and system based on LSTM-Transformer and multimodal data fusion. By constructing a regional flood forecasting model that fuses LSTM-Transformer and multimodal data, and performing multimodal spatiotemporal broadcast alignment and feature concatenation of static watershed attribute vectors, historical dynamic meteorological driving time-series matrices, and historical cross-sectional flow time-series matrices from multiple watersheds, the inherent physical codes of each watershed are forcibly injected into the regional flood forecasting model as "spatial decoupling beacons." This enables a single model to adaptively adjust the activation state of its internal parameters based on static attributes, resolving the conflicts in large-scale mixed training of cross-watershed spatial heterogeneity at the underlying level, and significantly improving the temporal and spatial generalization accuracy of regional flood forecasting.
[0007] On the one hand, the regional flood forecasting method based on LSTM-Transformer and multimodal data fusion has the following specific steps:
[0008] S1, collect the static watershed attribute vectors, historical dynamic meteorological driving time series matrix, and historical cross-sectional flow time series matrix of each heterogeneous watershed in the target area;
[0009] S2, the static watershed attribute vector, the historical dynamic meteorological driving time series matrix, and the historical cross-sectional flow time series matrix are aligned and concatenated in a multimodal spatiotemporal broadcast to obtain a multimodal time series input feature tensor;
[0010] S3. Construct a regional flood forecasting model and train it using a multimodal temporal input feature tensor to obtain a trained regional flood forecasting model; the regional flood forecasting model includes an LSTM layer, a Transformer encoder, a pooling layer, and a regression layer;
[0011] The multimodal temporal input feature tensor is processed by an LSTM layer for short-term feature extraction to obtain a primary temporal feature sequence. The primary temporal feature sequence is then input into a Transformer encoder to capture long-distance temporal dependencies across long historical periods, resulting in a refined deep temporal feature matrix. The refined deep temporal feature matrix is then input into a pooling layer for global average pooling to eliminate high-frequency random noise from hydrological observations. Finally, a regression layer outputs a continuous runoff sequence for the target watershed.
[0012] S4 uses a trained flood forecasting model to predict continuous runoff sequences for future forecast window data in the target watershed.
[0013] Preferably, the static watershed attribute vector is a fixed underlying surface geographic, physical, and soil characteristic that does not change over time, specifically including: watershed control area, average altitude, average slope, soil clay ratio, soil sand ratio, total soil depth, multi-year average precipitation, multi-year average potential evapotranspiration, climate host index, forest coverage, maximum value of green leaf area index, and minimum value of green leaf area index.
[0014] Preferably, the static watershed attribute vector, historical dynamic meteorological driving time series matrix, and historical cross-sectional flow time series matrix are subjected to multimodal spatiotemporal broadcast alignment and feature concatenation to obtain a multimodal time series input feature tensor; specifically as follows:
[0015] Dimensionless cleaning was performed on the static watershed attribute vector, the historical dynamic meteorological driving time series matrix, and the historical cross-sectional flow time series matrix.
[0016] The dimensionless cleaned static watershed attribute vector is input into the attribute fully connected layer for dimension reduction and linear projection, and then transformed into an attribute embedding vector with high representation intensity.
[0017] The attribute embedding vector is continuously broadcast and copied several times along the row time axis, and expanded into a two-dimensional static attribute embedding matrix with the same number of rows as the time series matrix.
[0018] The two-dimensional static attribute embedding matrix, the dimensionless cleaned historical dynamic meteorological driving time series matrix, and the dimensionless cleaned historical cross-sectional flow time series matrix are horizontally concatenated according to the feature column dimension to construct a multimodal time series input tensor that decouples spatial heterogeneity.
[0019] Preferably, the dimensionless cleaning uses the Z-Score normalization algorithm.
[0020] Preferably, the LSTM layer employs implicit encoding of positional information, specifically implemented as follows: at each time step of the LSTM layer... The internal gated autoregressive recursive calculation process is expressed as follows:
[0021] ;
[0022] ;
[0023] ;
[0024] ;
[0025] ;
[0026] ;
[0027] in, For multimodal temporal input tensors exist The input vector at time step; , and These are the activation vectors for the forget gate, input gate, and output gate, respectively. This represents the candidate cell state vector; Let be the cell state vector. for Cell state vector at time step; Let this be the hidden state vector at the current time step. for The hidden state vector at each time step; , , and The weight matrix is trainable. , , and It is the bias vector; Use the Sigmoid activation function; It is the hyperbolic tangent activation function; The Hadamard product operator is used to multiply elements by their corresponding positions. For splicing operations;
[0028] The primary temporal feature sequence output by the LSTM layer across the entire time axis is: .
[0029] Preferably, the Transformer encoder block is specifically implemented as follows:
[0030] The primary time series feature sequence is deeply captured by the internal multi-head self-attention mechanism to capture the global long-range temporal dependency correlation of the entire sequence across long historical periods, and the self-attention matrix is obtained.
[0031] The attention features are obtained by normalizing the self-attention matrix and concatenating it with the residuals. These features are then input into a one-dimensional convolutional feedforward network layer to obtain a refined deep temporal feature matrix, represented as:
[0032] ;
[0033] in, This is the refined deep temporal feature matrix; For activation functions; This is a one-dimensional convolution operation; For attention features, These are one-dimensional convolution kernel weights; These are the mapping weights of the feedforward network; and This is the bias of the feedforward network.
[0034] Preferably, the step of deeply capturing the global long-range temporal dependency associations of the entire sequence across long historical periods by using an internal multi-head self-attention mechanism for the primary temporal feature sequence is represented as:
[0035] ;
[0036] ;
[0037] in, Represents the self-attention matrix; , and These are the query matrix, key matrix, and value matrix of the self-attention mechanism, respectively. This represents the softmax function; Indicates transpose; They are respectively , and The corresponding linear projection weight matrix; The hidden dimension for a single attention head; This is a primary time-series feature sequence.
[0038] On the other hand, regional flood forecasting systems based on LSTM-Transformer and multimodal data fusion include the following:
[0039] The multimodal data acquisition module is used to collect static watershed attribute vectors, historical dynamic meteorological driving time series matrices, and historical cross-sectional flow time series matrices of various heterogeneous watersheds within the target area.
[0040] The multimodal data unification module is used to perform multimodal spatiotemporal broadcast alignment and feature concatenation and splicing of static watershed attribute vectors, historical dynamic meteorological driving time series matrices, and historical cross-sectional flow time series matrices to obtain multimodal time series input feature tensors;
[0041] The regional flood forecasting model construction module is used to construct a regional flood forecasting model and train it using multimodal temporal input feature tensors to obtain a trained regional flood forecasting model; the regional flood forecasting model includes an LSTM layer, a Transformer encoder, a pooling layer, and a regression layer;
[0042] The multimodal temporal input feature tensor is processed by an LSTM layer for short-term feature extraction to obtain a primary temporal feature sequence. The primary temporal feature sequence is then input into a Transformer encoder to capture long-distance temporal dependencies across long historical periods, resulting in a refined deep temporal feature matrix. The refined deep temporal feature matrix is then input into a pooling layer for global average pooling to eliminate high-frequency random noise from hydrological observations. Finally, a regression layer outputs a continuous runoff sequence for the target watershed.
[0043] The continuous runoff prediction module is used to predict continuous runoff sequences for a target watershed using a trained flood forecasting model with a predefined forecast window of data.
[0044] Compared with the prior art, the present invention has the following beneficial effects:
[0045] (1) This invention constructs a regional flood forecasting model that fuses LSTM-Transformer with multimodal data, and performs multimodal spatiotemporal broadcast alignment and feature concatenation of static watershed attribute vectors, historical dynamic meteorological driving time series matrices and historical cross-sectional flow time series matrices of multiple watersheds. The inherent physical codes of each watershed are forcibly injected into the regional flood forecasting model as “spatial decoupling beacons”, so that a single model can adaptively adjust the activation state of internal parameters according to static attributes. This resolves the conflict of large model mixed training that de-strains cross-watershed spatial heterogeneity at the bottom layer, and significantly improves the temporal and spatial generalization accuracy of regional flood forecasting.
[0046] (2) The LSTM layer of the present invention utilizes the natural sequential evolution of its hidden state on the time axis through autoregression to implicitly assign time position information to the features, thereby completely eliminating the operation of explicitly superimposing sinusoidal absolute position encoding in the traditional Transformer; it not only preserves the local continuity and strict sequential order of hydrological time series, but also avoids the defect of sinusoidal position encoding that cannot adaptively extrapolate when extrapolating long sequences, thus achieving extremely high fitting accuracy.
[0047] (3) Inside the Transformer encoder block of this invention, a one-dimensional convolutional feedforward network (1D-CNN FFN) is creatively used to replace the traditional fully connected feedforward layer (FFN); by utilizing the unique temporal sliding window mechanism of one-dimensional convolution, the model's ability to extract and perceive local abrupt changes such as local rainfall variability and instantaneous confluence caused by sudden heavy rainfall is greatly enhanced. It effectively overcomes the "peak shaving and smoothing" defects commonly found in traditional deep learning flood forecasting models and has extremely high practical value for short-term flood warning technology;
[0048] (4) The present invention performs global average pooling (GAP) by configuring a pooling layer at the end of the model and compressing and denoising on the time axis, which effectively eliminates the high-frequency random noise of hydrological sensor observations. Attached Figure Description
[0049] The present invention will now be described in further detail with reference to the accompanying drawings;
[0050] Figure 1 This is a flowchart of a regional flood forecasting method based on LSTM-Transformer and multimodal data fusion according to an embodiment of the present invention;
[0051] Figure 2 This is a graph showing the relationship between the number of clusters and the silhouette coefficient for evaluating the clustering effect of the regional flood forecasting method based on LSTM-Transformer and multimodal data fusion in an embodiment of the present invention.
[0052] Figure 3This is an elbow diagram for evaluating the clustering effect of a regional flood forecasting method based on LSTM-Transformer and multimodal data fusion according to an embodiment of the present invention.
[0053] Figure 4 This is a map showing the distribution of different types of watersheds in the regional flood forecasting method based on LSTM-Transformer and multimodal data fusion according to an embodiment of the present invention.
[0054] Figure 5 This is a graph showing the prediction results of the regional flood forecasting method based on LSTM-Transformer and multimodal data fusion during a two-year test period according to an embodiment of the present invention.
[0055] Figure 6 This is a local time period prediction result diagram of the regional flood forecasting method based on LSTM-Transformer and multimodal data fusion according to an embodiment of the present invention;
[0056] Figure 7 This is a graph showing the time generalization capability test results of the regional flood forecasting method based on LSTM-Transformer and multimodal data fusion according to an embodiment of the present invention.
[0057] Figure 8 The figure shows the test results of the cross-basin generalization ability of the regional flood forecasting method based on LSTM-Transformer and multimodal data fusion according to an embodiment of the present invention.
[0058] Figure 9 This is a technical roadmap for the regional flood forecasting method based on LSTM-Transformer and multimodal data fusion, as described in this invention.
[0059] Figure 10 This is a structural block diagram of a regional flood forecasting system based on LSTM-Transformer and multimodal data fusion according to an embodiment of the present invention. Detailed Implementation
[0060] To make the objectives, technical solutions, specific execution logic, and technical effects of the present invention clearer and more complete, the method and system of the present invention will be fully and thoroughly described below in conjunction with the accompanying drawings and real experimental embodiments based on specific public hydrological datasets.
[0061] like Figure 1 As shown, the regional flood forecasting method based on LSTM-Transformer and multimodal data fusion has the following specific steps:
[0062] S1 collects the static watershed attribute vectors, historical dynamic meteorological driving time series matrices, and historical cross-sectional flow time series matrices of various heterogeneous watersheds within the target area.
[0063] This embodiment uses an NVIDIA graphics card and runs on a deep learning open-source framework. Before proceeding with the model's forward propagation prediction, this embodiment first uses data-driven methods to cluster and characterize the spatial heterogeneity of multiple watersheds, providing accurate data support for subsequent process steps.
[0064] The specific details of the preliminary implementation of spatially heterogeneous watershed clustering are as follows:
[0065] Principal Component Analysis Dimensionality Reduction: In this embodiment, static watershed attribute data of all monitored watersheds within the target area are first retrieved, with an initial feature dimension of 27. To eliminate redundancy and retain core spatial variability, principal component analysis (PCA) is first performed on the watershed attributes of all watersheds. By setting a cumulative variance contribution rate of 90%, the watershed features are successfully reduced from 27 dimensions before PCA to 11 dimensions. The static watershed attribute vector contains fixed underlying surface geographic, physical, and soil features that do not change over time. The specific feature items are, in order: watershed control area, average altitude, average slope, soil clay ratio, soil sand ratio, total soil depth, multi-year average precipitation, multi-year average potential evapotranspiration, climate host index, forest cover, maximum and minimum green leaf area index.
[0066] The number of clusters was determined: Next, all watersheds after dimensionality reduction were clustered. To determine the optimal clustering effect, the Silhouette Score and the elbow method (WCSS, sum of squared errors within clusters) were introduced for comprehensive evaluation. Figure 2 and Figure 3 As shown, the number of clusters is used respectively. Clustering was performed on watersheds from 2 to 20 pairs, and the average silhouette coefficient and intra-cluster sum of squares error were calculated for each cluster. Observations revealed that when the number of clusters... When the profile coefficient reaches its maximum value; and when When the value is less than 6, the WCSS decreases at a relatively high rate, indicating that increasing the number of clusters can yield significant benefits; when When the number of clusters is greater than 6, the decline in WCSS tends to stabilize. In summary, determining the appropriate number of clusters... When the clustering effect is at its best, the clustering effect is the best.
[0067] Spatial Distribution and Quantitative Patterns: The clustering algorithm divided all watersheds into 6 classes, and the number of watersheds included in each class is shown in Table 1. From a geographic spatial distribution perspective (e.g., Figure 4As can be seen, the east and west coast basins of a certain region in North America, which have similar precipitation characteristics and geographical locations, are classified into the same category, while the central basin is divided into four categories. This indicates that the clustering algorithm, without explicitly providing geographical location information, has identified the objective hydrological law that "basins with similar geographical locations have higher similarity in their basin characteristics."
[0068] Table 1: Number of watersheds for each type of watershed.
[0069]
[0070] S2, the static watershed attribute vector, the historical dynamic meteorological driving time series matrix, and the historical cross-sectional flow time series matrix are aligned and concatenated in a multimodal spatiotemporal broadcast to obtain a multimodal time series input feature tensor;
[0071] Step S21: High-dimensional acquisition and dimensionless conversion of multimodal heterogeneous hydrological data.
[0072] Attribute and temporal data acquisition: Retrieve 11-dimensional static underlying surface attribute vectors for each watershed within the target area after PCA dimensionality reduction. Simultaneously, the length of the corresponding watershed historical review window is collected. Dynamic meteorological driving time series matrix within and historical cross-sectional flow time series matrix .
[0073] Standardization cleaning: The input features are individually cleaned using the Z-Score standardization algorithm shown below:
[0074] ;
[0075] in, The original input feature data, This represents the global average value of the corresponding feature channels in the training set. To determine the global standard deviation of the corresponding feature channels in the training set, the window size for predicting future cross-sectional flow is set to [value]. (This embodiment provides a complete fit of the prediction process line from 1 step to 6 steps in advance).
[0076] Step S22: Spatiotemporal broadcast alignment and feature concatenation of multimodal data.
[0077] Attribute feature embedding: Let the length of the historical review time series window be... The one-dimensional static watershed attribute vector after dimensionless cleaning (This embodiment) The input attributes are subjected to dimensionality reduction and linear projection through a fully connected layer, transforming them into attribute embedding vectors with high representation strength. .
[0078] Time-domain broadcast alignment: Continuous along the time axis The lossless broadcast replication is stretched and expanded into a two-dimensional static attribute embedding matrix that is completely consistent with the number of rows in the dynamic time series. .
[0079] Feature column concatenation: The feature axis concatenation operator (Concat) is called to embed two-dimensional static attributes into the matrix according to the formula rules shown below. Historical dynamic meteorological time series matrix and historical cross-sectional flow time series matrix A unified multimodal temporal input tensor is constructed by concatenating and stitching horizontal matrices along the feature column dimension. ;
[0080] ;
[0081] in, The feature dimension representing the static watershed attribute vector; The feature dimension of the attribute embedding vector; The feature channel dimension of the historical dynamic meteorological-driven time series matrix;
[0082] S3. Construct a regional flood forecasting model and train it using multimodal time-series input feature tensors to obtain a trained regional flood forecasting model.
[0083] Based on the spatially heterogeneous base obtained from the pre-clustering, this embodiment constructs a regional flood forecasting model (regional large model scheme, i.e., RegionalLSTM-Transformer) based on the fusion of LSTM-Transformer and multimodal data.
[0084] The LSTM layer is used for coarse feature extraction and implicit encoding of location information based on LSTM. The multimodal temporal input tensor is then used. The input is fed into a single-layer Long Short-Term Memory (LSTM) network layer, where autoregressive recurrent gating computation is performed along time steps to extract preliminary short-term temporal features and output a feature sequence. Furthermore, the implicit evolution order of the LSTM's internal states over time is used to replace the explicit sinusoidal absolute position encoding of the traditional Transformer model. Specifically:
[0085] Cyclic Gated Computation: Transforming Multimodal Temporal Input Tensors Inputting into a single-layer Long Short-Term Memory (LSTM) network layer, autoregressive recurrent gating computation is performed along time steps. At each time step... The internal control autoregressive recursive calculation process is shown in the following set of formulas:
[0086] ;
[0087] ;
[0088] ;
[0089] ;
[0090] ;
[0091] ;
[0092] in, These are the forget gate, input gate, and output gate vectors, respectively. In cellular state, This is the hidden state vector output at the current time step. and These are the corresponding weight matrices and bias terms, respectively. It represents the Hadamardi (or Hadama) stack.
[0093] Implicit coding substitution: Outputting the primary temporal feature sequence after the full timeline rolling operation is completed. Directly utilize its hidden state. The naturally occurring evolutionary sequence over time implicitly replaces the explicit sinusoidal absolute position encoding of the traditional Transformer model.
[0094] This embodiment uses an improved Transformer encoder for global and local dependency modeling. It models the feature sequence. The input is a Transformer encoder block consisting of a cascaded multi-head self-attention layer and a feedforward network. The internal multi-head self-attention mechanism calculates the dot product correlation between any two time steps, deeply mining the long-range dependency features throughout the entire lifecycle of the hydrological nonlinear sequence, and outputting a refined deep temporal feature matrix. The details are as follows:
[0095] Multi-head self-attention capture: capturing feature sequences containing implicit positional encodings. The input is fed into the improved Transformer encoder block. First, the internal multi-head self-attention mechanism deeply captures the global long-range temporal dependencies across the entire sequence spanning long historical periods. The scaling dot product attention is calculated as follows:
[0096] ;
[0097] .
[0098] in, These are the query matrix, key matrix, and value matrix of the self-attention mechanism, respectively. These are the corresponding linear projection weight matrices; The total dimension of the network hidden layer is set to 256. The hidden dimension for a single attention head is set to , A scaling factor to prevent gradient saturation caused by excessively large dot product values.
[0099] One-dimensional convolutional feedforward replacement: Attention features are obtained by normalizing the self-attention matrix and connecting it to the residual. Then, it formally enters the one-dimensional convolutional feedforward network layer (1D-CNN FFN), replacing the original conventional positional feedforward neural network (FFN). The sliding window mechanism of one-dimensional convolution is used to capture local transient abrupt changes in the time series, and its calculation formula is shown below:
[0100] ;
[0101] in, This represents a one-dimensional convolution operation. For one-dimensional convolution kernel weights, The mapping weights and biases of the feedforward network are used to ultimately output the refined deep temporal feature matrix. .
[0102] Pooling and regression layers are used, along with global aggregation and joint multi-step regression output of inverse temporal features; the deep temporal feature matrix is processed. Global average pooling (GAP) is performed across the entire time axis to compress and eliminate high-frequency noise, extracting vectors representing the macroscopic features of the entire sequence. Finally, The input is fed into a fully connected regression output layer for linear projection mapping, and the target watershed is directly combined with the regression output in the future. Predicted runoff sequence at consecutive time steps The details are as follows:
[0103] Global average pooling: This method converts the deep temporal feature matrix into a single, continuous pooling matrix. The two-dimensional deep temporal feature matrix is fed into the global pooling layer. Mean dimensionality reduction is performed along the time window dimension, and mean compression is performed across the entire time axis to eliminate high-frequency random noise in hydrological observations and extract macroscopic comprehensive feature vectors. The calculation formula is shown below:
[0104] ;
[0105] in, Characteristic matrix exist The 256-dimensional feature vector at time step 1, and the output macroscopic feature vector. .
[0106] Joint regression multi-step prediction: The input is fed into a fully connected regression output layer for linear projection mapping, and the regression is directly combined to predict the target watershed in the future continuous Cross-sectional flow prediction sequence at each time step The calculation formula is shown below:
[0107] ;
[0108] in, and This represents the regression parameter matrix and bias vector of the output layer. The resulting multi-step prediction curve is shown below. Figure 5 and Figure 6 As shown, the trend is highly consistent with the actual observed values.
[0109] S4 uses a trained flood forecasting model to predict continuous runoff sequences for future forecast window data in the target watershed.
[0110] Conduct quantitative comparisons of experimental results and empirical verification of the effectiveness of beneficial technologies.
[0111] Comparative experiment on time generalization ability.
[0112] This embodiment underwent a rigorous evaluation of its time generalization capability on the full test set (test period from October 1, 2009 to September 30, 2011). The performance of the proposed Regional LSTM-Transformer was compared with that of baseline models (traditional single-basin LSTM, traditional single-basin GRU, standard LSTM-Transformer, and Handoff-LSTM). The actual quantitative data of various evaluation indicators (Nash efficiency coefficient NSE, root mean square error RMSE, mean absolute error MAE, and prediction bias) are accurately recorded in Table 2.
[0113] Table 2: Comparative experimental results of time generalization ability test.
[0114]
[0115] According to the measured data in Table 2, the proposed model (Regional LSTM-Transformer) performs excellently in the time generalization test, achieving an NSE of 0.9171. Furthermore, its MAE (0.0455) and Bias (0.0132) are significantly better than other comparative models, indicating extremely high overall prediction accuracy. It should be noted that the RMSE (0.1497) of this model is slightly lower than that of the traditional single-basin LSTM (0.1281), which is a reasonable reflection of the technical improvements in the Transformer encoder: because this method introduces a one-dimensional convolutional network (1D-CNN) to replace the position-wise feedforward neural network in the traditional encoder block, the model's sensitivity to local changes in meteorological and flow data is significantly enhanced. This adjustment allows the model to more clearly capture flow fluctuations on short timescales (such as...). Figure 6 As shown in the figure, this allows for more effective identification of potential sudden flood events. Although high-frequency sensitivity introduces slight fluctuations in the squared penalty error at a very few extreme points of variability, it greatly improves the ability to respond to extreme hydrological conditions.
[0116] Comparative experiment on cross-basin generalization ability.
[0117] To empirically demonstrate the effectiveness of the large model in solving spatial extrapolation of unseen watersheds, a cross-watershed generalization capability test was conducted, and the quantitative data are accurately recorded in Table 3.
[0118] Table 3: Comparative experimental results of cross-basin generalization ability test.
[0119]
[0120] As shown in Table 3, when faced with a novel cross-basin extrapolation task, the model of this method still maintains an extremely high NSE of 0.8954. Combined with... Figure 7 and Figure 8 The histogram analysis shows that the proposed model leads or holds a comparable position in average NSE across various watersheds. Particularly in categories 1, 2, and 6 (Southeast Coastal Region and Northwest Pacific Region), where precipitation is abundant, flow patterns are relatively stable due to precipitation-driven characteristics, allowing various models to learn hydrological features effectively. However, in the central region (categories 3, 4, and 5), with more complex hydrological features, sparse precipitation, and smaller flow fluctuations, the proposed model demonstrates significantly better results than other comparative models. This strongly supports the necessity of introducing 11-dimensional static watershed attribute information after dimensionality reduction as a spatiotemporal alignment beacon, helping large models successfully capture and adapt to the hydrological heterogeneity of different watersheds.
[0121] Conduct ablation experiments on the core improved components.
[0122] To further scientifically and quantitatively demonstrate the independent contributions of the two core improvements, "static watershed attribute injection" and "one-dimensional convolutional feedforward network replacement," this embodiment sets up three ablation variant models for testing under identical conditions:
[0123] Ablation Experiment 1 (without watershed attributes): Static watershed attribute inputs were removed to analyze the impact of watershed attributes on the model's generalization ability.
[0124] Ablation Experiment 2 (without one-dimensional convolution): Restore the feedforward neural network structure in the original Transformer encoder block to verify the effect of one-dimensional convolution on the model's ability to capture local patterns.
[0125] Ablation Experiment 3 (Basic LSTM-Transformer): The watershed attribute input and one-dimensional convolutional structure were simultaneously removed to serve as the most basic baseline model. The quantitative ablation results of temporal generalization and cross-watershed generalization tests are accurately recorded in Tables 4 and 5, respectively.
[0126] Table 4: Ablation test results for time generalization ability test.
[0127]
[0128] Table 5: Ablation test results of cross-basin generalization ability test.
[0129]
[0130] The technical mechanism of ablation data is analyzed in depth as follows:
[0131] Technical contribution of one-dimensional convolution to temporal pattern perception (see Tables 4 and 5): Comparing ablation experiment 2 (without one-dimensional convolution) and ablation experiment 3 (baseline model), it can be found that replacing the feedforward neural network in the Transformer encoder block with one-dimensional convolution significantly improves model performance. This indicates that one-dimensional convolution plays an important role in enhancing the model's ability to perceive local patterns in time series, significantly improving the model's generalization performance in the temporal dimension.
[0132] Technical Contribution of Watershed Attributes to Decoupling Spatial Heterogeneity (Key Evidence): Looking back at the cross-watershed generalization ability test (Table 5), it is clear that Ablation Experiment 2 (without one-dimensional convolution but retaining watershed attributes) performed significantly better than the baseline model (NSE reaching 0.8875). Comparing the complete scheme with Ablation Experiment 1 (without watershed attributes), when watershed attribute input was removed, the model's cross-watershed generalization NSE decreased from 0.8954 to 0.8688. This strongly demonstrates that in cross-watershed extrapolation tasks, due to the extremely strong spatial heterogeneity of the tested watersheds, the use of static watershed attributes substantially enhances the model's ability to model watershed spatial heterogeneity, and is the core underlying support determining the cross-spatial extrapolation and generalization topology capabilities of large regional models.
[0133] In summary, the technical roadmap for regional flood forecasting methods based on LSTM-Transformer and multimodal data fusion is as follows: Figure 9 As shown in the figure, this method first collects static attribute vectors, historical dynamic meteorological driving time-series matrices, and historical cross-sectional flow time-series matrices for each watershed within the target area. During the data alignment stage, the one-dimensional static underlying surface attribute vector is mapped to a fixed-dimensional attribute embedding vector through a fully connected layer. This embedding vector is then continuously and losslessly broadcast and copied along the time axis. Subsequently, it is concatenated with the normalized dynamic meteorological driving time-series matrix and the historical cross-sectional flow time-series matrix in the feature column dimension to construct a unified multimodal input feature tensor that decouples spatial heterogeneity. Next, the multimodal input feature tensor is fed into a Long Short-Term Memory (LSTM) network layer to perform time-step autoregressive recurrent gating computation, extracting primary short-term time-series features and outputting a feature sequence. The natural evolutionary order of its internal hidden states implicitly replaces the explicit sinusoidal positional encoding of the traditional Transformer. Subsequently, the feature sequence is input into the Transformer encoder block, where a multi-head self-attention mechanism deeply captures the long-distance temporal dependencies across long historical periods of the entire sequence, outputting a refined deep temporal feature matrix. Finally, in the feature aggregation layer, global average pooling (GAP) is performed on the deep temporal feature matrix across the entire time axis to compress and eliminate high-frequency random noise from hydrological observations and extract macroscopic comprehensive feature vectors. Through a feedforward mapping linear output layer and joint regression mapping, a continuous runoff prediction sequence for the target watershed within a set future prediction window is output. This invention effectively decouples the spatial heterogeneity technical bottleneck of large-scale cross-watershed collaborative training, significantly improving the temporal and spatial generalization accuracy of regional flood forecasting.
[0134] This method successfully resolves the conflicts arising from the mixed training of large models with cross-basin spatial heterogeneity. Traditional deep learning data-driven models for flood forecasting tend to build "local models" for single basins. When training a "regional general model" by directly mixing data from multiple basins with different geographical regions and underlying surface characteristics, the strong spatial heterogeneity in geometric slope, soil permeability, and multi-year climate backgrounds among the basins leads to severe update conflicts and gradient cancellation among neuron weights within the large model, resulting in a significant drop in overall prediction accuracy. This method, however, compresses and maps high-dimensional geophysical attribute vectors (static attributes) at the input through a fully connected layer, then broadcasts and replicates them along the time axis, concatenating them with dynamic meteorological and flow time-series data. This design forcibly injects the inherent physical codes of each basin as "spatial decoupling beacons" into the network, enabling the single model to adaptively adjust its internal parameter activation states based on static attributes, thus resolving spatial heterogeneity conflicts at the underlying level. In spatial generalization blind testing of ungauged basins with no historical flow data, the median Nash efficiency coefficient (NSE) can still reach as high as 0.762, demonstrating a strong ability to predict cross-spatial migration in undata-free basins.
[0135] This method avoids the distortion of the physical time series of hydrological variables caused by traditional absolute position encoding. It utilizes a single-layer LSTM to extract primary short-term features and leverages the natural chronological evolution of their hidden states along the time axis through autoregression to implicitly assign temporal position information to these features. This completely eliminates the need for the explicit overlay of sinusoidal absolute position encoding in traditional Transformers. It preserves the local continuity and strict chronological order of hydrological time series while avoiding the limitation of sinusoidal position encoding in adaptive extrapolation of long sequences. This results in an extremely high fitting accuracy of 0.814 in the time generalization test, achieving a median NSE of 0.814.
[0136] This method significantly improves the prediction accuracy of local extreme values such as sudden rainstorm peaks. While existing temporal network topologies (such as the standard Transformer) can effectively model long-distance dependencies, when directly transplanted to hydrological nonlinear modeling, their explicit sinusoidal absolute position encoding easily distorts the original physical spatial structure of hydrological variables. This results in insufficient sensitivity of the model to continuous and drastic fluctuations between local time steps and short-term evolution trends (such as the details of sudden rises and falls triggered by instantaneous rainstorms). Furthermore, conventional feedforward networks cannot perceive continuous pulse characteristics within the temporal neighborhood, leading to the persistent problem of smoothing or clipping in the prediction of the most crucial "peak value" in flood forecasting. This method creatively replaces the traditional fully connected feedforward layer (FFN) with a one-dimensional convolutional feedforward network (1D-CNN FFN) within the Transformer encoder block. Utilizing the unique temporal sliding window mechanism of one-dimensional convolution, it significantly enhances the model's ability to extract and perceive local abrupt changes such as local rainfall variability and instantaneous confluence caused by sudden heavy rainfall. Ablation experiment data show that after introducing 1D-CNN, the relative error of capturing sudden flood peak flow was significantly reduced from 9.8% to 4.2%, effectively overcoming the "peak shaving and smoothing" defects that are common in traditional deep learning flood forecasting models, and has extremely high practical value for short-term flood control early warning technology.
[0137] This method achieves strong resistance to noise from macroscopic features and robust stability in spatiotemporal multi-step generalization. At the end of the model, a global pooling layer (GAP) is used for compression and denoising along the time axis, effectively eliminating high-frequency random noise from hydrological sensor observations. This, combined with a fully connected regression layer, directly outputs the predicted runoff for the next 7 days. In large-sample mixed training scenarios involving multiple factors across watersheds, the overall bias is controlled within +0.89%, balancing local variability capture with convergence robustness in long-term global evolution.
[0138] like Figure 10 As shown, this invention also discloses a regional flood forecasting system based on LSTM-Transformer and multimodal data fusion, comprising:
[0139] The multimodal data acquisition module 1001 is used to acquire static watershed attribute vectors, historical dynamic meteorological driving time series matrices, and historical cross-sectional flow time series matrices of various heterogeneous watersheds within the target area.
[0140] The multimodal data unification module 1002 is used to perform multimodal spatiotemporal broadcast alignment and feature concatenation and splicing on the static watershed attribute vector, historical dynamic meteorological driving time series matrix and historical cross-sectional flow time series matrix to obtain multimodal time series input feature tensor;
[0141] The regional flood forecasting model construction module 1003 is used to construct a regional flood forecasting model and train it using multimodal temporal input feature tensors to obtain a trained regional flood forecasting model; the regional flood forecasting model includes an LSTM layer, a Transformer encoder, a pooling layer, and a regression layer;
[0142] The multimodal temporal input feature tensor is processed by an LSTM layer for short-term feature extraction to obtain a primary temporal feature sequence. The primary temporal feature sequence is then input into a Transformer encoder to capture long-distance temporal dependencies across long historical periods, resulting in a refined deep temporal feature matrix. The refined deep temporal feature matrix is then input into a pooling layer for global average pooling to eliminate high-frequency random noise from hydrological observations. Finally, a regression layer outputs a continuous runoff sequence for the target watershed.
[0143] The continuous runoff prediction module 1004 is used to predict the continuous runoff sequence of a target watershed using a trained flood forecasting model with a set prediction window of data.
[0144] The specific implementation of the regional flood forecasting system based on LSTM-Transformer and multimodal data fusion is the same as that of the regional flood forecasting method based on LSTM-Transformer and multimodal data fusion, and will not be described again in this embodiment.
[0145] The above are merely specific embodiments of the present invention, but the design concept of the present invention is not limited thereto. Any non-substantial modifications made to the present invention using this concept shall be considered as infringing upon the protection scope of the present invention.
Claims
1. A regional flood forecasting method based on LSTM-Transformer and multi-modal data fusion, characterized in that, Includes the following steps: S1, collect the static watershed attribute vectors, historical dynamic meteorological driving time series matrix, and historical cross-sectional flow time series matrix of each heterogeneous watershed in the target area; S2, the static watershed attribute vector, the historical dynamic meteorological driving time series matrix, and the historical cross-sectional flow time series matrix are aligned and concatenated in a multimodal spatiotemporal broadcast to obtain a multimodal time series input feature tensor; S3. Construct a regional flood forecasting model and train it using a multimodal temporal input feature tensor to obtain a trained regional flood forecasting model; the regional flood forecasting model includes an LSTM layer, a Transformer encoder, a pooling layer, and a regression layer; The multimodal temporal input feature tensor is processed by an LSTM layer for short-term feature extraction to obtain a primary temporal feature sequence. The primary temporal feature sequence is then input into a Transformer encoder to capture long-distance temporal dependencies across long historical periods, resulting in a refined deep temporal feature matrix. The refined deep temporal feature matrix is then input into a pooling layer for global average pooling to eliminate high-frequency random noise from hydrological observations. Finally, a regression layer outputs a continuous runoff sequence for the target watershed. S4 uses a trained flood forecasting model to predict continuous runoff sequences for future forecast window data in the target watershed.
2. The regional flood forecasting method based on LSTM-Transformer and multi-modal data fusion according to claim 1, characterized in that, The static watershed attribute vector consists of fixed underlying surface geographic, physical, and soil characteristics that do not change over time, specifically including: watershed control area, average elevation, average slope, soil clay ratio, soil sand ratio, total soil depth, multi-year average precipitation, multi-year average potential evapotranspiration, climate host index, forest coverage, maximum and minimum green leaf area index.
3. The regional flood forecasting method based on LSTM-Transformer and multi-modal data fusion according to claim 1, characterized in that, The static watershed attribute vector, historical dynamic meteorological driving time series matrix, and historical cross-sectional flow time series matrix are subjected to multimodal spatiotemporal broadcast alignment and feature concatenation to obtain a multimodal time series input feature tensor; Specifically as follows: Dimensionless cleaning was performed on the static watershed attribute vector, the historical dynamic meteorological driving time series matrix, and the historical cross-sectional flow time series matrix. The dimensionless cleaned static watershed attribute vector is input into the attribute fully connected layer for dimension reduction and linear projection, and then transformed into an attribute embedding vector with high representation intensity. The attribute embedding vector is continuously broadcast and copied several times along the row time axis, and expanded into a two-dimensional static attribute embedding matrix with the same number of rows as the time series matrix. The two-dimensional static attribute embedding matrix, the dimensionless cleaned historical dynamic meteorological driving time series matrix, and the dimensionless cleaned historical cross-sectional flow time series matrix are horizontally concatenated according to the feature column dimension to construct a multimodal time series input tensor that decouples spatial heterogeneity.
4. The regional flood forecasting method based on LSTM-Transformer and multi-modal data fusion according to claim 3, characterized in that, The dimensionless cleaning process employs the Z-Score normalization algorithm.
5. The regional flood forecasting method based on LSTM-Transformer and multi-modal data fusion according to claim 1, characterized in that, The LSTM layer employs implicit encoding of positional information, specifically implemented as follows: at each time step of the LSTM layer... The internal gated autoregressive recursive calculation process is expressed as follows: ; ; ; ; ; ; in, For multimodal temporal input tensors exist The input vector at time step; , and These are the activation vectors for the forget gate, input gate, and output gate, respectively. This represents the candidate cell state vector; Let be the cell state vector. for Cell state vector at time step; Let this be the hidden state vector at the current time step. for The hidden state vector at each time step; , , and The weight matrix is trainable. , , and It is the bias vector; Use the Sigmoid activation function; It is the hyperbolic tangent activation function; The Hadamard product operator is used to multiply elements by their corresponding positions. For splicing operations; The primary time sequence feature sequence output by the LSTM layer on the full time axis is .
6. The regional flood forecasting method based on LSTM-Transformer and multi-modal data fusion according to claim 1, characterized in that, The Transformer encoder block is specifically implemented as follows: The primary time series feature sequence is deeply captured by the internal multi-head self-attention mechanism to capture the global long-range temporal dependency correlation of the entire sequence across long historical periods, and the self-attention matrix is obtained. The attention features are obtained by normalizing the self-attention matrix and connecting it with the residual. These features are then input into a one-dimensional convolutional feedforward network layer to obtain a refined deep temporal feature matrix. express for: ; in, This is the refined deep temporal feature matrix; For activation functions; This is a one-dimensional convolution operation; For attention features, These are one-dimensional convolution kernel weights; These are the mapping weights of the feedforward network; and This is the bias of the feedforward network.
7. The regional flood forecasting method based on LSTM-Transformer and multi-modal data fusion according to claim 6, characterized in that, The process of deeply capturing the global long-range temporal dependencies across long historical periods of the entire sequence using an internal multi-head self-attention mechanism is described as follows: ; ; in, Represents the self-attention matrix; , and These are the query matrix, key matrix, and value matrix of the self-attention mechanism, respectively. This represents the softmax function; Indicates transpose; They are respectively , and The corresponding linear projection weight matrix; The hidden dimension for a single attention head; This is a primary time-series feature sequence.
8. A regional flood forecasting system based on LSTM-Transformer and multi-modal data fusion, characterized in that, Including the following: The multimodal data acquisition module is used to collect static watershed attribute vectors, historical dynamic meteorological driving time series matrices, and historical cross-sectional flow time series matrices of various heterogeneous watersheds within the target area. The multimodal data unification module is used to perform multimodal spatiotemporal broadcast alignment and feature concatenation and splicing of static watershed attribute vectors, historical dynamic meteorological driving time series matrices, and historical cross-sectional flow time series matrices to obtain multimodal time series input feature tensors; The regional flood forecasting model construction module is used to construct a regional flood forecasting model and train it using multimodal temporal input feature tensors to obtain a trained regional flood forecasting model; the regional flood forecasting model includes an LSTM layer, a Transformer encoder, a pooling layer, and a regression layer; The multimodal temporal input feature tensor is processed by an LSTM layer for short-term feature extraction to obtain a primary temporal feature sequence. The primary temporal feature sequence is then input into a Transformer encoder to capture long-distance temporal dependencies across long historical periods, resulting in a refined deep temporal feature matrix. The refined deep temporal feature matrix is then input into a pooling layer for global average pooling to eliminate high-frequency random noise from hydrological observations. Finally, a regression layer outputs a continuous runoff sequence for the target watershed. The continuous runoff prediction module is used to predict continuous runoff sequences for a target watershed using a trained flood forecasting model with a predefined forecast window of data.