Multi-objective ant colony optimization scheduling method for edge containers based on dynamic fusion genetic algorithm

By using GACO algorithm to optimize Pod scheduling in an edge computing environment, the problems of unbalanced task scheduling and high transmission overhead caused by limited resources of edge servers are solved, and more efficient resource utilization and load balancing are achieved.

CN116107692BActive Publication Date: 2025-08-19SHANGHAI SHUQI TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211623080.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-16
Publication Date
2025-08-19
Estimated Expiration
2042-12-16

AI Technical Summary

Technical Problem

In an edge computing environment, existing Kubernetes scheduling policies cannot effectively consider bandwidth and disk resource requirements, resulting in unbalanced task scheduling, high transmission overhead and serious delay problems, especially on edge servers with limited resources, which is difficult to achieve efficient resource utilization.

Method used

The dynamic fusion genetic algorithm and ant colony optimization scheduling method (GACO) are adopted, combined with Pareto optimization, and by establishing multi-objective optimization functions, using the fast global search of the genetic algorithm and the local search characteristics of the ant colony algorithm, the Pod scheduling strategy is optimized, considering network transmission overhead, calculation delay and load balancing.

Benefits of technology

It realizes efficient task scheduling under limited resources of edge servers, reduces network transmission overhead, improves load balancing, improves resource utilization, and optimizes the scheduling effect of Pod.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116107692B_ABST
    Figure CN116107692B_ABST
Patent Text Reader

Abstract

The present invention provides an edge container multi-objective ant colony optimization scheduling method that dynamically integrates a genetic algorithm. The method includes the following steps: S1, obtaining configuration information of an edge environment system model and a network model; S2, encapsulating a user request task in a container and preparing to start Pod scheduling; S3, establishing a multi-objective optimization function according to the attributes of the Pod to be scheduled and the attributes of the Node; S4, utilizing the early rapid random search capability of the genetic algorithm to obtain an initial solution, and if the evolution rate in the iteration is less than the minimum evolution rate, jumping out of the genetic algorithm stage; S5, dynamically integrating the initial solution and fitness function of the genetic algorithm into the pheromone, pheromone update rule and heuristic information of the ant colony algorithm, performing accurate solution of the ant colony algorithm, ending the iterative cycle, and outputting a Pareto optimal solution set.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of Internet of Things and task scheduling. Background Art

[0002] Edge computing, as an extension of cloud computing, reduces data latency by executing tasks at the edge of the network, providing users with a more convenient service environment. However, due to the limitations on the number and computing power of edge servers, serious resource sharing occurs between applications. At the same time, the task requests uploaded by users are becoming more and more complex and diverse. How to select the appropriate node to handle tasks is the core problem that edge computing needs to solve. Containerization technology has been widely used in traditional cloud environments and is an important supporting technology for edge computing. Kubernetes is the most commonly used container orchestration and management system. Kuberedge extends Kubernetes's ability to orchestrate containerized applications to edge nodes and devices.

[0003] like Figure 1 As shown, all containers in Kuberedge run in Pods, which are a combination of one or more containers. Containers within a Pod are similar to those within the same host. Containers in a Pod share resources such as files and networks, allowing them to communicate directly with each other and jointly complete a function. In Kubernetes, containers rely on Pods as the smallest unit for scheduling and management. Multiple identical Pod modules collectively expose a service interface that can be provided to the outside world, and multiple services constitute the application provider's complete application. The Pod to be scheduled and the Node working node on the edge server complete the real-time update of the corresponding status information through information exchange between components in Kuberedge. Finally, the status information can be used to execute the corresponding scheduling algorithm in Kubernetes through the Kubernetes API to complete the task scheduling.

[0004] Kubernetes' default scheduling primarily determines whether a node's CPU and memory resources meet a pod's resource requests and whether the port requested by the pod is occupied. If any of these conditions are not met, the node is filtered out. Nodes that meet the requirements are then prioritized based on CPU and memory, and the node with the highest score is selected to deploy the pod. However, in edge environments, CPU and memory resources are not the only constraints; bandwidth and disk resources are also limited. Scheduling methods that only consider CPU and memory may not meet the scheduling needs of bandwidth-intensive and disk-intensive applications. Furthermore, Kubernetes' default scheduling policy gives equal weight to CPU and memory, completely ignoring the application's preference for specific resources. If a pod's CPU request is high and its memory requirement is low, the scheduling method should deploy it on a node with more available CPU resources and less available memory. This leaves more redundant resources for the application and promotes balanced resource distribution across nodes. A balanced resource distribution contributes to higher resource utilization. Summary of the Invention

