# ACPEC: A Resource Management Scheme Based on Ant Colony Algorithm for Power Edge Computing

Authors: Zhu Liu; Xuesong Qiu; Nan Zhang
Journal: Security and Communication Networks
 (2021)

---

## Abstract

With the development of power IoTs (Internet of Things) technology, more and more intelligent devices access the network. Cloud computing is used to provide the resource storage and task computing services for power network. However, there are many problems with traditional cloud computing such as the long-time delay and resource bottleneck. Therefore, in this paper, a two-level resource management scheme is put forward based on the idea of edge computing. Furthermore, a new task scheduling algorithm is presented based on the ant colony algorithm, which realized the resource sharing and dynamic scheduling. The data of simulation show that this algorithm has a good effect on the performance of task execution time, power consumption, and so on.


---

## Body

## 1. Background

With the rapid development of smart grid, plenty of power equipment accesses into the Internet. The demand for power services shows exponential growth trend. For cloud computing technology, it not only can provide computing service but also has many advantages such as scalability, flexibility, and security [1].Cloud computing can provide technical support and theoretical support for power design, data storage, disaster recovery, intelligent power consumption, and power grid simulation analysis system. Furthermore, cloud data center can integrate and manage the data and resources coming from different business systems in power grid uniformly, and these data and resources are the basic of resource sharing for smart grid. However, the total cost of a cloud will increase when the scale decreases, as shown in a survey of Microsoft [2]. Though the computational resource in the edge node is generally limited and the resource in the remote cloud is abundant [3], the resource features between edge cloud and the remote are different.Edge computing can reduce the distance between user demand and computing servers [4, 5]. With edge computing, not only the computation latency of these tasks can be shortened but also the requirements of users on computation capability and power supply can be reduced [6]. Therefore, the computation tasks especially the latency-sensitive ones can be uploaded to edge nodes. The computation task can be received and executed locally, and the computation result can be sent to the users directly [7].Heterogeneous cloud is suggested to better serve users with different Quality of Service (QoS) requirements [8]. Furthermore, to some computation-intensive tasks, tasks need to be divided into some subtasks and be executed by resource cooperation. In this paper, a new two-level resource management scheme is proposed based on edge computing. For the new resource management scheme, the computing tasks can be executed in local nodes, and the time delay can be decreased compared with cloud computing. Furthermore, according to the characteristic of edge computing, we present a task allocation algorithm based on the ant colony algorithm in this paper. The resources of the local edge nodes can be used for providing computation-intensive tasks by resource sharing and cooperation.


## 2. Related Work

A rational resource management and task assignment scheme is very important to ensure the efficiency and stability of the power cloud computing system. There are many researchers who studied the resource management of cloud computing [9, 10]. For the resource management schemes on saving energy consumption, the authors in [11] proposed a new method to reduce the power consumption by decreasing the processor speed. The balance of load is considered in [12] and realized by effective virtual machine migration strategy; Furthermore, the authors proposed a new scheme for intelligent load migration and resource allocation by machine learning. For the resource management schemes of increasing resource utilization, the authors in [13] designed a two-level resource scheduling scheme and realized a new resource allocation algorithm by the heuristic algorithm. Furthermore, the authors in [14] proposed a new resource scheduling procedure which can realize a real-time vehicle cloud service. The authors in [15] proposed a QoS-based mobile cloud resource scheduling algorithm, which can minimize the communication and computing consumption. In addition, the genetic algorithm has also been used for saving energy consumption resource scheduling in [16, 17]. Furthermore, based on NOMA technology, the authors in [18, 19] introduced the resource allocation methods for cluster-based cognitive industrial and multibeam satellite industrial.For edge computing, one main service requirement is to have a low service delay, which would be the output of its request, i.e., the time it takes for the user to receive its results [20]. The authors of [21] proposed that the problem of time delay can be addressed by executing task applications on resource providers external to the edge device. In addition, to control the data transmission of computation tasks effectively according to the channel information, a delay-optimal problem is studied through adopting a Markov decision process approach [22]. The authors in [23] proposed an effective computation offloading strategy and investigated a green edge computing system with rechargeable devices. Furthermore, the authors in [24, 25] considered the balance between the cost of the system and the mean offloading delay, which studied the workload sharing between the edge and the remote cloud. For communication elements, one existing technique called access point scheduling is considered, in [26, 27], which can associate the user and the closest cloudlet in order to minimize transmission distance and improve signal quality and propagation time. In addition, in [28, 29], transmission power control is proposed where the transmission power of the cloudlets is carefully set with the final goal of lowering the latency. The authors in [30, 31] considered to provide fair services by allocating the available resources, such as channel bandwidth.For the optimization of the QoS in the edge computing system, there are many research studies. The authors in [32] considered the joint optimization of radio and computational resources to minimize the overall energy consumption of mobile users in edge computing. To minimize the total energy consumption of users, the authors proposed an algorithm for uplink and downlink beamforming and computational resource allocation [33]. In [34], the authors derived the optimal radio and computational resource allocation policy considering the scenario of TDMA networks. The authors in [35] designed a task offloading algorithm to study the energy-delay tradeoff in edge computing.Such computing paradigm, called edge computing, has drawn extensive attention from both academy and industry [36, 37]. With the help of edge computing, application tasks running on the devices can be offloaded to the edge servers in edge computing to get better service. Generally speaking, the computing resources at the edge computing system are still limited compared with remote cloud data centers. Therefore, an edge computing is customarily backed by a remote back-end cloud via the Internet [38].To a certain extent, above research studies solve some resource management problems. However, for the problem of the resource management power information system, there is not much research in the existing literature. Therefore, in this paper, a power resource management scheme based on edge computing is studied.


