1 Introduction

Every year around the Spring Festival, large-scale icing of transmission lines will occur in southern China. In the case of continuous low temperature in winter, heating and power consumption will continue to increase. The icing of transmission lines will easily lead to regional power outages, which will cause serious consequences for people’s production and life. The research of icing line includes three parts: mechanism, detection technology, and deicing technology. Perfect detection technology can promote mechanism research and provide support for mechanism research, deicing technology design, and transmission line laying. The icing of transmission lines is objectively caused by weather reasons and cannot be fundamentally eliminated. However, through the perfect detection technology, the icing condition of the line can be mastered, and the development trend of ice coating can be predicted, so that appropriate deicing measures can be taken to achieve the purpose of avoiding disasters. In recent years, line icing has been increasing year by year. It is of great significance and guidance to explore a more perfect icing detection system for the safe operation of transmission lines and the improvement of the reliability of the entire power system.

The hazards of icing on transmission lines are mainly in two aspects:

(1) Destroy the tower. The icing of the line exceeds the carrying capacity of the tower, which will break the tower machinery.

(2) Line trip. When the icing on the lower and middle wires suddenly falls off, the upper wires will be contacted during the bouncing process, which will cause the inter-phase short circuit, jump off the switch and interrupt the power supply.

It can be seen that icing on line will cause mechanical and electrical failure. The most destructive force is that the thickness of icing exceeds the carrying capacity of the line, resulting in mechanical failure of the line, and then leads to electrical failure.

The research on power grid icing has wide application value:

(1) Ensuring grid security

The research on power grid icing can effectively monitor and protect transmission lines and ensure the safety of transmission lines. The system can be used to detect the icing of transmission lines in the deep forest which cannot be reached by walking. It is convenient, efficient, and accurate. It is of great significance to ensure the safe operation of power grid and equipment to detect and ask questions in time and deal with the icing according to the test results.

(2) Improving automation, information, and intelligence of power system

The background icing detection and management software designed can realize the visualization of icing information. The image processing software and the icing thickness algorithm can finally get the icing thickness. When the line icing thickness reaches a certain level, relevant personnel can take corresponding deicing measures based on the data obtained, which can improve the degree of automation, informatization, and intelligence of power system.

(3) Wide scope of application

The research results can be applied to a wide range of areas, such as the aging of insulators and the damage of transmission lines, in addition to the ice detection of transmission lines in winter, and other aspects of line inspection in other seasons. It also extends to other places where video surveillance is needed and manpower is difficult or inaccessible. Therefore, this project has broad prospects for popularization and application, and can bring huge economic and social benefits.

At present, the research on transmission line icing at home and abroad mainly includes the following aspects: [1,2,3,4,5,6]:

(1) Causes of transmission line icing accidents: the impact of icing on the mechanical and electrical properties of transmission lines leads to frequent icing accidents throughout the country, which has seriously threatened the safe operation of power systems and caused significant economic losses and social impact. The mechanical faults caused by severe icing of transmission lines include wire break, tower inverted rod, tower head broken, insulator string overturn, collision, burst, etc. The electrical accidents are mainly caused by the arcs of the wires caused by the icing, the decrease of the distance between the conductors to the ground or between them, and the flashover, burning of the conductors, and so on. The causes of these accidents can be roughly divided into the following categories: (1) transmission line overload caused by severe icing; (2) uneven icing or different periods cause poor tension; (3) transmission line asymmetrical icing causes conductor galloping; (4) insulator string flashover [7].

(2) Nature and classification of transmission line icing: line icing is classified according to its formation or hazards. There are usually several types of icing, such as rain cliff, mixed cliff (hard fog cliff), fog cliff (soft fog cliff), dry snow, wet snow, and white frost. According to the mechanism of ice formation, the growth process of ice cover can be divided into dry growth and wet growth. This classification is helpful to analyze the formation mechanism of conductor icing and the heat balance and heat transfer during the formation process [8, 9].

