## 4 ATT-BiLSTM Anomaly Data Processing
### ATT-BiLSTM Data Preprocessing  
In order to ensure the stability and accuracy of the model, it is imperative to implement rigorous preprocessing of the raw data. The primary preprocessing steps entail data standardization and dataset division.  
The \(Z\)-score standardization method is employed to transform the data into a standard normal distribution with a mean of 0 and a standard deviation of 1. This transformation facilitates the convergence of the model and enhances its performance [28]. Standardization of the deflection monitoring data was achieved through the implementation of the StandardScaler class, a component of the Scikit-Learn library. Initially, the training set data were fitted to calculate the mean and standard deviation. Subsequently, these parameters were applied to normalize the training and test sets to ensure that they had the same normalized form.  
The mathematical formulas are as follows:  
1. Dataset organization: according to the deflection monitoring data, organized into the original feature dataset: \[X=[x_{1},x_{2},\dots,x_{n}]^{T}\] (8)  
Figure 6: ATT-BiLSTM model diagrams.  
2. Z-score normalization: \[z_{i}=\frac{x_{i}-\mu}{\sigma}\] (9) where \(z_{i}\) is the normalized eigenvalue, \(x_{i}\) is the original eigenvalue, \(\mu\) is the mean of the feature, and \(\sigma\) is the standard deviation of the feature.  
In the StandardScaler class, the fit_transform method is employed to fit the data, calculate the mean and standard deviation, and subsequently perform a normalization transformation to obtain the normalized dataset \(X\).
2. Division of the dataset  
The objective of the dataset division is to furnish the ATT-BiLSTM repair model with patterns and features that have been learned to correlate between the deflection monitoring data and to validate the learning effect. The repair of the abnormal deflection data at measurement point 2 served as the guiding principle, with all of the normal data from measurement point 2 being utilized as the model training output set. Meanwhile, the data from measurement points 1 and 3 were employed as the model training input set. The model focused on learning the structural features of the bridge under normal conditions through an all-data training strategy.  
The primary rationale for not establishing a distinct test set is to guarantee that the model can leverage the entirety of the available data to discern the characteristics of the bridge structure in its normal state. This approach enables the model to concentrate on acquiring knowledge about the normal state, which may enhance its capacity to predict abnormal data more effectively.  
Subsequent to the training phase, the model can be utilized for the purpose of predicting anomalous data. Given the absence of a test set designed to evaluate the model's performance on unseen data, traditional verification methods for assessing the model's generalization ability are not applicable. However, this paper employs a comparative analysis of abnormal and predicted data, and also compares the correlation between the original data and the normal data plus the predicted data as a means of verifying the accuracy of the model in predicting abnormal data, as well as verifying the model's sensitivity to and ability to recognize changes in the structural state of the bridge.