Task Allocation Mechanism of Power Internet of Things Based on Cooperative Edge Computing

Edge computing can be widely used in unmanned aerial vehicle (UAV) inspection, field operation control, power consumption information collection and other businesses in the power Internet of Things scene. Edge computing offloads functions such as data processing and applications to network edge nodes near the terminals to provide low-latency services and ensure service quality. However, with the explosive growth of business terminals, the capacity of single edge node is limited and it is difficult to meet all business requirements at the same time. Therefore, this article proposes a task allocation mechanism based on cooperative edge computing. Firstly, a task allocation model based on cooperation of two edge nodes is established to minimize the average task completion delay while meeting business requirements. Secondly, the Two-edge-node Cooperative-task Allocation based on Improved Particle Swarm Optimization (TCA-IPSO) algorithm is proposed, which applies the crossover and mutation strategy in genetic algorithm to improve the particle swarm optimization algorithm, and solves the problem that the task allocation scheme in cooperation is prone to fall into a local optimum. Finally the simulation results show that the proposed TCA-IPSO algorithm reduces the average task completion delay by 53.8% and 36.0% compared to the benchmark and QoS-based Task Distribution (QBTD) algorithm.


I. INTRODUCTION
The power Internet of Things is the application of the internet of things (IoT) in the smart grid. It effectively integrates communication infrastructure resources and power system infrastructure resources, realizes the interconnection of all things in the power system, comprehensive state perception and efficient information processing. Power Internet of Things is an example of Energy Internet [1] in power companies. They aim to build a new open and shared energy ecology. But they have different perspectives. The power Internet of Things starts from electricity and then goes into the comprehensive energy beyond electricity. Energy Internet starts from the energy nodes such as power network and natural gas network, and interconnects them to form a shared network.
The associate editor coordinating the review of this manuscript and approving it for publication was Ting Wang . The power Internet of Things provides various services such as video monitoring, sensing detection and equipment inspection [2], [3]. Generally, these business requirements are diversified, such as video monitoring and equipment diagnosis, which require high resources while smart meter monitoring and inspection robots are sensitive to delay and require timely calculation results. With the construction and continuous development of the power Internet of Things, the amount of business terminals' data has shown explosive growth. As a result, the pressure on network transmission and cloud center load has increased under the cloud computing model. Processing delays are also difficult to meet most business requirements.
In order to solve the problem, edge computing has been applied in the power Internet of Things as an extended solution of cloud computing [4]. The power Internet of Things architecture based on edge computing is shown in Figure 1. Deploy edge nodes with computing and storage capabilities such as wireless access points, routers, software defined network (SDN) switches, and edge servers at the edge of the network. Power business terminals are connected to edge nodes through wired, Wi-Fi, micro-power wireless, 4G / 5G, and low-power wide area networks. Putting computing tasks at the edge nodes can reduce network transmission and cloud load.
Compared with the cloud center, the resources of edge nodes are still very limited. As the number of business terminals grows, it is difficult for edge nodes to simultaneously meet the different needs of power IoT services. At the same time, there are differences in load between edge nodes. First, the geographical distribution of business terminals is unbalanced when they connected to edge nodes. Second, in sudden situation a large number of information collection terminals upload data for processing. As a result, some edge nodes need to process lots of business requests while other edge nodes are relatively idle. Therefore, the unbalanced time and space distribution of business requests will further exacerbate the severity of the problem.
In order to solve the problems, the cooperative edge computing can be adopted. The tasks of the single business terminal are offloaded to multiple edge nodes for computing so as to optimize resource usage and reduce the service delay. In video data analysis services, video acquisition terminal uploads a large amount of video data when a substation is in a sudden fire situation. Multiple edge nodes can cooperate to process large amounts of video data. In intelligent inspection services, when multiple inspection robots access to the same edge node, the edge node resources are insufficient to meet requirements of multiple robots at the same time. So other edge nodes are required to cooperate to process the collected data. The work in [5], [6] shows that cooperative computing of edge nodes is better than offloading tasks to a single edge node. References [7], [8] propose cooperative computing of edge nodes, in which the main concern is how to perform optimal task allocation and resource allocation for reducing task completion delay. Reference [9] focuses on network traffic scheduling while considering task scheduling issues, and it models the joint issues to minimize overall completion latency. Reference [10] integrates the horizontal offloading of edge nodes in the cloud-edge-end three tier computing offloading framework to improve resource utilization. Reference [11] considers the dependencies between tasks in task assignment and proposes a complete polynomial time approximation scheme to solve the optimal task assignment. In these literatures, horizontal cooperation balances computing load and reduces business service delays. However, the above methods do not consider the multiple requirements of business at the same time, including computing resource requirement, storage resource requirement and delay requirement. Some literatures only consider how to compute cooperatively for a single request instead of multiple requests.
Aiming at the problem of limited edge node resources and unbalanced load that make business requirements difficult to meet in the power IoT scenario, we propose a task allocation mechanism based on cooperative edge computing to minimize the average task completion delay under the constraints of business requirements. More specifically, the main contributions are as follows: • In order to make better use of edge node resources and reduce business completion delay, a task allocation model based on cooperation of two edge nodes is proposed. In the model, the business request and resource model and delay model are established respectively, and then cooperative computing model is built, including three types: independent computing of access points, cooperative computing of access point and neighbor edge nodes, and cooperative computing of neighbor edge nodes, which aim to shorten the average task completion delay under the constraints of business requirements.
• The model is transformed into an integer non-linear programming problem, and the TCA-IPSO algorithm is proposed for solving. The algorithm uses the crossover and mutation operations of the genetic algorithm to improve the particle update strategy in the particle swarm optimization algorithm. While the particles maintain learning ability, the diversity of the particle population is improved and precocity is prevented from falling into a local optimum. The rest of the paper is organized as follows: The chapter II reviews the related work of cooperative edge computing. The chapter III establishes the task allocation model based on the cooperative edge computing. The chapter IV introduces the TCA-IPSO algorithm. The chapter V shows the performance of proposed algorithm by simulation. The chapter VI summarizes the paper and draws conclusions.

