VAE-ALSTM-based bridge structure state anomaly detection method and system

By combining variational autoencoders and attention-enhanced long short-term memory networks, the problems of insufficient temporal dependency modeling and detection accuracy in bridge structure anomaly detection are solved, achieving more efficient bridge structure status monitoring and early warning.

CN120850148APending Publication Date: 2025-10-28XIAN TECH UNIV
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202510939110.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-08
Publication Date
2025-10-28

AI Technical Summary

Technical Problem

Existing bridge structure anomaly detection methods have difficulty in effectively modeling temporal dependencies and rely solely on reconstruction errors for anomaly identification, resulting in insufficient detection accuracy.

Method used

The method combines the variational autoencoder (VAE) with the long short-term memory network (ALSTM) enhanced by the attention mechanism. By extracting latent features and capturing the long-term dependencies of time series data, the method combines the weighted fusion mechanism of reconstruction error and prediction error to generate anomaly scores, and uses the interquartile range statistical method to set the adaptive threshold for judgment.

Benefits of technology

The accuracy and adaptability of bridge structure anomaly detection have been improved, and potential structural anomalies can be identified more accurately, meeting real-time monitoring needs and improving the system's maintainability and cross-scenario adaptability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120850148A_ABST
    Figure CN120850148A_ABST
Patent Text Reader

Abstract

The invention provides a VAE-ALSTM-based bridge structure state anomaly detection method and system, and the method comprises the steps: carrying out the standardization and sliding window segmentation of vibration monitoring data, extracting potential features through a variational auto-encoder, and carrying out the time sequence prediction and reconstruction in combination with an attention-enhanced long-short-term memory network, thereby achieving the detection of the abnormal state of a bridge structure. Fusing the prediction error and the reconstruction error to generate an abnormal score; a threshold value is automatically set through quartile distance statistics, and self-adaptive judgment under different bridge types is achieved; when the score crosses the boundary, real-time alarm is triggered; the system correspondingly comprises a data preprocessing and sample construction module, a VAE-ALSTM model construction module, a training stage prediction and reconstruction module, an error calculation and anomaly scoring module, a threshold setting module and an anomaly judgment and alarm module. The method and the system do not need manual threshold parameter adjustment, are high in precision and good in real-time performance, and can be widely applied to the fields of bridge health monitoring, operation and maintenance early warning and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of bridge structural health monitoring technology, specifically a method and system for detecting abnormal bridge structural conditions based on VAE-ALSTM. Background Technology

[0002] Bridges, as key infrastructure in transportation systems, play an irreplaceable role in national transportation. With the continuous expansion in bridge size and the increase in service life, their structures face complex and variable environmental loads and operating conditions, making them prone to structural performance degradation. Traditional manual inspection methods are insufficient to meet the continuous and high-frequency monitoring needs of large bridge structures, easily leading to missed or delayed damage identification, thus creating potential structural safety hazards.

[0003] Currently, bridge anomaly detection methods can be mainly divided into physical model-based methods and data-driven methods. The former typically uses a finite element model to simulate the bridge structure response and compares it with measured data to identify anomalies. Although this type of method has a certain theoretical basis, it often faces problems such as large model simplification errors and difficulty in accurately setting boundary conditions in practical engineering, which limits its widespread application.

[0004] Data-driven approaches leverage machine learning or deep learning models to mine latent patterns from large-scale time-series data acquired by structural health monitoring systems (SHMs) to identify anomalies in bridge conditions. In recent years, variational autoencoders (VAEs) have been widely used in anomaly detection tasks due to their unsupervised feature learning capabilities. VAEs learn the distribution of normal data and reconstruct input samples, using the reconstruction error as a criterion to identify potential anomalies. However, these methods generally suffer from two shortcomings: first, they struggle to model the temporal dependencies of structural response data, especially when dealing with long-term changes or sudden anomalies, leading to decreased accuracy; second, relying solely on reconstruction errors for anomaly detection fails to fully exploit the anomalous information within latent feature prediction errors, resulting in the risk of missed detections.

[0005] Therefore, there is an urgent need for a bridge structural anomaly detection method that combines latent feature extraction and temporal modeling capabilities, which can more effectively capture the temporal evolution features in health monitoring data, thereby improving the accuracy of anomaly detection. Summary of the Invention

[0006] This application provides a method and system for detecting anomalies in bridge structural states based on VAE-ALSTM, in order to solve the problems of difficulty in modeling temporal features and insufficient accuracy in anomaly detection mentioned in the background art.

[0007] To achieve the above objectives, the technical solution of this application is as follows:

[0008] According to the first aspect, this application provides a method for detecting anomalies in bridge structural conditions based on VAE-ALSTM, comprising the following steps:

[0009] Step S1: Standardize the bridge vibration monitoring data, divide it into fixed-length sequence samples using a sliding window, and construct training set, validation set and test set;

