Landslide Prediction Method Based on Multi-Scale Hierarchical Attention Mechanism

By employing a multi-scale hierarchical attention mechanism and density mapping clustering algorithm, the problems of sample imbalance and insufficient feature extraction in landslide prediction are solved, achieving more accurate landslide risk prediction, and providing an efficient early warning solution, especially when rainfall data is limited.

CN121278419BActive Publication Date: 2026-05-26梧州市气象局 +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
梧州市气象局
Filing Date
2025-08-22
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Existing landslide prediction methods suffer from imbalanced samples and insufficient feature extraction, making it difficult to effectively capture complex temporal dynamics and resulting in poor prediction performance.

Method used

A landslide prediction method based on a multi-scale hierarchical attention mechanism is adopted. The number of positive samples is increased by density mapping clustering algorithm, and feature extraction is performed by combining multi-scale wavelet transform to construct a landslide prediction model.

Benefits of technology

It significantly improves the accuracy and performance of landslide prediction, enabling relatively accurate landslide risk prediction even with limited rainfall data or a lack of detailed geological data, and enhances the model's identification capabilities and prediction results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121278419B_ABST
    Figure CN121278419B_ABST
Patent Text Reader

Abstract

This invention relates to a landslide prediction method based on a multi-scale hierarchical attention mechanism, comprising: acquiring rainfall data to be predicted for a target area; inputting the rainfall data to be predicted into a landslide prediction model for multi-scale feature decomposition to obtain several frequency scales; extracting and fusing features from the several frequency scales through an attention mechanism; and outputting the landslide prediction result for the target area. The landslide prediction model is obtained through training on a training set, which consists of landslide-related rainfall data. This invention uses univariate rainfall time-series data as input and utilizes wavelet transform for multi-scale feature decomposition to extract short-term, medium-term, and long-term rainfall features. Based on this, a hierarchical attention mechanism including expanded attention and sampling channel attention is constructed to achieve the extraction of key time-series features and the dynamic fusion of multi-scale features, respectively. This invention significantly outperforms traditional models in prediction accuracy, providing an effective solution for regional landslide early warning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of landslide early warning technology, and in particular to a landslide prediction method based on a multi-scale hierarchical attention mechanism. Background Technology

[0002] Landslides, as a type of geological disaster characterized by their sudden onset and high destructive power, are often triggered by heavy rainfall, earthquakes, or human activities, posing an extremely high risk. Once they occur, they often cause damage to surface vegetation, loss of arable land, destruction of infrastructure such as roads, bridges, and power lines, and even endanger human lives and property. In addition, landslides can trigger secondary disasters such as mudslides and river blockages, further expanding the scope of the damage.

[0003] In recent years, with the widespread application of time series data in various fields, how to effectively augment time series data has become an important research direction. Traditional time series data augmentation methods, such as jittering, scaling, window slicing, warping, and permutation, are widely used due to their simplicity and domain independence. Although these methods are effective, they usually rely on heuristic design and are difficult to capture complex temporal dynamics, resulting in unsatisfactory performance in high-dimensional or multivariate time series.

[0004] Currently, landslide prediction mainly employs statistical modeling methods and deep learning time series models. Statistical modeling methods, such as traditional machine learning algorithms based on logistic regression and support vector machines, utilize static features like rainfall, soil moisture, and slope for prediction. Deep learning time series models primarily use recurrent neural networks such as LSTM and GRU to process time series data and then make predictions; however, these methods struggle to effectively extract multi-scale features and are insufficient at capturing long-term dependencies.

[0005] To address the problems of sample imbalance and insufficient feature extraction in landslide disaster prediction, this invention proposes a landslide prediction method based on a multi-scale hierarchical attention mechanism. Summary of the Invention

[0006] The purpose of this invention is to provide a landslide prediction method based on a multi-scale hierarchical attention mechanism, which aims to solve the problems of sample imbalance and insufficient feature extraction in landslide disaster prediction.

[0007] To achieve the above objectives, the present invention provides the following solution:

[0008] Landslide prediction methods based on multi-scale hierarchical attention mechanisms include:

[0009] Obtain the predicted rainfall data for the target area;

[0010] The rainfall data to be predicted is input into the landslide prediction model for multi-scale feature decomposition to obtain several frequency scales. The attention mechanism is used to extract and fuse features from the several frequency scales to output the landslide prediction results for the target area. The landslide prediction model is obtained by training a training set, which is landslide-related rainfall data.

[0011] Optionally, obtaining the training set includes:

[0012] Obtain unlabeled rainfall data;

