Resource scheduling method and system for containerized workloads in edge-cloud collaborative scene

By establishing a task resource demand model and an edge cluster resource model, combined with the scoring strategy of task delay matching degree and balanced matching degree, the delay and resource utilization problems of containerized task scheduling in the edge-cloud collaboration scenario are solved, and efficient resources are achieved. Utilization and mission deployment.

CN118708351APending Publication Date: 2024-09-27CHONGQING UNIV
View PDF 0 Cites 8 Cited by

Patent Information

Application Number
CN202410842852.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-27
Publication Date
2024-09-27

AI Technical Summary

Technical Problem

In edge-cloud collaboration scenarios, how to efficiently schedule containerized tasks to reduce task delays and improve multi-dimensional resource utilization of edge computing nodes, especially in heterogeneous edge computing clusters with diverse resource requirements and limited resources. .

Method used

Establish a task resource demand model, edge cluster resource model and resource allocation model, perform task scheduling through objective functions and constraints, introduce task delay matching degree and equilibrium matching degree, and comprehensively score to determine the optimal node for task deployment.

Benefits of technology

It achieves efficient scheduling of containerized tasks in edge-cloud collaboration scenarios, reduces task delays and improves multi-dimensional resource utilization. It considers resource types and node status more comprehensively than existing strategies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118708351A
    Figure CN118708351A
Patent Text Reader

Abstract

The invention relates to the technical field of resource scheduling in a side cloud collaboration scene, and particularly discloses a resource scheduling method and system for containerized workloads in the side cloud collaboration scene, firstly, a resource demand model of a task and a node resource model corresponding to the resource demand model are established, and the resource state of the task, namely a computing node, can be better mastered; besides, the proposed scheduling strategy aims at improving the multi-dimensional resource utilization rate and reducing the task delay, so that in the process of scheduling the container to the node, the concepts of the task delay matching degree and the task balance matching degree are introduced, the task processing delay and the network delay are considered when the task delay matching degree is calculated, and the task balancing matching degree is calculated. When the task balance matching degree is calculated, the thought of multi-attribute decision is introduced, the score of each calculation node is calculated by using the two matching degrees, the highest score is the optimal node of the currently submitted containerized task, and the task is scheduled to the optimal node.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of resource scheduling technology in edge-cloud collaboration scenarios, and in particular to a resource scheduling method and system for containerized workloads in edge-cloud collaboration scenarios. Background Art

[0002] In today's information age, the demand for computing power is increasing. In order to meet this computing demand, two computing modes have been formed, namely cloud computing and edge computing, on the cloud and the edge. Cloud computing is mainly based on large-scale data centers. Terminal devices transmit high-load task data to the cloud for processing, and transmit the processing results back to the edge after calculation. This method greatly expands business flexibility, but it will bring unpredictable high latency and other problems. In addition, the resource utilization rate of the data center is low, resulting in serious waste of computing resources and low processing efficiency. Edge computing is a computing mode for network edge devices, which is closer to terminal devices. Therefore, it can reduce latency, relieve network communication pressure in data centers, and improve resource utilization of computing devices.

[0003] There is a trend to transfer workloads from the cloud to the edge. Edge devices usually have limited computing resources. It is a complex problem to distribute and manage loads to edge nodes with limited resources. A promising method is to use containerization technology. With the continuous development of the Internet of Things, edge computing devices have become increasingly powerful and can run containerized tasks. Compared with virtual machines, containers are rapidly gaining popularity as a lightweight virtualization technology. They have limited resource requirements and fast startup speed. At the same time, they maintain sufficient flexibility in terms of size and power consumption. They can provide fine-grained resource allocation based on operating system-level virtualization technology and are relatively easy to deploy. At the same time, container orchestration platforms such as Docker Swarm, Google Kubernetes, and Mesosphere Marathon continue to emerge, providing container-based infrastructure. These advantages have triggered a series of research and development on containerization technology. How to efficiently schedule and deploy containers on heterogeneous edge computing clusters to achieve the goal of reducing task latency and improving multi-dimensional resource utilization has become a research focus, and has also raised new challenges and requirements for related research:

[0004] 1) The resource requirements of various containerized tasks for CPU, memory, disk, and network are highly diverse, and are usually specified as a combination of dimensional indicators such as CPU, memory, network, disk, etc. These resource requirements must take into account the different capacities and capabilities of heterogeneous edge computing clusters.

[0005] 2) Fine-grained resource allocation for containerized workloads can improve multi-dimensional resource utilization of edge devices and enhance load balancing.

[0006] 3) Task delay includes processing delay and communication delay. As the key to measuring edge computing efficiency, task delay should be the key optimization target in the process of containerized workload scheduling and deployment.

[0007] In recent years, the issue of container orchestration and scheduling strategies has attracted widespread attention. In mainstream container orchestration platforms such as Swarm and Kubernetes, the scheduling and deployment strategies for containerized workloads are mainly: a. Place the workload evenly on the cluster computing nodes to ensure the fairness of task placement. b. Place the workload on the computing node with the least / most load, and the computing node must ensure that there are enough resources to run this workload. c. Place the workload with the goal of balancing the resource utilization between specific computing nodes to achieve load balancing. The resource dimensions considered by the above scheduling strategies are relatively single, such as only considering CPU and memory, and the degree of optimization of container scheduling and deployment issues is relatively limited. Summary of the invention