[0010] Step S2: Construct an anomaly detection model based on variational autoencoder and attention mechanism enhanced long short-term memory network (VAE-ALSTM). VAE is used to extract latent features from input data, and ALSTM helps to capture long-term dependencies in time series data.

[0011] The step S2 comprises:

[0012] Step S21: Construct an encoder using a multi-layer convolutional structure to map the input time series samples to the latent space and generate the mean and variance of the latent feature distribution;

[0013] Step S22: Generate latent feature sequences by sampling based on reparameterization techniques;

[0014] Step S23: Construct an attention-enhanced long short-term memory network (ALSTM), receive the latent feature sequence and perform temporal modeling, and predict the latent representation of the next time step;

[0015] Step S24: Construct a decoder, receive the predicted latent representation and reconstruct it to generate an estimate of the original data sequence;

[0016] Step S3: Input the training samples into the encoder to extract the latent feature sequence, input the sequence into ALSTM to predict the latent representation of the next time step, and then the decoder reconstructs the prediction result into the original data sequence.

[0017] Step S4: Calculate the error between the prediction and the true latent vector, and the error between the reconstruction and the original data, and fuse them to generate an anomaly score;

[0018] Step S5: Use the interquartile range statistical method to set an anomaly detection threshold based on the score distribution of the training set;

[0019] Step S6: Input the vibration data of the test set into the trained model for scoring. When the abnormal score is greater than the threshold, the state is determined to be a structural abnormality and an alarm is triggered.

[0020] Furthermore, the standardization process in step S1 includes: standardizing the vibration data using the z-score method, with the specific formula as follows:

[0021]

[0022] Where x is the raw data from the sensor, μ is the mean of the samples in that channel, and σ is the standard deviation.

[0023] Furthermore, the reparameterization sampling in step S22 adopts a Gaussian distribution, and generates a latent feature vector by sampling the mean and variance of the latent feature distribution.

[0024] Furthermore, the decoder in step S24 is a symmetric deconvolutional neural network, whose number of network layers and convolutional kernel size correspond to the convolutional layers in the encoder, in order to maintain structural alignment and reconstruction consistency between latent features and original data.

[0025] Furthermore, in step S4, the prediction error is the mean squared error between the predicted latent representation and the true latent representation, and the reconstruction error is the mean squared error between the reconstructed data and the original input data. Both are used to fuse and generate anomaly scores, and their calculation formula is as follows:

[0026]

[0027] Among them, z t This represents the true latent representation at time step t. Let x represent the latent representation predicted by the ALSTM network. i The original input data, For the reconstruction result, T is the time step of the potential representation sequence, and N is the length of the original input sequence.

[0028] Furthermore, the anomaly score is a weighted sum of the prediction error and the reconstruction error, and its fusion calculation formula is as follows:

[0029] S=λ1·E pred +λ2·E rec

[0030] λ1 and λ2 are adjustment factors, determined based on validation set performance optimization, used to control the weight ratio of the two types of errors in the final score.

[0031] Furthermore, in step S5, the anomaly detection threshold is an upper limit threshold, calculated based on the first and third quartiles of the anomaly scores in the training set, using the following formula:

[0032] T = Q3 + 1.5(Q3 - Q1)

[0033] Q1 is the first quartile, and Q3 is the third quartile.

[0034] Furthermore, in step S6, whether the bridge structural state is abnormal is determined based on the comparison result of the abnormality score S and the discrimination threshold T. The judgment logic used is as follows:

[0035]

[0036] Where R represents whether the bridge structure is abnormal, S is the abnormality score calculated by the model, and T is the discrimination threshold; when R=0, it means the state is normal, and when R=1, it means the structure is abnormal.

[0037] According to the second aspect, this application provides a bridge structural anomaly detection system based on VAE-ALSTM, the system comprising:

[0038] The data preprocessing and sample construction module is used to standardize bridge vibration monitoring data, and uses a sliding window to divide the data into fixed-length sequence samples to construct training, validation and test sets.

[0039] The VAE-ALSTM model building module is used to build an anomaly detection model based on variational autoencoder and attention mechanism enhanced long short-term memory network (VAE-ALSTM). VAE is used to extract latent features from input data, and ALSTM helps to capture long-term dependencies in time series data.

[0040] The prediction and reconstruction module during the training phase is used to input training samples into the encoder, extract latent feature sequences, input the sequences into the ALSTM, predict the latent representation for the next time step, and then the decoder reconstructs the prediction results into the original data sequence.

[0041] The error calculation and anomaly scoring module is used to calculate the error between the prediction and the true latent vector, as well as the error between the reconstruction and the original data, and to fuse them to generate anomaly scores.

[0042] The threshold setting module is used to set the anomaly detection threshold based on the training set score distribution using the interquartile range statistical method.

