Research Article

Hydrologic Time Series Anomaly Detection Based on Flink

Algorithm 1

Hydrological time series anomaly detection algorithm.
Input: hydrological time series , reliability , sliding window size , historical batch data .
Output: the outliers in hydrological time series.
Step 1: clean the sequence , including descending dimension, deleting duplicate value, sifting, and sorting
Step 2: using the value of as the initial starting position of the sliding window of , the value of the is predicted, and as the window slides, the predicted value gradually forms a new time series
Step 3: the 95% confidence interval of the new time series is calculated and compared with , the time point which is not in the confidence interval is obtained and get the exception point set
Step 4: taking historical data as input and training and establishing K-Means++ model, obtain the discrete state sequence
Step 5: compute the state transition matrix of the discrete state sequence
Step 6: the K-Mean++ model that is obtained in Step 4 is used for the exception point set of Step 3 and the value of its previous moment to obtain the state of anomaly and its previous moment
Step 7: estimate the value of the exception and its previous moment in Step 6 by state transition data frame and then output the confidence score
Step 8: repeat the above steps until no new data are entered