## 3. The Power Resource Management Scheme Based on Edge Computing

With the rapid development of cloud computing, more and more intelligent terminals access into the network. For traditional cloud computing, computing resource and storage resource are in the cloud data center and all tasks will be transferred to the cloud. For the power network, the power equipment includes a large amount of data information. Therefore, in power network, resource bottleneck of traditional cloud computing cannot be avoided, and the real-time performance cannot be ensured.In the edge of power network, there are a lot of devices which include considerable resources. If the resources of these devices can be used for providing computing services, the computing energy of data center can be effectively supplemented [39]. In this paper, a new power cloud resource management scheme based on edge computing is proposed. In this scheme, some computing tasks in cloud servers will be sank to the edge devices, and the local computing tasks will also be performed in local edge devices.In the new resource management scheme, as shown in Figure1, there are two-level computing nodes: the first level includes the analysis control nodes which are in the cloud servers and the second level includes computing nodes which are in the edge devices. The first-level nodes are used to perform computation-intensive tasks and manage the second-level nodes, and the second-level nodes are used to perform local computational tasks. The resources in second-level nodes should be subjected to the scheduling of the first-level nodes. The application scenarios of this new resource management scheme can be the power supply service command system and big data platform, the hot spot location, and so on. And the task requirement of this new resource management scheme can be fault diagnosis, protective relaying, intelligent patrol, line loss computation, and so on.Figure 1
The resource management scheme based on edge computing for smart grid.In this resource management scheme, the resource in the second-level nodes is limited and some tasks will be divided into many subtasks and be assigned to different edge nodes. The tasks will be executed by resources sharing and node cooperation.In this paper, we consider an actual application scenario. As shown in Figure2, this area represents a distribution power supply area, which includes many transformers, some intelligent terminals, and some users. In this situation, the intelligent terminals are set as the edge nodes to provide task computing services.Figure 2
Edge computing application of the power supply area.


## 4. The Task Scheduling Method Based on Ant Colony Algorithm

The ant colony algorithm is an intelligent optimization algorithm, which is an optimization process for solving complex problems. The ant colony algorithm can be used for resolving resource allocation problem. In the paper, the edge nodes are always resource-limited to execute a computation-intensive task alone. Therefore, the computation-intensive tasks will be divided into many subtasks and be allocated on many different edge nodes. In this paper, we presented a new tasks allocation algorithm based on the ant colony algorithm to allocate appropriate resources for subtasks.


### 4.1. Introduction of Ant Colony Algorithm