[0008] The present invention provides a resource scheduling method and system for containerized workloads in an edge-cloud collaboration scenario, and solves the technical problem of how to schedule containerized tasks more reasonably, thereby improving the multi-dimensional resource utilization of edge computing nodes while reducing the maximum completion time of the tasks.

[0009] In order to solve the above technical problems, the present invention provides a resource scheduling method for containerized workloads in an edge-cloud collaboration scenario, including:

[0010] Establish a task resource demand model, that is, determine the set of containerized tasks to be scheduled B, the set of resource types K, and determine any task b to be scheduled in the set of containerized tasks to be scheduled B. j Task resource requirements and constraints;

[0011] Establish an edge cluster resource model, that is, determine the cluster node set N used to execute the containerized task set B to be scheduled, and determine any computing node n in the cluster node set N. i The resource type set K determines any computing node n i The remaining available resource set R i ;

[0012] Establish a resource allocation model, that is, determine the conditions that need to be met when allocating resources;

[0013] Establish a scheduling problem model based on the task resource demand model, edge cluster resource model, and resource allocation model, that is, determine the objective function and constraints that need to be met during task scheduling;

[0014] Task scheduling is performed based on the scheduling problem model.

[0015] Preferably, the objective function is constructed as:

[0016]

[0017] Among them, max means maximization, z ij Represents task b j Whether it is placed on computing node n i The indicator on z ij =1 indicates task b j Placed on compute node n i On, otherwise z ij =0; C ij Represents computing node n i With task b j The equilibrium matching degree, D ij Represents computing node n i With task b j The delay matching degree of ij Represents computing node n i Processing task b j The higher the delay matching degree, the better the task b j On the computing node n i The lower the latency on task b, the j The more suitable it is to be assigned to computing node n i Balanced matching degree C ij Indicates that each computing node has a j The degree of balance on multi-dimensional resources. The higher the balance matching degree, the higher the multi-dimensional resource utilization benefit obtained by scheduling the task to the node; α represents the weight allocation parameter of task delay matching degree and task balance matching degree.

[0018] Preferably, the delay matching degree D ij According to task b j On the computing node n i The processing delay D p And the communication delay D n calculate;

[0019] Processing delay D p Defined as:

[0020]

[0021] Among them, data represents task b j The amount of data, Represented as task b j the index of the node to allocate, Represents a compute node At time t, for task b j The number of allocated CPUs;

[0022] Communication delay D n Defined as:

[0023]

[0024] in, Represents a non-computational node Computing nodes n i At time t, for task b j The allocated disk read bandwidth, Represents a non-computational node Computing nodes n i At time t, for task b j The allocated output network bandwidth, Represents a compute node At time t, for task b j The allocated input network bandwidth, max{} represents the maximum value;

[0025] In the resource allocation model, the conditions that must be met when allocating resources are that for any resource type k, computing node n i At time t, for task b j The number of allocated resources of type k satisfy:

[0026]

[0027] min{,} means taking the smallest value in the brackets, and max{,} means taking the largest value in the brackets. represents any, φ represents the adjustment parameter, Respectively represent task b j Requirements and constraints on resource type k, r i k Represents computing node n i The total amount of remaining available resources on resource type k.

[0028] Preferably, the delay matching degree D ij Calculated by the following formula:

[0029]

[0030] Where θ represents the processing delay D p and communication delay D n The weight distribution parameter.

[0031] Preferably, balanced matching degree C ij The calculation is performed using the following steps:

[0032] According to the calculation node n iThe total amount of remaining available resources r on resource type k i k And the computing node n i The initial total resources are Calculate the computing node n i Current resource utilization on resource type k;

[0033] Based on the current resource computing rate and computing node n i At time t, for task b j The number of allocated resources of type k Calculate the computing node n i Run task b j The expected resource utilization of resource type k;

[0034] Assume that there are currently m computing nodes. According to the expected resource utilization of all resource types, m computing nodes are calculated to run task b separately. j The m×4 dimensional expected resource utilization matrix after that;

[0035] Normalize the expected resource utilization matrix;

[0036] Calculate the maximum value of each column of the normalized expected resource utilization matrix to obtain matrix A * , calculate the minimum value of each column of the normalized expected resource utilization matrix to obtain matrix A - ;

[0037] Calculate each computing node and matrix A * Distance And each computing node and matrix A - Distance

[0038]

[0039] According to distance and distance Calculate the equilibrium matching degree C ij .

[0040] Preferably, computing node n i The current resource utilization on resource type k is calculated as follows:

[0041]

[0042] Compute Node n i Run task b j The expected resource utilization on resource type k is then calculated as follows:

[0043]

[0044] The m×4 dimensional expected resource utilization matrix is ​​constructed as follows:

[0045]

[0046] The resource type k includes cpu, memory, network bandwidth, and disk bandwidth.

[0047] The m×4 dimensional expected resource utilization matrix is ​​normalized according to the following formula:

[0048]

