Multi-cluster container scheduling method, system and equipment based on mirror image layer in edge computing environment and medium
Through the multi-cluster container scheduling method based on the mirror layer in the edge computing environment, the container allocation and image layer download sequence are optimized, and the problems of high container startup delay and low resource utilization efficiency in edge computing are solved, and efficient and accurate container scheduling is achieved. and balanced resource utilization.
Patent Information
- Application Number
- CN202411339290.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2025-02-18
AI Technical Summary
In the edge computing environment, existing container scheduling methods fail to effectively utilize the sharing of the mirror layer, resulting in high container startup delays and low resource utilization efficiency. Especially in a multi-cluster environment, how to achieve efficient and accurate container scheduling has become a problem.
A multi-cluster container scheduling method based on the mirror layer is proposed. By defining the communication connection and task scheduling process of the multi-cluster edge computing environment, resource information of edge nodes is collected, scheduling optimization problem model is established, and container optimization is optimized using heuristic methods and linear planning. Allocate the scheme and adjust the mirror layer download sequence through dynamic planning to minimize container startup delay.
It effectively reduces the repeated download and storage of the container image layer, optimizes the container startup speed, improves the resource utilization rate of edge nodes, and realizes resource load balancing in multi-cluster environments, reduces system latency and improves service quality.
Smart Images