[0043] The anomaly detection and alarm module is used to input vibration data from the test set into the trained model for scoring. When the anomaly score is greater than the threshold, the state is determined to be a structural anomaly and an alarm is triggered.

[0044] According to a third aspect, this application provides an electronic device, characterized in that the device includes: a processor and a memory;

[0045] The memory is used to store one or more program instructions;

[0046] The processor is configured to run one or more program instructions to perform the steps of the bridge structure state anomaly detection method based on VAE-ALSTM as described in any one of claims 1 to 8.

[0047] Compared with the prior art, the beneficial effects of this application are as follows:

[0048] This application proposes a bridge structural anomaly detection method based on VAE-ALSTM. It extracts latent features using a variational autoencoder (VAE) and models time-series data using a long short-term memory network (ALSTM), effectively capturing the temporal dependencies in bridge vibration data. Compared to traditional anomaly detection methods, this method can more accurately identify potential structural anomalies. By introducing a weighted fusion mechanism of reconstruction error and prediction error, this method can extract anomaly features more comprehensively from the data, improving the accuracy of anomaly detection, especially in complex bridge structures. The method employs an interquartile range (IQR) statistical method, automatically setting anomaly discrimination threshold based on the score distribution of the validation set after training. This avoids the subjectivity of manually setting thresholds and can dynamically adjust the discrimination criteria according to the actual performance of the bridge structure, improving the model's adaptability and generalization ability across different bridge structures.

[0049] The bridge structural anomaly detection system based on VAE-ALSTM proposed in this application adopts a highly modular end-to-end architecture, forming a closed-loop process of "data preprocessing, latent feature extraction, temporal prediction / reconstruction, error fusion scoring, adaptive threshold, and real-time alarm". Each functional module is decoupled through a unified interface, which facilitates the expansion or replacement of sensor and model components as needed, improving the maintainability and portability of the system. Its core model deeply integrates the latent representation learning of VAE with the long-short-term dependency capture of attention-enhanced LSTM, maintaining high detection accuracy and low latency even on edge devices with limited hardware resources, meeting the real-time requirements of online bridge monitoring. The system adopts dynamic threshold setting based on IQR, which can automatically calibrate the discrimination criteria under different bridge types and working conditions, significantly enhancing cross-scenario adaptability and generalization ability. The system triggers an alarm when the scoring result exceeds the limit, and can be seamlessly integrated with existing bridge health management platforms to realize early warning of anomalies and closed-loop operation and maintenance decision-making, thereby improving the intelligence, accuracy and efficiency of bridge structural safety monitoring.

[0050] Of course, implementing the various technical solutions of this application does not necessarily require achieving all of the advantages described above at the same time. Attached Figure Description

[0051] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other embodiments can be obtained from these drawings without creative effort.

[0052] Figure 1 This is a flowchart illustrating the bridge structural anomaly detection method based on VAE-ALSTM in the embodiments of this application.

[0053] Figure 2 This is a schematic diagram of the overall framework of the bridge structural anomaly detection method based on VAE-ALSTM in the embodiments of this application.

[0054] Figure 3 This is a schematic diagram of the physical structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0055] The present application will now be described in further detail with reference to the accompanying drawings and specific embodiments. Similar elements in different embodiments are referred to by related similar element reference numerals. In the following embodiments, many details are described to facilitate a better understanding of the present application. However, those skilled in the art will readily recognize that some features may be omitted in different situations, or may be replaced by other elements, materials, or methods. In some cases, certain operations related to the present application are not shown or described in the specification. This is to avoid obscuring the core parts of the present application with excessive description. For those skilled in the art, detailed description of these related operations is not necessary; they can fully understand the related operations based on the description in the specification and general technical knowledge in the art.

[0056] Furthermore, the features, operations, or characteristics described in the specification can be combined in any suitable manner to form various embodiments. At the same time, the steps or actions in the method description can be rearranged or adjusted in a manner obvious to those skilled in the art. Therefore, the various orders in the specification and drawings are only for the clear description of a particular embodiment and do not imply a necessary order, unless otherwise stated that a particular order must be followed.

[0057] Please see Figure 1-Figure 2 This embodiment provides a method for detecting anomalies in bridge structural conditions based on VAE-ALSTM, and the specific steps include:

[0058] Step S1: Standardize the bridge vibration monitoring data, divide it into fixed-length sequence samples using a sliding window, and construct training set, validation set and test set;

[0059] Step S2: Construct an anomaly detection model based on variational autoencoder and attention mechanism enhanced long short-term memory network (VAE-ALSTM). VAE is used to extract latent features from input data, and ALSTM helps to capture long-term dependencies in time series data.

[0060] Step S3: Input the training samples into the encoder to extract the latent feature sequence, input the sequence into ALSTM to predict the latent representation of the next time step, and then the decoder reconstructs the prediction result into the original data sequence.

