Font Size: a A A

Research On Water Quality Time Series Data Prediction And Anomaly Detection Based On Deep Learning

Posted on:2024-05-17Degree:MasterType:Thesis
Country:ChinaCandidate:P XuFull Text:PDF
GTID:2531307091484654Subject:Resources and Environment (Environmental Engineering) (Professional Degree)
Abstract/Summary:PDF Full Text Request
The prediction and anomaly detection of water quality time series data play an important role in water quality early warning and maintenance of the ecological environment.However,water quality time series data have characteristics such as seasonality,periodicity,sample imbalance,a large amount of noise,and disorderly fluctuations,which makes it difficult for traditional anomaly detection and prediction methods to model water quality time series data.Traditional deep learning models also have low accuracy,poor robustness,and weak generalization ability in different water areas when performing long-term prediction tasks.In order to solve the above problems,we constructed the Foreformer model and Tran Anom model based on the Transformer model.The main research content and innovative work are as follows:(1)In this paper,we constructed the Foreformer water quality prediction model by introducing temporal decomposition and convolutional sparse self-attention mechanism based on the Transformer model.The time series decomposition module can extract hidden features in timeseries data and avoid the loss of time series features by introducing timeseries decomposition and periodicity decomposition formulas.The sparse self-attention mechanism has the ability to reduce computational costs because it only considers data related to the current input time node,and adding convolutional layers can more effectively extract shortterm time trends.Ablation experiments had shown that the feature map simulated by the model was closest to the original water quality feature map,indicating that the model could effectively extract time series data features through the convolutional sparse self-attention mechanism and time series decomposition module.In the comparative experiment,the training time of the Foreformer model was only 60.8s,which was less than that of the comparative models such as Autoformer,proving that the model had fast inference capabilities.In the multi-step prediction comparative experiment,compared with the Autoformer model,the loss functions MSE and MAE were improved by 11% and 12% respectively,proving that the Foreformer model had strong robustness and generalization.In summary,the Foreformer model proposed in this article can accurately predict the trend of water quality data and has certain potential for future industrial deployment.(2)In this paper,we constructed the Tran Anom water quality anomaly detection model based on the Transformer model combined with the contrastive learning framework and shared attention mechanism.The past tense of this passage in English is: The Tran Anom model reconstructed the Transformer model through a contrastive learning framework.Contrastive learning was to learn general patterns and rules through the continuous iteration of the model,thereby improving the generalization ability of the model.The shared attention mechanism could improve the inference speed of the Tran Anom model and save computational resources by sharing the attention weights of adjacent layers.Ablation experiments had shown that when the input window length was 100,the F1 score of the model reached 0.93 and the ROC/AUC ratio reached 0.96.This score was better than the model without adding the contrastive learning framework and shared attention mechanism,which proved the effectiveness of the contrastive learning framework and shared attention mechanism.Comparative experiments had shown that compared with commonly used anomaly detection models such as LSTM_AD and MTAD_GAT,the Tran Anom model not only had the shortest calculation time,but also had the highest attention score of 0.051 at the anomaly point,with the least noise impact,proving that the model had good water quality anomaly detection capabilities.In summary,this model consumes fewer resources and has a high recognition rate for anomaly points,which can assist staff in timely discovering issues and preparing corresponding solutions.
Keywords/Search Tags:Time Series, Anomaly Decetion, Prediction, Deep learning, Attention Mechanism
PDF Full Text Request
Related items