[0013] Based on the original positive samples of labeled rainfall data, the unlabeled rainfall data is clustered using coarse-grained and fine-grained clustering methods to obtain potential positive samples, which are then used to enhance the original positive samples, thus obtaining the training set.

[0014] Optionally, clustering the unlabeled rainfall data by combining coarse-grained and fine-grained clustering methods includes:

[0015] S1. Determine the grid size and use rainfall data as the initial weights for density cells;

[0016] S2. Select the current input sample from the original positive sample and the unlabeled rainfall data, and obtain the density unit with the smallest Euclidean distance to the current input sample as the best matching unit;

[0017] S3. Update the weights of the best matching unit and the neighborhood density unit;

[0018] S4. Determine whether the preset iteration termination condition is met. If it is met, obtain the coarse-grained clustering result. If it is not met, return to S2.

[0019] S5. Perform fine-grained clustering based on the coarse-grained clustering results to obtain the potential positive samples.

[0020] Optionally, fine-grained clustering based on the coarse-grained clustering results includes:

[0021] S51. Based on a preset neighborhood, obtain the neighboring density units that cover the density unit where the original positive sample is located, extract the pattern center for each neighboring density unit, and obtain the neighborhood positive sample set.

[0022] S52. Calculate the similarity between the original positive sample and the set of neighboring positive samples, and select the K neighboring positive samples with the highest similarity as the final cluster center positive samples of fine-grained clustering, denoted as the potential positive samples.

[0023] S53. If the processing of the original positive sample is completed, then obtain all potential positive samples; if the processing of the original positive sample is not completed, then return to S51.

[0024] Optionally, obtaining the neighborhood positive sample set includes:

[0025]

[0026] in, Let x represent the feature vector of the original positive sample, where x is the neighborhood positive sample. Let N be the set of positive samples in the neighborhood. j ∈D(N i ) represents the j-th adjacent density cell, N i Let D be the i-th density cell, and D be the neighborhood. It is the positive sample of the j-th adjacent density cell.

[0027] Optionally, the landslide prediction model performs multi-scale feature decomposition to obtain several frequency scales, and extracts and fuses features from these frequency scales using an attention mechanism, including:

[0028] The rainfall data to be predicted is decomposed into multiple scale features by three-level discrete wavelet transform to obtain rainfall information at different scales, wherein the rainfall information at different scales includes short-term abrupt change information, medium-term abrupt change information, and long-term trend information.

[0029] Feature extraction of rainfall information at different scales is performed by an extended attention mechanism, and the extracted features are fused by a sampling channel attention mechanism to complete the final feature extraction.

[0030] Optionally, performing multi-scale feature decomposition on the rainfall data to be predicted using a three-level discrete wavelet transform includes:

[0031] The predicted rainfall data is decomposed using the Coiflet 1 wavelet basis function to obtain the first low-frequency decomposition signal and the short-time mutation information.

[0032] The first low-frequency decomposed signal is decomposed using the Biorthogonal 3.9 wavelet basis function to obtain the second low-frequency decomposed signal and the mid-time abrupt change information;

[0033] The second low-frequency decomposition signal is decomposed using the Daubechies 8 wavelet basis function to obtain the long-term trend information.

[0034] Optionally, feature extraction of the rainfall information at different scales using an expanded attention mechanism includes:

[0035] The rainfall information at different scales is location-encoded, and the location-encoded information is linearly mapped to obtain new rainfall information;

[0036] The new rainfall information is extended to several expansion layers through a learnable projection matrix, and the query, key, and value of each expansion layer are obtained.

[0037] Based on the query, key, and value of each expansion layer, a weighted output is calculated. By concatenating the outputs of each expansion layer, the outputs of the expansion attention mechanism at different scales are obtained.

[0038] Optionally, the extracted features can be fused using a sampling channel attention mechanism, including: unifying the dimensions of features extracted at different scales through downsampling, and fusing the dimension-unified features through global average pooling.

[0039] The beneficial effects of this invention are as follows: By employing a density mapping clustering algorithm to increase the number of positive samples and combining multi-scale wavelet transform to extract features from rainfall data, this invention constructs an efficient landslide prediction model. Experimental results show that this method significantly outperforms traditional models in landslide prediction accuracy and can effectively improve prediction performance.

[0040] In terms of data augmentation, a density mapping clustering algorithm combining coarse-grained and fine-grained clustering not only successfully mined potential positive samples in unlabeled rainfall data but also significantly improved the model's ability to identify landslides. Simultaneously, a feature extraction method based on a multi-scale hierarchical attention mechanism enabled the model to more accurately capture rainfall characteristics at different time scales, further optimizing the prediction results.

