A flood type prediction method based on graph convolutional Transformer
Through the method based on graph convolution Transformer, a flood map and heavy rain map of the entire basin are constructed, and a graph convolution neural network and Transformer are used to capture space-time features, which solves the limitations of traditional flood classification methods, realizes dynamic intelligent prediction of flood types, and provides a scientific basis for judging flood types.
Patent Information
- Application Number
- CN202510743849.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-05
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2045-06-05
AI Technical Summary
The traditional flood classification method is limited to a single hydrological station, cannot represent the situation of the entire basin, and is easily disturbed by local factors, making it difficult to systematically characterize the unique laws of various types of floods, resulting in low utilization of historical flood information and insufficient regular excavation.
The method based on graph convolution Transformer is adopted to construct rainstorm diagrams and flood diagrams from the perspective of the entire basin. The graph convolution neural network is used to extract features, combine Transformer to capture spatiotemporal features, and optimize cluster counts through K-means clustering and elbow law to achieve intelligent prediction of flood type.
Dynamic intelligent prediction of flood types in the basin is realized, and the data of hydrological stations and rainfall stations are fully utilized to reflect the nonlinear response relationship between rainfall and runoff, and provide scientific basis for judging flood types, providing support for water resource management and disaster prevention and mitigation decisions.
Smart Images

