Quantitative evaluation method of single factor impact of flash flood zoning based on flash flood incubation background data
Through the combination of graph neural network and SHAP interpretation model, the impact of the background data of the flash torrent breeding on the partition results is quantified, and the "black box" characteristic problem of graph neural network in the flash torrent partition is solved, which realizes the transparency and interpretability of the flash torrent partition results, and improves the scientificity and application value of the partition results.
Patent Information
- Application Number
- CN202510105937.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-23
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2045-01-23
AI Technical Summary
In the prior art, the graph neural network has a "black box" characteristic in the flash torrent partition, which makes it difficult to explain the complex nonlinear relationship between the background data of the flash torrent breeding and the partition results, and hinders the application value of the partition results in actual disaster management.
Graph neural network is used for flash torrent partitioning, and combined with SHAP interpretation model, the impact of the background factors of flash torrent birth on partitioning results is quantified, so as to achieve transparency and interpretability of the results.
It improves the accuracy and interpretability of the results of mountain torrent partitions, provides scientific basis and decision-making support for the prevention and control of mountain torrent disasters, avoids interference from subjective factors in traditional methods, and ensures the scientificity and objectivity of the zoning process.
Smart Images

Figure CN119941045B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the fields of intelligent disaster reduction in mountainous areas, disaster risk management, soil and water conservation, ecological protection, geographic information remote sensing, and artificial intelligence applications. It specifically relates to a quantitative evaluation method for the single-factor impact of flash flood breeding background data on flash flood zoning, providing efficient and intelligent technical support for disaster prevention and mitigation work in mountainous areas. Background Art
[0002] Flash floods are short-term, extreme runoff events in small mountainous watersheds, triggered by extreme rainfall, the outburst of barrier lakes, and glacial lakes. Characterized by suddenness and destructive power, they are a major natural disaster threatening the safety of life and property of people in mountainous areas and the high-quality development of regions. Among all types of floods in China, flash floods cause the most casualties, particularly in complex mountainous terrain, where their frequency and impact are more pronounced. The dynamics of flash floods are complex, encompassing topographic and geomorphic conditions, climate and the convection and diffusion of meteorological factors, and the spatial heterogeneity of the underlying surface, as well as the complex interactions among these three factors. However, quantitative research on the impact of flash flood-causing factors on flash floods is currently insufficient, hindering a deeper understanding of flash flood formation mechanisms and limiting the implementation of scientific and effective disaster prevention and mitigation measures.
[0003] Flash flood zoning, a key method for quantitatively analyzing the spatial heterogeneity of flash flood initiation, can reveal the spatial similarities and differences in flash flood initiation factors by dividing homogeneous regions, providing a scientific basis for flash flood disaster risk management in data-deficient mountainous areas. The input data for flash flood zoning is generally initiation data, geographic data with significant spatial interactions. Therefore, zoning methods that consider the spatial structure of the input data can more comprehensively reflect the spatial interactions of the input data and provide more reliable zoning results. Traditional zoning methods, such as K-means clustering and Ward clustering, as well as machine learning-based methods such as random forests and convolutional neural networks, only consider the attribute characteristics of the input data and fail to fully utilize the spatial structure and interactions of the data. This limitation significantly restricts the accuracy and scientificity of the zoning results. In recent years, graph neural networks (GNNs), an emerging deep learning method, have demonstrated unique advantages in processing spatially correlated data. GNNs can simultaneously utilize both the attribute characteristics and spatial topological structure of the input data, making them particularly suitable for analyzing geographic data with complex spatial relationships. Compared to traditional methods, graph neural networks can capture the complex spatial interactions of factors that contribute to flash flooding, such as the upstream-downstream correlation between topographic relief and river flux, and the diffusion and localized effects of meteorological factors, thereby generating more reliable zoning results. Furthermore, the efficiency and robustness of graph neural networks in processing large-scale, high-dimensional data give them enormous potential for application in flash flood zoning.
[0004] Although graph neural networks have significantly improved the accuracy of zoning results, their "black box" nature poses challenges to the interpretability of the results. This limits our understanding of the complex, nonlinear relationships between the input background data captured by advanced neural networks and flash flood zoning. This hinders the specific mechanisms of action and spatial variability of various flash flood-causing background factors, hindering the full application value and scientific guidance of zoning results in actual flash flood disaster management. Therefore, there is an urgent need to develop quantitative evaluation methods for the single-factor impact of flash flood-causing background data on flash flood zoning. Summary of the Invention
[0005] The present invention aims to solve at least one of the technical problems existing in the prior art.
[0006] To this end, the present invention proposes a quantitative evaluation method for the single-factor influence of flash flood breeding background data on flash flood zoning. Based on the flash flood breeding background data such as topography, climate, hydrology and underlying surface of the target area, a graph neural network is applied to carry out flash flood zoning, and the SHAP (Shapley Additive Explanations) interpretation model is used to quantify the influence of flash flood breeding background factors on the zoning results, so as to achieve transparency and explainability of the flash flood zoning results.
[0007] The present invention is achieved through the following technical solutions:
[0008] The present invention provides a quantitative evaluation method for the single-factor impact of flash flood incubation background data on flash flood zoning, comprising the following steps:
[0009] Step S100: collecting flash flood incubation background data of a target area, pre-processing the data, and applying a flash flood zoning model to obtain a flash flood zoning result of the target area. The flash flood zoning model adopts a first supervised machine learning model or a first unsupervised machine learning model. For the first unsupervised machine learning model, a second supervised machine learning model is trained using the flash flood zoning result to learn the zoning result of the first unsupervised machine learning model to obtain a supervised support model.
[0010] Step S200: Input the first supervised machine learning model or the supervised support model and the flash flood breeding background data of the target area into the explanatory model. The explanatory model provides the contribution of each dimension of the flash flood breeding background data in the flash flood zoning process through the marginal contribution of each dimension of the flash flood breeding background data to the prediction results of the first supervised machine learning model or the supervised support model, and obtains the influence of each dimension of the flash flood breeding background data on the flash flood zoning results.
[0011] In some embodiments, in step S100, the flash flood zoning result of the target area is obtained using an unsupervised graph neural network, and the specific steps include:
[0012] Step S110: resampling all the collected flash flood background data of the target area into raster data of uniform spatial resolution, and clipping the raster data according to the range of the target area to obtain initial data R0;
[0013] Step S120: performing correlation analysis and multicollinearity analysis on the data of each dimension in the initial data R0, identifying and eliminating data dimensions whose correlation and variance inflation factor do not meet the requirements, and obtaining input data R in grid form;
[0014] Step S130: For the grid-form input data R, each grid is regarded as a node, a node matrix V is constructed, edges between nodes are determined based on the distances between the nodes, an edge set E and a normalized adjacency matrix A are constructed, and a node attribute matrix X is constructed based on the input data R, thereby constructing the grid-form input data R into graph structure data G = (V, E, X);
[0015] Step S140: For a case where the number of partitions has been set for the target area, based on the set number of partitions, the graph structure data G=(V, E, X) is used as input, and clustering analysis is performed through a graph neural network to obtain a grid-scale partitioning result; for a case where the number of partitions has not been set for the target area, for all numbers of partitions, the graph structure data G=(V, E, X) is used as input, and a traversal calculation is performed using a graph neural network. Through an optimization method, with the clustering effectiveness index as the optimization target, the optimal number of partitions is searched and determined, thereby determining a grid-scale partitioning result.
[0016] In some embodiments, in step S130, the distance between nodes is calculated based on the latitude and longitude attributes of the nodes in the grid-form input data R, and the edges between the nodes are established according to the eight-neighborhood or four-neighborhood rule based on the number of the nearest nodes and the upper limit of the proximity distance, to obtain the edge set Used to represent a set of edges connecting different nodes, (i, j) represents an edge connecting node i and node j, i≠j.
[0017] In some embodiments, in step S130, the step of constructing the normalized adjacency matrix A includes:
[0018] Find the nearest neighbor node to node i through KD tree:
[0019] neighbors i =KDTree.query(C i ,num_neighbors+1,distance_upper_bound)
[0020] Among them, neighbors i Represents all neighbor nodes of node i; KDTree.query(·) represents the KD tree calculation function; each node i has longitude log i and latitude lat i Two attributes, all nodes form a two-dimensional coordinate set C, which contains the latitude and longitude attributes of all nodes C i =(log i ,lat i ) is the latitude and longitude attribute of node i, N is the number of grids contained in each dimension of the input data R; num_neighbors is the number of neighbor nodes found in the neighborhood for each node; distance_upper_bound represents the upper limit of the distance to find neighbor nodes;
[0021] neighbors i Remove node i from itself and get the neighbor node set neighbors of node i i ';
[0022] For nodes i and j, if node i is adjacent to node j, that is, j∈neighbors i ', then a ij =1, otherwise a ij =0, thus constructing the adjacency matrix A0={a ij |(i,j)∈V 2}∈R N×N ;
[0023] Perform symmetric normalization on the adjacency matrix A0 to obtain the normalized adjacency matrix A:
[0024] A=D -1 / 2 A0D -1 / 2 ∈R N×N
[0025] Where D = {d' i |i∈V} is the degree matrix, which is a diagonal matrix whose diagonal elements are the degree d' of each node. i =∑ j a ij ,i∈V,j∈V.
[0026] In some embodiments, in step S140, if the number of partitions has been set for the target area, the number of partitions is set to K. Based on the number of partitions, the graph structure data G = (V, E, X) is used as input, and cluster analysis is performed through a graph neural network to obtain grid-scale partitioning results. The specific steps include:
[0027] Step S1411: For the node attribute matrix X∈R N×d and the normalized adjacency matrix A∈R N×N The original graph structure data G = {X, A}, N is the number of grids contained in each dimension of the input data R, through data enhancement operation Generating augmented data
[0028]
[0029] Step S1412: Use graph neural network to analyze the original graph structure data G and the enhanced data The node representations are calculated separately, and the graph neural network updates the node representations through multi-layer graph convolution:
[0030] H (l+1) =σ(AH (l) W (l) )
[0031] Among them, H (l) is the node representation of the lth layer in the graph neural network; W (l) is the weight matrix of the lth layer in the graph neural network; σ(·) is the activation function;
[0032] After multi-layer graph convolution, the original graph structure data G and enhanced data are obtained The nodes represent H,
[0033]
[0034] in, is the graph neural network function;
[0035] is the attribute vector x of constraint node i i Instead of enhancing the attribute vector Contrastive learning between the two, using the contrast loss function for:
[0036]
[0037] Among them, h i and are the node representations of the original graph structure data and enhanced data of node i, respectively; Sim(·,·) represents the similarity between nodes;
[0038] Step S1413: For the node representation H={h1,h2,...,h N}, apply the K-means method to initialize the cluster center set C, and use the cluster center as the learnable parameter of the graph neural network, and calculate the distance metric Each node represents h i Assign to the nearest cluster center c k Optimizing the total clustering loss of graph neural networks via backpropagation and gradient descent In each round of iteration, the cluster center set C and the classification of the nodes are updated to obtain the final cluster center set and the cluster label representation of each node;
[0039] The total clustering loss The expression is:
[0040]
[0041] in, is the cluster expansion loss, is the clustering shrinkage loss, τ is a hyperparameter used to control the balance between expansion and contraction; c A ∈C and c B ∈C are the cluster centers of cluster A and cluster B respectively, are all nodes in cluster A;
[0042] In each round of iteration, for the node Update the cluster center c according to the following formula A :
[0043]
[0044] Among them, |C A | is the number of nodes in cluster A;
[0045] Step S1414: Visualize the cluster label of each node in space according to the longitude and latitude of the node to obtain a grid-scale flash flood zoning result.
[0046] In some embodiments, in step S140, if the number of partitions is not set for the target area, all the numbers of partitions are calculated using the graph neural network with the graph structure data G=(V, E, X) as input. The optimal number of partitions is searched and determined by an optimization method with the clustering effectiveness index as the optimization target, thereby determining the grid-scale partitioning result. The specific steps include:
[0047] Step S1421: Set is the initial number of clusters, δ and ε are scaling factors; based on the set number of clusters Perform cluster analysis according to steps S1411 to S1414, calculate the corresponding cluster effectiveness index based on the clustering results, and set the objective function is the weighted sum of clustering effectiveness indices:
[0048]
[0049] in, is the current number of clusters, i.e. the current solution; α and β are weight coefficients; and It is an effectiveness indicator calculated based on the clustering results of graph neural networks. It is the sum of the average coefficient of variation of the flash flood breeding background data selected in the clustering results, and is used to quantify the degree of dispersion of the selected flash flood breeding background data. The distance between cluster centers is used to evaluate the closeness and dispersion of clustering results. and The lower the value, the better the clustering effect. The calculation formulas are as follows:
[0050]
[0051] Among them, |C w |The number of nodes in cluster category w, d is the dimension of the flash flood breeding background data, is the coefficient of variation of the background data of the rth dimension in cluster category w; is the standard deviation of the background data of the rth dimension in cluster category w, is the mean of the background data of the rth dimension in cluster category w; is the average distance from all nodes in cluster category w to the cluster center, is the average distance from all nodes in cluster category t to the cluster center, d wt is the distance between the centroid of cluster category w and the centroid of cluster category t;
[0052] Step S1422: From the current solution Generate a new neighborhood solution
[0053]
[0054] Among them, γ is -1 or 1;
[0055] Step S1423: Calculate the current solution and neighborhood solutions The objective function value of and And calculate the difference ΔE between the two:
[0056]
[0057] The following criteria are used to decide whether to accept the neighborhood solution
[0058] If ΔE≤0, then accept the neighborhood solution as the new current solution;
[0059] If ΔE>0, then accept the neighborhood solution according to the probability P(ΔE) As the new current solution, the probability is determined by the parameter T, and the formula is as follows:
[0060]
[0061] Among them, the parameter T gradually decreases after each iteration as the algorithm progresses;
[0062] Step S1424: Update the parameter T using an exponential decay method:
[0063] T=α T T
[0064] Among them, α T is a constant, α T ∈(0,1);
[0065] Step S1425: Repeat steps S1421 to S1424 until the iteration meets the termination condition, the iteration ends, and the optimal number of clusters is obtained. And its corresponding grid-scale flash flood zoning results.
[0066] In some embodiments, after obtaining the flash flood zoning result, the method further includes:
[0067] Step S150: Obtain historical flash flood event data of the target area, and use the historical flash flood event data to evaluate the obtained partitioning results. Specifically, superimpose the historical flash flood event data of the target area in the partitioning results, calculate the number and density of historical flash flood disaster events in each partition unit, apply the hotspot analysis method to calculate the z value of the spatial distribution of historical flash flood events in each partition unit, and determine the spatial distribution structure of the significance of historical flash flood events; if the number and density of historical flash flood events in each partition unit in the partitioning results are significantly different, and the historical flash flood events in some partition units have a significant spatial distribution structure, then it means that the partitioning results correspond well to the spatial distribution of historical flash flood events, indicating that the partitioning results are accurate; if there is no significant difference in the number and density of historical flash flood events in each partition unit in the partitioning results, and there is no significantly higher positive value or lower negative value in the z value of each partition unit, then re-perform clustering analysis from the aspects of flash flood breeding background data selection, graph neural network model parameter determination and / or partition number optimization to obtain the flash flood partitioning results.
[0068] In some embodiments, the supervised support model is obtained by following the steps below:
[0069] Step 160: Train the second supervised machine learning model using the clustering results and node attribute matrix obtained by the graph neural network. Specifically:
[0070] The cluster label y of each node i is y={y1,y2,...,y N}∈R N×1 And the corresponding node attribute matrix X={x1,x2,...,x N} as the target variable, where N is the number of nodes and K is the number of clusters, and the second supervised machine learning model ML() is trained:
[0071] y i =ML(x i ,θ)
[0072] Among them, y i is the cluster label of node i in the graph structure data G, and the cluster label is used as a supervisory signal; i is the attribute vector of node i; θ is the parameter of the second supervised machine learning model.
[0073] In some embodiments, in step S200, for each node i, let the explanation model be Background data on the generation of flash floods in Weihai The cluster label y for node i i The predicted contribution is The calculation formula is as follows:
[0074]
[0075] Among them, S is the feature subset, which does not include Other dimension of flash flood breeding background data subset of flash flood breeding background data; g(S) is the result of the first supervised machine learning model or the supervised support model trained on the feature subset S to predict the node i; It is in the feature subset S plus In the case of , the prediction result of the first supervised machine learning model or the supervised support model for node i; Represents the expectation of all possible feature subsets S;
[0076] By calculating the contribution values of all nodes, the global and local impacts of each dimension of flash flood incubation background data are obtained, where:
[0077] Set up the first The global impact of the background data on flash floods is Indicates the background data of flash floods The average contribution size in the entire target area is calculated as follows:
[0078]
[0079] The global impact of all dimensional data d is the dimension of the background data of flash floods;
[0080] The local impact is taken as the contribution value As a local contribution Indicates the The specific contribution of the flash flood breeding background data to the partitioning results of node i.
[0081] In some embodiments, the quantitative evaluation method further comprises:
[0082] Step S300: Global impact of flash flood breeding background data of various dimensions obtained by the interpretation model Determine the ranking of the impact of input data R on the partitioning results, and determine the impact differences of each flash flood breeding background data; for local impact, visualize the impact of flash flood breeding background data of each node and all dimensions in space according to the longitude and latitude of the node, and analyze the spatial variability of the impact of flash flood breeding background data in each dimension.
[0083] The beneficial effects of the present invention are:
[0084] This paper proposes a novel method based on graph neural networks and explanatory models to construct flash flood zoning based on background data and quantify the impact of flash flood background data on the zoning results and their spatial variability. This method combines the advantages of graph neural networks in processing complex grid data with the advantages of explanatory models in quantitatively interpreting neural network model results. This method improves the accuracy and interpretability of flash flood zoning results, providing a scientific basis and decision-making support for future flash flood disaster prevention and control.
[0085] 2. The graph neural network method used in this invention considers both the attribute characteristics and spatial structure of flash flood-prone background data during the partitioning process. The partitioning results fully reflect the complex spatial interactions of flash flood-prone background data and accurately capture the spatial distribution characteristics of flash flood-prone background data. An optimization algorithm automatically determines the optimal number of partitions, avoiding the subjective interference of human factors in traditional partitioning methods and ensuring the scientific and objective nature of the partitioning process.
[0086] 3. The present invention combines the SHAP interpretation model to analyze the partitioning results obtained by the graph neural network, quantifies the impact of breeding background data on the flash flood partitioning results and its spatial variability, and transforms the partitioning process that captures the complex nonlinear relationship between breeding background data and flash flood partitioning into an interpretable transparent process with a high degree of automation and strong interpretability of the results, providing a scientific basis for understanding the flash flood breeding mechanism. BRIEF DESCRIPTION OF THE DRAWINGS
[0087] Figure 1 This is an overall flow chart of a method for quantitatively evaluating the single-factor impact of flash flood breeding background data on flash flood zoning provided by an embodiment of the first aspect of the present invention.
[0088] Figure 2 It is a schematic diagram of a method for obtaining flash flood zoning results in the quantitative evaluation method provided in an embodiment of the first aspect of the present invention.
[0089] Figure 3 In the present invention, taking the Hengduan Mountain area as an example, the application Figure 2 The clustering effectiveness index of the method shown in the figure is 2 to 20, where (a) is the DBI index and (b) is the CQI index.
[0090] Figure 4 In the present invention, taking the Hengduan Mountain area as an example, based on Figure 2 (a) Flash flood zoning result map and spatial distribution of historical flash flood events obtained by the shown method; (b) the number and density of historical flash flood events in each zoning unit; (c) the spatial statistical z value of historical flash flood events in each zoning unit.
[0091] Figure 5 In this invention, taking the Hengduan Mountain area as an example, the global impact of the flash flood breeding background data obtained based on the SHAP interpretation model on the flash flood zoning results.
[0092] Figure 6 In the present invention, taking the Hengduan Mountain area as an example, the spatial variation of the single factor influence of flash flood breeding background data on flash flood zoning results obtained based on the SHAP interpretation model is as follows: (a) temperature; (b) altitude; (c) maximum 12-hour multi-year average rainfall; (d) maximum 24-hour multi-year average rainfall; (e) soil moisture; and (f) soil saturated hydraulic conductivity. DETAILED DESCRIPTION
[0093] In order to make the purpose, technical solutions and advantages of this application more clearly understood, this application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0094] On the contrary, this application covers any alternatives, modifications, equivalents, and solutions made within the spirit and scope of this application as defined by the claims. Furthermore, to facilitate a better understanding of this application, certain specific details are described in detail below in the detailed description of this application. Those skilled in the art will be able to fully understand this application without these details.
[0095] See also Figure 1The first embodiment of the present invention proposes a quantitative evaluation method for the single-factor impact of flash flood breeding background data on flash flood zoning, comprising the following steps:
[0096] Step S100: collecting flash flood incubation background data of a target area, pre-processing the data, and then applying a flash flood zoning model to obtain a flash flood zoning result of the target area, wherein the flash flood zoning model adopts a first supervised machine learning model or a first unsupervised machine learning model, and training a second supervised machine learning model with the flash flood zoning result for the first unsupervised machine learning model to learn the zoning result of the first unsupervised machine learning model, thereby obtaining a supervised support model for replacing the first unsupervised machine learning model;
[0097] Step S200: Input the first supervised machine learning model or the supervised support model and the flash flood breeding background data of the target area into the explanatory model. The explanatory model provides the contribution (importance) of the flash flood breeding background data of each dimension in the flash flood zoning process through the marginal contribution of the flash flood breeding background data of each dimension to the prediction results of the first supervised machine learning model or the supervised support model, and obtains the influence of the flash flood breeding background data of each dimension on the flash flood zoning results.
[0098] In some embodiments, see Figure 2 In step S100, the flash flood partitioning result of the target area is obtained by using an unsupervised graph neural network. The steps of obtaining the partitioning result include:
[0099] Step S110: resample all the collected background data of flash floods in the target area into grid data of uniform spatial resolution, and clip the grid data according to the range of the target area to obtain initial data R0;
[0100] Step S120: performing correlation analysis and multicollinearity analysis on the data of each dimension in the initial data R0, identifying and eliminating data dimensions whose correlation and variance inflation factor do not meet the requirements, and obtaining input data R in grid form;
[0101] Step S130: For the grid-form input data R, each grid is considered as a node, a node matrix V is constructed, edges between nodes are determined based on the distances between the nodes, an edge set E and a normalized adjacency matrix A are constructed, and a node attribute matrix X is constructed based on the input data R, thereby constructing the grid-form input data R into graph structure data G = (V, E, X);
[0102] Step S140: For the case where the number of partitions has been set for the target area, based on the set number of partitions, the graph structure data G = (V, E, X) is used as input, and clustering analysis is performed through the graph neural network to obtain the partitioning result at the grid scale; for the case where the number of partitions is not set for the target area, for all the numbers of partitions, the graph structure data G = (V, E, X) is used as input, and a traversal calculation is performed using the graph neural network. Through the optimization algorithm, the clustering effectiveness index is used as the optimization target, and the optimal number of partitions is searched and determined, thereby determining the partitioning result at the grid scale.
[0103] In some embodiments, in step S110, the collected background data of flash floods in the target area include data on topography, climate, meteorology, hydrology, and underlying surface. When conditions permit, raster data with higher spatial resolution is used as the main data. When raster data is difficult to obtain, vector data is also allowed for some data. Subsequently, all collected data are resampled to raster data with uniform spatial resolution and clipped according to the range of the target area to obtain initial data R0 = {r1, r2, ... r m}, m is the number of data dimensions of R0.
[0104] In some embodiments, in step S120, when performing correlation analysis and multicollinearity analysis on the data of each dimension in the initial data R0, data dimensions with correlation greater than 0.7 and variance inflation factor greater than 10 are identified and eliminated, thereby obtaining the grid-form input data R={r1, r2, ..., r d}, d is the dimension of the background data of mountain torrents in R.
[0105] In some embodiments, step S130 specifically includes the following steps:
[0106] Step S131: Assume that each dimension of the input data R has N grid points, and each grid point is regarded as a node in the graph structure, and construct a node matrix V = {v1, ..., v i ,…,v N}, each node vector v i Corresponding to the d-dimensional data of node i in the input data R;
[0107] Step S132: Construct a KD tree to find neighbor nodes: In order to effectively find the neighbor nodes of each node, a KD tree (K-dimensional tree) is used to construct a spatial index structure between nodes. The distance between nodes is calculated based on the latitude and longitude attributes of the nodes, and the edges between nodes are established according to the eight-neighborhood (or four-neighborhood) rule based on the number of the nearest nodes and the upper limit of the neighboring distance, to obtain the edge set. It is used to represent a set of edges connecting different nodes. (i, j) represents an edge connecting node i and node j, i≠j. Use KD tree to find the nearest neighbor node of node i:
[0108] neighbors i =KDTree.query(C i ,num_neighbors+1,distance_upper_bound)
[0109] Among them, neighbors i Represents all neighbor nodes of node i; KDTree.query(·) represents the KD tree calculation function; each node i has longitude log i and latitude lat i Two attributes, all nodes form a two-dimensional coordinate set C, which contains the latitude and longitude attributes of all nodes C i =(log i ,lat i ) is the latitude and longitude attribute of node i; num_neighbors is the number of neighbor nodes to be found in the neighborhood for each node. One more neighbor node is taken to exclude the node itself; distance_upper_bound represents the upper limit of the distance to search for neighbor nodes, and only nodes within this distance range are searched. After that, the neighbor node set neighbors of node i is obtained by removing the node i itself. i '.
[0110] Step S133: Construction and normalization of adjacency matrix: neighbors i ' is the set of neighbor nodes of node i. For node i and node j, if node i is adjacent to node j, that is, j∈neighbors i ', then a ij =1, otherwise a ij =0, thus constructing the adjacency matrix A0={a ij |(i,j)∈V 2}∈R N×N The adjacency matrix A0 is normalized to enhance the stability of the graph neural network. Symmetric normalization is usually used, and the formula is:
[0111] A=D -1 / 2 A0D -1 / 2 ∈R N×N
[0112] Where A is the normalized adjacency matrix; D = {d' i|i∈V} is the degree matrix, that is, the degree of each node (that is, the number of edges connected to the node). The degree matrix is a diagonal matrix whose diagonal elements are the degree d' of each node i =∑ja ij ,i∈V,j∈V, through the normalization process, the adjacency matrix is made more suitable for processing by graph neural networks.
[0113] Step S134: Construct node attribute matrix X: take input data R as attribute vector x of each node i , the attribute vector of a single node is represented as a d-dimensional vector:
[0114] x i ={x i,1 ,x i,2 ,...,x i,d}
[0115] Among them, d is the dimension of the attribute, that is, the number of attributes, x i,1 ,x i,2 ,...,x i,d are the elements of the 1st to dth dimensions in the attribute vector of node i. The node attribute matrix X composed of the attribute vectors of all nodes is {x1, x2, ..., x N}∈r N×d , is an N×d matrix, where the i-th row represents the d-dimensional feature vector of node i.
[0116] In some embodiments, in step S140, if the number of partitions has been set for the target area, based on the set number of partitions, a cluster analysis is performed through a graph neural network using the graph structure data G=(V, E, X) as input to obtain a grid-scale partition result. The specific steps include:
[0117] Step S1411, data enhancement: Generate enhanced samples through data enhancement methods. Common data enhancement methods include node feature noise, node loss, adjacency matrix perturbation, etc. N×d and the normalized adjacency matrix A∈R N×N The original graph structure data G = {X, A} is represented by data enhancement to generate enhanced data It is represented as using data enhancement operations to enhance the graph structure data:
[0118]
[0119] Step S1412, comparative learning: using graph neural network (GNN) to compare the original graph structure data G and the enhanced data Node representations are calculated separately, and the graph neural network updates the node representation through multi-layer graph convolution:
[0120] H (l+1) =σ(AH (l) W (l) )
[0121] Among them, H (l) is the node representation of the lth layer in the graph neural network; A is the normalized adjacency matrix; W (l) is the weight matrix of the lth layer in the graph neural network; σ(·) is the activation function (such as ReLU).
[0122] After multi-layer graph convolution, the original graph structure data G and enhanced data are obtained The nodes represent H, For subsequent clustering operations, it is expressed as:
[0123]
[0124] Among them, H and are the original graph structure data G and the enhanced data Node representation of; is a graph neural network function.
[0125] Contrastive learning loss function setting: Contrastive learning maximizes the loss between the original graph structure data G and the enhanced data The similarity of the corresponding node representations in the graph is minimized, while minimizing the similarity between different nodes to train the graph neural network function. For each node i, the node representation h of the original graph structure data i Node representation with augmented data It can be expressed as:
[0126]
[0127] Among them, x i is the attribute vector of node i; is the enhanced data attribute vector of node i; A is the normalized adjacency matrix; is the normalized adjacency matrix of the augmented data.
[0128] For node i, its original attribute vector x i and the enhanced attribute vector Contrastive learning between the two with contrastive loss function (such as contrast loss or information maximization loss) as the goal:
[0129]
[0130] Among them, h i and are the node representations of the original graph structure data and enhanced data of node i respectively; Sim(·,·) represents the similarity between nodes (such as cosine similarity); the contrast loss function The numerator of encourages the original representation of node i to be more similar to its enhanced representation, and the denominator suppresses the similarity of node i to other nodes.
[0131] Step S1413: Cluster analysis. The specific process is as follows:
[0132] 1) K-means clustering initialization: For the node representation H = {h1,h2,...,h N}, apply the K-means method to initialize the cluster center set C, and assign the cluster centers as learnable neural network parameters. For the target area, set the number of clusters to K, that is, the number of partitions that have been set. Initialization includes the following two steps:
[0133] First, randomly select Nodes represent the initial cluster center set Each randomly selected node represents is a d-dimensional vector;
[0134] Then, by calculating the distance metric (such as Euclidean distance), each node is represented by h i Assign to the nearest cluster center
[0135]
[0136] The cluster center C is used as a learnable parameter of the graph neural network, which means that the cluster center C will be updated as the graph neural network is trained to better fit the distribution of nodes.
[0137] 2) Graph Neural Network Clustering Loss Setting
[0138] A graph neural network clustering module is applied to optimize the cluster distribution by minimizing the cluster expansion loss and cluster shrinkage loss. Specifically, in an adversarial manner, the cluster expansion loss attempts to push different cluster centers apart to disperse the cluster distribution, while the cluster shrinkage loss aims to compress the cluster distribution by pulling samples back to the cluster center.
[0139] Total clustering loss is the cluster dilation loss and cluster shrinkage loss The weighted sum of can be expressed as:
[0140]
[0141] Among them, τ is a hyperparameter used to control the balance between expansion and contraction.
[0142] Cluster dilation loss It attempts to push different cluster centers apart so that the nodes within each cluster are as similar as possible, while the nodes between different clusters are as different as possible. It expands the distribution of clusters by maximizing the distance between cluster centers. Cluster expansion loss Defined as:
[0143]
[0144] Among them, c A ∈C and c B ∈C are the cluster centers of cluster A and cluster B respectively; ||·|| represents the Euclidean distance.
[0145] Cluster shrinkage loss The purpose is to make the nodes in the same cluster as close to the cluster center as possible. By pulling the samples back to the cluster center, the node distribution within the cluster is compressed. Cluster shrinkage loss It can be defined as:
[0146]
[0147] in, are all nodes in cluster A; node i belongs to cluster A, that is, h i is the node representation of node i; c A ∈C is the cluster center of cluster A.
[0148] 3) Iterative optimization of clustering results: Optimize the total clustering loss through backpropagation and gradient descent In each iteration, the cluster center C and the classification of the nodes are updated. Specifically:
[0149] In each round of iteration, the distance between each node and each cluster center is first calculated, and the node is assigned to the cluster center with the closest distance;
[0150] For node i, Update the cluster center c according to the following formula A :
[0151]
[0152] Among them, |C A | is the number of nodes in cluster A; are all nodes in cluster A.
[0153] After multiple rounds of iterations, the cluster center C will be gradually optimized and eventually the most suitable clustering result will be obtained.
[0154] Step S1414: Final clustering results and node classification
[0155] After multiple rounds of iterative optimization, the clustering results finally converged and the final cluster center set was obtained. Where K is the number of clusters, that is, the number of partitions that have been set, and the cluster label of each node is expressed as y = {y1, y2, ..., y N}∈R N×1 , where N is the number of nodes. The cluster label of each node is spatially visualized according to the latitude and longitude of the node to obtain the flash flood zoning result at the grid scale.
[0156] In some embodiments, in step S140, for the case where the number of partitions is not set for the target area, the optimal number of partitions is determined by the following optimization algorithm. The core idea of the optimization algorithm is to start from an initial solution and randomly search for the global optimal solution of the objective function in the solution space in combination with a certain probabilistic jump characteristic, that is, the local optimal solution can be probabilistically jumped out and eventually tend to the global optimal solution. By giving the search process a time-varying probabilistic jump that eventually tends to zero, a poor solution is probabilistically accepted to avoid falling into the local optimum and eventually find the global optimal solution. The specific steps are as follows:
[0157] Step S1421, objective function setting: set K as the initial number of clusters, in δ and ε are scaling coefficients. Based on the set number of clusters Perform cluster analysis according to steps S1411 to S1414, calculate the corresponding cluster effectiveness indicators (CQI and DBI) based on the clustering results, and set the objective function is the weighted sum of clustering effectiveness indices:
[0158]
[0159] in, is the current number of clusters (i.e., the current solution); α and β are weight coefficients that control the contribution of the two clustering effectiveness indicators to the objective function.
[0160] and It is an effectiveness indicator calculated based on the clustering results of graph neural networks. It is the sum of the average coefficient of variation of the flash flood breeding background data selected in the clustering results, which quantifies the degree of dispersion of these breeding background data. The distance between cluster centers is used to evaluate the closeness and dispersion of clustering results. and The lower the value, the better the clustering effect. and The calculation formulas are as follows:
[0161]
[0162] Where N is the total number of nodes, is the number of clusters currently set, |C w | is the number of nodes in cluster category w, d is the dimension of the flash flood breeding background data, is the coefficient of variation of the background data of the rth dimension in cluster category w, and the calculation formula is as follows:
[0163]
[0164] in, is the standard deviation of the background data of the rth dimension in cluster category w, is the mean of the background data of the rth dimension in cluster category w.
[0165]
[0166] in, is the number of clusters currently set, is the average distance from all nodes in cluster category w to the cluster center, is the average distance from all nodes in cluster category t to the cluster center, d wt is the distance between the centroid of cluster w and the centroid of cluster t.
[0167] Step S1422, neighborhood solution selection: select the current solution Generate a new neighborhood solution
[0168]
[0169] Wherein, γ is a constant, which can be -1 or 1.
[0170] Step S1423: Acceptance criteria setting
[0171] Calculate the objective function change: Calculate the current solution and neighborhood solutions The objective function value of and And calculate the difference ΔE between the two:
[0172]
[0173] The following criteria are used to decide whether to accept the neighborhood solution
[0174] If ΔE≤0, then accept the neighborhood solution That is, select as the new current solution;
[0175] If ΔE > 0, then accept the neighborhood solution according to the probability P(ΔE) as the new current solution: generate a random number r ∈ (0, 1), when P(ΔE) ≥ r, then accept the neighborhood solution as the new current solution, when P(ΔE) < r, then do not accept the neighborhood solution Keep the current solution unchanged, r will be updated each iteration, and the probability is determined by the parameter T, the formula is as follows:
[0176]
[0177] where the parameter T gradually decreases after each iteration as the algorithm progresses.
[0178] Step S1424, Parameter update
[0179] T gradually decreases as the algorithm progresses, usually in an exponential decay manner:
[0180] T = α T T
[0181] where α T is a constant less than 1, usually set as α T ∈ (0, 1), for example α T = 0.95.
[0182] Step S1425, Continuously repeat steps S1421 - S1424 until the iteration meets the termination condition, the iteration ends, and the optimal number of clusters and the corresponding flash flood zoning results at the grid scale are obtained, where the termination condition is:
[0183] Reach the maximum number of iterations N iter ;
[0184] Or the parameter T decreases to a preset minimum value T min .
[0185] Thus, the optimization algorithm optimizes the selection of the number of clusters by minimizing the objective function formed by the clustering validity index, and the optimal number of clusters corresponding objective function value is the smallest. Based on the obtained optimal number of clusters which is the optimal number of partitions, the flash flood zoning results at the grid scale can be obtained.
[0186] In some embodiments, after obtaining the grid-scale flash flood zoning result of the target area based on step S140, the following steps are further included:
[0187] Step S150: If the target area has available historical flash flood event data, the accuracy of the obtained partitioning result is verified using the historical flash flood event data. The specific steps are as follows:
[0188] The historical flash flood event data is superimposed and compared with the flash flood zoning results obtained in step S140, and the correspondence between each zoning unit in the zoning results and the spatial distribution pattern of historical flash flood events is analyzed. That is, the zoning results can reflect the spatial distribution pattern of historical flash flood events, thereby evaluating the zoning results. Specifically:
[0189] First, the number and density of historical flash flood disaster events in each sub-division unit were calculated.
[0190] Hotspot analysis was then applied to calculate the z-scores of the spatial distribution of historical flash flood events within each zoning unit to determine the spatial distribution structure of the significance of these events. For zoning units with positive z-scores, higher z-scores indicate more pronounced spatial clustering of flash flood events; for zoning units with negative z-scores, lower z-scores indicate a sparser spatial distribution of flash flood events. The GIS software hotspot analysis tool calculates the Getis-Ord Gi* statistic for the target area based on historical flash flood events. The resulting z-scores can be used to analyze where features are spatially clustered.
[0191] If the number and density of historical flash flood events within each partition unit in the partition results differ significantly, and historical flash flood events have a significant spatial distribution structure within some partition units, then the partition results correspond well with the spatial distribution of historical flash flood events. If the number and density of historical flash flood events within each partition unit in the partition results do not differ significantly, and the z-values within each partition unit do not have significantly high positive values or low negative values, that is, the partition results cannot well reflect the spatial distribution pattern of historical flash flood events, then the cluster analysis should be re-performed to obtain the flash flood partition results, considering the selection of flash flood breeding background data, the determination of graph neural network model parameters, and the optimization of the number of partitions.
[0192] It can be understood that when flash floods are zoned through steps S110 to S150, the attribute characteristics and spatial structure of the flash flood breeding background data are taken into consideration at the same time. The zone results fully reflect the complex spatial interactions of the flash flood breeding background data, which not only improves the zone accuracy, but also accurately captures the spatial distribution characteristics of the flash flood breeding background data, providing data support for the subsequent analysis of the impact of the flash flood breeding background data and its spatial variability.
[0193] In some embodiments, since existing explanation models can only be applied to supervised machine learning models, it is necessary to replace the unsupervised graph neural network with a supervised support model. The supervised support model is obtained by the following steps:
[0194] Step 160: Use the clustering results and node attribute matrix obtained by the unsupervised graph neural network to train the second supervised machine learning model. Specifically:
[0195] The second supervised machine learning model preferably adopts a random forest model, and the cluster label y of each node i is y = {y1, y2, ..., y N}∈R N×1 And the corresponding node attribute matrix X={x1,x2,...,x N} as the target variable, where N is the number of nodes, K is the number of clusters, and or Divide the training set and test set in a ratio of 8:2 and train the second supervised machine learning model ML():
[0196] y i =ML(x i ,θ)
[0197] Among them, y i It is the cluster label of node i in the graph structure data G, and the cluster label is used as the supervision signal; i is the attribute vector of node i, see the attribute vector x of the node in step S134 for details. i ; θ is the parameter of the second supervised machine learning model.
[0198] By training the second supervised machine learning model based on the clustering results of GNN, a supervised support model is obtained. To a certain extent, the supervised support model can be used to replace the unsupervised graph neural network in the flash flood zoning process, so that the explanation model can be applied to the supervised support model to obtain the explanation results.
[0199] In some embodiments, step S200 specifically includes:
[0200] The SHAP explanation model is applied to the first supervised machine learning model or the supervised support model. The SHAP explanation model provides an explanation by the marginal contribution of each dimension of flash flood incubation background data to the prediction results of the first supervised machine learning model or the supervised support model. For each node i (i.e., each grid point), Indicates the explanation model for Background data on the generation of flash floods in Weihai Cluster label y for the node i The predicted contribution value is calculated as follows:
[0201]
[0202] in, It is Dimensional flash flood breeding background data, that is, the feature vector x of node i i The Features It is Cluster label y of node i based on the background data of mountain torrents i The contribution value of the prediction; S is the feature subset, which means that Other dimensions of flash flood breeding background data subsets, that is, in addition to flash flood breeding background data Other flash flood-causing background data; g(S) is the prediction result of the first supervised machine learning model or supervised support model trained on the feature subset S for node i; It is in the feature subset S plus In the case of , the prediction result of the first supervised machine learning model or the supervised support model for node i, that is, the first supervised machine learning model or the supervised support model is added After that, the output changes; It represents the expectation of all possible feature subsets S. It is necessary to consider all possible feature combinations and calculate the marginal contribution of the features in all combinations through the expected value.
[0203] By calculating the contribution values of all nodes (grid points), we can obtain the global impact (the average impact of the flash flood breeding background data on the partition results of the entire target area) and local impact (the impact of the flash flood breeding background data on each grid point) of each dimension of flash flood breeding background data.
[0204] Global impact: The contribution of all nodes is averaged to obtain the The global impact of the flash flood breeding background data, indicating the flash flood breeding background data Average contribution size across the entire target area:
[0205]
[0206] Repeat the above calculation for all dimensions of flash flood breeding background data to obtain the global impact of all dimensions of data. d is the dimension of the background data of flash floods.
[0207] Local influence: For each individual node i, its local contribution value can be calculated This means that the The specific contribution of the flash flood breeding background data to the partitioning results of node i.
[0208] In some embodiments, see Figure 1 , the quantitative evaluation method provided by the embodiment of the present invention also includes:
[0209] Step S300: Global impact of flash flood breeding background data of various dimensions obtained by the interpretation model Determine the ranking of the impact of input data R on the zoning results, and determine the impact differences of each flash flood breeding background data; for local impact, the impact of flash flood breeding background data of each node and all dimensions is spatially visualized according to the latitude and longitude of the node in GIS software, and the spatial variability of the impact of flash flood breeding background data in each dimension is analyzed.
[0210] The following is a specific embodiment of the quantitative evaluation method of the present invention:
[0211] This embodiment is used to quantitatively evaluate the impact of flash flood spawning background data on flash flood zoning based on the flash flood zoning results in the Hengduan Mountain area. The specific steps of this embodiment are as follows:
[0212] Step S100: Collect the background data of flash floods in the Hengduan Mountain area, and apply the unsupervised graph neural network to obtain the flash flood partitioning results in the Hengduan Mountain area, where the partitioning results are the cluster labels y = {y1, y2, ..., y 108503}∈R 108503 Based on the obtained partitioning results and the flash flood incubation background data, a random forest model is trained to train a supervised support model that can replace the original graph neural network. This step specifically includes:
[0213] Step S110: Collect extensive data on the topography, climate, meteorology, hydrology, and underlying surface of the Hengduan Mountain area. Raster data with higher spatial resolution is used as the primary input, and vector data is also permitted. Data from 61 dimensions is collected, including 30 extreme rainfall data at multiple statistical frequencies and 31 other background data. All data are resampled to 2×2 km. 2 The raster data of spatial resolution is clipped according to the range of Hengduan Mountain Area to obtain the initial data R0 = {r1, r2, ... r 61}, the data dimension of R0 is 61.
[0214] Step S120: Perform correlation analysis and multicollinearity analysis on the data of each dimension in the initial data R0, identify and eliminate data with correlation > 0.7 and variance inflation factor > 10. Specifically: Based on literature reading and research on the Hengduan Mountain area, 12 typical extreme rainfall data were selected from 30 extreme rainfall data, including the maximum 3-hour / 6-hour / 12-hour / 24-hour rainfall of 100-year and 2-year return periods, and the maximum 3-hour / 6-hour / 12-hour / 24-hour multi-year average rainfall; at the same time, 6 soil attribute data and water flow intensity index with high correlation were eliminated. The input data R in raster form is obtained as {r1, r2, ..., r i ,…r 36}, 36 is the number of data dimensions of the input data R.
[0215] Step S130: construct the grid-formatted input data R into graph structure data G=(V, E, X). The specific steps are as follows:
[0216] Step S131, constructing a node matrix V: For the input data R in grid form, the Hengduan Mountain area is 2×2 km 2 There are 108503 grid points in the raster data. All the raster data are converted into graph structure data G = (V, E, X). Each grid point is regarded as a node in the graph structure, and the node matrix V = {v1, ..., v 108503}, each node is associated with corresponding 36-dimensional attributes.
[0217] Step S132: Construct a KD tree to find neighbor nodes: Calculate the distance between nodes based on the latitude and longitude of the nodes, and construct the edge set between nodes based on the eight-neighborhood rule according to the number of nearest nodes and the upper limit of the neighboring distance. The KD tree is used to find the nearest neighbor nodes of each node to obtain the neighbor node set of each node.
[0218] Step S133, construction and normalization of adjacency matrix: For each node i, if there is an adjacency relationship between node i and node j, then a ij =1, otherwise a ij =0, thus constructing the adjacency matrix A0∈{0,1} 108503×108503 Then the adjacency matrix A0 is symmetrically normalized to obtain the normalized adjacency matrix A∈R 108503×108503 .
[0219] Step S134: Construct node attribute matrix X: Take the 36 input flash flood breeding background data selected on each node as the attribute vector x of each node i , thus constructing the node attribute matrix X={x1,x2,...,x 108503}∈R108503×36 , where the i-th row represents the 36-dimensional feature vector of node i.
[0220] Through the above process, the conversion of raster input data R into graph structure data G is realized.
[0221] Step S140: For the case where the number of partitions is not set in the Hengduan Mountain area, for all partition numbers (2 to 20), the graph structure data G = (V, E, X) is used as input, and the graph neural network is used for traversal calculation. Through the optimization algorithm, the clustering effectiveness index is used as the optimization target to search and determine the optimal number of partitions, thereby determining the partitioning result of the grid scale. The specific steps refer to the aforementioned steps S1421 to S1425 and are not repeated here. Among them, the graph neural network parameters of this embodiment are set as follows: specify the training device device = cuda (using GPU acceleration), the tradeoff parameter tradeoff = 1e-10, the activation function activate = relu, the number of hidden layer units of the model hid-units = 512, the number of layers of the encoder part encoder_layer = 1, the number of layers of the projector part projector_layer = 1, the learning rate lr = 1e-2, the total number of training rounds epochs = 100, the number of neighbors of each node in the graph num_neighbors = 8, and the upper limit of the distance during neighbor search distance_upper_bound = 100.0. Determine the optimal number of clusters through optimization algorithms That is, the optimal number of partitions, and get the optimal number of partitions The corresponding grid-scale flash flood zoning results. Figure 3 , Figure 3 (a) is the value of the clustering effectiveness index DBI when the number of partitions is 2 to 20. Figure 3 (b) is the value of the clustering effectiveness index CQI when the number of clusters is 2 to 20. Figure 4 Middle (a) shows the flash flood zoning results in the Hengduan Mountain area based on the graph neural network model.
[0222] Step S150: If the target area has available historical flash flood event data, the accuracy of the partitioning result is further verified by using the historical flash flood events. Figure 4 , Figure 4 (a) shows the flash flood zoning results in the Hengduan Mountain area based on the graph neural network model. There are 12 zoning units in total, marked as SW-1, W-2, NW-3, NW-4, M-5, M-6, SW-7, SE-8, NE-9, NE-10, E-11, and M-12. The points in the figure represent historical flash flood events. Figure 4 (b) shows the number and density of historical flash flood events in each sub-unit. Figure 4 (c) is the spatial statistical z-value of historical flash flood events in each sub-unit. The specific steps are as follows:
[0223] By overlaying historical flash flood event data with the flash flood zoning results for the Hengduan Mountain area, we analyzed the correspondence between each zoning unit and the spatial distribution pattern of historical flash flood events. This indicates that the zoning results can reflect the spatial distribution pattern of historical flash flood events. First, we calculated the number and density of historical flash flood events within each zoning unit. We found that SW-1, SW-7, and SE-8 had a high number of historical flash flood events (364, 187, and 433, respectively) and a high density (0.00896, 0.00627, and 0.00947 events per square kilometer, respectively). Meanwhile, NW-3, NW-4, M-6, and M-12 had a low number of historical flash flood events (0, 110, 35, and 5, respectively) and a low density (0, 0.00153, 0.00140, and 0.00018 events per square kilometer, respectively). This suggests that the number and density of historical flash flood events within each zoning unit differ significantly. GIS software was then used to perform hotspot analysis, calculating the spatial statistical z-values of the distribution of historical flash flood events within each sub-unit to determine the spatial distribution structure of the significance of historical flash flood events. For sub-units with positive z-values, higher z-values indicate more significant spatial clustering of flash flood events; for sub-units with negative z-values, lower z-values indicate a more sparse spatial distribution of flash flood events. It can be seen that the z-values within sub-units SW-1, SW-7, and SE-8 are 4.336, 3.451, and 3.950, respectively, indicating spatial clustering of historical flash flood events. The z-values within sub-units NW-3, NW-4, M-6, and M-12 are -3.000, -2.331, -1.942, and -1.993, respectively, indicating sparse distribution of historical flash flood events. The z-values within these sub-units exhibit significant large positive values or small negative values. This shows that flash flood zoning can reflect the spatial distribution characteristics of historical flash flood events (such as densely or sparsely distributed areas), which shows the reliability and rationality of the flash flood zoning results.
[0224] Step S160: The existing explanation model can only be applied to the results of supervised machine learning models. Therefore, the random forest model is trained based on the clustering results and node attribute matrix obtained by the graph neural network. The cluster label y of each node is set to {y1, y2, ..., y 108503}∈R 108503×1 And the corresponding node attribute matrix X={x1,x2,...,x 108503}∈R 108503×36As the target variable, we set the number of clusters to 12, split the training set and test set in an 8:2 ratio, and trained a random forest model with n_estimators = 100 decision trees. The resulting random forest model achieved an accuracy of 0.9, indicating that the random forest model trained based on the clustering results of the graph neural network can effectively replace the original graph neural network. Therefore, we can apply the interpretation model to this random forest model to obtain interpretation results.
[0225] Step S200: Apply the SHAP interpretation model to the trained random forest model and node attribute matrix. The interpretation model provides an explanation based on the marginal contribution of each dimension of flash flood breeding background data to the prediction results of the random forest model. By calculating the contribution values of all nodes (grid points), the global impact (the impact of flash flood breeding background data on the flash flood zoning results of the entire Hengduan Mountain area) and local impact (the impact of flash flood breeding background data on each grid point) of each dimension of flash flood breeding background data can be obtained. Figure 5 , taking the Hengduan Mountain area as an example, the global impact of flash flood breeding background data obtained based on the SHAP interpretation model on the flash flood zoning results.
[0226] Step S300: Based on the global impact, determine the impact ranking of the input data R on the partition results, and analyze the impact differences of each flash flood breeding background data. Figure 5 , taking the Hengduan Mountain area as an example, the global impact of flash flood breeding background data obtained based on the SHAP interpretation model on the flash flood zoning results. The five factors that have the greatest influence on the flash flood zoning in the Hengduan Mountain area are temperature (the SHAP absolute value of this factor accounts for 8.29% of the total SHAP absolute values of 36 factors), maximum 12-hour multi-year average rainfall (7.41%), maximum 24-hour multi-year average rainfall (6.49%), soil moisture (5.71%), and maximum 24-hour two-year rainfall (5.69%). Among the top ten breeding factors, six are related to extreme precipitation (total proportion: 55.03%), highlighting the important influence of extreme precipitation in driving the occurrence of flash floods in the Hengduan Mountain area. For local impacts, the impact of flash flood breeding background data of each node and all dimensions is spatially visualized according to the longitude and latitude of the node in GIS software to analyze the spatial variability of the impact of flash flood breeding background data in each dimension. See Figure 6 , taking the Hengduan Mountain area as an example, the spatial variation of the local impact of flash flood incubation background data on flash flood zoning results obtained based on the SHAP interpretation model. Temperature showed a significant positive impact in the Three Parallel Rivers area in the central Hengduan Mountain area, see Figure 6 Middle (a); Altitude has a significant positive impact on the erosion and incision areas along the Yalong, Dadu, and Minjiang Rivers in the central and northwestern Hengduan Mountains, but a negative impact in the southern Hengduan Mountains. Figure 6Middle (b): The maximum 12-hour average rainfall and the maximum 24-hour average rainfall have a significant positive impact on flash floods on both the east and west sides of the Hengduan Mountains, with the strongest impact on the eastern edge of the Hengduan Mountains. Figure 6 Middle (c) to (d); Soil moisture has a significant positive impact in the southern Hengduan Mountains, but not in the central and northern parts. Figure 6 Middle (e); the influence of soil saturated hydraulic conductivity is mainly concentrated on the east and west sides of the Hengduan Mountain area, and also has a certain positive effect in the southern part of the Hengduan Mountain area. Figure 6 This shows that the SHAP explanatory model can quantify the global and local impacts of flash flood initiation factors and analyze the spatial variability of the impact of each initiation factor, demonstrating the effectiveness and interpretability of the explanatory model application, which is of great significance for the study of flash flood initiation mechanisms.
[0227] In summary, the embodiment of the present invention first obtains the flash flood zoning results of the target mountainous area based on an unsupervised graph neural network. During the zoning process, a graph neural network model that can simultaneously consider the attribute characteristics and topological structure of the input data is applied for cluster analysis. The flash flood zoning results obtained in the Hengduan Mountain area can reflect the spatial distribution pattern of historical flash flood events and the flash flood breeding background. An optimization algorithm is applied to automatically determine the number of partitions most suitable for the Hengduan Mountain area, making the zoning process more intelligent and objective, and less affected by human factors. Therefore, the automated flash flood zoning method adopted by the embodiment of the present invention can provide technical support for flash flood risk assessment and the deployment of refined flood prevention and disaster reduction measures in mountainous areas. In addition, the embodiment of the present invention introduces the SHAP interpretation model to provide a quantitative explanation for the results of the graph neural network. SHAP simulates and quantifies the perturbation effect of input factors to accurately evaluate the impact of each breeding background factor and its combination on the zoning results, thereby revealing the key driving factors behind the zoning. Combined with the SHAP interpretation model, it is possible to achieve a quantitative evaluation of the impact of flash flood breeding background factors, provide a scientific basis for the zoning results, clarify the role of each factor in flash flood formation, and facilitate the precise management of flash flood disasters and the optimization of defense measures.
[0228] Throughout this specification, reference to terms such as "one embodiment," "some embodiments," "illustrative embodiments," "examples," "specific examples," or "some examples" means that a specific feature, structure, material, or characteristic described in conjunction with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, illustrative uses of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
[0229] Although the embodiments of the present application have been shown and described, those skilled in the art will appreciate that various changes, modifications, substitutions, and variations may be made to the embodiments without departing from the principles and intent of the present application, and that the scope of the present application is defined by the claims and their equivalents.
Claims
1. A quantitative evaluation method for the single factor impact of flash flood incubation background data on flash flood zoning, characterized by: The following steps are involved: Step S100: collecting flash flood incubation background data of a target area, pre-processing the data, and applying a flash flood zoning model to obtain a flash flood zoning result of the target area. The flash flood zoning model adopts a first supervised machine learning model or a first unsupervised machine learning model. For the first unsupervised machine learning model, a second supervised machine learning model is trained using the flash flood zoning result to learn the zoning result of the first unsupervised machine learning model to obtain a supervised support model. Step S200: Input the first supervised machine learning model or the supervised support model and the flash flood breeding background data of the target area into an explanatory model. The explanatory model provides the contribution of each dimension of the flash flood breeding background data in the flash flood zoning process through the marginal contribution of each dimension of the flash flood breeding background data to the prediction result of the first supervised machine learning model or the supervised support model, and obtains the influence of each dimension of the flash flood breeding background data on the flash flood zoning result. In step S100, the flash flood zoning result of the target area is obtained by using an unsupervised graph neural network, and the specific steps include: Step S110: resampling all the collected flash flood background data of the target area into raster data of uniform spatial resolution, and clipping the raster data according to the range of the target area to obtain initial data R0; Step S120: performing correlation analysis and multicollinearity analysis on the data of each dimension in the initial data R0, identifying and eliminating data dimensions whose correlation and variance inflation factor do not meet the requirements, and obtaining input data R in grid form; Step S130: For the grid-form input data R, each grid is regarded as a node, a node matrix V is constructed, edges between nodes are determined based on the distances between the nodes, an edge set E and a normalized adjacency matrix A are constructed, and a node attribute matrix X is constructed based on the input data R, thereby constructing the grid-form input data R into graph structure data G = (V, E, X); Step S140: For a case where the number of partitions has been set for the target area, based on the set number of partitions, the graph structure data G=(V, E, X) is used as input, and clustering analysis is performed through a graph neural network to obtain a grid-scale partitioning result; for a case where the number of partitions has not been set for the target area, for all numbers of partitions, the graph structure data G=(V, E, X) is used as input, and a traversal calculation is performed using a graph neural network. Through an optimization method, with the clustering effectiveness index as the optimization target, the optimal number of partitions is searched and determined, thereby determining a grid-scale partitioning result.
2. The quantitative evaluation method according to claim 1, wherein In step S130, the distance between nodes is calculated based on the latitude and longitude attributes of the nodes in the grid input data R, and the edges between the nodes are established according to the eight-neighborhood or four-neighborhood rule based on the number of the nearest nodes and the upper limit of the proximity distance, to obtain the edge set Used to represent a set of edges connecting different nodes, (i, j) represents an edge connecting node i and node j, i≠j.
3. The quantitative evaluation method according to claim 2, characterized in that In step S130, the steps of constructing the normalized adjacency matrix A include: Find the nearest neighbor node to node i through KD tree: neighbors i =KDTree.query(C i ,num_neighbors+1,distance_upper_bound) Among them, neighbors i Represents all neighbor nodes of node i; KDTree.query(·) represents the KD tree calculation function; each node i has longitude log i and latitude lat i Two attributes, all nodes form a two-dimensional coordinate set C, which contains the latitude and longitude attributes of all nodes C i =(log i ,lat i ) is the latitude and longitude attribute of node i, N is the number of grids contained in each dimension of the input data R; num_neighbors is the number of neighbor nodes found in the neighborhood for each node; distance_upper_bound represents the upper limit of the distance to find neighbor nodes; neighbors i Remove node i from itself and get the neighbor node set neighbors of node i i '; For nodes i and j, if node i is adjacent to node j, that is, j∈neighbors i ′, then a ij =1, otherwise a ij =0, thus constructing the adjacency matrix A0={a ij |(i,j)∈V 2 }∈R N×N ; Perform symmetric normalization on the adjacency matrix A0 to obtain the normalized adjacency matrix a: a=D -1 / 2 A0D -1 / 2 ∈R N×N Where D = {d' i |i∈V} is the degree matrix, which is a diagonal matrix whose diagonal elements are the degree d' of each node. i =∑ j a ij ,i∈V,j∈V.
4. The quantitative evaluation method according to claim 1, wherein: In step S140, if the number of partitions has been set for the target area, the number of partitions is set to K. Based on the number of partitions, the graph structure data G = (V, E, X) is used as input, and cluster analysis is performed through a graph neural network to obtain grid-scale partitioning results. The specific steps include: Step S1411: For the node attribute matrix X∈R N×d and the normalized adjacency matrix A∈R N×N The original graph structure data G = {X, A}, N is the number of grids in each dimension of the input data R, d is the dimension of the flash flood breeding background data, through data enhancement operation Generating augmented data Step S1412: Use graph neural network to analyze the original graph structure data G and the enhanced data The node representations are calculated separately, and the graph neural network updates the node representations through multi-layer graph convolution: H (l+1) =σ(AH (l) W (l) ) Among them, H (l) is the node representation of the lth layer in the graph neural network; W (l) is the weight matrix of the lth layer in the graph neural network; σ(·) is the activation function; After multi-layer graph convolution, the original graph structure data G and enhanced data are obtained The nodes represent H, in, is the graph neural network function; is the attribute vector x of constraint node i i Instead of enhancing the attribute vector Contrastive learning between the two, using the contrast loss function for: Among them, h i and are the node representations of the original graph structure data and enhanced data of node i, respectively; Sim(·,·) represents the similarity between nodes; Step S1413: For the node representation H={h1,h2,...,h N }, apply the K-means method to initialize the cluster center set C, and use the cluster center as the learnable parameter of the graph neural network, and calculate the distance metric Each node represents h i Assign to the nearest cluster center c k Optimizing the total clustering loss of graph neural networks via backpropagation and gradient descent In each round of iteration, the cluster center set C and the classification of the nodes are updated to obtain the final cluster center set and the cluster label representation of each node; The total clustering loss The expression is: in, is the cluster expansion loss, is the clustering shrinkage loss, τ is a hyperparameter used to control the balance between expansion and contraction; c A ∈C and c B ∈C are the cluster centers of cluster A and cluster B respectively, are all nodes in cluster A; In each round of iteration, for the node Update the cluster center c according to the following formula A : Among them, |C A | is the number of nodes in cluster A; Step S1414: Visualize the cluster label of each node in space according to the longitude and latitude of the node to obtain a grid-scale flash flood zoning result.
5. The quantitative evaluation method according to claim 4, characterized in that: In step S140, if the number of partitions is not set for the target area, all the numbers of partitions are calculated using the graph neural network with the graph structure data G = (V, E, X) as input. The optimal number of partitions is searched and determined by the optimization method with the clustering effectiveness index as the optimization target, thereby determining the grid-scale partitioning result. The specific steps include: Step S1421: Set is the initial number of clusters, δ and ε are proportional coefficients; based on the current number of clusters set, perform cluster analysis according to steps S1411 to S1414, calculate the corresponding cluster effectiveness index based on the clustering results, and set the objective function is the weighted sum of clustering effectiveness indices: in, is the current number of clusters, i.e. the current solution; α and β are weight coefficients; and It is an effectiveness indicator calculated based on the clustering results of graph neural networks. It is the sum of the average coefficient of variation of the flash flood breeding background data selected in the clustering results, and is used to quantify the degree of dispersion of the selected flash flood breeding background data. The distance between cluster centers is used to evaluate the closeness and dispersion of clustering results. and The lower the value, the better the clustering effect. The calculation formulas are as follows: Among them, |C w |The number of nodes in cluster category w, d is the dimension of the flash flood breeding background data, is the coefficient of variation of the background data of the rth dimension in cluster category w; is the standard deviation of the background data of the rth dimension in cluster category w, is the mean of the background data of the rth dimension in cluster category w; is the average distance from all nodes in cluster category w to the cluster center, is the average distance from all nodes in cluster category t to the cluster center, d wt is the distance between the centroid of cluster category w and the centroid of cluster category t; Step S1422: From the current number of clusters Generate a new neighborhood solution Among them, γ is -1 or 1; Step S1423: Calculate the current number of clusters and neighborhood solutions The objective function value of and And calculate the difference ΔE between the two: The following criteria are used to decide whether to accept the neighborhood solution If ΔE≤0, then accept the neighborhood solution as the new current number of clusters; If ΔE>0, then accept the neighborhood solution according to the probability P(ΔE) As the new current number of clusters, the probability is determined by the parameter T, and the formula is as follows: Among them, the parameter T gradually decreases after each iteration as the algorithm progresses; Step S1424: Update the parameter T using an exponential decay method: T=α T T Among them, α T is a constant, α T ∈(0,1); Step S1425: Repeat steps S1421 to S1424 until the iteration meets the termination condition, the iteration ends, and the optimal number of clusters is obtained. And its corresponding grid-scale flash flood zoning results.
6. The quantitative evaluation method according to any one of claims 1 to 5, characterized in that: After obtaining the flash flood zoning result, the method further includes: Step S150: Obtain historical flash flood event data of the target area, and use the historical flash flood event data to evaluate the obtained partitioning results. Specifically, superimpose the historical flash flood event data of the target area in the partitioning results, calculate the number and density of historical flash flood disaster events in each partition unit, apply the hotspot analysis method to calculate the z value of the spatial distribution of historical flash flood events in each partition unit, and determine the spatial distribution structure of the significance of historical flash flood events; if the number and density of historical flash flood events in each partition unit in the partitioning results are significantly different, and the historical flash flood events in some partition units have a significant spatial distribution structure, then it means that the partitioning results correspond well to the spatial distribution of historical flash flood events, indicating that the partitioning results are accurate; if there is no significant difference in the number and density of historical flash flood events in each partition unit in the partitioning results, and there is no significantly higher positive value or lower negative value in the z value of each partition unit, then re-perform clustering analysis from the aspects of flash flood breeding background data selection, graph neural network model parameter determination and / or partition number optimization to obtain the flash flood partitioning results.
7. The quantitative evaluation method according to claim 6, characterized in that: The supervised support model is obtained by following the steps below: Step 160: Train the second supervised machine learning model using the clustering results and node attribute matrix obtained by the graph neural network. Specifically: The cluster label y of each node i is y={y1,y2,...,y N }∈R N×1 And the corresponding node attribute matrix N={x1,x2,...,x N } as the target variable, where N is the number of nodes and K is the number of clusters, and the second supervised machine learning model ML() is trained: yes i =ML(x i ,θ) Among them, y i is the cluster label of node i in the graph structure data G, and the cluster label is used as a supervisory signal; i is the attribute vector of node i; θ is the parameter of the second supervised machine learning model.
8. The quantitative evaluation method according to claim 6, characterized in that: In step S200, for each node i, let the explanation model be Background data on the generation of flash floods in Weihai The cluster label y for node i i The predicted contribution is The calculation formula is as follows: Among them, S is the feature subset, which does not include Other dimension of flash flood breeding background data subset of flash flood breeding background data; g(S) is the result of the first supervised machine learning model or the supervised support model trained on the feature subset S to predict the node i; It is in the feature subset S plus In the case of , the prediction result of the first supervised machine learning model or the supervised support model for node i; Represents the expectation of all possible feature subsets S; By calculating the contribution values of all nodes, the global and local impacts of each dimension of flash flood incubation background data are obtained, where: Set up the first The global impact of the background data on flash floods is Indicates the background data of flash floods The average contribution size in the entire target area is calculated as follows: The global impact of all dimensional data d is the dimension of the background data of flash floods; The local impact is taken as the contribution value As a local contribution Indicates the The specific contribution of the flash flood breeding background data to the partitioning results of node i.
9. The quantitative evaluation method according to claim 8, characterized in that: The quantitative evaluation method further comprises: Step S300: Global impact of flash flood breeding background data of various dimensions obtained by the interpretation model Determine the ranking of the impact of input data R on the partitioning results, and determine the impact differences of each flash flood breeding background data; for local impact, visualize the impact of flash flood breeding background data of each node and all dimensions in space according to the longitude and latitude of the node, and analyze the spatial variability of the impact of flash flood breeding background data in each dimension.
Citation Information
Patent Citations
Method and system for judging transient stability of power system based on interpretable graph neural tree
CN118427720A
Method for predicting Qinghai-Tibet Plateau landslide based on artificial intelligence
CN119090268A
River village mountain torrent disaster evaluation method based on machine learning
CN119130106A