(3) Study on the mechanism and model of ice formation on transmission lines: on the basis of long-term observation and study on the characteristics and causes of icing accidents on transmission lines, the physical process of icing formation and the meteorological conditions affecting the icing of transmission lines, including topography, geographical conditions, altitude, wire suspension height, wire diameter, etc. As far as possible, the electric field intensity and other factors can accurately grasp and analyze the mechanism and law of ice coating on transmission lines. The thermodynamic mechanism and model of conductor icing and the hydrodynamic mechanism and model of conductor icing are studied, respectively. This has important guiding significance to prevent the occurrence of ice disaster accident [10, 11].

(4) Anti icing and deicing technologies for transmission lines: by studying the formation mechanism of icing and the characteristics of transmission line icing, various anti-icing and deicing technologies are studied at home and abroad. Because the formation of icing is closely related to the environment of transmission lines, it is necessary to avoid the transmission lines passing through the heavily icing areas in the design of transmission lines, so as to reduce the risk of icing disasters. In addition, the amount of ice can be reduced by coating hydrophobic substances on the wires; the heat generated by the wires can also be used to melt the ice and snow on the wires; mechanical external force or natural conditions such as wind, gravity of the earth can be used to make the ice fall off the wires. These measures can reduce the probability of icing disaster on transmission lines [12, 13].

In order to achieve real-time monitoring of transmission line icing conditions, both at home and abroad on ice monitoring conducted a lot of research. Through the ice monitoring device installed in the icing monitoring points to achieve real-time monitoring of icing, the monitoring center personnel or expert judgment and warning system, the guidance of the relevant departments of power system on line deicing measure is adopted in time. According to the principle of icing monitoring, the existing online monitoring methods for transmission line icing can be divided into the following categories: (1) measuring the quality of the conductor in the vertical gear by installing a tension sensor, calculating the wind resistance coefficient and the inclination component of the m insulator string with the data of wind speed, wind direction, and the inclination angle of the insulator string, and finally obtaining the icing quality and converting it into the icing thickness; (2) the parameters such as inclination angle and sag of conductors are collected and analyzed with the state equation of transmission lines, line parameters, and meteorological environment parameters. The loads, important parameters, and average ice thickness of conductors after icing are calculated [14]; (3) the stress of one or more points on the transmission line is measured by optical fiber sensor, and the icing mass of the transmission line is calculated and converted to the ice equivalent thickness [15]; (4) by installing video cameras on poles and towers, real-time images/videos of transmission lines are acquired, and transmitted to the monitoring center by wireless communication network. The icing condition of transmission lines is identified by the surveillance personnel with the naked eye.

In recent years, image classification technology has been introduced into the identification of transmission line icing. Image classification is an image processing method that uses computer to analyze image quantitatively and mark different kinds of objects according to different features of the extracted image. Image classification is very important to our life, work, and learning. It has been widely used in traffic sign recognition, medical assistant diagnosis, face recognition, aviation, and other fields.

Traditional image classification methods mainly extract some artificially designed feature points, represent the image by mathematical statistical model, and then classify the image by image matching method. However, such shallow image classification methods need artificial design features, and the recognition rate is low. With the development of artificial intelligence, deep learning technology is widely used in speech recognition, natural speech processing, computer vision, and other fields, and has achieved great success.

The process of image classification based on convolution neural network mainly includes input image into neural network, use deep learning algorithm, such as forward and backward propagation, to train the model, and then use the trained model to classify the new image. Convolutional neural network has the advantages of automatic feature extraction, weight sharing, and strong generalization ability. It can process some incomplete samples or images with complex background.

Therefore, the general image classification methods are

(1) Image classification based on support vector machine.

(2) Image classification based on artificial neural network; the main type of neural network is BP network.

(3) Classification based on convolution neural network.

To sum up, in view of the shortcomings of the traditional methods of ice detection in power grids, a classification method based on convolution neural network for ice detection image in power grids is proposed, which can effectively classify and recognize the ice image in power grids. The specific contributions of this article are as follows:

(1) Based on the good performance of convolution neural network, it is applied to the detection of power grid icing. A classification method of power grid icing detection image based on convolution neural network is proposed;