II. RELATED WORK
Cooperative edge computing mainly studies how business requests are allocated and completed in the edge network VOLUME 8, 2020 to provide satisfactory services. Aiming at the problems of insufficient resources at the edge of the network, uneven time and space distribution of business requests, unreasonable task allocation and insufficient life span of edge nodes, there are four types of edge cooperation study: 1) Edge cooperation with latency as the optimization goal. It is mainly targeted at service scenarios with high delay requirements. 2) Edge cooperation technology with energy consumption as the optimization goal. It mainly considers that some edge devices have limited battery capacity due to their portability. It focuses on the energy consumption problem and aims to minimize the overall energy in the case of business response time constraints. 3) Edge cooperation technology that starts from service response time and energy consumption. It realizes joint optimization of factors such as delay and energy consumption. 4) Edge computing with network performance as optimization goal including network throughput, load balancing of edge nodes.
Latency is a key point in the research of cooperative edge computing. Reference [10] proposes a cooperative offloading framework in a three-tier mobile edge computing network. At the same time, it focuses on horizontal offloading between edge nodes. Through the joint optimization of offloading decisions and computing resource allocation, it minimizes the average task duration in the case of limited equipment power. Reference [11] studies the task assignment problem with task dependency, minimizes service delay under the constraint of resource cost, and finally provides an approximate polynomial algorithm to solve the problem. Aiming at the problem of computing offload in fog computing networks, [12] proposes a fog node (FN) cooperation strategy for offloading problem, which translates the offloading problem into a workload allocation problem for minimizing services delay at a given power efficiency. Then a parallel optimization framework based on alternating direction method of multipliers is used to solve the problem and improve the network performance of fog computing. Reference [13] proposes a task allocation mechanism based on edge computing, which assigns different types of tasks to the corresponding virtual machines (VM) in each cloudlet, and finds the optimal VM resource allocation strategy to minimize the average response delay of the application.
Although allocating tasks on edge devices for processing can guarantee the real-time advantages of edge computing environments, generally mobile edge devices have limited battery capacity. For this reason, the energy consumption of devices need to be optimized. Reference [7] considers a three-node mobile edge computing (MEC) system including user nodes, auxiliary nodes, and access point (AP) nodes.Then it develops an energy-saving design framework for partial and binary offloading. Reference [14] studies the cooperation between mobile devices and MEC in the use scenario of wearable devices, and builds a two-layer task unloading model to minimize the energy consumption of Mobile devices and MEC under the constraint of service's delay. Reference [15] studies cooperative communication method in the wireless transmission MEC system of two users to minimize AP transmission energy, and a two-stage method is proposed to obtain the optimal resource allocation strategy.
Cooperative edge computing should not only consider the time delay of task completion, but also consider the energy consumption factor of edge node as the same time. Reference [16] establishes a cooperative computing system to handle user offloading work. They share fog network resources through FN cooperative forwarding. Then a joint energy and time cost minimization problem is proposed. Finally it designs a low complexity of fairness cooperation algorithm (FCA) to solve the optimization problem. Reference [17] proposes Mobile Edge Computing-Base Station (MEC-BS) cooperation strategy, which offloads queued tasks on MEC to other MEC-BS directly connected to enhance service satisfaction, and finally converts it into the problem of maximizing the total time and energy consumption. Reference [18] proposes a lightweight computing offloading method, which can improve the performance of wearable devices and reduce energy consumption by distributing computing tasks of wearable devices to multiple nearby mobile devices.
There are also some literatures that take network throughput and load balancing as optimization goals. Reference [8] proposes a communication-aware chained task scheduling method that takes into account the large amount of communication costs in dispersed computing. It proposes a virtual queuing network that encodes the state of the network, and uses the Max-Weight type scheduling strategy to achieve optimal network throughput. Finally, the scheduling problem is extended to the directed acyclic graph (DAG) task model. Reference [19] proposes a two data center cooperation scheme for fog or edge computing environments. When the data center buffer is full, the upcoming tasks are migrated to adjacent data center. At the same time, each data center adopts the same strategy to handle the task, which minimizes the blocking state of each edge node.
In addition, there are some literatures discussing collaborative edge computing from some novel perspectives recently. Reference [20] proposes an edge computing framework to enable cooperative processing on resource-abundant mobile devices for delay-sensitive multimedia IoT tasks. It optimally forms mobile devices into video processing groups and dispatch video chunks to proper video processing groups. Reference [21] studies the multi-hop computationoffloading problem for the Industrial Internet of things (IIoT)edge-cloud computing model and adopts a game-theoretic approach to achieving quality of service (QoS)-aware computation offloading in a distributed manner. The proposed algorithm offers a stable performance gain for IIoT in various scenarios. Reference [22] considers the problem of cooperative computation offloading for UAVs, which optimizes the transmission data rate and resource allocation to satisfy different QoS requirements. The proposed algorithm can efficiently utilize heterogeneous edge servers in a cooperative manner. Reference [23] proposes a novel Intelligent Cooperative Edge (ICE) computing framework, which realizes the complementary integration of edge computing and artificial intelligence (AI) in the IoT environment from two aspects: edge-based AI and AI-enabled edge. Reference [24] studies the joint optimization of the CPU frequencies, the offloading bits, the transmit power, and the UAV's trajectory of the UAV-enabled wireless powered cooperative MEC system. An optimization problem is formulated to minimize the required energy of UAV. A successive convex approximation (SCA)-based algorithm-based algorithm and a decomposition and iteration (DAI)-based algorithm are proposed to tackle the nonconvex problem. Reference [25] proposes a novel paradigm of socially-motivated cooperative mobile edge computing, which leverages the social tie structure among mobile and wearable device users for achieving effective and trustworthy cooperation in task executions.
Particle Swarm Optimization (PSO) is a random search algorithm based on group cooperation, which is developed by simulating foraging behavior of birds. The algorithm is often used in the optimization problem recently. Reference [26] proposes nonlinear exponential inertia weight PSO algorithm which is used to get solution in the edge-cloud collaborative multi-task computing unloading model. By dynamically adjusting the inertia weight, the algorithm can make up for the convergence premature defect of the standard PSO, and effectively avoid falling into the local optimal solution. Reference [27] proposes a task offloading scheme merely relying on vehicle-to-vehicle communication, which is further solved by the PSO algorithm. The standard particle position update formula is used, and the problem of particles not meeting the constraints is solved through adjustment. Reference [28] proposes ILCDPSO algorithm which improves the convergence speed of particle swarm algorithm by adding local search strategy and chaotic sequence. Genetic algorithm (GA) is also widely used in solving optimization problems. Reference [29] proposes an improved GA in which the crossover probability and mutation probability are dynamically adjusted according to the change of individual fitness, and the convergence speed of the algorithm is accelerated. A number of hybrid algorithms of GA and PSO also have been proposed. Reference [30] designs a suboptimal algorithm named as hierarchical GA and PSO-based computation algorithm, in which GA and PSO are executed alternately until the number of iterations is satisfied. Reference [31] proposes HGAPSO algorithm based on the idea of updating particle positions in the particle swarm. The next generation chromosome is modified by recording the historical optimality of each chromosome and population optimality, which is applied to change the mutation operation rule.