[0005] This invention can selectively dispatch user-executed application tasks to either an edge server directly connected to the user or a remote edge server, based on the application's characteristics. This addresses the existing issues of uneven task offloading and high transmission overhead and latency incurred during task scheduling, particularly given the limited resources of existing edge servers.

[0006] In order to solve the above technical problems, the present invention provides a multi-objective ant colony optimization scheduling method for edge containers that dynamically integrates genetic algorithms. It studies the scheduling method for designing containerized applications for various types of application requests from a large number of users in an edge environment with limited resources, aiming to minimize network transmission overhead, execution time, and improve the load balancing of edge servers. In order to solve this multi-objective optimization problem, first, an edge computing environment system model is established, and the network model of edge computing is determined by the connection method between the user and the edge server cloud server; secondly, an application model is established based on the user's requested application type, real-time and mobility; then, the objective function is solved based on the established model. This is an NP-hard problem. By utilizing the advantages of ant colony algorithm and genetic algorithm, a multi-objective ant colony optimization scheduling method (GACO) for edge containers that dynamically integrates genetic algorithm is designed and combined with Pareto optimization to solve this NP-hard problem.

[0007] In order to achieve the above objectives, the present invention adopts the following technical solutions:

[0008] S1. Obtain a system model and a network model. The system model includes multiple edge servers, several wireless base station groups, and a cloud service center. Users connect to the nearest edge server via WLAN. Edge servers are connected to each other via a metropolitan area network (MAN). Edge servers are connected to the cloud via a wide area network (WAN). All edge servers use a shared metropolitan area network (MAN) with Gigabit Ethernet capacity. If a task is offloaded to a remote edge server, the MAN is used. In this case, the task is accessed via at least two hops and dispatched to a suitable node via WLAN and MAN.

[0009] S2. The user has t tasks with different request requirements. These tasks are encapsulated into t different containers. Assume that there are i Pods to be scheduled, P = {P0, P1, ..., P i-1} is the Pod queue to be scheduled. A Pod consists of n containers. i ={C1,C2,...,C n}, there are j Node nodes to be deployed, N={N0,N1,...,N j-1} represents the queue of nodes to be deployed, and each Node has k types of resources N j ={1,2,...,k}, a Pod can only run on one Node node. For any resource k, the resource allocation of all Node nodes on the edge server is less than the corresponding resource capacity of the edge server.

[0010] S3. Based on the network model information and the properties of the Pod to be scheduled, the network transmission cost, computing latency, and load balancing of the Pod to the edge server are obtained, and a multi-objective optimization function is established.

[0011] S4. In the early stage, the genetic algorithm's rapid random global search capability is used to generate the initial solution to the problem. In the genetic algorithm stage, combined with the characteristics of edge computing task scheduling, an indirect encoding method is used to encode the Node node to which each pod is assigned. The fitness function in the genetic algorithm is defined based on the idea of judging resource priorities in the Kubernetes default scheduling, and the minimum number of iterations of the genetic algorithm g is pre-set. min , maximum number of iterations g max and the minimum evolution rate g ratio , and then calculate the evolution rate of the offspring population during the iteration process. If there are continuous g within the given number of iterations s The evolution rate of each generation is lower than that of g ratio , then the genetic algorithm search is terminated and the ant colony algorithm solution is started.

[0012] S5. The pheromone rule determines the probability of a Pod being scheduled to a corresponding Node. The initial solution obtained by the genetic algorithm is converted into the initial pheromone concentration of the ant colony algorithm. Based on the mutation operation in the genetic algorithm, the diversity of the population is maintained to prevent the algorithm from falling into premature maturity. The local pheromone update idea of the ant colony algorithm is added, and the score value of the ant for the node is used as the update heuristic information value. Later, the information positive feedback and rapid convergence characteristics of the ant colony algorithm are used to solve the optimal solution.

[0013] The optimization algorithms of S4 and S5 are mainly based on the advantages of ant colony algorithm and genetic algorithm. A multi-objective ant colony optimization scheduling method (GACO) that dynamically integrates genetic algorithm is designed and combined with Pareto optimization to solve the NP-hard problem.

[0014] The implementation process specifically includes:

[0015] Step 1: Initialize the settings, encapsulate the tasks submitted by the user into the corresponding Container, prepare the Pod scheduling, set the GA population size L to the number of Node nodes on the edge server, and the crossover probability G c , minimum number of iterations g min , maximum number of iterations g max , minimum evolution rate g ratio , the number of iteration stagnation g s ;