[0061] Step S4: Calculate the error between the prediction and the true latent vector, and the error between the reconstruction and the original data, and fuse them to generate an anomaly score;

[0062] Step S5: Use the interquartile range (IQR) statistical method to set anomaly detection threshold based on the validation set score distribution;

[0063] Step S6: Input the vibration data of the test set into the trained model for scoring. When the abnormal score is greater than the threshold, the state is determined to be a structural abnormality and an alarm is triggered.

[0064] In the embodiments of this application, reference is made to Figure 2 The upper left part is Figure 1 A detailed flowchart of step S1 is provided, which includes:

[0065] Step S11: Standardize the bridge vibration monitoring data using z-score. The specific formula is as follows:

[0066]

[0067] Where x is the raw data from the sensor, μ is the mean of the samples in that channel, and σ is the standard deviation;

[0068] In this embodiment, the data collected by the sensor is affected by environmental noise. Through standardization processing, the data fluctuations caused by environmental changes can be effectively removed, thereby more accurately capturing the vibration characteristics of the bridge structure and enhancing the performance of the subsequent anomaly detection model.

[0069] Step S12: Divide the standardized time series data into fixed-length sequence samples using a sliding window method. Each sequence sample has a length of 48 and a step size of 12. The window starts from the beginning of the time series and slides according to the preset step size until the entire time series is divided into multiple sequence samples.

[0070] This application uses a sliding window method to process standardized data. The length of each sequence sample is L, representing the length of the data segment processed each time, and the step size defines the sliding step of the window. In this way, the original time series data is divided into multiple small windows, which can be used for subsequent model training and validation.

[0071] Step S13: Based on the fixed-length sequence samples obtained from the segmentation, divide the sample data into a training set, a validation set, and a test set;

[0072] In this embodiment, the sample data after being segmented by a sliding window will be divided into a training set, a validation set, and a test set in a ratio of 7:1:2. The training set is used to train the model, the validation set is used to fine-tune the model's hyperparameters and evaluate the model's performance, and the test set is used to finally evaluate the model's generalization ability to ensure its performance on unseen data.

[0073] In the embodiments of this application, reference is made to Figure 2 The upper right part is Figure 1 The model constructed in step S2 is specifically defined as follows:

[0074] Step S21: Construct an encoder using a multi-layer convolutional structure to map the input time series samples to the latent space and generate the mean and variance of the latent feature distribution;

[0075] The encoder constructed in this application adopts a 4-layer one-dimensional convolutional structure, with the number of channels gradually expanded to 512. After each convolutional operation, the Leaky-ReLU activation function is used. Finally, the mean and standard deviation vectors of the latent feature distribution are output through the Flatten layer and the fully connected layer, which prepares for reparameterization. This structural design not only ensures the full extraction of local patterns in the time series, but also has strong feature compression and expression capabilities, laying a solid foundation for the modeling of the latent space.

[0076] Step S22: Generate latent feature sequences by sampling based on reparameterization techniques;

[0077] The embodiments of this application utilize reparameterization techniques to sample the latent feature distribution and generate latent variables z. This technique employs a standard normally distributed random vector ε, through:

[0078] z = μ φ (x)+σ φ (x)⊙ε

[0079] Here, ⊙ represents multiplication by variable. This process ensures that the gradient can be backpropagated through the mean and standard deviation of the encoder, enabling the model to effectively learn the distribution of the latent variables.

[0080] Step S23: Construct an attention-enhanced long short-term memory network (ALSTM), receive the latent feature sequence and perform temporal modeling, and predict the latent representation of the next time step;

[0081] Furthermore, the generated latent feature sequence is input into a stacked LSTM network, which combines the Attention mechanism to learn the importance of features at each time step for the next prediction. The Attention module calculates the attention weights of each hidden state and fuses information from multiple time steps in a weighted manner to improve the model's ability to identify long-range dependencies and abnormal patterns.

[0082] Step S24: Construct a decoder, receive the predicted latent representation and reconstruct it to generate an estimate of the original data sequence;

[0083] In this application, the decoder employs a four-layer deconvolution structure, corresponding to the encoder structure, thereby ensuring that the reconstruction of latent variables and the dimensionality of the input data are consistent. The number of channels decreases from 512 to 1 layer by layer, the activation function is Leaky-ReLU, and the final output layer is a linear activation (Linear). This decoder structure gradually restores the length and number of channels of the original time series, achieving sequence reconstruction of the predicted time step.

[0084] After completing the model construction, refer to Figure 2 The upper right section leads to the model training phase, specifically step 3, which includes:

[0085] Step S31: Input the training samples into the encoder. After processing by the convolutional layer, the encoder maps the input time series samples to the latent space.