[0041] Overall, this method provides a new approach and solution for landslide disaster prediction and early warning, especially in situations where rainfall data is limited or detailed geological data is lacking, enabling relatively accurate landslide risk prediction. This research has significant application value for disaster prevention and mitigation, as well as the construction and implementation of regional landslide early warning systems. Attached Figure Description

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

[0043] Figure 1 This is a flowchart of the density mapping clustering algorithm according to an embodiment of the present invention;

[0044] Figure 2 This is a schematic diagram of coarse-grained clustering in an embodiment of the present invention;

[0045] Figure 3 This is a schematic diagram of fine-grained clustering in an embodiment of the present invention;

[0046] Figure 4 This is a visualization analysis diagram of the clustering results in an embodiment of the present invention, wherein (a) is the rainfall curve of the original positive sample, (b) is the rainfall curve of potential positive sample 1, (c) is the rainfall curve of potential positive sample 2, and (d) is the rainfall curve of potential positive sample 3.

[0047] Figure 5 This is a flowchart of the MSHAM-LPM model according to an embodiment of the present invention;

[0048] Figure 6 This is a diagram of filter coefficients from an embodiment of the present invention;

[0049] Figure 7 This is a diagram showing the wavelet decomposition results of an embodiment of the present invention;

[0050] Figure 8 This is a schematic diagram of the expanded attention mechanism according to an embodiment of the present invention;

[0051] Figure 9 This is a schematic diagram of the sampling channel attention mechanism according to an embodiment of the present invention;

[0052] Figure 10 This is a flowchart of a landslide prediction method based on a multi-scale hierarchical attention mechanism according to an embodiment of the present invention. Detailed Implementation

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

[0054] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0055] like Figure 10 As shown, this embodiment provides a landslide prediction method based on a multi-scale hierarchical attention mechanism, including:

[0056] Obtain the predicted rainfall data for the target area;

[0057] The rainfall data to be predicted is input into the landslide prediction model for multi-scale feature decomposition to obtain several frequency scales. The attention mechanism is used to extract and fuse features from the several frequency scales to output the landslide prediction results for the target area. The landslide prediction model is obtained by training a training set, which is landslide-related rainfall data.

[0058] Furthermore, obtaining the training set includes:

[0059] Obtain unlabeled rainfall data;

[0060] Based on the original positive samples of labeled rainfall data, the unlabeled rainfall data is clustered using coarse-grained and fine-grained clustering methods to obtain potential positive samples, which are then used to enhance the original positive samples, thus obtaining the training set.

[0061] Specifically, in terms of data composition, rainfall records from 39 automatic weather monitoring stations were collected. Regarding data labeling, this embodiment initially labeled the meteorological data, forming a large-scale imbalanced dataset containing 82 positive samples (landslide occurrence samples) and 986,799 unlabeled samples. Positive samples were obtained by matching specific landslide events recorded in relevant departments and geological disaster reports with rainfall data for the corresponding time periods. Unlabeled samples consist of rainfall data from periods during which no landslide events were recorded. This dataset can comprehensively reflect the probability of landslides occurring with different rainfall intensities, durations, and frequencies, serving as an important basis for landslide prediction modeling.

[0062] Landslides are sudden natural disasters, typically influenced by multiple factors, with rainfall being a significant trigger. However, due to the rarity and uncertainty of landslide events, landslide-related rainfall data (i.e., positive samples) is extremely scarce. This scarcity of positive samples presents a severe problem of insufficient data when building effective prediction models. A lack of sufficient positive samples makes it difficult for the model to learn landslide-related rainfall patterns, thus impacting prediction performance. To overcome this problem, this embodiment mines potential positive samples from unlabeled rainfall data. Specifically, through clustering methods, rainfall patterns similar to known positive samples are identified from a large amount of unlabeled data and used as potential positive samples to enhance the training dataset, expand the number of positive samples, and provide more effective training data for the landslide prediction model.

[0063] This embodiment proposes an innovative method for mining unlabeled rainfall data. This method is based on the Density Mapping Clustering (DMC) algorithm and combines coarse-grained clustering (CGC) and fine-grained clustering (FGC) methods. Through data clustering and pattern recognition, it can mine potential positive samples from a large amount of unlabeled data.

[0064] First, the CGC algorithm is used to autonomously cluster high-dimensional rainfall data, mapping each sample to density cells in a low-dimensional space to reveal the underlying patterns and structure of the data. The advantage of the CGC algorithm lies in its ability to handle complex nonlinear data and to help identify the inherent patterns in rainfall through low-dimensional visualization analysis, performing preliminary clustering of a large number of unlabeled samples. Next, the results of the FGC algorithm's fine-grained clustering are used to find the most representative potential positive samples.