[0016] Step 2: Encode the chromosome according to the problem. Encode the Node to which each Pod may be assigned into a chromosome. The length of the chromosome is the number of Pods to be scheduled. Randomly obtain chromosome ch[i] = N j ;

[0017] Step 3: Initialize the initial population g with a population size of L. The gene value of the chromosome is the assigned Node node number, that is, the P in the wth chromosome i Assigned to N j ,Gene[w][P i ]=N j ;

[0018] Step 4: Decode the individuals in the population according to Fit(i)=aR cpu +bR st +cR mem Calculate the individual fitness value as the selection operator for the selection operation, through the formula The probability of the node being selected is obtained. A roulette wheel method is used to select the parent individuals with high fitness values to enter the next crossover operation;

[0019] Step 5: Use the adaptive crossover operator G on the selected parent individualsc Through the local crossover method, a certain number of new individuals are generated, that is, ch′1[i]=ch2[i], ch′2[i]=ch1[i], and the next generation of individuals is obtained after the selection and crossover operation.

[0020] Step 6: Compare the new individuals with the individuals in the parent population, and replace the good with the bad according to the replacement principle, and select the good individuals as the final offspring individuals;

[0021] Step 7: Determine whether the dynamic fusion conditions are met. If g min <g<g max , and continuous g s The evolution rate ≥ g ratio , then go to step 4, otherwise go to step 8;

[0022] Step 8: Obtain the chromosome with the maximum fitness evaluated during the genetic algorithm evolution process and proceed to the next step;

[0023] Step 9: Convert the last 50% of the optimal solution in the genetic algorithm scheduling process into the pheromone initialization value of each resource node in the ant colony algorithm The algorithm enters the ant colony algorithm precise solution process;

[0024] Step 10: Initialize the Pareto solution set to be empty, initialize the information heuristic factor α, the expected heuristic factor β, the pheromone volatility factor ρ, the number of ants X, the number of iterations Itor, and place x ants on the Node node;

[0025] Step 11: If the edge server list is not empty, go to step 12, otherwise go to step 14;

[0026] Step 12: The ant forms a set of nodes of the current edge server that have not yet scheduled Pods and can be scheduled. If the set is empty, the ant is placed on the next edge server and returns to step 11. If the set is not empty, go to step 13.

[0027] Step 13: Ants start searching for Node nodes from the collection, x*80% of ants follow the formula Select a suitable Node node, and place pods on the Node according to the random allocation method from x*80% ants to the xth ant. Update the resource capacity of the current Node node and update the pheromone τ according to the formula ij (t+1)=(1-ρ)τ ij (t)+rFit(i), return to step 11;

[0028] Step 14: When all x ants have completed their search, evaluate the x solutions generated and update the Pareto solution set;

[0029] Step 15: Calculate the network transmission overhead, load balancing and execution time respectively, according to the formula Update global pheromones and clear the taboo table;

[0030] Step 16: Add 1 to the number of iterations. If the number of iterations is less than the set value, jump to step 11; otherwise, jump to step 17.

[0031] Step 17: Exit the iterative loop, the algorithm ends, and the Pareto optimal solution set is output.

[0032] Beneficial effects: In order to fully and reasonably utilize the limited resources of edge servers, the present invention considers the different resource requirements of different applications, constructs an objective function based on task completion time, network transmission overhead and load balancing, converts the problem into a multi-objective optimization problem, adopts a heuristic algorithm to solve it, and proposes an optimization algorithm GACO based on the dynamic fusion of ant colony algorithm and genetic algorithm. Compared with the default Kubernetes scheduling method and the basic ant colony algorithm, it can obtain better results, which is of great significance for the efficient utilization of the limited resources of edge servers. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Attachment Figure 1 A diagram showing the framework for scheduling Pods for Kuberedge.

[0034] Attachment Figure 2 It is the system model and network model diagram of the edge computing environment;

[0035] Attachment Figure 3 Parameter information table;

[0036] Attachment Figure 4 Scheduling method pseudocode;

[0037] Attachment Figure 5 Experimental results diagram; DETAILED DESCRIPTION

[0038] In order to make the purpose, technical solutions and advantages of the present invention more clear, the embodiments of the present invention will be described in detail below with reference to the accompanying drawings and examples.

[0039] This invention relates to a multi-objective ant colony container optimization scheduling strategy in an edge computing environment. In an edge computing architecture, users offload containerized applications to edge servers for execution. Pods provide the resource parameters required for computing, and then select nodes on local edge servers or remote edge servers for execution.

[0040] The specific steps are as follows:

[0041] Step 1: If Figure 2 The system architecture shown, establishes the system model and network model, sets the edge server, network delay and application parameter information;

