Avalanche monitoring and early warning method based on deep learning
By applying graph neural networks and a variational autoencoder enhanced by self-attention mechanism in the field of avalanche monitoring, the problem that prior art is difficult to capture key risk signals in avalanche monitoring data is solved, and a more efficient and reliable avalanche warning is achieved.
Patent Information
- Application Number
- CN202510294890.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-13
- Publication Date
- 2025-04-08
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing avalanche monitoring technology is difficult to effectively capture key risk signals in multi-time sequence data with high-dimensional and strong space-time dependence, resulting in early warning lag or misjudgment.
Avalanche monitoring and early warning model is constructed based on graph neural network (GATv2) and a variational autoencoder (VAE) enhanced by self-attention mechanism. Through graph structure modeling and timing dependency modeling, potential features and complex nonlinear relationships in the data are captured.
It significantly improves the abnormal detection accuracy and robustness of avalanche monitoring data, reduces the false alarm rate, can adapt to the dynamic changes in data distribution, and provides more accurate and reliable early warnings.
Smart Images

Figure CN119782772A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to an avalanche monitoring and early warning method, in particular to an avalanche monitoring and early warning method based on deep learning. Background Art
[0002] This section merely provides background information related to the present disclosure and is not necessarily prior art.
[0003] Avalanches are one of the most active and destructive natural disasters in mountainous areas. Similar to landslides and mudslides, avalanches are potential and sudden, and are often difficult to predict accurately. The occurrence of avalanche disasters not only directly threatens local traffic safety, but may also lead to serious consequences such as damage to infrastructure, casualties, and livestock losses. According to statistics, the average annual growth rate of direct economic losses caused by avalanches worldwide in the past decade has exceeded 15%, and the misjudgment rate of avalanche warnings in some high-altitude areas is as high as 30%, which seriously restricts the efficiency of disaster prevention and mitigation. The accuracy and timeliness of avalanche monitoring are directly related to the reliability of the early warning system, and existing monitoring technologies mostly rely on meteorological data and multivariate time series data generated by physical sensor networks. Such data has the characteristics of high dimensionality, strong spatiotemporal dependence, and nonlinear dynamic evolution of abnormal patterns. Traditional analysis methods often find it difficult to effectively capture key risk signals, resulting in delayed or misjudged warnings, which has become a weak link in the avalanche disaster prevention and control system.
[0004] At present, avalanche monitoring technology is mainly divided into three categories, including threshold analysis based on physical empirical models, statistical models based on traditional machine learning, and time series prediction models based on deep learning. The threshold analysis method based on physical empirical models establishes a static physical relationship model between snow stability and meteorological and topographic parameters (such as the SNOWPACK model or the snow layer energy balance model), and combines expert experience to set a fixed threshold for risk assessment. However, this method is highly dependent on artificial feature engineering and has a delayed response to sudden environmental changes. At the same time, static thresholds are difficult to adapt to the terrain and climate differences in different regions, resulting in an increase in false alarm rates and weak generalization capabilities. Statistical models based on traditional machine learning (such as support vector machines and random forests) predict trends through historical data classification or time series models, and identify anomalies in combination with outlier detection algorithms. Although this type of method can handle some nonlinear problems, it is insufficient in modeling the spatiotemporal coupling characteristics of multivariate time series data, and often simplifies the spatial topological relationship of the sensor network into independent features, resulting in the loss of spatial correlation information. In addition, relying on artificially designed statistical features cannot capture the deep potential patterns of the data, has low sensitivity to tiny abnormal signals, and has weak long sequence processing capabilities, making it difficult to cope with the non-stationary and multi-period superposition characteristics of avalanche monitoring data.
[0005] In recent years, deep learning models represented by long short-term memory networks (LSTM), autoencoders, and temporal convolutional neural networks (TCN) have been introduced into the field of avalanche monitoring, attempting to capture temporal dynamics through end-to-end learning or identify anomalies using reconstruction errors. However, such models only focus on temporal dependencies and ignore the spatial topological associations of sensor networks, resulting in ineffective utilization of key spatial features. Traditional variational autoencoders (VAEs) assume that the latent space follows a Gaussian distribution, have limited ability to fit complex data distributions, and lack a mechanism to focus on key time steps or features, making it easy to miss minor anomalies. Existing graph neural networks rely on predefined static adjacency matrices and cannot adaptively learn the dynamic association weights between sensor nodes, resulting in reduced feature extraction accuracy.
[0006] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0007] Purpose of the invention: The technical problem to be solved by the present invention is to provide an avalanche monitoring and early warning method based on deep learning in view of the shortcomings of the prior art.
[0008] In order to solve the above technical problems, the present invention discloses an avalanche monitoring and early warning method based on deep learning, comprising the following steps: Step 1: Obtain environmental monitoring data for a period of time before the current moment and perform preprocessing to construct a training data set; Step 2: construct an avalanche monitoring and early warning model; Step 3, using the training data set in step 1, training the avalanche monitoring and early warning model constructed in step 2; Step 4, inputting the forecast data of environmental monitoring into the trained avalanche monitoring and early warning model for data reconstruction to obtain reconstructed data corresponding to the forecast data; Step 5, calculating a data reconstruction error according to the forecast data and the corresponding reconstructed data; Step 6: Determine data anomaly based on the data reconstruction error and a preset threshold value, and complete the avalanche monitoring and early warning.
[0009] Furthermore, the step 1 of constructing a training data set includes: Step 1-1, collecting environmental detection data; Step 1-2, filling in missing values in the collected environmental detection data; Step 1-3, normalize the filled complete data; In steps 1-4, all the normalized data are used as training data to obtain a training data set.
[0010] Furthermore, filling missing values in the collected environmental detection data in step 1-2 includes: ; in, is the jth eigenvalue of the environmental monitoring data at time point t. The environmental monitoring data at this time is expressed as , and For missing values Environmental monitoring data at two time points on both sides.
[0011] Furthermore, the normalization process described in steps 1-3 includes: ; Among them, n is the number of samples, that is, the number of environmental monitoring data, is the j-th eigenvalue of the ith sample, and are the standard deviation and mean deviation of the j-th eigenvalue, It is the jth eigenvalue of the i-th sample after normalization.
[0012] Furthermore, the avalanche monitoring and early warning model described in step 2 is constructed based on a graph neural network and a variational autoencoder that introduces a self-attention mechanism.
[0013] Furthermore, the avalanche monitoring and early warning model described in step 2 includes: Graph attention network module, variational autoencoder and decoder enhanced by self-attention mechanism; among them, The graph attention network module performs graph structure modeling on the input data, captures the spatial dependencies and nonlinear interactions between different samples, and obtains feature data; The variational autoencoder enhanced by the self-attention mechanism takes the feature data output by the graph attention network module as input, introduces the self-attention mechanism to model the long-range dependency of the temporal dimension, and generates a spatiotemporal joint feature representation; The decoder reconstructs data of the spatiotemporal joint feature representation based on the latent space to obtain final reconstructed data.
[0014] Furthermore, the graph attention network described in step 2 adopts a multi-head attention mechanism to perform graph convolution processing on the input data, including: Construct an n∙n adjacency matrix to represent the relationship between samples in the input data, where n is the number of samples in the input data; Initialize the learnable weight matrix W and calculate the attention weights between each sample in the input data , the method is as follows: ; in, is a learnable weight vector, is an exponential function, and are the input features of sample i and sample m, is the set of neighbor samples of sample i, k is the neighbor sample; is the activation function; According to the attention weight , calculate the final feature representation of sample i , the specific method is as follows: ; Finally, the feature representation of all samples forms the feature data , as the output of the graph attention network, where n is the number of samples of the input data.
[0015] Furthermore, the variational autoencoder enhanced with the self-attention mechanism described in step 2, i.e., adding a self-attention layer to the hidden layer of the variational autoencoder, mapping the feature data output by the graph attention network module to latent variables, includes: For the feature representation in the input feature data , calculate the query vector corresponding to the feature representation , key vector and the target vector , the calculation method is as follows: ; in, , and are the query vectors represented by the feature , key vector and the target vector The corresponding linear transformation matrix; The characteristics indicated The query vector and each key vector Do the dot product and divide by the scaling factor , and get a set of attention scores ; use The function normalizes the group of attention scores into attention weights and obtains the self-attention layer output by weighted summation. , the calculation method is as follows: ; in, is the key vector The transposed vector of is the corresponding target vector, is the key vector Dimensions; The variational autoencoder converts the output of the attention layer The mean value mapped to the latent space and standard deviation vector, and generate the latent variable z through the reparameterization method for output, which is expressed as follows: ; in, represents the encoder, X represents the encoder input, i.e. the output of the attention layer , is the noise sampled from a standard normal distribution.
[0016] Further, the training described in step 3 includes: Step 3-1, calculate the training loss based on the output result and input data of the avalanche monitoring and early warning model. It is expressed as: ; in, Represents the training loss of the graph attention network module, which is calculated as follows: ; in, is the true label, is the label probability predicted by the graph attention network, and n is the number of data samples; represents the training loss of the variational autoencoder and decoder enhanced with the self-attention mechanism, which is calculated as follows: ; in, Represents the original input data x and the decoder output The difference between is the KL divergence, used to measure the variational distribution and the latent space prior distribution The difference between is the KL divergence loss; Based on the training loss , the grid search method is used to tune the hyperparameters of the avalanche monitoring and early warning model.
[0017] Furthermore, the calculation of data reconstruction error in step 5 includes: ; in, is the data reconstruction error, d represents the dimension of the input data of the avalanche monitoring and early warning model, is the input data of the avalanche monitoring and early warning model, It is the reconstructed data output by the avalanche monitoring and early warning model.
[0018] Beneficial Effects
[0019] 1. The present invention adopts graph neural network (GATv2) to perform graph structure modeling on avalanche monitoring data, which can fully explore the potential features and dependencies in avalanche monitoring data, and accurately capture the complex nonlinear relationships between samples, thereby greatly improving the accuracy and robustness of the model's anomaly detection in high-dimensional and multivariate time series data environments.
[0020] 2. The present invention introduces a self-attention mechanism into the variational autoencoder (VAE) to automatically identify and strengthen key patterns in the data, significantly enhancing the model's ability to capture complex data patterns and abnormal information. The encoder maps the data to the latent space, and the decoder reconstructs the data and calculates the reconstruction error, which can quickly and accurately identify potential avalanche risk points, improving the shortcomings of traditional methods in processing complex dependency data.
[0021] 3. The present invention effectively reduces the false alarm rate by making full use of the difference between real data and reconstructed data during the model training process, and can adapt to the dynamic changes of data distribution, providing a more accurate and reliable anomaly detection solution for avalanche monitoring and risk warning. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments, and the above and / or other advantages of the present invention will become more clear.
[0023] Figure 1 It is a schematic diagram of the overall process of the present invention.
[0024] Figure 2 It is a schematic diagram of the overall network architecture of the present invention.
[0025] Figure 3 It is a schematic diagram of the model training loss function of the present invention.
[0026] Figure 4 Schematic diagram of reconstruction error distribution of the present invention. DETAILED DESCRIPTION
[0027] The present invention provides an anomaly detection method for avalanche monitoring data based on a graph attention network (GATv2) and a self-attention enhanced variational autoencoder (VAE), which can effectively solve the problem of difficulty in capturing key features under high-dimensional and complex dependency data, significantly improve the accuracy and robustness of anomaly detection, and is particularly suitable for the analysis and risk warning of multivariate time series data.
[0028] GAT (Graph Attention Network) is a graph neural network. The original GAT model can only calculate static attention, which makes it limited in dealing with some simple graph structure problems. GATv2 solves this problem by adjusting the order of operations. Unlike traditional methods, GATv2 can dynamically update node features based on the attention relationship between each node and its neighboring nodes. In addition, GATv2 adopts a multi-head attention mechanism, which enables the network to learn different information from multiple perspectives, especially suitable for graph-based inductive learning tasks, so it performs well in applications such as scene graph learning.
[0029] Self-attention (SA) is a mechanism that enhances information representation by calculating the correlation between different parts of the input sequence. Without considering the time dimension, it mainly solves the dependency and interaction problems between the elements in the input data. The self-attention mechanism achieves this process through three key vectors: Query, Key and Value.
[0030] VAE (Variational auto-encoder) is a generative model consisting of an encoder and a decoder. In VAE, the input data x is passed through the encoder Transformed into latent feature z, and then passed through the decoder Generate reconstruction data During the training process, the reconstruction error is usually used to measure the difference between the reconstructed data and the original data. When there is a large difference between the input data and the training data distribution, the trained VAE model may not be able to generate samples similar to the input data, resulting in an increase in the reconstruction error. At this time, it can be considered that the input data may belong to the abnormal data category.
[0031] The specific technical solution of the present invention is as follows: A method for detecting abnormalities in avalanche monitoring data based on deep learning, such as Figure 1 As shown, it includes steps (1) to (6) performed in sequence: (1) Obtain environmental monitoring data for a period of time before the current moment and perform preprocessing.
[0032] (2) Construct an avalanche monitoring and early warning model, hereinafter referred to as the GATv2-SA-VAE model.
[0033] (3) Train the GATv2-SA-VAE model.
[0034] (4) Inputting the environmental monitoring forecast data into the trained GATv2-SA-VAE model for data reconstruction to obtain reconstructed data corresponding to the environmental monitoring forecast data. The GATv2-SA-VAE model is trained using normal environmental monitoring data without avalanche as training samples.
[0035] (5) Calculating an anomaly score based on the environmental monitoring forecast data and the corresponding reconstructed data.
[0036] (6) When the anomaly score exceeds a preset threshold at a certain time point, it is determined that the environmental forecast data at that time point is abnormal, that is, the time point at which an avalanche disaster may occur.
[0037] The GATv2-SA-VAE model combines a graph attention network (GATv2) and a variational autoencoder (VAE) enhanced with a self-attention mechanism (Self-Attention, SA). The GATv2 module first models the graph structure of the avalanche monitoring data to capture the spatial dependencies and nonlinear interactions between different features. Then, the feature data processed by GATv2 is input into the VAE encoder, and the self-attention mechanism is introduced to model the long-range dependencies of the temporal dimension to generate a joint spatiotemporal feature representation. Finally, the decoder reconstructs the data based on the latent space, and calculates the anomaly score through the self-attention mechanism and reconstruction error to accurately identify local anomalies and global pattern shifts.
[0038] Preferably, the step (1) collects environmental monitoring data over a period of time and performs preprocessing, including: (1.1) Perform missing value test on the collected environmental monitoring data. If there are missing values, fill the missing values in the environmental monitoring data samples; (1.2) Normalize the environmental monitoring data after missing value filling; Divide the data samples that have completed missing value filling and normalization into complementary and intersecting training sets and test sets; And / or, the expression for filling missing values in environmental monitoring data is: ; in, is the jth eigenvalue of the monitoring data at time point t, and For missing values Environmental monitoring data at two time points on both sides.
[0039] Preferably, the environmental monitoring data is normalized, and the expression is: ; Among them, n is the number of samples, that is, the number of environmental monitoring data, is the j-th eigenvalue of the ith sample, and are the standard deviation and mean deviation of the j-th eigenvalue, It is the j-th eigenvalue of the i-th sample after standardization.
[0040] Preferably, the step (3) comprises.
[0041] (3.1) Extract features from the model input data and perform graph convolution processing through the GATv2 module.
[0042] (3.2) The encoder maps the output of the GATv2 module to latent variables through the self-attention mechanism.
[0043] (3.3) The decoder maps latent variables to reconstructed data.
[0044] (3.4) Calculate the training loss of the model based on the reconstructed data and the original data to obtain the error range.
[0045] (3.5) The parameters of the GATv2-SA-VAE model are optimized based on the loss function of the model, and a trained GATv2-SA-VAE model is obtained after the training is completed.
[0046] Preferably, the step (3.1) of performing graph convolution processing on the model input data by using the GATv2 module comprises the following steps: (3.1.1) Based on the correlation between the samples of the model input data, an adjacency matrix M is constructed to describe the connection relationship between the data samples.
[0047] (3.1.2) Based on the constructed adjacency matrix M, initialize the learnable weight matrix W and calculate the attention weights between each sample in the input data , the calculation formula is: ; Among them, a is the learnable weight vector, exp() is the exponential function, and is the input feature of sample i and sample m, Ν(i) is the set of neighbor samples of sample i, k is the neighbor sample; LeakyReLU is the activation function.
[0048] (3.1.3) According to the calculated attention weights between nodes , the final feature representation of sample i The calculation is as follows: ; Preferably, in step (3.2), the encoder encodes and maps the environmental monitoring data output by the GATv2 module into the latent space through a self-attention mechanism, and the working steps of the self-attention layer are as follows: (3.2.1) Feature representation for input multivariate time series data , the self-attention layer first calculates the query vector of the feature representation , key vector and the target vector , and their calculation formulas are: ; in, are the query vectors represented by the features , key vector and the target vector The corresponding linear transformation matrix; (3.2.2) Then, the feature representation The query vector and all key vectors Do the dot product and divide by the scaling factor , get the attention score .
[0049] (3.2.3) Use the Softmax function to normalize the attention score into attention weight (3.2.4) The attention layer output is obtained by weighted summation , the calculation formula is: ; in, is the key vector The transposed vector of is the corresponding target vector, is the key vector Dimension.
[0050] Preferably, the encoder of the VAE in step (3.2) maps the output of the attention layer to the mean of the latent space and standard deviation vector, and generate the latent variable z through the reparameterization method for output, expressed as: ; In the formula, Encoder(X) represents the encoder, X represents the encoder input, is the noise sampled from a standard normal distribution.
[0051] Preferably, the decoder of the VAE in step (3.3) maps the latent variable z back to the data space, generating reconstructed data similar to the input data , expressed as: ; The decoder converts the latent variable z into reconstructed data through a neural network and be as close as possible to the distribution of the input X.
[0052] Preferably, the following formula is used in step (3.1) to represent the training loss of the GATv2 module: ; in, is the true label, is the label probability predicted by the model and n is the number of data samples.
[0053] Preferably, the following formula is used in step (3.3) to represent the training loss of the VAE model: ; in, represents the training loss of the VAE model, Used to measure the original input data x and the decoder output The difference between The KL divergence is used to measure the difference between the variational distribution q(z|x) and the latent space prior distribution p(z). The standard normal distribution is usually chosen as the prior.
[0054] Preferably, in step (3.5), the loss function of the GATv2-SA-VAE model is expressed by the following formula: .
[0055] Example
[0056] The following is a clear and complete description of the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings in the implementation of the present invention. Obviously, the described embodiments are only some embodiments of the present invention and are not intended to limit the scope of protection of the present invention. 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.
[0057] (1) A total of 1920 environmental monitoring data were collected from the environmental monitoring data server during a long period of time when no avalanches occurred. The monitoring data included 64 characteristics such as air temperature, air humidity, wind speed, snow depth, and minute rainfall.
[0058] (1.1) Perform missing value test on the environmental monitoring data samples obtained. If there are missing values, fill them. Missing values are filled using linear interpolation, and the calculation formula is as follows: ; in, is the monitoring value of the jth feature at time point t, and For missing values Environmental monitoring data at two time points on both sides.
[0059] (1.2) All environmental monitoring data samples that have been processed for missing values are normalized. The normalization method uses the z-score standardization method to standardize the data within a specific range. The calculation formula is as follows: ; Among them, n is the number of samples, that is, the number of environmental monitoring data, is the j-th eigenvalue of the ith sample, and are the standard deviation and mean deviation of the j-th eigenvalue, Then it is the jth eigenvalue of the i-th sample after standardization. (1.3) The environmental monitoring data after missing value processing and normalization are divided into non-overlapping training set and test set in a ratio of 8:2.
[0060] (2) Building the GATv2-SA-VAE model An avalanche monitoring and warning model GATv2-SA-VAE is constructed based on graph neural network (GATv2) and variational autoencoder (VAE) with self-attention mechanism (SA).
[0061] GATv2 is an improved graph attention network that uses the attention mechanism to perform weighted aggregation on adjacent nodes, enabling it to learn asymmetric relationships between nodes more flexibly. In a multi-layer structure, GATv2 enhances the stability of the model through a multi-head attention mechanism and effectively captures complex nonlinear dependencies in graph structured data.
[0062] The self-attention mechanism is used to calculate the correlation between elements in environmental monitoring data. It enables the model to better focus on global information by performing weighted calculations on the entire input data. The self-attention mechanism uses the query (Q), key (K), and value (V) matrices to calculate attention weights to determine the degree of influence of each element on other elements, and generates enhanced representations accordingly. Figure 2As shown in the figure, by adding a self-attention module to the hidden layer of the VAE encoder, each data point can pay attention to the entire input data, automatically identify key features, and enhance the ability to capture abnormal patterns.
[0063] As a generative model, the variational auto-encoder (VAE) maps input data to the probability distribution of the latent space through the encoder, and uses the decoder to reconstruct the data from the latent variables. The training goal of VAE is to optimize the variational lower bound, and by combining the reconstruction error and the KL divergence of the latent space distribution, the latent space conforms to the standard normal distribution. In the task of anomaly detection of environmental monitoring data, when the error between the input data and the reconstructed data is large, it means that the data may deviate from the normal mode and is then marked as abnormal data.
[0064] (3) Train the GATv2-SA-VAE model. The specific training process is as follows: (3.1) The preprocessed environmental monitoring data is input into the GATv2 model for graph convolution processing.
[0065] (3.1.1) Construct a 1920∙1920 fully connected adjacency matrix M to represent the relationship between each data point.
[0066] ; (3.1.2) Initialize the learnable weight matrix W and calculate the attention weight of the node , the calculation formula is: ; Among them, a is the learnable weight vector, exp() is the exponential function, and is the input feature of sample i and sample m, Ν(i) is the set of neighbor samples of sample i, k is the neighbor sample; LeakyReLU is the activation function.
[0067] (3.1.3) According to the calculated attention weights between nodes , the final feature representation of sample i The calculation is as follows: ; (3.2) Use the VAE encoder to map the output of the GATv2 module to latent variables through the self-attention mechanism, where the working steps of the self-attention layer are as follows: (3.2.1) Feature representation for input multivariate time series data , the self-attention layer first calculates the query vector of the feature representation , key vector and the target vector , their calculation formula is: ; in, are the query vectors represented by the features , key vector and the target vector The corresponding linear transformation matrix; (3.2.2) Feature representation The query vector and all key vectors Do the dot product and divide by the scaling factor , get the attention score .
[0068] (3.2.3) Use the Softmax function to normalize the attention score into attention weight (3.2.4) The attention layer output is obtained by weighted summation , the calculation formula is: ; in, is the key vector The transposed vector of is the corresponding target vector, is the key vector Dimension.
[0069] (3.2.5) The VAE encoder maps the output of the attention layer to the mean μ(X) and standard deviation σ(X) vectors in the latent space, and generates the latent variable z for output through the reparameterization technique, expressed as: ; Where Encoder(X) represents the encoder, X represents the encoder input, and ϵ~N(0,I) is the noise sampled from the standard normal distribution.
[0070] (3.3) The VAE decoder maps the latent variables z to reconstructed data.
[0071] The decoder maps the latent variables z back to the data space, generating reconstructed data similar to the input data , expressed as: ; (3.4) The training loss of the model is calculated based on the reconstructed data and the original data. The training loss of the model is expressed as: ; The training loss of the GATv2 module is expressed as follows: ; in, is the true label, is the label probability predicted by the model and n is the number of data samples.
[0072] The following formula is used in step (3.3) to represent the training loss of the VAE model: ; in, represents the training loss of the VAE model, Used to measure the original input data x and the decoder output The difference between KL divergence is used to measure the difference between the variational distribution q(z|x) and the potential space prior distribution p(z). The standard normal distribution is usually chosen as the prior. is the KL divergence loss.
[0073] (3.5) Based on the loss function of the model, the grid search method is used to tune the hyperparameters of the GATv2-SA-VAE model. The grid search method presets a possible range of hyperparameter values and systematically explores all combinations within this range to find the best hyperparameter combination. In the selection of hyperparameters, the following aspects are mainly focused on: Learning rate: The learning rate determines the step size of each gradient update and is a key parameter in the model training process. The learning rate in this embodiment ranges from [0.001, 0.005, 0.01, 0.1].
[0074] Hidden_channels: This parameter controls the number of hidden units in each layer of the model, affecting the model's expressiveness and computational complexity. The value range of the hidden_channels in this embodiment is [8, 16, 32].
[0075] Number of heads: The number of heads determines the number of attention heads used in each layer of graph convolution operations in the model. The number of hidden layer channels in this embodiment ranges from [1, 2, 4].
[0076] Regularization coefficient (weight_decay): The regularization coefficient is used to prevent the model from overfitting. The value range of the regularization coefficient in this embodiment is [0.0, 0.01, 0.1].
[0077] Latent dimension: This parameter determines the dimension of the latent space in the variational autoencoder, affecting the representation ability of the model and its performance in complex environmental monitoring data. In this embodiment, the latent dimension ranges from [8, 16, 20, 32].
[0078] According to the size of the model loss function under different hyperparameter combinations, the hyperparameters of the GATv2-SA-VAE model are assigned and the trained model is saved. Table 1 shows some hyperparameter values of the trained GATv2-SA-VAE model, which showed good performance in the experiment and helped the model achieve the best effect. The model training loss function and reconstruction error distribution are shown in Table 1. Figure 3 and Figure 4 shown.
[0079] Table 1: GATv2-SA-VAE model parameters
[0080] (4) Acquisition layer, which acquires the forecast data of environmental monitoring data and inputs the trained GATv2-SA-VAE model to reconstruct the data to obtain the reconstructed data corresponding to the environmental monitoring forecast data.
[0081] (5) Calculating anomaly scores based on the environmental monitoring forecast data and the corresponding reconstructed data, that is, calculating data reconstruction errors based on the environmental monitoring forecast data and the corresponding reconstructed data. , recorded as the abnormality score, expressed as: ; Among them, d represents the dimension of the model input data, is the original input environmental monitoring and forecasting data, The corresponding reconstructed data output by the model decoder.
[0082] (6) When the anomaly score exceeds a preset threshold at a certain time point, it is determined that the environmental forecast data at that time point is abnormal, that is, the time point at which an avalanche disaster may occur.
[0083] In summary, the present invention provides a method for anomaly detection in avalanche monitoring data based on a graph attention network (GATv2) and a self-attention (Self-Attention) enhanced variational autoencoder (VAE), which can effectively solve the problem of difficulty in capturing key features of the model when facing high-dimensional data such as avalanche detection data with complex dependencies, and can significantly improve the accuracy and robustness of anomaly detection, and is particularly suitable for anomaly detection and early warning of avalanche detection data.
[0084] In a specific implementation, the present application provides a computer storage medium and a corresponding data processing unit, wherein the computer storage medium can store a computer program, and when the computer program is executed by the data processing unit, the invention content of the avalanche monitoring and early warning method based on deep learning provided by the present invention and some or all of the steps in each embodiment can be executed. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0085] Those skilled in the art can clearly understand that the technical solutions in the embodiments of the present invention can be implemented by means of computer programs and their corresponding general hardware platforms. Based on such understanding, the technical solutions in the embodiments of the present invention can be essentially or partly contributed to the prior art in the form of computer programs, i.e., software products, which can be stored in a storage medium and include several instructions for enabling a device including a data processing unit (which can be a personal computer, a server, a single-chip microcomputer, an MCU or a network device, etc.) to execute the methods described in various embodiments of the present invention or certain parts of the embodiments.
[0086] The present invention provides an idea and method for an avalanche monitoring and early warning method based on deep learning. There are many methods and ways to implement the technical solution. The above is only a preferred implementation of the present invention. It should be pointed out that for ordinary technicians in this technical field, without departing from the principle of the present invention, several improvements and modifications can be made, and these improvements and modifications should also be regarded as the protection scope of the present invention. All components not specified in this embodiment can be implemented by existing technologies.
Claims
1. A deep learning-based avalanche monitoring and early warning method, characterized in that: The following steps are involved: Step 1: Obtain environmental monitoring data for a period of time before the current moment and perform preprocessing to construct a training data set; Step 2: construct an avalanche monitoring and early warning model; Step 3, using the training data set in step 1, training the avalanche monitoring and early warning model constructed in step 2; Step 4, inputting the forecast data of environmental monitoring into the trained avalanche monitoring and early warning model for data reconstruction to obtain reconstructed data corresponding to the forecast data; Step 5, calculating a data reconstruction error according to the forecast data and the corresponding reconstructed data; Step 6: Determine data anomaly based on the data reconstruction error and a preset threshold value, and complete the avalanche monitoring and early warning.
2. The avalanche monitoring and early warning method based on deep learning according to claim 1 is characterized in that: Constructing a training dataset as described in step 1, including: Step 1-1, collecting environmental detection data; Step 1-2, filling in missing values in the collected environmental detection data; Step 1-3, normalize the filled complete data; In steps 1-4, all the normalized data are used as training data to obtain a training data set.
3. The avalanche monitoring and early warning method based on deep learning according to claim 2 is characterized in that: Filling the missing values in the collected environmental detection data described in step 1-2 includes: ; in, is the jth eigenvalue of the environmental monitoring data at time point t. The environmental monitoring data at this time is expressed as , and For missing values Environmental monitoring data at two time points on both sides.
4. The avalanche monitoring and early warning method based on deep learning according to claim 2 is characterized in that: The normalization process described in steps 1-3 includes: ; Among them, n is the number of samples, that is, the number of environmental monitoring data, is the j-th eigenvalue of the ith sample, and are the standard deviation and mean deviation of the j-th eigenvalue, It is the jth eigenvalue of the i-th sample after normalization.
5. The avalanche monitoring and early warning method based on deep learning according to claim 2 is characterized in that: The construction of the avalanche monitoring and early warning model described in step 2, that is, the construction of the avalanche monitoring and early warning model based on the graph neural network and the variational autoencoder with the self-attention mechanism.
6. The avalanche monitoring and early warning method based on deep learning according to claim 5 is characterized in that: The avalanche monitoring and early warning model described in step 2 includes: Graph attention network module, variational autoencoder and decoder enhanced by self-attention mechanism; among them, The graph attention network module performs graph structure modeling on the input data, captures the spatial dependencies and nonlinear interactions between different samples, and obtains feature data; The variational autoencoder enhanced by the self-attention mechanism takes the feature data output by the graph attention network module as input, introduces the self-attention mechanism to model the long-range dependency of the temporal dimension, and generates a spatiotemporal joint feature representation; The decoder reconstructs data of the spatiotemporal joint feature representation based on the latent space to obtain final reconstructed data.
7. The avalanche monitoring and early warning method based on deep learning according to claim 6 is characterized in that: The graph attention network described in step 2 uses a multi-head attention mechanism to perform graph convolution on the input data, including: Construct an n∙n adjacency matrix to represent the relationship between samples in the input data, where n is the number of samples in the input data; Initialize the learnable weight matrix W and calculate the attention weights between each sample in the input data , the method is as follows: ; in, is a learnable weight vector, is an exponential function, and are the input features of sample i and sample m, is the set of neighbor samples of sample i, k is the neighbor sample; is the activation function; According to the attention weight , calculate the final feature representation of sample i , the specific method is as follows: ; Finally, the feature representation of all samples forms the feature data , as the output of the graph attention network, where n is the number of samples of the input data.
8. The avalanche monitoring and early warning method based on deep learning according to claim 7 is characterized in that: The variational autoencoder enhanced by the self-attention mechanism described in step 2, that is, adding a self-attention layer to the hidden layer of the variational autoencoder, mapping the feature data output by the graph attention network module to latent variables, includes: For the feature representation in the input feature data , calculate the query vector corresponding to the feature representation , key vector and the target vector , the calculation method is as follows: ; in, , and are the query vectors represented by the feature , key vector and the target vector The corresponding linear transformation matrix; The characteristics are expressed The query vector and each key vector Do the dot product and divide by the scaling factor , and get a set of attention scores ; use The function normalizes the group of attention scores into attention weights and obtains the self-attention layer output by weighted summation. , the calculation method is as follows: ; in, is the key vector The transposed vector of is the corresponding target vector, is the key vector Dimensions; The variational autoencoder converts the output of the attention layer The mean value mapped to the latent space and standard deviation vector, and generate the latent variable z through the reparameterization method for output, which is expressed as follows: ; in, represents the encoder, X represents the encoder input, i.e. the output of the attention layer , is the noise sampled from a standard normal distribution.
9. The avalanche monitoring and early warning method based on deep learning according to claim 8, characterized in that: Conduct training as described in step 3, including: Step 3-1, calculate the training loss based on the output result and input data of the avalanche monitoring and early warning model. It is expressed as: ; in, Represents the training loss of the graph attention network module, which is calculated as follows: ; in, is the true label, is the label probability predicted by the graph attention network, and n is the number of data samples; represents the training loss of the variational autoencoder and decoder enhanced with the self-attention mechanism, which is calculated as follows: ; in, Represents the original input data x and the decoder output The difference between is the KL divergence, used to measure the variational distribution and the latent space prior distribution The difference between is the KL divergence loss; Based on the training loss , the grid search method is used to tune the hyperparameters of the avalanche monitoring and early warning model.
10. The avalanche monitoring and early warning method based on deep learning according to claim 9, characterized in that: The calculation of data reconstruction error described in step 5 includes: ; in, is the data reconstruction error, d represents the dimension of the input data of the avalanche monitoring and early warning model, is the input data of the avalanche monitoring and early warning model, It is the reconstructed data output by the avalanche monitoring and early warning model.
Citation Information
Patent Citations
Debris flow data anomaly identification method, computer equipment and medium
CN116383723A
Image target recognition method and system based on feature recognition
CN118196581A
Deep learning-based space-time multivariable wind speed prediction method for wind field
CN118747545A
Cited By
Typhoon intensity forecasting method, device and equipment
CN120068661A
Avalanche dynamic early warning method and system based on avalanche start physical model
CN120636105A
An avalanche dynamic early warning method and system based on an avalanche starting physical model
CN120636105B
Landslide crack prediction method fusing LSTM-VAE and gradient boosting decision tree
CN120687731A
Avalanche risk early warning method based on adaptive data distribution deep learning
CN120913351A