A method, apparatus and equipment for classifying flash flood disasters

By employing a multi-head attention mechanism and graph convolution operations, the contradiction between dynamic relationship modeling and computational efficiency in flash flood disaster classification was resolved, achieving higher classification accuracy and prediction speed, and breaking through the limitations of static graph structures.

CN120277545BActive Publication Date: 2025-10-28CHINA INST OF WATER RESOURCES & HYDROPOWER RES
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510771547.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-11
Publication Date
2025-10-28
Estimated Expiration
2045-06-11

AI Technical Summary

Technical Problem

Existing methods for classifying flash flood disasters present a contradiction between dynamic element relationship modeling and computational efficiency, making it difficult to overcome the limitations of static graph structures. Furthermore, multi-source heterogeneous data cannot construct a unified feature mapping space, thus affecting classification accuracy.

Method used

The edge weight matrix of the graph structure is calculated through a multi-head attention mechanism, and then sparsification and graph convolution operations are performed. Combined with global feature enhancement, the probability of flash flood disaster classification is output.

Benefits of technology

It improves the accuracy and speed of flash flood disaster classification and prediction, alleviates the conflict between global computational efficiency and local feature preservation, and enhances the visualization and interpretability of the edge weight matrix.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120277545B_ABST
    Figure CN120277545B_ABST
Patent Text Reader

Abstract

This application discloses a method, apparatus, and equipment for classifying flash flood disasters, relating to the field of disaster monitoring technology. The method includes: acquiring a geographic feature dataset of multiple watershed nodes in a target area, and constructing a feature matrix based on the geographic feature dataset; inputting the feature matrix into a flash flood disaster classification model, and outputting the classification probability of each watershed node belonging to each flash flood disaster category; the flash flood disaster classification model is used to: calculate the edge weight matrix of the graph structure formed by the feature matrix and the watershed nodes in the target area using a multi-head attention mechanism; perform sparsification processing on the edge weight matrix, and perform graph convolution operation based on the feature matrix and the sparsified edge weight matrix to obtain aggregated features; perform global feature enhancement on the aggregated features to obtain enhanced features; and output the classification probability of each watershed node belonging to each flash flood disaster category based on the enhanced features. This application can improve the accuracy of flash flood disaster classification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of disaster monitoring technology, and in particular to a method, apparatus and equipment for classifying flash flood disasters. Background Technology

[0002] For flash flood risk assessment, current methods rely on machine learning-based probabilistic early warning systems. However, existing methods suffer from an inherent contradiction between dynamic element relationship modeling and computational efficiency. Using complex structures to capture the time-varying interaction features of multiple elements in rainstorm events leads to an exponential increase in computational resources; conversely, prioritizing computational efficiency makes it difficult to overcome the limitations of static graph structures. Furthermore, the challenge of balancing global feature perception with local detail preservation stems from inherent flaws in traditional model architectures. Moreover, the differences in representation scale, modal dimension, and semantic space among multi-source heterogeneous data (such as meteorological time-series data, geographic raster data, and disaster text data) prevent existing methods from constructing a unified feature mapping space, hindering in-depth mining of multi-element coupling relationships and thus affecting the accuracy of flash flood classification. Summary of the Invention

[0003] The purpose of this application is to provide a method, apparatus, and equipment for classifying flash flood disasters, which can improve the accuracy of flash flood disaster classification.

[0004] To achieve the above objectives, this application provides the following solution:

[0005] Firstly, this application provides a method for classifying flash flood disasters, wherein the classification of flash flood disasters includes:

[0006] Obtain the geographic feature dataset of multiple watershed nodes in the target area, and construct a feature matrix based on the geographic feature dataset;

[0007] The feature matrix is ​​input into the flash flood disaster classification model, which outputs the classification probability of each watershed node belonging to each flash flood disaster category. The flash flood disaster classification model is used to: calculate the edge weight matrix of the graph structure formed by the feature matrix and the watershed nodes in the target area through a multi-head attention mechanism; perform sparsification on the edge weight matrix; perform graph convolution operation on the feature matrix and the sparsified edge weight matrix to obtain aggregated features; perform global feature enhancement on the aggregated features to obtain enhanced features; and output the classification probability of each watershed node belonging to each flash flood disaster category based on the enhanced features.

[0008] The flash flood disaster classification corresponding to the maximum probability of each watershed node belonging to each type of flash flood disaster classification is taken as the flash flood disaster classification of each watershed node.