[0049] Among them, topsis_matrix xy represents the elements in the normalized m×4-dimensional expected resource utilization matrix topsis_matrix', x=1,2,...,m represents the x-th computing node, y=1,2,...,n represents the y-th resource type, and n=4;

[0050] distance And distance Calculated by the following formula:

[0051]

[0052] in, The matrix A * and A - The elements in are defined as:

[0053]

[0054] min() means taking the minimum value, and max means taking the maximum value.

[0055] Preferably, the balanced matching degree C is calculated according to the following formula: ij :

[0056]

[0057] Preferably, the constraints that need to be met during task scheduling are:

[0058]

[0059] start j Indicates the task to be assigned b j Start computing on node n i Run on, t represents the task b to be assigned j At time t, it is assigned to computing node n i , start j +duration j Indicates the task to be assigned bj On computing node n i The superscript netOut and netIn refer to the output bandwidth and input bandwidth of the network bandwidth resource type.

[0060] Preferably, performing task scheduling based on the scheduling problem model specifically includes:

[0061] According to the resource requirements of each task to be scheduled in the task set B, the computing nodes that do not meet the requirements are filtered out from the computing node set N to obtain a candidate set of computing nodes that meet the task requirements;

[0062] The score of each computing node in the computing node candidate set for each task to be scheduled is calculated by comprehensively calculating the delay matching degree and the balance matching degree:

[0063]

[0064] Place the task to be scheduled on the computing node with the highest score to run.

[0065] The present invention also provides a resource scheduling system for containerized workloads in an edge-cloud collaboration scenario, the key of which is to apply the above-mentioned resource scheduling method for containerized workloads in an edge-cloud collaboration scenario.

[0066] The resource scheduling method and system for containerized workloads in edge-cloud collaboration scenarios provided by the present invention have the following beneficial effects:

[0067] 1) A mathematical model was established for the task scheduling problem. First, a resource requirement model for containerized tasks was established, which includes the basic requirement set of the task and the requirement limit set, i.e., the maximum resource requirement. The resource indicators consider the number of CPUs, the amount of memory, the network bandwidth, and the disk bandwidth. Second, a resource model for edge computing devices was established. Corresponding to the resource types in the task requirement model, the initial resource configuration of the cluster nodes was performed, and a model of the remaining available resources of the nodes was established. Third, a scheduling problem model was established, which abstracted the mapping process between containerized tasks and computing nodes into a mathematical model, which includes objective functions and constraints. The establishment of the above model helps the scheduling algorithm to have a more comprehensive understanding of the status of edge computing nodes and the requirements of tasks, and to strike a good balance between multiple scheduling standards.

[0068] 2) Based on the above-established model, a new multi-standard scheduling algorithm is proposed. The algorithm aims to reduce task delay and maximize multi-dimensional resource utilization. In the process of mapping containerized workloads to computing nodes, each edge computing node is comprehensively scored, and the newly submitted containerized tasks are deployed to the node with the highest score in the edge computing cluster. The concepts of task delay matching and task balance matching are introduced in the comprehensive scoring. The higher the matching degree, the higher the score.

[0069] Compared with the existing scheduling strategy, the scheduling strategy designed by the present invention is more comprehensive. First, the resource demand model of the task and the corresponding node resource model are established. Compared with most existing scheduling strategies that only focus on the number of CPUs and the number of memories, the resource types focused on by the model of the present invention are the number of CPUs, the number of memories, the network bandwidth, and the disk bandwidth, which can better grasp the resource status of the task, i.e., the computing node. In addition, considering that in the application scenario of edge computing, there are higher requirements for the processing delay of tasks, and at the same time, the resources of edge computing nodes are relatively limited, and there are higher requirements for multi-dimensional resource utilization, i.e., heterogeneous resource balance. Combining the above two points, the scheduling strategy proposed by the present invention aims to improve multi-dimensional resource utilization and reduce task delay. Therefore, in the process of scheduling containers to nodes, the scheduling algorithm of the present invention introduces the concepts of task delay matching and task balance matching. When calculating the task delay matching, the processing delay and network delay of the task are taken into account. When calculating the task balance matching, the idea of ​​multi-attribute decision-making is introduced, and the above two matching degrees are used to calculate the score of each computing node. The one with the highest score is the optimal node of the currently submitted containerized task, and the task is scheduled to the optimal node. BRIEF DESCRIPTION OF THE DRAWINGS

[0070] Figure 1 It is a flowchart of a resource scheduling method for containerized workloads in an edge-cloud collaboration scenario provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0071] The following specifically illustrates the implementation mode of the present invention in conjunction with the accompanying drawings. The embodiments are provided for illustrative purposes only and cannot be understood as limiting the present invention. The accompanying drawings are provided for reference and illustration only and do not constitute a limitation on the scope of patent protection of the present invention, because many changes can be made to the present invention without departing from the spirit and scope of the present invention.

[0072] In order to efficiently schedule and deploy containerized tasks in edge networks, an embodiment of the present invention provides a resource scheduling method for containerized workloads in edge-cloud collaboration scenarios, such as Figure 1 As shown, the steps include:

[0073] Establish a task resource requirement model;

[0074] Establish edge cluster resource model;

[0075] Establish resource allocation model;