[0086] In this embodiment, after the training samples are input into the encoder, they undergo a series of one-dimensional convolutional layers. The encoder then maps the input time-series samples to the latent space and outputs the mean vector μ and standard deviation vector σ of the latent feature distribution for subsequent reparameterization sampling. Specifically:

[0087] μ,σ=Encoder(x t )

[0088] To maintain the differentiability of the encoder, a reparameterization technique is used for sampling to generate the latent vector z. t :

[0089]

[0090] Where ⊙ represents multiplication by variable, and ε is a noise variable from a standard normal distribution.

[0091] Step S32: Input the latent feature sequence extracted from the encoder into a Long Short-Term Memory (LSTM) network to model its temporal dependence and predict the latent features at the next time step. The attention mechanism further learns the contribution weight of each time step to the prediction result.

[0092] In this embodiment of the application, the latent feature sequence {z1,z2,…,z} after reparameterized sampling T The hidden states {h1, h2, ..., h} are fed sequentially into a Long Short-Term Memory (LSTM) network composed of multiple stacked layers for modeling. The LSTM units effectively capture long-range dependencies in the sequence through a gating mechanism, outputting the hidden state {h1, h2, ..., h} at each time step. T};

[0093] Furthermore, to enhance the model's ability to model key time steps, an attention mechanism is introduced to adaptively learn the contribution weight of each time step to the prediction target. The specific process is as follows:

[0094] First, each hidden state h t This is mapped to an attention score e via a trainable feedforward neural network. t :

[0095] e t =v T tanh(W h h t +b)

[0096] Where W, v, and b are learnable attention mechanism parameters;

[0097] Then, the attention score is standardized to the weight coefficient α using the Softmax function. t This is used to indicate the relative importance of the current moment to the next prediction:

[0098]

[0099] Ultimately, all historical hidden states h t With the corresponding attention weight α t We obtain the context vector c by weighted summation:

[0100]

[0101] The context vector c represents the overall sequence features fused with attention-weighted information, serving as a potential representation for the next time step. The estimated input is obtained through a nonlinear mapping function f(·). The final prediction result is then obtained:

[0102]

[0103] Where f(·) represents the subsequent fully connected prediction layer, and the output dimension is the same as the latent variable z. t Consistent; this step combines the temporal modeling capability of LSTM with the dynamic weight learning capability of the attention mechanism, which can effectively capture the evolution law of potential features and enhance the modeling capability of abnormal evolution of bridge structure vibration state.

[0104] Step S33: Input the predicted latent representation of ALSTM into the decoder for reconstruction. The decoder transforms the predicted latent representation back into the original data space to generate the reconstructed original data sequence estimate.

[0105] In this embodiment of the application, the potential representation of the next time step obtained by step S32 The input is fed into the decoder; the decoder employs a neural network structure consisting of four deconvolution layers, possessing the ability to upsample layer by layer and restore features, and can map the latent representation back to the space of the original time series data; let... Given the latent representation of the input, and the decoder function denoted as D(·), the estimated value of the reconstructed data is:

[0106]

[0107] in, This represents the estimated value of the original time series data obtained from the reconstruction. This process completes the reconstruction of the potential state of the predicted time step, providing a basis for subsequent error calculation and anomaly score generation.

[0108] After this step is completed, the trained VAE-ALSTM model will be obtained, which will be used for subsequent anomaly detection of bridge vibration data. The model is trained on healthy state data to ensure that it can accurately capture the feature distribution and temporal evolution of the structure under normal conditions.

[0109] After completing model training, refer to Figure 2 The following section leads to the anomaly scoring generation stage, specifically step 4, which includes:

[0110] Step S41: Calculate the prediction error between the predicted latent representation and the true latent representation;

[0111] In this embodiment, the error measures the accuracy of the ALSTM network's prediction of future potential states, and is calculated using the mean squared error, with the specific formula as follows:

[0112]

[0113] Among them, z t This represents the true latent representation at time step t. This represents the latent representation predicted by the ALSTM network, where T is the number of time steps in the latent representation sequence.

[0114] Step S42: Calculate the reconstruction error between the reconstructed data and the original input data;

[0115] In this embodiment, the error metric model's ability to reconstruct latent variables from the original time series data also employs the mean squared error form, specifically as follows:

[0116]

[0117] Among them, x i The original input data, For the reconstruction result, N is the length of the original input sequence;

[0118] Step S43: Calculate the final anomaly score by weighting the prediction error and reconstruction error. The specific formula is as follows:

[0119] S=λ1·E pred +λ2·E rec

[0120] Among them, λ1 and λ2 are adjustment factors that satisfy λ1+λ2=1. They are determined based on the performance optimization of the validation set and are used to control the weight ratio of the two types of errors in the final score.