[0009] Optionally, the feature matrix includes the elevation standard deviation, slope variation, land cover, watershed area, topographic relief, average slope, average elevation, shape coefficient, longest confluence path length, longest confluence path gradient, longest confluence path gradient 1085, stable infiltration rate, roughness, river segment length, river segment gradient, unit flow peak modulus, maximum confluence time of the watershed, river power index, topographic humidity index, normalized vegetation index, disaster occurrence time, longitude, and latitude for each watershed node.

[0010] Optionally, the formula for calculating the edge weight matrix of the graph structure using a multi-head attention mechanism is expressed as follows:

[0011] ;

[0012] in, This represents the edge weight matrix, which is an asymmetric edge weight matrix. For querying the matrix, The key matrix, , , The feature matrix, and All of these are trainable parameters. express A dataset with dimensionality d, where d represents the geographic feature dimension of each watershed node. Let be the first attention head dimension, ⊙ denote the Hadamard product, and M be the adjacency mask matrix.

[0013] Optionally, the formula for sparsifying the edge weight matrix is ​​expressed as follows:

[0014] ;

[0015] in, This is the edge weight matrix after sparsification. Let ⊙ denote the edge weight matrix, and ⊙ denote the Hadamard product. For indicator functions, This is a learnable threshold parameter.

[0016] Optionally, the formula for performing graph convolution based on the feature matrix and the sparsed edge weight matrix is ​​expressed as follows:

[0017] ;

[0018] in, For the aggregation feature, Let D represent the linear rectified function, and D be the degree matrix. This is the edge weight matrix after sparsification. The feature matrix, For the projection matrix, express A dataset with dimensionality d, where d represents the geographic feature dimension of each watershed node. This is the second attention head dimension.

[0019] Optionally, global feature enhancement is performed on the aggregated features to obtain enhanced features, specifically including:

[0020] The aggregated features are encoded using Transformer to obtain the enhanced features.

[0021] The formula for Transformer encoding of aggregated features is expressed as follows:

[0022] ;

[0023] in, For the aggregation feature, To enhance the post-features, Representation layer normalization, This represents a multi-head attention mechanism.

[0024] Optionally, the flash flood disaster classification model is trained using a training set, and the joint loss function used during training is expressed as follows:

[0025] ;

[0026] Where L represents the joint loss value, For cross-entropy loss, Represents the edge weight matrix. and All are weighting coefficients. This represents the edge weight from the i-th watershed node to the j-th watershed node. This represents the edge weight from the j-th watershed node to the i-th watershed node.

[0027] Optionally, based on the enhanced features, the classification probability of each watershed node belonging to each type of flash flood disaster is output, specifically including:

[0028] A multilayer perceptron is used to output the classification probability of each watershed node belonging to each type of flash flood disaster based on the enhanced features.

[0029] Secondly, this application provides a flash flood disaster classification device, which applies the flash flood disaster classification method described in any one of the above-mentioned methods, and the flash flood disaster classification device includes:

[0030] The feature matrix determination module is used to obtain the geographic feature dataset of multiple watershed nodes in the target area and construct a feature matrix based on the geographic feature dataset.

[0031] The flash flood disaster classification probability prediction module is used to input a feature matrix into a flash flood disaster classification model and output the classification probability of each watershed node belonging to each flash flood disaster category. The flash flood disaster classification model is used to: calculate the edge weight matrix of the graph structure formed by the feature matrix and the watershed nodes in the target area using a multi-head attention mechanism; perform sparsification on the edge weight matrix; perform graph convolution operation based on the feature matrix and the sparsified edge weight matrix to obtain aggregated features; perform global feature enhancement on the aggregated features to obtain enhanced features; and output the classification probability of each watershed node belonging to each flash flood disaster category based on the enhanced features.

[0032] The classification determination module is used to determine the flash flood disaster classification corresponding to the maximum probability among the classification probabilities of each watershed node belonging to each type of flash flood disaster classification.

[0033] Thirdly, this application provides a computer device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the flash flood disaster classification method described in any one of the above.

[0034] According to the specific embodiments provided in this application, the following technical effects are disclosed: This application provides a method, apparatus, and device for classifying flash flood disasters. Based on the feature matrix and the graph structure formed by the nodes of each watershed in the target area, the edge weight matrix of the graph structure is calculated through a multi-head attention mechanism, which breaks through the limitations of static graph structures, enhances the visualization and interpretability of the edge weight matrix, and thus improves the prediction accuracy. The edge weight matrix is ​​sparsified, and graph convolution is performed based on the feature matrix and the sparsified edge weight matrix to obtain aggregated features. This realizes a two-stage architecture of multi-head attention and graph convolution, alleviates the conflict between global computational efficiency and local feature preservation, and further improves the accuracy of flash flood disaster classification. Attached Figure Description

