Service Scheduling Based on Edge Computing for Power Distribution IoT

: With the growing amounts of multi-micro grids, electric vehicles, smart home, smart cities connected to the Power Distribution Internet of Things (PD-IoT) system, greater computing resource and communication bandwidth are required for power distribution. It probably leads to extreme service delay and data congestion when a large number of data and business occur in emergence. This paper presents a service scheduling method based on edge computing to balance the business load of PD-IoT. The architecture, components and functional requirements of the PD-IoT with edge computing platform are proposed. Then, the structure of the service scheduling system is presented. Further, a novel load balancing strategy and ant colony algorithm are investigated in the service scheduling method. The validity of the method is evaluated by simulation tests. Results indicate that the mean load balancing ratio is reduced by 99.16% and the optimized offloading links can be acquired within 1.8 iterations. Computing load of the nodes in edge computing platform can be effectively balanced through the service scheduling.


Introduction
PD-IoT is a new type of power distribution network based on the integration of traditional power industry technology and the new generation information technologies, such as Internet of Things (IoT), cloud, big data analysis and artificial intelligence, Lü et al. [Lü, Luan, Liu et al. (2018)]. By incorporating the powerful sensing capability, various communication methods, big data analysis, and machine learning, PD-IoT provides a platform with built-in panoramic awareness of the distribution network, efficient and flexible data management tools, and agile software-defined applications development. With the vast access of new types of energy and loads, such as the distributed energy resource, multi-micro grids, electric vehicle charging stations, smart home, etc., the distribution network has become a bidirectional energy node [Haider, See and Elmenreich (2016) ;Chakraborty, Iu and Lu (2015); Yu, Zhong, Xie et al. (2016)]. As a result, quantity of data and business for power distribution skyrocket, and the power distribution is urgently needing a higher service quality, lower time-delay and stronger interactivity [Primadianto and Lu (2017); Dehghanpour, Wang, Wang et al. (2019)]. The centralized cloud computing model is faced with the challenge of higher computing, storage and bandwidth demands [Yaghmaee, Leon-Garcia and Moghaddassian (2018); Bera, Misra and Rodrigues (2015)]. In order to alleviate the processing pressure and eliminate the bottleneck of computing and communication for the centralized cloud model, edge computing is introduced [Li, Ota and Dong (2018); Satyanarayanan (2017)]. Edge computing is a distributed computing paradigm, which manages the massive grid data from grid devices and sends the key results to the cloud. It expends the scope and ability of data collection and management for the cloud. Meanwhile, since the edge computing is displaced near the data source, the load of communication between grid device and cloud is reduced, especially for the large-scale data, such as the video data, warning message, etc. [Liu, Yang, Jiang et al. (2019);Shi, Cao, Zhang et al. (2016)]. Due to the limited physical computation ability of single computing node, the computing and storage capacity may not achieve the demand of real-time processing faced to some instantaneous grid failures or abnormal fluctuation. It is a potential safety hazard for power distribution. In this case, good network structure and efficient offload strategy are essential [Ruan, Liu, Qiu et al. (2018)]. Previous studies about service scheduling is mainly focused on a certain problem, without considering the diversity of multiple tasks and loads of the edge computing platform in smart grid network. For example, min-min algorithm is used to assign the service to a node with the shortest execution time [Moggridge, Helian, Sun et al. (2017)]. It pursues to finish the tasks as soon as possible and does not consider the load situation of the receiving node, which may cause the unbalance and reduce the resource utilization. Martino et al. [Martino and Mililotti (2004)] proposes a service scheduling method with genetic algorithm, the main idea is using First Come First Service rule to rank the order of tasks in the queue. However, this rule has the disadvantage of poor fairness. Round Robin method is another classic algorithm with polling the nodes [Ghomi, Rahmani and Qader (2017)], however it may affect the performance of CPU due to the frequent changes. This paper presents a service scheduling method based on edge computing for the PD-IoT. Architecture of the PD-IoT and structure of the service scheduling system are designed. A novel load balancing strategy and ant colony algorithm are embedded in the offload method. The validity is simulated.