[0076] Establish a scheduling problem model based on the task resource demand model, edge cluster resource model, and resource allocation model;

[0077] Task scheduling is performed based on the scheduling problem model.

[0078] (1) Establishing a task resource requirement model

[0079] There is a set of containerized tasks B to be scheduled in the current edge cluster. Any task b in B to be scheduled j ∈B. Considering the requirements of tasks along multiple resource dimensions, the resource type set is set to K, and the elements k in the set K are cpu, memory, network bandwidth (input network bandwidth netIn, output network bandwidth netOut), and disk bandwidth (disk). Define task b j The basic requirement of the task, that is, the minimum set of resources required to complete the task, is C j , define task b j The task resource requirement limit, that is, the maximum number of resources that a task can request, is L j Each task b j The basic requirements and resource requirements and constraints of each task are shown in Table 1, including task b j The amount of data data, task b j Basic CPU quantity requirements and restrictions Task b j Basic memory requirements and restrictions Task b j Enter the basic requirements for network bandwidth for available compute nodes and basic requirements for output network bandwidth Task b j Basic requirements for compute node disk read bandwidth and restrictions Task b j The network IO requirements and disk read requirements are different from the purely local CPU resources and memory requirements, and it depends on where the task is placed relative to where it lands.

[0080] Table 1

[0081]

[0082] (2) Establishing an edge cluster resource model

[0083] The heterogeneous computing devices at the current edge constitute a cluster node set N. Any computing node n i ∈N, the resource type set corresponding to the task requirement type is also set to K, and the computing node n is defined i The remaining available resource set is R i , computing node n i The initial total amount of resources on resource type k is Each computing node n i The total amount of remaining available resources r on resource type k i k See Table 2, including computing nodes n i The remaining number of CPUs that can be allocated i cpu , computing node n i The remaining amount of memory available for allocation i memory , computing node n i The remaining input and output network bandwidth r i net , computing node n i The remaining disk read bandwidth r i diskR .

[0084] Table 2

[0085]

[0086] (3) Establishing a resource allocation model

[0087] If task b j Scheduled to computing node n at time t i Perform calculations, calculate node n i Will be based on task b j Resource requirements and computing node n i The remaining resources for task b j Allocate the corresponding resources. For simplicity, this example does not model task preemption and defines computing node n i Give task b j The allocated resource set is X ij , computing node n i At time t, for task b j The number of resource type k allocated is (k = cpu, memory, netIn, netOut, disk). Taking the allocation of cpu resources as an example, the following conditions must be met when allocating cpu resources:

[0088]

[0089] Among them, min{,} means taking the smallest value in the brackets, and max{,} means taking the largest value in the brackets. represents arbitrary, φ represents an adjustment parameter, and the size of φ can be adjusted according to specific application scenarios.

[0090] Formula (1) indicates that when the remaining allocatable resources of the computing node are sufficient, the number of resources more than the basic requirements of the task can be appropriately scheduled to accelerate its execution. For other resource types in the resource type set K, the calculation method of the number of resources allocated to the task by the computing node is the same as that of the CPU.

[0091] (4) Establishing a scheduling problem model

[0092] First, the scheduling problem is defined. This example will analyze the problem of independent containerized task scheduling and deployment in edge heterogeneous computing scenarios. The terminal computing device at the edge will generate some new tasks, some of which will be processed on the local device, and some will be submitted to the task scheduling node in the edge cluster. Within a certain time interval, the accumulated newly submitted containerized tasks need to be scheduled to the computing node for processing. The scheduling is to reduce the average completion time of all tasks and improve the multi-dimensional average resource utilization of the cluster. Therefore, in order to achieve the above goals, when there is a task scheduling request, the mapping relationship between the task and the computing node is determined by scoring the candidate nodes. The higher the score, the higher the matching degree between the task and the node. In the scoring process, this example introduces the concepts of task delay matching and task balance matching.

[0093] 1) Task delay matching

[0094] Task b j On computing node n i The total delay duration j Including processing delay D p And the communication delay D n , assuming i j * Represents task b j The index of the node to be allocated.

[0095] Processing delay D p Defined as:

[0096]

[0097] in X represents a computing node Give task b j A collection of allocated resources.

[0098] Communication delay D n Defined as:

[0099]

[0100] in, Represents a non-computational node Computing nodes n i At time t, for task b j The allocated disk read bandwidth, Represents a non-computational node Computing nodes n i At time t, for task b j The allocated output network bandwidth, Represents a compute node At time t, for task b j The allocated input network bandwidth. max{} indicates the maximum value.

[0101] In actual scheduling, tasks can be divided into remote tasks and local tasks. In the scheduling scenario of this example, the landing node of the task is the scheduling node in the edge cluster. The scheduling node centrally manages and stores task data, and the placement node of the task is the computing node in the edge computing cluster. Therefore, the tasks concerned in this example are all remote nodes. Therefore, the first term in formula (3) Indicates the delay of the task reading data from the disk storage of the scheduling master node. The second item represents the delay of data transmission from non-task placement nodes, and the third term Indicates the delay in receiving data from the task placement node, that is, the node where the task runs.

[0102] In summary, task b j On the computing node n i The total delay duration j It can be defined as:

[0103] duration j =D p +D n (4)

