In this paper, OpenCV technology is used to produce the distribution network defects dataset, which can be used as a training set, validation set, and test set in the ratio of 6:2:2. Combining the dataset and the Transformer framework, the S-Transformer based distribution network key quality defect identification model is constructed together. At this level, the degree of equipment deterioration is fitted, the distribution network intelligent operation and maintenance optimization strategy is formulated, and the experimental method is applied to evaluate the distribution defect identification and intelligent operation and maintenance. The identification rate of S-Transformer network for the six collected distribution network equipment defects is 0.9~0.95, which accurately controls the potential dangers, and is conducive to the subsequent intelligent equipment operation and maintenance of the distribution grid and its management and control, compared to the Compared with the traditional operation and maintenance program, the operation and maintenance program in this paper can reduce the operation and maintenance time by 52 hours per month, which greatly provides the efficiency of operation and maintenance labor.