III. TASK ALLOCATION MODEL BASED ON COOPERATION OF TWO EDGE NODES
The flowchart of the task allocation mechanism based on the cooperative edge computing is shown in Figure 2. First, a task allocation model based on cooperation of two edge nodes is established based on all business requests and the idle resources of the edge nodes at a certain moment. We analyze business requests, resources, delay and cooperative computing separately. Then we build task allocation problem to minimize the average task completion delay. Finally we propose the TCA-IPSO algorithm to solve the problem. The TCA-IPSO algorithm improves the standard particle swarm algorithm and introduces the crossover and mutation operations into the particle update strategy so that the particles approach the optimal solution.

A. BUSINESS REQUEST AND RESOURCE
Assume that the number of user end (UE) and edge node (EN) in the network are N , M respectively. EN is an edge device with computing and storage capabilities. N = {1, 2, . . . , N } and M = {1, 2, . . . , M } denote UE set and EN set respectively.
The task request of a UE is cooperatively completed by EN collection. Considering that multiple EN cooperation will bring certain communication overhead, we adopt two ENs cooperation method. The decision of the cooperative ENs is represented by R. All the subtask of UE i is completed by EN The subtask set requested by UE i is T i , where the subtask j is represented by w ij = (c ij , e ij , d ij , t ij , λ ij ). c ij represents the computing resource requirement, e ij represents the storage resource requirement, d ij represents the amount of input data, t ij represents the computing delay if the resource requirement is met, and λ ij represents the ratio of the result data amount to the input data amount. There is no temporal dependency VOLUME 8, 2020 between subtasks, so they can be completed independently. t i represents the delay constraint of T i . Considering the resources of edge nodes are heterogeneous, we use container and virtualization technologies to support the implementation of resource allocation. The amount of required resources is represented by the number of virtual resource units.
Assume that all UE requests are sent simultaneously at a certain time. (C k , E k ) represents the idle resources of EN k. C k and E k indicate the number of idle virtual computing units and idle virtual storage units respectively. The task allocation decision X = {x ijk } is specified as follow, A subtask of UE i can only be executed by one EN in R i , so it has the following constraints EN needs to meet the computing and storage resource requirements of the subtasks that allocated to itself. Sum comp R,X ,k and Sum sto R,X ,k represents the amount of EN k computing and storage resource units that should be satisfied under cooperative node decision R and task allocation decision X . Therefore, the constraints is as follow, Each UE accesses the nearest EN. We assume that ENs and UEs will not move. EN u i ∈ M represents the access point of UE i, so the UE set associated with EN k can be represented The bandwidth resource of EN k is B k Hz. We default that EN bandwidth is allocate by the UEs associated with the EN evenly. There is no other interference between UEs when they connect to the same EN. We denote the uplink spectral efficiency between UE i and EN u i as η i . It can be approximated by Shannon's formula where p i is the transmission power of UE i, h i,u i is channel gain between UE i and ENu i , and σ 2 is additive white Gaussian noise power. Therefore when the UE i accesses the EN u i , the uplink transmission rate of the UE i for radio access can be given by where |N u i | denotes the number of UEs that connected to the EN u i . Similar to [32], [33], the downlink bandwidth of the UE i is much higher than the uplink bandwidth, and data size after task processing is usually much smaller than it before processing, so we ignore the downlink transmission delay of sending the task results from ENs u i to UE i.
We denote the data transmission rate from EN k to EN k as v k,k . Similar to [34], [35], it is assumed that the data transmission rate can be obtained by measurement.