Figure CN119473571A_ABST
Abstract
Description
Technical Field
[0001] The present invention proposes a multi-cluster container scheduling method, system, device and medium based on an image layer in an edge computing environment, which belongs to the field of container scheduling in edge computing. Background Art
[0002] With the rapid development of information technology, edge computing, as an emerging computing model, is gradually becoming a key technology to solve problems such as big data processing, low-latency services and high bandwidth requirements. Edge computing provides high-bandwidth, low-latency and high-efficiency computing services by deploying computing resources, storage resources and network resources at the edge of the network, that is, close to the data source and user location. However, in the edge computing environment, due to the characteristics of limited resources, complex network conditions and diverse tasks, how to efficiently schedule containers has become an issue that needs to be solved.
[0003] Edge computing nodes are usually deployed close to users or data sources, and their computing, storage, and network resources are relatively limited. Compared with cloud computing data centers, edge servers can only configure a small number of services to process corresponding tasks at the same time. Therefore, under resource-constrained conditions, how to optimize container scheduling strategies to maximize resource utilization and reduce task processing delays is an important challenge facing edge computing environments. Container technology has been widely used in cloud computing and edge computing due to its lightweight, portability, and rapid deployment. Containers are built based on layered images, and image layers can be shared, which helps reduce image storage space and speed up container startup time. However, container images are usually stored in the cloud, and before the container is started, the required image layers must be downloaded to the edge node. This process is not only time-consuming, but also easily affected by network conditions and resource allocation strategies, resulting in high container startup delays. In addition, in edge computing environments, existing container scheduling methods often ignore the shareability of image layers and cannot effectively capture the spatiotemporal dependencies of layers, making it difficult to meet the real-time requirements and resource utilization efficiency of resource-constrained edge computing. Therefore, in a multi-cluster edge computing environment, how to optimize the scheduling of container images, reduce download time, and ensure balanced utilization of system resources is a technical problem that needs to be solved urgently.
[0004] With the rapid expansion of edge computing nodes, the single cluster management mode seems to be unable to cope with the needs of large-scale and distributed deployment, which has prompted multi-cluster management to become the mainstream trend of edge computing environment development. However, the multi-cluster architecture also introduces more complex resource orchestration, scheduling and load balancing challenges. Especially in containerized applications, how to achieve efficient and accurate container scheduling across multiple clusters to ensure that tasks can be assigned to the most suitable nodes according to the optimal strategy is a key problem that needs to be solved in current edge computing. However, most current research focuses on task scheduling and resource management within a single cluster, and there is still a lack of systematic solutions for container image scheduling in a multi-cluster environment. When facing a dynamically changing edge computing environment, existing methods often find it difficult to optimize container startup speed and resource load balancing at the same time, showing great limitations. Since the cost of cross-cluster communication is much higher than the cost of communication within the cluster, how to reasonably allocate tasks and optimize resource utilization when scheduling tasks becomes the key to reducing system latency and improving service quality.
[0005] In view of the characteristics of edge computing environment and the limitations of existing scheduling methods, a multi-cluster container scheduling method and system based on image layer is studied, which is of great significance for improving resource utilization, reducing task processing delay, and meeting complex task requirements. This method needs to take into account the characteristics of edge computing environment, such as limited node resources, network bandwidth limitations, etc., and optimize based on image layer to improve resource utilization, reduce task processing delay, and thus meet increasingly complex task requirements. Summary of the invention
[0006] Purpose of the invention: The present invention proposes a multi-cluster container scheduling method and system based on the image layer in an edge computing environment, aiming to optimize the container scheduling problem of a multi-cluster system in an edge computing environment. The proposed method can perform reasonable scheduling under different resource requirements to achieve the goal of minimizing container startup delay while ensuring cluster load balancing. It also supports independent online scheduling decisions for different heterogeneous edges, realizing large-scale expansion and application of the method.
[0007] Technical solution, in order to achieve the above invention objectives, the present invention proposes a multi-cluster container scheduling method based on the image layer in an edge computing environment, the method comprising the following steps:
[0008] S1. Define the communication connection and task scheduling process of the multi-cluster edge computing environment, define the edge cluster and edge node, the computing resource requirements of the task, the container and container image layer, and the dependency between the two;
[0009] S2. Collect computing resource and communication resource information of multi-cluster edge nodes in the edge computing environment, and obtain the existence of container image layers on edge nodes;
[0010] S3. Based on the node computing resource constraints, task scheduling requirements, and image download latency that need to be met in the edge computing environment, a scheduling optimization problem model is established. The optimization goal is to minimize the container startup latency and ensure resource load balancing between edge clusters.
[0011] S4. Use heuristic methods to quickly screen out edge nodes whose computing resources meet the task requirements. In order to ensure the balanced resource load between edge clusters, use the global optimization characteristics of linear programming to solve the container allocation scheme with low resource load cost; calculate the load balancing degree between edge clusters in the edge computing environment, and adjust the container allocation according to the resource load balancing degree; build a container image layer download queue for each edge node. Since different download orders of container image layers will affect the container startup time, use dynamic programming to find the container image layer download order that minimizes the container startup time;
[0012] S5. Download the container image layers in sequence according to the downloading order of the container image layers obtained in S4, and complete the container startup.
[0013] Furthermore, the specific method of step S1 is as follows:
[0014] In the edge computing environment, there are edge clouds, edge clusters, and edge nodes. An edge cloud and multiple edge clusters together constitute an edge cloud network. Each edge cluster contains multiple edge nodes. The cloud center is connected to the edge network through a backbone network. The edge clusters are connected through a wide area network. The edge nodes in the edge cluster are connected through a local area network. In response to user requests, user tasks are offloaded to the edge environment. User tasks run in containers. First, the container is deployed to the edge node in the edge cluster. The container consists of container image layers. To start the container, you need to download multiple container image layers that the container depends on. The container image layers are stored in the cloud. The container can only be started when all the image layers required by the container are downloaded.
[0015] Assume that the edge cluster set G = {g1,g2,…,g M}, M is the number of edge clusters, each cluster g k The edge node set E k ={e k1 ,e k2 ,…,e kN}, N is the edge cluster g k The number of edge nodes, edge node e kl The storage, communication, CPU resources and the upper limit of the number of containers that can be accommodated are denoted as s kl , b kl 、u kl and m kl , edge node e kl and e k′l′ The bandwidth betweenklk′l′ , k = k′ represents the edge node e kl and e k′l′ In the same edge cluster, the task set is denoted as T = {t1, t2, …, t Q}, Q is the number of user tasks, and task t j A tuple of three parameters is represented as t j = <c j ,s j ,u j >, where c j is the task's requirement for containers, s j is the memory requirement of the task on the edge node, u j represents the CPU requirement of the task on the edge node; the container set is denoted as C = {c1,c2,…,c R}, R is the number of containers, and the set of container image layers is denoted as L = {l1,l2,…,l U}, U is the number of container image layers, image layer l i The size of i , the dependency of the container on the image layer is known, using the binary variable r ij Indicates that r ij =1 indicates container c i Requires image layer l i , on the contrary, r ij =0 means container c i No image layer required i ,Containers on the same edge node share the image layer, and each image layer only needs to be downloaded once.
[0016] Furthermore, in step S3, the scheduling optimization problem is in the form of:
[0017] P1:
[0018] C.1
[0019] C.2
[0020] C.3
[0021] C.4
[0022] C.5
[0023] C.6L σ ≤L
[0024] Among them, t cj Represents container c j The startup delay, is the total startup delay of the container, τ(b) is the total number of tasks arriving within the time period τ, then represents the average latency of container startup, and constraint C.1 means that each task must be scheduled to an edge node for execution, where a jkl is a binary decision variable, indicating whether task t j Dispatched to edge node e kl ; Constraint C.2 means that the container startup delay is greater than the sum of the download times of all image layers, where t ikl Indicates container image layer l i At the edge node e kl The download time of edge node e kl The memory space limit, CPU resource limit, and container quantity limit are all contained in the binary variable z. ikl Represents image layer l i Whether it exists at the edge node e kl , z ikl =1 means mirror layer l i Exists at edge node e kl , on the contrary, z ikl =0 means mirror layer l i Does not exist at edge node e kl ; Constraint C.6 indicates that the load balancing degree between edge clusters does not exceed a specific threshold, where L σ is the load balancing degree of edge cluster resources, and L is the load balancing degree threshold between edge clusters.
[0025] Furthermore, the method of step S4 is as follows:
[0026] S41. For each task, select edge nodes that can download containers and meet their storage and CPU resource requirements, add nodes that meet the conditions to the candidate allocation node queue, and build a resource load cost matrix for the edge nodes added to the candidate allocation node queue to ensure resource load balance between edge clusters. Use a linear planner to find a container scheduling solution with the lowest resource load cost.
[0027] The resource load cost matrix is a three-dimensional matrix of R×M×N, and the matrix elements cost ikl Represents container c i Dispatched to edge node e kl The resource load cost of the scheduling resource load cost is calculated as follows:
[0028] cost ikl =ω1(u i / u kl )+ω2(p′ i / skl )
[0029] Among them, u i / u kl Represents task t i Required CPU resources and edge nodes kl The ratio of CPU resources owned; p′ i Represents container c i Dispatched to edge node e kl The required memory size consists of two parts: one is task t i Calculate the required memory size, and secondly, container c i Dispatched to edge node e kl The total memory size occupied by the image layers that need to be downloaded additionally; ω1 and ω2 are parameters used to adjust the proportion of memory size and CPU resources in the total load;
[0030] S42, set a load balancing degree threshold L between edge clusters, and calculate the load balancing degree representation value between edge clusters after scheduling according to the container scheduling scheme obtained in step S41. If it exceeds the set threshold, go to step S41 to re-solve the suboptimal solution with the lowest scheduling resource load cost;
[0031] Among them, the resource load balancing degree L between the edge clusters σ The calculation is as follows:
[0032]
[0033] Where M is the number of edge clusters, Load gk is the edge cluster g k The resource load, is the average resource load of all edge clusters;
[0034] S43. According to the scheduling scheme obtained in step S42, the container image layers required for container scheduling and not downloaded by the edge node are added to the edge node container image layer download queue, the download time of each container image layer is calculated, and the download order of the container image layers in the download queue is adjusted using a dynamic programming algorithm to minimize the container startup delay.
[0035] Furthermore, the Load gk The calculation method is as follows:
[0036]
[0037] Among them, ε1 and ε2 are proportional parameters, which are used to adjust the proportion of memory load and CPU load in resource load. ikl p i is the edge node e klThe memory size occupied by the downloaded image layer, a jkl r ij p i (1-z ikl )+a jkl s j Represents task t j Dispatched to edge node e kl The edge node memory size that will be occupied includes the size of the container image layer and the memory required for task calculation.
[0038] Furthermore, the ikl It is calculated as follows:
[0039]
[0040] Among them, the task is scheduled to the edge node, z ikl =1 indicates the image layer l required for the task i Exists in the edge node e of task scheduling allocation kl , there is no need to download repeatedly, so the image layer download time is 0; z ik′l′ =1 means that the image layer required by the task exists in other edge nodes e in the edge cluster k′l′ , it can be downloaded from the edge nodes that have downloaded the image layer, so the download time takes the shortest download time among the edge nodes; when the image layer required by the task does not exist in the edge cluster, it is downloaded from the cloud server, and the download time is the size of the image layer divided by the bandwidth between the edge node and the cloud server.
[0041] In addition, the present invention proposes a computer device for scheduling multi-cluster containers based on image layers in an edge computing environment, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any one of the methods when executing the computer program.
[0042] In addition, the present invention proposes a storage medium having a computer program stored thereon, wherein the computer program implements the steps of any one of the methods when executed by a processor.
[0043] In addition, the present invention proposes a multi-cluster container scheduling system based on an image layer in an edge computing environment, which includes the following modules:
[0044] The environment definition module defines the communication connection and task scheduling process of the multi-cluster edge computing environment, edge clusters and edge nodes, computing resource requirements of tasks, containers and container image layers, and the dependencies between the two;
[0045] The parameter collection module collects the computing resource and communication resource information of multiple cluster edge nodes in the edge computing environment, and obtains the existence of container image layers on edge nodes;
[0046] The optimization problem module establishes a scheduling optimization problem model based on the node computing resource constraints, task scheduling requirements, and image download latency that need to be met in the edge computing environment. The optimization goal is to minimize the container startup delay and ensure resource load balancing between edge clusters.
[0047] The solution solving module uses heuristic methods to quickly screen out edge nodes whose computing resources meet the task requirements. In order to ensure the balanced resource load between edge clusters, the global optimization characteristics of linear programming are used to solve the container allocation solution with low resource load cost; the load balance between edge clusters in the edge computing environment is calculated, and the container allocation is adjusted according to the resource load balance; a container image layer download queue is built for each edge node. Since different download orders of container image layers will affect the container startup time, the dynamic programming method is used to find the container image layer download order that minimizes the container startup time;
[0048] The container startup module downloads the container image layers in sequence according to the obtained container image layer download order to complete the container startup.
[0049] Beneficial effects: Compared with the prior art, the technical solution of the present invention has the following beneficial technical effects:
[0050] (1) In edge computing environments, traditional container scheduling methods often fail to consider the sharing of container image layers, resulting in repeated downloading of the same image layer during container scheduling, which not only wastes edge node memory resources, but also causes a high container startup delay. In order to solve the above problems, the present invention proposes a multi-cluster container scheduling method and system based on image layers. This method fully considers the dependency between containers and image layers and the sharing of edge node container image layers when performing task scheduling, effectively reducing repeated downloading and storage of images, optimizing the container startup speed, and improving the resource utilization of edge nodes.
[0051] (2) With the rapid expansion of edge computing nodes, multi-cluster management has become the mainstream trend in the development of edge computing environments. However, most current research focuses on task scheduling and resource management within a single cluster, and there is still a lack of systematic solutions for container image scheduling in a multi-cluster environment. When facing a dynamically changing edge computing environment, existing methods often find it difficult to simultaneously optimize container startup speed and resource load balancing, showing great limitations. Therefore, the present invention establishes an edge environment multi-cluster system model, which fully considers the load balancing problem between clusters. By establishing a scheduling optimization problem model and combining heuristic methods and dynamic programming techniques, reasonable allocation of tasks and balanced utilization of resources are achieved. This not only avoids the situation where a single cluster is overloaded while other clusters are idle, but also improves the overall stability and reliability of the system.
[0052] (3) In summary, the multi-cluster container scheduling method and system based on the image layer in the edge computing environment proposed by the present invention reduces resource waste and scheduling delay, and provides a new solution for multi-cluster container scheduling in the edge computing environment. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 It is a network model structure diagram of a multi-cluster container scheduling system based on an image layer in an edge computing environment according to the present invention;
[0054] Figure 2 It is a flow chart of a multi-cluster container scheduling method based on image layers in an edge computing environment according to the present invention. DETAILED DESCRIPTION
[0055] The implementation method of the present invention will be further described below in conjunction with the accompanying drawings.
[0056] like Figure 2 As shown, the present invention proposes a multi-cluster container scheduling method based on an image layer in an edge computing environment, and the method comprises the following steps:
[0057] S1. Define the communication connection and task scheduling process of the multi-cluster edge computing environment, define the edge cluster and edge node, the computing resource requirements of the task, the container and container image layer, and the dependency between the two;
[0058] S2. Collect computing resource and communication resource information of multi-cluster edge nodes in the edge computing environment, and obtain the existence of container image layers on edge nodes;
[0059] S3. Based on the node computing resource constraints, task scheduling requirements, and image download latency that need to be met in the edge computing environment, a scheduling optimization problem model is established. The optimization goal is to minimize the container startup latency and ensure resource load balancing between edge clusters.
[0060] S4. Use heuristic methods to quickly screen out edge nodes whose computing resources meet the task requirements. In order to ensure the balanced resource load between edge clusters, use the global optimization characteristics of linear programming to solve the container allocation scheme with low resource load cost; calculate the load balancing degree between edge clusters in the edge computing environment, and adjust the container allocation according to the resource load balancing degree; build a container image layer download queue for each edge node. Since different download orders of container image layers will affect the container startup time, use dynamic programming to find the container image layer download order that minimizes the container startup time;
[0061] S5. Download the container image layers in sequence according to the downloading order of the container image layers obtained in S4, and complete the container startup.
[0062] Furthermore, the specific method of step S1 is as follows:
[0063] In the edge computing environment, there are edge clouds, edge clusters, and edge nodes. An edge cloud and multiple edge clusters together constitute an edge cloud network. Each edge cluster contains multiple edge nodes. The cloud center is connected to the edge network through a backbone network. The edge clusters are connected through a wide area network. The edge nodes in the edge cluster are connected through a local area network. In response to user requests, user tasks are offloaded to the edge environment. User tasks run in containers. First, the container is deployed to the edge node in the edge cluster. The container consists of container image layers. To start the container, you need to download multiple container image layers that the container depends on. The container image layers are stored in the cloud. The container can only be started when all the image layers required by the container are downloaded.
[0064] Assume that the edge cluster set G = {g1,g2,…,g M}, M is the number of edge clusters, each cluster g k The edge node set E k ={e k1 ,e k2 ,…,e kN}, N is the edge cluster g k The number of edge nodes, edge node e kl The storage, communication, CPU resources and the upper limit of the number of containers that can be accommodated are denoted as s kl , b kl 、u kl and m kl , edge node e kl and e k′l′ The bandwidth between klk′l′ , k = k′ represents the edge node e kl and e k′l′ In the same edge cluster, the task set is denoted as T = {t1, t2, …, t Q}, Q is the number of user tasks, and task t j A tuple of three parameters is represented as t j = <c j ,s j ,u j >, where c j is the task's requirement for containers, s j is the memory requirement of the task on the edge node, u j represents the CPU requirement of the task on the edge node; the container set is denoted as C = {c1,c2,…,c R}, R is the number of containers, and the set of container image layers is denoted as L = {l1,l2,…,l U}, U is the number of container image layers, image layer l i The size ofi , the dependency of the container on the image layer is known, using the binary variable r ij Indicates that r ij =1 indicates container c i Requires image layer l i , on the contrary, r ij =0 means container c i No image layer required i ,Containers on the same edge node share the image layer, and each image layer only needs to be downloaded once.
[0065] Furthermore, in step S3, the scheduling optimization problem is in the form of:
[0066] P1:
[0067] C.1
[0068] C.2
[0069] C.3
[0070] C.4
[0071] C.5
[0072] C.6L σ ≤L
[0073] Among them, t cj Represents container c j The startup delay, is the total startup delay of the container, τ(b) is the total number of tasks arriving within the time period τ, then represents the average latency of container startup, and constraint C.1 means that each task must be scheduled to an edge node for execution, where a jkl is a binary decision variable, indicating whether task t j Dispatched to edge node e kl ; Constraint C.2 means that the container startup delay is greater than the sum of the download times of all image layers, where t ikl Indicates container image layer l i At the edge node e kl The download time of edge node e kl The memory space limit, CPU resource limit, and container quantity limit are all contained in the binary variable z. ikl Represents image layer l i Whether it exists at the edge node e kl , z ikl =1 means mirror layer li Exists at edge node e kl , on the contrary, z ikl =0 means mirror layer l i Does not exist at edge node e kl ; Constraint C.6 indicates that the load balancing degree between edge clusters does not exceed a specific threshold, where L σ is the load balancing degree of edge cluster resources, and L is the load balancing degree threshold between edge clusters.
[0074] Furthermore, the method of step S4 is as follows:
[0075] S41. For each task, select edge nodes that can download containers and meet their storage and CPU resource requirements, add nodes that meet the conditions to the candidate allocation node queue, and build a resource load cost matrix for the edge nodes added to the candidate allocation node queue to ensure resource load balance between edge clusters. Use a linear planner to find a container scheduling solution with the lowest resource load cost.
[0076] The resource load cost matrix is a three-dimensional matrix of R×M×N, and the matrix elements cost ikl Represents container c i Dispatched to edge node e kl The resource load cost of the scheduling resource load cost is calculated as follows:
[0077] cost ikl =ω1(u i / u kl )+ω2(p′ i / s kl )
[0078] Among them, u i / u kl Represents task t i Required CPU resources and edge nodes kl The ratio of CPU resources owned; p′ i Represents container c i Dispatched to edge node e kl The required memory size consists of two parts: one is task t i Calculate the required memory size, and secondly, container c i Dispatched to edge node e kl The total memory size occupied by the image layers that need to be downloaded additionally; ω1 and ω2 are parameters used to adjust the proportion of memory size and CPU resources in the total load;
[0079] S42, set a load balancing degree threshold L between edge clusters, and calculate the load balancing degree representation value between edge clusters after scheduling according to the container scheduling scheme obtained in step S41. If it exceeds the set threshold, go to step S41 to re-solve the suboptimal solution with the lowest scheduling resource load cost;
[0080] Among them, the resource load balancing degree L between the edge clusters σ The calculation is as follows:
[0081]
[0082] Where M is the number of edge clusters, Load gk is the edge cluster g k The resource load, is the average resource load of all edge clusters;
[0083] S43. According to the scheduling scheme obtained in step S42, the container image layers required for container scheduling and not downloaded by the edge node are added to the edge node container image layer download queue, the download time of each container image layer is calculated, and the download order of the container image layers in the download queue is adjusted using a dynamic programming algorithm to minimize the container startup delay.
[0084] Furthermore, the Load gk The calculation method is as follows:
[0085]
[0086] Among them, ε1 and ε2 are proportional parameters, which are used to adjust the proportion of memory load and CPU load in resource load. ikl p i is the edge node e kl The memory size occupied by the downloaded image layer, a jkl r ij p i (1-z ikl )+a jkl s j Represents task t j Dispatched to edge node e kl The edge node memory size that will be occupied includes the size of the container image layer and the memory required for task calculation.
[0087] Furthermore, the ikl It is calculated as follows:
[0088]
[0089] Among them, the task is scheduled to the edge node, z ikl =1 indicates the image layer l required for the taski Exists in the edge node e of task scheduling allocation kl , there is no need to download repeatedly, so the image layer download time is 0; z ik′l′ =1 means that the image layer required by the task exists in other edge nodes e in the edge cluster k′l′ , it can be downloaded from the edge nodes that have downloaded the image layer, so the download time takes the shortest download time among the edge nodes; when the image layer required by the task does not exist in the edge cluster, it is downloaded from the cloud server, and the download time is the size of the image layer divided by the bandwidth between the edge node and the cloud server.
[0090] In addition, the present invention proposes a computer device for scheduling multi-cluster containers based on image layers in an edge computing environment, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any one of the methods when executing the computer program.
[0091] In addition, the present invention proposes a storage medium having a computer program stored thereon, wherein the computer program implements the steps of any one of the methods when executed by a processor.
[0092] In addition, the present invention proposes a multi-cluster container scheduling system based on an image layer in an edge computing environment, which includes the following modules:
[0093] The environment definition module defines the communication connection and task scheduling process of the multi-cluster edge computing environment, edge clusters and edge nodes, computing resource requirements of tasks, containers and container image layers, and the dependencies between the two;
[0094] The parameter collection module collects the computing resource and communication resource information of multiple cluster edge nodes in the edge computing environment, and obtains the existence of container image layers on edge nodes;
[0095] The optimization problem module establishes a scheduling optimization problem model based on the node computing resource constraints, task scheduling requirements, and image download latency that need to be met in the edge computing environment. The optimization goal is to minimize the container startup delay and ensure resource load balancing between edge clusters.
[0096] The solution solving module uses heuristic methods to quickly screen out edge nodes whose computing resources meet the task requirements. In order to ensure the balanced resource load between edge clusters, the global optimization characteristics of linear programming are used to solve the container allocation solution with low resource load cost; the load balance between edge clusters in the edge computing environment is calculated, and the container allocation is adjusted according to the resource load balance; a container image layer download queue is built for each edge node. Since different download orders of container image layers will affect the container startup time, the dynamic programming method is used to find the container image layer download order that minimizes the container startup time;
[0097] The container startup module downloads the container image layers in sequence according to the obtained container image layer download order to complete the container startup.
[0098] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A multi-cluster container scheduling method based on image layer in edge computing environment, characterized in that: The method comprises the following steps: S1. Define the communication connection and task scheduling process of the multi-cluster edge computing environment, define the edge cluster and edge node, the computing resource requirements of the task, the container and container image layer, and the dependency between the two; S2. Collect computing resource and communication resource information of multi-cluster edge nodes in the edge computing environment, and obtain the existence of container image layers on edge nodes; S3. Based on the node computing resource constraints, task scheduling requirements, and image download latency that need to be met in the edge computing environment, a scheduling optimization problem model is established. The optimization goal is to minimize the container startup latency and ensure resource load balancing between edge clusters. S4. Use heuristic methods to quickly screen out edge nodes whose computing resources meet the task requirements. In order to ensure the balanced resource load between edge clusters, use the global optimization characteristics of linear programming to solve the container allocation scheme with low resource load cost; calculate the load balancing degree between edge clusters in the edge computing environment, and adjust the container allocation according to the resource load balancing degree; build a container image layer download queue for each edge node. Since different download orders of container image layers will affect the container startup time, use dynamic programming to find the container image layer download order that minimizes the container startup time; S5. Download the container image layers in sequence according to the downloading order of the container image layers obtained in S4, and complete the container startup.
2. According to claim 1, a multi-cluster container scheduling method based on image layer in edge computing environment is characterized in that: The specific method of step S1 is as follows: In the edge computing environment, there are edge clouds, edge clusters, and edge nodes. An edge cloud and multiple edge clusters together constitute an edge cloud network. Each edge cluster contains multiple edge nodes. The cloud center is connected to the edge network through a backbone network. The edge clusters are connected through a wide area network. The edge nodes in the edge cluster are connected through a local area network. In response to user requests, user tasks are offloaded to the edge environment. User tasks run in containers. First, the container is deployed to the edge node in the edge cluster. The container consists of container image layers. To start the container, you need to download multiple container image layers that the container depends on. The container image layers are stored in the cloud. The container can only be started when all the image layers required by the container are downloaded. Assume that the edge cluster set G = {g1,g2,…,g M }, M is the number of edge clusters, and each cluster g k The edge node set E k ={e k1 ,e k2 ,…,e kN }, N is the edge cluster g k The number of edge nodes, edge node e kl The storage, communication, CPU resources and the upper limit of the number of containers that can be accommodated are denoted as s kl 、b kl 、u kl and m kl , edge node e kl and e k′l′ The bandwidth between klk′l′ , k = k′ represents the edge node e kl and e k′l′ In the same edge cluster, the task set is denoted as T = {t1, t2, …, t Q }, Q is the number of user tasks, and task t j A tuple of three parameters is represented as t j = <c j ,s j ,u j >, where c j is the task's requirement for containers, s j is the memory requirement of the task on the edge node, u j represents the CPU requirement of the task on the edge node; the container set is denoted as C = {c1,c2,…,c R }, R is the number of containers, and the set of container image layers is denoted as L = {l1,l2,…,l U }, U is the number of container image layers, image layer l i The size of i , the dependency of the container on the image layer is known, using the binary variable r ij Indicates that r ij =1 indicates container c i Requires image layer l i , on the contrary, r ij =0 means container c i No image layer required i ,Containers on the same edge node share the image layer, and each image layer only needs to be downloaded once.
3. According to claim 2, a multi-cluster container scheduling method based on image layer in edge computing environment is characterized in that: In step S3, the scheduling optimization problem is in the form of: C.6L σ ≤L Among them, t cj Represents container c j The startup delay, ∑ cj∈c t cj is the total startup delay of the container, τ(b) is the total number of tasks arriving within the time period τ, then ∑ cj∈C t cj represents the average latency of container startup, and constraint C.1 means that each task must be scheduled to an edge node for execution, where a jkl is a binary decision variable, indicating whether task t j Dispatched to edge node e kl ; Constraint C.2 means that the container startup delay is greater than the sum of the download times of all image layers, where t ikl Indicates container image layer l i At the edge node e kl The download time of edge node e kl The memory space limit, CPU resource limit, and container quantity limit are all contained in the binary variable z. ikl Represents image layer l i Whether it exists at the edge node e kl , z ikl =1 means mirror layer l i Exists at edge node e kl , on the contrary, z ikl =0 means mirror layer l i Does not exist at edge node e kl ; Constraint C.6 indicates that the load balancing degree between edge clusters does not exceed a specific threshold, where L σ is the load balancing degree of edge cluster resources, and L is the load balancing degree threshold between edge clusters.
4. According to claim 3, a multi-cluster container scheduling method based on image layer in edge computing environment is characterized in that: The method of step S4 is as follows: S41. For each task, select edge nodes that can download containers and meet their storage and CPU resource requirements, add nodes that meet the conditions to the candidate allocation node queue, and build a resource load cost matrix for the edge nodes added to the candidate allocation node queue to ensure resource load balance between edge clusters. Use a linear planner to find a container scheduling solution with the lowest resource load cost. The resource load cost matrix is a three-dimensional matrix of R×M×N, and the matrix elements cost ikl Represents container c i Dispatched to edge node e kl The resource load cost of the scheduling resource load cost is calculated as follows: cost ikl =ω1(u i / u kl )+ω2(p′ i / s kl ) Among them, u i / u kl Represents task t i The CPU resources required and the edge nodes kl The ratio of CPU resources owned; p′ i Represents container c i Dispatched to edge node e kl The required memory size consists of two parts: one is task t i Calculate the required memory size, and secondly, container c i Dispatched to edge node e kl The total memory size occupied by the image layers that need to be downloaded additionally; ω1 and ω2 are parameters used to adjust the proportion of memory size and CPU resources in the total load; S42, set a load balancing degree threshold L between edge clusters, and calculate the load balancing degree representation value between edge clusters after scheduling according to the container scheduling scheme obtained in step S41. If it exceeds the set threshold, go to step S41 to re-solve the suboptimal solution with the lowest scheduling resource load cost; Among them, the resource load balancing degree L between the edge clusters σ The calculation is as follows: Where M is the number of edge clusters, Load gk is the edge cluster g k The resource load, is the average resource load of all edge clusters; S43. According to the scheduling scheme obtained in step S42, the container image layers required for container scheduling and not downloaded by the edge node are added to the edge node container image layer download queue, the download time of each container image layer is calculated, and the download order of the container image layers in the download queue is adjusted using a dynamic programming algorithm to minimize the container startup delay.
5. According to claim 4, a multi-cluster container scheduling method based on image layer in edge computing environment is characterized in that: Load gk The calculation method is as follows: Among them, ε1 and ε2 are proportional parameters, which are used to adjust the proportion of memory load and CPU load in resource load. ikl p i is the edge node e kl The memory size occupied by the downloaded image layer, a jkl r ij p i (1-z ikl )+a jkl s j Represents task t j Dispatched to edge node e kl The edge node memory size that will be occupied includes the size of the container image layer and the memory required for task calculation.
6. According to claim 5, a multi-cluster container scheduling method based on image layer in edge computing environment is characterized in that: The ikl It is calculated as follows: Among them, the task is scheduled to the edge node, z ikl =1 indicates the image layer l required by the task i Exists in the edge node e of task scheduling allocation kl , there is no need to download repeatedly, so the image layer download time is 0; z ik′l′ =1 means that the image layer required by the task exists in other edge nodes e in the edge cluster k′l′ , it can be downloaded from the edge nodes that have downloaded the image layer, so the download time takes the shortest download time among the edge nodes; when the image layer required by the task does not exist in the edge cluster, it is downloaded from the cloud server, and the download time is the size of the image layer divided by the bandwidth between the edge node and the cloud server.
7. A computer device for scheduling multi-cluster containers based on image layers in an edge computing environment, comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
8. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A multi-cluster container scheduling system based on image layer in edge computing environment, characterized in that: The system includes the following modules: The environment definition module defines the communication connection and task scheduling process of the multi-cluster edge computing environment, edge clusters and edge nodes, computing resource requirements of tasks, containers and container image layers, and the dependencies between the two; The parameter collection module collects the computing resource and communication resource information of multiple cluster edge nodes in the edge computing environment, and obtains the existence of container image layers on edge nodes; The optimization problem module establishes a scheduling optimization problem model based on the node computing resource constraints, task scheduling requirements, and image download latency that need to be met in the edge computing environment. The optimization goal is to minimize the container startup delay and ensure resource load balancing between edge clusters. The solution solving module uses heuristic methods to quickly screen out edge nodes whose computing resources meet the task requirements. In order to ensure the balanced resource load between edge clusters, the global optimization characteristics of linear programming are used to solve the container allocation solution with low resource load cost; the load balance between edge clusters in the edge computing environment is calculated, and the container allocation is adjusted according to the resource load balance; a container image layer download queue is built for each edge node. Since different download orders of container image layers will affect the container startup time, the dynamic programming method is used to find the container image layer download order that minimizes the container startup time; The container startup module downloads the container image layers in sequence according to the obtained container image layer download order to complete the container startup.
Citation Information
Cited By
Edge application scheduling method and device, equipment, medium and product
CN121151330A