A slope deformation space-time prediction method based on LSTM-GCN-attention
By combining LSTM and GCN slope deformation prediction methods and introducing an attention mechanism, the problem of insufficient spatiotemporal data processing in traditional methods is solved, achieving high-precision and robust slope deformation prediction, which is suitable for slope stability analysis and disaster early warning.
Patent Information
- Application Number
- CN202411899884.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2044-12-23
AI Technical Summary
Traditional slope prediction methods struggle to effectively handle complex nonlinear dynamic processes and neglect the interaction between spatial information and multidimensional data, resulting in limited prediction accuracy.
By combining Long Short-Term Memory Neural Network (LSTM) and Graph Convolutional Neural Network (GCN), and introducing an Attention mechanism, a spatiotemporal data matrix is constructed. LSTM captures temporal dependencies, GCN models spatial topological relationships, and the Attention mechanism is used to dynamically adjust feature weights.
It improves the accuracy and robustness of slope deformation prediction, can handle complex nonlinear dynamic processes, and has high accuracy and strong generalization ability, making it suitable for slope stability analysis and disaster early warning.
Smart Images

Figure CN119885350B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of slope prediction, and specifically relates to a spatiotemporal prediction method for slope deformation based on LSTM-GCN-Attention. Background Art
[0002] With the rapid development of engineering construction and transportation infrastructure, slope stability has become a research hotspot in geotechnical engineering. Slope deformation prediction is a key component of disaster prevention and mitigation, and is of great significance for ensuring engineering safety and reducing disaster risks. Traditional slope prediction methods primarily rely on empirical formulas and mathematical statistical models, such as time-series-based regression analysis, differential equations, or geomechanical models. While these methods can, to a certain extent, reflect the basic laws of slope deformation, they struggle to effectively handle complex nonlinear dynamic processes. Furthermore, these methods often overlook the interaction between spatial information and multidimensional data, resulting in limited prediction accuracy.
[0003] In recent years, with the development of machine learning and deep learning technologies, an increasing number of intelligent algorithms have been applied to slope deformation prediction. For example, machine learning models such as support vector machines (SVM) and random forests (RF) can capture the nonlinear characteristics of data to a certain extent, but their ability to mine time series information is insufficient. Deep learning models such as recurrent neural networks (RNNs) and long short-term memory networks (LSTMs) have significant advantages in processing time series data, but their ability to model the complex spatial relationships in slope deformation is limited. Meanwhile, graph convolutional networks (GCNs) have attracted considerable attention for their outstanding performance in processing spatial graph-structured data. However, existing GCN models generally ignore temporal dynamics, inter-node information correlations, and slope characteristics. Furthermore, some existing methods often employ simple weighting or overlay approaches when processing spatiotemporal data, making it difficult to fully exploit the complex correlations in spatiotemporal data. Consequently, the stability and accuracy of prediction results still require significant improvement. Summary of the Invention
[0004] The present invention proposes a spatiotemporal prediction method for slope deformation based on LSTM-GCN-Attention. By combining the advantages of long short-term memory neural network (LSTM) and graph convolutional neural network (GCN), and introducing the Attention mechanism, the accuracy and reliability of slope deformation prediction are comprehensively improved. Specifically, this method uses the LSTM model to deeply explore the time-dependent characteristics of slope deformation data, and combines the spatial topological relationship between slope monitoring points with GCN modeling to solve the spatiotemporal complexity that traditional methods cannot handle. The Attention mechanism further enhances the model's ability to focus on important spatiotemporal features, dynamically adjusts the node and feature weights, and makes the prediction results more interpretable and robust. Through this multi-level spatiotemporal feature extraction and fusion, the method can handle complex nonlinear dynamic processes, has high precision, strong generalization ability and good engineering applicability, and provides an efficient and reliable solution for slope deformation prediction.
[0005] To this end, the present invention adopts the following technical solutions:
[0006] A spatiotemporal prediction method for slope deformation based on LSTM-GCN-Attention includes the following steps:
[0007] Step 1) Select the target slope working point, design the total station triangulation observation network layout plan, and continuously monitor the horizontal displacement and vertical settlement of the slope according to the design plan, and collect and organize the observation data;
[0008] Step 2) Adopting the bidirectional average interpolation method of the adaptive sliding window to interpolate the observed data to generate a smooth and continuous data signal;
[0009] Step 3) Data normalization: normalize the interpolated data in step 2) using the range transformation method;
[0010] Step 4) Constructing a spatiotemporal data matrix: Using the Python open source numerical computing library Numpy, construct a spatiotemporal sequence data matrix D[T, V, F] with three dimensions: time, space, and node features, where T is the time dimension, V is the space dimension, and F is the feature dimension;
[0011] Step 5) Construct the spatial adjacency matrix: Use the ratio of the height difference between two points to the inclination distance as the spatial association weight coefficient to construct the spatial adjacency matrix A adj [V,V]:
[0012]
[0013] Among them, w ij represents the spatial association weight coefficient, H i , N i Respectively represent the height and inclination coordinates of node i, Hj , H j represent the height and inclination coordinates of node j respectively;
[0014] Step 6) Divide the training set and test set: Divide the sample data into training set and test set in proportion, and adjust the proportion through multiple pre-training;
[0015] Step 7) LSTM network modeling: Use the long short-term memory network (LSTM) to model the temporal dynamic characteristics of slope deformation;
[0016] Step 8) GCN network modeling: Use graph convolutional network (GCN) to capture the spatial dependencies between monitoring points;
[0017] Step 9) Attention Mechanism Optimization and Model Fusion: Introduce the attention mechanism to dynamically adjust the weights of spatial nodes and time series features to improve the ability to focus on important features. Fusion the LSTM temporal features and the GCN spatial features, weighted by the Attention mechanism, to generate the final spatiotemporal feature representation. Then, use the fully connected layer to output the deformation prediction value:
[0018]
[0019] Among them, FC is the fully connected layer, To predict the results;
[0020] Step 10) Model training and evaluation: Build a deep learning framework based on Python, establish a GPU-accelerated deep learning environment suitable for this model, and conduct model training. The loss function is the mean square error (MSE), and the adaptive optimizer Adam is used to accelerate convergence. The model is evaluated using the test set, and the evaluation indicators include mean square error (MAE), mean square error (MSE), and coefficient of determination (R). 2 ;
[0021]
[0022] Among them, the predicted value is: True value: y={y1,y1,...,y n}.
[0023] Furthermore, in step 2), the initial sliding window size is selected according to the data characteristics; for each data point, the window size is adjusted according to the signal gradient or noise level; then the average value within the sliding window is calculated in the forward and reverse directions and the results are fused, which is expressed as follows:
[0024]
[0025] in and Indicates the results of forward and reverse sliding respectively.
[0026] Furthermore, in step 3), the normalization formula is:
[0027]
[0028] Where x is the original data, x′ is the normalized data, min(x) and max(x) refer to the minimum and maximum values of the original data x, respectively;
[0029] Furthermore, in step 7), LSTM captures long-term dependencies through memory units and gating mechanisms, and the formula is as follows:
[0030] Input gate: i t =σ(W i x t +U i h t-1 +b i )
[0031] Forget gate: f t =σ(W f x t +U f h t-1 +b f )
[0032] Output gate: o t =σ(W o x t +U o h t-1 +b o )
[0033] Status update: c t =f t ⊙c t-1 +i t ⊙tanh(W c x t +U c xh t-1 +b c )
[0034] h t =o t ⊙tanh(c t )
[0035] Among them, x t Input for the current moment, h t is the hidden state at the current moment, c t is the memory unit state, W, U, b are model parameters, and σ is the activation function;
[0036] bi , b f , b o , b c The bias parameters b corresponding to the input gate, forget gate, output gate and state update respectively;
[0037] U i , U f , U o , U c Corresponding to the input gate, forget gate, output gate and state update respectively with the current input x t The associated weight matrix U;
[0038] W i , W f , W o , W c They correspond to the input gate, forget gate, output gate and the state update and the hidden state h at the previous moment. t-1 The associated weight matrix W.
[0039] Furthermore, in step 8), GCN performs convolution operation on the adjacency matrix and node features of the graph, and the formula is as follows:
[0040] H (l+1) =σ(D -1 / 2 AD -1 / 2 H (l) W (l) )
[0041] Among them, H (l) is the node feature of the lth layer, A is the adjacency matrix, D is the node degree matrix, W (l) is the trainable weight matrix and σ is the activation function.
[0042] The improvements of the present invention are:
[0043] 1. Make full use of the advantages of long short-term memory neural network (LSTM) and graph convolutional neural network (GCN) in capturing time series and spatial structure features.
[0044] 2. Introducing the attention mechanism to enhance the model's ability to focus on important spatiotemporal features, dynamically adjusting node and feature weights, and making the prediction results more interpretable and robust.
[0045] 3. Taking full account of the slope's continuum, the deformation of different spatial nodes evolves collaboratively rather than independently. This method constructs a more scientific spatial adjacency matrix by introducing an association weight coefficient based on height difference and slope. This uses the ratio of the height difference between two points to the inclination distance as the spatial association weight, accurately characterizing the degree of spatial association among monitoring points on the slope.
[0046] The beneficial effects of the present invention are:
[0047] This method leverages the strengths of time series modeling, spatial feature capture, and dynamic weight optimization, offering the following significant advantages: It captures the nonlinear temporal dynamics of slope deformation through an LSTM network, effectively addressing the inadequacy of traditional empirical formulas and statistical methods in modeling complex temporal dependencies. It also utilizes GCN to model the spatial topological relationships of monitoring points, fully accounting for the slope's continuum nature, where deformations at different spatial nodes evolve collaboratively rather than independently. By introducing correlation weights based on height difference and slope gradient, the method constructs a more scientific spatial adjacency matrix. Specifically, the ratio of the height difference between two points to the dip distance is used as the spatial correlation weight, accurately characterizing the degree of spatial correlation among monitoring points on the slope. Furthermore, the introduction of an attention mechanism dynamically assigns weights to spatiotemporal features, further enhancing the model's focus on key features and improving its predictive accuracy and robustness. This holistic approach achieves deep integration of spatiotemporal features, precise capture of nonlinear dynamic patterns, and robust adaptability to complex geological environments, providing reliable and advanced technical support for slope stability analysis and disaster warning. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 It is a flowchart of the algorithm of the spatiotemporal prediction method of the present invention;
[0049] Figure 2 This is a curve diagram before interpolation in step 2 of the embodiment of the present invention;
[0050] Figure 3 is a graph after interpolation in step 2 of the embodiment of the present invention;
[0051] Figure 4 This is the spatial adjacency relationship distribution diagram of the measuring points in step 5 of the embodiment of the present invention;
[0052] Figure 5 This is the spatial adjacency weight matrix distribution diagram of step 5 of the embodiment of the present invention;
[0053] Figure 6 This is a graph showing the horizontal displacement of the spatial node JC21-0 in step 7 of an embodiment of the present invention;
[0054] Figure 7 This is a vertical displacement curve diagram of spatial node JC21-0 in step 7 of an embodiment of the present invention;
[0055] Figure 8 This is a graph showing the predicted horizontal displacement of measuring point JC21-0 in step 10 of an embodiment of the present invention;
[0056] Figure 9 This is a vertical displacement prediction curve diagram of measuring point JC21-0 in step 10 of an embodiment of the present invention;
[0057] Figure 10 This is a graph showing the predicted horizontal displacement of measuring point JC22-1 in step 10 of an embodiment of the present invention;
[0058] Figure 11 This is a vertical displacement prediction curve diagram of measuring point JC22-1 in step 10 of an embodiment of the present invention;
[0059] Figure 12 This is a graph showing the predicted horizontal displacement of measuring point JC22-7 in step 10 of an embodiment of the present invention;
[0060] Figure 13 This is a graph showing the vertical displacement prediction of measuring point JC22-7 in step 10 of an embodiment of the present invention;
[0061] Figure 14 This is a graph showing the predicted horizontal displacement of measuring point JC23-3 in step 10 of an embodiment of the present invention;
[0062] Figure 15 This is a vertical displacement prediction curve diagram of measuring point JC23-3 in step 10 of an embodiment of the present invention. DETAILED DESCRIPTION
[0063] The present invention will be further described below with reference to the accompanying drawings and specific embodiments:
[0064] (1) In this case, the deformation characteristics of the 9# slope of Panzhihua Airport were monitored by using a total station and a triangular observation network. The surface displacement observation was achieved by using a geodetic system and a triangular observation network. The surface displacement of the landslide was observed using a total station {Swiss Leica TS11 total station; accuracy: 1″ (1mm+1.5ppm*D)}. The accuracy of the observation and the layout of the observation network were not lower than the national third-class technical standards required by the measurement specifications. The coordinates of the monitoring points are shown in Table 1. The monitoring points at the rear edge of the slope Monitoring points: JC23-0, JC23-1, JC22-0, JC22-1, JC21-0, JC21-1. Monitoring points at the rear: JC23-2, JC22-2, JC21-2, JC22-3. Monitoring points in the middle: JC21-4, JC23-4. Monitoring points at the front of the slope: JC23-3, JC21-3, JC22-4, JC22-5, JC21-5, JC23-5, JC22-6, JC22-7.
[0065] Table 1 Statistics of surface displacement and settlement observation points in slope deformation area
[0066]
[0067]
[0068] (3) Perform initial data processing, mainly including sliding average method data interpolation and data normalization. The interpolation process is implemented by writing a bidirectional average interpolation program of an adaptive sliding window in Python, and the data normalization is implemented by writing a range transformation algorithm in Python. Taking the JC21-0 measuring point as an example, the time history curve of the measuring point after interpolation is as follows Figure 2 and 3 shown.
[0069] (4) Use the Numpy module in Python to construct the spatiotemporal matrix D[T, V, F] of the slope deformation, where the time dimension T = 372d, the spatial dimension V = 20, and the feature dimension F = 2, which are the horizontal displacement and vertical displacement, respectively. According to step 5, the spatial node adjacency matrix is constructed, as shown in Figure 4 and 5 shown.
[0070] (5) Build a deep learning framework based on Pytoch=2.4.1 and Cuda=11.8, and establish a GPU-accelerated deep learning environment suitable for this model. The constructed spatiotemporal data matrix is divided into training set and test set in a ratio of 7:3. The training set data and spatial adjacency matrix are input into LSTM-GCN-Attention for model training, and the test set data is used to evaluate the model performance.
[0071] (6) Extract the prediction results of each spatial node. Taking spatial node JC21-0 as an example, the prediction results of LSTM-GCN-Attention and the traditional time series model LSTM are compared as follows: Figure 6 and 7 As shown in Table 2, it can be seen that the LSTM-GCN-Attention model significantly outperforms the LSTM model in terms of the actual values.
[0072] Table 2 Model evaluation indicators
[0073] Model LSTM LSTM-GCN-Attention MAE 0.403 0.494 MSE 0.555 0.523 <![CDATA[R 2 ]]> 0.923 0.962
[0074] (7) Use the trained optimal model to predict the horizontal displacement and vertical settlement of different spatial nodes. Taking the measuring points JC21-0, JC22-1, JC22-7, and JC23-3 as examples, the results are as follows: Figure 8-15 It can be seen that the improved spatiotemporal slope prediction method of the present invention can accurately predict the horizontal displacement and vertical displacement development trend of the slope at different spatial positions.
Claims
1. A spatiotemporal prediction method for slope deformation based on LSTM-GCN-Attention, characterized by: The following steps are involved: Step 1) Select the target slope working point, design the total station triangulation observation network layout plan, and continuously monitor the horizontal displacement and vertical settlement of the slope according to the design plan, and collect and organize the observation data; Step 2) Adopting the bidirectional average interpolation method of the adaptive sliding window to interpolate the observed data to generate a smooth and continuous data signal; Step 3) Data normalization: normalize the interpolated data in step 2) using the range transformation method; Step 4) Constructing a spatiotemporal data matrix: Using the Python open source numerical computing library Numpy, construct a spatiotemporal sequence data matrix D[T, V, F] with three dimensions: time, space, and node features, where T is the time dimension, V is the space dimension, and F is the feature dimension; Step 5) Construct the spatial adjacency matrix: Use the ratio of the height difference between two points to the inclination distance as the spatial association weight coefficient to construct the spatial adjacency matrix A adj [V,V]: Among them, w ij represents the spatial association weight coefficient, H i , N i Respectively represent the height and inclination coordinates of node i, H j , N j represent the height and inclination coordinates of node j respectively; Step 6) Divide the training set and test set: Divide the sample data into training set and test set in proportion, and adjust the proportion through multiple pre-training; Step 7) LSTM network modeling: Use the long short-term memory network (LSTM) to model the temporal dynamic characteristics of slope deformation; Step 8) GCN network modeling: Use graph convolutional network (GCN) to capture the spatial dependencies between monitoring points; Step 9) Attention Mechanism Optimization and Model Fusion: Introduce the attention mechanism to dynamically adjust the weights of spatial nodes and time series features to improve the ability to focus on important features. Fusion the LSTM temporal features and the GCN spatial features, weighted by the Attention mechanism, to generate the final spatiotemporal feature representation. Then, use the fully connected layer to output the deformation prediction value: Among them, FC is the fully connected layer, To predict the results; Step 10) Model training and evaluation: Build a deep learning framework based on Python, establish a GPU-accelerated deep learning environment suitable for this model, and conduct model training. The loss function is the mean square error (MSE), and the adaptive optimizer Adam is used to accelerate convergence. The model is evaluated using the test set, and the evaluation indicators include mean square error (MAE), mean square error (MSE), and coefficient of determination (R). 2 ; Among them, the predicted value is: True value: y={y1,y1,…,y n }.
2. The spatiotemporal prediction method for slope deformation based on LSTM-GCN-Attention according to claim 1 is characterized in that: In step 2), the initial sliding window size is selected according to the data characteristics; for each data point, the window size is adjusted according to the signal gradient or noise level; then the average value within the sliding window is calculated in the forward and reverse directions and the results are fused, which is expressed as follows: in and Indicates the results of forward and reverse sliding respectively.
3. The spatiotemporal prediction method for slope deformation based on LSTM-GCN-Attention according to claim 1 is characterized in that: In step 3), the normalization formula is: Where x is the original data, x′ is the normalized data, min(x) and max(x) refer to the minimum and maximum values of the original data x, respectively.
4. The spatiotemporal prediction method for slope deformation based on LSTM-GCN-Attention according to claim 1 is characterized in that: In step 7), LSTM captures long-term dependencies through memory units and gating mechanisms, as shown in the following formula: Input gate: i t =σ(W i x t +U i h t-1 +b i ) Forget gate: f t =σ(W f x t +U f h t-1 +b f ) Output gate: o t =σ(W o x t +U o h t-1 +b o ) Status update: c t =f t ⊙c t-1 +i t ⊙tanh(W c x t +U c x h t -1 +b c ) h t =o t ⊙tanh(c t ) Among them, x t Input for the current moment, h t is the hidden state at the current moment, c t is the memory unit state, W, U, b are model parameters, and σ is the activation function; b i , b f , b o , b c The bias parameters b corresponding to the input gate, forget gate, output gate and state update respectively; U i , U f , U o , U c Corresponding to the input gate, forget gate, output gate and state update respectively with the current input x t The associated weight matrix U; W i , W f , W o , W c They correspond to the input gate, forget gate, output gate and the state update and the hidden state h at the previous moment. t-1 The associated weight matrix W.
5. The spatiotemporal prediction method for slope deformation based on LSTM-GCN-Attention according to claim 1 is characterized in that: In step 8), GCN performs convolution operations on the adjacency matrix and node features of the graph, and the formula is as follows: H (l+1) =σ(D -1 / 2 AD -1 / 2 H (l) W (l) ) Among them, H (l) is the node feature of the lth layer, A is the adjacency matrix, D is the node degree matrix, W (l) is the trainable weight matrix and σ is the activation function.
Citation Information
Patent Citations
Road slope displacement prediction method
CN118675073A
Mountain slope automatic monitoring method based on RTK sensor and related equipment
CN119064969A