[0042] In this embodiment, there are 5 edge servers in the edge environment. Each edge server has 20 Node nodes to provide services for the Pod to be scheduled. There are 4 types of resources N on the Node. j = {CPU, memory, disk, bandwidth}. In this WLAN environment, there are U users, and the user set is represented as {1, 2, ..., U}. Users generate three different types of tasks within 3 hours. The specific task parameters, node parameters and network parameters are as follows: Figure 3 shown.

[0043] Step 2: Create a calculation model, including network transmission overhead, computing latency, and load balancing;

[0044] In this embodiment, the network transmission overhead is P(i) st Pod i The transmission data size, hop i Represents the number of hops that the Pod takes to be dispatched to the edge server, dl MAN and dl WLAN Represents metropolitan area network delay and wireless network delay, BW MAN and BW WLAN They represent the metropolitan area network bandwidth and wireless network bandwidth respectively. The total Pod network transmission overhead is: The load balancing degree is AvgN represents the average number of Node nodes occupied by the service running on each edge server after the Pod scheduling is completed in the edge environment, N represents the number of Node nodes on the current edge server, and m represents the edge server in the current edge environment. The calculation delay is P(i) l Represents a Pod i Requested task length, N ips and N stc Indicates the computing speed and storage capacity of the Node.

[0045] Step 3: Use GACO algorithm to solve the optimization problem in the model;

[0046] In this embodiment, the specific steps refer to the detailed description above, and the pseudo code of the algorithm is as follows: Figure 4 shown.

[0047] Through experimental results Figure 5 It can be seen that compared with the basic ant colony algorithm and the Kubernetes default scheduling strategy, the optimal frontier solved by GACO is smaller overall and closer to the true optimal frontier.

Claims

1. A multi-objective ant colony optimization scheduling method for edge containers based on dynamic fusion genetic algorithm, characterized in that: The steps include: S1. Obtain a system model and a network model. The system model includes multiple edge servers, several wireless base station groups, and a cloud service center. The network model of edge computing is determined by the connection method between users and edge servers and cloud servers. Users connect to the nearest edge server via WLAN. Edge servers are connected to each other via a metropolitan area network (MAN). Edge servers are connected to the cloud via a wide area network (WAN). All edge servers use a shared metropolitan area network with Gigabit Ethernet capacity. If tasks are offloaded to remote edge servers, the MAN is used. In this case, the task is accessed through at least two hops and dispatched to the appropriate node via WLAN and MAN. S2: The user has t tasks with different request requirements. The t tasks are encapsulated into t different containers. There are i Pods to be scheduled, P = {P0, P1, ..., P i-1 } is the pod queue to be scheduled. Each Pod consists of n containers. i ={C1,C2,...,C n }, there are j Node nodes to be deployed, N={N0,N1,...,N j-1 } represents the queue of nodes to be deployed, and each Node has k types of resources N j ={1,2,...,k}, a Pod can only run on one Node. For any resource k, the resource allocation of all Nodes on the edge server is less than the corresponding resource capacity of the edge server; S3. Based on the network model information and the properties of the pod to be scheduled, the network transmission overhead, computing latency, and load balancing of the pod to the edge server are obtained, and a multi-objective optimization function is established. S4. Use the genetic algorithm's rapid random global search capability to generate the initial solution of the objective function. In the genetic algorithm stage, use indirect coding to encode the Node node to which each pod is assigned. Define the fitness function in the genetic algorithm based on the idea of judging resource priority in the Kubernetes default scheduling, and pre-set the minimum number of iterations g of the genetic algorithm. min , maximum number of iterations g max and the minimum evolution rate g ratio , and then calculate the evolution rate of the offspring population during the iteration process. If there are continuous g within the given number of iterations s The evolution rate of each generation is lower than that of g ratio , then terminate the genetic algorithm search and start the ant colony algorithm solution; S5. The pheromone rule determines the probability of a pod being scheduled to a corresponding node. The initial solution obtained by the genetic algorithm is converted into the initial pheromone concentration of the ant colony algorithm. The mutation operation in the genetic algorithm maintains population diversity to prevent the algorithm from falling into premature maturity. The ant colony algorithm adopts the local pheromone update concept and uses the node score given by the ants as the updated heuristic information value to find the optimal solution. The step S4 defines the fitness function in the genetic algorithm based on the idea of judging resource priority in the kubernetes default scheduling, specifically including: Step 1: Determine the node score based on the ratio of idle node resources to total node resources in the default Kubernetes scheduling method. The more idle resources, the higher the score. The calculation formula is as follows: Among them, N cpu 、N mem and N st Respectively represent the total amount of CPU, memory and disk resources of the Node node, N usedu 、N usedm and N usedst They represent the CPU, memory and disk resources used by the Node node after solving the problem through the genetic algorithm, and P requ 、P reqm and P reqst Respectively represent the amount of CPU, memory, and disk resources requested by the Pod; Step 2: Establish the fitness function of the genetic algorithm: Fit(i)=aR cpu +bR st +cR mem According to the obtained R cpu 、R st and R mem Comparing the sizes of the three values, we can conclude that the weight coefficients of a, b, and c are 0.5, 0.3, and 0.2 respectively; The pheromone rules in step S5 specifically include: Step 1: Based on the genetic algorithm mutation operation to prevent the algorithm from falling into premature state, the local pheromone update of the ant colony algorithm is added. The formula for the local pheromone concentration is: t ij (t+1)=(1-ρ)τ ij (t)+rFit(i) Fit(i) is the fitness function in the genetic algorithm. It is added as an influencing factor to the local pheromone concentration update formula. The larger the value, the greater the possibility of deployment to the node. r is the weight coefficient of fitness. Step 2: After all ants have assigned all pods to be scheduled to corresponding nodes, the global optimal solution for this iteration is calculated. The pheromone mapping of each pod's assigned node in the placement plan constructed from all optimal solutions in the Pareto solution set is globally updated. The update formula is as follows: is the pheromone increment of the optimal solution placement scheme, and its value is f is the placement scheme corresponding to the solution in the Pareto solution set, The network cost normalization function corresponding to the f scheme is is the highest energy consumption on physical machine j.

