Bridge structure response data prediction method
By combining a large language model with a multi-head attention mechanism and a dual-scale context-aligned graph neural network, the limitations of traditional bridge health monitoring methods in modeling complex temporal relationships and handling data noise are overcome. This enables high-precision real-time prediction of bridge structural response data, adapting to different bridge and environmental conditions.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- WUHAN UNIV OF TECH
- Filing Date
- 2025-12-24
- Publication Date
- 2026-04-21
AI Technical Summary
Traditional bridge health monitoring methods have significant limitations in modeling complex temporal relationships, real-time performance and generalization ability, and data noise and missing data. They are difficult to adapt to the real-time prediction needs under different environmental loads, and the fusion effect of multi-source data is not good.
A large language model is used in conjunction with a multi-head attention mechanism and a dual-scale context-aligned graph neural network. Bridge structure response data is predicted by using a patch embedder, a dual-channel cross-attention mechanism, and a dual-scale context-aligned graph neural network. Kalman filtering is used for denoising and reversible instance normalization to process the data, and a specialized bridge structure prediction optimization framework is constructed.
It achieves high-precision real-time prediction of bridge structural response data, improves the model's adaptability and generalization ability, can adapt to different bridge and environmental conditions, and improves the accuracy and robustness of prediction.
Smart Images