C. COOPERATIVE COMPUTING
The subtasks of UE i are completed cooperatively by EN set R i = {r i1 , r i2 ∈ M}. r i1 and r i2 process part of them. The subtask results are aggregated at single EN in R i and finally returned to the access point EN u i . According to whether EN u i participates in cooperation, there are three types of cooperation methods: 1). Access point computing independently, r i1 = r i2 = u i .2). Cooperative computing of access point and neighbor EN, r i1 = u i , r i2 = u i 3). Cooperative computing of two neighbor ENs, r i1 = u i , r i2 = u i , r i1 = r i2 . The three cooperation methods are shown in Figure 3. In the two-edgenodes cooperation, the cooperative nodes are the nodes which participate in the task computing, excluding the nodes for task and processed result forwarding. Figure 3(a) shows the cooperation method 1, in which access point completes the subtasks T1, T2 and T3 sent by the UE. Figure 3(b) shows the cooperation method 2, in which the access point completes the subtask T1 and T2, and another neighbor EN completes the subtask T3, and the processed results finally are merged in the access point. Figure 3(c) shows the cooperation method 3, in which two neighbor ENs complete, and one merges the processed results and returns them to access point. T finish i,r i1 ,r i2 represents the cooperative completion delay of UE i, which includes the communication delay of task input data sent from EN u i to EN r i1 and r i2 , the computing delay on EN r i1 and EN r i2 , and the delay of results merging and returning to EN u i .

1) ACCESS POINT COMPUTING INDEPENDENTLY
The subtasks of the UE i are all completed by the EN u i , so the cooperative completion delay of the UE i is

2) COOPERATIVE COMPUTING OF ACCESS POINT EN u i AND NEIGHBOR EN r i2
First, the EN u i completes some subtasks of the UE i, and another part are sent to the neighbor EN r i2 for computing. After the subtask computing on the EN r i2 is completed, the results are returned to the EN u i for merging. The computing delays of the subtasks on EN u i and EN r i2 are T The data transmission delay from EN u i to EN r i2 is , and the transmission delay of the VOLUME 8, 2020

