Mountain torrent disaster risk level prediction method based on knowledge graph and graph neural network
By constructing a mountain torrent disaster risk level prediction model based on knowledge graphs and graph neural networks, the problem of difficult to determine data quality and model parameters in the existing technology is solved, and higher prediction accuracy and reliability are achieved, providing a scientific basis for disaster prevention and mitigation.
Patent Information
- Application Number
- CN202510222020.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-27
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2045-02-27
AI Technical Summary
The existing method for predicting the risk level of the mountain torrent disasters has problems such as high data quality requirements and difficult to determine the model parameters, which leads to deviations in the prediction operation and increases the risk loss of the mountain torrent disasters.
Using a method based on knowledge graph and graph neural network, a risk level prediction model is constructed that combines risk knowledge graph and graph neural network, entities and relationships in the data are extracted, and node features are learned and aggregated to achieve risk level prediction.
It improves the accuracy and reliability of prediction of mountain torrent disaster risk level, reduces the complexity of model parameter adjustment, enhances the modeling and analysis capabilities of complex systems, and provides scientific basis and decision-making support.
Smart Images

Figure CN119721722A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of risk level prediction, and specifically to a method for predicting the risk level of flash flood disasters based on a knowledge graph and a graph neural network. Background Art
[0002] Flash flood disasters are a sudden and destructive natural disaster that poses a huge threat to people's lives and property. Accurately predicting the risk level of flash flood disasters is of great significance for taking effective disaster prevention and mitigation measures in advance and reducing disaster losses. In recent years, many scholars have devoted themselves to studying flash flood disaster risk assessment methods. Traditional methods mainly include methods based on hydrological models, methods based on empirical formulas, and methods based on indicator systems. These methods can assess the risk of flash flood disasters to a certain extent, but they have problems such as large data requirements, complex calculations, and difficulty in considering the interaction of multiple factors.
[0003] The reference patent name is: Flash flood disaster risk zoning and prediction method based on GIS-neural network integration (patent publication number: CN108280553A, patent publication date: 2018-07-13), including: S1. Using association rules to explore the correlation between risk factors and risk levels in flash flood disasters, identify risk factors, and construct a quantitative flash flood disaster risk assessment index system; S2. Using the hierarchical analysis method to determine the hazard and vulnerability index system and its weights, and generate each element layer; S3. Using ArcGIS to overlay the flash flood disaster hazard and vulnerability distribution layers to obtain a flash flood disaster risk distribution map; S4. Using ISO maximum likelihood clustering and a combination of bottom-up regional merging and top-down qualitative analysis to form a flash flood disaster risk zoning; S5. Using the Elman neural network to analyze the nonlinear relationship between evaluation indicators and risk levels and disaster data, and construct a flash flood disaster risk assessment and loss estimation model.
[0004] Based on the description in the above documents, although the existing risk level prediction methods can acquire and analyze data more accurately and improve the accuracy of risk assessment, they still have some limitations, such as high requirements for data quality and difficulty in determining model parameters, which leads to deviations in completing the risk level prediction operation, resulting in greater losses from flash flood disaster risks. To this end, the present invention provides a flash flood disaster risk level prediction method based on knowledge graphs and graph neural networks. Summary of the invention
[0005] In response to the shortcomings of the prior art, the present invention provides a method for predicting the risk level of flash flood disasters based on knowledge graphs and graph neural networks. It solves the problem that although the existing risk level prediction methods can acquire and analyze data more accurately and improve the accuracy of risk assessment, they still have some limitations, such as high requirements on data quality and difficulty in determining model parameters, resulting in deviations in completing the risk level prediction operation, which makes the risk losses of flash flood disasters greater.
[0006] To achieve the above objectives, the present invention is implemented through the following technical solutions: a method for predicting the risk level of flash flood disasters based on knowledge graph and graph neural network, specifically comprising the following steps: A1. Collect data related to flash flood disaster risks and perform data preprocessing operations; A2. Build and train a risk level prediction model combining knowledge graph and graph neural network. The specific operations are as follows: a21. Extract entities and relationships from the data, and construct a risk knowledge graph using node definition, edge definition, knowledge fusion, and graph update operations; a22. Based on the constructed knowledge graph, the graph neural network is used to learn and aggregate node features, and feature information is extracted for risk level prediction; a23. Utilize forward propagation, loss calculation, parameter update and result evaluation to obtain the predicted results of risk level and implement multiple trainings; A3. Introduce parameter data of the area to be tested into the risk level prediction model to predict the risk level.
[0007] Preferably, the data preprocessing operation in A1 is: a11. Clean the data to remove missing values and outliers in the data, and compensate for missing values and outliers by filling or deleting them; a12. Convert the categorical variables in the retained data into numerical features that can be used for subsequent model training through label encoding; a13. Standardize the numerical features so that the processed numerical features conform to the standard normal distribution; a14. Through feature selection, numerical features that contribute most to model training are selected to optimize model performance.
[0008] Preferably, the formula for normalizing the numerical features in a13 is: ; Among them, X norm represents the standardized features, X b represents the original feature, α and λ represent the mean and standard deviation values of the feature, respectively, to determine the reduction in variance of the numerical feature.
[0009] Preferably, the operation of constructing the risk knowledge graph in a21 is: B1. Identify each entity in the data and assign a unique identifier to define it as a node in the graph; B2. Define the edges between nodes, implement the association operations between nodes, and form the infrastructure of the risk knowledge graph by constructing formulas; B3. Through the knowledge fusion step, extract external impact data and integrate it into the knowledge graph to improve the risk knowledge graph architecture; B4. Add the preprocessed new data to the risk knowledge graph, update the attributes of the nodes and the connection information of the edges, delete outdated data or no longer relevant relationships, and realize real-time update of the graph.
[0010] Preferably, the formula constructed in B2 is: G = (V, E); G represents the risk knowledge graph, V represents the node set, and E represents the edge set; For the association operation between nodes, it is necessary to determine the relationship similarity between the nodes to determine the edge weight and the association direction, and the specific determination operation is: b21. Select any two nodes and first determine whether the two nodes are of the same type of regional location features. If they are of the same type, it is necessary to determine whether the regional locations are adjacent, and then introduce geographic information to determine the risk flow direction to point to the flow node; b22. If the features are not of the same type and one node is a regional location feature, the association direction is transmitted from the current node to another node, and the nodes that need to be constructed related to the current node are summarized and marked as v n {v1, v2, …, v n}, determine the contribution influence according to the economic loss value caused by each single node feature in the historical data, determine the influence order of each node feature according to the size of the economic loss value, and the one with the largest value has the greatest influence, and then determine the edge weight according to the sorted node features; b23. In this way, a complete risk knowledge graph architecture is constructed.
[0011] Preferably, the calculation formula of the edge weight in b22 is: W n(n-1) =sim(v n , v n-1 ); W n(n-1) Represents node v n and node v n-1 The edge weight between n Represented as the nth node, sim(v n , vn-1 ) represents the similarity between nodes; And sim (v n , v n-1 ) = [(k1+k2+…+k n ) / n] / k n ; k n It is expressed as the nth loss value after sorting the economic loss value, and (k1+k2+…+k n ) / n is the average value of economic losses of all the influencing node characteristics.
[0012] Preferably, the operation of learning and aggregating node features using the graph neural network in a22 is: C1. Use the node feature matrix and adjacency matrix as the input layer of the risk level prediction model to ensure that the graph neural network can capture the relationship between nodes; C2. Set the GCN layer to aggregate and update the node features layer by layer. Each layer of GCN uses the adjacency matrix and degree matrix to aggregate the information of neighboring nodes. C3. The graph neural network learns the local features of the nodes and maps the updated node feature matrix to specific risk levels in the output layer.
[0013] Preferably, the expression for updating the node feature in C2 is: H (l+1) =σ(D 1 / 2 AD 1 / 2 H (l) W (l) ); And H (l+1) is the node feature matrix representing the (l+1)th layer, H (l) To represent the adjacent node features of the lth layer, matrix A represents the adjacency matrix, D represents the degree matrix, and W (l) represents the weight matrix of the lth layer, σ represents the activation function; The node feature update formula is: ; Among them, h i represents the updated features of node i, N(i) represents the set of neighbor nodes of node i, d i and d j Represent the degrees of nodes i and j respectively; The mapping formula for risk level in C3 is: Y = softmax(H (l) W (l+1) ); And W (l+1)is the weight matrix of the output layer, Y is the risk level prediction result of the node, each row represents the predicted probability distribution of a node, and softmax is a combination of a fully connected layer and a classifier to realize the mapping operation of risk level.
[0014] Preferably, the specific operation of the risk level prediction result in a23 is: D1. Output risk prediction results based on graph neural network and perform back propagation; D2. Use the cross entropy loss function to calculate the error between the predicted result and the true label to achieve the compensation operation between the predicted result and the true label. The specific loss function formula is: ; N represents the number of samples, C represents the number of categories, and y gc represents the true label of sample g, represents the predicted probability of sample g; Then, the model parameters are updated through the gradient descent algorithm to minimize the loss function, which is formulated as: θ new =θ old -η(▽ θ )L; θ new is the new model parameter, θ old is the old model parameter, η represents the learning rate, (▽ θ )L represents the gradient of the loss function with respect to the parameters; D3. Use accuracy, precision, recall and F1 score to evaluate the performance of the risk level prediction model.
[0015] Preferably, the operation of transferring the parameter data of the area to be tested in A3 to the risk level prediction model for risk level prediction is: a31. After collecting parameter data of the area to be tested, the data is cleaned and processed by the risk level prediction model, and then a current risk level prediction model for the area to be tested is established based on the knowledge graph and graph neural network; a32. Analyze and output the risk results of the area to be tested based on the risk level prediction model, and adjust the prevention strategy based on the predicted risk results.
[0016] The present invention provides a method for predicting the risk level of flash flood disasters based on knowledge graph and graph neural network. Compared with the prior art, it has the following beneficial effects: 1. This method for predicting the risk level of flash flood disasters based on knowledge graph and graph neural network extracts entities and relationships in the data, constructs a risk knowledge graph using node definition, edge definition, knowledge fusion and graph update operations, and uses graph neural network to learn and aggregate node features based on the constructed knowledge graph, and extracts feature information for risk level prediction. Therefore, the knowledge graph can represent entities, relationships and attributes in the form of a graph, and can effectively integrate and express complex knowledge and information. The graph neural network can effectively process graph structured data, capture the relationships and dependencies between nodes, and realize the modeling and analysis of complex systems. The introduction of knowledge graph and graph neural network into the prediction of flash flood disaster risk level aims to make full use of multi-source data, explore potential risk patterns and laws, improve the accuracy and reliability of prediction, and provide a scientific basis and decision-making support for disaster prevention and mitigation.
[0017] 2. The flash flood disaster risk level prediction method based on knowledge graph and graph neural network defines the edges between nodes to realize the association operation between nodes, and forms the basic architecture of the risk knowledge graph by constructing formulas. The contribution influence is determined according to the economic loss value caused by each single node feature in the historical data, and the influence order of each node feature is determined according to the size of the economic loss value, and the one with the largest value has the greatest influence. Then, the edge weight is determined according to the sorted node features, so that the relationship between nodes in the knowledge graph and the related knowledge graph can be quickly established, and the edge weight value is obtained based on the judgment training of historical data, so as to realize the continuous influx of new data and dynamically update the graph structure through the graph update mechanism to ensure its timeliness and accuracy.
[0018] 3. This flash flood disaster risk level prediction method based on knowledge graph and graph neural network uses the node feature matrix and adjacency matrix as the input layer of the risk level prediction model, and sets the GCN layer to aggregate and update the node features layer by layer. Each layer of GCN uses the adjacency matrix and degree matrix to aggregate the information of neighboring nodes. The graph neural network learns the local features of the nodes, and maps the updated node feature matrix to the specific risk level in the output layer. In this way, the model gradually adapts to the complexity of the data after multiple adjustments during the training process, and the model parameter adjustment gradually converges and finally stabilizes, so that the model reaches the optimal state and better performs risk level prediction operations. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 is an operation flow chart of the disaster risk level prediction method of the present invention; Figure 2 An operational flow chart for constructing a risk knowledge graph for the present invention; Figure 3 It is a graph of the loss curve of the model training of the present invention; Figure 4It is a ROC curve diagram of the model training process of the present invention. DETAILED DESCRIPTION
[0020] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0021] See also Figure 1-Figure 4 , the present invention provides two technical solutions: Embodiment 1: A method for predicting flash flood disaster risk level based on knowledge graph and graph neural network, specifically comprising the following steps: A1. Collect data related to flash flood disaster risks and perform data preprocessing operations; A2. Build and train a risk level prediction model combining knowledge graph and graph neural network. The specific operations are as follows: a21. Extract entities and relationships from the data, and construct a risk knowledge graph using node definition, edge definition, knowledge fusion, and graph update operations; a22. Based on the constructed knowledge graph, the graph neural network is used to learn and aggregate node features, and feature information is extracted for risk level prediction; a23. Utilize forward propagation, loss calculation, parameter update and result evaluation to obtain the predicted results of risk level and implement multiple trainings; A3. Introduce parameter data of the area to be tested into the risk level prediction model to predict the risk level.
[0022] By extracting entities and relationships in the data, a risk knowledge graph is constructed using node definition, edge definition, knowledge fusion and graph update operations. Based on the constructed knowledge graph, graph neural network is used to learn and aggregate node features, and feature information is extracted for risk level prediction. Therefore, the knowledge graph can represent entities, relationships and attributes in the form of a graph, and can effectively integrate and express complex knowledge and information. Graph neural network can effectively process graph structured data, capture the relationships and dependencies between nodes, and realize the modeling and analysis of complex systems. The knowledge graph and graph neural network are introduced into the prediction of flash flood disaster risk level, aiming to make full use of multi-source data, explore potential risk patterns and laws, improve the accuracy and reliability of prediction, and provide a scientific basis and decision-making support for disaster prevention and mitigation.
[0023] In the embodiment of the present invention, the data preprocessing operation in A1 is: a11. Clean the data to remove missing values and outliers in the data, and compensate for missing values and outliers by filling or deleting them; a12. Convert the categorical variables in the retained data into numerical features that can be used for subsequent model training through label encoding; a13. Standardize the numerical features so that the processed numerical features conform to the standard normal distribution; a14. Through feature selection, numerical features that contribute most to model training are selected to optimize model performance.
[0024] In the embodiment of the present invention, the formula for normalizing the numerical features in a13 is: ; Among them, X norm represents the standardized features, X b represents the original feature, α and λ represent the mean and standard deviation values of the feature, respectively, to determine the reduction in variance of the numerical feature.
[0025] In the embodiment of the present invention, the operation of constructing the risk knowledge graph in a21 is: B1. Identify each entity in the data and assign a unique identifier to define it as a node in the graph; B2. Define the edges between nodes, implement the association operations between nodes, and form the infrastructure of the risk knowledge graph by constructing formulas; B3. Through the knowledge fusion step, extract external impact data and integrate it into the knowledge graph to improve the risk knowledge graph architecture; B4. Add the preprocessed new data to the risk knowledge graph, update the attributes of the nodes and the connection information of the edges, delete outdated data or no longer relevant relationships, and realize real-time update of the graph.
[0026] In the embodiment of the present invention, the formula constructed in B2 is: G = (V, E); G represents the risk knowledge graph, V represents the node set, and E represents the edge set; For the association operation between nodes, it is necessary to determine the relationship similarity between the nodes to determine the edge weight and the association direction, and the specific determination operation is: b21. Select any two nodes and first determine whether the two nodes are of the same type of regional location features. If they are of the same type, it is necessary to determine whether the regional locations are adjacent, and then introduce geographic information to determine the risk flow direction to point to the flow node; b22. If the features are not of the same type and one node is a regional location feature, the association direction is transmitted from the current node to another node, and the nodes that need to be constructed related to the current node are summarized and marked as v n {v1, v2, …, v n}, determine the contribution influence according to the economic loss value caused by each single node feature in the historical data, determine the influence order of each node feature according to the size of the economic loss value, and the one with the largest value has the greatest influence, and then determine the edge weight according to the sorted node features; b23. In this way, a complete risk knowledge graph architecture is constructed.
[0027] In the embodiment of the present invention, the calculation formula of the edge weight in b22 is: W n(n-1) =sim(v n , v n-1 ); W n(n-1) Represents node v n and node v n-1 The edge weight between n Represented as the nth node, sim(v n , v n-1 ) represents the similarity between nodes; And sim (v n , v n-1 ) = [(k1+k2+…+k n ) / n] / k n ; k n It is expressed as the nth loss value after sorting the economic loss value, and (k1+k2+…+k n ) / n is the average value of economic losses of all the influencing node characteristics.
[0028] By defining the edges between nodes, the association operations between nodes are realized, and the basic architecture of the risk knowledge graph is formed by constructing formulas. The contribution influence is determined according to the economic loss value caused by each single node feature in the historical data. The influence order of each node feature is determined according to the size of the economic loss value, and the node with the largest value has the greatest influence. Then, the edge weight is determined according to the sorted node features. This allows the relationship between nodes in the knowledge graph and the associated knowledge graph to be quickly established, and the edge weight value is obtained based on the judgment training of historical data, so as to realize the continuous influx of new data and dynamically update the graph structure through the graph update mechanism to ensure its timeliness and accuracy.
[0029] In the embodiment of the present invention, the operation of learning and aggregating node features using the graph neural network in a22 is: C1. Use the node feature matrix and adjacency matrix as the input layer of the risk level prediction model to ensure that the graph neural network can capture the relationship between nodes; C2. Set the GCN layer to aggregate and update the node features layer by layer. Each layer of GCN uses the adjacency matrix and degree matrix to aggregate the information of neighboring nodes. C3. The graph neural network learns the local features of the nodes and maps the updated node feature matrix to specific risk levels in the output layer.
[0030] In the embodiment of the present invention, the expression for updating the node feature in C2 is: H (l+1) =σ(D 1 / 2 AD 1 / 2 H (l) W (l) ); And H (l+1) is the node feature matrix representing the (l+1)th layer, H (l) To represent the adjacent node features of the lth layer, matrix A represents the adjacency matrix, D represents the degree matrix, and W (l) represents the weight matrix of the lth layer, σ represents the activation function; The node feature update formula is: ; Among them, h i represents the updated features of node i, N(i) represents the set of neighbor nodes of node i, d i and d j Represent the degrees of nodes i and j respectively; The mapping formula for risk level in C3 is: Y = softmax(H (l) W (l+1) ); And W (l+1) is the weight matrix of the output layer, Y is the risk level prediction result of the node, each row represents the predicted probability distribution of a node, and softmax is a combination of a fully connected layer and a classifier to realize the mapping operation of risk level.
[0031] By taking the node feature matrix and adjacency matrix as the input layer of the risk level prediction model, setting the GCN layer to aggregate and update the node features layer by layer, each layer of GCN uses the adjacency matrix and degree matrix to aggregate the information of neighboring nodes, and the graph neural network learns the local features of the nodes. In the output layer, the updated node feature matrix is mapped to the specific risk level, so that it can gradually adapt to the complexity of the data after multiple adjustments during the training process, and the model parameter adjustment gradually converges and finally stabilizes, so that the model can reach the optimal state and better perform risk level prediction operations.
[0032] The present invention uses two layers of GCN, the number of hidden units in each layer is 64, the activation function is ReLU, the model training uses the Adam optimizer, the learning rate is 0.01, the number of training rounds is 500, and the early stopping strategy is adopted during the training process to prevent overfitting. The training environment is Python 3.8 and implemented using the PyTorch framework. It can be seen that as the number of training rounds increases, the model gradually converges. The loss curve in the specific experimental training process is as follows Figure 3 As shown in the figure, in the later stage of model training (after about 1500 rounds), the loss curve begins to oscillate slightly, and with the increase of training rounds, the amplitude of the oscillation gradually decreases, while the frequency of the oscillation gradually becomes faster. Finally, the loss value tends to converge. This phenomenon shows that the model has gradually adapted to the complexity of the data after multiple adjustments during the training process. The gradual weakening of this oscillation indicates the stability of the model in fine learning of complex features. The reduction in the amplitude of the oscillation reflects the gradual convergence of the model parameter adjustment, which eventually tends to be stable, indicating that the model has reached the optimal state and can better carry out risk level prediction.
[0033] In the embodiment of the present invention, the specific operation of the risk level prediction result in a23 is: D1. Output risk prediction results based on graph neural network and perform back propagation; D2. Use the cross entropy loss function to calculate the error between the predicted result and the true label to achieve the compensation operation between the predicted result and the true label. The specific loss function formula is: ; N represents the number of samples, C represents the number of categories, and y gc represents the true label of sample g, represents the predicted probability of sample g; Then, the model parameters are updated through the gradient descent algorithm to minimize the loss function, which is formulated as: θ new =θ old -η(▽ θ )L; θ new is the new model parameter, θ old is the old model parameter, η represents the learning rate, (▽ θ )L represents the gradient of the loss function with respect to the parameters; D3. Use accuracy, precision, recall and F1 score to evaluate the performance of the risk level prediction model.
[0034] In the embodiment of the present invention, the operation of transferring the parameter data of the area to be tested in A3 to the risk level prediction model for risk level prediction is: a31. After collecting parameter data of the area to be tested, the data is cleaned and processed by the risk level prediction model, and then a current risk level prediction model for the area to be tested is established based on the knowledge graph and graph neural network; a32. Analyze and output the risk results of the area to be tested based on the risk level prediction model, and adjust the prevention strategy based on the predicted risk results.
[0035] Example 2: Compared with Example 1, the present invention also collects data from a subtropical monsoon climate area for detection. The current area has dense streams and rivers, with an average annual precipitation of 1638 mm. The unique climate characteristics and topographic conditions lead to frequent and repeated flash floods. According to the flash flood disaster investigation and evaluation data statistics, the current area of flash flood disaster prevention and control areas accounts for 78% of the total area of the province. There are 9758 flash flood disaster danger areas, with a population of more than 800,000 in the danger areas. The data set of this article comes from a wide range of sources, including flash flood disaster investigation and evaluation data. , news reports, statistical yearbooks, etc., of which 9758 flash flood disaster investigation and evaluation data were included, of which 9000 were obtained after noise removal; there were 1756 news reports with flash flood disaster keywords as titles in the past 15 years, of which 857 were obtained after noise removal. The experimental data set contained 9000 records with characteristics such as geographic location and risk type, which were divided into a training set of about 7200, a validation set of 900 and a test set of 900 at a ratio of approximately 8:1:1, which were used for model training, model selection and hyperparameter tuning, and evaluation of model generalization performance, respectively.
[0036] In addition to using traditional classification indicators such as accuracy, precision, recall, and F1-Score, the specific model evaluation operation also uses the area under the receiver operating characteristic curve (AUC) to further measure the performance of the model. AUC is an important indicator for measuring the ability of a classification model to sort positive and negative samples. Its value range is between 0.5 and 1, where 1 means that the model has perfect discrimination ability, while 0.5 means that the model has no discrimination ability, which is equivalent to random guessing. Specifically, the closer the AUC is to 1, the stronger the classification ability of the model, and the change curve during the model training process is as follows: Figure 4 shown.
[0037] In the present invention, a 5-fold cross validation was performed on the model to evaluate its performance more robustly. The AUC value of each fold is shown in Table 1, which gradually increases from 0.79 in the first fold to 0.84 in the fifth fold. At the same time, other performance indicators such as accuracy, precision, recall and F1 score also show corresponding improvements. These results show that with the training of the model, the overall performance of the model has been significantly improved, verifying the effectiveness of the proposed method.
[0038] The model was evaluated using the 5-fold cross-validation method. The data set was randomly divided into 5 subsets, 4 of which were used for training each time, and 1 subset was used for validation. This was repeated 5 times, and the final result was the average of the 5 experiments. The model evaluation results are shown in Table 1: Table 1 Model evaluation results AUC Accuracy Precision Recall F1-Score Fold 1 0.79 0.85 0.83 0.84 0.83 Fold 2 0.81 0.86 0.84 0.85 0.84 Fold 3 0.82 0.87 0.85 0.86 0.85 Fold 4 0.83 0.88 0.86 0.87 0.86 Fold 5 0.84 0.89 0.87 0.88 0.87 In summary, cross-validation effectively evaluates the stability and generalization ability of the model.
[0039] Meanwhile, the contents not described in detail in this specification belong to the prior art known to those skilled in the art.
[0040] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0041] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for predicting flash flood disaster risk level based on knowledge graph and graph neural network, characterized by: The specific steps include: A1. Collect data related to flash flood disaster risks and perform data preprocessing operations; A2. Build and train a risk level prediction model combining knowledge graph and graph neural network. The specific operations are as follows: a21. Extract entities and relationships from the data, and construct a risk knowledge graph using node definition, edge definition, knowledge fusion, and graph update operations; a22. Based on the constructed knowledge graph, the graph neural network is used to learn and aggregate node features, and feature information is extracted for risk level prediction; a23. Utilize forward propagation, loss calculation, parameter update and result evaluation to obtain the predicted results of risk level and implement multiple trainings; A3. Introduce parameter data of the area to be tested into the risk level prediction model to predict the risk level.
2. The method for predicting flash flood disaster risk level based on knowledge graph and graph neural network according to claim 1 is characterized in that: The data preprocessing operation in A1 is: a11. Clean the data to remove missing values and outliers in the data, and compensate for missing values and outliers by filling or deleting them; a12. Convert the categorical variables in the retained data into numerical features that can be used for subsequent model training through label encoding; a13. Standardize the numerical features so that the processed numerical features conform to the standard normal distribution; a14. Through feature selection, numerical features that contribute most to model training are selected to optimize model performance.
3. The method for predicting flash flood disaster risk level based on knowledge graph and graph neural network according to claim 2 is characterized in that: The formula for normalizing the numerical features in a13 is: ; Among them, X norm represents the standardized features, X b represents the original feature, α and λ represent the mean and standard deviation values of the feature, respectively, to determine the reduction in variance of the numerical feature.
4. The method for predicting flash flood disaster risk level based on knowledge graph and graph neural network according to claim 1 is characterized in that: The operation of constructing the risk knowledge graph in a21 is: B1. Identify each entity in the data and assign a unique identifier to define it as a node in the graph; B2. Define the edges between nodes, implement the association operations between nodes, and form the infrastructure of the risk knowledge graph by constructing formulas; B3. Through the knowledge fusion step, extract external impact data and integrate it into the knowledge graph to improve the risk knowledge graph architecture; B4. Add the preprocessed new data to the risk knowledge graph, update the attributes of the nodes and the connection information of the edges, delete outdated data or no longer relevant relationships, and realize real-time update of the graph.
5. The method for predicting flash flood disaster risk level based on knowledge graph and graph neural network according to claim 4 is characterized in that: The formula constructed in B2 is: G = (V, E); G represents the risk knowledge graph, V represents the node set, and E represents the edge set; For the association operation between nodes, it is necessary to determine the relationship similarity between the nodes to determine the edge weight and the association direction, and the specific determination operation is: b21. Select any two nodes and first determine whether the two nodes are of the same type of regional location features. If they are of the same type, it is necessary to determine whether the regional locations are adjacent, and then introduce geographic information to determine the risk flow direction to point to the flow node; b22. If the features are not of the same type and one node is a regional location feature, the association direction is transmitted from the current node to another node, and the nodes that need to be constructed related to the current node are summarized and marked as v n {v1, v2, …, v n }, determine the contribution influence according to the economic loss value caused by each single node feature in the historical data, determine the influence order of each node feature according to the size of the economic loss value, and the one with the largest value has the greatest influence, and then determine the edge weight according to the sorted node features; b23. In this way, a complete risk knowledge graph architecture is constructed.
6. The method for predicting flash flood disaster risk level based on knowledge graph and graph neural network according to claim 5 is characterized in that: The calculation formula of the edge weight in b22 is: W n(n-1) =sim(v n ,v n-1 ); W n(n-1) Represents node v n and node v n-1 The edge weight between n Represented as the nth node, sim(v n , v n-1 ) represents the similarity between nodes; And sim (v n , v n-1 ) = [(k1+k2+…+k n ) / n] / k n ; k n It is expressed as the nth loss value after sorting the economic loss value, and (k1+k2+…+k n ) / n is the average value of economic losses of all the influencing node characteristics.
7. The method for predicting flash flood disaster risk level based on knowledge graph and graph neural network according to claim 1 is characterized in that: The operation of learning and aggregating node features using the graph neural network in a22 is: C1. Use the node feature matrix and adjacency matrix as the input layer of the risk level prediction model to ensure that the graph neural network can capture the relationship between nodes; C2. Set the GCN layer to aggregate and update the node features layer by layer. Each layer of GCN uses the adjacency matrix and degree matrix to aggregate the information of neighboring nodes. C3. The graph neural network learns the local features of the nodes and maps the updated node feature matrix to specific risk levels in the output layer.
8. The method for predicting flash flood disaster risk level based on knowledge graph and graph neural network according to claim 7 is characterized in that: The expression for updating node features in C2 is: H (l+1) =σ(D 1 / 2 AD 1 / 2 H (l) W (l) ); And H (l+1) is the node feature matrix representing the (l+1)th layer, H (l) To represent the adjacent node features of the lth layer, matrix A represents the adjacency matrix, D represents the degree matrix, and W (l) represents the weight matrix of the lth layer, σ represents the activation function; The node feature update formula is: ; Among them, h i represents the updated features of node i, N(i) represents the set of neighbor nodes of node i, d i and d j Represent the degrees of nodes i and j respectively; The mapping formula for risk level in C3 is: Y=softmax(H (l) W (l+1) )) And W (l+1) is the weight matrix of the output layer, Y is the risk level prediction result of the node, each row represents the predicted probability distribution of a node, and softmax is a combination of a fully connected layer and a classifier to realize the mapping operation of risk level.
9. The method for predicting flash flood disaster risk level based on knowledge graph and graph neural network according to claim 1 is characterized in that: The specific operation of the risk level prediction result in a23 is: D1. Output risk prediction results based on graph neural network and perform back propagation; D2. Use the cross entropy loss function to calculate the error between the predicted result and the true label to achieve the compensation operation between the predicted result and the true label. The specific loss function formula is: ; N represents the number of samples, C represents the number of categories, and y gc represents the true label of sample g, represents the predicted probability of sample g; Then, the model parameters are updated through the gradient descent algorithm to minimize the loss function, which is formulated as: i new =θ old -η(▽ θ )L; θ new is the new model parameter, θ old is the old model parameter, η represents the learning rate, (▽ θ )L represents the gradient of the loss function with respect to the parameters; D3. Use accuracy, precision, recall and F1 score to evaluate the performance of the risk level prediction model.
10. The method for predicting flash flood disaster risk level based on knowledge graph and graph neural network according to claim 1 is characterized in that: The operation of using the parameter data of the area to be tested in A3 to predict the risk level in the risk level prediction model is as follows: a31. After collecting parameter data of the area to be tested, the data is cleaned and processed by the risk level prediction model, and then a current risk level prediction model for the area to be tested is established based on the knowledge graph and graph neural network; a32. Analyze and output the risk results of the area to be tested based on the risk level prediction model, and adjust the prevention strategy based on the predicted risk results.
Citation Information
Patent Citations
Mountain torrent disaster risk division and prediction method based on GIS (geographic information system)-neural network integration
CN108280553A
Multi-layer gradually-enhanced geological disaster knowledge graph and automatic completion method of multi-layer gradually-enhanced geological disaster knowledge graph
CN111639196A
Graph neural network forest fire risk prediction method based on variable area unit
CN118535900A
Granary risk event intelligent early warning and processing method based on ensemble learning and time sequence diagram neural network
CN118569634A
Landslide space prediction method based on knowledge graph and representation learning
CN119398148A
Cited By
Mountain torrent disaster classification method, device and equipment
CN120277545A
A method, apparatus and equipment for classifying flash flood disasters
CN120277545B
Flood classification method based on graph attention neural network
CN120408322A
A flood classification method based on graph attention neural network
CN120408322B
Park safety risk early warning and response plan generation method
CN120562890A