With the development of the new digital power system, the scale, type and value of power data are increasing, and the security protection of power data is confronted with serious challenges and risks. Through scientific, reasonable and dynamic security grading of electric power data, it can achieve the refinement, differentiation and personalization of electric power data security protection and avoid the phenomenon of “one size fits all”. Therefore, this paper builds a power data security classification and query system, firstly, by analyzing the security requirements of data in multiple scenarios of the electric power industry and carrying out security classification. Based on the improved O-SVM algorithm, it establishes a model applicable to the automatic grading of electric power data, and improves the accuracy rate of the classification algorithm. Finally, it designs an automated query system based on Hadoop, and the experimental results show that The classification retrieval accuracy is above 90%, and the accuracy is significantly improved compared with the existing SVM classification retrieval algorithm.