[0104] Task b j With node n i The delay matching degree can be defined as:

[0105]

[0106] Among them, θ represents the weight distribution parameter of processing delay and communication delay.

[0107] In this example, the delay matching degree is defined as formula (5). The higher the delay matching degree, the better the task b j On the computing node n i The lower the latency on task b, the j The more suitable it is to be assigned to computing node ni According to the emphasis of different types of tasks on processing delay and communication delay, the size of the weight distribution parameter θ of processing delay and communication delay is set, 0<θ<1.

[0108] 2) Task Balance Matching

[0109] In modern data parallel clusters, the resource requirements of tasks are becoming more and more diverse. At the same time, the resource settings of terminal devices in edge computing are also diverse. The current scheduling strategy lacks consideration of some important resource indicators, which will lead to resource fragmentation, over-allocation of resources, mutual interference between tasks, resource waste, etc. Therefore, this example considers four dimensions of resource indicators and uses the idea of ​​multi-attribute decision making (TOPSIS) to comprehensively score multiple nodes to calculate the balanced matching degree between tasks and nodes. The higher the score of the node, the higher the balance between the multi-dimensional indicators, and the higher the multi-dimensional resource utilization benefit that can be obtained by scheduling the task to the node. The following describes the calculation process of load balancing matching:

[0110] Compute Node n i Current resource utilization of resource type k now_util_rate i k Defined as:

[0111]

[0112] According to formula (6), calculate the node n i Run task b j The expected resource utilization of resource type k after Defined as:

[0113]

[0114] Assume that there are m computing nodes in the current candidate set (the computing nodes in the candidate set are pre-filtered computing nodes, and the pre-filtering method will be introduced below). According to the expected resource utilization of all resource types in formula (7), m computing nodes are calculated to run task b respectively. j The resulting m×4 dimensional expected resource utilization matrix topsis_matrix is ​​as follows:

[0115]

[0116] ① After normalizing topsis_matrix, each element in the matrix topsis_matrix' can be expressed as:

[0117]

[0118] Where x=1,2,...,m represents the xth computing node, y=1,2,...,n represents the yth resource type, and n=4.

[0119] ② Calculate the maximum value of each column of topsis_matrix' to obtain the PIS matrix A * , calculate the minimum value of each column of topsis_matrix' to obtain the NIS matrix A - :

[0120]

[0121] The elements in the matrix are defined as:

[0122]

[0123] Among them, x=1,2,...,m, y=1,2,...,n, n=4.

[0124] ③Calculate each node, that is, each evaluation object and the PIS matrix A * Distance and NIS matrix A - Distance

[0125]

[0126] Among them, x=1,2,...,m, y=1,2,...,n, n=4.

[0127] ④ Calculate each node, that is, each evaluation object and the PIS matrix A * Proximity:

[0128]

[0129] Where x=1,2,...,m.

[0130] After the above steps, the score C of each node can be obtained. x That is, it is related to task b j The task balance matching degree calculated by equations (6) to (13) has a higher value, indicating a higher balance matching degree between the task and the node.

[0131] In summary, based on the task delay matching and task balance matching, the scheduling problem of containerized tasks in edge computing scenarios can be expressed as the following optimization problem:

[0132]

[0133] Among them, max means maximization, z ij Represents task b jWhether it is placed on computing node n i The indicator on z ij =1 indicates task b j Placed on compute node n i On, otherwise z ij =0; α represents the weight distribution parameter of task delay matching and task balance matching, st represents the requirements to be met, start j Indicates the task to be assigned b j Start computing on node n i Run on, t represents the task b to be assigned j At time t, it is assigned to computing node n i , start j +duration j Indicates the task to be assigned b j On computing node n i The superscripts netOut and netIn refer to the output bandwidth and input bandwidth of the network bandwidth resource type.

[0134] Constraint 1: represents task b j Is it assigned to node n? i superior.

[0135] Constraint 2: The range of the weight distribution parameter α representing the task delay matching and task balance matching, and the weight distribution parameter θ representing the processing delay and communication delay. The two parameters can be adjusted according to the actual application scenario.

[0136] Constraint 3: Indicates that at a certain moment, task b j Assigned to only one node.

[0137] Constraint 4: indicates that when task b j Assigned to compute node n i , the remaining resources of the node must be greater than the minimum resource requirement of the task.

[0138] Constraint 5: Indicates that no resources are allocated to a task when it is not running.

[0139] Constraint 6: Indicates that when a remote task reads data from other nodes, the network output bandwidth of the node storing the task data for scheduling the task must be greater than or equal to the disk bandwidth of the node storing the task data for scheduling the task.

[0140] Constraint 7: indicates that the network input bandwidth allocated to the task by the task deployment node must be greater than or equal to the disk bandwidth allocated to the task by the node storing the task data.

[0141] In the present invention, three weight coefficients are involved, namely, the weight allocation parameter α of task delay matching and task balance matching, the weight allocation parameter θ of processing delay and communication delay, and the weight setting of each indicator in the multi-attribute decision-making concept.

