| The smart grid realizes the two-way information flow and power flow by integrating the Advanced Metering Infrastructure(AMI),which greatly improves the efficiency of power supply and consumption.However,smart meters,the key component of AMI,are deployed in an open network environment and interconnected through wireless networks,which are vulnerable to data integrity attacks.The scaling attack,a general expression of some other data integrity attacks,is a typical data integrity attack.By launching a scaling attack,the reported value of smart meters per hour in a day is randomly reduced,which affects the intelligent decision-making results of the utility and thus endangers the safe operation of the smart grid.A number of research efforts have been devoted to detecting data integrity attacks.Nonetheless,most of the existing investigations focus on all attack types,and little attention has been paid to a detection strategy specially designed for scaling attacks.In addition,most of the data in the existing detection systems are stored in traditional databases,which are vulnerable to tampering and are not conducive to information tracing.Therefore,this paper has made the following two contributions to solve the above problems:(1)In order to solve the problem that existing data integrity attack detection schemes lack of targeted research on scaling attacks,this paper proposes a detection algorithm of scaling attacks considering consumption pattern diversity in AMI(SA2CPD).Firstly,the SA2 CPD uses Kmeans to distinguish different consumption patterns,then extracts consumption intervals to binarize the data,and then divides the time periods into two categories based on the discrete values,and uses the category with the largest information gain to build a decision tree for attack detection.Secondly,this paper leverages three criteria including False Positive Rate,False Negative Rate and F1 score to validate the effectiveness and efficiency of the SA2 CPD through theoretical comparison analysis with Naive Bayes,KNN and the decision tree algorithm without considering the diversity of consumption patterns.Lastly,this paper conducts performance simulation based on the GEFCom2012 data set.The experimental results show that the SA2 CPD algorithm has higher F1 score under different attack proportions.(2)In order to solve the problem that the stored data in the existing detection system is easy to be lost or tampered with,and the traceability of data can not be guaranteed,this paper designs a scaling attack detection system based on the blockchain.Firstly,this paper analyzes the functions of different entities in the scaling attack detection system,and designs the system modules and framework.Secondly,through the analysis of the system flow,the system algorithm is designed,and its time and space complexity is analyzed.Thirdly,the solidity language is used to write smart contracts,and the specific implementation of each module function in the system development process is described.Lastly,this paper shows the final results of the pages such as the environment required for the system construction and operation,the connection between the front and back ends of the system and the interaction with the blockchain,the data successfully linked and stored in the blockchain,and the tracing of historical data,which verifies the effectiveness of the system. |