The ant colony algorithm is a novel simulated evolvement algorithm solving complicated combinatorial optimization problem, and its typical feature is swarm intelligence. For the ant colony algorithm, a colony consisting of many ants is considered to perform a highly complex task that an ant alone cannot accomplish. The ant regulates their behavior through collaboration and information exchange. For the ant colony algorithm, pheromones play a very important role, which can help ants judge the next direction of transfer by sensing the presence and concentration of pheromones.The ant colony algorithm is a random search algorithm evolved from the behavior of ants foraging. In the process of simulating ant foraging, positive feedback and distributed cooperation are mainly used to find the optimal path. There are some characteristics in the behaviors of ant foraging shown as follows: firstly, the pheromone concentration along the path will change over time and the ant will choose the path according to the pheromone concentration of different paths. Secondly, to avoid the process of path choosing getting trapped in local optimality, the paths that have already been chosen before will not be allowed to be selected again. Thirdly, the pheromone of paths will decrease over time, and the length of the path will affect pheromone concentration.


### 4.2. The Detailed Design of Task Scheduling Algorithm

Recently, the task scale in power network increases rapidly, so the issue of task resource scheduling is increasingly complex. However, the rational scheduling among resources and tasks is very important for increasing the resource utilization and task completion rate.For the resource management scheme proposed in this paper, the resources in the edge nodes are limited to complete some computation-intensive tasks along. The computation-intensive tasks will be often divided into some subtasks and be assigned to different edge nodes. Therefore, it is a very key issue that how to assign the tasks among the different edge nodes, which will be solved in this section.The ant colony algorithm is an intelligent optimization algorithm, which is used to solve complicated combinatorial optimization problem. For the ant colony algorithm, distributed computing is relatively easy to implement and it is easy to merge with other algorithms to become a new algorithm. Because of these advantages, the ant colony algorithm will usually be applied to resolve resource-task scheduling and optimization problem.For example, in [40], a task scheduling algorithm is proposed, named “DSFACO,” which is assigned to decrease the execution time for several tasks on the same scheduling queue. This algorithm improves the running efficiency of virtual machine resources.In the second-level nodes, the computation-intensive tasks will be usually divided into many subtasks and the edge nodes will complete the tasks by cooperation with each other. Therefore, in this paper, the ant colony algorithm is considered to realize the resource sharing among the edge nodes.


#### 4.2.1. Mathematical Model

