With the increasing utilization of intelligent mobile devices for online inspection of electrical equipment in smart grids, the limited computing power and storage capacity of these devices pose challenges for deploying large algorithm models, and it is also difficult to obtain a substantial number of images of electrical equipment in public. In this paper, we propose a novel distillation method that compresses the knowledge of teacher networks into a compact few-shot classification network, employing a global and local knowledge distillation strategy. Central to our method is exploiting the global and local relationships between the features exacted by the backbone of the teacher network and the student network. We compared our method with recent state-of-the-art (SOTA) methods on three public datasets, and we achieved superior performance. Additionally, we contribute a new dataset, namely, EEI-100, which is specifically designed for electrical equipment image classification. We validated our method on this dataset and demonstrated its exceptional prediction accuracy of 94.12% when utilizing only 5-shot images.