With the rapid development of energy internet technology, the informatization level of the power industry continues to improve. Based on the data management platform, power grid enterprises have accumulated massive customer data, which has great potential for application. In addition, with the development of information technology, it is possible to control the flexible resources on the customer side. By using these data to mine and utilize the deep relationship and rules, we can realize the analysis and prediction of power grid customer behavior, which can provide the basis for the development of power enterprises to assist decision-making. This paper introduces the purpose, background and content of power grid customer behavior analysis, and uses data mining technology to analyze the power consumption behavior of flexible resources on the customer side of power grid, with three parts of power customer segmentation, customer credit rating evaluation and high-risk customer prediction as analysis indexes. And a case simulation is used to verify the effectiveness of the proposed method.