[0142] First, the weight allocation parameter α is set. This parameter depends on the type of task. The scheduling strategy in this example considers the delay matching and balance matching between tasks and nodes when placing the tasks to be scheduled on the computing nodes. In the actual edge computing cluster, there are different types of tasks. Some tasks use response time as the primary indicator to measure their service quality, such as electronic payment, online shopping, data analysis, and report generation, while some tasks use the balance of multi-dimensional resources as the primary indicator to measure their service quality, such as database processing. For these two types of tasks, the weight allocation parameter α can be automatically set to allocate and manage tasks more in line with their requirements. In this example, the initial value of this parameter is set to 0.5, that is, the task delay matching and task balance matching have equal weight.

[0143] Regarding the setting of the weight allocation parameter θ, in order to increase the flexibility of the scheduling algorithm, the parameter θ is used to adjust the weights of the processing delay and the communication delay when calculating the delay matching. This parameter mainly depends on the resource status of the computing node. For example, after obtaining the resource status data of the computing nodes in the current computing cluster, if the computing resources of a computing node, such as the number of CPUs, are significantly lower than those of other nodes, then when calculating the delay matching, the weight of its processing delay should be appropriately increased. This method can make the task delay matching data more reasonable and reliable.

[0144] For the setting of the weights of indicators of each dimension in the multi-attribute decision-making idea, when evaluating each computing node, the weights of its resource dimensions, such as the number of CPUs, the number of memories, the network bandwidth, and the disk bandwidth, can be set. Since the goal of scheduling containerized tasks in this example is to balance multi-dimensional resource indicators, and these four indicators are considered to be equally important, the initial weights of the four indicators are set to the same, which can be adjusted later according to the actual application scenario.

[0145] (5) Scheduling based on the scheduling model

[0146] The BD scheduling algorithm proposed in the present invention is divided into two processes or modules, namely the pre-filtering process / module and the scheduling process / module. For the tasks in the task set B to be scheduled, the pre-filtering process / module filters out the computing nodes that do not meet the requirements from the computing node set N according to their resource requirements, and obtains a candidate set of computing nodes that meet the task requirements. Next, the scheduling process / module scores each computing node in the candidate set based on the task delay matching degree and task balance matching degree. The score is defined as:

[0147]

[0148] The tasks to be scheduled are placed on the computing nodes with the highest scores to run. This scheduling strategy not only takes into account the balance of multi-dimensional resources, but also takes into account the processing delay and communication delay caused by task scheduling.

[0149] 1) Pre-filtration process / module

[0150] For the current scheduled task b j , in the computing node set N, if there are computing nodes with remaining resources r i k Can satisfy task b j Resource requirements (C j ), then add it to the node candidate set S can Otherwise, the node is filtered out. The pre-filtering algorithm is shown in the pseudo code Algorithm 1 in Table 3.

[0151] Table 3

[0152]

[0153] 2) Scheduling process / module

[0154] Algorithm 2 of the scheduling process / module shown in Table 4 gives the pseudo code of the scheduling process. The input of the algorithm is the set of tasks to be scheduled B and the set of computing nodes N of the edge computing cluster. The result is that each task to be scheduled is placed on its most suitable computing node for execution.

[0155] Lines 1-11 of Algorithm 2 represent iteratively taking a task from task set B, finding a node with the highest matching degree for it through scoring, and running it until all the tasks to be scheduled are traversed. Lines 1-5 are the pre-filtering process, and lines 6-8 describe that if the candidate set is empty, there is no computing node that meets the task requirements, then task b will be j The state of is set to pending, otherwise line 9 uses Algorithm 3 (Score & Ranking (b j ,S can )) Score the nodes in the candidate set and get the nodes related to the current task b j The most suitable computing node n x , Line 10 places the task, and line 11 updates the remaining resources of the computing node according to the resources allocated to the task by the computing node.

[0156] Table 4

[0157]

[0158] Algorithm 3 of the scheduling module shown in Table 5 gives the scoring process (Score & Ranking (b j ,S can )) pseudo code, the input of Algorithm 3 is the current traversal job b j And the candidate set S of computing nodes can , the result is the node that best matches the current task. Lines 1-9 traverse all computing nodes in the candidate set, score them, and finally get the computing node with the highest score. Lines 2-5 calculate the latency matching degree between the current computing node and the task. Line 6 uses Algorithm 4 to calculate the balanced matching degree between the current computing node and the task. Line 7 calculates the score of the current computing node. Line 8 gets the computing node n with the highest score. ultimately , which is the node with the highest matching degree with the current task. The 9th line indicates that task b is obtained. j The computing node set S ult Lines 10 to 12 represent the node candidate set S can Remove the set S ult If the score of the remaining nodes is the same as that of node n ultimately The score difference is less than the preset value λ(Score ni -Score nultimately <λ), then add the node to the set S ult Lines 13 to 15 indicate that if the set S ult If the number of nodes in is greater than 1, then the set S ult The β of the nodes in i The node with the smallest value is taken as the node with the task b j The best matching node, where β i Represents the number of tasks that have been run in the node. In line 8 of Algorithm 3, we get the node n with the highest score among the candidate nodes. ultimately After that, traverse the candidate node set except the node with the highest score and calculate the scores of the nodes. If there is a node with the same score as n ultimately For compute nodes with scores that differ only slightly by λ (in this example, the value is set to 0.05), both nodes are considered as scalable nodes. Next, the number of tasks that have been running on the two nodes is obtained. i In this example, we select β from the two computing nodes. i The computing node with a smaller value is used as the optimal node for placing the current task. This approach can reduce the impact of mutual interference between tasks and resource contention on node scores.