(2) To overcome the shortcomings of convolution neural network algorithm, a hybrid classification model based on convolution neural network and support vector machine is proposed in this paper;

(3) The convolution neural network is used to extract features, and then the support vector machine is used to replace the softmax layer of the convolution neural network to realize the classification of ice-covered detection images.

2 Proposed method

2.1 Image preprocessing

As we all know, the image captured directly by the imaging module may be affected by various factors to produce certain noise or the target in the image may produce a certain degree of blurring. These will bring some errors to the subsequent image feature extraction. In order to overcome this effect to the greatest extent, it is necessary to preprocess the image. Common preprocessing methods include image graying, image enhancement, image spatial filtering, etc. [16, 17]. These methods will be introduced in this section.

2.1.1 Image grayscale

In computer, color image is expressed by 3 bytes of data per pixel. It can be decomposed into three monochrome images: red (R), green (G), blue (B), and the brightness of each pixel is identified by gray value. Grayscale image is to remove the color information from the color image and only contain the brightness information, which can save a lot of computer resources for storage and processing.

Generally, there are three kinds of grayscale image processing: maximum method, average method, and weighted average method [18, 19]. The expressions are as follows:

$$ {\displaystyle \begin{array}{l}\mathrm{Gray}=\max \left(R\left(x,y\right),G\left(x,y\right),B\left(x,y\right)\right)\\ {}\mathrm{Gray}=\left(R\left(x,y\right)+G\left(x,y\right)+B\left(x,y\right)\right)/3\\ {}\mathrm{Gray}={W}_RR\left(x,y\right)+{W}_GG\left(x,y\right)+{W}_BB\left(x,y\right)\Big)\end{array}} $$
(1)

As can be seen from the above formula, no matter which method is adopted, the features of the original image will be changed or lost. Considering the practical application, this paper chooses the following gray transformation formula.

$$ {\displaystyle \begin{array}{l}\mathrm{Gray}=0.299R\left(x,y\right)+0.587G\left(x,y\right)+0.114B\left(x,y\right)\\ {}R\left(x,y\right)=G\left(x,y\right)=B\left(x,y\right)=\mathrm{Gray}\end{array}} $$
(2)

Where Gray denotes the gray value of the pixel, R(x, y) denotes the red component, G(x, y) denotes the green component, B(x, y) denotes the blue component, and the weight in the formula is the most reasonable gray image weight proved by previous experiments.

2.1.2 Image enhancement

Image enhancement is an important image processing method with many applications, which means that the original unclear image becomes clear or some concerned features are emphasized to suppress the unconcerned features, thus improving the image quality and enriching the amount of information. It is an image processing method to enhance the effect of image interpretation and recognition.

Affected by complex environmental factors, such as light, mechanical vibration, or shake, the actual image may appear overall brightness or darkness, which makes the gray value distribution of the image relatively centralized and increases the difficulty of subsequent processing. At the same time, the image enhancement method can improve the image and facilitate the processing.

It is not easy to distinguish the target iced conductor from the background in the transmission line iced image, and the gray level of the image is concentrated at this time. To distinguish the iced wire from the background, it is necessary to expand the range of gray value in the image to make the brightness value of the image pixels high or low, and to increase the contrast of the iced wire image so as to make it easier to distinguish.

2.1.3 Image spatial filtering

After image enhancement, the details of the image are clearer and the contrast is enhanced, but at the same time, the noise of the image is increased. In order to reduce the noise of image, we need to filter the image smoothly.

Image spatial filtering is a smoothing method for image filtering. Image smoothing filter also has a frequency domain filtering method, which means that the image in spatial domain is orthogonally transformed to get the image in frequency domain, then filtered in frequency domain, and then the image in spatial domain is obtained by arc-cross transformation. Although the method of frequency domain filtering has a good filtering effect, it is not practical in this paper because of the complexity of the steps and the large amount of calculation, so we use the spatial filtering method to smooth the image.

