With the continuous advance of the smart grid, power enterprises accumulated massive data. In order to avoid the appearance of the data grave, data mining algorithms are used to do mining for massive data. However, if traditional mining algorithms are used to handle massive data, their processing performance encounters a bottleneck. The k-means algorithm based on cloud computing is implemented in this paper. And then the algorithm is compared with the traditional k-means algorithm. The results show that the k-means algorithm based on cloud computing is suitable for handling massive data.