[0065] By combining CGC and FGC, the landslide prediction model can automatically mine potential rainfall patterns that are helpful for landslide prediction from unlabeled rainfall data and incorporate these newly discovered patterns into the training dataset, thereby expanding the number of positive samples. With the increase in positive samples, the model can learn more deeply the complex relationship between rainfall and landslides, improving its predictive ability for different rainfall patterns.

[0066] Furthermore, coarse-grained and fine-grained clustering methods are combined to cluster unlabeled rainfall data, such as... Figure 1 As shown, it includes:

[0067] S1. Determine the grid size and use rainfall data as the initial weights for density cells;

[0068] S2. Select the current input sample from the original positive sample and unlabeled rainfall data, and obtain the density cell with the smallest Euclidean distance to the current input sample as the best matching cell;

[0069] S3, Update the weights of the best matching unit and the neighborhood density unit;

[0070] S4. Determine whether the preset iteration termination condition is met. If it is met, obtain the coarse-grained clustering result. If it is not met, return to S2.

[0071] S5. Perform fine-grained clustering based on the coarse-grained clustering results to obtain potential positive samples.

[0072] Specifically, coarse-grained clustering (CGC) is an unsupervised learning method, such as... Figure 2 As shown, the aim is to map high-dimensional data onto density cells in a low-dimensional space to discover potential patterns and structures within the data. The CGC algorithm learns autonomously and performs preliminary clustering based on the inherent similarity of different rainfall data, ultimately revealing the data's topological structure in a low-dimensional space. CGC not only reduces data dimensionality but also maintains the relative positional relationships between data points due to neighborhood adjustment rules. Closely spaced density cells exhibit similar rainfall patterns, thus providing effective data support for subsequent fine-grained clustering.

[0073] In the initialization phase of the CGC algorithm, the grid size needs to be determined appropriately to provide a suitable network structure for the subsequent training phase. Here, the number of grid cells G is set according to the empirical formula (1). num The grid size is

[0074]

[0075] Where n is the total number of samples in the dataset. Furthermore, the initial learning rate α0 of the CGC algorithm is set to 0.5. During training, the learning rate α is dynamically adjusted for different training rounds according to equation (2):

[0076]

[0077] Where t is the current training epoch, and T is the total number of training epochs. The learning rate decay mechanism helps the model gradually converge during training, improving its stability and generalization ability.

[0078] Next, G is randomly sampled from the sample set. num The unlabeled rainfall data of each sample is used as the initial weight of the density unit. At the start of training, the CGC algorithm randomly selects one sample from the imbalanced dataset consisting of labeled original positive samples and a large number of unlabeled samples as the current input sample. Then, it calculates the Euclidean distance between the current input sample and all density units, finds the density unit with the smallest Euclidean distance to the input sample, and denotes it as the Best Matching Unit (BMU). The weights of the BMU and its neighboring density units are then updated using the formula (3). As training progresses, the density units in the network continuously adjust their weights, gradually approximating the latent patterns and structures of the dataset.

[0079] w i (t+1)=w i (t)+α(t)·h BMU,i (t)·(x i -w i (t)) (3);

[0080] Through this training process, the CGC algorithm can effectively capture pattern features in the data, thus providing valuable information for subsequent fine-grained clustering algorithms. In the initial stage of the CGC algorithm, after the rainfall data undergoes low-dimensional mapping processing, the implicit patterns and features become clearer, and the potential regularities are gradually revealed.

[0081] Furthermore, fine-grained clustering based on coarse-grained clustering results includes:

[0082] S51. Based on the preset neighborhood, obtain the adjacent density cells that cover the density cell where the original positive sample is located, extract the pattern center for each adjacent density cell, and obtain the neighborhood positive sample set.

[0083] S52. Calculate the similarity between the original positive sample and the set of neighboring positive samples, and select the K neighboring positive samples with the highest similarity as the final cluster center positive samples for fine-grained clustering, denoted as potential positive samples.

[0084] S53. If the processing of the original positive samples is completed, then obtain all potential positive samples; if the processing of the original positive samples is not completed, then return to S51.

[0085] Specifically, in landslide prediction tasks, feature extraction and classification of rainfall patterns are crucial for improving the predictive ability of the model. Rainfall data patterns often exhibit complex time-series characteristics, and direct classification may lead to a decrease in the model's generalization ability. Therefore, a more refined clustering method is needed to uncover subtle differences between data points. Fine-grained clustering methods further refine coarse-grained clustering, allowing similar rainfall patterns to cluster more tightly together, thereby enhancing the model's ability to distinguish potential landslide events.