Spatial smoothing filtering usually includes mean filtering, Gauss filtering, median filtering, adaptive filtering, and so on. The first two methods belong to the linear smoothing filtering method, and the latter two belong to the non-linear smoothing filtering method. Considering all factors, this paper chooses the median filtering method to process the collected image and the smoothing filtering in the pre-processing.

The median filtering method uses the median of the brightness of all pixels in the neighborhood of the pixel point f(x, y) to replace the gray level of the point. The specific method is to determine a window W, and then replace the original pixel point f(x, y) with the median value of the gray level of all pixels in the window to obtain the filtered image g(x, y). The expression is as follows:

$$ g\left(x,y\right)=\mathrm{median}\left\{f\left(x-k,y-l\right),\left(k,l\right)\in W\right\} $$
(3)

2.2 Convolution neural network

Convolutional neural network (CNN) is a multi-layer neural network, which is composed of several convolution layers and pooling layers (lower sampling layer) alternately. Then, one or more full connection layers are connected to classify the image features generated by the previous layers. The number of free parameters of CNN is reduced greatly by using local connection and sharing weights of neurons, which is more efficient than that of fully connected network. Moreover, due to the role of pooling layer, image features have better translation, scaling, and distortion invariance. The basic network structure of convolution neural network can be divided into five parts: input layer, convolution layer, pooling layer, full connection layer, and output layer. The following sections describe the network parts in detail.

Input layer: the convolution input layer can directly act on the original input data. For the input image, the input data is the pixel value of the image.

Convolution layer: from the knowledge of image theory, we can know that the local features of a natural image can be the same or similar to other local regions, which shows that the features learned in one region can also be applied to other regions. For convolution neural network, the output of convolution layer is obtained by convolution of filter and input feature graph of the first layer (convolution kernel is calculated by sliding window one by one on feature graph), plus a bias term, and then applied to a non-linear activation function. The output value of the convolution layer is the characteristic graph of the layer. Each filter produces an output characteristic map. In this paper, the input image is represented by X, the kth feature graph of layer i is represented by \( {A}_i^k \), and the characteristics of the kth filter of layer i are determined by the weight matrix \( {W}_i^k \) and the bias term \( {b}_i^k \). Then, the k characteristic graph of level i can be obtained from the following formula (4):

$$ {A}_i^k=f\left({W}_i^k\otimes {A}_{i-1}^k+{b}_i^k\right) $$
(4)

The advantage of convolution layer lies in local connection and weight sharing. Through local connection, the feature of image can be extracted better, and the connection parameters of adjacent layers in network can be reduced. Using this mechanism can significantly reduce the number of required parameters.

Pooling layer: after extracting the features of the image through the convolution layer, it can theoretically be directly input into the full connection layer and classified by classifier. However, because of the large dimension of the features, the calculation is very large and it is easy to produce over-fitting. Although convolution layer uses local connection to reduce the number of connections in network structure, the increase in the number of feature graphs will increase the feature dimension, and the network is still very complex, and the training is still very difficult. In order to further reduce the parameters of the network and reduce the complexity and over-fitting degree of the model, a pooling layer is usually followed by a convolution layer. The pooling layer is a process of sampling, which integrates the output of adjacent neurons in the same characteristic graph. After introducing the down-sampling mechanism, it can effectively reduce the feature dimension and retain the effective information of the image, at the same time remove redundant data, and speed up network training. The principle of this aggregation is that the pixels in each adjacent region of the image have a large similarity. The region can be described by calculating the maximum value of the region as the sampling value, or by adding all the values of the region to average, and taking the average value as the sampling value.

Formula (5) can be used to represent the process of the pooling layer. The neurons in this layer adopt a down () downsampling function, which is used to maximize or average pooling the feature map.

$$ {A}_i^k=f\left(\mathrm{down}\left({A}_{i-1}^k\right)+{b}_i^k\right) $$
(5)

Fully connected layer: it can contain several full connection layers, which is actually the hidden layer of multilayer perceptron. Generally, the ganglion points in the posterior layer are connected with each ganglion point in the preceding layer, and there is no connection between the neuron nodes in the same layer. Each layer of neuron nodes propagates forward through the weights on the connecting line, and the weights are combined to get the input of the next layer of neuron nodes.