3) COOPERATIVE COMPUTING OF TWO NEIGHBOR EN
EN u i divides the subtasks into two parts and forwards them to EN r i1 and r i2 respectively. Finally, the processed results are merged on r i1 or r i2 and sent back to EN u i . The results are merged on the last EN that completes its subtask. We denote the EN as r i1 . The communication delays of EN u i sending the subtasks of to EN r i1 and r i2 are The computation delays on EN r i1 and r i2 are T The communication delay for sending subtask result from , and the communication delay for all the subtask results from the EN The subtask results merging time depends on the maximum value of time when the subtask is completed on EN r i1 and the time when the subtask result computed by EN r i2 has been sent to EN r i1 , so the cooperative completion delay for UE is

D. PROBLEM MODEL
The total delay from the time when the UE i sends the task request to the time when it receives the calculation result is where represents the delay of uploading imput data and T down i,u i represents the delay of returning the processing result from EN u i to the UE i. As described above, the delay is small and ignored, and the computing delay of execution decision and the transmission delay of returning decision data are also ignored. Therefore, the average completion delay of tasks for all UEs is This article describes the task allocation problem as minimizing the average completion delay of tasks. We hope that the model can consider all users and realize the global optimization of the system. The task allocation decision of the UE is represented by (R, X ), R = {R i , i ∈ N }. Therefore, the task allocation problem in this article is described as follows, (12) C1 and C2 indicate that EN needs to meet the subtask's computing and storage resource requirements in task allocation. C3 indicates that each task is to be completed within the time constraint. C4 and C5 indicate that each subtask of the UE i can only be completed by the EN in R i . C6 means that each task can only be completed by one EN. C7 indicates whether the subtask w ij is completed on EN k, x ijk = 1 means yes, x ijk = 0 means no.
It is a challenge to ensure that the task allocation scheme meets the resource and delay constraints. That is to say, for each EN it is necessary to ensure that EN can all meet the resource requirements of the tasks assigned to it, and the task allocation decision should meets the task delay requirements. This is an important premise for us to minimize the average delay.

IV. TCA-IPSO ALGORITHM
Standard PSO algorithm is difficult to solve the discrete optimization problem. The initial position and speed of particle are continuous variables, and the particle's position update formula in the algorithm is only suitable for continuous variables. However, the problem proposed in this article is in discrete space. We propose TCA-IPSO algorithm to solve P1, in which crossover and mutation operations in the GA are used to improve the update formula in PSO. The crossover and mutation operations can handle discrete variables well. Reference [28] does not fuse GA and PSO, and the algorithm still retains GA and PSO's own problems such as slow convergence and difficulty in achieving global optimum. The TCA-IPSO embeds the crossover and mutation operations of the genetic algorithm into the PSO algorithm. While preserving the historical memory of particle, the crossover and mutation operations improve the diversity of the population and can better converge to the global optimum.
TCA-IPSO encodes the decision variables R, X in (12), and each particle represents a task allocation scheme. We establish particle update strategy and particle Fitness function based on the input of the problem in (12) (resources of EN, requirements of UE, etc.), which are used to make the parti-cles evolve towards the optimal direction. Firstly, we encode the problem P1. Secondly we define the Fitness function for evaluating particle quality. Thirdly we describe the particle update strategy, and finally we give the TCA-IPSO algorithm flow.
A. PROBLEM ENCODING Assume the particle population size is Y . The lth particle represents D-dimensional position vector, denoted as S l = (s l 1 , s l 2 , . . . , s l D ). The optimal position of the lth particle so far is the individual optimal value, denoted as PS l best = (p l 1 , p l 2 , . . . , p l D ), and the optimal position of the whole particle swarm so far is the global optimal value GS best = (g 1 , g 2 , . . . , g D ).
We adopt the discrete coding strategy to generate candidate particles, and each particle represent a cooperation decision and task allocation decision. If X = {x ijk } is directly used as the position vector of particles in the TCA-IPSO, the vector dimension will be relatively high, which will affect the efficiency of the algorithm. We recode the position vector of particles. The position vector of lth particle after t iteration is expressed as where r l i1 (t), r l i2 (t) ∈ [1, M ] means the EN r l i1 (t) and r l i2 (t) cooperate to complete the task T i of UE i. So the constraint C4 is met. z l ij (t) ∈ {1, 2} represents the subtask j of the UE i executed on r l iz l ij (t) so the contraints C5, C6 and C7 are met.
So in fact S l (t) is equivalent to the decision vector X = {x ijk } of a task allocation scheme. For the sake of convenience, we unify the symbols, S l (t) = (s l 1 (t), s l 2 (t), . . . , s l D (t)) (14) where