[0121] After the above steps are completed, each sample data point will be assigned a corresponding anomaly score S. The larger the score, the greater the deviation of the current structural state from the normal pattern learned by the model, and the more likely it is to be an abnormal state; conversely, if the score is low, it means that the model prediction and reconstruction effect is good and the structural state is in a healthy state.

[0122] It is important to note that the calculation of reconstruction error and prediction error plays a crucial role in anomaly detection, serving as core indicators for measuring the deviation between bridge vibration signals and the normal behavior patterns learned by the model. Reconstruction error reflects the degree of difference between the signal reconstructed by the variational autoencoder after learning temporal data under healthy conditions and the original input. A significantly increased reconstruction error indicates that the input data cannot be effectively reconstructed by the current model, potentially indicating structural changes inconsistent with normal patterns and suggesting potential abnormal behavior. Prediction error measures the temporal prediction capability based on the latent space representation, specifically the deviation between the prediction result of the attention-enhanced LSTM model for future latent states and the actual encoding. A large prediction error indicates that the model has failed to correctly capture the current temporal pattern, suggesting that the bridge structure may be in an abnormal fluctuation phase. By jointly modeling these two types of errors, the system can comprehensively evaluate the structural state from multiple dimensions, considering both the deviation of the current input signal in the feature space and the consistency of temporal evolution, thereby improving the accuracy of anomaly identification.

[0123] Further, see Figure 2 The following section leads to step 5, which involves setting the anomaly detection threshold. Specifically, it includes:

[0124] Step S51: Calculate the first quartile (Q1) and third quartile (Q3) of the anomaly score on the validation set;

[0125] In this embodiment, all abnormal scores of the model on the validation set are arranged in ascending order, and the first quartile Q1 and the third quartile Q3 are taken respectively. These two statistics effectively reflect the central tendency and fluctuation range of the score distribution.

[0126] Step S52: Based on the first quartile and the third quartile, set the anomaly detection threshold using the interquartile range (IQR) method;

[0127] To accommodate the asymmetry and outlier presence in the scoring distribution, the interquartile range (IQR) is introduced as a parameter-free criterion for anomaly detection. The interquartile range is defined as:

[0128] IQR = Q3 - Q1

[0129] Based on this statistic, the anomaly detection threshold T is set as follows:

[0130] T = Q³ + 1.5IQR

[0131] Through the above steps, this application adaptively sets the anomaly discrimination threshold based on the score distribution of the validation set, which further improves the reliability of the model in actual bridge structural health monitoring scenarios. The set threshold, as a discrimination standard, will be used to identify potential structural anomalies during the testing phase, providing a basis for subsequent automatic alarm mechanisms.

[0132] Further, see Figure 2 The following section proceeds to anomaly detection and alarm triggering, specifically step S6, which includes:

[0133] Step S61: Input the vibration data of the test set into the trained VAE-ALSTM model for scoring;

[0134] In this embodiment of the application, after the model training is completed, the bridge vibration monitoring sequences in the test set are input into the model one by one. Following the same processing flow as the training stage, the model is sequentially processed through encoding, reparameterization, ALSTM prediction and decoding reconstruction to finally obtain the prediction error and reconstruction error of each test sample, and calculate its corresponding anomaly score accordingly.

[0135] Step S62: Compare the calculated anomaly score with the set anomaly detection threshold. If the anomaly score is greater than the threshold, the bridge structure is determined to be abnormal and an alarm is triggered; if the anomaly score is less than or equal to the threshold, the structure is determined to be normal. The specific criteria are as follows:

[0136]

[0137] Where R represents whether the bridge structure is abnormal, S is the abnormality score calculated by the model, and T is the discrimination threshold; when R=0, it means the state is normal, and when R=1, it means the structure is abnormal.

[0138] In this embodiment of the application, anomaly detection of bridge vibration data in the test set is realized. The model uses the normal structural behavior patterns learned during the training phase to predict and reconstruct the test samples, and compares them with the anomaly score and threshold. When the detection result is an abnormal state, the system will trigger a structural anomaly alarm.

[0139] In summary, this application proposes a bridge structural anomaly detection method based on VAE-ALSTM. This method constructs training, validation, and test sets by standardizing and sliding-window segmenting bridge vibration monitoring data; it utilizes a variational autoencoder to construct an encoder and decoder to extract latent spatial features and reconstruct time-series data; it introduces a stacked LSTM network combined with an attention mechanism to construct an ALSTM module to model time dependencies and enhance the ability to focus on key time steps; after training, it generates anomaly scores by fusing prediction and reconstruction errors, and adaptively sets anomaly detection threshold based on the interquartile range (IQAR) statistical method, achieving accurate discrimination and alarm triggering of the structural state of the test set.