Output layer: the number of neural nodes in the output layer is set according to specific application tasks. If it is a classification task, the output layer of convolution neural network is usually a classifier.

2.3 Hybrid classification model

Softmax as classifier is widely used in CNN. Assuming that h is the activation value of the penultimate layer and W is the weight of the penultimate layer to the softmax layer, the input a of the softmax layer can be expressed as

$$ {a}_i=\sum \limits_k{h}_k{W}_k $$
(6)

Suppose that for the N-class classification problem, there are N nodes in the softmax layer, and the output of each node is recorded as pi, where i = 1, 2, ⋯, N, because pi is a discrete probability distribution, satisfies the relation \( \sum \limits_{i=1}^N{p}_i=1 \). Among them

$$ {p}_i=\frac{\exp \left({a}_i\right)}{\sum \limits_{j=1}^N{a}_j} $$
(7)

The result of formula (7) is used to compute the cross-entropy loss function of softmax.

The image features can be obtained by convolution neural network, but it cannot get the optimal classification accuracy. The support vector machine (SVM) with fixed kernel function cannot learn the complex features of the image. However, the “soft interval” method can be used to maximize the interval to obtain the decision plane. Finally, the optimal solution of the classification problem can be obtained in the learning feature space.

As a common method of supervised machine learning, SVM is widely used in data analysis, pattern recognition, regression analysis, and so on. Standard SVM is a non-probabilistic binary linear classifier, that is, for each input, it predicts that the input will be one of the two categories [20].

The basic principle of SVM [21] is as follows:

Set the training set sample as {(xi, yi)|xi ∈ Rd, yi ∈ {−1, 1}, i = 1, 2, ⋯, N}, yi as the label of the category to which the sample belongs, N as the number of training samples, d as the dimension of the sample. For linearly separable data sets, there exists a generalized optimal classification hyper plane:

$$ w\cdotp x+b=0 $$
(8)

Among them, w is n-dimensional vector, b is offset, · is inner product operation, which makes the classification interval get the maximum value, that is, \( \frac{2}{\left\Vert w\right\Vert } \) is the largest and \( \frac{1}{2}{\left\Vert w\right\Vert}^2 \) is the smallest. As a result, the classification of optimization problems can be transformed into the following forms:

$$ \min \frac{1}{2}{\left\Vert w\right\Vert}^2\kern0.5em s.t.\kern0.5em {y}_i\left({w}^T{x}_i+b\right)\ge 1,i=1,2,\cdots, n $$
(9)

However, in practice, many data are not completely linear separable, so on the basis of formula (9), this paper introduces relaxation variables and penalty coefficients, which can be transformed into the following optimization problems after Lagrange transformation [22,23,24]:

$$ {\displaystyle \begin{array}{l}\underset{\alpha }{\max}\sum \limits_{i=1}^n{\alpha}_i-\frac{1}{2}\sum \limits_{i,j=1}^n{\alpha}_i{\alpha}_j{y}_i{y}_j{x}_i^T{x}_j\\ {}s.t.\kern0.5em 0\le {\alpha}_i\le C\kern0.5em \sum \limits_{i=1}^n{\alpha}_i{y}_i=0\end{array}} $$
(10)

αi is obtained by solving the upper formula, and then w is obtained by \( w=\sum \limits_{i=1}^n{\alpha}_i{y}_i{x}_i \). In this problem, a part of αi is not 0, and its corresponding training set sample is support vector. We can use the formula (11) to judge unknown class attribute vectors:

$$ f(x)=\operatorname{sgn}\left(w\cdotp x+b\right)=\operatorname{sgn}\left(\sum \limits_{i=1}^n{\alpha}_i{y}_i\left({x}_i\cdotp x\right)+b\right) $$
(11)

The mapping function in multidimensional space need not be explicitly calculated, but only the kernel function K(xi, x) = 〈Φ(xi), Φ(x)〉 is substituted into formula (11). The decision function is as follows:

$$ f(x)=\operatorname{sgn}\left(\sum \limits_{i=1}^n{\alpha}_i{y}_iK\left({x}_i,x\right)+b\right) $$
(12)

The main principles of support vector machines can be roughly summed up as following two points:

(1) The corresponding relationship between independent variables and strain variables is mapped from the original low-dimensional vector space to the high-dimensional vector space (feature space) to make it a linear separable state, so that the non-linear feature vectors can be linearly analyzed by linear algorithm in the high-dimensional feature space.

(2) Based on structural risk minimization principle, an optimal tool is used to find a hyper-plane in feature space to divide the data and its components into two categories to obtain the optimal classification effect.

Simply put, the problem that support vector machines need to solve is to find a hyper-plane and effectively separate two different types of data.

The structure of hybrid model is the combination of CNN and SVM, that is to say, in the last step of classification, SVM is used to replace traditional softmax [25, 26]. The full connection layer of CNN can be regarded as the feature set of the original image, so it is of practical significance to use these features to train and classify by using classifiers. After the original CNN is trained by back propagation algorithm, the output of the full connection layer is taken as the new feature extracted. They are then sent to train the SVM classifier. Once SVM is well trained, it starts identifying tasks for test data.

Because the hybrid model combines the advantages of CNN and SVM, and compensates for their limitations, the hybrid model will perform better than each individual model. The learning algorithm of CNN is based on empirical risk minimization, which tries to minimize the error of training set. When the first classification hyperplane is found by back propagation algorithm, the training process will be terminated whether it is local or global optimal. The classification hyper-plane of SVM is globally optimal by using the structured risk minimization principle. It can be seen that the generalization ability of multilayer neural network is lower than that of SVM. Therefore, using SVM to replace the softmax layer of convolution neural network will enhance the accuracy of classification.

3 Experiments

In this paper, four monitoring points of typical icing disaster areas are acquired from a provincial icing detection system to obtain the icing detection images. The data are shown in Table 1.

Table 1 Data description

In addition, the thickness of icing is divided into six grades: no icing (0 cm), slight icing (0–5 cm), moderate icing (5–10 cm), severe icing (10–15 cm), dangerous icing (15–20 cm), and alarm icing (more than 20 cm).

This paper classifies the icing detection images of power grids and realizes the judgment of whether the power grids are icing or not. The specific flow chart of this paper is shown in Fig. 1.

Fig. 1
figure 1

Image classification process of ice coating

As can be seen from Fig. 1, this paper firstly grayscale the image detected by the power grid detection system to reduce it from three-dimensional to two-dimensional; secondly, through image enhancement, the image quality can be improved for subsequent processing. Because image enhancement will increase image noise, this paper uses median filtering to denoise and then extracts image feature information by convolution neural network. In order to improve the classification effect, this paper designs a hybrid model combining convolution neural network and SVM. It mainly uses SVM classifier to replace softmax layer and effectively combines the advantages of convolution neural network and SVM to classify ice images. In the next section, the simulation experiment will be discussed in detail.

4 Results and discussion

Before classifying ice images, it is necessary to preprocess the images obtained by the ice detection system. The results of gray processing are compared in Fig. 2. Figure 2a is the original image, and Fig. 2b is the result of gray processing. As can be seen from Fig. 2, the image information is basically preserved, but the image is dimensionality reduced from three dimensions to two dimensions.

Fig. 2
figure 2

Grayscale processing

In order to distinguish the iced conductor from the background, this paper uses image enhancement technology to process the grayscale iced image. The results are shown in Fig. 3, in which Fig. 3a is the result of grayscale, and Fig. 3b is the result of image enhancement. As can be seen from Fig. 3, the gray level of the grayscale image is relatively concentrated, and it is not easy to distinguish the ice-covered wire from the background. After image enhancement, the pixel brightness value of the image is high or low, which makes the ice-covered wire image more easily distinguishable.

Fig. 3
figure 3

Image enhancement processing