Figure CN120257061B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of flood classification technology, and specifically to a flood type prediction method based on graph convolutional Transformer. Background Art
[0002] Flood processes are influenced by multiple factors, including climate, topography, and human activities, exhibiting significant temporal and spatial variability. Flood characteristics (such as rise and fall rates, peak forms, and duration) often vary significantly across different river basins and seasons. This diversity makes it difficult for traditional analytical methods to systematically characterize the unique patterns of various flood types, resulting in low utilization of historical flood information and inadequate pattern discovery.
[0003] To address this issue, flood classification methods have emerged. Based on the similarities in the characteristics of rainstorm floods, flood classification categorizes historical floods into several types. By analyzing the formation mechanisms and evolution patterns of various flood types, a classification system is established. Based on this, by real-time monitoring of indicators such as rainfall and soil moisture, combined with machine learning algorithms, rapid identification and prediction of emerging flood types are achieved. Flood classification and flood type prediction methods not only reveal the inherent laws of floods but also provide a scientific basis for flood evolution simulation and risk assessment, possessing significant application value in water resources management and disaster prevention and mitigation.
[0004] Traditional flood classification methods are limited to the classification of floods measured at a single hydrological station. The flood characteristics of a single hydrological station cannot represent the situation in other areas of the entire basin, and cannot show the overall picture of floods in the entire basin. In addition, the measured data of a single hydrological station are easily interfered with by local special factors. Summary of the Invention
[0005] The purpose of this invention is to provide a flood type prediction method based on graph convolutional Transformer to judge the overall flood occurrence and flood type from the perspective of the entire basin.
[0006] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0007] A flood type prediction method based on graph convolutional Transformer, the steps of which include:
[0008] Heavy rain events and flood events were extracted based on the flow and precipitation data observed by the hydrological stations in the study area. Specifically, a single rain gauge with a 24-hour observed precipitation greater than 50 mm or a 12-hour observed precipitation greater than 30 mm was considered a heavy rain event. A single hydrological station with a measured flow greater than 100 m 3 / s is considered a flood event. Among them, the occurrence time and correlation of heavy rain events observed by rain gauges and flood events measured by hydrological stations are analyzed. If a corresponding flood event occurs after a heavy rain event, it is considered a valid heavy rain event; if a heavy rain event does not occur after a corresponding flood event, it is not included in the heavy rain event statistics.
[0009] A rainstorm map and a flood map are constructed based on rainstorm events and flood events, respectively. The node features of the flood map are the statistical characteristic index values of the flood measured by the hydrological station corresponding to the node in this flood event. One flood map corresponds to one flood event, and the multi-dimensional features of the flood map are directly extracted to represent the spatiotemporal characteristics of the flood.
[0010] The node features of a rainstorm map are the precipitation (dynamic features) and land use and slope (static features) of the grid where the node is located. One rainstorm map corresponds to one time step.
[0011] For example, a rainstorm event starts at 8 am and lasts until 11 am. If the time step is 1 hour, there are 3 time steps, corresponding to 3 rainstorm maps. The features of these 3 rainstorm maps are extracted to obtain 3 sets of multidimensional features, which are composed of feature sequences in chronological order to represent the spatiotemporal characteristics of the rainstorm.
[0012] A graph convolutional neural network with an attention mechanism is used to extract comprehensive features of the flood map. The elbow rule is used to determine the optimal number of clusters for multiple comprehensive features. The K-means clustering method is then used to classify floods and obtain the corresponding flood types.
[0013] A graph convolutional neural network with an attention mechanism is used to extract the dynamic features of rainstorm images. The temporal dependencies of these dynamic features are captured through the Transformer, and the spatiotemporal features of the rainstorm are obtained after aggregation.
[0014] All the spatiotemporal characteristics of rainstorms are divided into training sets and validation sets. The flood types are used as supervision signals to learn the relationship between the spatiotemporal characteristics of rainstorms and flood types, and train a flood type prediction model.
[0015] Use the trained flood type prediction model to predict flood types.
[0016] According to the above technical solution, the rainstorm map construction step includes:
[0017] The watershed of the study area is discretized into 1km×1km grids, with the watershed grids as nodes, the precipitation process of the grid rainstorm event as the dynamic characteristics of the nodes, and the land use degree and slope of the grid as the static characteristics of the rainstorm map nodes;
[0018] The inverse distance weighted method is used to interpolate the precipitation at the rain gauge station to each grid to obtain the precipitation characteristic value of the node. The interpolation formula is:
[0019] ;
[0020] Where, Points to be interpolated The predicted value of is a known sample point i, is the number of nearest neighbors, express The observed value at .
[0021] is the interpolation weight, and the calculation formula is as follows:
[0022] ;
[0023] Where, is the Euclidean distance between the point to be interpolated and the known sample point, is the power parameter.
[0024] Based on the flow direction relationship between grids, directed edges between rainstorm map nodes are established to construct a rainstorm map.
[0025] Specifically, the D8 flow direction method is used to determine the flow direction of the raster. The D8 direction type outputs an integer raster with a value ranging from 1 to 255. For example, if the steepest descent direction is to the left of the current processing raster, the flow direction value of the processing raster is 16.
[0026] According to the above technical solution, the flood map construction step includes:
[0027] Taking the hydrological stations as nodes, the characteristic values of the flood events measured at the hydrological stations are used as the node features of the flood graph; the characteristic values of the measured flood events include peak flow, flood duration, total flood volume, maximum 1-hour total flood volume and maximum 3-hour total flood volume;
[0028] Based on the water system topological relationship between hydrological stations, directed edges between flood graph nodes are established to construct the flood graph.
[0029] Among them, the peak flow :
[0030] ;
[0031] Flood duration :
[0032] ;
[0033] Total flood volume :
[0034] ;
[0035] Maximum 1h flood volume :
[0036] ;
[0037] Maximum 3-hour flood volume :
[0038] ;
[0039] in, represents the flow sequence of this flood event, Indicates the start time of the flood event, Indicates the end time of the flood event, represents the flow rate at the i-th moment, represents the flow at the i+1th moment, Indicates the flow observation interval.
[0040] According to the above technical solution, the flood type determination step includes:
[0041] Collect the characteristic data of all flood events and all nodes in the flood map, independently calculate the mean and standard deviation of each characteristic dimension of all nodes, and then perform Z-score normalization processing on each dimension. Taking the node characteristic peak flow as an example, the peak flow of all nodes is normalized.
[0042] Based on the standardized feature data of flood events and nodes, a graph convolutional neural network with attention mechanism is used to capture the spatial relationship between flood events. The neighbor features are weighted and aggregated using attention weights to obtain the multi-dimensional features of each node.
[0043] The multi-dimensional features of all nodes are input into the global average pool to obtain the comprehensive features of the entire flood map;
[0044] ;
[0045] Where, is the number of nodes in the flood graph, For the The node in The eigenvalue of dimension, Flood map dimensional global graph-level features.
[0046] The core idea of determining the optimal number of clusters based on the elbow rule is to observe the changing trend of the clustering error SSE as the K value increases and to find the "inflection point" (i.e., the "elbow"). The calculation formula is as follows:
[0047] ;
[0048] in, Representative clusters, Indicates the The centroid of the cluster, Representing multi-dimensional global graph-level features for a single flood map.
[0049] Based on the optimal number of clusters determined by the elbow rule, the K-means clustering method is used to cluster the comprehensive features of multiple flood maps. The clustering results are used as the flood type classification results to determine the flood type.
[0050] The feature representation of nodes in the graph convolutional neural network with attention mechanism is similar to that of nodes in ordinary graph neural networks. Both use embedding to vectorize the feature representation of nodes, and the initial input is also a combination of the features of each node. The initial input is expressed as: ;in is the input feature of node z, represents a feature combination, represents the input features of node 1, represents the input features of node 2, Representation node The input features of is the dimension of node features in the graph structure.
[0051] After inputting the features of the nodes in the graph, the graph convolutional neural network considering the attention mechanism is operated. and neighbors , first calculate the attention score : ;
[0052] Where, Representation node The input features of Indicates neighbors The input features of is the learnable weight matrix (feature transformation), is the learnable attention vector, Vector stitching.
[0053] Node-based and neighbors By calculating the attention score, normalizing the attention weight and weightedly aggregating the neighbor features, we can obtain the multi-dimensional features of each node:
[0054] ;
[0055] ;
[0056] Where, Representation node The attention weight, Representation node The output features of the graph convolutional neural network, is the activation function (such as ReLU), Representation node The set of all neighbors j, .
[0057] According to the above technical solution, the step of obtaining comprehensive features of the entire rainstorm map includes:
[0058] A rainstorm event is divided into multiple time-step rainstorm maps according to the time step length. The graph data structure of each rainstorm map is consistent. The static features of the node features include slope and land use degree, and the dynamic features are the precipitation in the corresponding time step.
[0059] Collecting the characteristic data of all rainstorm events and all nodes in the rainstorm map, independently calculating the mean and standard deviation of each characteristic dimension of all nodes and then performing standardization processing;
[0060] A graph convolutional neural network with attention mechanism is used to capture the spatial distribution characteristics of watershed precipitation and water exchange patterns of standardized rainstorm maps at multiple time steps, and the dynamic characteristics of the rainstorm map at each node are obtained.
[0061] Transformer is used to process the dynamic features of each node in the rainstorm map, and multi-dimensional features containing spatiotemporal fusion information are obtained for each node in the rainstorm map.
[0062] Based on the multidimensional features of all nodes in the rainstorm graph, the attention graph pooling method is used to obtain the spatiotemporal characteristics of rainstorms in multiple time steps of a single rainstorm event.
[0063] Among them, the importance of learning nodes in the attention graph pooling is achieved through the fully connected layer network and Tanh activation. The mathematical expression is as follows:
[0064] ;
[0065] in, and are the parameters of the first fully connected layer, is the hyperbolic tangent activation function, and are the parameters of the second fully connected layer, represents the raw attention score of node i.
[0066] Then the attention scores of all nodes are normalized by the softmax function:
[0067] ;
[0068] Finally, we get the spatiotemporal characteristics of heavy rain :
[0069] ;
[0070] Where, represents the raw attention score of node i, represents the final attention score of node i, represents the graph convolutional neural network output features of node i, Indicates the number of nodes in the rainstorm graph.
[0071] According to the above technical solution, a fixed random seed is used to ensure that the division results of the training set and the verification set are consistent each time, and the distribution of flood types in the training set and the verification set are the same.
[0072] According to the above technical solution, the flood type label is used as a supervisory signal, and the Adam optimizer is used to perform multi-layer perceptron classification training. During each training, the error between the prediction result of the flood type prediction model and the actual flood type is calculated, and the parameters of the flood type prediction model are adjusted according to the error.
[0073] The loss values and evaluation indicators of the training set and validation set during the entire flood type prediction model training process are recorded in real time, and the model parameters with the best performance in the validation set are obtained as the final flood type prediction model parameters.
[0074] According to the above technical solution, the loss function in the Adam optimizer training process is the cross entropy loss function. Calculation formula:
[0075] ;
[0076] Where, is the number of categories, It is The true labels of the categories, The model is The predicted probability of each category.
[0077] According to the above technical solution, the evaluation index :
[0078] ;
[0079] in, is the total number of samples, For the model The predicted category of samples, For the The predicted category of samples, It is an indicator function that returns 1 when the flood type label matches and 0 otherwise.
[0080] Compared with the prior art, the present invention has the following beneficial effects:
[0081] 1. The present invention makes full use of the observation data of various hydrological stations and rain gauges in the basin, as well as the underlying surface characteristic data, and to a certain extent takes into account the spatial distribution map characteristics of the underlying surface and the spatiotemporal evolution characteristics of rainstorms and floods.
[0082] 2. The present invention uses a graph data structure to characterize the rainstorm and flood process, realizing the synchronous capture and deep integration of the spatiotemporal characteristics of rainstorm and flood. Compared with traditional classification methods, it can better reflect the nonlinear response relationship between rainfall and runoff in the basin.
[0083] 3. The present invention optimizes the number of clusters through the elbow rule, avoiding the subjectivity of manually setting the number of classifications, and pushing flood classification from static statistics to dynamic intelligent prediction, providing a new technical paradigm for smart water conservancy construction.
[0084] 4. This invention uses graph data structures to characterize rainstorm and flood processes. Using flood type as a supervisory signal, it learns the relationship between the comprehensive features of the entire rainstorm map and flood type to perform flood classification. This flood classification and flood type prediction process comprehensively considers the spatiotemporal characteristics of rainstorms and floods, enabling comprehensive assessment of flood occurrence and type from a basin-wide perspective. This provides a more scientific basis for decision-making in basin water resource management and flood prevention and mitigation. BRIEF DESCRIPTION OF THE DRAWINGS
[0085] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0086] Figure 1 This is a flowchart of the steps of a flood type prediction method based on graph convolutional Transformer in the present invention;
[0087] Figure 2 is a graph showing the optimal clustering result of the elbow rule in the embodiment;
[0088] Figure 3 This is a comparison chart of different types of flood characteristics of the example. DETAILED DESCRIPTION
[0089] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0090] Taking the Yiluo River Basin, a tributary of the middle reaches of the Yellow River, as an example, the flow and precipitation data used are flood element extracts from 15 hydrological stations in the Yiluo River Basin and precipitation extracts from 135 rain gauges, with a time range of 2020-2024. The present invention proposes a flood type prediction method based on graph convolutional Transformer to predict flood types. The specific steps are ( Figure 1 )include:
[0091] S1. Extract rainstorm events and flood events based on the flow and precipitation data observed by the hydrological stations in the study area. Specifically, the measured flow of a single hydrological station is greater than 100m 3 A flood event is considered to have occurred if the total precipitation observed at a single rain gauge station exceeds 50 mm in 24 hours or 30 mm in 12 hours. The timing and correlation between rainstorm events observed at rain gauges and flood events measured at hydrological stations are analyzed. If a rainstorm event is followed by a corresponding flood event, it is considered a valid rainstorm event. If a rainstorm event is not followed by a corresponding flood event, it is not counted in the rainstorm event statistics. Statistics show that there were 26 rainstorm flood events in the Yiluo River basin, a tributary of the middle reaches of the Yellow River.
[0092] S2. Construct a rainstorm map and a flood map based on rainstorm events and flood events, respectively. Construct 26 flood maps based on the 26 rainstorm and flood events.
[0093] S2a. The construction steps of the rainstorm map specifically include: discretizing the watershed into 1km×1km grids, using the watershed grids as nodes, using IDW to interpolate the precipitation at the rain gauge stations to each grid, and obtaining the precipitation characteristic value of the node. The precipitation process of the grid rainstorm event is used as the dynamic feature of the node, and the land use degree and slope of the grid are used as the static features of the rainstorm map nodes.
[0094] Determines the flow direction of a raster using the D8 flow method. The D8 direction type outputs an integer raster with values ranging from 1 to 255. For example, if the direction of steepest descent is to the left of the processing raster, the flow direction value for that processing raster is 16.
[0095] Based on the flow direction relationship between grids, directed edges between rainstorm map nodes are established to construct a rainstorm map.
[0096] Among them, the interpolation formula for interpolating the precipitation at the rain gauge station to each grid using IDW is:
[0097] ;
[0098] Where, is the predicted value of the point to be interpolated, is the value of the known sample point, is the number of nearest neighbors, is the interpolation weight, and the calculation formula is as follows:
[0099] ;
[0100] Where, is the Euclidean distance between the point to be interpolated and the known sample point, is the power parameter. Among them, the number of nearest neighbors Sum power parameter The values of are 10 and 2 respectively.
[0101] The land use degree is expressed by the comprehensive land use index, and the calculation formula is as follows:
[0102] ;
[0103] in, is the comprehensive index of land use degree in the study area; is the land use classification index of level i; is the proportion of land use area in the i-th level. Land use types are divided into four levels according to the degree of land development and utilization by human activities: unused land (index 1), forest, grassland, and water land (index 2), agricultural land (index 3), and urban settlement land (index 4).
[0104] The slope can be calculated using ArcGIS based on the DEM using the third-order finite difference (3 × 3 window) method.
[0105] S2b, the flood map construction step specifically includes: taking the hydrological stations as nodes, and using the characteristic values of the flood events measured at the hydrological stations as the node features of the flood map; the characteristic values of the measured flood events include the peak flow, flood duration, total flood volume, maximum 1-hour total flood volume, and maximum 3-hour total flood volume;
[0106] Based on the water system topological relationship between hydrological stations, directed edges between flood graph nodes are established to construct the flood graph.
[0107] S3. Graph Convolutional Neural Network (GAT) with attention mechanism is used to extract comprehensive features of the flood maps. The elbow rule is used to determine the optimal number of clusters for the 26 comprehensive features. K-means clustering is then used to classify floods and obtain the corresponding flood types. The specific steps include:
[0108] S3a, collecting feature data of all flood events and all nodes in the flood map, independently calculating the mean and standard deviation of each feature column, and then performing Z-score normalization processing on each feature column;
[0109] S3b. Based on the standardized feature data of flood events and nodes, a graph convolutional neural network with attention mechanism is used to capture the spatial relationship between flood events, and the neighbor features are weighted and aggregated with attention weights to obtain the multi-dimensional features of each node.
[0110] Specifically: The feature representation of flood graph nodes in the graph convolutional neural network considering the attention mechanism is similar to the feature representation of nodes in ordinary graph neural networks. Both use embedding to vectorize the feature representation of nodes, and their initial input is also a combination of the features of each node.
[0111] After inputting the features of the nodes in the flood graph, operations are performed inside the graph convolutional neural network considering the attention mechanism. and neighbors ,First, calculate the attention score;
[0112] According to the node The multi-dimensional features of each node can be obtained by normalizing the attention weights and weightedly aggregating the neighbor features.
[0113] S3c, input the multi-dimensional features of all nodes into the global average pool to obtain the comprehensive features of the entire flood graph;
[0114] S3d. Determine the optimal number of clusters based on the elbow rule. The core idea is to observe the changing trend of the clustering error SSE as the K value increases and find the "inflection point" (i.e., "elbow"). The calculation formula is as follows:
[0115] ;
[0116] in, Representative clusters, Indicates the The centroid of the cluster, Showing the multi-dimensional global graph-level features of a single flood map.
[0117] S3e, based on the optimal number of clusters determined by the elbow rule, the K-means clustering method is used to cluster the comprehensive features of multiple flood maps. The clustering results are used as the flood type classification results to determine the flood type. The optimal number of clusters determined by the elbow rule for the 26 comprehensive features of the full map is 3. The comparison of the flood feature distribution of the three different types of floods is shown in Figure 3 , it can be seen that the characteristics of the three types of floods in the Yiluo River are as follows:
[0118] (1) Category 0 flood: short-term heavy rainfall flood with high peak value but short duration, caused by local heavy rain in summer.
[0119] (2) Category 1 flood: The peak flow is high and the duration is long, caused by continuous precipitation (heavy rain combined with previous soil moist conditions) or extreme precipitation events.
[0120] (3) Category 2 flood: long-term continuous flood, with large total volume and long duration, but low peak and short-term water volume, caused by continuous rain in autumn.
[0121] S4. Graph convolutional neural network with attention mechanism is used to extract dynamic features of rainstorm images, and Transformer is used to capture the temporal dependency of dynamic features of rainstorm images. After aggregation, spatiotemporal features of rainstorm are obtained. Specifically,
[0122] A rainstorm event is divided into multiple time-step rainstorm maps according to the time step length. The graph data structure of each rainstorm map is consistent. The static features of the node features include slope and land use degree, and the dynamic features are the precipitation in the corresponding time step.
[0123] A graph convolutional neural network with attention mechanism is used to capture the spatial distribution characteristics of watershed precipitation and water exchange patterns of rainstorm maps at multiple time steps, and the dynamic characteristics of the rainstorm map at each node are obtained.
[0124] Transformer is used to process the dynamic features of each node in the rainstorm map, and multi-dimensional features containing spatiotemporal fusion information are obtained for each node in the rainstorm map.
[0125] Based on the multidimensional features of all nodes in the rainstorm graph, the attention graph pooling method is used to obtain the spatiotemporal characteristics of a single rainstorm event at multiple time steps. In the attention graph pooling, the node importance is learned through a two-layer network and Tanh activation. The attention scores of all nodes are normalized by the softmax function to finally obtain the spatiotemporal characteristics of the rainstorm.
[0126] S5. Divide all the spatiotemporal characteristics of the rainstorm into training and validation sets based on the proportion of flood types, with the training set and validation set split at a ratio of 80% to 20%. Using flood type as the supervisory signal, use the Adam optimizer to train a multilayer perceptron classification model to learn the association between the spatiotemporal characteristics of the rainstorm and flood type, and train a flood type prediction model. Calculate the error between the model's prediction and the actual flood type during each training session, and adjust the flood type prediction model parameters based on this error.
[0127] The loss function during Adam optimizer training is the cross entropy loss function, the cross entropy loss function Calculation formula:
[0128] ;
[0129] Where, is the number of categories, It is The true labels of the categories, The model is The predicted probability of each category.
[0130] The loss values and evaluation indicators of the training set and validation set during the entire flood type prediction model training process are recorded in real time, and the model parameters with the best performance in the validation set are obtained as the final flood type prediction model parameters.
[0131] Among them, the evaluation indicators :
[0132] ;
[0133] in, is the total number of samples, For the model The predicted category of samples, For the The predicted category of samples, It is an indicator function that returns 1 when the flood type label matches and 0 otherwise.
[0134] S6. Use the trained flood type prediction model to predict the flood type in the Yiluo River basin, a tributary of the middle reaches of the Yellow River.
[0135] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus.
[0136] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art will be able to modify the technical solutions described in the aforementioned embodiments or substitute equivalents for some of the technical features. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention shall be included within the scope of protection of the present invention.
Claims
1. A flood type prediction method based on graph convolutional Transformer, characterized by: The steps include: Heavy rain events and flood events were extracted based on the flow and precipitation data observed at the rain gauges of the hydrological stations in the study area; Constructing a rainstorm map and a flood map according to rainstorm events and flood events respectively; the rainstorm map construction step includes: The watershed of the study area is discretized into grids, with the watershed grids as nodes. The precipitation at the rain gauge station is interpolated to each grid using IDW to obtain the precipitation characteristic value of the node. The precipitation process of the grid rainstorm event is the dynamic characteristic of the rainstorm map node, and the land use degree and slope of the grid are the static characteristics of the rainstorm map node. The D8 flow direction method is used to determine the flow direction of the grid. Based on the flow direction relationship between grids, the directed edges between the nodes of the rainstorm map are established to construct the rainstorm map. The flood map construction step includes: Taking the hydrological stations as nodes, the characteristic values of the flood events measured at the hydrological stations are used as the node features of the flood graph; the characteristic values of the measured flood events include peak flow, flood duration, total flood volume, maximum 1-hour total flood volume and maximum 3-hour total flood volume; Based on the water system topology between hydrological stations, the directed edges between the nodes of the flood graph are established to construct the flood graph; A graph convolutional neural network with an attention mechanism is used to extract comprehensive features of the flood map. The elbow rule is used to determine the optimal number of clusters for multiple comprehensive features. The K-means clustering method is then used to classify floods and obtain the corresponding flood types. A graph convolutional neural network with an attention mechanism is used to extract the dynamic features of rainstorm images. The temporal dependencies of these dynamic features are captured through the Transformer, and the spatiotemporal features of the rainstorm are obtained after aggregation. All the spatiotemporal characteristics of rainstorms are divided into training sets and validation sets. The flood types are used as supervision signals to learn the relationship between the spatiotemporal characteristics of rainstorms and flood types, and train a flood type prediction model. Use the trained flood type prediction model to predict flood types.
2. A flood type prediction method based on graph convolutional Transformer according to claim 1, characterized in that: The flood type determination step comprises: Collecting the characteristic data of all flood events and all nodes in the flood map, independently calculating the mean and standard deviation of each characteristic dimension of all nodes and then performing standardization processing; Based on the standardized feature data of flood events and nodes, a graph convolutional neural network with attention mechanism is used to capture the spatial relationship between flood events. The neighbor features are weighted and aggregated using attention weights to obtain the multi-dimensional features of each node. The multi-dimensional features of all nodes are input into the global average pool to obtain the comprehensive features of the entire flood map; Determine the optimal number of clusters based on the elbow rule; Based on the optimal number of clusters determined by the elbow rule, the K-means clustering method is used to cluster the comprehensive features of multiple flood maps. The clustering results are used as the flood type classification results to determine the flood type.
3. The flood type prediction method based on graph convolutional Transformer according to claim 1 is characterized in that: The step of obtaining comprehensive features of the entire rainstorm map includes: A rainstorm event is divided into multiple time-step rainstorm maps according to the time step length. The graph data structure of each rainstorm map is consistent. The static features of the node features include slope and land use degree, and the dynamic features are the precipitation in the corresponding time step. Collecting the characteristic data of all rainstorm events and all nodes in the rainstorm map, independently calculating the mean and standard deviation of each characteristic dimension of all nodes and then performing standardization processing; A graph convolutional neural network with attention mechanism is used to capture the spatial distribution characteristics of watershed precipitation and water exchange patterns of standardized rainstorm maps at multiple time steps, and the dynamic characteristics of the rainstorm map at each node are obtained. Transformer is used to process the dynamic features of each node in the rainstorm map, and multi-dimensional features containing spatiotemporal fusion information are obtained for each node in the rainstorm map. Based on the multidimensional features of all nodes in the rainstorm graph, the attention graph pooling method is used to obtain the spatiotemporal characteristics of rainstorms in multiple time steps of a single rainstorm event.
4. The flood type prediction method based on graph convolutional Transformer according to claim 1 is characterized in that: A fixed random seed is used to ensure that the division results of the training set and the validation set are consistent each time, and the distribution of flood types in the training set and the validation set are the same.
5. The flood type prediction method based on graph convolutional Transformer according to claim 1 is characterized in that: Using the flood type label as a supervisory signal, the Adam optimizer is used to perform multi-layer perceptron classification training. During each training, the error between the prediction result of the flood type prediction model and the actual flood type is calculated, and the parameters of the flood type prediction model are adjusted according to the error. The loss values and evaluation indicators of the training set and validation set during the entire flood type prediction model training process are recorded in real time, and the model parameters with the best performance in the validation set are obtained as the final flood type prediction model parameters.
6. A flood type prediction method based on graph convolutional Transformer according to claim 5, characterized in that: The loss function in the Adam optimizer training process is the cross entropy loss function. Calculation formula: ; Where, is the number of categories, It is The true labels of the categories, The model is The predicted probability of each category.
7. The flood type prediction method based on graph convolutional Transformer according to claim 5 is characterized in that: The evaluation metrics : ; in, is the total number of samples, For the model The predicted category of samples, For the The predicted category of samples, It is an indicator function that returns 1 when the flood type label matches and 0 otherwise.
Citation Information
Patent Citations
Regional possible maximum rainfall determination method for mountain torrent ditch basin
CN116070955A
Urban rainstorm flood risk assessment method, system, equipment and medium
CN119831339A