For the ant colony algorithm, some parameters are introduced in Table1. Furthermore, in this section, we introduced the computational model for pheromones, the update model for pheromones, and the state transition probability model of nodes.Table 1
Parameters.
NameIntroductionnNumber of computing nodesmNumber of tasknNumber of resource nodesTabukTabu table of antkΔPhiPheromone increment in nodeiΔPhikPheromone increment when antk assigns task to node iPijktTransfer probability when antk transfers from node i to node j at time tdijDistance between nodei and nodejθijHeuristic factor, the inspired degree fromi to jδPheromone persistence (the residual coefficient),0<ρ<1τiPheromones in nodei(1) Computational Model for Pheromones. In this model, the pheromone of resource node can be calculated by its attribute values. Some attributes are considered: CPU utilization, power consumption, memory utilization, external storage utilization, and node security. In this paper, the pheromone of a resource node can be calculated as follows:(1)Phit=∂1∗Phicut+∂2∗Phipct+∂3∗Phimut+∂4∗Phisut+∂5∗Phinst,where ∂1, ∂2, ∂3, ∂4, and ∂5 represent the important degree of resource attributes on node pheromones. In addition, Phicut, Phipct, Phimut, Phisut, and Phinst represent the CPU utilization, power consumption, memory utilization, external storage utilization, and node security grade of node i after normalization. At the beginning, τi0=C. Furthermore, the power consumption of edge node i can be expressed as follows:(2)Phipct=PCnoi+∑j=1nfi,jfimax2PCmaxi−PCnoi,where PCnoi is the power consumption when there is no task assigned on this edge node. PCmaxi is the power consumption when this edge node is full load. fi,j is the processing speed of task i on edge node j. fimax is the max value of processing speed.To resign a unified computing method of node pheromone, the values of attribute are normalized before being integrated. Therefore, the SAW (simple additive weighting) technology is used in this paper [41]. The attributes are divided into two categories: the first kind of attribute values is positively correlated with node pheromones, which means that the value of node pheromones will increase with the value of attribute, such as node security grade; the second kind of attribute values is negatively correlated with node pheromones, which means that the value of node pheromones will decrease with the value of attribute, such as CPU utilization, power consumption, memory utilization, and external storage utilization. The normalization process of the first kind of attribute can be expressed as formula (2), and the normalization process of the second kind of attribute can be expressed as formula (3). Furthermore, lx+Phix and lx−Phix represent the normalized value of x-th attribute. On the contrary, pxPhix represents the initial value before normalization. In addition, maxpx and minpx represent the maximum value and the minimum value of x-th attribute.(3)lx+Phix=pxPhix−minpxmaxpx−minpx,maxpx−minpx≠0,1,maxpx−minpx=0,(4)lx−Phix=maxpx−pxPhixmaxpx−minpx,maxpx−minpx≠0,1,maxpx−minpx=0.(2) Update Model for Pheromones. In the ant colony algorithm, effective nodes are those useful nodes searched by the ant, and the effective nodes are used to perform computational tasks. In this paper, the effective node is defined as a node whose pheromone is not less than a certain threshold after being assigned tasks. When a node is assigned tasks, its CPU utilization, memory utilization, and external storage utilization will increase. Therefore, to ensure the load balance of each resource node, the node pheromone should be decreased whose resource utilizations are relatively high. In that case, the nodes whose resource utilizations are high will have lower probability to be assigned tasks. Therefore, the pheromone update model can be expressed as follows:(5)Phit+n=1−δPhit−ΔPhi,where δ is the pheromone persistence coefficient, that is, the affect degree of existing pheromone to pheromone update process. In addition, when node i is assigned task, the probability it will be assigned tasks next time can be changed, so ΔPhik is the pheromone variation to node i when it is assigned tasks by ant k, and ΔPhi=∑k=1mΔPhik is the sum of pheromone affect. The pheromone incremental effect of task i when it is assigned task k can be expressed as follows:(6)ΔPhik=ΔPhik,cut+ΔPhik,pct+ΔPhik,mut+ΔPhik,sut+ΔPhik,nst.(3) Probability Model for State Transition. When selecting the next transition node, ants always tend to choose the neighbor node with the highest transfer probability. The transfer probability calculation formula can be expressed by(7)pijkt=Phijtλθijtχ∑S∈jkiPhijtλθijtχ,ifj∈jki,0,else,wherer λ is the importance degree of pheromones and χ is the importance degree of heuristic factor. In addition, jki is the node set which can be selected in next step for ant k. Heuristic factor θij can be calculated as follows:(8)θijt=1dij,where dij means the distance of node i and node j. When ant k selects the next transfer node, the smaller dij is, the less the communication cost between node i and node j is, and the bigger probability that node j is selected as the next transfer node. In addition, θijt is expectation level of ant k moving from node i to node j.


#### 4.2.2. Algorithm Flow

In this section, we will introduce the specific flow of the proposed resource management algorithm. The specific flow is shown in Figure3.(1)
The node pheromone is initialized.(2)
The ants are placed, and the timer is started.(3)
The ant will select the next transfer node according to the state transition probability and determine whether that node is a valid node. If the selected node is a valid node, the node information will be recorded and returned; if the selected node is not the valid node, the ant will continue to choose the next transfer node and determine if it is a valid node.(4)
The tasks are assigned for the valid nodes, and the node pheromone is updated.(5)
The timer ends.Figure 3
The task scheduling algorithm based on the ant colony algorithm.


## 4.1. Introduction of Ant Colony Algorithm

The ant colony algorithm is a novel simulated evolvement algorithm solving complicated combinatorial optimization problem, and its typical feature is swarm intelligence. For the ant colony algorithm, a colony consisting of many ants is considered to perform a highly complex task that an ant alone cannot accomplish. The ant regulates their behavior through collaboration and information exchange. For the ant colony algorithm, pheromones play a very important role, which can help ants judge the next direction of transfer by sensing the presence and concentration of pheromones.The ant colony algorithm is a random search algorithm evolved from the behavior of ants foraging. In the process of simulating ant foraging, positive feedback and distributed cooperation are mainly used to find the optimal path. There are some characteristics in the behaviors of ant foraging shown as follows: firstly, the pheromone concentration along the path will change over time and the ant will choose the path according to the pheromone concentration of different paths. Secondly, to avoid the process of path choosing getting trapped in local optimality, the paths that have already been chosen before will not be allowed to be selected again. Thirdly, the pheromone of paths will decrease over time, and the length of the path will affect pheromone concentration.