[0159] Table 5

[0160]

[0161] An embodiment of the present invention also provides a resource scheduling system for containerized workloads in an edge-cloud collaboration scenario, which applies the above method to perform resource scheduling.

[0162] In summary, the embodiments of the present invention provide a method and system for resource scheduling of containerized workloads in an edge-cloud collaboration scenario, which have the following beneficial effects:

[0163] 1) A mathematical model was established for the task scheduling problem. First, a resource requirement model for containerized tasks was established, which includes the basic requirement set of the task and the requirement limit set, i.e., the maximum resource requirement. The resource indicators consider the number of CPUs, the amount of memory, the network bandwidth, and the disk bandwidth. Second, a resource model for edge computing devices was established. Corresponding to the resource types in the task requirement model, the initial resource configuration of the cluster nodes was performed, and a model of the remaining available resources of the nodes was established. Third, a scheduling problem model was established, which abstracted the mapping process between containerized tasks and computing nodes into a mathematical model, which includes objective functions and constraints. The establishment of the above model helps the scheduling algorithm to have a more comprehensive understanding of the status of edge computing nodes and the requirements of tasks, and to strike a good balance between multiple scheduling standards.

[0164] 2) Based on the above-established model, a new multi-standard scheduling algorithm is proposed. The algorithm aims to reduce task delay and maximize multi-dimensional resource utilization. In the process of mapping containerized workloads to computing nodes, each edge computing node is comprehensively scored, and the newly submitted containerized tasks are deployed to the node with the highest score in the edge computing cluster. The concepts of task delay matching and task balance matching are introduced in the comprehensive scoring. The higher the matching degree, the higher the score.

[0165] Compared with the existing scheduling strategy, the scheduling strategy designed by the present invention is more comprehensive. First, the resource demand model of the task and the corresponding node resource model are established. Compared with most existing scheduling strategies that only focus on the number of CPUs and the number of memories, the resource types focused on by the model of the present invention are the number of CPUs, the number of memories, the network bandwidth, and the disk bandwidth, which can better grasp the resource status of the task, i.e., the computing node. In addition, considering that in the application scenario of edge computing, there are higher requirements for the processing delay of tasks, and at the same time, the resources of edge computing nodes are relatively limited, and there are higher requirements for multi-dimensional resource utilization, i.e., heterogeneous resource balance. Combining the above two points, the scheduling strategy proposed by the present invention aims to improve multi-dimensional resource utilization and reduce task delay. Therefore, in the process of scheduling containers to nodes, the scheduling algorithm of the present invention introduces the concepts of task delay matching and task balance matching. When calculating the task delay matching, the processing delay and network delay of the task are taken into account. When calculating the task balance matching, the idea of ​​multi-attribute decision-making is introduced, and the above two matching degrees are used to calculate the score of each computing node. The one with the highest score is the optimal node of the currently submitted containerized task, and the task is scheduled to the optimal node.

[0166] The above embodiments are preferred implementation modes of the present invention, but the implementation modes of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications that do not deviate from the spirit and principles of the present invention should be equivalent replacement methods and are included in the protection scope of the present invention.

Claims

1. A resource scheduling method for containerized workloads in edge-cloud collaboration scenarios, characterized in that: include: Establish a task resource demand model, that is, determine the set of containerized tasks to be scheduled B, the set of resource types K, and determine any task b to be scheduled in the set of containerized tasks to be scheduled B. j Task resource requirements and constraints; Establish an edge cluster resource model, that is, determine the cluster node set N used to execute the containerized task set B to be scheduled, and determine any computing node n in the cluster node set N. i The resource type set K determines any computing node n i The remaining available resource set R i ; Establish a resource allocation model, that is, determine the conditions that need to be met when allocating resources; Establish a scheduling problem model based on the task resource demand model, edge cluster resource model, and resource allocation model, that is, determine the objective function and constraints that need to be met during task scheduling; Task scheduling is performed based on the scheduling problem model.

2. The resource scheduling method for containerized workloads in the edge-cloud collaboration scenario according to claim 1 is characterized in that: The objective function is constructed as: Among them, max means maximization, z ij Represents task b j Whether it is placed on computing node n i The indicator on z ij =1 indicates task b j Placed on compute node n i On, otherwise z ij =0; C ij Represents computing node n i With task b j The equilibrium matching degree, D ij Represents computing node n i With task b j The delay matching degree of ij Represents computing node n i Processing task b j The higher the delay matching degree, the better the task b j On the computing node n i The lower the latency on task b, the j The more suitable it is to be assigned to computing node n i Balanced matching degree C ij Indicates that each computing node has a j The degree of balance on multi-dimensional resources. The higher the balance matching degree, the higher the multi-dimensional resource utilization benefit obtained by scheduling the task to the node; α represents the weight allocation parameter of task delay matching degree and task balance matching degree.

