## 1 Introduction
Communication networks are accelerating to become digitised and intelligent, and using AI technologies to enhance communication intelligence has become a development trend. To achieve this expectation, the network needs to have \"endogenous intelligence\", considering various artificial intelligence technologies at the beginning of the network design, such as deep learning algorithms, in order to form a perfect system architecture and enhance the network's \"intelligence capability\" [17]. For example, China Mobile's \"Tianyan\" system provides self-intelligence for many functions in the 5G core network. Compared to classical classification and recognition techniques, such as port recognition, deep message detection and recognition, and statistical feature recognition, neural network-based deep learning models can achieve higher accuracy rates while not relying on other experiences, and they can also handle tasks and data of higher complexity [18; 19]. The classic traffic prediction methods, such as time series models and regression models, also perform better with deep learning models, such as neural networks. Useful features can be learned directly from the raw data, improving the accuracy and efficiency of the model [20]. The models can be better adapted to real-world scenarios and provide higher-quality prediction results [21]. Therefore, this paper proposes a neural network-based approach for carrying smart grid communication networks in 5G network slicing, which can reduce the complexity of resource allocation in the next phase of network slicing. The main contributions of this paper are as follows:  
1. The hierarchical classification matching scheme was designed by matching the different communication demand for smart grid communication services, such as bandwidth, latency, and connectivity, with the characteristics of the 5G sliced network, where the traditional 5G network slices are divided into critical and general. 2. A scheme is proposed for combining edge computing in 5G slices in order to carry smart grid communication services. Different types of data generated by electric power terminal devices are received into the edge data centre for classification and matching, while the edge data centre performs dynamic prediction of the service traffic data in the network slice. 3. In order to adapt to the development trend of intelligence, the neural network model is used for classification matching and traffic prediction. The 1D CNN is used to extract the data features of traffic services and encode the data in order to achieve classification and matching of smart grid communication services. At the same time, with the proliferation of grid communication network traffic, the complexity of the services carried by the network has increased greatly. If a fixed rationing model is adopted, excessive network resources are often required, which is not conducive to improving network efficiency and expanding the network scale. This paper also uses BILSTM work for dynamic traffic prediction and adjustment. 4. The experimental results show that the neural network model used can show better results in classifying the power communication network and in predicting the network traffic, which is suitable for the 5G slicing network carrying the electric power communication network. The rest of the paper is organized as follows. Section 2 describes the system mechanism. Section 3 illustrates the algorithm model. Section 4 implements the experimental simulations. Finally, Section 5 gives the conclusions.