[0035] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0036] Figure 1 This is a flowchart illustrating a method for classifying flash flood disasters according to an embodiment of this application.

[0037] Figure 2This is a schematic diagram illustrating the principle of a flash flood disaster classification method provided in an embodiment of this application.

[0038] Figure 3 This is a schematic diagram of the functional modules of a flash flood disaster classification device provided in an embodiment of this application.

[0039] Figure 4 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0040] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0041] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the present invention will now be described in detail with reference to the accompanying drawings and specific embodiments.

[0042] In one exemplary embodiment, this application provides a method for classifying flash flood disasters, such as... Figure 1 and Figure 2 As shown, the classification of flash flood disasters includes steps 101 to 102.

[0043] Step 101: Obtain the geographic feature dataset of multiple watershed nodes in the target area, and construct a feature matrix based on the geographic feature dataset.

[0044] Step 102: Input the feature matrix into the flash flood disaster classification model and output the classification probability of each watershed node belonging to each flash flood disaster category; the flash flood disaster classification model is used to: calculate the edge weight matrix of the graph structure formed by the feature matrix and the watershed nodes of the target area through a multi-head attention mechanism; perform sparsification on the edge weight matrix, and perform graph convolution operation based on the feature matrix and the sparsified edge weight matrix to obtain aggregated features; perform global feature enhancement on the aggregated features to obtain enhanced features; and output the classification probability of each watershed node belonging to each flash flood disaster category based on the enhanced features.

[0045] Step 103: Take the flash flood disaster classification corresponding to the maximum value of the classification probability of each watershed node belonging to each flash flood disaster classification as the flash flood disaster classification of each watershed node.

[0046] The graph structure is a fully connected graph structure.

[0047] Flash flood disasters are classified into four types: rainstorm type, mudslide type, dammed type, and snowmelt type.

[0048] This application also includes visualization of the graph structure and mining of unidentified types of flash flood disasters through node connectivity. It is expected to discover subclasses or subtypes under the main types of flash flood disasters, and realize accurate classification and risk zoning of flash flood disasters.

[0049] In an exemplary embodiment, step 101 specifically includes: the computer reading the geographic feature dataset of N watershed nodes in the target area from the storage device and constructing a feature matrix. . express For the data, Geographic feature dimension for each watershed node.

[0050] Among them, the known quantities are the measured geographical feature data of each watershed node; the unknown quantities are the potential correlation strength between each watershed node.

[0051] The feature matrix includes the following features for each watershed node: elevation standard deviation, slope variation, land cover, watershed area, topographic relief, average slope, average elevation, shape coefficient, longest confluence path length, longest confluence path gradient (‰), longest confluence path gradient 1085 (‰), stable infiltration rate, roughness coefficient, river segment length, river segment gradient, unit flow peak modulus, maximum confluence time of the watershed, river power index, topographic humidity index, normalized vegetation index, disaster occurrence time, longitude, and latitude.

[0052] In an exemplary embodiment, calculating the edge weight matrix of the graph structure using a multi-head attention mechanism specifically includes: the computer calculating a learnable edge weight matrix using a multi-head attention mechanism. . express A dataset with multiple dimensions.

[0053] The formula for calculating the edge weight matrix of the graph structure using the multi-head attention mechanism is as follows:

[0054] ;

[0055] in, This represents the edge weight matrix, which is an asymmetric edge weight matrix. For querying the matrix, The matrix is ​​a key matrix, and the superscript T denotes transpose. , , The feature matrix, All of these are trainable parameters. express A dataset with dimensionality d, where d represents the geographic feature dimension of each watershed node. ⊙ represents the first attention head dimension; M∈{0,1}^(N×N) is the adjacency mask matrix, which is generated based on the minimum distance threshold of the watershed.

[0056] The purpose of computing the edge weight matrix of a graph structure is to break through the limitations of predefined graph structures and achieve dynamic relationship modeling.

[0057] In one exemplary embodiment, this application implements two-stage message passing through edge weight filtering and feature aggregation.

[0058] Edge weight filtering is the process of using a computer to process the edge weight matrix. Perform sparsification processing. Figure 2 Nodes e, u, g, and v are all watershed nodes. Represents the geographical features of node u. This represents the geographical features of node v. Indicates the geographical features of node e. This represents the edge weight from node u to node g. This represents the edge weight from node v to node g. This represents the edge weight from node e to node g.