B. FITNESS FUNCTION
The Fitness function is used to evaluate particle quality and is also an optimization goal in TCA-IPSO algorithm. Since there are constraints in the problem P1, but the evolutionary algorithm is an unconstrained search technology. It cannot guarantee that every particle is always in the feasible region. It is necessary to combine constraint processing technology in the process for solving constrained optimization problem. We construct a constraint violation function through constraint C1-C3 and integrate it into the Fitness function. The constraint violation degree function is as follows, (15) G(S) represents the sum of constraint violations of all EN's computing resources, storage resources and delay. When the particle is within the feasible region, G(S) = 0, that is, all the particles satisfying G(S) = 0 constitute the feasible region of the search space. When particle is not in the feasible region, G(S) > 0. In order to ensure that the problem in (12) can be solved and the constraint C1-C3 are met at the same time, we merge the constraint C1-C3 into the Fitness function. The Fitness function is defined as follow, Larger G(S) or T (S) value will result in smaller fitness value which will influence the flight direction of particle. We usually set γ close to 1, in order to ensure that when the constraints C1, C2, and C3 are not satisfied the fitness value will tend towards 0.

C. UPDATE STRATEGY
In the update strategy particles obtain information from historically optimal particles and globally optimal particles. It makes the particles evolve towards the optimal direction.The globally optimal particle obtained is the optimal task allocation scheme. Since the particle uses the discrete encoding method, the update strategy in the standard particle swarm optimization algorithm is no longer applicable. In this article, the crossover and mutation operations in genetic algorithm are used to update the particle position.
S l (t + 1) = δ 2 ⊕ Mutate(c 2 , δ 1 ⊕ Cross(c 1 , δ 0 ⊕ Cross(c 0 , S l (t), PS l best ), GS best )) (17) where Cross() and Mutate() represent crossover operation and mutation operation respectively. The specific crossover and mutation processes are shown in Figure 4. In Figure 4 (a),Ŝ represents the individual optimal particle PS l best or the global FIGURE 4. Crossover and mutation operation. VOLUME 8, 2020 optimal particle GS best . It selects some crossover points to cross particle S andŜ. In Figure 4(b), some mutation points are selected from S for mutation. Through crossover operation, each particle can obtain the position information from the historical optimal particle and the global optimal particle directly, thereby converging to the historical optimal and global optimal. The mutation operation can improve the diversity of particles and prevent them from falling into local optimum.

1) CROSSOVER
Cross(c 0 , S l (t), PS l best ) represents that S l (t) and PS l best cross, and Cross(c 1 , δ ⊕ Cross(c 0 , S l (t), PS l best ), GS best ) represents that GS best cross with the crossover result of S l (t) and PS l best . c 0 and c 1 are learning factors, which represent the number of crossover points with PS l best and GS best respectively. In this article, crossover points are selected by random strategy. The symbol ⊕ means to cross or mutate with a certain probability, as shown below, where δ 0 and δ 1 are constants within the range (0,1). U l (t) = δ 0 ⊕ Cross(c 0 , S l (t), PS l best ), r 0 , r 1 are random numbers within the range [0, 1]. when r 0 < δ 0 , S l (t) and PS l best cross. (19) is the same.

2) MUTATION
Mutate(c 2 , S l (t)) represents the mutation operation where c 2 is the number of mutation points. The random strategy is adopted to select c 2 mutation points. In S l (t), partial values of r l (t) are randomly changed to value within [1, |M|], and z l (t) is randomly changed to the value within [1,2].
r 2 is the random number within [0, 1].when r 2 < δ 2 the mutation operation is carried out. The specific process of TCA-IPSO algorithm is as follows. The output of the algorithm GS best is the optimal task allocation scheme, which is equivalent to the optimal solution X = {x ijk } in problem P1.

V. EXPERIMENTAL RESULTS AND ANALYSIS A. SIMULATION STEPS
In this section, the proposed algorithm is simulated and its performance is verified.
Step 1: Simulate the TCA-IPSO algorithm, then study the influence of different parameters on the convergence effect of the algorithm.
Step 2: Study the impact of UE's number on the cooperation method in TCA-IPSO algorithm.
Step 3: Two intelligent optimization algorithms, PSO and GA, are used to solve P1 problem, and then the convergence effect was compared with TCA-IPSO algorithm.
Step 4: In order to verify the superiority of cooperative computing in TCA-IPSO algorithm, the Benchmark and QBTD method [36] are selected for comparison. In the Benchmark method each task has a fixed resource requirement. And the tasks sent by UEs are only completed by the access point independently. There is no cooperation between the edge nodes. If the access point has insufficient resources, the tasks enter the queue for queuing. In order to reduce the task completion delay, [36] proposes a QoS-based task distribution (QBTD) approach, designed to minimize business completed time delay. Tasks can be executed on any edge node that meets QoS requirements.Finally the task allocation problem is transformed into a mixed integer linear programming problem.