Architecture design 2.1 Architecture design of PD-IoT
Architecture of the PD-IoT with edge computing platform is depicted in Fig. 1, which is a four-tier cloud-network-edge-terminal model with global security and communication protocol system. The "terminal" provides the awareness of a PD-IoT system. It is responsible for providing the operating status, electrical status, environmental status, and other auxiliary information of the distribution network to the "edge" or the "cloud". It is also responsible for executing grid commands and controls. The PD-IoT terminals include multi-micro grids, charging piles, residential or industrial equipment, various electrical sensors and environmental sensing units, et al. Part of the terminals have some computation capacity. PD-IoT terminals should support the standardization of the services, plug-and-play, interconnections between devices, and security. Cloud: The "cloud" is the master platform, which adopts technologies such as cloud computing, big data analysis, and machine learning. Such a cloud platform provides a full migration path for various distribution management services using the micro-services architecture. The PD-IoT cloud includes the infrastructure as a service (IaaS) layer, the platform as a service (PaaS) layer, and the software as a service (SaaS) layer [Kavis (2014)], which aims to serve as a platform solution for PD-IoT systems. Meanwhile, the PD-IoT cloud should decouple software applications from the underlying hardware, applications from data, and serve to meet massive terminal equipment connections, dynamic resource allocation, and future business needs.

Backbone network
Network security

Edge:
The "edge" is a distributed intelligent agent close to the data source. It is an extension of the PD-IoT cloud. Remote terminal unit is a typical edge device in power distribution. In this paper, the edge means the edge computing platform, which is composed of the edge device and all of the intelligent PD-IoT terminals which have computation capacity (named as computing nodes). The edge computing platform virtualizes the computing nodes to form computation, data storage, and network resource pools with flexible computing, storage scalability, dynamic load balancing ability. The PD-IoT edge should support agile software defined App development and possible fast deployment to support evolving distribution applications.

Structure of edge computing platform design
The structure of the service scheduling system is shown in Fig. 3. The computing, storage of the edge and terminals are virtualized as computing resource pool and storage resource pool, which are distributed and scheduled according to the task management (includes task monitoring, task scheduling and task computing). In normal state, the edge and terminals work in coordination according to the established allocation. Once the fault state occurs, the amount of information and calculation will increase suddenly. If the computing load of a node surpass the overload line, the node will send a requirement to the edge computing platform for a service scheduling collaboration. The platform selects the optimal service receiving computing node and the shortest transfer link according to the load balancing strategy in order to reduce the time-delay and improve the efficiency of edge computing platform.

.1 Flow chart of service scheduling
The flow chart of the service scheduling method is shown in Fig. 4. Once a service is issued from a computing node, the node determines that, whether its own load exceeds the high threshold after receiving the task. If not, the service could be accepted and the state of load is updated. Otherwise, the system should select the optimal low-load node that could receive the request based on the load balancing strategy and the shortest transfer link based on ant colony algorithm. The chosen one accepts the service and update its load state. This service scheduling can be used to avoid the overload of computing nodes and provide real-time response to the service requisitions.

Receiver selection: load balancing strategy design
A strategy of load balancing for multi-nodes and loads in PD-IoT is designed here. The calculation resources and load state of each computing node in the edge computing platform are quantified by percentage (from 0% to 100%) according to its computation capacity. Each computing node has its own thresholds of full-load, high-load and normalload (marked as F-threshold, H-threshold, and N-threshold), and has three load states: low-load state (lower than N-threshold), normal-load state (between N-threshold and Hthreshold), and high-load state (higher than H-threshold). According the Locality of Reference [Denning (2006)], the nodes with higher load states would continue to receive a large amount of information and service in the following period of time. In view of this, the load balancing strategy should offload the service from the nodes with high-load states as much as possible. The purpose is that the original nodes with high-load states enable to become the nodes with low-load states, while other nodes stays out of the highload state. The detailed strategy is listed as follows: 1) Select the nodes with high-load states (recorded as node group A) and sort them in descending order of load. The strategy would transfer the heaviest load of the rest. The total loads which surpass the H-threshold of the node group A is marked as X1 (the first grade offloading service), and the total loads between N-threshold and Hthreshold of node group A is noted as X2 (the second grade offloading service); 2) Select the nodes with low-load states (recorded as node group B) and arrange them in ascending order according to the load. The strategy would choose the lightest node to receive the service at first. The total margin load for H-threshold of node group B is Y1 (the first grade margin load) and the total margin load between the H-threshold and F-threshold is Y3 (the third grade margin load); 3) Select the nodes with normal states (recorded as node group C) and sort them in ascending order according to the load. The strategy would choose the lightest node to receive the service at first. The total margin load for H-threshold of node group C is Y2 (the second grade margin load); 4) Determine the magnitude of X1, X2 and Y1, Y2, Y3, then chose the transition state.