[0059] The formula for sparsifying the edge weight matrix is ​​expressed as follows: .

[0060] in, This is the edge weight matrix after sparsification. Let ⊙ denote the edge weight matrix, and ⊙ denote the Hadamard product. For indicator functions, This is a learnable threshold parameter.

[0061] The purpose of edge weight filtering is to break through the limitations of predefined graph structures and realize dynamic relationship modeling.

[0062] In one exemplary embodiment, feature aggregation includes performing graph convolution operations via a computer.

[0063] The formula for graph convolution based on the feature matrix and the sparsed edge weight matrix is ​​expressed as follows:

[0064] .

[0065] in, For the aggregation feature, Let D represent the linear rectified function, and D be the degree matrix. This is the edge weight matrix after sparsification. The feature matrix, For the projection matrix, express A dataset with dimensionality d, where d represents the geographic feature dimension of each watershed node. This is the second attention head dimension.

[0066] The role of aggregated features is to achieve feature propagation that preserves terrain details.

[0067] In an exemplary embodiment, global feature enhancement is performed on the aggregated features to obtain enhanced features, specifically including: performing Transformer encoding on the aggregated features using a computer to obtain enhanced features.

[0068] The formula for Transformer encoding of aggregated features is expressed as follows: .

[0069] in, For the aggregation feature, To enhance the post-features, Representation layer normalization, This represents a multi-head attention mechanism.

[0070] The role of local feature enhancement is to achieve feature propagation that preserves terrain details.

[0071] In an exemplary embodiment, the flash flood disaster classification model is trained using a training set, and the joint loss function used during training is expressed as follows:

[0072] .

[0073] Where L represents the joint loss value, For cross-entropy loss, Represents the edge weight matrix. and All are weighting coefficients. This represents the edge weight from the i-th watershed node to the j-th watershed node. Let represent the edge weight from the j-th watershed node to the i-th watershed node. The last two terms of the joint loss function control the graph sparsity and edge weight symmetry, respectively.

[0074] Regularization constraints are implemented through a joint loss function to improve generalization ability in scenarios with small sample sizes.

[0075] In an exemplary embodiment, the classification probability of each watershed node belonging to each type of flash flood disaster is output based on the enhanced features. Specifically, this includes using a multilayer perceptron to output the classification probability of each watershed node belonging to each type of flash flood disaster based on the enhanced features.

[0076] The enhanced features are input into a multilayer perceptron by a computer to obtain the classification probability of each watershed node belonging to each type of flash flood disaster, that is, the probability distribution of flash flood disaster level of each watershed node.

[0077] The prediction of a multilayer perceptron is represented as follows: .

[0078] in, This represents the probability of each watershed node belonging to each type of flash flood disaster. () represents a multilayer perceptron. () represents the normalized exponential function.

[0079] The improved network architecture of this application was trained using the training set to obtain the flash flood disaster classification model. The hardware deployment environment during training included: (1) Computing nodes: equipped with a high-performance server cluster. (2) Storage devices: a distributed file system storing geographic feature data of 53,000 watersheds. (3) Data interface: geographic raster data was processed through the open-source Geospatial Data Abstraction Library (GDAL), which included Digital Elevation Model (DEM) and land cover classification maps.

[0080] Training parameter settings: Number of attention heads h=4, first attention head dimension =64; Trainable parameter matrix , ∈ Edge retention ratio K: K=20% in the early stage of training, and gradually reduced to K=5% through cosine annealing strategy; Optimizer: Adam, initial learning rate 3e-4, weight decay 1e-6.

[0081] The improvements to the prediction model architecture in this application mainly include the following four points.

[0082] (1) Cooperative design of dynamic edge weight generation module and multi-head attention mechanism.

[0083] (2) Decoupling optimization problem in graph structure learning and feature propagation stages.

[0084] (3) The trainability problem of asymmetric edge weight matrix ( ).

[0085] (4) The coupling contradiction between local neighborhood aggregation and global dependency modeling during message passing.

[0086] Traditional graph neural network-based methods rely on predefined static graph structures (such as watershed hydrological connectivity topologies), failing to dynamically capture the time-varying characteristics of multi-factor interaction patterns during heavy rainfall. Message passing mechanisms are limited to local neighborhood feature aggregation, making it difficult to model global dependencies across watersheds, and fixed edge weights result in a lack of adaptability in feature propagation. This application overcomes the limitations of static graph structures by calculating a dynamic edge weight matrix for the graph structure through a multi-head attention mechanism, enhancing the visualization and interpretability of the edge weight matrix, thereby improving prediction accuracy.