## 4.2. The Detailed Design of Task Scheduling Algorithm

Recently, the task scale in power network increases rapidly, so the issue of task resource scheduling is increasingly complex. However, the rational scheduling among resources and tasks is very important for increasing the resource utilization and task completion rate.For the resource management scheme proposed in this paper, the resources in the edge nodes are limited to complete some computation-intensive tasks along. The computation-intensive tasks will be often divided into some subtasks and be assigned to different edge nodes. Therefore, it is a very key issue that how to assign the tasks among the different edge nodes, which will be solved in this section.The ant colony algorithm is an intelligent optimization algorithm, which is used to solve complicated combinatorial optimization problem. For the ant colony algorithm, distributed computing is relatively easy to implement and it is easy to merge with other algorithms to become a new algorithm. Because of these advantages, the ant colony algorithm will usually be applied to resolve resource-task scheduling and optimization problem.For example, in [40], a task scheduling algorithm is proposed, named “DSFACO,” which is assigned to decrease the execution time for several tasks on the same scheduling queue. This algorithm improves the running efficiency of virtual machine resources.In the second-level nodes, the computation-intensive tasks will be usually divided into many subtasks and the edge nodes will complete the tasks by cooperation with each other. Therefore, in this paper, the ant colony algorithm is considered to realize the resource sharing among the edge nodes.


### 4.2.1. Mathematical Model

For the ant colony algorithm, some parameters are introduced in Table1. Furthermore, in this section, we introduced the computational model for pheromones, the update model for pheromones, and the state transition probability model of nodes.Table 1
Parameters.
NameIntroductionnNumber of computing nodesmNumber of tasknNumber of resource nodesTabukTabu table of antkΔPhiPheromone increment in nodeiΔPhikPheromone increment when antk assigns task to node iPijktTransfer probability when antk transfers from node i to node j at time tdijDistance between nodei and nodejθijHeuristic factor, the inspired degree fromi to jδPheromone persistence (the residual coefficient),0<ρ<1τiPheromones in nodei(1) Computational Model for Pheromones. In this model, the pheromone of resource node can be calculated by its attribute values. Some attributes are considered: CPU utilization, power consumption, memory utilization, external storage utilization, and node security. In this paper, the pheromone of a resource node can be calculated as follows:(1)Phit=∂1∗Phicut+∂2∗Phipct+∂3∗Phimut+∂4∗Phisut+∂5∗Phinst,where ∂1, ∂2, ∂3, ∂4, and ∂5 represent the important degree of resource attributes on node pheromones. In addition, Phicut, Phipct, Phimut, Phisut, and Phinst represent the CPU utilization, power consumption, memory utilization, external storage utilization, and node security grade of node i after normalization. At the beginning, τi0=C. Furthermore, the power consumption of edge node i can be expressed as follows:(2)Phipct=PCnoi+∑j=1nfi,jfimax2PCmaxi−PCnoi,where PCnoi is the power consumption when there is no task assigned on this edge node. PCmaxi is the power consumption when this edge node is full load. fi,j is the processing speed of task i on edge node j. fimax is the max value of processing speed.To resign a unified computing method of node pheromone, the values of attribute are normalized before being integrated. Therefore, the SAW (simple additive weighting) technology is used in this paper [41]. The attributes are divided into two categories: the first kind of attribute values is positively correlated with node pheromones, which means that the value of node pheromones will increase with the value of attribute, such as node security grade; the second kind of attribute values is negatively correlated with node pheromones, which means that the value of node pheromones will decrease with the value of attribute, such as CPU utilization, power consumption, memory utilization, and external storage utilization. The normalization process of the first kind of attribute can be expressed as formula (2), and the normalization process of the second kind of attribute can be expressed as formula (3). Furthermore, lx+Phix and lx−Phix represent the normalized value of x-th attribute. On the contrary, pxPhix represents the initial value before normalization. In addition, maxpx and minpx represent the maximum value and the minimum value of x-th attribute.(3)lx+Phix=pxPhix−minpxmaxpx−minpx,maxpx−minpx≠0,1,maxpx−minpx=0,(4)lx−Phix=maxpx−pxPhixmaxpx−minpx,maxpx−minpx≠0,1,maxpx−minpx=0.(2) Update Model for Pheromones. In the ant colony algorithm, effective nodes are those useful nodes searched by the ant, and the effective nodes are used to perform computational tasks. In this paper, the effective node is defined as a node whose pheromone is not less than a certain threshold after being assigned tasks. When a node is assigned tasks, its CPU utilization, memory utilization, and external storage utilization will increase. Therefore, to ensure the load balance of each resource node, the node pheromone should be decreased whose resource utilizations are relatively high. In that case, the nodes whose resource utilizations are high will have lower probability to be assigned tasks. Therefore, the pheromone update model can be expressed as follows:(5)Phit+n=1−δPhit−ΔPhi,where δ is the pheromone persistence coefficient, that is, the affect degree of existing pheromone to pheromone update process. In addition, when node i is assigned task, the probability it will be assigned tasks next time can be changed, so ΔPhik is the pheromone variation to node i when it is assigned tasks by ant k, and ΔPhi=∑k=1mΔPhik is the sum of pheromone affect. The pheromone incremental effect of task i when it is assigned task k can be expressed as follows:(6)ΔPhik=ΔPhik,cut+ΔPhik,pct+ΔPhik,mut+ΔPhik,sut+ΔPhik,nst.(3) Probability Model for State Transition. When selecting the next transition node, ants always tend to choose the neighbor node with the highest transfer probability. The transfer probability calculation formula can be expressed by(7)pijkt=Phijtλθijtχ∑S∈jkiPhijtλθijtχ,ifj∈jki,0,else,wherer λ is the importance degree of pheromones and χ is the importance degree of heuristic factor. In addition, jki is the node set which can be selected in next step for ant k. Heuristic factor θij can be calculated as follows:(8)θijt=1dij,where dij means the distance of node i and node j. When ant k selects the next transfer node, the smaller dij is, the less the communication cost between node i and node j is, and the bigger probability that node j is selected as the next transfer node. In addition, θijt is expectation level of ant k moving from node i to node j.