3. The resource scheduling method for containerized workloads in the edge-cloud collaboration scenario according to claim 2 is characterized in that: Delay matching degree D ij According to task b j On the computing node n i The processing delay D p And the communication delay D n calculate; Processing delay D p Defined as: Among them, data represents task b j The amount of data, Represented as task b j the index of the node to allocate, Represents a compute node At time t, for task b j The number of allocated CPUs; Communication delay D n Defined as: in, Represents a non-computational node Computing nodes n i At time t, for task b j The allocated disk read bandwidth, Represents a non-computational node Computing nodes n i At time t, for task b j The allocated output network bandwidth, Represents a compute node At time t, for task b j The allocated input network bandwidth, max{} represents the maximum value; In the resource allocation model, the conditions that must be met when allocating resources are that for any resource type k, computing node n i At time t, for task b j The number of allocated resources of type k satisfy: min{,} means taking the smallest value in the brackets, and max{,} means taking the largest value in the brackets. represents any, φ represents the adjustment parameter, Respectively represent task b j Requirements and constraints on resource type k, Represents computing node n i The total amount of remaining available resources on resource type k.

4. The resource scheduling method for containerized workloads in the edge-cloud collaboration scenario according to claim 3 is characterized in that: Delay matching degree D ij Calculated by the following formula: Where θ represents the processing delay D p and communication delay D n The weight distribution parameter.

5. The resource scheduling method for containerized workloads in the edge-cloud collaboration scenario according to claim 4 is characterized in that: Balanced matching degree C ij The calculation is performed using the following steps: According to the calculation node n i The total amount of remaining available resources on resource type k And the computing node n i The initial total resources are Calculate the computing node n i Current resource utilization on resource type k; Based on the current resource computing rate and computing node n i At time t, for task b j The number of allocated resources of type k Calculate the computing node n i Run task b j The expected resource utilization of resource type k; Assume that there are currently m computing nodes. According to the expected resource utilization of all resource types, m computing nodes are calculated to run task b separately. j The m×4 dimensional expected resource utilization matrix after that; Normalize the expected resource utilization matrix; Calculate the maximum value of each column of the normalized expected resource utilization matrix to obtain matrix A * , calculate the minimum value of each column of the normalized expected resource utilization matrix to obtain matrix A - ; Calculate each computing node and matrix A * Distance And each computing node and matrix A - Distance According to distance and distance Calculate the equilibrium matching degree C ij .

6. The resource scheduling method for containerized workloads in the edge-cloud collaboration scenario according to claim 5 is characterized in that: Compute Node n i The current resource utilization on resource type k is calculated as follows: Compute Node n i Run task b j The expected resource utilization on resource type k is then calculated as follows: The m×4 dimensional expected resource utilization matrix is ​​constructed as follows: The resource type k includes cpu, memory, network bandwidth, and disk bandwidth. The m×4 dimensional expected resource utilization matrix is ​​normalized according to the following formula: Among them, topsis_matrix xy represents the elements in the normalized m×4-dimensional expected resource utilization matrix topsis_matrix', x=1,2,...,m represents the x-th computing node, y=1,2,...,n represents the y-th resource type, and n=4; Distance S x * and the distance S x - Calculated by the following formula: in, The matrix A * and A - The elements in are defined as: min() means taking the minimum value, and max means taking the maximum value.

7. The resource scheduling method for containerized workloads in the edge-cloud collaboration scenario according to claim 6 is characterized in that: The equilibrium matching degree C is calculated according to the following formula ij :

8. The resource scheduling method for containerized workloads in the edge-cloud collaboration scenario according to claim 7 is characterized in that: The constraints that need to be met when scheduling tasks are: Among them, start j Indicates the task to be assigned b j Start computing on node n i Run on, t represents the task b to be assigned j At time t, it is assigned to computing node n i , start j +duration j Indicates the task to be assigned b j On the computing node n i The superscript netOut and netIn refer to the output bandwidth and input bandwidth of the network bandwidth resource type.

9. The resource scheduling method for containerized workloads in edge-cloud collaboration scenarios according to any one of claims 2 to 8, characterized in that: Task scheduling based on the scheduling problem model specifically includes: According to the resource requirements of each task to be scheduled in the task set B, the computing nodes that do not meet the requirements are filtered out from the computing node set N to obtain a candidate set of computing nodes that meet the task requirements; The score of each computing node in the candidate set of computing nodes for each task to be scheduled is calculated by comprehensively calculating the task delay matching degree and task balance matching degree: Place the task to be scheduled on the computing node with the highest score to run.

10. Resource scheduling system for containerized workloads in edge-cloud collaboration scenarios, characterized by: A resource scheduling method for containerized workloads in an edge-cloud collaboration scenario is applied as described in any one of claims 1 to 9.

Citation Information

Cited By

  • Maneuvering edge application scene-oriented computing power resource evaluation method and system

    CN119376955A

  • Resource optimization method and device for heterogeneous computing cluster, electronic equipment and medium

    CN119440726A

  • Density peak clustering multi-granularity task decomposition algorithm based on task representation model

    CN119883620A

  • Data co-processing method and system based on large model

    CN120494431A

  • Resource optimization method, system and device for Internet of Things side end equipment, and medium

    CN120639856A