[0086] Assuming that after initial coarse-grained clustering of rainfall pattern data, each positive sample is mapped to a specific density cell. In the dataset DSet obtained by mixing labeled and unlabeled positive samples, a rainfall positive sample is referred to as the original positive sample X in FGC, and the weight of its density cell is defined as a potential cluster-center positive sample (CCPS), denoted as C. + .

[0087] Specifically, suppose the original positive sample X = {X1, X2, ..., X...} n After coarse-grained clustering, the data is assigned to m density units N1, N2, ..., N m Then for each density unit N i Define its pattern center Let N be the mean vector of all samples within this density cell, where |N| i | indicates that it belongs to density unit N i The number of samples.

[0088]

[0089] like Figure 3 As shown, to expand the representational power of positive samples, a neighborhood D is defined in the two-dimensional mapping space, whose range covers the neighboring density cells of the original positive sample X. For each neighboring density cell N...j ∈D(N i Extract the pattern center and use it as the Neighborhood Positive Sample (NPS), denoted as . That is, for each original positive sample X, its neighborhood positive sample set is defined as follows. This method ensures that data points with similar rainfall patterns can obtain richer information during the clustering process.

[0090]

[0091] For the j-th neighboring density cell, a positive sample is obtained in the neighborhood. Next, the similarity between the original positive sample X and X is calculated. The cosine similarity method is used for similarity calculation. Let x represent the feature vector of the original positive sample, and y... i Indicates positive samples in the neighborhood If the feature vectors are such that the similarity S(x,y) is... i It can be calculated as:

[0092]

[0093] The K NPSs with the highest similarity can be selected as the core samples for fine-grained clustering.

[0094] Finally, based on the calculated similarity ranking, the top K most similar positive neighborhood samples are selected as the final cluster centers for fine-grained clustering, denoted as potential positive samples C. * .

[0095]

[0096] Fine-grained clustering methods optimize coarse-grained clustering, making the category boundaries of the original data clearer and improving the accuracy of classification.

[0097] By effectively applying the density mapping clustering algorithm, this embodiment mines potential positive samples similar to known positive samples from a large amount of unlabeled data. Through visualization analysis of the clustering results, such as... Figure 4 (a)-(d) clearly show the high similarity in patterns between these potential positive samples and the original positive samples, which enhances the diversity and richness of the training dataset for the model.

[0098] Building upon this, further experimental results demonstrate that the enhanced dataset significantly improves the model's recognition accuracy during training. Particularly in rainfall pattern prediction and classification tasks, the model's generalization ability is significantly enhanced, enabling it to better handle different types of rainfall patterns and improving its reliability and applicability in practical applications.

[0099] Furthermore, the landslide prediction model performs multi-scale feature decomposition to obtain several frequency scales, and extracts and fuses features from these frequency scales through an attention mechanism, including:

[0100] The precipitation data to be predicted is decomposed into multiple scale features by three-level discrete wavelet transform to obtain precipitation information at different scales, including short-term abrupt change information, medium-term abrupt change information, and long-term trend information.

[0101] Feature extraction of rainfall information at different scales is performed by using an extended attention mechanism, and the extracted features are fused by a sampling channel attention mechanism to complete the final feature extraction.

[0102] Furthermore, the multi-scale feature decomposition of the rainfall data to be predicted is performed using a three-level discrete wavelet transform, including:

[0103] Wavelet decomposition of the rainfall data to be predicted was performed using the Coiflet 1 wavelet basis function to obtain the first low-frequency decomposition signal and short-time mutation information.

[0104] The first low-frequency decomposition signal was decomposed using the Biorthogonal 3.9 wavelet basis function to obtain the second low-frequency decomposition signal and mid-time abrupt change information.

[0105] The second low-frequency decomposition signal is decomposed using the Daubechies 8 wavelet basis function to obtain long-term trend information.

[0106] Furthermore, feature extraction of rainfall information at different scales is performed through an expanded attention mechanism, including:

[0107] Location encoding is performed on rainfall information at different scales, and the location-encoded information is linearly mapped to obtain new rainfall information;

[0108] New rainfall information is extended to several expansion layers using a learnable projection matrix, and the query, key, and value of each expansion layer are obtained.

[0109] Based on the query, key, and value of each expansion layer, a weighted output is calculated. By concatenating the outputs of each expansion layer, the outputs of the expansion attention mechanism at different scales are obtained.

[0110] Furthermore, the extracted features are fused through the sampling channel attention mechanism, including: unifying the dimensions of features extracted at different scales through downsampling, and fusing the dimensionally unified features through global average pooling.

[0111] Specifically, existing landslide prediction models typically rely on multi-source data, including geological, meteorological, and historical landslide data. However, in areas where geological surveys are difficult or monitoring methods are limited, obtaining this data is often challenging. To address this issue, this embodiment proposes a landslide prediction model based on single-source rainfall data, namely the Multi-Scale Hierarchical Attention Mechanism Landslide Prediction Model (MSHAM-LPM).

[0112] This model relies solely on readily available rainfall data with good spatial and temporal continuity, avoiding dependence on complex geological and meteorological data. Through refined processing and feature extraction of rainfall data, the model can accurately predict the timing and risk of landslides even in the absence of detailed geological surveys. Compared to traditional multi-source data methods, the model based on single-source rainfall data not only simplifies data requirements but also provides an efficient and real-time landslide prediction solution for resource-limited areas.

[0113] First, the rainfall data undergoes multi-scale feature decomposition using a three-level discrete wavelet transform (DWT). This decomposes the rainfall signal into multiple frequency scales, capturing short-term abrupt changes in rainfall information F. s , mid-time mutation information F i Long-term trend information F l Next, feature extraction of rainfall information at different scales is performed using an expanded attention mechanism, followed by feature fusion using a sampling channel attention mechanism to achieve feature optimization. For example... Figure 5 As shown.

[0114] Discrete wavelet transform is the process of decomposing a signal into multiple sub-signals with different frequency ranges. It is performed using a specific set of wavelet basis functions, which are generated by translating and scaling the original wavelet. This embodiment uses three different sets of wavelet basis functions to decompose signals at different scales: the Coiflet1 (db2) wavelet basis function, the Biorthogonal 3.9 (db6) wavelet basis function, and the Daubechies 8 (db8) wavelet basis function. The reasons for wavelet selection are shown in Table 1, and the parameters of the low-pass and high-pass filters are shown in Table 2. The low-frequency decomposition signal formula is shown in (8), the high-frequency decomposition signal formula is shown in (9), and the filter coefficient line graph is shown in... Figure 6 As shown

[0115] A j[k] =∑ n h[n-2k]·α j-1[n] (8);

[0116] D j[k] =∑ n g[n-2k]·α j-1 [n] (9);

[0117] First, the dataset DSet is normalized using Min-Max to scale the rainfall data to the range [0,1], avoiding errors caused by scale sensitivity. Next, a data point is selected from the dataset DSet and decomposed using the Coiflet1 wavelet basis function to obtain the low-frequency information F. LFI1 and short-term mutation information F s ; transfer low-frequency information F LFI1 The low-frequency information F is obtained by decomposition using the Biorthogonal 3.9 wavelet basis function. LFI2 Mutation information F during the middle of the process i The low-frequency information A2 is decomposed using the Daubechies 8 wavelet basis function to obtain the low-frequency information F. LFI3 and long-term trend information F l The analysis results are as follows Figure 7 As shown.

[0118] Table 1

[0119]

[0120]

[0121] Table 2

[0122]

[0123] Traditional attention mechanisms typically focus only on specific parts of the input sequence, failing to capture effective information across the entire range. This approach is limited by its ability to process single-dimensional features within the input sequence, neglecting potential interactions between different features and global contextual information. This embodiment proposes an extended attention mechanism, such as... Figure 8 As shown, the core idea is to capture multi-dimensional features of input data at different scales through a layer-by-layer expansion approach. Unlike traditional multi-head attention mechanisms, this method does not rely on multiple independent attention heads, but instead processes feature subspaces at different scales simultaneously through multiple "expansion layers." Each expansion layer is responsible for learning feature representations at different levels, capturing both local and global information in the data. Finally, by concatenating the outputs of each expansion layer, a more comprehensive and representative feature representation is obtained.

[0124] The feature extraction process is as follows, using short-term mutation information F s For example, first set F sPerform position encoding and represent it as F s PE Its shape is (N,1). Then, the short-term mutation information F after position encoding is used. s PE By using a linear mapping to increase the hidden dimension, a new representation F is obtained. s ′, with dimensions (N,D). The linear mapping formula is as follows, where F s PE It is the input data, F s ′ represents the data after adding dimensions. W e It is a 1×D mapping matrix.

[0125] F s ′=F s PE ·W e +b e (10);

[0126] Then data F s 'Through the learnable projection matrix W h Extending to h expansion layers, each learning an independent attention distribution, we obtain an expanded feature space. Let Q represent the query, key, and value of each expansion layer. (h) ,K (h) V (h) The formulas for calculating the query, key, and value at level h are as follows:

[0127]

[0128] in, It is the projection matrix of the query, key, and value of the h-th expansion layer, with shape (d,d). Q ), (d,d K ),(d,d V ), representing the dimensions of the query, key, and value, respectively.