B. SIMULATION SETTINGS
It is assumed that the simulation environment is a square area with side length of 1km. The area contains 10 ENs and 50 UEs, and the positions of EN and UE are randomly generated in the area. The CPU frequency (GHz) and storage size (GB) of each edge node obey normal distribution, which areÑ 1 (10, 2 × 10 2 ) andÑ 2 (10 2 , 3 × 10 2 ) respectively. We set virtual computing unit to be 0.1GHz and virtual storage unit to be 0.5GB. The data transmission rate (KB/s) between two edge nodes follows the normal distributionÑ 3 (3 × 10 3 , 10 2 ). The number of subtasks of each UE follows a uniform distribution U (1, 5). The computing delay, the requirements of virtual computing resource unit and virtual storage unit follow poisson distribution. The mean values of poisson distribution are λ 3 = 40, λ 1 = 8, λ 2 = 10. Same as [33], [37] the channel gain is expressed as follows: h = 127 + 30logd(d in kilometers), other parameters are set as shown in the Table 2.

1) THE IMPACT OF DIFFERENT PARAMETERS ON THE CONVERGENCE PERFORMANCE OF THE TCA-IPSO ALGORITHM
The TCA-IPSO algorithm includes four important parameters: population size Y , crossover probability with individual optimal particles δ 0 , crossover probability with global optimal particles δ 1 , and mutation probability δ 2 . Different parameters' value has certain effects on search efficiency and solution quality, as shown in Figure 5. Figure 5 (a) shows the convergence of the TCA-IPSO algorithm under different population numbers. It can be seen that the larger the population size is, the better the quality of the searched solution is and the faster the convergence speed is at the early stage. when Y = 10, 20, 30, it converges to 125, 97, and 76 ms respectively. When Y is small, the possibility of falling into a local optimal solution is high due to poor population diversity, and the convergence speed is slow. As the population size increases, the diversity of the population increases. So the probability of finding the optimal solution and the convergence speed increases. Figure 5 (b) shows the convergence of the TCA-IPSO algorithm under different crossover probabilities δ 0 . When δ 0 is 0.4, 0.6, 0.8, it converges to 125, 82, and 92 ms, respectively. The TCA-IPSO algorithm easily converges to the local optimal solution when δ 0 is too large or too small. Smaller crossover probability δ 0 has less impact on population diversity which causes small probability of converging to the global optimum. When δ 0 is larger the probability of local optimum also becomes larger, resulting in poor solution quality. Figure 5 (c) shows the convergence of the TCA-IPSO algorithm under different crossover probabilities δ 1 . Same as δ 0 , when the crossover probability with the global optimal particle δ 1 is too large or too small, the quality of the solution will be reduced and is easy to fall into a local optimum solution. The population diversity will decrease when δ 1 is too small, and the solution will easily fall into local optimization when δ 1 is too large. Figure 5 (d) shows the convergence of the TCA-IPSO algorithm under different mutation probabilities. When δ 2 is 0.05, 0.1, 0.15, the TCA-IPSO algorithm converges to 121ms, 89ms and 103ms respectively. And it works best at 0.1. The reason is that the small mutation probability has little effect on the improvement of population diversity while large mutation probability leads to the instability of fitness value of particles, which affects the final convergence result. Taking appropriate mutation probability can prevent premature convergence from producing local optimum.
In addition we try to find the best performance of the proposed method under the joint impact of these four parameters.   Figure 6 shows the ratio of the three cooperation methods under different numbers of UE. As the number of UE increases, the ratios of UE using cooperation method 2 and method 3 increase while the ratio of UE using cooperation method 1 decreases. For example, when the number of UE is VOLUME 8, 2020 50, the ratios of UE number in cooperation method1,2,3 are 0.76, 0.16 and 0.8. respectively. When the number of UE is small single EN can meet the requirement. As the number of UE increases, due to limited resources some EN need to cooperate with their neighbor ENs to complete tasks to meet the business requirements. When it continues to increase, part of EN's remaining resources are consumed. In order to meet the business requirements and reduce the business completion delay, cooperation 3 method is adopted.

3) COMPARISON OF CONVERGENCE PERFORMANCE OF DIFFERENT INTELLIGENT OPTIMIZATION ALGORITHMS
PSO and GA were used to solve the P1 problem, and the convergence effect was compared with the proposed TCA-IPSO algorithm, as shown in Figure 7. We can see that the performance of TCA-IPSO is the best, and the convergence result is 74ms, while the convergence results of PSO and GA are 111ms and 131ms. GA updates chromosome through selection, crossover and mutation to improve population diversity. However, memory is not preserved in iterations, and previous knowledge is destroyed with population change. It is easy to converge to the local optimal solution. PSO algorithm preserves historical memory, and updates particles by using the sharing mechanism of historical information of individuals in the group. However, the method of update strategy is not good for discrete optimization problems, which affects the quality of solutions. Simultaneously PSO algorithm prematurely converges, and the local optimization ability is poor. TCA-IPSO applied crossover and mutation strategy to improve PSO. It enhances the renewal ability of particle swarm and jumping out of the local optimum. It improves the problem of premature convergence and local optimization.

