A method for scheduling edge computing tasks based on ARPSO
By adopting ARPSO-based task scheduling method in edge computing, and using PSO optimization algorithm to iteratively optimize task scheduling, the problem of low task unloading efficiency in edge computing is solved, and the effect of shortening task unloading time and improving processing efficiency is achieved.
Patent Information
- Application Number
- CN202111625687.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-28
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2041-12-28
AI Technical Summary
In edge computing, how to effectively improve task offload efficiency and shorten task offload time, considering the limitations of edge node communication and computing resources.
Using the ARPSO-based edge computing task scheduling method, the PSO optimization algorithm uses the total task time as the adaptive value to iteratively optimize the edge computing task to find the optimal scheduling cluster with the shortest time.
It shortens the unloading time of edge computing tasks and improves the processing efficiency of edge computing tasks. It has the advantages of easy implementation, few parameters, fast convergence speed, and has better generalization performance and iterative effect.
Smart Images

Figure CN114296898B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to an edge computing task scheduling method based on ARPSO, and belongs to the technical field of task scheduling methods in the edge computing field. Background Art
[0002] With the advent of the Internet of Everything era, edge computing, as a key area of the new generation of intelligent cloud computing technology, can realize the real-time processing of complex intelligent applications at the edge, and large-scale data does not need to experience the delay of cloud transmission, thus greatly improving the quality of user service. However, considering the limited communication and computing resources of edge nodes, how to offload computing tasks is crucial, and what kind of task offloading method should be adopted to make the distributed computing processing mode of the edge end play the best effect and improve the efficiency of computing processing. Summary of the invention
[0003] The purpose of this invention is to effectively improve the efficiency of edge computing task offloading and shorten the task offloading time.
[0004] In order to achieve the above object, the present invention provides an edge computing task scheduling method based on ARPSO, which is characterized by comprising the following steps:
[0005] Step S1: Initialize the task scheduling cluster and wait for optimization: divide the task that needs to be scheduled into D subtasks. The task that needs to be scheduled can be represented by the subtask set X, where X = (x1, x2, ..., x D ), x D represents the Dth subtask in the subtask set X; defines the total number of edge virtual machine resources as N;
[0006] Based on the subtask set X and the N edge virtual machine resources that execute the subtasks, I scheduling clusters are formed.
[0007] Step S2: Initialize a particle swarm containing I particles based on the scheduling cluster obtained in step S1:
[0008] The position and velocity of each particle in the particle swarm are randomly initialized, where the position of the i-th particle in the particle swarm is X i =(x i1 , x i2 , ..., x in , …, x iN ), speed is V i , where X i is the coefficient vector of the i-th scheduling cluster obtained in step S1, i=1, 2, ..., I, and the n-th element in the coefficient vector is represented by x in, if a subtask in the subtask set X is assigned to the nth edge virtual machine resource, then x in Round to 1, otherwise x in Round to 0;
[0009] Set the speed V i Randomly initialize between [0-1];
[0010] After random initialization, X i Set it as the i-th current optimal position Pbest, then the current optimal position Pbest of each particle in the particle swarm can be obtained;
[0011] Step S4: Calculate the fitness value of each particle in the particle swarm containing I particles obtained in the previous step, and measure the quality of particle search performance by the total time. The shorter the total time, the higher the fitness value of the particle, and vice versa. The fitness value of the i-th particle in the particle swarm is expressed as fitness(X i ), then:
[0012]
[0013] The time required for the dth edge virtual machine resource assigned to the subtask in the scheduling cluster corresponding to the i-th particle to execute the current subtask;
[0014] Step S5: Use the following formula to iteratively calculate the particle swarm obtained in the previous step:
[0015] V i (t+1)=W×V i (t)+dir×[c1×rand()×(P i (t)-V i (t))+c2×rand()×(P g (t)-X i (t))]
[0016] X i (t+1)=X i (t)+V i (t+1)
[0017] Where V i (t) represents the velocity of the ith particle at the tth iteration; X i (t) represents the position of the ith particle at the tth iteration; W represents the inertia weight; c1, c2 represent acceleration constants, which are usually positive numbers; rand() represents a random number between 0 and 1; P i (t) represents the position of the tth iteration individual of the i-th particle; P g (t) represents the best position that the whole world has experienced; dlow Indicates the upper limit of diversity, d high Indicates the lower limit of diversity, The dimension of the search space is represented by N, |L| represents the longest radius of the search space, represents the average value of the nth element in the positions of all particles;
[0018] Step S6: rounding each element in the position of each particle obtained in the current iteration to 0 or 1, thereby obtaining a new particle group;
[0019] Step S7: Calculate the fitness value of each particle in the particle swarm obtained in the current iteration, and compare it with the fitness value of the corresponding particle obtained in the previous iteration. For each particle, if the fitness value of the current particle obtained in the current iteration is less than the fitness value of the same particle obtained in the previous iteration, the fitness value obtained in the current iteration is used as the current optimal position Pbest of the current particle;
[0020] After the current optimal position Pbest is updated, the fitness value of each particle in the particle swarm obtained in the current iteration is compared with the fitness value of the particle in the previous iteration corresponding to the global optimal position Gbest obtained in the previous iteration. If the fitness value of the particle obtained in the current iteration is less than the fitness value of the particle in the previous iteration, the global optimal position Gbest is updated to the current optimal position Gbest of the current particle.
[0021] After traversing each particle in the particle group, return to step S5 for the next iteration until the iteration termination condition is met and enter step S8;
[0022] Step S8: Obtain the global optimal position Gbest, and obtain the optimal scheduling cluster according to the global optimal position Gbest.
[0023] Preferably, in step S1, an initial random scheduling strategy is adopted to form I scheduling clusters.
[0024] Preferably, in step S7, during the first iteration, the current optimal position Pbest corresponding to the particle with the smallest fitness value is selected from all particles as the global optimal position Gbest.
[0025] The present invention proposes an edge computing task scheduling method based on ARPSO, which uses the PSO optimization algorithm ARPSO and takes the total task time as the fitness value to iteratively optimize the edge computing task scheduling and find the optimal value with the shortest edge computing task time, thereby shortening the task offloading time of edge computing and improving the edge computing task processing efficiency. The algorithm proposed in the present invention has the advantages of easy implementation, few required parameters, fast convergence speed, etc., and also has better generalization performance and iteration effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 It is a flow chart of the present invention. DETAILED DESCRIPTION
[0027] The present invention will be further described below in conjunction with specific embodiments. It should be understood that these embodiments are only used to illustrate the present invention and are not intended to limit the scope of the present invention. In addition, it should be understood that after reading the content taught by the present invention, those skilled in the art can make various changes or modifications to the present invention, and these equivalent forms fall within the scope limited by the appended claims of the application equally.
[0028] The edge computing task scheduling method based on ARPSO disclosed in this embodiment specifically includes the following steps:
[0029] Step S1: Initialize the task scheduling cluster and wait for optimization: divide the task that needs to be scheduled into D subtasks. The task that needs to be scheduled can be represented by the subtask set X, where X = (x1, x2, ..., x D ), x D Represents the Dth subtask in the subtask set X; the total number of edge virtual machine resources is defined as N.
[0030] Based on the subtask set X and the N edge virtual machine resources that execute the subtasks, an initial random scheduling strategy is used to form I scheduling clusters.
[0031] Step S2: Initialize a particle swarm containing I particles based on the scheduling cluster obtained in step S1:
[0032] The position and velocity of each particle in the particle swarm are randomly initialized, where the position of the i-th particle in the particle swarm is X i =(x i1 , x i2 , ..., x in , ..., x iN ), speed is V i .X i is the coefficient vector of the i-th scheduling cluster obtained in step S1, i=1, 2, ..., I, and the n-th element in the coefficient vector is represented by x in, if a subtask in the subtask set X is assigned to the nth edge virtual machine resource, then x in Round to 1, otherwise x in Round to 0.
[0033] Set the speed V i Initialize randomly between [0-1].
[0034] After random initialization, X i Set it as the i-th current optimal position Pbest, then the current optimal position Pbest of each particle in the particle swarm can be obtained.
[0035] Step S4: Calculate the fitness value of each particle in the particle swarm containing I particles obtained in the previous step, and measure the quality of particle search performance by the total time. The shorter the total time, the higher the fitness value of the particle, and vice versa. The fitness value of the i-th particle in the particle swarm is expressed as fitness(X i ), then:
[0036]
[0037] The time required for the dth edge virtual machine resource assigned to the subtask in the scheduling cluster corresponding to the i-th particle to execute the current subtask;
[0038] Step S5: Use the following formula to iteratively calculate the particle swarm obtained in the previous step:
[0039] V i (t+1)=W×V i (t)+dir×[c1×rand()×(P i (t)-V i (t))+c2×rand()×(P g (t)-X i (t))]
[0040] X i (t+1)=X i (t)+V i (t+1)
[0041] Where V i (t) represents the velocity of the ith particle at the tth iteration; X i (t) represents the position of the ith particle at the tth iteration; W represents the inertia weight; c1, c2 represent acceleration constants, which are usually positive numbers; rand() represents a random number between 0 and 1; P i (t) represents the position of the tth iteration individual of the i-th particle; P g (t) represents the best position that the whole world has experienced; dlow Indicates the upper limit of diversity, d high Indicates the lower limit of diversity. The dimension of the search space is represented by N, |L| represents the longest radius of the search space, Represents the average value of the nth element in the positions of all particles.
[0042] Step S6: rounding each element in the position of each particle obtained in the current iteration to 0 or 1, thereby obtaining a new particle group.
[0043] Step S7: Calculate the fitness value of each particle in the particle swarm obtained in the current iteration, and compare it with the fitness value of the corresponding particle obtained in the previous iteration. For each particle, if the fitness value of the current particle obtained in the current iteration is less than the fitness value of the same particle obtained in the previous iteration, the fitness value obtained in the current iteration is used as the current optimal position Pbest of the current particle.
[0044] After the current optimal position Pbest is updated, the fitness value of each particle in the particle swarm obtained in the current iteration is compared with the fitness value of the particle in the previous iteration corresponding to the global optimal position Gbest obtained in the previous iteration. If the fitness value of the particle obtained in the current iteration is less than the fitness value of the particle in the previous iteration, the global optimal position Gbest is updated to the current optimal position Gbest of the current particle. In the first iteration, the current optimal position Pbest corresponding to the particle with the smallest fitness value is selected from all particles as the global optimal position Gbest.
[0045] After traversing each particle in the particle group, return to step S5 for the next iteration until the maximum number of iterations is met and enter step S8.
[0046] Step S8: Obtain the global optimal position Gbest, and obtain the optimal scheduling cluster according to the global optimal position Gbest.
Claims
1. An edge computing task scheduling method based on ARPSO, characterized in that: The following steps are involved: Step S1: Initialize the task scheduling cluster and wait for optimization: divide the task that needs to be scheduled into D subtasks. The task that needs to be scheduled can be represented by the subtask set X, where X = (x1, x2, ..., x D ), x D represents the Dth subtask in the subtask set X; Define the total number of edge virtual machine resources as N; Based on the subtask set X and the N edge virtual machine resources that execute the subtasks, form a scheduling cluster I; Step S2: Initialize a particle swarm containing I particles based on the scheduling cluster obtained in step S1: The position and velocity of each particle in the particle swarm are randomly initialized, where the position of the i-th particle in the particle swarm is X i =(x i1 , x i2 , ..., x in , ..., x iN ), speed is V i , where X i is the coefficient vector of the i-th scheduling cluster obtained in step S1, i=1, 2, ..., I, and the n-th element in the coefficient vector is represented by x in , if a subtask in the subtask set X is assigned to the nth edge virtual machine resource, then x in Round to 1, otherwise x in Round to 0; Set the speed V i Randomly initialize between [0-1]; After random initialization, X i Set it as the i-th current optimal position Pbest, then the current optimal position Pbest of each particle in the particle swarm can be obtained; Step S4: Calculate the fitness value of each particle in the particle swarm containing I particles obtained in the previous step, and measure the quality of particle search performance by the total time. The shorter the total time, the higher the fitness value of the particle, and vice versa. The fitness value of the i-th particle in the particle swarm is expressed as fitness(X i ), then: The time required for the dth edge virtual machine resource assigned to the subtask in the scheduling cluster corresponding to the i-th particle to execute the current subtask; Step S5: Use the following formula to iteratively calculate the particle swarm obtained in the previous step: V i (t+1)=W×V i (t)+dir×[c1×rand()×(P i (t)-V i (t))+c2×rand()×(P g (t)-X i (t))] X i (t+1)=X i (t)+V i (t+1) Where V i (t) represents the velocity of the ith particle at the tth iteration; X i (t) represents the position of the ith particle at the tth iteration; W represents the inertia weight; c1, c2 represent the acceleration constants; rand() represents a random number between 0 and 1; P i (t) represents the position of the tth iteration individual of the i-th particle; P g (t) represents the best position that the whole world has experienced; d low Indicates the upper limit of diversity, d high Indicates the lower limit of diversity, The dimension of the search space is represented by N, |L| represents the longest radius of the search space, represents the average value of the nth element in the positions of all particles; Step S6: rounding each element in the position of each particle obtained in the current iteration to 0 or 1, thereby obtaining a new particle group; Step S7: Calculate the fitness value of each particle in the particle swarm obtained in the current iteration, and compare it with the fitness value of the corresponding particle obtained in the previous iteration. For each particle, if the fitness value of the current particle obtained in the current iteration is less than the fitness value of the same particle obtained in the previous iteration, the fitness value obtained in the current iteration is used as the current optimal position Pbest of the current particle; After the current optimal position Pbest is updated, the fitness value of each particle in the particle swarm obtained in the current iteration is compared with the fitness value of the particle in the previous iteration corresponding to the global optimal position Gbest obtained in the previous iteration. If the fitness value of the particle obtained in the current iteration is less than the fitness value of the particle in the previous iteration, the global optimal position Gbest is updated to the current optimal position Gbest of the current particle. After traversing each particle in the particle group, return to step S5 for the next iteration until the iteration termination condition is met and enter step S8; Step S8: Obtain the global optimal position Gbest, and obtain the optimal scheduling cluster according to the global optimal position Gbest.
2. The edge computing task scheduling method based on ARPSO as claimed in claim 1, characterized in that: In step S1, an initial random scheduling strategy is adopted to form I scheduling clusters.
3. The edge computing task scheduling method based on ARPSO as claimed in claim 1, characterized in that: In step S7, during the first iteration, the current optimal position Pbest corresponding to the particle with the smallest fitness value is selected from all particles as the global optimal position Gbest.
Citation Information
Patent Citations
Edge computing task scheduling algorithm based on PSO optimization
CN112286686A
Cited By
Intelligent resource scheduling method and system based on edge computing
CN120315833A