[0140] This application integrates the unsupervised feature learning capability of VAE with the temporal modeling capability of LSTM, and introduces an attention mechanism to enhance selective attention to important features. It has good modeling accuracy and anomaly sensitivity. The proposed method can determine the health status of structures without prior labels, improve the real-time response capability of the monitoring system to abnormal states, reduce the workload of inspection and judgment based on human experience, and enhance the intelligence and automation level of bridge structure operation and maintenance.

[0141] Corresponding to the bridge structural anomaly detection method based on VAE-ALSTM disclosed in the above embodiments, this application also discloses a bridge structural anomaly detection system based on VAE-ALSTM, which specifically includes:

[0142] The data preprocessing and sample construction module is used to standardize bridge vibration monitoring data, and uses a sliding window to divide the data into fixed-length sequence samples to construct training, validation and test sets.

[0143] The VAE-ALSTM model building module is used to build an anomaly detection model based on variational autoencoder and attention mechanism enhanced long short-term memory network (VAE-ALSTM). VAE is used to extract latent features from input data, and ALSTM helps to capture long-term dependencies in time series data.

[0144] The prediction and reconstruction module during the training phase is used to input training samples into the encoder, extract latent feature sequences, input the sequences into the ALSTM, predict the latent representation for the next time step, and then the decoder reconstructs the prediction results into the original data sequence.

[0145] The error calculation and anomaly scoring module is used to calculate the error between the prediction and the true latent vector, as well as the error between the reconstruction and the original data, and to fuse them to generate anomaly scores.

[0146] The threshold setting module is used to set the anomaly detection threshold based on the training set score distribution using the interquartile range statistical method.

[0147] The anomaly detection and alarm module is used to input vibration data from the test set into the trained model for scoring. When the anomaly score is greater than the threshold, the state is determined to be a structural anomaly and an alarm is triggered.

[0148] It should be noted that for a detailed description of the bridge structural anomaly detection system based on VAE-ALSTM provided in the embodiments of this application, please refer to the relevant description of the bridge structural anomaly detection method based on VAE-ALSTM provided in the embodiments of this application, which will not be repeated here.

[0149] This embodiment of the bridge structural anomaly detection system based on VAE-ALSTM operates in a closed-loop process of "data-latent features-prediction / reconstruction-scoring-alarm": The front-end module first standardizes and slides the vibration monitoring data to ensure consistency in subsequent modeling; the core VAE-ALSTM model couples attention-enhanced LSTM within the encoder-decoder framework to extract latent features and capture long-short-term dependencies; the prediction-reconstruction errors output in real time during the training phase are fused to obtain a single anomaly score, which is adaptively distinguished from normal and abnormal conditions by the interquartile range threshold; when the score exceeds the limit, the system immediately triggers a prompt through the alarm module, thereby achieving end-to-end, highly robust bridge structural health monitoring and early warning.

[0150] In addition, this application also provides an electronic device for detecting anomalies in bridge structural conditions based on VAE-ALSTM. Figure 3 This is a schematic diagram of the physical structure of an electronic device provided in an embodiment of this application. The electronic device may include: a processor 301, a communication interface 302, a memory 303, and a bus 304. The processor 301, communication interface 302, and memory 303 communicate with each other via the bus 304. The processor 301 can call a computer program stored in the memory 303 and executable on the processor 301 to perform the VAE-ALSTM-based bridge structure anomaly detection method provided in the above embodiment.

[0151] Furthermore, the logical instructions in the aforementioned memory 303 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of this application embodiment, essentially, or the parts that contribute to the prior art, or parts of the technical solutions, can be embodied in the form of software products. These computer software products are stored in a storage medium and include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0152] The above examples illustrate this application only to aid understanding and are not intended to limit its scope. Those skilled in the art to which this application pertains can make various simple deductions, modifications, or substitutions based on the ideas presented.

Claims

1. A method for detecting anomalies in bridge structural conditions based on VAE-ALSTM, characterized in that, The steps include: Step S1: Standardize the bridge vibration monitoring data, divide it into fixed-length sequence samples using a sliding window, and construct training set, validation set and test set; Step S2: Construct an anomaly detection model based on variational autoencoder and attention mechanism enhanced long short-term memory network (VAE-ALSTM). VAE is used to extract latent features from input data, and ALSTM helps to capture long-term dependencies in time series data. The step S2 comprises: Step S21: Construct an encoder using a multi-layer convolutional structure to map the input time series samples to the latent space and generate the mean and variance of the latent feature distribution; Step S22: Generate latent feature sequences by sampling based on reparameterization techniques; Step S23: Construct an attention-enhanced long short-term memory network (ALSTM), receive the latent feature sequence and perform temporal modeling, and predict the latent representation of the next time step; Step S24: Construct a decoder, receive the predicted latent representation and reconstruct it to generate an estimate of the original data sequence; Step S3: Input the training samples into the encoder to extract the latent feature sequence, input the sequence into ALSTM to predict the latent representation of the next time step, and then the decoder reconstructs the prediction result into the original data sequence. Step S4: Calculate the error between the prediction and the true latent vector, and the error between the reconstruction and the original data, and fuse them to generate an anomaly score; Step S5: Use the interquartile range statistical method to set an anomaly detection threshold based on the score distribution of the training set; Step S6: Input the vibration data of the test set into the trained model for scoring. When the abnormal score is greater than the threshold, the state is determined to be a structural abnormality and an alarm is triggered.

