The invention discloses a
time series anomaly detection method based on reconstruction and prediction, and particularly relates to the field of
time series data analysis of
the Internet of Things, comprising the following steps: step 1, data preprocessing; 2, constructing a reconstruction network based on an auto-
encoder architecture and a time
convolution network; step 3, constructing a prediction network based on LSTM and an attention mechanism; and step 4, end-to-end model training is carried out, and
anomaly detection performance is evaluated. According to the method, a reconstruction network based on an auto-
encoder architecture is constructed, a time
convolution network TCN is taken as a core, multi-scale features are extracted by using expansion causal
convolution, and input data are reconstructed to obtain reconstruction errors. A prediction network is constructed to capture a long-term dependency relationship in
time sequence data, and weights of different time steps are dynamically allocated, so that the modeling capability of a model to a complex mode is enhanced. By integrating the
reconstruction error and the prediction error, an abnormal
score is constructed, and a threshold value is automatically determined by using a POT
algorithm, so that accurate discrimination of abnormal data points is realized.