## 1 Introduction  
Today, the demand for grid communication services is increasing dramatically and the types of services are diversifying, and smart grids have become the main development trend and, ultimately, the strategic goal of the electric power system. Based on different application scenarios and demands of 5G, network slicing adopts technologies based on Software Defined Network (SDN) and Network Functions Virtualization (NFV) [1, 2]. Network slicing realizes an end-to-end network grouping communication function and provides the network resources required for the service through the orchestration operation of slicing. The characteristics of 5G network slicing technology are well suited to the performance requirements of a smart grid [3, 4]. Its three main features of large bandwidth, low latency, and large connectivity will provide better processing capabilities for various typical services in the smart grid. Network slicing provides differentiated grid communication services for different units on demand based on the working conditions and the service requirements that are needed to meet the carrying requirements of different types of grid communication services on network slicing [5]. At present, research combining grid communication services with 5G network slicing technology is being gradually enriched and put into use. In the electricity grid, cloud computing is now widely used [6]. But as the volume of data increases rapidly, there is a need for new ways of handling and storing those data [7]. The application of edge computing technology, which decentralises computing resources and distributes them closer to end devices, can better reduce network latency and costs [8]. Implementing edge computing through edge data centres enables more granular requirements for each edge node, resulting in more efficient resource utilisation [9]. Aiming at smart grid scenarios, edge data centres are well placed to improve resource management strategies [10; 11]. Ref. [12] proposes a prediction-based 5G network slicing algorithm that uses a prediction algorithm to pre-implement resource isolation and shorten the establishment cycle of network slicing in order to accommodate the real-time requirements of 5G networks. Based on different mathematical approaches, these models are classified into game theory-based models, predictive techniques, and robustness/failure recovery models. One study [13] introduces the application of 5G network slicing technology in smart grids and presents several typical case studies. Another study [14] illustrates the application of resource allocation algorithms for network slicing in smart grids. In the work of [15], according to the demand of power services, network slice planning strategies with different isolation abilities are proposed. Based on the management requirements of refined service in the power industry, the slice identification of the power service is then proposed. The work of [16] constructs a new grid data collection system based on cloud-edge collaboration, which solves the real-time processing and response problems of edge applications while reducing the bandwidth pressure of data communication between the cloud and the edge. These preliminary studies focus on slicing scheduling algorithms and resource allocation methods that seek to improve network efficiency. In such approaches, service requirements are often abstracted into relatively fixed latency or bandwidth requirements. If the traffic changes dynamically or has many types, before slicing resource allocation, service type identification and dynamic demand prediction are achieved in advance on the edge side to realize the collection of large amounts of data in the edge nodes and the preliminary processing and analysis. Then, enter the next layer of network transmission is entered to achieve a more efficient and reasonable resource allocation and carrying scheme for grid services in 5G network slicing, which can use resources efficiently.