2. The bridge structural anomaly detection method based on VAE-ALSTM according to claim 1, characterized in that, The standardization process in step S1 includes: standardizing the vibration data using the z-score method, with the specific formula as follows: Where x is the raw data from the sensor, μ is the mean of the samples in that channel, and σ is the standard deviation.

3. The bridge structural anomaly detection method based on VAE-ALSTM according to claim 1, characterized in that, The reparameterization sampling in step S22 adopts a Gaussian distribution, and generates a latent feature vector by sampling the mean and variance of the latent feature distribution.

4. The bridge structural anomaly detection method based on VAE-ALSTM according to claim 1, characterized in that, The decoder in step S24 is a symmetric deconvolutional neural network, whose number of network layers and convolutional kernel size correspond to the convolutional layers in the encoder, in order to maintain structural alignment and reconstruction consistency between latent features and original data.

5. The bridge structural anomaly detection method based on VAE-ALSTM according to claim 1, characterized in that, In step S4, the prediction error is the mean squared error between the predicted latent representation and the true latent representation, and the reconstruction error is the mean squared error between the reconstructed data and the original input data. Both are used to fuse and generate anomaly scores, and their calculation formula is as follows: Among them, z t This represents the true latent representation at time step t. Let x represent the latent representation predicted by the ALSTM network. i The original input data, For the reconstruction result, T is the time step of the potential representation sequence, and N is the length of the original input sequence.

6. The bridge structural anomaly detection method based on VAE-ALSTM according to claim 5, characterized in that, The anomaly score is a weighted sum of prediction error and reconstruction error, and its fusion calculation formula is as follows: S=λ1·E pred +λ2·E rec λ1 and λ2 are adjustment factors, determined based on validation set performance optimization, used to control the weight ratio of the two types of errors in the final score.

7. The bridge structural anomaly detection method based on VAE-ALSTM according to claim 1, characterized in that, In step S5, the anomaly detection threshold is an upper limit threshold, calculated based on the first and third quartiles of the anomaly scores in the training set. T = Q3 + 1.5(Q3 - Q1) Q1 is the first quartile, and Q3 is the third quartile.

8. The bridge structural anomaly detection method based on VAE-ALSTM according to claim 1, characterized in that, In step S6, whether the bridge structural condition is abnormal is determined based on the comparison between the abnormality score S and the discrimination threshold T. The judgment logic used is as follows: Where R represents whether the bridge structure is abnormal, S is the abnormality score calculated by the model, and T is the discrimination threshold; when R=0, it means the state is normal, and when R=1, it means the structure is abnormal.

9. A bridge structural anomaly detection system based on VAE-ALSTM, characterized in that, The system includes: The data preprocessing and sample construction module is used to standardize bridge vibration monitoring data, and uses a sliding window to divide the data into fixed-length sequence samples to construct training, validation and test sets. The VAE-ALSTM model building module is used to build an anomaly detection model based on variational autoencoder and attention mechanism enhanced long short-term memory network (VAE-ALSTM). VAE is used to extract latent features from input data, and ALSTM helps to capture long-term dependencies in time series data. The prediction and reconstruction module during the training phase is used to input training samples into the encoder, extract latent feature sequences, input the sequences into the ALSTM, predict the latent representation for the next time step, and then the decoder reconstructs the prediction results into the original data sequence. The error calculation and anomaly scoring module is used to calculate the error between the prediction and the true latent vector, as well as the error between the reconstruction and the original data, and to fuse them to generate anomaly scores. The threshold setting module is used to set the anomaly detection threshold based on the training set score distribution using the interquartile range statistical method. The anomaly detection and alarm module is used to input vibration data from the test set into the trained model for scoring. When the anomaly score is greater than the threshold, the state is determined to be a structural anomaly and an alarm is triggered.

10. An electronic device, characterized in that, The device includes: a processor and a memory; The memory is used to store one or more program instructions; The processor is configured to run one or more program instructions to perform the steps of the bridge structure state anomaly detection method based on VAE-ALSTM as described in any one of claims 1 to 8.

Citation Information

Cited By

  • Head-up display multi-mode abnormity test method, system, device and medium

    CN121051700A

  • Digital metering method based on Internet of Things and digital twinning

    CN121412877A

  • Grouting abnormal construction real-time early warning method based on intelligent grouting big data

    CN121744168A