[0087] Pure attention mechanism architectures: Fully connected attention mechanisms introduce redundant computation, facing an O(N²) complexity bottleneck when handling large-scale nodes; they neglect the spatial semantic relationships between nodes, resulting in insufficient extraction of meteorological-geographic coupling features and a lack of ability to process differentiated features of heterogeneous data modalities. O(N²) indicates that the algorithm's execution time increases quadratically with the amount of input data. Multi-model fusion methods: Cascaded architectures produce feature alignment biases, leading to high fusion loss rates (often around 20%) between hydrological time-series features and geospatial features; inconsistent parameter optimization objectives cause model convergence difficulties; insufficient interpretability restricts the ability to trace disaster causes. This application's two-stage architecture of multi-head attention and graph convolution alleviates the conflict between global computational efficiency and local feature preservation, improving inference speed by 37 times (compared to the Transformer benchmark) at an N=1000 node scale. Edge weight filtering and regularization constraints suppress noise propagation and overfitting risks. Asymmetric edge weight modeling overcomes the geographic semantic distortion of traditional symmetric adjacency matrices.

[0088] Based on the same inventive concept, this application also provides a flash flood disaster classification device for implementing the flash flood disaster classification method described above. The solution provided by this device is similar to the solution described in the above method. Therefore, the specific limitations of one or more flash flood disaster classification device embodiments provided below can be found in the limitations of the flash flood disaster classification method above, and will not be repeated here.

[0089] In one exemplary embodiment, such as Figure 3 As shown, a flash flood disaster classification device is provided. The flash flood disaster classification device applies the aforementioned flash flood disaster classification method. The flash flood disaster classification device includes:

[0090] The feature matrix determination module is used to obtain the geographic feature dataset of multiple watershed nodes in the target area and construct a feature matrix based on the geographic feature dataset.

[0091] The flash flood disaster classification probability prediction module is used to input a feature matrix into a flash flood disaster classification model and output the classification probability of each watershed node belonging to each flash flood disaster category. The flash flood disaster classification model is used to: calculate the edge weight matrix of the graph structure formed by the feature matrix and the watershed nodes in the target area through a multi-head attention mechanism; perform sparsification on the edge weight matrix; perform graph convolution operation on the feature matrix and the sparsified edge weight matrix to obtain aggregated features; perform global feature enhancement on the aggregated features to obtain enhanced features; and output the classification probability of each watershed node belonging to each flash flood disaster category based on the enhanced features.

[0092] The classification determination module is used to determine the flash flood disaster classification corresponding to the maximum probability among the classification probabilities of each watershed node belonging to each type of flash flood disaster classification.

[0093] In one exemplary embodiment, a computer device is provided, which may be a server or a terminal, and its internal structure diagram may be as follows. Figure 4 As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores flash flood disaster classification data. The I / O interfaces are used for information exchange between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When executed by the processor, the computer program implements a flash flood disaster classification method.

[0094] Those skilled in the art will understand that Figure 4 The structures shown are merely block diagrams of some structures related to the present application and do not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than shown in the figures, or combine certain components, or have different component arrangements. In an exemplary embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0095] In one exemplary embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.

[0096] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.

[0097] It should be noted that the collection, use and processing of user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application must comply with relevant regulations.

[0098] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the above-mentioned embodiments. In particular, any reference to memory, database, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).

[0099] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic units, data processing logic units, etc., and are not limited to these.