### 4.2.2. Algorithm Flow

In this section, we will introduce the specific flow of the proposed resource management algorithm. The specific flow is shown in Figure3.(1)
The node pheromone is initialized.(2)
The ants are placed, and the timer is started.(3)
The ant will select the next transfer node according to the state transition probability and determine whether that node is a valid node. If the selected node is a valid node, the node information will be recorded and returned; if the selected node is not the valid node, the ant will continue to choose the next transfer node and determine if it is a valid node.(4)
The tasks are assigned for the valid nodes, and the node pheromone is updated.(5)
The timer ends.Figure 3
The task scheduling algorithm based on the ant colony algorithm.


## 4.2.1. Mathematical Model

For the ant colony algorithm, some parameters are introduced in Table1. Furthermore, in this section, we introduced the computational model for pheromones, the update model for pheromones, and the state transition probability model of nodes.Table 1
Parameters.
NameIntroductionnNumber of computing nodesmNumber of tasknNumber of resource nodesTabukTabu table of antkΔPhiPheromone increment in nodeiΔPhikPheromone increment when antk assigns task to node iPijktTransfer probability when antk transfers from node i to node j at time tdijDistance between nodei and nodejθijHeuristic factor, the inspired degree fromi to jδPheromone persistence (the residual coefficient),0<ρ<1τiPheromones in nodei(1) Computational Model for Pheromones. In this model, the pheromone of resource node can be calculated by its attribute values. Some attributes are considered: CPU utilization, power consumption, memory utilization, external storage utilization, and node security. In this paper, the pheromone of a resource node can be calculated as follows:(1)Phit=∂1∗Phicut+∂2∗Phipct+∂3∗Phimut+∂4∗Phisut+∂5∗Phinst,where ∂1, ∂2, ∂3, ∂4, and ∂5 represent the important degree of resource attributes on node pheromones. In addition, Phicut, Phipct, Phimut, Phisut, and Phinst represent the CPU utilization, power consumption, memory utilization, external storage utilization, and node security grade of node i after normalization. At the beginning, τi0=C. Furthermore, the power consumption of edge node i can be expressed as follows:(2)Phipct=PCnoi+∑j=1nfi,jfimax2PCmaxi−PCnoi,where PCnoi is the power consumption when there is no task assigned on this edge node. PCmaxi is the power consumption when this edge node is full load. fi,j is the processing speed of task i on edge node j. fimax is the max value of processing speed.To resign a unified computing method of node pheromone, the values of attribute are normalized before being integrated. Therefore, the SAW (simple additive weighting) technology is used in this paper [41]. The attributes are divided into two categories: the first kind of attribute values is positively correlated with node pheromones, which means that the value of node pheromones will increase with the value of attribute, such as node security grade; the second kind of attribute values is negatively correlated with node pheromones, which means that the value of node pheromones will decrease with the value of attribute, such as CPU utilization, power consumption, memory utilization, and external storage utilization. The normalization process of the first kind of attribute can be expressed as formula (2), and the normalization process of the second kind of attribute can be expressed as formula (3). Furthermore, lx+Phix and lx−Phix represent the normalized value of x-th attribute. On the contrary, pxPhix represents the initial value before normalization. In addition, maxpx and minpx represent the maximum value and the minimum value of x-th attribute.(3)lx+Phix=pxPhix−minpxmaxpx−minpx,maxpx−minpx≠0,1,maxpx−minpx=0,(4)lx−Phix=maxpx−pxPhixmaxpx−minpx,maxpx−minpx≠0,1,maxpx−minpx=0.(2) Update Model for Pheromones. In the ant colony algorithm, effective nodes are those useful nodes searched by the ant, and the effective nodes are used to perform computational tasks. In this paper, the effective node is defined as a node whose pheromone is not less than a certain threshold after being assigned tasks. When a node is assigned tasks, its CPU utilization, memory utilization, and external storage utilization will increase. Therefore, to ensure the load balance of each resource node, the node pheromone should be decreased whose resource utilizations are relatively high. In that case, the nodes whose resource utilizations are high will have lower probability to be assigned tasks. Therefore, the pheromone update model can be expressed as follows:(5)Phit+n=1−δPhit−ΔPhi,where δ is the pheromone persistence coefficient, that is, the affect degree of existing pheromone to pheromone update process. In addition, when node i is assigned task, the probability it will be assigned tasks next time can be changed, so ΔPhik is the pheromone variation to node i when it is assigned tasks by ant k, and ΔPhi=∑k=1mΔPhik is the sum of pheromone affect. The pheromone incremental effect of task i when it is assigned task k can be expressed as follows:(6)ΔPhik=ΔPhik,cut+ΔPhik,pct+ΔPhik,mut+ΔPhik,sut+ΔPhik,nst.(3) Probability Model for State Transition. When selecting the next transition node, ants always tend to choose the neighbor node with the highest transfer probability. The transfer probability calculation formula can be expressed by(7)pijkt=Phijtλθijtχ∑S∈jkiPhijtλθijtχ,ifj∈jki,0,else,wherer λ is the importance degree of pheromones and χ is the importance degree of heuristic factor. In addition, jki is the node set which can be selected in next step for ant k. Heuristic factor θij can be calculated as follows:(8)θijt=1dij,where dij means the distance of node i and node j. When ant k selects the next transfer node, the smaller dij is, the less the communication cost between node i and node j is, and the bigger probability that node j is selected as the next transfer node. In addition, θijt is expectation level of ant k moving from node i to node j.


