Quantitative evaluation method for single-factor influence of mountain torrent breeding background data on mountain torrent partition
The flash torrent partitioning is performed through the graph neural network, and the quantification of the influence of factors is used to explain the model, which solves the problem of insufficient accuracy and interpretability of the flash torrent partitioning results in the existing technology, and achieves more scientific and efficient flash torrent disaster management.
Patent Information
- Application Number
- CN202510105937.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-23
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2045-01-23
AI Technical Summary
The existing technology is difficult to effectively quantify the single-factor impact of the background factors of the mountain torrent breeding on the mountain torrent partition, resulting in insufficient accuracy and interpretability of the partition results, which limits the implementation of scientific and efficient disaster prevention and mitigation measures.
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 partition results is quantified, so as to achieve transparency and interpretability of partition results.
The accuracy and interpretability of the results of the mountain torrent partition are improved, and the specific mechanisms and spatial differences of the background factors of each mountain torrent breeding are clarified, providing scientific basis and decision-making support for the management of mountain torrent disasters.
Smart Images

Figure CN119941045A_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, artificial intelligence application, etc., and specifically relates to a quantitative evaluation method for the single factor influence of flash flood breeding background data on flash flood zoning, providing efficient and intelligent technical support for disaster prevention and reduction work in mountainous areas. Background Art
[0002] Flash floods are short-term extreme runoff processes in small watersheds in mountainous areas caused by extreme rainfall, outburst of barrier lakes, outburst of glacial lakes, etc., which are characterized by strong suddenness and great destructive power. They are one of the main natural disasters that threaten 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, especially in complex terrain conditions in mountainous areas, where the frequency and impact of flash flood disasters are more significant. The breeding background of flash floods is complex, including topographic and geomorphic conditions, climate state and convection and diffusion of meteorological factors, spatial heterogeneity of the underlying surface, and the complex interaction of the three. However, there is currently insufficient quantitative research on the impact of flash flood breeding background factors on flash floods, which hinders the in-depth understanding of the formation mechanism of flash floods and limits the implementation of scientific and efficient disaster prevention and mitigation measures.
[0003] Flash flood zoning is a key method for quantitatively analyzing the spatial heterogeneity of flash flood breeding background. It can reveal the spatial similarities and differences of flash flood breeding background factors by dividing homogeneous areas, and provide a scientific basis for flash flood disaster risk management in data-free mountainous areas. The input data of flash flood zoning is generally breeding background data, which is geographic data with significant spatial interrelationships. Therefore, the zoning method that considers the spatial structure of input data can more comprehensively reflect the spatial interaction of input data, and the zoning results are more reliable. Traditional zoning methods such as K-means clustering, Ward clustering, and machine learning-based random forests and convolutional neural networks only consider the attribute characteristics of input data and cannot fully utilize the spatial structure characteristics and interaction relationships of data. This limitation significantly restricts the accuracy and scientificity of the zoning results. In recent years, Graph Neural Networks (GNNs), as an emerging deep learning method, have shown unique advantages in processing spatially associated data. Graph neural networks can simultaneously utilize the attribute characteristics and spatial topological structure of input data, and are particularly suitable for the analysis of geographic data with complex spatial relationships. Compared with traditional methods, graph neural networks can capture the complex spatial interactions of flash flood-causing background factors, such as the upstream and downstream correlations between terrain undulations and river fluxes, the diffusion and local effects of meteorological factors, etc., thereby generating more reliable zoning results. In addition, the efficiency and robustness of graph neural networks in processing large-scale high-dimensional data give them great application potential in the field of flash flood zoning.
[0004] Although graph neural networks have significantly improved the accuracy of zoning results, their "black box" characteristics have challenged the interpretability of the results. This limits the in-depth understanding of the complex nonlinear relationship between the input breeding background data captured by advanced neural networks and flash flood zoning, and is not conducive to clarifying the specific mechanism of action and spatial differences of each flash flood breeding background factor, thereby hindering the application value and scientific guidance of the zoning results in actual flash flood disaster management. Therefore, it is urgent to develop a quantitative evaluation method for the single factor impact of flash flood breeding 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 in the target area, a graph neural network is used to carry out flash flood zoning, and the SHAP (Shapley Additive Explanations) explanation model is used to quantify the influence of flash flood breeding background factors on the zoning results, so as to realize the transparency and interpretability 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 influence of flash flood breeding background data on flash flood zoning, comprising the following steps:
[0009] Step S100, collecting flash flood breeding background data of the target area, applying the flash flood zoning model to the flash flood zoning data after preprocessing to obtain the 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 for the first unsupervised machine learning model, a second supervised machine learning model is trained by the flash flood zoning result to learn the zoning result of the first unsupervised machine learning model, so as 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, and the explanatory model provides the contribution 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 result of the first supervised machine learning model or the supervised support model, so as to obtain the influence of the flash flood breeding background data of each dimension on the flash flood zoning result.
[0011] In some embodiments, 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:
[0012] Step S110: resample all the collected background data of flash floods in the target area into raster data of uniform spatial resolution, and clip the raster data according to the range of the target area to obtain initial data R 0 ;
[0013] Step S120: 0 The data of each dimension in the grid are subjected to correlation analysis and multicollinearity analysis, and the data dimensions whose correlation and variance inflation factor do not meet the requirements are identified and eliminated to obtain the input data R in the form of a grid.
[0014] Step S130: for the grid-form input data R, each grid is regarded as a node, a node matrix V is constructed, the edges between nodes are determined according to 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, so that the grid-form input data R is constructed 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 is not 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, the clustering effectiveness index is used as the optimization target, and 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 according to 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 according to 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 the 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 to be found in the neighborhood for each node; distance_upper_bound represents the upper limit of the distance for finding 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 A 0 ={a ij |(i,j)∈V 2}∈R N×N ;
[0023] For the adjacency matrix A 0 Perform symmetric normalization to obtain the normalized adjacency matrix A:
[0024] A=D -1 / 2 A 0 D -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, in the case where 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 clustering analysis is performed through a graph neural network to obtain a grid-scale partition result. 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} represented by 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 process 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 multiple layers of graph convolution, we get the original graph structure data G and enhanced data 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 The contrastive learning between them adopts the contrastive 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={h 1 ,h 2 ,...,h N}, the K-means method is applied to initialize the cluster center set C, and the cluster center is used as the learnable parameter of the graph neural network. 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 nodes are updated to obtain the final cluster center set and 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 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 clustering label of each node in space according to the longitude and latitude of the node to obtain a flash flood zoning result at a grid scale.
[0046] In some embodiments, in step S140, 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 graph neural network is used to perform traversal calculations. By using an optimization method, the clustering effectiveness index is used as the optimization target, and the optimal number of partitions is searched and determined, thereby determining the partition result of the grid scale. The specific steps include:
[0047] Step S1421: Setting 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 indicators:
[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 coefficients of variation of the flash flood breeding background data selected in the clustering results, which is used to quantify the 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 background data of flash flood breeding, 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 in the rth dimension of 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 solution 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 with 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 proceeds;
[0062] Step S1424: Update parameter T using exponential decay:
[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, obtaining the historical flash flood event data of the target area, and using the historical flash flood event data to evaluate the obtained partitioning results. Specifically, superimposing the historical flash flood event data of the target area in the partitioning results, calculating the number and density of historical flash flood disaster events in each partition unit, applying the hotspot analysis method to calculate the z value of the spatial distribution of historical flash flood events in each partition unit, and determining 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 considering the selection of flash flood breeding background data, determination of graph neural network model parameters and / or optimization of the number of partitions, re-perform clustering analysis 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 = {y 1 ,y 2 ,...,y N}∈R N×1 And the corresponding node attribute matrix X = {x 1 ,x 2 ,...,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 occurrence of mountain torrents 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 a feature subset, which does not include Other dimensions of the flash flood breeding background data subset; 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 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 breeding background data are obtained, where:
[0077] Set up The global impact of the background data of 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 specific contribution of the flash flood breeding background data to the partition 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] 1. This paper proposes a new method based on graph neural network and explanatory model, constructs flash flood zoning based on breeding background data, and quantifies the impact of flash flood breeding background data on zoning results and its spatial variability. This method combines the advantages of graph neural network model in complex grid data processing and the characteristics of explanatory model in quantitative interpretation of neural network model results, improves the accuracy and interpretability of flash flood zoning results, and provides scientific basis and decision-making support for future flash flood disaster prevention and control.
[0085] 2. The graph neural network method used in the present invention considers both the attribute characteristics and spatial structure of the flash flood breeding background data during the partitioning process. The partitioning results fully reflect the complex spatial interactions of the flash flood breeding background data and accurately capture the spatial distribution characteristics of the flash flood breeding background data. The optimal number of partitions is automatically determined through the optimization algorithm, avoiding the interference of subjective human factors in the traditional partitioning method, and ensuring the scientificity and objectivity 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 the 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 the breeding background data and the flash flood partitioning into an explainable 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 It 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 a 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, application Figure 2 The method shown is the clustering effectiveness index when the number of clusters 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 The method shown in the figure obtains (a) the flash flood zoning result map and the spatial distribution of historical flash flood events; (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 5In the present invention, taking the Hengduan Mountain area as an example, the flash flood breeding background data obtained based on the SHAP interpretation model has a global impact 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 are: (a) temperature; (b) altitude; (c) maximum 12-hour multi-year average rainfall; (d) maximum 24-hour multi-year average rainfall; (e) soil moisture; (f) soil saturated hydraulic conductivity. DETAILED DESCRIPTION
[0093] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0094] On the contrary, the present application covers any substitution, modification, equivalent method and scheme made on the essence and scope of the present application as defined by the claims. Further, in order to make the public have a better understanding of the present application, some specific details are described in detail in the detailed description of the present application below. Those skilled in the art can fully understand the present application without the description of these details.
[0095] See also Figure 1 The first aspect 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 breeding background data of the target area, applying the flash flood zoning model to the flash flood zoning data after preprocessing to obtain the 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 for the first unsupervised machine learning model, a second supervised machine learning model is trained through the flash flood zoning result to learn the zoning result of the first unsupervised machine learning model, so as to obtain 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, and 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, so as to obtain the influence of the flash flood breeding background data of each dimension on the flash flood zoning results.
[0098] In some embodiments, see Figure 2In step S100, the flash flood partition result of the target area is obtained by using an unsupervised graph neural network, and the steps for obtaining the partition 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 the initial data R 0 ;
[0100] Step S120: Initial data R 0 The data of each dimension in the grid are subjected to correlation analysis and multicollinearity analysis, and the data dimensions whose correlation and variance inflation factor do not meet the requirements are identified and eliminated to obtain the input data R in the form of a grid.
[0101] Step S130: for the input data R in grid form, each grid is regarded as a node, a node matrix V is constructed, the edges between nodes are determined according to 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, so that the input data R in grid form is constructed 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 not easy 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 R 0 = {r 1 ,r 2 ,…r m}, m is R 0 The number of data dimensions.
[0104] In some embodiments, in step S120, the initial data R 0When performing correlation analysis and multicollinearity analysis on the dimensional data within the grid, the data dimensions with correlation greater than 0.7 and variance inflation factor greater than 10 are identified and eliminated, thereby obtaining the input data in the form of a grid R = {r 1 ,r 2 ,…,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 regard each grid point as a node in the graph structure, and construct a node matrix V = {v 1 ,…,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 according to the longitude and latitude attributes of the nodes, and the edges between nodes are established according to the eight-neighborhood (or four-neighborhood) rule according to the number of the nearest nodes and the upper limit of the neighboring distance, and the edge set is obtained. 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 to 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 indicates the upper limit of the distance for finding neighbor nodes, and only nodes within this distance range are found. After that, remove node i itself and get the neighbor node set neighbors of node i i '.
[0110] Step S133: Construction and normalization of adjacency matrix: neighbors i ' is the set of neighbor nodes of node 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 A 0 ={a ij |(i,j)∈V 2}∈R N×N . For the adjacency matrix A 0 Normalization is performed to enhance the stability of graph neural networks. Symmetric normalization is usually used. The formula is:
[0111] A=D -1 / 2 A 0 D -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 more suitable for processing by graph neural networks.
[0113] Step S134: Construct node attribute matrix X: Use 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,dare the elements of the 1st to dth dimensions in the attribute vector of node i respectively. The node attribute matrix X composed of the attribute vectors of all nodes is 1 ,x 2 ,...,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, in 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 cluster analysis is performed through a graph neural network 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 disturbance, etc. N×d And the normalized adjacency matrix A∈R N×N The original graph structure data G = {X, A} represented by data enhancement generates 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 The node representations are calculated separately, and the graph neural network updates the node representations 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 multiple layers of graph convolution, we get the original graph structure data G and enhanced data The nodes represent H, For subsequent clustering operations, it is expressed as:
[0123]
[0124] Among them, H and They 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 , while minimizing the similarity between different nodes, trains 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 (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); 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 = {h 1 ,h 2 ,...,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, and the initialization includes the following two steps:
[0133] First, randomly select The 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 away 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 Try to push different cluster centers apart so that the nodes in each cluster are as similar as possible, and the nodes between different clusters are as different as possible. Expand 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 in 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 back propagation 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 from each node to 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 finally 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 = {y 1 ,y 2 ,...,y N}∈R N×1 , where N is the number of nodes. The cluster label of each node is visualized spatially according to the longitude and latitude 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 probability 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 and eventually zero probabilistic jump, 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 proportional coefficients. Based on the set number of clusters Perform cluster analysis according to steps S1411 to S1414, calculate the corresponding cluster effectiveness index (CQI and DBI) based on the clustering results, and set the objective function is the weighted sum of clustering effectiveness indicators:
[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 coefficients of variation of the flash flood breeding background data selected in the clustering results, which quantifies the 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 background data of flash flood breeding, 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] Among them, is the standard deviation of the r-th dimension gestation background data in the clustering category w, is the mean value of the r-th dimension gestation background data in the clustering category w.
[0165]
[0166] Among them, is the currently set number of clusters, is the average distance from all nodes in the clustering category w to the cluster center, is the average distance from all nodes in the clustering category t to the cluster center, d wt is the distance between the centroid of the clustering category w and the centroid of the clustering category t.
[0167] Step S1422, neighborhood solution selection: Generate a new neighborhood solution from the current solution
[0168]
[0169] where γ is a constant, taking -1 or 1.
[0170] Step S1423, acceptance criterion setting
[0171] Calculate the change in the objective function: Calculate the objective function values of the current solution and the neighborhood solution and calculate the difference ΔE between the two: and
[0172]
[0173] Decide whether to accept the neighborhood solution through the following criterion
[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] Among them, the parameter T gradually decreases after each iteration as the algorithm proceeds.
[0178] Step S1424: Parameter update
[0179] T gradually decreases as the algorithm progresses, usually in an exponential decay manner:
[0180] T=α T T
[0181] Among them, α T is a constant less than 1, usually set to α T ∈(0,1), for example, α T =0.95.
[0182] 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 the corresponding grid-scale flash flood zoning results, 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] Therefore, the optimization algorithm minimizes the objective function composed of clustering effectiveness indicators To optimize the choice of the number of clusters, the optimal number of clusters The corresponding objective function value Minimum. Based on the optimal number of clusters obtained That is, the optimal number of partitions, and the flash flood partition 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 also included:
[0187] Step S150: If the target area has available historical flash flood event data, the accuracy of the obtained partition result is verified using the historical flash flood event data. The specific steps are as follows:
[0188] The historical flash flood event data and the flash flood zoning result obtained in step S140 are superimposed and compared, and the correspondence between each zoning unit in the zoning result and the spatial distribution pattern of the historical flash flood events is analyzed, that is, the zoning result can reflect the spatial distribution pattern of the historical flash flood events, so as to evaluate the zoning result, specifically:
[0189] First, the number and density of historical flash flood disaster events in each subdivision unit were calculated.
[0190] Afterwards, the hotspot analysis method was applied to calculate the z-value of the spatial distribution of historical flash flood events in each partition unit to determine the spatial distribution structure of the significance of historical flash flood events: for partition units with positive z-values, the higher the z-value, the more significant the spatial clustering characteristics of flash flood events; for partition units with negative z-values, the lower the z-value, the sparser the spatial distribution of surface flash flood events. The GIS software hotspot analysis tool calculates the Getis-Ord Gi* statistics of the target area based on historical flash flood events. The z-score obtained can be used to analyze the location where the elements are clustered in space.
[0191] If the number and density of historical flash flood events in each partition unit in the partition results are significantly different, and the historical flash flood events in some partition units have a significant spatial distribution structure, it means that the partition results correspond well to the spatial distribution of historical flash flood events. If there is no significant difference in the number and density of historical flash flood events in each partition unit in the partition results, and there is no significantly higher positive value or lower negative value in the z value of each partition unit, that is, the partition results cannot well reflect the spatial distribution pattern of historical flash flood events, then the clustering analysis should be re-performed from the perspectives of flash flood breeding background data selection, graph neural network model parameter determination, and partition number optimization to obtain the flash flood partition results.
[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 interaction 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 the existing explanation model can only be applied to supervised machine learning models, it is necessary to replace the unsupervised graph neural network with a supervised support model, and the supervised support model is obtained according to the following steps:
[0194] Step 160: Train the second supervised machine learning model using the clustering results and node attribute matrix obtained by the unsupervised graph neural network. Specifically:
[0195] The second supervised machine learning model preferably adopts a random forest model, where the clustering label y of each node i is y = {y 1 ,y 2 ,...,y N}∈R N×1 And the corresponding node attribute matrix X = {x 1 ,x 2,...,x N} as the target variable, where N is the number of nodes, K is set as 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 is applied to the supervised support model to obtain the explanation result.
[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 through the marginal contribution of each dimension of flash flood breeding 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), Represents the explanation model for Background data on the occurrence of mountain torrents in Weihai Cluster label y for this node i The predicted contribution value is calculated as follows:
[0201]
[0202] in, It is The background data of flash floods, i.e., the feature vector x of node i i The Features It is The background data of mountain torrents is used to cluster the label y of node i i The contribution value of the prediction; S is the feature subset, which means that it does not contain Other dimensions of flash flood breeding background data subset of flash flood breeding background data, that is, in addition to flash flood breeding background data Other flash flood breeding 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 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 adds 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 values of all nodes are averaged to obtain the The global impact of flash flood breeding background data, indicating the flash flood breeding background data Average contribution size over 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 specific contribution of the flash flood breeding background data to the partition 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 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, 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 breeding 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 partition results in the Hengduan Mountain area, where the partition results are the cluster labels y={y 1 ,y 2 ,...,y 108503}∈R 108503 Based on the obtained partition results and flash flood breeding 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 background data on mountain torrents in the Hengduan Mountain area in terms of topography, climate, meteorology, hydrology, and underlying surface. When conditions permit, use raster data with higher spatial resolution, and allow some input data to be vector data. Collect data in 61 dimensions, including 30 extreme rainfall data at multiple statistical frequencies and 31 other background data. Resample all data to 2×2 km. 2 The raster data with spatial resolution is clipped according to the range of Hengduan Mountain area to obtain the initial data R 0 = {r 1 ,r 2 ,…r 61}, R 0 The data dimension is 61.
[0214] Step S120: Initial data R 0 The data of each dimension in the grid were subjected to correlation analysis and multicollinearity analysis, and the data with correlation > 0.7 and variance inflation factor > 10 were identified and eliminated. Specifically, based on literature reading and research on the Hengduan Mountain area, 12 typical extreme rainfall data were selected from the 30 extreme rainfall data, including the maximum 3-hour / 6-hour / 12-hour / 24-hour rainfall in the 100-year and 2-year 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 grid form is obtained as follows: 1 ,r 2 ,…,r i ,…r 36}, 36 is the number of data dimensions of the input data R.
[0215] Step S130: construct the input data R in the form of a grid into graph structure data G=(V, E, X). The specific steps are as follows:
[0216] Step S131, construct 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 total 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 = {v 1 ,...,v 108503}, each node is associated with a corresponding 36-dimensional attribute.
[0217] Step S132: Construct a KD tree to find neighbor nodes: Calculate the distance between nodes based on the longitude and latitude of the nodes, and construct the edge set between nodes according to the eight-neighborhood rule based on the number of nearest nodes and the upper limit of the neighboring distance. The KD tree is used to find the nearest neighbor node to each node and 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 A 0 ∈{0,1} 108503×108503 Then the adjacency matrix A 0 Perform symmetric normalization to obtain the normalized adjacency matrix A∈R 108503×108503 .
[0219] Step S134, constructing a node attribute matrix X: taking 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 = {x 1 ,x 2 ,...,x 108503}∈R 108503×36 , where the i-th row represents the 36-dimensional feature vector of node i.
[0220] Through the above process, the conversion of the input data R in raster form 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 the numbers of partitions (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 partition result of the grid scale. The specific steps refer to the aforementioned steps S1421 to S1425, which 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 when searching for neighbors distance_upper_bound = 100.0. Determine the optimal number of clusters through optimization algorithm 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 (a) shows the flash flood zoning result 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 historical flash flood events are used to further verify the accuracy of the partitioning result. Figure 4 , Figure 4 (a) is the flash flood zoning result in the Hengduan Mountain area based on the graph neural network model. There are 12 zoning units in total, which are 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 are 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] The historical flash flood event data and the flash flood zoning results of the Hengduan Mountain area are superimposed, and the correspondence between each zoning unit and the spatial distribution pattern of historical flash flood events in the zoning results is analyzed, that is, the zoning results can reflect the spatial distribution pattern of historical flash flood events. First, the number and density of historical flash flood events in each zoning unit are calculated. It can be seen that the number of historical flash flood events in SW-1, SW-7, and SE-8 is large (364, 187, and 433 events, respectively), and the density is large (0.00896, 0.00627, and 0.00947 events / square kilometer, respectively), and the number of historical flash flood events in NW-3, NW-4, M-6, and M-12 is small (0, 110, 35, and 5 events, respectively), and the distribution density is small (0, 0.00153, 0.00140, and 0.00018 events / square kilometer, respectively), indicating that the number and density of historical flash flood events in each zoning unit are significantly different. Afterwards, GIS software was used to perform hot spot analysis, calculate the spatial statistical z-value of the distribution of historical flash flood events in each partition unit, and determine the spatial distribution structure of the significance of historical flash flood events. For partition units with positive z-values, the higher the z-value, the more significant the spatial clustering characteristics of flash flood events; for partition units with negative z-values, the lower the z-value, the sparser the spatial distribution of flash flood events. It can be seen that the z-values in partition units SW-1, SW-7, and SE-8 are 4.336, 3.451, and 3.950, respectively, which belong to the spatial agglomeration areas of historical flash flood events, and the z-values in partition units NW-3, NW-4, M-6, and M-12 are -3.000, -2.331, -1.942, and -1.993, respectively, which belong to the spatial sparse distribution areas of historical flash flood events. The z-values in these partition units have 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 illustrates 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 clustering label y of each node is set to {y 1 ,y 2 ,...,y 108503}∈R 108503×1 And the corresponding node attribute matrix X = {x 1 ,x 2 ,...,x 108503}∈R 108503×36As the target variable, set the number of clusters to 12, divide the training set and the test set in a ratio of 8:2, train a random forest model, and the number of decision trees in the random forest model n_estimators = 100. The accuracy of the obtained random forest model is accuracy = 0.9, indicating that the random forest model trained based on the clustering results of the graph neural network can equally replace the original graph neural network, so that the explanation model can be applied to the random forest model to obtain the explanation result.
[0225] Step S200: Apply the SHAP interpretation model to the trained random forest model and node attribute matrix. The interpretation model provides an explanation through 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 most influential factors 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 the 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 breeding background data on flash flood zoning results obtained based on the SHAP interpretation model. Temperature has 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 River, Dadu River and Min River in the central and northwestern parts of the Hengduan Mountains, but has a negative impact in the southern part of the Hengduan Mountains, see Figure 6Middle (b); The maximum 12-hour average rainfall and the maximum 24-hour average rainfall have a significant positive impact on the occurrence of flash floods on the east and west sides of the Hengduan Mountains, with the strongest impact on the eastern edge of the Hengduan Mountains, see Figure 6 Middle (c) to (d); soil moisture has a significant positive impact in the southern part of the 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 Mountains, and also has a certain positive effect in the southern part of the Hengduan Mountains, see Figure 6 This shows that the SHAP explanatory model can quantify the global and local impacts of flash flood breeding factors, and can analyze the spatial variability of the impact of each breeding factor, which shows the effectiveness and interpretability of the application of the explanatory model, which is of great significance to the study of flash flood breeding mechanism.
[0227] In summary, the embodiment of the present invention first obtains the flash flood zoning result of the target mountain area based on the unsupervised graph neural network. In 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 result of the Hengduan Mountain area can reflect the spatial distribution pattern of historical flash flood events and the flash flood breeding background; the optimization algorithm is applied to automatically determine the number of partitions that is most suitable for the Hengduan Mountain area, so that the zoning process is more intelligent and objective, and is less affected by human factors. Therefore, the automated flash flood zoning method adopted in the embodiment of the present invention can provide technical support for the risk assessment of flash floods in mountainous areas and the deployment of refined flood prevention and disaster reduction measures; in addition, the SHAP interpretation model introduced in the embodiment of the present invention can provide a quantitative explanation for the results of the graph neural network. SHAP simulates and quantifies the perturbation effect of the input factors, accurately evaluates the influence 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 influence of the flash flood breeding background factors, provide a scientific basis for the zoning results, clarify the role of each factor in the formation of flash floods, and help the precise management of flash flood disasters and the optimization of defense measures.
[0228] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[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 spirit 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 breeding background data on flash flood zoning, characterized in that: The following steps are involved: Step S100, collecting flash flood breeding background data of the target area, applying the flash flood zoning model to the flash flood zoning data after preprocessing to obtain the 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 for the first unsupervised machine learning model, a second supervised machine learning model is trained by the flash flood zoning result to learn the zoning result of the first unsupervised machine learning model, so as 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 the explanatory model, and the explanatory model provides the contribution 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 result of the first supervised machine learning model or the supervised support model, so as to obtain the influence of the flash flood breeding background data of each dimension on the flash flood zoning result.
2. The quantitative evaluation method according to claim 1, characterized in that: 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 background data of flash floods in 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, the edges between nodes are determined according to 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, so that the grid-form input data R is constructed 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 is not 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, the clustering effectiveness index is used as the optimization target, and the optimal number of partitions is searched and determined, thereby determining a grid-scale partitioning result.
3. The quantitative evaluation method according to claim 2, characterized in that: In step S130, the distance between nodes is calculated according to the latitude and longitude attributes of the nodes in the grid-form input data R, and the edges between nodes are established according to the eight-neighborhood or four-neighborhood rule according to 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.
4. The quantitative evaluation method according to claim 3, 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 the 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 to be found in the neighborhood for each node; distance_upper_bound represents the upper limit of the distance for finding 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.
5. The quantitative evaluation method according to claim 2, characterized in that: In step S140, in the case where 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 clustering analysis is performed through a graph neural network to obtain a grid-scale partition result. 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} represented by N is the number of grids contained in each dimension of the input data R. Through data enhancement operation Generating augmented data Step S1412: Use graph neural network to process 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 multiple layers of graph convolution, we get the original graph structure data G and enhanced data 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 The contrastive learning between them adopts the contrastive 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 }, the K-means method is applied to initialize the cluster center set C, and the cluster center is used as the learnable parameter of the graph neural network. 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 nodes are updated to obtain the final cluster center set and 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 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 clustering label of each node in space according to the longitude and latitude of the node to obtain a flash flood zoning result at a grid scale.
6. The quantitative evaluation method according to claim 5, characterized in that: In step S140, in 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 the graph neural network is used for traversal calculation. Through the optimization method, the clustering effectiveness index is used as the optimization target, and the optimal number of partitions is searched and determined, thereby determining the partition result of the grid scale. The specific steps include: Step S1421: Setting 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 indicators: 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 coefficients of variation of the flash flood breeding background data selected in the clustering results, which is used to quantify the 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 background data of flash flood breeding, 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 in the rth dimension of 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 solution Generate a new neighborhood solution : Among them, γ is -1 or 1; Step S1423: Calculate the current solution and neighborhood solution 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 solution; If ΔE>0, then accept the neighborhood solution with probability P(ΔE) As the new current solution, 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 proceeds; Step S1424: Update parameter T using exponential decay: 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.
7. The quantitative evaluation method according to any one of claims 2 to 6, characterized in that: After obtaining the flash flood zoning result, the method further includes: Step S150, obtaining the historical flash flood event data of the target area, and using the historical flash flood event data to evaluate the obtained partitioning results. Specifically, superimposing the historical flash flood event data of the target area in the partitioning results, calculating the number and density of historical flash flood disaster events in each partition unit, applying the hotspot analysis method to calculate the z value of the spatial distribution of historical flash flood events in each partition unit, and determining 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 considering the selection of flash flood breeding background data, determination of graph neural network model parameters and / or optimization of the number of partitions, re-perform clustering analysis to obtain the flash flood partitioning results.
8. The quantitative evaluation method according to claim 7, 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 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: 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.
9. The quantitative evaluation method according to claim 7, characterized in that: In step S200, for each node i, let the explanation model be Background data on the occurrence of mountain torrents in Weihai The cluster label y for node i i The predicted contribution is The calculation formula is as follows: Among them, S is a feature subset, which does not include Other dimensions of the flash flood breeding background data subset; 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 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 breeding background data are obtained, where: Set up The global impact of the background data of 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 specific contribution of the flash flood breeding background data to the partitioning results of node i.
10. The quantitative evaluation method according to claim 9, characterized in that: The quantitative evaluation method also includes: 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
Mountain torrent disaster zoning method based on machine learning
CN114186780A
Graph neural network interpretation method and system, terminal and storage medium
CN114399025A
High-temperature disaster forecasting method based on directed graph neural network
CN114626512A
Mountain torrent disaster zoning method fusing attributes and structures
CN114911888A
Method and system for predicting contribution degree of electric power data participating in data sharing calculation
CN117453414A