| The aging population in China is becoming severe.It can be predicted that in the next few years,the elderly population in China will continue to increase,and the proportion of the elderly living alone will increase.At the same time,home-based elderly care will become the mainstream way for the elderly,and home-based elderly care for the elderly living alone will become a challenge.Considering that the user’s power data can reflect the user’s daily behavior habits,this paper adopts the idea of clustering and prediction,starts from the historical power data,classifies the historical power consuming behavior,and then establishes prediction models for different types of historical power consuming behavior,and finally realizes the purpose of real-time anomaly monitoring based on the prediction model.The research idea of this paper is to predict the normal power consumption in the next minute based on the normal historical power consumption,and determine whether the abnormality occurs through the comparison between the predicted value and the actual value.Among them,in the construction of the subsequent prediction model,the training set is required to be composed of normal samples,but this study belongs to unsupervised learning,and the sample set may contain abnormal samples.Therefore,the research work of this paper is mainly divided into three steps: the first step is to screen out the normal samples in the sample set.This paper starts from the shape similarity of the time series of power data,and judges whether the samples are abnormal by the density of sample distribution.Considering the high computational complexity of the time series shape similarity metric DTW distance and the high dimension of the time series,this paper proposes the LTTB-DBSCAN clustering algorithm to realize the recognition of abnormal samples.First,the LTTB algorithm is used to reduce the dimension of the user’s electricity data,and then the DBSCAN algorithm with the DTW distance as the similarity metric is used to screen the abnormal samples.The second step is to classify the normal sample set from which the abnormal samples have been screened.In this paper,combining with the relevant knowledge of electricity,we extract the time series structure characteristic indicators from the normal sample set from which the abnormal samples have been eliminated,and use K-Means clustering algorithm to classify the normal samples based on these characteristic indicators.The third step is to establish a prediction model.This paper establishes CNN neural network prediction models for several sample categories divided in the previous step,and realizes real-time anomaly monitoring based on these prediction models.The running results of this model on real datasets indicate that the LTTB-DBSCAN algorithm for anomaly sample recognition not only preserves the shape characteristics of time series,achieves the clustering purpose of anomaly recognition,but also reduces the computational complexity of high-dimensional time series algorithms.At the same time,the algorithm of clustering and prediction has better prediction accuracy than the algorithm of not classifying categories.The recognition results of abnormal samples prove that the real-time anomaly monitoring mechanism proposed in this paper is scientific and practical. |