## 4.2.2. Algorithm Flow

In this section, we will introduce the specific flow of the proposed resource management algorithm. The specific flow is shown in Figure3.(1)
The node pheromone is initialized.(2)
The ants are placed, and the timer is started.(3)
The ant will select the next transfer node according to the state transition probability and determine whether that node is a valid node. If the selected node is a valid node, the node information will be recorded and returned; if the selected node is not the valid node, the ant will continue to choose the next transfer node and determine if it is a valid node.(4)
The tasks are assigned for the valid nodes, and the node pheromone is updated.(5)
The timer ends.Figure 3
The task scheduling algorithm based on the ant colony algorithm.


## 5. Simulations

In the new resource management scheme based on the idea of edge computing, we propose a task scheduling algorithm based on the ant colony algorithm. In this section, we will simulate the performance of the new algorithm. Without loss of generality, all the data are the average values of ten experiments. In the experiments,∂1, ∂2, ∂3, ∂4, and ∂5 are set as 0.25. The simulation parameters are expressed in Table 2, and we set some contrast algorithms to verify the effectiveness of the new algorithm. In this section, two comparing algorithms are set. One is the modified round robin algorithm, and the other is the generalized priority algorithm.(i)
Modified Round Robin Algorithm (RRA, for Short). This algorithm is proposed in [42], which can randomly assign free resources for task execution(ii)
Generalized Priority Algorithm (GPA, for Short). This algorithm is proposed in [43], which is an efficient optimal algorithm of task scheduling in cloud computing environment(iii)
Ant Colony Algorithm in Power Edge Computing (ACPEC, for Short). This algorithm is the resource scheduling algorithm proposed in this paperTable 2
Parameters introduction.
ParametersValuesNumber of edge nodes[20, 500]Node security grade of node[0.5–1)Number of tasks30–350Processing speed100–1000 MIPSLength of the task1000–10000 MIIn this section, we simulate the performance of RRA, GPA, and ACPEC on the task execution time with different number of tasks. As shown in Figure4, we can find that the task execution times of ACPEC are always shorter than those of GPA and RRA. With the increase in task scale, the advantages become more and more obvious. When the number of task reaches 320, the advantage of ACPEC is very obvious, as shown in Figure 4.Figure 4
The comparison of task completion time.The task wait delay is a key factor affecting the real-time response of the system. As shown in Figure5, the task waiting time always increases with the increase in task scale. Compared with GPA and RRA, the ACPEC algorithm is more complex, so the required time for task assigning is always longer slightly. However, compared with the total amount of time for task execution, a small increase in task wait time is acceptable for users.Figure 5
The comparison of average waiting delays.The performances on power consumption cost are shown in Figure6. For the ACPEC algorithm, the tasks can be assigned to different resource nodes according to the purpose of reducing power consumption. Therefore, when the task scale is the same, the power consumption with ACPEC is always less than the power consumption with FSFC and RRA. And as the task scale increases, the advantage tends to be obvious.Figure 6
The comparison of power cost.When the number of tasks is 100, the CPU utilization with 20 edge nodes and the memory utilization with 50 nodes are simulated as shown in Figures7 and 8. We can find that the CPU utilization and memory utilization of some nodes fluctuate greatly when using GPA and RRA. Furthermore, some nodes are under low load state when using GPA and RRA. When using the ACPEC algorithm, the CPU utilization and memory utilization among different nodes have become average. Compared with RRA, the average CPU utilization increased from 38.8% to 69.9%, and the average memory utilization increased from 38% to 68%.Figure 7
The comparison of CPU utilization.Figure 8
The comparison of memory utilization.In this section, we will evaluate the performance of these task scheduling algorithms on load imbalance. In this section,MDI (degree of imbalance) represents the level of load imbalance, which can be calculated as follows:(9)MDI=Mmax−MminMavg,where Mmax, Mmin, and Mavg represent the longest time, the shortest time, and the average time for task performing. The load imbalance levels of different algorithms are shown in Figure 9. We can find that the load imbalance levels decrease gradually with the increase in task scale. This is because the assigning of tasks is gradually balanced with the increase in task scale. Compared with GPA and RRA, the values of MDI with ACPEC are lower. The performance of ACPEC on load balance is better than that of GPA and RRA as shown in Figure 9.Figure 9
The comparison of unbalanced load value.


## 6. Conclusion

To ensure the efficient and stable operation of the power cloud computing system and make full use of the advantages of edge nodes, in this paper, we propose a new resource management scheme based on edge computing. In this scheme, the computing tasks can be executed in local edge nodes instead of uploading to the cloud. In this new scheme, although the resources of single edge node are limited, the resource among edge nodes can cooperate with each other to complete the computation-intensive task. To realize the optimal allocation between edge nodes and tasks, in this paper, a task allocation algorithm based on the ant colony algorithm is proposed. This algorithm has good performance in task execution time, waiting delay, CPU utilization, memory utilization, and load balancing. The communication overhead is greatly affected by network environment; therefore, the communication overhead of data transmission and the difference of system power consumption should be considered in resource management issue, which may become our future work.



---

*Source: 4868618-2021-12-09.xml*