[0129] Each expansion layer calculates attention weights based on the similarity between the query and the key. Suppose we scale the dot product of the query and key at layer h and apply Softmax to obtain the attention weights between the i-th query and the j-th key:

[0130]

[0131] Using attention weights Pair value V (h) Perform a weighted summation to obtain the weighted output Y for each query. i (h) :

[0132]

[0133] Finally, by concatenating the outputs of each expansion layer, the final feature representation DA(F) is obtained. s )

[0134] DA(F s =Concat(Y) (1) ,Y (2) ,···,Y (H) (17);

[0135] Channel attention mechanism (CAM) is a method that adaptively adjusts the model's attention to different channels. It improves the model's focus on important channels and enhances the effectiveness of feature representation by calculating attention weights for each channel. Traditional channel attention mechanisms generate descriptors for each channel through global pooling and then use a neural network to calculate the channel attention weights. To further enhance the model's attention to important features, this embodiment proposes a sampling-based channel attention mechanism, such as... Figure 9 As shown, this mechanism adds a downsampling step to the traditional channel attention mechanism, thereby unifying the features of different dilated layers to the same dimension, resulting in more representative channel weights. The data comes from the outputs of dilated attention mechanisms at different scales, i.e., DA(F... s ), DA(F i ), DA(F l Downsampling unifies the data dimensions of the three data sources to DA(F). l On the dimension of ).

[0136] Next, descriptors at different scales are generated through Global Average Pooling. Global Average Pooling summarizes the data at each scale along the time dimension (i.e., rainfall data at each moment), generating a scalar for each channel. The formula is shown in (18), where Z... c It is the descriptor of the c-th scale, X c,h This represents the value of the c-th scale at the h-th time step, where H is the number of time steps.

[0137]

[0138] Then, channel attention weights are calculated. After the channel descriptors are generated, the attention weight α for each scale is calculated through a small fully connected layer. c As shown in Formula 19, W1 and W2 are the weight matrices of the fully connected layer, b1 and b2 are the bias terms, and σ is the activation function.

[0139] α c=σ(W2·ReLU(W1z) c +b1)+b2) (19);