2. The multi-objective ant colony optimization scheduling method for edge containers using a dynamic fusion genetic algorithm according to claim 1, characterized in that: The multi-objective optimization function is established in step S3, specifically including: Step 1: Establish the network transmission cost objective function: P(i) st Pod i The transmission data size, hop i Represents the number of hops that the Pod takes to be dispatched to the edge server, dl MAN and dl WLAN Represents metropolitan area network delay and wireless network delay, BW MAN and BW WLAN They represent the metropolitan area network bandwidth and wireless network bandwidth respectively. The total Pod network transmission overhead is: Nw cost The smaller the value, the lower the network transmission overhead per unit time for all Pods, which means the allocation solution obtained by this scheduling method is better. Step 2: Establish the objective function for calculating delay: P(i) l Represents a Pod i Requested task length, N ips and N stc Indicates the computing speed and storage capacity of the Node; Step 3: Establish the objective function of load balancing: AvgN represents the average number of Node nodes occupied by the service running on each edge server after the Pod scheduling is completed in the edge environment, N represents the number of Node nodes on the current edge server, m represents the edge server in the current edge environment, and N load The larger the value, the more unbalanced the distribution, and vice versa.

3. The multi-objective ant colony optimization scheduling method for edge containers using a dynamic fusion genetic algorithm according to claim 1, characterized in that: The step S5 initializes the pheromone concentration value, and converts the last 50% individuals of the optimal solution obtained by the genetic algorithm into the initialization pheromone concentration value of the ant colony algorithm: Among them, N allc N allm and N allst Represent the total CPU, memory and disk resources of all nodes in the cluster respectively, and τ ij(0) The pheromone value converted as the optimal solution obtained by the genetic algorithm reflects the energy consumption status of the Node.

4. The multi-objective ant colony optimization scheduling method for edge containers using a dynamic fusion genetic algorithm according to claim 1, characterized in that: In step S5, the score value of the ant for the node is used as the updated heuristic information value. The information heuristic value of the t-th iteration from i to j can be expressed as: Where ρ is the pheromone volatility factor.

5. The multi-objective ant colony optimization scheduling method for edge containers using a dynamic fusion genetic algorithm according to claim 1, characterized in that: If every ant deploys its pod on the node with the highest pheromone concentration, the possibility of missing the optimal solution will be reduced. In other words, the ants may think they have found the best deployment solution, but in fact it is only a local optimal solution. Therefore, some ants need to follow the allocation strategy that optimizes the objective function, and some ants need to follow the random allocation strategy to discover a new optimal solution. The optimization method from the x*80%th ant to the xth ant is set to the random allocation strategy, so that the node for the pod deployment is randomly selected. If the pheromone concentration is greater than 3, it is processed within the range of [0,3] through mutation.

Citation Information

Patent Citations

  • Method for improving load balancing based on genetic ant colony fusion algorithm

    CN114185635A

  • Autonomous learning platform for novel feature discovery

    US20180330258A1