[0100] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0101] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for classifying flash flood disasters, characterized in that, The classification of flash flood disasters includes: Obtain the geographic feature dataset of multiple watershed nodes in the target area, and construct a feature matrix based on the geographic feature dataset; The feature matrix is ​​input into the flash flood disaster classification model, which outputs the classification probability of each watershed node belonging to each flash flood disaster category. The flash flood disaster classification model is used to: calculate the edge weight matrix of the graph structure formed by the feature matrix and the watershed nodes in the target area through a multi-head attention mechanism; perform sparsification on the edge weight matrix; perform graph convolution operation on the feature matrix and the sparsified edge weight matrix to obtain aggregated features; perform global feature enhancement on the aggregated features to obtain enhanced features; and output the classification probability of each watershed node belonging to each flash flood disaster category based on the enhanced features. The flash flood disaster classification corresponding to the maximum probability of each watershed node belonging to each type of flash flood disaster classification is taken as the flash flood disaster classification of each watershed node; The formula for calculating the edge weight matrix of the graph structure using the multi-head attention mechanism is as follows: ; in, This represents the edge weight matrix, which is an asymmetric edge weight matrix. For querying the matrix, The key matrix, , , The feature matrix, and All of these are trainable parameters. express A dataset with dimensionality d, where d represents the geographic feature dimension of each watershed node. Let ⊙ denote the first attention head dimension, ⊙ represent the Hadamard product, and M be the adjacency mask matrix; The flash flood disaster classification model is obtained through training on a training set, and the joint loss function used during training is expressed as follows: ; Where L represents the joint loss value, For cross-entropy loss, Represents the edge weight matrix. and All are weighting coefficients. This represents the edge weight from the i-th watershed node to the j-th watershed node. This represents the edge weight from the j-th watershed node to the i-th watershed node.

2. The method for classifying flash flood disasters according to claim 1, characterized in that, The feature matrix includes the elevation standard deviation, slope variation, land cover, watershed area, topographic relief, average slope, average elevation, shape coefficient, longest confluence path length, longest confluence path gradient, longest confluence path gradient 1085, steady infiltration rate, roughness coefficient, river segment length, river segment gradient, unit flow peak modulus, maximum confluence time of the watershed, river power index, topographic humidity index, normalized vegetation index, disaster occurrence time, longitude, and latitude for each watershed node; The classification of flash flood disasters includes rainstorm type, mudslide type, flood breach type, and snowmelt type.

3. The method for classifying flash flood disasters according to claim 1, characterized in that, The formula for sparsifying the edge weight matrix is ​​expressed as follows: ; in, This is the edge weight matrix after sparsification. Let ⊙ denote the edge weight matrix, and ⊙ denote the Hadamard product. For indicator functions, This is a learnable threshold parameter.

4. The method for classifying flash flood disasters according to claim 1, characterized in that, The formula for graph convolution based on the feature matrix and the sparsed edge weight matrix is ​​expressed as follows: ; in, For the aggregation feature, Let D represent the linear rectified function, and D be the degree matrix. This is the edge weight matrix after sparsification. The feature matrix, For the projection matrix, express A dataset with dimensionality d, where d represents the geographic feature dimension of each watershed node. This is the second attention head dimension.

5. The method for classifying flash flood disasters according to claim 1, characterized in that, Global feature enhancement is performed on the aggregated features to obtain enhanced features, specifically including: The aggregated features are encoded using Transformer to obtain the enhanced features. The formula for Transformer encoding of aggregated features is expressed as follows: ; in, For the aggregation feature, To enhance the post-features, Representation layer normalization, This represents a multi-head attention mechanism.

6. The method for classifying flash flood disasters according to claim 1, characterized in that, Based on the enhanced features, the classification probability of each watershed node belonging to each type of flash flood disaster is output, specifically including: A multilayer perceptron is used to output the classification probability of each watershed node belonging to each type of flash flood disaster based on the enhanced features.

7. A flash flood disaster classification device, characterized in that, The flash flood disaster classification device applies the flash flood disaster classification method according to any one of claims 1-6, and the flash flood disaster classification device comprises: The feature matrix determination module is used to obtain the geographic feature dataset of multiple watershed nodes in the target area and construct a feature matrix based on the geographic feature dataset. The flash flood disaster classification probability prediction module is used to input a feature matrix into a flash flood disaster classification model and output the classification probability of each watershed node belonging to each flash flood disaster category. The flash flood disaster classification model is used to: calculate the edge weight matrix of the graph structure formed by the feature matrix and the watershed nodes in the target area using a multi-head attention mechanism; perform sparsification on the edge weight matrix; perform graph convolution operation based on the feature matrix and the sparsified edge weight matrix to obtain aggregated features; perform global feature enhancement on the aggregated features to obtain enhanced features; and output the classification probability of each watershed node belonging to each flash flood disaster category based on the enhanced features. The classification determination module is used to determine the flash flood disaster classification corresponding to the maximum probability among the classification probabilities of each watershed node belonging to each type of flash flood disaster classification.

8. A computer device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the flash flood disaster classification method according to any one of claims 1-6.

Citation Information

Patent Citations

  • Feature extraction model training method, data classification method, device and equipment

    CN118708943A

  • Mountain torrent disaster risk level prediction method based on knowledge graph and graph neural network

    CN119721722A