A flood classification method based on graph attention neural network
Through a flood classification method based on a graph attention neural network, a spatial correlation matrix of hydrological stations within the basin is constructed, and graph-level features of flood events are extracted. This solves the problem that flood classification methods in existing technologies are difficult to reflect the spatial heterogeneity within the basin, and achieves more accurate flood disaster prediction and response.
Patent Information
- Application Number
- CN202510878304.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-27
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2045-06-27
AI Technical Summary
Existing flood classification methods mainly rely on single-point measured data from basin outlet control stations, which cannot effectively reflect the spatial heterogeneity of flood processes within the basin, resulting in insufficient flood disaster prediction accuracy and response capabilities in the context of global climate change.
Based on the graph attention neural network, the spatial correlation matrix of hydrological stations in the basin is constructed to extract the graph-level features of flood events. The elbow rule and K-means clustering method are used to classify flood events, taking into account the synchronous monitoring data of multiple stations in the basin and the spatiotemporal distribution characteristics of the flood process.
It has achieved deep learning modeling of the spatial correlation characteristics of basin floods, breaking through the limitations of traditional single-site analysis, providing richer flood classification information, and improving the prediction accuracy and response capabilities of flood disasters.
Smart Images

Figure CN120408322B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of flood classification methods, and in particular relates to a flood classification method based on a graph attention neural network. Background Art
[0002] The formation and development of flood disasters are the result of the nonlinear coupling of multiple factors, including meteorological conditions, hydrological processes, topographical characteristics, and human activities. Systematically classifying historical flood processes and categorizing historical flood events into types with similar characteristics is an important technical approach to deeply understand the nature of flood disasters, contributing to the precise prevention and control of flood disasters and the sustainable use of water resources.
[0003] However, existing flood classification methods primarily rely on single-point flood characteristics (such as peak discharge and total flood volume) measured at a basin outlet control station. This simplified approach fails to effectively reflect the spatial heterogeneity of flood events within a basin. Against the backdrop of intensifying global climate change and frequent extreme precipitation events, the complexity and uncertainty of flood disasters have significantly increased. There is an urgent need to develop intelligent flood classification methods that integrate artificial intelligence technologies and fully consider the impact of spatial differences in underlying surface conditions within a basin on flood formation processes, thereby improving flood prediction accuracy and response capabilities. Summary of the Invention
[0004] The present invention aims to propose a flood classification method based on the basin scale, establish a spatial correlation matrix according to the topological relationship of the water system of multiple stations in the basin, aggregate the flood characteristics between different adjacent hydrological stations, and characterize the spatiotemporal distribution characteristics of the flood process in the basin.
[0005] The technical solution of the present invention:
[0006] A flood classification method based on graph attention neural network includes the following steps:
[0007] Step S1: Collect the flow and precipitation data observed by the hydrological stations and rain gauges in the study area, extract flood events, and construct a flood event dataset;
[0008] Step S2: constructing a flood map for each flood event, thereby obtaining a flood atlas for multiple flood events;
[0009] Step S3: Extracting graph-level features of the flood map corresponding to each flood event based on the graph attention neural network (GAT) model;
[0010] Step S4: Based on the graph-level features of the flood atlas, the optimal number of clusters is determined using the elbow rule, and the flood events are classified using the clustering method.
[0011] Furthermore, step S1 includes:
[0012] Step S1a, dividing the study area basin into multiple sub-basins according to the hydrological station, with each hydrological station control interval or the control intervals of two hydrological stations upstream and downstream forming a sub-basin;
[0013] Step S1b: Count the rainstorm events in each sub-basin. The criteria for judging a rainstorm event are that the total precipitation observed in 24 hours at a single rain gauge station is greater than 50 mm or the total precipitation observed in 12 hours is greater than 30 mm.
[0014] Step S1c: Analyze the relationship between the rainstorm events in the sub-basin and the flow change process of the sub-basin outlet hydrological station, and select the flow process with obvious fluctuation or peak flow greater than 100m 3 / s flood events, forming the flood event dataset.
[0015] The sub-basin division in step S1a is based on the DEM. After the DEM is filled, the cumulative flow raster counts flowing into each DEM pixel are calculated. The DEM pixel with the largest cumulative flow raster count at the adjacent hydrological station is selected as the sub-basin outlet. The upstream cumulative flow raster range is the sub-basin range.
[0016] Furthermore, step S2 includes:
[0017] Step S2a: construct a flood graph with hydrological stations as nodes and the water system topology relationships between hydrological stations as directed edges;
[0018] Step S2b: The flood peak modulus, flood concentration, total flood volume, skewness coefficient and coefficient of variation of the flood events measured at the hydrological station are used as node features;
[0019] Step S2c: Each flood event corresponds to a flood map, and multiple flood maps corresponding to multiple flood events constitute a flood map set.
[0020] Furthermore, in step S2b, the calculation formula of each node feature is as follows:
[0021] (1) Peak modulus M P :
[0022]
[0023] Where, q t is the flow process observed at this node during this flood event, A is the basin area, max( q t ) is the peak flow.
[0024] (2) Flood concentration D c :
[0025]
[0026] Where: i' represents the number of time periods, i' =1, 2, ..., n ; n is the total number of flood periods, r i’ For the i' The total amount of flood in each period is divided equally among each period, taking the interval as a circle; R t is the total amount of flood in this event; D c The value range is [0,1]; the closer it is to 1, the more concentrated the flood is in certain periods; the closer it is to 0, the more uniform the distribution is or the more it diffuses in a ring shape.
[0027] (3) Total flood volume V total :
[0028]
[0029] Where: t start is the starting time, t end is the termination time, the time interval Δt = t r+1 -t r ; q r It is r Traffic flow at a point in time; q r+1 It is r + Traffic at 1 time point;
[0030] (4) Skewness coefficient C s :
[0031]
[0032] Where: m is the flow sequence length, is the mean of the flow series, s is the standard deviation of the traffic series.
[0033] (5) Coefficient of variation C v :
[0034]
[0035] Furthermore, step S3 includes:
[0036] Step S3a: Collect the characteristic data of all flood events and all nodes, calculate the mean and standard deviation of each characteristic, and then perform Z-score standardization processing on each characteristic. The calculation formula is:
[0037]
[0038] in, μ is the mean of the feature, is the standard deviation of the feature, x is the original data value, z is the standard score, indicating x Relative to the mean μ degree of deviation.
[0039] Step S3b: Use the graph attention neural network (GAT) to model the spatial correlation between hydrological stations under the same flood event, perform weighted aggregation of neighbor node features through the attention mechanism, and extract the multi-dimensional representation features of each hydrological station; input the features of all nodes into the graph-level attention pooling module to obtain the full-graph comprehensive feature representation of the flood event.
[0040] Step S3c: Process the flood atlas of multiple flood events to obtain the graph-level features of each flood graph.
[0041] Furthermore, in step S3b, the feature representation of nodes in the GAT model 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. It can be expressed as:
[0042]
[0043] in, h i For nodes i Features, k represents the number of nodes in the graph, F Indicates the number of feature representations for each node.
[0044] For nodes i and neighbor nodes First, the attention score between nodes is calculated through the attention mechanism. The calculation formula is as follows:
[0045]
[0046] in, h j For adjacent nodes j Features, W attFor nodes i and adjacent nodes j The weight of attention between is the learnable attention vector, For vector splicing; e ij Representation node i and j The unnormalized attention coefficient between ; LeakyReLU is the activation function;
[0047] Then use the Softmax function to normalize the attention scores of neighbor nodes to get the node j For Node i Attention coefficient:
[0048] ;
[0049] Use the attention coefficient to weight the neighbor features and get the node i The updated feature representation of is:
[0050] ;
[0051] in, f is the activation function; represents the normalized attention coefficient between nodes i and j; Representation node i Updated feature vector; N ( i ) represents a node i The neighbor set of For nodes j For Node i The attention coefficient;
[0052] In order to aggregate node features into graph-level representations, an attention pooling mechanism is used to obtain the original attention score of each node’s updated features through a linear transformation:
[0053] ;
[0054] Where b is a learnable bias term, e i Indicates the i The raw attention score of each node; W pool is the weight matrix of attention pooling;
[0055] Use the softmax function to normalize the scores of all nodes to obtain the graph-level attention weights:
[0056] ;
[0057] in, Indicates the i The normalized score of each node; N Indicates the number of nodes participating in Softmax normalization; e j Indicates the j The raw attention score of each node;
[0058] The final graph-level feature is the weighted sum of all node update features:
[0059] .
[0060] Furthermore, the step S4 includes:
[0061] Step S4a, determining the optimal number of clusters by the elbow rule;
[0062] Step S4b: Based on the optimal number of clusters determined by the elbow rule, the K-means method is used to classify flood events.
[0063] The principle of the elbow rule is to observe the changing trend of the clustering error SSE as the K value increases, and find the "inflection point" (i.e., "elbow").
[0064] The steps of the K-means clustering method are:
[0065] (1) Randomly initialize y points as cluster centroids;
[0066] (2) Assign each point in the sample set to a cluster: Calculate the distance between each point and the centroid (commonly used Euclidean distance and cosine distance), and assign it to the cluster corresponding to the nearest centroid;
[0067] (3) Update the centroid of the cluster: The centroid of each cluster is updated to the average value of all points in the cluster;
[0068] (4) Repeat steps (2)-(3). If the distance between the new centroid and the previous centroid is less than a certain threshold, it can be considered that the clustering result has reached the desired result and the algorithm terminates. Otherwise, continue to iterate.
[0069] Compared with the prior art, the present invention has the following beneficial effects:
[0070] This paper introduces graph attention neural networks into flood classification, enabling deep learning modeling of the spatial correlation characteristics of floods in a river basin. Using the graph attention network, we integrate simultaneous flow monitoring data from multiple sites within a river basin to extract the spatiotemporal evolution of floods within the river network, overcoming the limitations of traditional single-site analysis methods. The proposed method relatively accounts for the spatial heterogeneity of floods, resulting in richer classification results. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] Figure 1 This is a schematic diagram of the overall process of the method of the present invention;
[0072] Figure 2 A schematic diagram of the structure of a flood map for an embodiment;
[0073] Figure 3 This is the optimal clustering result diagram of the elbow rule of the example of the present invention. DETAILED DESCRIPTION
[0074] The technical solution of the present invention will be further described below with reference to the accompanying drawings and embodiments.
[0075] Reference Figure 1 , a flood classification method based on graph attention neural network, specifically including:
[0076] Step S1: Collect the flow and precipitation data observed by 15 hydrological stations and 135 rain gauges in the Yiluo River Basin, extract flood events, and construct a flood event dataset.
[0077] The specific steps include:
[0078] Step S1a: Divide the Yiluo River Basin into 15 sub-basins according to the hydrological stations, and each hydrological station control area or the control areas of two upstream and downstream hydrological stations constitute a sub-basin.
[0079] Using ArcGIS, we delineate sub-basins based on a DEM. First, we use Fill in the Hydrology module of the Spatial Analyst Tools toolbox to fill the DEM. Then, we use Flow Direction using the D8 method to calculate flow direction, and Flow Accumulation to calculate the cumulative inflow grid count upstream of each grid. We identify the DEM pixel with the largest cumulative inflow grid count near the hydrological station and mark it as the slope point. We then use Watershed to extract the sub-basins. The cumulative flow grid upstream of the slope point represents the sub-basin extent, completing the delineation.
[0080] Step S1b: Count the rainstorm events in each sub-basin. The criteria for judging a rainstorm event are that the total precipitation observed in 24 hours at a single rain gauge station is greater than 50 mm or the total precipitation observed in 12 hours is greater than 30 mm.
[0081] Step S1c: Analyze the relationship between the rainstorm events in the sub-basin and the flow change process of the sub-basin outlet hydrological station, and select the flow process with obvious fluctuation or peak flow greater than 100m 3 / s flood event, determine the rising point and receding point of this flood event as well as the flood flow process data, and form a flood event dataset, that is, a flood flow dataset.
[0082] In this embodiment, 16 rainstorm and flood events are selected, with a time range of 2020-2024.
[0083] Step S2: construct a flood map data structure, and then obtain a flood atlas of multiple flood events.
[0084] The specific steps include:
[0085] Step S2a: Taking the hydrological stations as nodes and the water system topological relationships between the hydrological stations as directed edges, a flood graph is constructed;
[0086] Each flood event corresponds to a flood graph, so 16 flood graphs are constructed. The structure of each flood graph is the same (nodes, edge relationships), and the dimensions of the node features are also the same. There are five feature dimensions in the present invention. The difference between different flood graphs is that the five dimensional feature values of the node features are different. Taking the flood peak modulus as an example, the flood peak modulus of the same node in the flood graph corresponding to different flood events is different. The specific structure of the flood graph is as follows: Figure 2 As shown, the numbers in the figure represent the node numbers.
[0087] Step S2b, calculate the node characteristics of the hydrological station, including the flood peak modulus, flood concentration, total flood volume, skewness coefficient, and coefficient of variation of the measured flow process at the node, a total of 5 dimensions. In the same flood event, if an individual hydrological station does not observe a flood, the 5-dimensional characteristic values of its corresponding node are all 0. The formula for calculating the node characteristics of each node is consistent. The flow processes observed at different nodes are different, and the calculation results of their node characteristics are different. As long as any hydrological station observes a flood, it is regarded as a flood event in the basin. Other hydrological stations may or may not observe floods. For hydrological stations that observe floods, the corresponding five characteristics are calculated as the node characteristics corresponding to the hydrological station; if no floods are observed, the five node characteristics are all 0.
[0088] The calculation formula of node characteristics is as follows:
[0089] (1) Peak modulus M P :
[0090]
[0091] Where, t For time, q t is the flow process observed at this node during this flood event, A is the basin area, max( q t ) is the peak flow.
[0092] A flow course is a sequence of flow changes over time, that is, a flow curve measured during a flood process.
[0093] (2) Flood concentration D c :
[0094] ;
[0095] Where: i' represents the number of time periods, i' =1, 2, ..., n ; n is the total number of flood periods, r i’ For the i' The total amount of flood in each period is divided equally among each period, taking the interval as a circle; R t is the total amount of flood in this event; D c The value range is [0,1]; the closer it is to 1, the more concentrated the flood is in certain periods; the closer it is to 0, the more uniform the distribution is or the more it diffuses in a ring shape.
[0096] (3) Total flood volume V total :
[0097]
[0098] Where: t start is the starting time, t end is the termination time, the time interval Δt = t r+1 -t r ; q r It is r Traffic flow at a point in time; q r+1 It is r + Traffic at 1 time point;
[0099] (4) Skewness coefficient C s :
[0100]
[0101] Where: m is the flow sequence length, is the mean of the flow series, s is the standard deviation of the traffic series.
[0102] (5) Coefficient of variation C v :
[0103] .
[0104] Step S2c: Each flood event corresponds to a flood map, and multiple flood maps corresponding to multiple flood events constitute a flood map set.
[0105] In this embodiment, taking the flood event numbered 20200731 as an example, the calculation results of the five-dimensional eigenvalues of different nodes (15 hydrological stations, corresponding to node numbers 0 to 14) are shown in Table 1 below:
[0106] Table 1 Calculation results of node eigenvalues for flood event 20200731
[0107]
[0108] Step S3: Extract graph-level features of the flood graph corresponding to each flood event based on the graph attention neural network GAT considering the attention mechanism.
[0109] The specific steps include:
[0110] Step S3a: Perform Z-score normalization on each feature dimension of the node: extract the feature value set of all flood events and all nodes in that dimension; then, independently calculate the mean and standard deviation based on the feature value set. The Z-score normalization calculation formula is:
[0111] ;
[0112] in, is the mean of the feature, is the standard deviation of the feature; x is the original data value, z is the standard score, indicating x Relative to the mean μ The characteristics of each node have five dimensions, each dimension corresponds to a flood characteristic index value, and then the characteristic index value is standardized and input into the GAT model.
[0113] In this embodiment, the standardized five-dimensional eigenvalues of the nodes are shown in Table 2 below:
[0114] Table 2 Normalized results of node eigenvalues for flood event 20200731
[0115]
[0116] Step S3b: Use the graph attention neural network (GAT) to model the spatial correlation between hydrological stations under the same flood event, perform weighted aggregation of neighbor node features through the attention mechanism, and extract the multi-dimensional representation features of each hydrological station; input the features of all nodes into the graph-level attention pooling module to obtain the full-graph comprehensive feature representation of the flood event.
[0117] In this embodiment, the hidden layer output dimension is 64-dimensional, and other dimensions can also be set, such as 32-dimensional. Then, the graph-level attention pooling module is used to process the hidden layer 64-dimensional feature values of all nodes to obtain the comprehensive features of the entire flood graph.
[0118] During a flood event, each hydrological station corresponds to a node, and the flood process characteristics measured at that station serve as the node's features. The GAT model uses attention weights to aggregate neighboring features, outputting hidden layer features for each node. It then uses attention pooling to process the 64-dimensional hidden layer features of all nodes to obtain comprehensive features for the entire flood map. This weighting process extracts the spatial relationship between each node and its neighbors.
[0119] In the GAT model, the node features are represented as:
[0120] ;
[0121] in, h i For nodes i Features, k represents the number of nodes in the graph, F Indicates the number of feature representations for each node;
[0122] For nodes i and neighbor nodes First, the attention score between nodes is calculated through the attention mechanism. The calculation formula is as follows:
[0123] ;
[0124] in, h j For adjacent nodes j Features, W att For nodes i and adjacent nodes j The weight of attention between is the learnable attention vector, For vector splicing; e ij Representation node i and j The unnormalized attention coefficient between ; LeakyReLU is the activation function;
[0125] Then use the Softmax function to normalize the attention scores of neighbor nodes to get the node j For Node i Attention coefficient:
[0126] ;
[0127] Use the attention coefficient to weight the neighbor features and get the node i The updated feature representation of is:
[0128] ;
[0129] in, f is the activation function; represents the normalized attention coefficient between nodes i and j; Representation node i Updated feature vector; N ( i ) represents a node i The neighbor set of For nodes j For Node i The attention coefficient.
[0130] In order to aggregate node features into graph-level representations, an attention pooling mechanism is used to obtain the original attention score of each node’s updated features through a linear transformation:
[0131] ;
[0132] Where b is a learnable bias term, e i Indicates the i The raw attention score of each node; W pool is the weight matrix of attention pooling.
[0133] Use the softmax function to normalize the scores of all nodes to obtain the graph-level attention weights:
[0134] ;
[0135] in, Indicates the iThe normalized score of each node; N Indicates the number of nodes participating in Softmax normalization; e j Indicates the j The raw attention scores of nodes.
[0136] The final graph-level feature is the weighted sum of all node update features:
[0137] .
[0138] Step S3c: Process the flood atlas of multiple flood events to obtain the image-level features of each flood image. In this embodiment, 16 flood image-level features are obtained.
[0139] The above calculations are implemented using Python's PyTorch Geometric module, which provides efficient graph data structures and GNN model implementations (such as GCN, GAT, and GraphSAGE), and supports sparse matrix operations, heterogeneous graphs, dynamic graphs, etc. The relevant functions of the PyTorch Geometric library package are called, and the main parameters modified and set in the program are: (1) GAT model input settings, the number of input dimensions (5 dimensions in this embodiment); (2) GAT model structure settings: the number of graph convolution layers (2 in this embodiment), the number of attention heads per graph convolution layer (4 in this embodiment); (3) GAT model output settings: the hidden layer output dimension (64 dimensions in this embodiment).
[0140] Step S4: Based on the graph-level features of the flood atlas, the elbow rule is used to determine the optimal number of clusters, and the K-means clustering method is used to classify flood events.
[0141] The specific steps are as follows:
[0142] Step S4a, determining the optimal number of clusters by the elbow rule;
[0143] Step S4b: Based on the optimal number of clusters determined by the elbow rule, the K-means method is used to classify flood events.
[0144] The principle of the elbow rule in step S4a is to observe the changing trend of the clustering error SSE as the K value increases and find the "inflection point" (i.e., the "elbow"). The elbow rule in step S4a and the K-means clustering method in step S4b are both existing technologies, and the principles and calculation processes are not explained in detail here.
[0145] The above calculations use Python’s matplotlib module to visualize the clustering errors corresponding to different K values and determine the optimal number of classes for flood classification. The KMeans function of the scikit-learn module is then used to output the flood classification results.
[0146] The optimal number of flood clusters is determined to be 4 by the elbow rule. Figure 3 The classification results of the 16 flood events are shown in Table 3.
[0147] Table 3 Flood classification results based on graph attention neural network
[0148]
[0149] Thus far, 16 flood events have been classified into four categories (0, 1, 2, and 3). While flood classification itself doesn't directly assign a clear physical meaning to each type, by analyzing the corresponding flood characteristics (such as spatial distribution, evolution speed, and peak time), we can summarize the formation mechanisms of different flood types, thereby deepening our understanding of the nature of flood disasters in river basins. This invention can assist relevant departments in formulating more targeted flood prevention measures and water resource management strategies, improving flood warning and emergency response capabilities, and reducing the impact of flood disasters.
Claims
1. A flood classification method based on graph attention neural network, characterized in that: The following steps are involved: Step S1: Collect the flow and precipitation data observed by the hydrological stations and rain gauges in the study area, extract flood events, and construct a flood event dataset; Step S2: constructing a flood map for each flood event, thereby obtaining a flood atlas for multiple flood events; The process of constructing a flood map includes: Step S2a: construct a flood graph with hydrological stations as nodes and the water system topology relationships between hydrological stations as directed edges; Step S2b: The total flood volume, flood peak modulus, flood concentration, skewness coefficient, and coefficient of variation of the flood events measured at the hydrological station are used as node characteristics. The calculation formula for each node characteristic is as follows: (1) Peak modulus M P : ; Where, q t is the flow process observed at this node during this flood event, A is the basin area, max( q t ) is the peak discharge; (2) Flood concentration D c : ; Where: i' represents the number of time periods, i' =1, 2, ..., n ; n is the total number of flood periods, r i’ For the i' The total amount of flood in each period is divided equally among each period, taking the interval as a circle; R t is the total amount of flood in this event; D c The value range is [0,1]; the closer it is to 1, the more concentrated the flood is in certain periods; the closer it is to 0, the more evenly distributed it is or the more it diffuses in a ring-like manner; (3) Total flood volume V total : ; Where: t start is the starting time, t end is the termination time, the time interval Δt=t i+1 -t i ; q r It is r Traffic flow at a point in time; q r+1 It is r + Traffic at 1 time point; (4) Skewness coefficient C s : ; Where: m is the flow sequence length, is the mean of the flow series, s is the standard deviation of the flow series; (5) Coefficient of variation C v : ; Step S2c: Each flood event corresponds to a flood map, and multiple flood maps corresponding to multiple flood events constitute a flood atlas; Step S3: Extracting graph-level features of the flood map corresponding to each flood event based on the graph attention neural network (GAT) model; Step S4: Based on the graph-level features of the flood atlas, the optimal number of clusters is determined using the elbow rule, and the flood events are classified using the clustering method.
2. A flood classification method based on graph attention neural network according to claim 1, characterized in that: Step S1 includes: Step S1a, dividing the study area basin into multiple sub-basins according to the hydrological stations, with each hydrological station control interval or the control intervals of two upstream and downstream hydrological stations as one sub-basin; Step S1b: Count the rainstorm events in each sub-basin. The criteria for judging a rainstorm event are that the total precipitation observed in 24 hours at a single rain gauge station is greater than 50 mm or the total precipitation observed in 12 hours is greater than 30 mm. Step S1c: Analyze the relationship between the rainstorm events in the sub-basin and the flow change process of the sub-basin outlet hydrological station, and select the flow process with obvious fluctuation or peak flow greater than 100m 3 / s flood events, forming the flood event dataset.
3. The flood classification method based on graph attention neural network according to claim 1 is characterized in that: Step S3 includes: Step S3a: Collect the characteristic data of all flood events and all nodes, calculate the mean and standard deviation of each characteristic, and then perform Z-score standardization processing on each characteristic. The calculation formula is: ; in, is the mean of the feature, is the standard deviation of the feature; x is the original data value, z is the standard score; Step S3b: Use the graph attention neural network (GAT) to model the spatial correlation between hydrological stations under the same flood event. Use the attention mechanism to perform weighted aggregation on neighbor node features to extract multi-dimensional representation features of each hydrological station. Input the features of all nodes into the graph-level attention pooling module to obtain a comprehensive feature representation of the entire graph of the flood event. Step S3c: Process the flood atlas of multiple flood events to obtain the graph-level features of each flood graph.
4. The flood classification method based on graph attention neural network according to claim 3 is characterized in that: Step S3b is specifically as follows: In the GAT model, the node features are represented as: ; in, h i For nodes i Features, k represents the number of nodes in the graph, F Indicates the number of feature representations for each node; For nodes i and neighbor nodes First, the attention score between nodes is calculated through the attention mechanism. The calculation formula is as follows: ; in, h j For adjacent nodes j Features, W att For nodes i and adjacent nodes j The weight of attention between is the learnable attention vector, For vector splicing; e ij Representation node i and j The unnormalized attention coefficient between ; LeakyReLU is the activation function; Then use the Softmax function to normalize the attention scores of neighbor nodes to get the node j For Node i Attention coefficient: ; Use the attention coefficient to weight the neighbor features and get the node i The updated feature representation of is: ; in, f is the activation function; represents the normalized attention coefficient between nodes i and j; Representation node i Updated feature vector; N ( i ) represents a node i The neighbor set of For nodes j For Node i The attention coefficient; In order to aggregate node features into graph-level representations, an attention pooling mechanism is used to obtain the original attention score of each node’s updated features through a linear transformation: ; Where b is a learnable bias term, e i Indicates the i The raw attention score of each node; W pool is the weight matrix of attention pooling; Use the softmax function to normalize the scores of all nodes to obtain the graph-level attention weights: ; in, Indicates the i The normalized score of each node; N Indicates the number of nodes participating in Softmax normalization; e j Indicates the j The raw attention score of each node; The final graph-level feature is the weighted sum of all node update features: 。 5. The flood classification method based on graph attention neural network according to claim 1 is characterized in that: The step S4 comprises: Step S4a: Based on the graph-level features of the flood atlas, the optimal number of clusters is determined by the elbow rule; Step S4b: Based on the optimal number of clusters determined by the elbow rule, the K-means method is used to classify flood events.
Citation Information
Patent Citations
Mountain torrent disaster risk level prediction method based on knowledge graph and graph neural network
CN119721722A
Urban rainstorm flood disaster chain affair map construction method and system
CN119761488A