4) COMPARISON OF DIFFERENT TASK ALLOCATION METHODS
TCA-IPSO is compared with Benchmark and QBTD method. The average delay of the three methods under different UE's number, CPU frequency, storage size and UE distribution unbalance degree were compared respectively.  Figure 8 shows the average delay comparison of three task allocation mechanisms, TCA-IPSO, Benchmark and QBTD under different UE's numbers. With the increase of the number of UE, the average delay increases gradually, and TCA-IPSO has the best effect. In Benchmark method, tasks can only be completed on access point EN. If the access point has insufficient free resources, the task will enter the queue for queuing. As the number of UE increases, it is difficult for a single EN to meet the all task requirements at the same time. Therefore, tasks need to be queued on EN for completion, resulting in an extremely increased average completion time. QBTD method distributes tasks among edge nodes to avoid excessive load on some ENs, so it reduces queuing delay. TCA-IPSO segments the task to subtasks and distributes them to two ENs. Therefore, with the increase of the number of UE, the average delay increases slowly. When UE's number is 50, compared with Benchmark and QBTD mechanism, the average delay decreases by 29.3% and 10.3% respectively, and when UE's number is 70, it decreases by 53.8% and 36.0% respectively.    Figure 10 respectively show the average delay of the three task allocation mechanisms under different CPU frequency and storage size. It can be seen that the average delay of the three methods gradually decreases with the increase of resources. The average delay of TCA-IPSO has been kept to the minimum, because when EN load is too high and the remaining resources are unable to meet the business requirement, some subtasks are diverted to other idle EN to meet the business requirement through cooperation. In Benchmark method, for the heavily loaded EN the task can only queue in the access point's queue until there is enough free resources. With the increase of computing and storage resources of edge node, some tasks in the queue can be directly completed. It avoids part of waiting delays in the queue. Therefore, the average completion delay is significantly reduced. However, considering the different load degree in the ENs, some tasks still need to wait in the queue on the heavily loaded EN, so the effect is worse than that of TCA-IPSO and QBTD. In QBTD, the tasks cannot be divided and need to be assigned to other nodes, which brings more communication delay.  Figure 11 shows the average delay of the three task allocation mechanisms under different UE distribution unbalance degree. The distribution unbalance degree is represented by the variance σ of number of UEs associated with EN, . It can be seen that the average delay of the three task allocation mechanisms increases when σ increases. The average delay of TCA-IPSO is lower than QBTD and Benchmark. For example,when σ = 2.5 the average delay of TCA-IPSO, QBTD and Benchmark is 75ms, 81ms and 93ms respectively. Benchmark has the highest average delay because the higher load EN does not divert tasks to other EN. It causes tasks to queue and task completion delay increases. QBTD mechanism performs task assignment in the edge network, avoiding the phenomenon of task queuing and reducing the task completion delay. TCA-IPSO divides the task into subtasks, which are executed in parallel on two nodes to further reduce the average delay.

VI. CONCLUSION
The resources of edge nodes in the power IoT scene are limited, so it is necessary to meet all the increasing business processing demands timely through the cooperation of edge nodes. For the issue that edge node resource is limited and business requirements cannot be met at the same time in the power IoT scene, task allocation mechanism based on cooperative edge computing is proposed. First of all, task allocation model based on cooperation of two edge nodes is build. In the model business request, resource and delay are analyzed. According to whether the access point participates in cooperation the three cooperation methods are proposed. The model aims to minimize the average completion delay under the constraints of business requirements, and it describes the problem as an integer nonlinear programming problem. Then we propose TCA-IPSO algorithm, which improves the particle swarm optimization algorithm by applying the crossover and mutation strategy in the genetic algorithm to solve the problem. Finally the simulation results show that the TCA-IPSO algorithm reduces the average task completion delay by 53.8% and 36.0% compared to the benchmark and QBTD algorithm. TCA-IPSO algorithm can be applied in power IoT scene with massive business terminals and limited edge node resources to solve the problems of insufficient edge node resources and business processing capacity.
The TCA-IPSO algorithm proposed in this article is a heuristic algorithm. Due to the uncertainty of the heuristic algorithm, its complexity cannot be accurately measured, and the efficiency of solving the task allocation problem in the power IoT still can be improved. In the future, we will explore new hybrid algorithm and parallel optimization algorithm to further improve the algorithm search efficiency. He has authored about 100 SCI/EI indexed articles. He presides over a series of key research projects on network and service management, including the projects supported by the National Natural Science Foundation and the National High-Tech Research and Development Program of China.
ZHILI WANG is currently an Associate Professor with the Beijing University of Posts and Telecommunications, where he was engaged in research and standardization work in communication networks and computer science, and technology. He wrote more than eight ITU-T international standards. His main research interests include network management, communications software, and interface testing. He won one National Science and Technology Progress Award. He serves as the Working Party 2 Chairman for the ITU-T Study Group 2. VOLUME 8, 2020