Although image enhancement can improve image quality, it will also increase image noise. Noise will bring errors to the subsequent feature information and affect the classification effect. Therefore, it is necessary to denoise the image after image processing. In this paper, salt-and-pepper noise is added to simulate denoising. The denoising results are shown in Fig. 4. Figure 4a is a graph thinking containing salt-and-pepper noise. Figure 4b is the result graph of median filter processing. It can be seen from Fig. 4 that median filtering can effectively filter noise and improve image. In addition, the median filtering method can improve the blurring of image details caused by linear filtering method to a certain extent, and it does not need image statistical features in calculation, which is relatively more convenient.

Fig. 4
figure 4

Median filter processing

In order to improve the classification effect, this paper designs a hybrid model combining CNN and SVM. In order to validate the classification effect of the hybrid model, the experiments of the non-hybrid model and the hybrid model for ice-covered image classification are carried out to verify that the proposed hybrid model has better classification effect. The two models adopt the same CNN structure.

Firstly, the non-mixed model is classified by the convolutional neural network. Finally, the softmax is used to classify the non-mixed model. The experimental data are shown in Table 2, and the results are shown in Fig. 5. From the experimental results in Table 2, we can find that from the first iteration to the tenth iteration, the accuracy of training set and test set increases with the number of iterations, but the accuracy of test set is far less than that of training set, basically less than 10%. After 10 iterations, the classification accuracy on the training set can reach 95.1% and that on the test set can only reach 84.1%.

Table 2 Classification results of non-mixed models
Fig. 5
figure 5

Result diagram of unmixed model classification experiment

Then, the hybrid model is classified by experiments. The hybrid model is CNN. Finally, SVM classifier is used to classify the hybrid model. The experimental results are shown in Table 3, and the results are shown in Fig. 6. From the experimental results, it can be seen that after 10 iterations, the classification accuracy on the training set can reach 98.8%, and the classification accuracy on the test set can reach 93.2%.

Table 3 Classification results of mixed models
Fig. 6
figure 6

Experimental results of mixed model classification

In order to better compare the performance of the non-mixed model and the mixed model, a comparison chart of classification accuracy between the two models is drawn as shown in Fig. 7. In the chart, CNN is used to represent the non-mixed model, and CNN + SVM is used to represent the mixed model. From Fig. 7, it can be seen that the hybrid model is superior to the simple convolution neural network in the classification of ice images. Combined with Table 2 and Table 3 analysis, it can be concluded that the classification accuracy of hybrid model training set is improved by 3.7% and that of test set is improved by 9.1% compared with that of simple convolution neural network classification.

Fig. 7
figure 7

Comparison of classification performance between CNN and hybrid models

5 Conclusions

Nowadays, electric energy has become an indispensable resource, and the power grid is the carrier of electric energy transmission. When the power grid is affected by icing, it will inevitably affect the use of electricity by citizens and cause serious property losses. Power grid icing has become a serious threat to power grid reliability and safe operation. In order to better detect the icing situation of power grid, based on the good performance of convolution neural network, this paper applies it to the icing detection of power grid. A classification method of icing detection image of power grid based on convolution neural network is proposed, which can effectively classify and recognize the icing image of power grid. Moreover, in order to improve the classification effect of power grid icing image, a hybrid classification model combining convolution neural network and SVM is proposed in this paper. In the simulation experiment, the image preprocessing of icing image is carried out, and the results of image processing such as grayscale, image enhancement, and image denoising are analyzed. Then, the feature information is extracted by CNN, and the icing image is classified by the traditional softmax classifier and the SVM classifier, and the corresponding classification performance is analyzed and compared. Using softmax for classification, after 10 iterations, the classification accuracy rate on the training set can reach 95.1%, and the classification accuracy rate on the test set can reach 84.1%. Using SVM classifier for classification, after 10 iterations, the classification accuracy rate on the training set can reach 98.8%, and the classification accuracy rate on the test set can reach 93.2%. Finally, it is shown that the proposed classification method based on convolution neural network is effective, and the SVM is used to replace the softmax layer of the convolution neural network, which can improve the classification effect of the icing detection image.