[0140] In this embodiment, the training set, validation set, and test set are divided in a ratio of 7:2:1. The batch size of the data loader is 16, the maximum number of training epochs is 200, the initial learning rate is set to 0.001, the dropout is set to 0.4, and the Adam optimizer is used to update the network parameters.

[0141] In the model evaluation process, this embodiment uses the ROC index to evaluate the model's performance in landslide prediction. ROC analysis is widely used in landslide susceptibility studies and is also suitable for validating the effectiveness of rainfall thresholds. In this analysis, this embodiment uses a confusion matrix to evaluate the accuracy of the model's predictions. Specifically, the confusion matrix evaluates the model's performance by calculating TruePositive (TP), True Negative (TN), False Positive (FP), and False Negative (FN), and further proposes three ROC-related indices to evaluate the predictive effectiveness of rainfall thresholds, including:

[0142] 1. Accuracy: Accuracy is the proportion of all correctly predicted samples out of the total sample. The formula is:

[0143]

[0144] 2. F1 score: The F1 score is the harmonic mean of precision and recall, which takes into account both the model's precision and recall.

[0145]

[0146] 3. AUC (Area Under the ROC Curve): AUC (Area Under the ROC Curve) represents the area under the ROC curve, measuring the model's performance across all possible classification thresholds. The closer the AUC value is to 1, the stronger the model's discriminative ability. The horizontal axis of the ROC (Receiver Operating Characteristic) curve is FPr, and the vertical axis is TPr. As the classification threshold changes, the ROC curve shows the model's performance at different thresholds. In this example, the classification threshold is set to 0.5.

[0147]

[0148] The proposed multi-scale hierarchical attention mechanism model (MSHAM-LPM) outperforms traditional machine learning methods (such as BP and LSTM) in terms of landslide prediction accuracy, F1 score, and AUC value. Experimental results are shown in Table 3, which validate the effectiveness and reliability of the proposed model in landslide prediction.

[0149] Table 3

[0150]

[0151] The embodiments described above are merely preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Various modifications and improvements made to the technical solutions of the present invention by those skilled in the art without departing from the spirit of the present invention should fall within the protection scope defined by the claims of the present invention.

