## 4 Results and Discussion
### Classification of Grid Services Based on 1D CNN  
The data messages generated by power communication services have relatively fixed frame formats, and the characteristics of different types of electric power services are more obvious, which can be abstracted into 1 \(\times\) N pixel images, and then identified using CNN-based image algorithms. Based on 1D CNN, the data features of the traffic service are extracted and encoded in order to achieve power service identification and classification matching. The data collected from various types of power terminals first enter the input layer data, which is a 1 \(\times\) 1024 two-dimensional matrix after pre-processing. In the pre-processing of the data, the dataset used in the experiments are transformed into an input format with the same structure. This mainly consists of data encoding, normalisation processing, and array dimensionality reduction. The acquired data are used to convert them to integers according to the ASCII table and turn them into a 1 \(\times\) 1024 two-dimensional matrix. In the simulation, the tagged sample dataset obtained from packet capture in the operational network is used, with 146 service types in total and 100 sample service packet data for each class. Each sample service packet data intercepts the net data load of the application layer message and presents it in the form of a hexadecimal code stream. The data processing flow based on the CNN model is shown in Figure 5.  
The accuracy of the operational recognition is related to the training sample parameters, the convolutional layer parameters and the activation function. For the parameters of the convolutional layer, the value of the number of convolutional kernels, FILTER, was chosen to be adjusted. The corresponding accuracies for different filters is shown in Table 2. It can be seen that the best combination of parameters is the number of the FILTERs of 128 and 256, which are indicated by underline. Figure 5: Flow chart of data processing in CNN model. Figure 6 shows the results of the test set training tests with the best combination of parameters. It can be seen that the test accuracy increases and gradually stabilises as the number of epoch iterations increases over time. The accuracy of the test increases with the number of iterations and stabilizes at around 83%. The recognition accuracy can be further improved when the number of samples per class of service is increased, limited by the fact that the number of samples per class of service is only 100. Therefore, we obtained Table 3 by repartitioning the number of entries of training set and test set data for each type of data. It can be seen that as the number of training data entries within the dataset increases, the accuracy of the model is subsequently increased. \begin{table}
\begin{tabular}{c c c} \hline \hline  & **FILTER** & **Accuracy/\%** \\ \hline
128 & 256 & 82.72 \\
512 & 1024 & 82.68 \\
256 & 512 & 82.34 \\
64 & 128 & 81.42 \\
128 & 128 & 79.09 \\
256 & 256 & 77.93 \\
32 & 64 & 78.49 \\
64 & 64 & 77.32 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: The effect of the number of filters on accuracy. Figure 6: Accuracy of classification with the best combination of parameters. When applying this method to the power communication network, the training of the recognition model can be carried out centrally in the data centre, and the sample pool can be continuously updated and expanded to dynamically improve the accuracy of the model. The training results of the model can be loaded onto the smart gateway devices in the edge network stations or server rooms using the edge computing mode to automatically classify the services before they are adapted into 5G slices. The traffic types and characteristics of power communication networks are relatively stable and less diverse than those of ordinary communication networks. Therefore, in this type of traffic context, traffic identification can be carried out separately for different services within the grid area, which can improve the accuracy of the dataset identification.