Transmission link selection: ant colony algorithm design
When the offloading service and the receiver node are selected, the optimal transmission link should be chosen. The transmission links between two computing nodes in edge networks are multiple. The transfer speed, attenuation rate, noise resistance and transmission success rate are influenced by the media of channel, bandwidth, physical distance and the number of communication nodes. If these mentioned elements are taken as the weight of the link, this problem could be simplified to a shortest path optimization problem with weighted undirected graph. Traditional path planning algorithms, such as Dijkstra algorithm and A* algorithm, are simple to operate, but not suitable for large-scale and complex real-world problems. Moreover, they cannot meet the requirements of time hysteresis. In view of this problem, ant colony algorithm (ACA) is selected to choose the optimal transmission links. ACA is a heuristic algorithm for simulating the foraging behavior of real ant colonies. The key point of this behavior is the indirect communication between ants by means of chemical pheromone trails [Blum (2005)]. At the beginning of searching for foods, ants explore the paths in a random manner. Then they leave a chemical pheromone trail on the ground while moving. Other ants can smell it and tend to choose the paths marked by strong pheromone concentrations. The shorter the path is, the more ants can return in unit time. Thus more pheromone can be left. The dense pheromone will attract even more ants as a positive feedback. After iterations, every ant will choose the shortest path. The corresponding algorithm flow chart is shown in Fig. 5.

.1 Receiver selection simulation
Suppose that the service scheduling system has a total of 50 computing nodes. The load states of these nodes were with random values between 5%-85%. The F-threshold, Hthreshold, and N-threshold of each computing node were set as random numbers between 95%-98%, 65-75% and 30%-40%, respectively. Based on the novel load balancing strategy, simulation result of the load balancing is presented in Fig. 6. As can be seen from Fig. 6, a total of 10 computing nodes are with high-load states before load balancing. After the load balancing, all of the computing nodes in this edge computing platform are in normal-load or low-load states. The loads of nodes with highload are efficiently transferred, the load balancing ratio is 100%. In order to avoid the coincidence of a single test, 100 times of repeated experiments utilizing the load balancing strategy were simulated. The F-threshold, H-threshold, and N-threshold of these 50 computing nodes were invariable in the 100 tests, which were identical to the values in the first single test in Fig. 6. To increase the initial loads of these nodes, the initial loads were set as the random values between 20%-90% in these repetitive tests. The simulation results are shown in Fig. 7. During these 100 times experiments, the nodes with high-load states were still existed occurred in 4 times tests using the load balancing. We can find that these cases were happened in the conditions that the initial numbers of nodes with high-load states, before load balancing, were relatively higher. The mean number of the nodes with high load is 14.23 before the load balancing, but it can be reduced to 0.12 using the load balancing strategy. The mean load balancing ratio is 99.16%.

Transmission link selection simulation
Suppose that the links from the computing node to be unloaded (denoted as node A) and the receiving node (denoted as node O) involves 15 nodes (denoted as node A-O). Connections between the nodes represents the transmission links (25 links in total), and the numbers on the lines show the weights. The smaller the weight is, the better the link is. In this simulation, the weights were generated by random sampling from 1 to 10. The main experimental parameters of ant colony algorithm are listed in Tab. 1.  Since the pheromone concentrations of each link are equal at the beginning, the first selection of route in the first iteration is only related to the probability of the path which is inversely proportional to the weights. In order to avoid falling into local optimum, it is necessary to ensure that there are enough ants choosing different paths initially. The topology of links between the nodes A and O and the simulation results using the ACA is shown in the Fig. 8. The highlighted transmission link, chosen by ACA, involves 7 nodes (nodes A-B-C-D-E-F-O) and the total weights of this link is 23. It is the best transmission link from node A to node O. The results prove that ACA is an effective method in link selection.  Fig. 9. The abscissa of Fig. 9 indicates the number of trials and the ordinate represents the number of iterations when the optimal transmission link was found. It can be seen that the optima can be found within 5 iterations in most of the time, and the average iteration number is 1.8.

Conclusions
A service scheduling method based edge computing platform for PD-IoT is proposed in this paper. The architecture of the PD-IoT with edge computing platform and the structure of the service scheduling system are designed. A novel load balancing strategy and ant colony algorithm are utilized in this service scheduling method. Simulation studies of this method have been conducted. Results demonstrate that the mean load balancing ratio can be reduced by 99.16% and optical transmission links can be found within 1.8 iterations. This means that the service scheduling method designed is efficient.