Claims

1. A landslide prediction method based on a multi-scale hierarchical attention mechanism, characterized in that, include: Obtain the predicted rainfall data for the target area; The rainfall data to be predicted is input into the landslide prediction model for multi-scale feature decomposition to obtain several frequency scales. The attention mechanism is used to extract and fuse features from the several frequency scales to output the landslide prediction result for the target area. The landslide prediction model is obtained by training a training set, which is landslide-related rainfall data. Obtaining the training set includes: Obtain unlabeled rainfall data; Based on the original positive samples of labeled rainfall data, the unlabeled rainfall data is clustered using coarse-grained and fine-grained clustering methods to obtain potential positive samples, which are then used to enhance the original positive samples, thus obtaining the training set. Clustering the unlabeled rainfall data using a combination of coarse-grained and fine-grained clustering methods includes: S1. Determine the grid size and use rainfall data as the initial weights for density cells; S2. Select the current input sample from the original positive sample and the unlabeled rainfall data, and obtain the density unit with the smallest Euclidean distance to the current input sample as the best matching unit; S3. Update the weights of the best matching unit and the neighborhood density unit; S4. Determine whether the preset iteration termination condition is met. If it is met, obtain the coarse-grained clustering result. If it is not met, return to S2. S5. Perform fine-grained clustering based on the coarse-grained clustering results to obtain the potential positive samples; The landslide prediction model performs multi-scale feature decomposition to obtain several frequency scales. An attention mechanism is then used to extract and fuse features from these frequency scales, including: The rainfall data to be predicted is decomposed into multiple scale features by three-level discrete wavelet transform to obtain rainfall information at different scales, wherein the rainfall information at different scales includes short-term abrupt change information, medium-term abrupt change information, and long-term trend information. Feature extraction of rainfall information at different scales is performed by an extended attention mechanism, and the extracted features are fused by a sampling channel attention mechanism to complete the final feature extraction.

2. The landslide prediction method based on a multi-scale hierarchical attention mechanism according to claim 1, characterized in that, Based on the coarse-grained clustering results, fine-grained clustering is performed, including: S51. Based on a preset neighborhood, obtain the neighboring density units that cover the density unit where the original positive sample is located, extract the pattern center for each neighboring density unit, and obtain the neighborhood positive sample set. S52. Calculate the similarity between the original positive sample and the set of neighboring positive samples, and select the K neighboring positive samples with the highest similarity as the final cluster center positive samples of fine-grained clustering, denoted as the potential positive samples. S53. If the processing of the original positive sample is completed, then obtain all potential positive samples; if the processing of the original positive sample is not completed, then return to S51.

3. The landslide prediction method based on a multi-scale hierarchical attention mechanism according to claim 2, characterized in that, Obtain the set of positive samples in the neighborhood, including: in, For positive samples in the neighborhood, This represents the feature vector of the original positive sample. For the set of positive samples in the neighborhood, For the first j Adjacent density cells, For the first i Density unit, D For the neighborhood, It is the positive sample of the j-th adjacent density cell.

4. The landslide prediction method based on a multi-scale hierarchical attention mechanism according to claim 1, characterized in that, The rainfall data to be predicted is decomposed into multi-scale features using a three-level discrete wavelet transform, including: The predicted rainfall data is decomposed using the Coiflet 1 wavelet basis function to obtain the first low-frequency decomposition signal and the short-time mutation information. The first low-frequency decomposed signal is decomposed using the Biorthogonal 3.9 wavelet basis function to obtain the second low-frequency decomposed signal and the mid-time abrupt change information; The second low-frequency decomposition signal is decomposed using the Daubechies 8 wavelet basis function to obtain the long-term trend information.

5. The landslide prediction method based on a multi-scale hierarchical attention mechanism according to claim 1, characterized in that, Feature extraction of rainfall information at different scales is performed using an extended attention mechanism, including: The rainfall information at different scales is location-encoded, and the location-encoded information is linearly mapped to obtain new rainfall information; The new rainfall information is extended to several expansion layers through a learnable projection matrix, and the query, key, and value of each expansion layer are obtained. Based on the query, key, and value of each expansion layer, a weighted output is calculated. By concatenating the outputs of each expansion layer, the outputs of the expansion attention mechanism at different scales are obtained.

6. The landslide prediction method based on a multi-scale hierarchical attention mechanism according to claim 1, characterized in that, The extracted features are fused through a sampling channel attention mechanism, including: unifying the dimensions of features extracted at different scales through downsampling, and fusing the dimensionally unified features through global average pooling.