An edge cloud collaborative task offloading method based on adaptive covariance matrix evolution strategy
By adopting an edge cloud collaborative task offload method based on adaptive covariance matrix evolution strategy in mobile edge computing, the problems of high computing load, delay and energy consumption caused by NP completeness in the computational offload problem are solved, and more efficient computing offloading and system performance optimization are achieved.
Patent Information
- Application Number
- CN202210241749.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-11
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2042-03-11
AI Technical Summary
In mobile edge computing, the computational offloading problem is an NP complete integer nonlinear programming problem, and the prior art is difficult to effectively reduce the system's computing load, delay and energy consumption.
The edge cloud collaborative task offload method based on the adaptive covariance matrix evolution strategy is adopted. By building a three-layer computing offload model, the cloud service computing center is introduced, and the time delay and energy consumption in the calculation process are optimized.
It effectively reduces the computing load, delay and energy consumption of edge computing systems, improves the overall performance of the system, and shows that its performance is superior to other classic heuristic algorithms through simulation experiments.
Smart Images

Figure CN114625506B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of Internet of Things, and specifically relates to an edge cloud collaborative task offloading method based on an adaptive covariance matrix evolution strategy. Background Art
[0002] In mobile edge computing, computation offloading is a key factor affecting system performance. The computation offloading problem in MEC (Mobile Edge Computing) is an NP-complete (Non-deterministic Polynomial) integer nonlinear programming problem. The methods used to solve this type of problem are called optimization methods. Optimization methods are categorized as exact algorithms, heuristic algorithms, metaheuristic algorithms, and reinforcement learning.
[0003] Exact algorithms can guarantee a globally optimal solution to a problem, but this comes at the cost of significant computational resources and time. For example, for NP-complete problems, obtaining an exact solution typically requires searching the entire solution space, which consumes enormous amounts of time and computational resources. Therefore, exact algorithms are only suitable for solving computational tasks that are not time-critical.
[0004] Heuristic algorithms are suitable for solving specific problems. They formulate appropriate rules and constraints for these specific problems to achieve optimal solutions. Their computational time is also predictable when solving NP-complete problems. However, heuristic algorithms also have inherent drawbacks. They can only customize specific rules and constraints for specific problems, and their generalization capabilities are limited. Furthermore, heuristic algorithms are not guaranteed to achieve a globally optimal solution and often only produce suboptimal solutions, meaning they are prone to becoming trapped in local optimal solutions.
[0005] The classic approach to edge computing offloading is metaheuristics. Metaheuristics are the most advanced methodologies or general algorithmic templates in optimization. Metaheuristics include genetic algorithms, particle swarm algorithms, simulated annealing algorithms, immune optimization algorithms derived from genetic algorithms, fish swarm algorithms, ant colony algorithms, and various variants of particle swarm algorithms. Metaheuristics are more advanced heuristics, most of which draw on natural evolutionary principles. Compared to heuristics, metaheuristics do not require specialized operations tailored to specific problems. Metaheuristics have strong generalization capabilities and can serve as a general template for solving NP-complete problems. Summary of the Invention
[0006] The purpose of the present invention is to reduce the computing load, latency, energy consumption, etc. of the entire MEC system, and to provide an edge cloud collaborative task offloading method based on an adaptive covariance matrix evolution strategy. For the MEC computing offloading scenario of community smart terminals, the present invention models the computing offloading model as a three-layer computing offloading model of an end-MEC-cloud architecture. In response to the problem of insufficient computing power for complex computing tasks in edge computing, a cloud service computing center is introduced to expand the computing power of edge computing. In order to jointly optimize the latency and energy consumption in the computing process, a covariance matrix adaptive evolution algorithm is used to make offloading decisions. Through theoretical analysis, the order of task calculations in the MEC server or cloud server has an important influence on the overall latency of the offloading model architecture. In order to reduce the offloading delay during the offloading process, the delay is further reduced by introducing a short job priority algorithm.
[0007] The edge cloud collaborative task offloading method based on the adaptive covariance matrix evolution strategy of the present invention mainly includes the following key steps:
[0008] 1. Construction of system model:
[0009] Section 1.1, Edge-Cloud Collaborative Computing Offloading Model;
[0010] Section 1.2, Task Offloading Communication Model;
[0011] Section 1.3,Task offloading computational model;
[0012] Section 1.4, Problem Formulation;
[0013] Second, algorithm design:
[0014] Section 2.1, Shortest Job Priority Task Scheduling Strategy;
[0015] Section 2.2. Edge cloud collaborative computing offloading method based on CMAES (Covariance Matrix Adaptation Evolution Strategy).
[0016] In step 1.1, an edge-cloud collaborative computing offloading model is established. This model consists of smart devices, edge servers, and cloud service devices. When smart devices have complex computing tasks that need to be offloaded, and the local devices and edge servers cannot meet the latency and energy consumption requirements, they can choose to offload to the remote ECS (Elastic Compute Service). At the same time, when the edge server and the ECS remote cloud server execute the computing task, the computing task monopolizes the entire computing resources until the calculation is completed. When multiple tasks are offloaded to the edge server or ECS server at the same time, the SJF (Short Job First) algorithm will be responsible for making offloading scheduling decisions.
[0017] The task offloading communication model in step 1.2 is as follows: the smart device sends the computationally intensive tasks it generates to offload to a nearby edge server via a wireless connection. The edge server places the received tasks into a scheduling queue based on their arrival time. The Shannon formula can be used to calculate the transmission rate of the computing tasks from the smart device to the edge server as follows:
[0018]
[0019] where w i The wireless bandwidth allocated to the local device, in hz; p i is the transmit power of the local device, in W; D i is the distance from the local device to the edge server, in meters; α is the path loss exponent; N0 is the noise power spectrum density, in w / hz;
[0020] The transmission time for smart devices to offload tasks to edge servers via wireless connections is expressed as:
[0021]
[0022] The transmission energy consumption is as follows:
[0023] E t1 =P i ×T t1 (3)
[0024] When choosing to offload the computing task to ECS, the local device needs to upload the computing task to the edge server, and the edge server then needs to upload the computing task to ECS for calculation; that is, when measuring the offloading delay and energy consumption of the task, it is necessary to consider the transmission delay and transmission energy consumption of the local device uploading the task to the edge server; the transmission delay and transmission energy consumption when the edge device uploads the computing task to ECS; the computing delay and computing energy consumption of the offloaded task in ECS; during the offloading process, when uploading the computing task to the edge server, the transmission delay is as shown in formula (2), and the transmission energy consumption is as shown in formula (3);
[0025] When an edge server uploads computing tasks to an ECS instance, the transmission rate is related to the distance between the edge server and the ECS instance. According to Shannon's theorem, the transmission rate from the edge server to the ECS instance is as follows:
[0026]
[0027] where v m is the transmission rate from the edge server of the cell where the local device is located to the ECS; w m The bandwidth allocated to the edge server of the cell where the local device is located, in hz; p mD is the transmission power of the cell edge server where the local device is located, in W; m is the distance from the edge server of the cell where the local device is located to the ECS, in meters. Therefore, the transmission delay from the edge server of the cell where the local device is located to the ECS is:
[0028]
[0029] When the edge server receives a computing task and uploads it to the ECS, the transmission energy consumption is:
[0030] E t2 =p m ×T t2 (6)
[0031] The task offloading calculation model in step 1.3 is as follows. When the computing task is offloaded to the local device, local computing latency and local computing energy consumption need to be considered. Latency is related to the processing power of the local device's CPU (Central Processing Unit), the CPU cycle frequency, and the data size of the computing task. Energy consumption is related to the CPU computing energy consumption and the data size of the computing task. Therefore, the calculation formula for local latency and energy consumption is:
[0032]
[0033] Among them B i Indicates the amount of data for the computing task, in bits; C u,i Indicates the CPU data processing capability of the local device, in cycles / bit; F u,i Indicates the CPU cycle frequency of the local device, in GHZ; η i Indicates the computing power of the local device, in J / Gigacycle;
[0034] When the computing task is offloaded to the edge server, the computing latency is:
[0035]
[0036] The computing energy consumption of the edge server is:
[0037] E mc =B i ×C m ×η m (9)
[0038] When the computing task is offloaded to the edge server, the total delay and total energy consumption are:
[0039]
[0040] Among them C mF is the CPU data processing capability of the cell edge server, in cycles / bit; m is the CPU cycle frequency of the cell edge server, in GHZ; η m The CPU computing power of the cell edge server, in J / Gigacycle;
[0041] After the ECS receives a computing task, computing latency and computing energy consumption will be generated. The computing latency is:
[0042]
[0043] ECS calculates energy consumption as:
[0044] E ec =B i ×C e ×η e (12)
[0045] When computing tasks are offloaded to ECS, the total latency and total energy consumption during the offloading process are shown below.
[0046]
[0047] Among them C e F is the CPU data processing capability of the cloud server, in cycles / bit; e is the CPU cycle frequency of the cloud server, in GHZ; η e This is the CPU power of the cloud server, in J / Gigacycle.
[0048] The problem in step 1.4 is formulated as follows: map the total delay and total energy consumption to the range [0, 1] using a mapping function so that the delay and energy consumption have the same magnitude of impact on the overall fitness. At the same time, set the maximum delay and maximum energy consumption for the overall delay and energy consumption. The optimization objectives are as follows:
[0049]
[0050] Where T max is the highest delay; E max is the maximum energy consumption; h(x) is the mapping function; g is the weight factor used to measure the ratio of delay to energy consumption, y i The offload location of the offload task. 0 means offloading to the local device, 1 means offloading to the edge server, and 2 means offloading to ECS.
[0051] Therefore, our goal is to find a point x in the feasible set. *, so that the objective function fitness(x) takes the minimum value at this point, that is, the process that satisfies the above formula (14) is called the optimization process, where x * It is called the optimal solution of the problem, fitness(x * ) is called the optimal value, if x * ∈D, for all x∈D, there is always f(x * )≤f(x), then x * is the global optimal solution to the optimization problem, if x * ∈D, there exists a domain N ε (x * ), so that for all x∈N ε (x * )∩D, where N ε (x * )={x|||xx * ||<ε,ε>0}, there is always f(x * )≤f(x) then x * It is the local optimal solution of the optimization problem;
[0052] From this, we can see that the offloading decision process is an optimization process. By optimizing the target fitness function, we can indirectly jointly optimize latency and energy consumption. Furthermore, the offloading decision is a non-convex, nonlinear integer programming problem.
[0053] Furthermore, in step 2.1, the Shortest Job First (SJF) algorithm is used for task scheduling. During the edge cloud collaborative computing offloading process, when the offloaded task is chosen to be calculated on the edge server or ECS server, the computing task completely occupies the computing resources of the entire server until the calculation is completed. When multiple tasks are offloaded to the edge server or ECS server at the same time, in addition to the computing delay of the computing task in the server, there is also a queuing delay;
[0054] During the computation offloading process, average latency and average energy consumption are optimized. To reduce the actual average computation latency, the shortest job priority method is used to sort the tasks offloaded to the same server in ascending order of theoretical computation latency, thereby reducing the latency of the entire system.
[0055] The specific process of the shortest job priority scheduling algorithm is as follows:
[0056] Step 1: Obtain all computing tasks that need to be offloaded to this server;
[0057] Step 2: Sort the obtained computing tasks in ascending order based on their theoretical calculation delays;
[0058] Step 3: After sorting, recalculate the actual calculation delay: theoretical calculation delay + waiting delay;
[0059] Step 4: Update the actual computational latency of the computational task.
[0060] The design of the CMAES-based edge cloud collaborative computing offloading method in step 2.2 is described as follows. The CMAES algorithm is an efficient search algorithm developed from a natural evolution strategy. By utilizing the high guidance of the covariance matrix and the principle of maximum entropy of the Gaussian distribution when the mean and variance are known, the CMAES algorithm has the advantages of high efficiency, reliability, and globality. The population evolution formula of the CMAES algorithm is:
[0061] x k (g+1) ~m (g) +σ (g) N(0,C (g) ) k∈[1,λ] (15)
[0062] Where λ represents the population size; x k (g+1) represents the kth individual in the g+1th generation; m (g) represents the mean of the g-th generation population; σ (g) Indicates the step length of the g-th generation; N(0,C (g) ) means the mean is 0, and the covariance matrix is C (g) Normal distribution;
[0063] The mean m (g) The calculation of the g-th generation population needs to be sorted from small to large according to the fitness size, and the first μ individuals, m (g) The calculation formula is:
[0064]
[0065] where ω i Indicates the weight of the i-th individual in the g-th generation population. (g) The individuals involved in the calculation of the mean value are the first μ individuals of the g-th generation sorted by fitness from small to large, that is, ω i ≥ω2≥...≥0, so that the overall optimization path of the population can evolve in the direction of minimum fitness, and the mean m (g) The generalized update formula is:
[0066]
[0067] where c m is the learning rate, step size σ (g) The update formula is:
[0068]
[0069] Where I is the covariance matrix C of the previous generation. When g = 1, I = C. The calculation formula of the g-th generation covariance matrix is:
[0070]
[0071] According to the above formula, when the optimal individual meets the requirements or the number of iterations reaches the maximum threshold during the CMAES algorithm optimization process, the execution is terminated and the optimal individual is returned as the final result. During the population evolution process, the CMAES algorithm selects the optimal μ individuals in the population to calculate the mean. At the same time, it uses the principle of maximum entropy of normal distribution when the mean and covariance are known, which optimizes the search path of the population and expands the search space.
[0072] The specific process of the calculation offloading algorithm is as follows:
[0073] Step 1: Initialize static parameters λ, μ, ω i=1,2,...,μ ,c m ,max_iter,σ (g) ,m g ,C=I,x, etc.;
[0074] Step 2: Determine whether the population has reached the maximum number of iterations or meets the unloading requirements. If so, terminate the iteration; otherwise, continue with steps 3 to 8.
[0075] Step 3: Sample the population, formula (15);
[0076] Step 4: Recalculate the fitness value of the individual according to the algorithm for the sampled population;
[0077] Step 5: Generate a new population, combine the sampled population with the parent population to form a new population, and according to the recalculated individual fitness values, intercept the first μ individuals as the next generation of the new population;
[0078] Step 6: Update the mean m based on the new population (g) , formula (17);
[0079] Step 7: Adjust the step size, formula (18);
[0080] Step 8: Update the covariance matrix, formula (19).
[0081] Advantages and positive effects of the present invention:
[0082] The present invention mainly designs an edge cloud collaborative task offloading method based on an adaptive covariance matrix evolution strategy. The CMAES algorithm has powerful global search capabilities and efficient optimization efficiency, and is suitable for solving NP-complete integer nonlinear programming problems. In response to the problem of insufficient computing power in the two-layer edge computing offloading architecture, a cloud service computing center is introduced to improve the computing power of edge computing. Latency and energy consumption are jointly optimized in the computing offloading decision. Through theoretical analysis, the order of task calculation in the server is an important factor affecting the overall latency in the computing offloading system. The Short Job First (SJF) scheduling algorithm is introduced in CMAES to reduce the overall latency in the computing offloading system. Finally, through simulation experiments and comparison with other classic heuristic algorithms, the experimental results show that compared with other algorithms, the algorithm proposed in the present invention has good performance in edge computing offloading. BRIEF DESCRIPTION OF THE DRAWINGS
[0083] Figure 1 It is a comparison chart of algorithm fitness;
[0084] Figure 2 This is a comparison chart of algorithm delays;
[0085] Figure 3 This is a comparison chart of algorithm energy consumption;
[0086] Figure 4 This is a fitness comparison chart under different numbers of terminals;
[0087] Figure 5 This is a delay comparison chart under different terminal numbers;
[0088] Figure 6 This is a comparison chart of energy consumption under different numbers of terminals;
[0089] Figure 7 It is the influence diagram of different weight factors on fitness;
[0090] Figure 8 This is a graph showing the impact of different weight factors on delay;
[0091] Figure 9 It is the effect diagram of different weight factors on energy consumption;
[0092] Figure 10 It is a flow chart of the method of the present invention. DETAILED DESCRIPTION
[0093] Example 1:
[0094] This paper uses Python to conduct three sets of simulation experiments. Experiment 1: Comparing the convergence of the CMAES algorithm with other algorithms in terms of fitness, latency, and energy consumption. Experiment 2: Comparing the impact of different user numbers on the algorithm. Experiment 3: Comparing the impact of different weighting factors on the algorithm.
[0095] See attached Figure 10 This embodiment is based on an edge cloud collaborative task offloading method based on an adaptive covariance matrix evolution strategy, which mainly includes the following key steps:
[0096] 1. Construction of system model:
[0097] Section 1.1, Edge-Cloud Collaborative Computing Offloading Model;
[0098] Section 1.2, Task Offloading Communication Model;
[0099] Section 1.3,Task offloading computational model;
[0100] Section 1.4, Problem Formulation;
[0101] Second, algorithm design:
[0102] Section 2.1, Shortest Job Priority Task Scheduling Strategy;
[0103] Section 2.2. Edge cloud collaborative computing offloading method based on CMAES.
[0104] In step 1.1, we established an edge-cloud collaborative computing offloading model. This model consists of smart devices, edge servers, and cloud service devices. When a smart device has complex computing tasks that need to be offloaded, and the local device and edge server cannot meet the latency and energy requirements, it can choose to offload to a remote ECS. When multiple tasks are offloaded simultaneously to an edge server or ECS server, the SJF algorithm is responsible for making offloading scheduling decisions.
[0105] The task offloading communication model in step 1.2 is as follows: the smart device sends the computationally intensive tasks it generates to offload to a nearby edge server via a wireless connection. The edge server places the received tasks into a scheduling queue based on their arrival time. The Shannon formula can be used to calculate the transmission rate of the computing tasks from the smart device to the edge server as follows:
[0106]
[0107] where w i The wireless bandwidth allocated to the local device, in hz; p i is the transmit power of the local device, in W; D iis the distance from the local device to the edge server, in meters; α is the path loss exponent; N0 is the noise power spectrum density, in w / hz.
[0108] Then the transmission time for the smart device to offload the task to the edge server through wireless connection is expressed as:
[0109]
[0110] Among them, B i Indicates the amount of data for the computation task;
[0111] The transmission energy consumption is as follows:
[0112] E t1 =P i ×T t1 (3)
[0113] When offloading computing tasks to an ECS instance, the local device must upload the computing task to the edge server, which then uploads the computing task to the ECS instance for computation. Based on Shannon's theorem, the transmission rate from the edge server to the ECS instance is as follows.
[0114]
[0115] where v m is the transmission rate from the edge server of the cell where the local device is located to the ECS; w m The bandwidth allocated to the edge server of the cell where the local device is located, in hz; p m D is the transmission power of the cell edge server where the local device is located, in W; m is the distance from the edge server of the cell where the local device is located to the ECS, in meters. Therefore, the transmission delay from the edge server of the cell where the local device is located to the ECS is:
[0116]
[0117] When the edge server receives a computing task and uploads it to the ECS, the transmission energy consumption is:
[0118] E t2 =p m ×T t2 (6)
[0119] The task offloading calculation model in step 1.3 is as follows. When the computing task is offloaded to the local device, local computing latency and local computing energy consumption need to be considered. Latency is related to the local device's CPU processing power, CPU cycle frequency, and the amount of data in the computing task. Energy consumption is related to the CPU's computing energy consumption and the amount of data in the computing task. Therefore, the calculation formula for local latency and energy consumption is:
[0120]
[0121] Among them B i Indicates the amount of data for the computing task, in bits; C u,i Indicates the CPU data processing capability of the local device, in cycles / bit; F u,i Indicates the CPU cycle frequency of the local device, in GHZ; η i Indicates the computing power of the local device, in J / Gigacycle.
[0122] When the computing task is offloaded to the edge server, the computing latency is:
[0123]
[0124] The computing energy consumption of the edge server is:
[0125] E mc =B i ×C m ×η m (9)
[0126] When the computing task is offloaded to the edge server, the total delay and total energy consumption are:
[0127]
[0128] Among them C m F is the CPU data processing capability of the cell edge server, in cycles / bit; m is the CPU cycle frequency of the cell edge server, in GHZ; η m CPU computing power of the cell edge server (unit: J / Gigacycle).
[0129] After the ECS receives a computing task, computing latency and computing energy consumption will be generated. The computing latency is:
[0130]
[0131] ECS calculates energy consumption as:
[0132] E ec =B i ×C e ×η e (12)
[0133] When computing tasks are offloaded to ECS, the total latency and total energy consumption during the offloading process are shown below.
[0134]
[0135] Among them C e F is the CPU data processing capability of the cloud server, in cycles / bit; e is the CPU cycle frequency of the cloud server, in GHZ; η e This is the CPU power of the cloud server, in J / Gigacycle.
[0136] The problem in step 1.4 is formulated as follows: Map the total latency and total energy consumption to the range [0, 1] using a mapping function so that latency and energy consumption have the same magnitude of impact on overall fitness. Also, set a maximum latency and maximum energy consumption for the overall latency and energy consumption. The optimization objectives are as follows:
[0137]
[0138] Where T max is the highest delay; E max is the maximum energy consumption; h(x) is the mapping function; g is the weight factor used to measure the ratio of delay to energy consumption. i The offload location of the offload task. 0 means offloading to the local device, 1 means offloading to the edge server, and 2 means offloading to ECS.
[0139] Furthermore, in step 2.1, the Shortest Job First (SJF) algorithm is used for task scheduling.
[0140] The specific process of the shortest job priority scheduling algorithm is as follows:
[0141] Step 1: Obtain all computing tasks that need to be offloaded to this server.
[0142] Step 2: Sort the obtained computing tasks in ascending order based on their theoretical calculation delays.
[0143] Step 3: After sorting, recalculate the actual calculation delay: theoretical calculation delay + waiting delay.
[0144] Step 4: Update the actual computational latency of the computational task.
[0145] The design of the CMAES-based edge cloud collaborative computing offloading method in step 2.2 is described below. The CMAES algorithm is an efficient search algorithm developed from a natural evolution strategy. By leveraging the high guiding property of the covariance matrix and the principle of maximum entropy of the Gaussian distribution when the mean and variance are known, the CMAES algorithm has the advantages of efficiency, reliability, and globality. The population evolution formula of the CMAES algorithm is:
[0146]
[0147] Where λ represents the population size; represents the kth individual in the g+1th generation; m (g) represents the mean of the g-th generation population; σ (g) Indicates the step length of the g-th generation; N(0,C (g) ) means the mean is 0, and the covariance matrix is C (g) Normal distribution.
[0148] The mean m (g) The calculation of necessitates sorting the g-th generation population from small to large according to fitness, and taking the first μ individuals. (g) The calculation formula is:
[0149]
[0150] where ω i Indicates the weight of the i-th individual in the g-th generation population. (g) The individuals involved in the calculation of the mean value are the first μ individuals of all individuals in the g-th generation sorted from small to large according to fitness. ω i ≥ω2≥...≥0, so that the overall optimization path of the population can evolve in the direction of minimum fitness. Mean m (g) The generalized update formula is:
[0151]
[0152] where c m is the learning rate. Step size σ (g) The update formula is:
[0153]
[0154] Where I is the covariance matrix C of the previous generation. When g = 1, I = C. The formula for calculating the g-th generation covariance matrix is:
[0155]
[0156] According to the above formula, when the optimal individual meets the requirements or the number of iterations reaches the maximum threshold during the CMAES algorithm optimization process, the execution is terminated and the optimal individual is returned as the final result.
[0157] The specific process of the computation offloading algorithm is as follows.
[0158] Step 1: Initialize static parameters λ, μ, ω i=1,2,...,μ ,c m ,max_iter,σ (g) ,m g ,C=I,x, etc.
[0159] Step 2: Determine whether the population has reached the maximum number of iterations or meets the unloading requirements. If so, terminate the iteration; otherwise, continue with steps 3 to 8.
[0160] Step 3: Sample the population, formula (15).
[0161] Step 4: Recalculate the fitness value of the individual in the sampled population according to the algorithm.
[0162] Step 5: Generate a new population by combining the sampled population with the parent population. Based on the recalculated individual fitness values, the first μ individuals are selected as the next generation population.
[0163] Step 6: Update the mean m based on the new population (g) , formula (17).
[0164] Step 7: Adjust the step size, formula (18).
[0165] Step 8: Update the covariance matrix, formula (19).
[0166] The experimental parameters of the simulation experiment are shown in Table 1.
[0167] Table 1 Simulation parameters
[0168]
[0169]
[0170] The simulation results are as follows:
[0171] 1. Convergence comparison
[0172] In the algorithm convergence comparison experiment, the number of edge servers was set to 10, the number of terminal devices under the edge servers was set to 40, and the weighting factor of latency and energy consumption in the fitness function was set to 0.5. The proposed algorithm was compared with the genetic algorithm (GA), the artificial fish swarm algorithm (AFSA), and the differential evolution algorithm (DE).
[0173] 1) Comparison of algorithm convergence fitness
[0174] From the attached Figure 1As can be seen, the AFSA and DE algorithms failed to optimize their fitness values to negative values, indicating that the latency or energy consumption in the AFSA and DE algorithms exceeded the maximum threshold. However, the GA and the proposed algorithm both achieved negative fitness values, indicating that both algorithms met the requirements for latency and energy consumption.
[0175] 2) Algorithm latency comparison and energy consumption comparison
[0176] Figure 2 and Figure 3 The figures show a comparison of latency and energy consumption, respectively. As can be seen from the figures, the proposed algorithm achieves significantly lower latency and energy consumption than the optimization results of other algorithms, demonstrating a more pronounced optimization effect. The proposed algorithm boasts stronger global search capabilities, faster convergence, and higher efficiency than other algorithms.
[0177] 2. The impact of the number of users on the algorithm
[0178] The experiment was conducted with 50, 100, 150, 200, and 250 edge devices, 10 edge servers, and g = 0.85 as the weight factor in the fitness calculation formula. The proposed algorithm was tested against GA, AFSA, DE, and IA algorithms. Other experimental parameters are shown in Table 1.
[0179] From the attached Figure 4 To the attached Figure 6 The comparison of fitness, latency, and energy consumption under different numbers of terminals shows that the proposed algorithm achieves the lowest latency and energy consumption in all scenarios. As the number of edge devices increases, the gap between the proposed algorithm and other algorithms in latency and energy consumption becomes more pronounced. Combined with the first set of experiments, the proposed algorithm outperforms other traditional swarm intelligence algorithms in global search capability, convergence speed, and stability.
[0180] 3. The impact of weight factors on the algorithm
[0181] The offloading algorithm proposed in this paper uses a weight factor, g, to adjust the contribution of latency and energy consumption to fitness during the optimization process (Formula 14). Since latency and energy consumption are not on the same order of magnitude in the optimization objective function, a mapping function is designed to map latency and energy consumption to the interval [0, 1], thereby eliminating the impact of these different orders of magnitude on fitness. Therefore, in addition to the offloading decision, the impact of the weight factor on the algorithm must also be considered to influence the effectiveness of computational offloading.
[0182] In this experiment, the number of edge servers is set to 10, the number of terminal devices under each edge server is 200, the maximum energy consumption threshold is 1000 J, and other parameter settings are shown in Table 1. When all other parameters are the same, the weight parameters are set to g = 0.1, g = 0.3, g = 0.5, g = 0.7, and g = 0.9 respectively for the experiment.
[0183] Attachment Figure 7 Indicates the impact of different weights on fitness. It can be seen that the size of the weight factor has no obvious effect on the overall fitness, but the effects on the delay and energy consumption are very different. Figure 8 With attached Figure 9 The following table shows the impact of different weighting factors on latency and energy consumption. It can be seen that when the weighting factor g = 0.5, the optimization of both latency and energy consumption is optimal. When the weighting factor approaches 0, the optimization focus shifts more towards energy consumption, while when the weighting factor approaches 1, the optimization focus shifts more towards latency. This phenomenon is consistent with the change in the optimization objective function. Therefore, when offloading edge cloud collaborative computing, it is recommended to set the weighting factor to 0.5 for better results.
Claims
1. An edge cloud collaborative task offloading method based on adaptive covariance matrix evolution strategy, characterized in that The method mainly includes the following steps:
1. Construction of system model: Section 1.1, Edge-Cloud Collaborative Computing Offloading Model; Section 1.2, Task Offloading Communication Model; Section 1.3, Task offloading computational model; Section 1.4, Problem Formulation; Second, algorithm design: Section 2.1, Short-term job priority task scheduling strategy; Section 2.2, Edge cloud collaborative computing offloading method based on CMAES; In step 1.1, an edge-cloud collaborative computing offloading model is established. The model consists of smart devices, edge servers, and cloud servers. When smart devices have complex computing tasks that need to be offloaded, and the local devices and edge servers cannot meet the latency and energy consumption requirements, they are offloaded to the remote ECS. At the same time, when the edge server and the ECS remote cloud server perform computing tasks, the computing tasks monopolize the entire computing resources until the calculation is completed. When multiple tasks are offloaded to the edge server or ECS server at the same time, the SJF algorithm will be responsible for making offloading scheduling decisions; The task offloading communication model in step 1.2 is as follows: when the smart device sends the computationally intensive task to be offloaded generated by itself to the edge server nearby through a wireless connection, the edge server puts the received task into the scheduling queue according to the arrival time. The transmission rate of the smart device transmitting the computing task to the edge server is calculated according to the Shannon formula as follows: where w i The wireless bandwidth allocated to the local device, in hz; p i is the transmission power of the local device, in W; D i is the distance from the local device to the edge server, in meters; α is the path loss index; N0 is the noise power spectrum density, unit is w / hz; The transmission time of the smart device offloading the task to the edge server through the wireless connection is expressed as: Among them, B i Indicates the amount of data for the computing task; The transmission energy consumption is as follows: When you choose to offload computing tasks to ECS, the local device needs to upload the computing tasks to the edge server, and the edge server needs to upload the computing tasks to ECS for computing; According to Shannon's theorem, the transmission rate from the edge server to the ECS is as follows: where v m is the transmission rate from the edge server of the cell where the local device is located to the ECS; m The bandwidth allocated to the edge server of the cell where the local device is located, in hz; p m is the transmission power of the cell edge server where the local device is located, in W; D m is the distance from the edge server of the cell where the local device is located to the ECS, in meters. Therefore, the transmission delay from the edge server of the cell where the local device is located to the ECS is: When the edge server receives the computing task and uploads it to ECS, the transmission energy consumption is: AND t2 =p m ×T t2 (6); The task offloading calculation model in step 1.3 is as follows. When the computing task is offloaded to the local device, the local computing delay and local computing energy consumption need to be considered. The delay is related to the CPU processing power of the local device, the CPU cycle frequency, and the data size of the computing task. The energy consumption is related to the CPU computing energy consumption and the data size of the computing task. Therefore, the calculation formula for local delay and energy consumption is: Among them B i Indicates the amount of data in the computing task, in bits; C u,i Indicates the CPU data processing capability of the local device, in cycles / bit; F u,i Indicates the CPU cycle frequency of the local device, in GHZ; η i Indicates the computing power of the local device, in J / Gigacycle; When the computing task is offloaded to the edge server, the computing delay is: The computing energy consumption of the edge server is: E mc =B i ×C m ×η m (9) When the computing task is offloaded to the edge server, the total delay and total energy consumption are: Among them C m F is the CPU data processing capability of the cell edge server, in cycles / bit; m is the CPU cycle frequency of the cell edge server, in GHZ; η m The CPU computing power of the cell edge server, in J / Gigacycle; After ECS receives the computing task, computing delay and computing energy consumption will be generated. The computing delay is: ECS calculates energy consumption as: E ec =B i ×C e ×η e (12) When computing tasks are offloaded to ECS, the total latency and total energy consumption during the offloading process are as follows: Among them C e is the CPU data processing capability of the cloud server, in cycles / bit; F e is the CPU cycle frequency of the cloud server, in GHZ; η e It is the CPU power of the cloud server, in J / Gigacycle; The problem in step 1.4 is formulated as follows: map the total delay and total energy consumption to the interval range of [0,1] through a mapping function so that the delay and energy consumption have the same magnitude of impact on the overall fitness, and set the maximum delay and maximum energy consumption for the overall delay and energy consumption. The optimization objectives are as follows: Where T max is the highest delay; E max is the maximum energy consumption; h(x) is the mapping function; g is the weight factor used to measure the ratio of delay to energy consumption, y i The unloading location of the unloading task. 0 means unloading to the local device, 1 means unloading to the edge server, and 2 means unloading to the ECS. In step 2.1, the shortest job priority algorithm is used for task scheduling. In the process of edge cloud collaborative computing offloading, when the offloaded task is chosen to be calculated on the edge server or ECS server, the computing task completely occupies the computing resources of the entire server until the calculation is completed. Therefore, when multiple tasks are offloaded to the edge server or ECS server at the same time, in addition to the computing delay of the computing task in the server, there is also a queuing waiting delay; In the process of computing offloading, average latency and average energy consumption are taken as optimization targets. In order to reduce the actual average computing latency, the short job priority method is used to sort the tasks offloaded to the same server in ascending order according to the theoretical computing latency, so as to reduce the latency of the entire system. The specific process of the short job priority scheduling algorithm is as follows: Step 1: Obtain all computing tasks that need to be offloaded to this server; Step 2: Sort the obtained computing tasks in ascending order based on their theoretical calculation delays; Step 3: After sorting, recalculate the actual calculation delay: theoretical calculation delay + waiting delay; Step 4: Update the actual computing delay of the computing task; The design of the CMAES-based edge cloud collaborative computing offloading method in step 2.2 is described as follows. The CMAES algorithm is an efficient search algorithm developed from a natural evolution strategy. By utilizing the high guidance of the covariance matrix and the principle of maximum entropy of the Gaussian distribution when the mean and variance are known, the CMAES algorithm has the advantages of high efficiency, reliability, and globality. The population evolution formula of the CMAES algorithm is: Where λ represents the population size; represents the kth individual in the g+1th generation; m (g) represents the mean of the g-th generation population; σ (g) represents the step length of the g-th generation; N(0,C (g) ) means the mean is 0, and the covariance matrix is C (g) Normal distribution of The mean value m (g) The calculation of the g-th generation population needs to be sorted from small to large according to the fitness size, and the first μ individuals are taken, m (g) The calculation formula is: where ω i represents the weight of the i-th individual in the g-th generation population. (g) The individuals involved in the calculation of the mean value are the first μ individuals of the g-th generation sorted from small to large in terms of fitness, that is, ω i ≥ω2≥...≥0, so that the overall optimization path of the population can evolve in the direction of minimum fitness, and the mean value m (g) The generalized update formula of is: where c m is the learning rate, step size σ (g) The update formula is: Where I is the covariance matrix C of the previous generation. When g = 1, I = C. The calculation formula of the g-th generation covariance matrix is: According to the above formula, when there is an optimal individual that meets the requirements or the number of iterations reaches the maximum threshold during the optimization process of the CMAES algorithm, the execution is terminated and the optimal individual is returned as the final result. During the population evolution process, the CMAES algorithm selects the optimal μ individuals in the population to calculate the mean, and uses the principle of maximum entropy of the normal distribution when the mean and covariance are known, which optimizes the search path of the population and expands the search space. The specific process of the calculation offloading algorithm is as follows: Step 1: Initialize static parameters λ, μ, ω i=1,2,...,μ ,c m ,max_iter,σ (g) ,m g ,C=I,x; Step 2: Determine whether the population has reached the maximum number of iterations or meets the unloading requirements. If so, terminate the iteration, otherwise continue to execute steps 3 to 8; Step 3: Sample the population, formula (15); Step 4: Recalculate the fitness value of the individual according to the algorithm for the sampled population; Step 5: Generate a new population, combine the sampled population with the parent population to form a new population, and according to the recalculated individual fitness values, intercept the first μ individuals as the next generation of the new population; Step 6: Update the mean m based on the new population (g) , formula (17); Step 7: Adjust the step size, formula (18); Step 8: Update the covariance matrix, formula (19).
Citation Information
Patent Citations
MEC server task scheduling method based on task cutting
CN111538595A
Mobile edge computing unloading method based on chaotic quantum particle swarm optimization strategy
CN113271627A