Figure SMS_1 
Figure SMS_3 
Figure SMS_7
Abstract
Description
Technical Field
[0001] This invention belongs to the field of bridge structural health monitoring technology, specifically relating to a method for predicting bridge structural response data. Background Technology
[0002] As a core component of transportation infrastructure, the structural safety of bridges directly impacts public safety and economic benefits. Traditional bridge health monitoring methods primarily rely on physical models, statistical methods (such as ARIMA), or shallow machine learning models (such as SVM and random forests). However, these methods have significant limitations in the following aspects: Insufficient modeling of complex temporal relationships: Bridge response data (such as stress, displacement, and vibration frequency) exhibits strong nonlinearity, multivariate coupling, and long-term dependence, making it difficult for traditional models to capture their dynamic evolution. Weak real-time performance and generalization ability: Existing methods typically require customized models for specific bridges, making it difficult to adapt to real-time prediction needs under different environmental loads (such as traffic flow, temperature, and wind load). Data noise and missing data issues: Sensor data is often affected by environmental interference or equipment failure; traditional methods have poor robustness to noise and cannot effectively utilize incomplete data.
[0003] In recent years, breakthroughs in large language models (such as Transformer) in the field of natural language processing have demonstrated their powerful capabilities in long sequence modeling and contextual association. Applying them to time series forecasting offers advantages such as strong pattern recognition, cross-domain knowledge transfer, multimodal data fusion, long dependency modeling, and few-shot learning, making them particularly suitable for complex, cross-domain, and long-term forecasting tasks. When dealing with multivariate nonlinear data such as bridge structural response data, they can significantly improve forecast accuracy.
[0004] In the field of bridge structural health monitoring, traditional time-series prediction methods (such as ARIMA and LSTM) face the following technical challenges when analyzing bridge structural response data (such as strain, displacement, and acceleration): Long-term dependency modeling is challenging: Traditional statistical models struggle to capture trends over extended periods, while bridge structural response data typically exhibits long-term evolutionary characteristics (such as cumulative damage and creep effects). Although classic neural networks (such as LSTM and GRU) can model long-term dependencies, they still encounter gradient vanishing and computational bottlenecks when processing ultra-long time-series data.
[0005] Challenges of Multi-Source Data Fusion: Bridge structural health monitoring involves multiple data sources, such as sensor data (vibration, stress), environmental factors (temperature, humidity), and traffic loads. Traditional prediction methods struggle to effectively fuse these heterogeneous data, resulting in inaccurate and incomplete predictions.
[0006] Lack of versatility and generalization ability: Many prediction models are only applicable to specific bridges and monitoring systems. Once the bridge or data layout is changed, the model performance degrades. Contribution of LLMs: By leveraging the transferability of large-scale pre-trained models, personalized bridge modeling (Few-shot / Zero-shot) can be achieved with a small number of samples; it can support improved generalization ability across bridges and scenarios. Summary of the Invention
[0007] This invention addresses the shortcomings of existing technologies by providing a prediction method for achieving high-precision prediction of bridge structural response data, thus providing strong support for bridge safety monitoring and early warning.
[0008] To achieve the above objectives, the present invention provides a method for predicting bridge structural response data as follows: S101: Collect bridge response data in real time, including vibration response data, stress response data and temperature response data; S102: Denoise and normalize all response data; S103: Perform a patch operation on all the response data after denoising and normalization in step S102 to obtain time series Patches; S104: Input the time series Patches obtained in S103 into the Patch Embedder module to perform word segmentation and embedding of the time series Patches to obtain time series vectors; calculate attention weights based on the time series vectors; and filter the word vector library based on the attention weights to obtain the final text prototype. S105: Combine the time series Patches obtained in S103 with the text prototypes obtained in S104 through a dual-channel multi-head cross-attention mechanism, calculate the attention weights, and obtain the reprogramming block vectors based on the attention weights; S106: The prompt word vectors are used as prefixes and reprogrammed block vectors, which are then fed together into a dual-scale context-aligned graph neural network and then into a large language prediction model to obtain the prediction results of the collected bridge response data.
[0009] Furthermore, in step S102, the Kalman filter method is used to remove environmental noise from all response data, and reversible instance normalization is used to normalize each type of response data separately.
[0010] Further, in step S104, the specific process of calculating the attention weights based on the time series vectors is as follows: using the time series vectors as Q and the word vector library pre-trained by the large language prediction model as K and V, the attention weights are calculated: in, These represent the query matrix, key matrix, and value matrix, respectively. d k This is the scaling factor.
[0011] Furthermore, in step S104, the loss function of the large language prediction model includes mean squared error (MSE) and mean absolute error (MAE). The formula for calculating the mean squared error (MSE) is: in, The true value is... Predicted value; H represents the prediction horizon, indicating how many time steps the model predicts into the future; h represents the h-th time step, h ∈ {1, ..., H}; T represents the summation upper bound, T ∈ {1, ..., H}; The mean absolute error (MAE) is calculated as follows: .
[0012] Furthermore, in step S104, the training and optimization of the large language prediction model uses gradient descent to update the parameters of the prediction model, and combines L2 regularization and early stopping strategy to prevent overfitting.
[0013] Furthermore, in step S105, the specific process of obtaining the reprogrammed block vector based on the attention weights is as follows: the attention weights and the value matrix are weighted and summed to obtain the output vector, and the output vector is linearly projected so that the dimension of the output vector is aligned with the backbone network to obtain the reprogrammed block vector.
[0014] Furthermore, in step S106, the dual-scale context alignment graph neural network performs structural alignment and logical alignment: Structure alignment is performed using dual-scale nodes: Fine-grained GNN: Treats each label as a node.
[0015] Coarse-grained GNN: Aggregates consecutive labels with the same modality into a single node; Logical alignment G C Employing learnable linear layers f e and f z Embedding temporal and linguistic markers into an M-dimensional space, formally, is as follows: e 1, e 2,..., e nA collection of fine-grained token embeddings; z 1, z 2,..., z n This is a coarse-grained token embedding set.
[0016] Furthermore, in step S106, the prompt word vector is obtained by passing the prompt words through an Embedder, and the prompt words are constructed based on the professional terminology prompt template developed for bridge structure monitoring.
[0017] The principle of this invention is as follows: Multi-head attention mechanism to obtain text prototypes: The baseline Time-LLM obtains text prototypes by filtering them through a learnable linear mapping layer, and the number of text prototypes is fixed. The number is set to adaptive and the linear layer is changed to a cross-attention layer. Time series Patches are used as Q, and the pre-trained word embedding vectors of LLM are used as K and V. Attention scores are calculated, and text prototypes matching the time series are obtained according to the set attention score threshold.
[0018] Dual-scale context-aligned graph neural network: Different scale nodes in the graph neural network achieve structural alignment, including fine-grained GNN and coarse-grained GNN, allowing LLM to capture the micro-token connections while recognizing the macro-semantics of long-term sequences; directed edges in the graph neural network achieve logical alignment, guiding the local and global logical relationships between time series and text prompts through directed edges, ensuring semantic coherence.
[0019] A prediction optimization framework for bridge structures: Based on an improved Time-LLM model, a dedicated optimization framework for bridge structure prediction was constructed. This framework improves the system's accuracy by specifically adjusting network parameters and optimizing the feature extraction process, making the system more suitable for modeling bridge structure response data.
[0020] Compared with the prior art, the beneficial effects of the present invention are as follows: The present invention is based on an improved large language prediction model, and combines a multi-head attention mechanism and a dual-scale context alignment graph neural network to perform high-precision real-time prediction of bridge structure response data, providing strong support for bridge safety monitoring and early warning. Detailed Implementation
[0021] The present invention will be further described below with reference to specific embodiments.
[0022] Based on bridge structure monitoring, a professional terminology prompt template was developed to construct prompt words, and the prompt words were processed by Embedder to obtain prompt word vectors; Effective construction of prompt words consists of three components: 1. dataset context, which provides basic background information of the input time series for large language models; 2. task instruction, which serves as key guidance for LLMs to complete specific tasks; and 3. input statistics, which add key statistical data such as trends and lag features to enrich the input time series data to facilitate pattern recognition and inference.
[0023] The technical terminology template for bridge structure monitoring mainly includes data description, environmental and load background, key feature extraction, description of historical abnormal events, and prediction requirements.
[0024] S101: Collects bridge response data in real time, including vibration response data, stress response data, and temperature response data. Various detection devices, such as accelerometers, strain gauges, and temperature sensors, are installed in key parts of the bridge (such as main beams, piers, and bearings) to collect real-time data on the bridge's vibration, stress, and temperature response via radio or wired networks.
[0025] S102: Denoise and normalize all response data. The Kalman filter method is used to remove environmental noise from all response data, and Reversible Instance Normalization (RevIN) is used to normalize each type of response data separately, so that the normalized data has zero mean and unit standard deviation, in order to reduce the time series distribution bias. S103: Perform a patch operation on all the response data after denoising and normalization in step S102 to obtain time series Patches; This significantly reduces the length of the input sequence to the model, thereby alleviating the computational burden of self-attention mechanisms such as those in the Transformer architecture, and enhancing the model's ability to capture local temporal patterns (such as periodicity, mutation, fluctuation, etc.). At the same time, the patched representation structure is closer to the token concept in NLP and vision, further enhancing the compatibility and generalization ability of time series in multimodal tasks.
[0026] S104: Input the time series Patches obtained in S103 into the Patch Embedder module to perform word segmentation and embedding of the time series Patches, and obtain the time series vector; Using time series vectors as Q (i.e., query vectors) and a pre-trained word vector library of Large Language Prediction Models (LLMs) as K and V, the final attention weights are calculated: in, These represent the query matrix, key matrix, and value matrix, respectively. d k This is a scaling factor (to prevent the softmax gradient from becoming too steep, leading to unstable training). Based on attention weights, the word vector library is filtered to obtain the final text prototype.
[0027] GPT-2 was selected as the backbone network of the large language prediction model. Since the word vector library of the large language prediction model itself is too large and has low correlation with time series data, a multi-head attention mechanism is used to filter the word vector library to obtain text prototypes that are more compatible with time series patches. The loss function of the large language prediction model includes mean squared error (MSE) and mean absolute error (MAE). The mean squared error (MSE) is used as the primary loss function, and its calculation formula is as follows: in, The true value is... Predicted value; H represents the prediction horizon, indicating how many time steps the model predicts into the future; h represents the h-th time step, h ∈ {1, ..., H}; T represents the summation upper bound, T ∈ {1, ..., H}; To further enhance the robustness of the prediction model, the mean absolute error (MAE) is introduced to address outliers and noise in the data. The calculation method is as follows: The training and optimization of large language prediction models employ gradient descent (such as the Adam optimizer) to update the parameters of the prediction model, and combine L2 regularization and early stopping strategies to prevent overfitting.
[0028] S105: Combine the time series Patches obtained in S103 with the text prototypes obtained in S104 using a dual-channel multi-head cross-attention mechanism, and calculate the attention weights: in, These represent the query matrix, key matrix, and value matrix, respectively. The attention weights are weighted and summed with the value matrix to obtain the output vector. The output vector is then linearly projected so that the dimension of the output vector is aligned with the backbone network (i.e., GPT-2), resulting in Reprogrammed Patch Embeddings.
[0029] S106: The prompt word vectors are used as prefixes and reprogrammed block vectors, which are then fed together into a dual-scale context-aligned graph neural network (DSCA-GNNs) and then into a large language prediction model to obtain the prediction results of the collected bridge response data. Among them, the dual-scale context-aligned graph neural network performs structural alignment (i.e., dual-scale GNN) and logical alignment (i.e., information transmission): Structure alignment is performed using dual-scale nodes: Fine-grained GNN (i.e., G F ): Treat each token as a node.
[0030] Coarse-grained GNN (i.e., G) C ): Aggregates consecutive tags with the same modality (such as all time-series tags) into a single node; Logical alignment G C The temporal and linguistic tags are embedded in an M-dimensional space using learnable linear layers fe and fz, formalized as follows: e 1, e 2,..., e n A collection of fine-grained token embeddings; z 1, z 2,..., z n This is a coarse-grained token embedding set.
[0031] These linear layers pass macroscopic logical information from the GC to the GF, allowing the GF to retain key details and help the LLM understand the task.
[0032] The system preprocesses the real-time collected bridge data and uses a rolling prediction strategy to use the prediction results from the previous time step as subsequent inputs, enabling continuous multi-step extrapolation of future responses. It monitors the deviation between the prediction results and the actual data in real time, and adjusts parameters or retrains the large-scale prediction model if the error exceeds a preset threshold to adapt to the dynamic changes in the bridge structure.
[0033] Since the prediction results may contain noise or fluctuations, the moving average method is used to smooth the curve of the prediction results to reduce noise interference. At the same time, physical constraints (such as finite element model and mechanical equations) are introduced to correct the prediction results to ensure that the results conform to the physical characteristics of the bridge and improve physical consistency.
[0034] Example The experiments were conducted on a high-performance computing platform equipped with an NVIDIA RTX 4090 graphics card and 72GB of RAM, and implemented using the PyTorch 2.3.0 deep learning framework. The experiments selected a real-world bridge health monitoring sensor dataset as the evaluation object, set network training parameters, and verified the effectiveness of the proposed method. Based on data preprocessing, this study employed a sliding window method with a step size of 1 to construct time-series data samples. Specifically, each sliding window contained 144 consecutive time units (each time unit being 10 minutes, totaling 24 hours) of sensor data as model input. To ensure the reliability of the experimental results, the dataset was divided into training, validation, and test sets in a 6:2:2 ratio.
[0035] In terms of experimental parameter settings, the batch size was set to 128, the random dropout rate was 0.3, the number of training epochs was 100, the model dimension was 512, the number of multi-head attention heads was 8, the model optimization algorithm used was the Adam optimizer, the initial learning rate was 1e-4, and an early stopping strategy was used during training. Training was stopped when the MSE loss of the validation set did not decrease for 3 consecutive epochs.
[0036] To verify the effectiveness of the bridge structural response data prediction method based on the Time-LLM large language model proposed in this invention, we compared it with several mainstream time series prediction models, including traditional LSTM and TCN models, as well as recently proposed Informer, Autoformer, and PatchTST models. The experiments used mean squared error (MSE) and mean absolute error (MAE) as evaluation metrics and were tested at different prediction step sizes (72, 144, and 288) to comprehensively evaluate the model's performance.
[0037] Table 1 shows the prediction results of each model on the bridge dataset. It can be seen that the improved Time-LLM model proposed in this invention achieves the best MSE and MAE indices at all prediction step sizes. Specifically, at a prediction step size of 72, the MSE of the proposed method is 0.149, which is 20.7% lower than the second-best performing PatchTST model (MSE of 0.188); at a prediction step size of 144, the MSE of the proposed method is 0.179, which is 17.9% lower than the PatchTST model (MSE of 0.218); and at a prediction step size of 288, the MSE of the proposed method is 0.209, which is 11.9% lower than the Autoformer model (MSE of 0.237).
[0038] Table 1. Prediction results of various models on the bridge dataset. Comparative experiments revealed that this proposed solution significantly improves the prediction accuracy of bridge structural health monitoring and enhances the modeling capability for multivariate time-series data. Traditional time-series prediction methods (such as TCN and LSTM) often struggle to accurately capture nonlinear changes, long-term trends, and the effects of external disturbances when processing bridge response data (such as strain, displacement, and vibration), resulting in insufficient prediction accuracy. This proposed solution, based on an improved Transformer structure and combining the Context-Alignment paradigm and Multi-Head Attention (MHA) mechanism, can efficiently model the long-term and short-term dependencies of bridge response data and accurately predict future structural states. Furthermore, by reprogramming the time-series data, bridge sensor data is converted into text embeddings, making it more naturally adaptable to large language models, thereby enhancing the understanding and learning capabilities for complex dynamic behaviors.
[0039] To further verify the effectiveness of the dual-scale context-aligned graph neural network (DSCA-GNNs) and multi-head attention mechanism (MHA) modules proposed in this invention, an ablation experiment was designed to compare the performance of the baseline Time-LLM, the DSCA-GNNs module alone, the MHA module alone, and the complete scheme using the combination of DSCA-GNNs and MHA at different prediction step sizes. The results are shown in Table 2.
[0040] Table 2 Ablation Experiment Results of the Improved Module Ablation experiments show that the proposed DSCA-GNNs and MHA modules significantly improve model performance. At a prediction step size of 72, the MSE of the +DSCA-GNNs model (0.158) was lower than the baseline Time-LLM (0.160), and the MSE of the +DSCA-GNNs + MHA model (0.149) was further reduced, while the MAE (0.219) was also better than the others. At a step size of 144, the MSE of the +DSCA-GNNs model (0.188) was better than the baseline (0.192), and the MSE of the +DSCA-GNNs + MHA model (0.179) had a more obvious advantage, while the MAE (0.261) performed well. At a step size of 288, the MSE of the +DSCA-GNNs model (0.214) was lower than the baseline (0.230), and the MSE of the +DSCA-GNNs + MHA model (0.209) was the best, while the MAE (0.301) was also improved. Moreover, the combined modules often showed synergistic gains at each step size.
[0041] Furthermore, this invention possesses extremely high adaptability and generalization ability. Traditional time series prediction methods typically require training a separate model for each bridge, while this invention utilizes the rich pre-trained knowledge and powerful transfer learning capabilities of a large-scale language prediction model. This allows the model to adapt to different bridge structures, climatic conditions, and load environments, reducing reliance on large-scale training data and improving generalization ability. Simultaneously, the adaptive feedback mechanism adjusts model weights based on real-time monitoring data, ensuring the stability of prediction results and maintaining high-precision predictions even under complex conditions such as sensor drift and environmental interference.
Claims
1. A method for predicting bridge structural response data, characterized in that: The prediction method is as follows: S101: Collect bridge response data in real time, including vibration response data, stress response data and temperature response data; S102: Denoise and normalize all response data; S103: Perform a patch operation on all the response data after denoising and normalization in step S102 to obtain time series Patches; S104: Input the time series Patches obtained in S103 into the Patch Embedder module to segment and embed the time series Patches to obtain time series vectors; calculate attention weights based on the time series vectors; and filter the word vector library based on the attention weights to obtain the final text prototype. S105: Combine the time series Patches obtained in S103 with the text prototypes obtained in S104 through a dual-channel multi-head cross-attention mechanism, calculate the attention weights, and obtain the reprogramming block vectors based on the attention weights; S106: The prompt word vectors are used as prefixes and reprogrammed block vectors, which are then fed together into a dual-scale context-aligned graph neural network and then into a large language prediction model to obtain the prediction results of the collected bridge response data.
2. The method for predicting bridge structural response data according to claim 1, characterized in that: In step S102, the Kalman filter method is used to remove environmental noise from all response data, and reversible instance normalization is used to normalize each type of response data separately.
3. The method for predicting bridge structural response data according to claim 1, characterized in that: In step S104, the specific process of calculating the attention weights based on the time series vectors is as follows: using the time series vectors as Q and the word vector library pre-trained by the large language prediction model as K and V, the attention weights are calculated: in, These represent the query matrix, key matrix, and value matrix, respectively. d k This is the scaling factor.
4. The method for predicting bridge structural response data according to claim 3, characterized in that: In step S104, the loss function of the large language prediction model includes mean squared error (MSE) and mean absolute error (MAE). The formula for calculating the mean squared error (MSE) is: in, For the true value, Predicted value; H represents the prediction horizon, indicating how many time steps the model predicts into the future; h represents the h-th time step, h ∈ {1, ..., H}; T represents the summation upper bound, T ∈ {1, ..., H}; The mean absolute error (MAE) is calculated as follows: 。 5. The method for predicting bridge structural response data according to claim 4, characterized in that: In step S104, the training and optimization of the large language prediction model uses gradient descent to update the parameters of the prediction model, and combines L2 regularization and early stopping strategy to prevent overfitting.
6. The method for predicting bridge structural response data according to claim 1, characterized in that: In step S105, the specific process of obtaining the reprogrammed block vector based on the attention weights is as follows: the attention weights and the value matrix are weighted and summed to obtain the output vector, and the output vector is linearly projected to align the dimension of the output vector with the backbone network to obtain the reprogrammed block vector.
7. The method for predicting bridge structural response data according to claim 1, characterized in that: In step S106, the dual-scale context alignment graph neural network performs structural and logical alignment: Structure alignment is performed using dual-scale nodes: Fine-grained GNN: Treats each label as a node; Coarse-grained GNN: Aggregates consecutive labels with the same modality into a single node; Logical alignment G C Employing learnable linear layers f e and f z Embedding temporal and linguistic markers into an M-dimensional space, formally, is as follows: e 1, e 2,..., e n A collection of fine-grained token embeddings; z 1, z 2,..., z n This is a coarse-grained token embedding set.
8. The method for predicting bridge structural response data according to claim 1, characterized in that: In step S106, the prompt word vector is obtained by passing the prompt words through an Embedder, and the prompt words are constructed based on the professional terminology prompt template developed for bridge structure monitoring.