A hybrid weight task scheduling method and system for edge heterogeneous devices
By conducting performance testing and task classification of edge nodes, and combining resource performance feature weights and queue distribution weights, a task queue self-adjustment strategy is adopted to solve the resource utilization and real-time issues caused by the heterogeneity of edge devices, thereby achieving high efficiency and high performance in task scheduling.
Patent Information
- Application Number
- CN202210893419.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-27
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2042-07-27
AI Technical Summary
Existing task scheduling algorithms fail to effectively consider the heterogeneity of edge devices, resulting in insufficient resource utilization and real-time performance.
A hybrid weighted task scheduling method is adopted. By testing the performance of edge nodes and classifying tasks, the weights of node resource performance characteristics and queue distribution are calculated. Combined with the task queue self-adjustment algorithm, appropriate edge nodes are selected to execute tasks.
It effectively reduces task processing latency, improves resource utilization, and meets the real-time requirements of high-priority tasks.
Smart Images

Figure CN115237568B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of edge computing, and particularly relates to a hybrid weight task scheduling method and system for edge heterogeneous devices. BACKGROUND
[0002] With the rapid development of 5G communication technology and the Internet of Things, more and more terminal devices access the network. Using a cloud data center to provide services for these terminal devices will cause great load pressure on the cloud and will also bring significant network delay. The edge computing architecture can effectively sink the computing power, relieve the data center pressure, and reduce the network transmission delay. Unlike the cloud computing center using a homogeneous server cluster, the edge cluster is often composed of heterogeneous devices. The heterogeneity of the devices causes different execution times and resource utilization rates of the same task when executed on different edge devices. In the field of traditional monolithic computers and cloud computing, some typical task scheduling algorithms exist, such as the First-In-First-Out (FIFO) scheduling algorithm and the Round-Robin scheduling algorithm. Due to the heterogeneity of the edge devices, these algorithms are not suitable for the edge computing field. The task scheduling algorithm has a significant impact on the performance of the edge platform. The existing scheduling algorithm does not consider the influence of the heterogeneity of the edge devices on the task execution, resulting in that the resource utilization rate and real-time performance of the edge system cannot meet the demand. SUMMARY
[0003] Based on the above-mentioned shortcomings and deficiencies in the prior art, one of the purposes of the present application is to at least solve one or more of the above-mentioned problems in the prior art, in other words, one of the purposes of the present application is to provide a hybrid weight task scheduling method and system for edge heterogeneous devices which meet one or more of the above-mentioned needs.
[0004] In order to achieve the above-mentioned purposes of the application, the technical scheme adopted by the present application is as follows:
[0005] A hybrid weight task scheduling method for edge heterogeneous devices, comprising the following steps:
[0006] S1, performing performance testing on each edge node, and recording the performance information of the edge node in terms of CPU, MEM and DISK;
[0007] Extracting the target resource type affecting the task running through pre-running, so as to divide the task into one of CPU, MEM and DISK;
[0008] S2, calculating the node resource performance feature weight according to the type of the task and the performance information of the edge node, calculating the node queue distribution weight according to the recorded node queue information, and finally determining the target node for executing the task by fusing the two weights;
[0009] S3, according to the priority mechanism of the queue, the task is added to the task queue of the target node;
[0010] S4, check all edge node waiting queue, if there is a free task queue, use the task queue self-adjusting algorithm to select the appropriate task from the waiting queue of other nodes, migrate to the idle node for execution.
[0011] As a preferred solution, in step S2, the node resource performance feature weight F is calculated according to the type of the task and the performance information of the edge node resource For:
[0012]
[0013] Wherein, r is the target resource type, x is the target edge node, n is the total number of edge nodes, N r,x is the performance information of the target resource type of the target edge node, N r,node is the performance information of the target resource type of the nth edge node.
[0014] As a preferred solution, in step S2, the node queue distribution weight F is calculated according to the recorded node queue information queueDistribution For:
[0015]
[0016] Wherein, L queue,x(level≤lv) represents the number of tasks in the area with priority value not greater than lv in the task queue of the target node, L queue,mode(level≤lv) represents the number of tasks in the area with priority value not greater than lv in the task queue of the nth edge node.
[0017] As a preferred solution, in step S2, the two weights are fused to obtain:
[0018] F=K1F resource +K2F queueDistribution (K1+K2=1).
[0019] As a preferred solution, the ratio of K1 and K2 is 5:1.
[0020] As a preferred solution, for the edge node, when a task running ends, the task with the earliest request time is selected from the task queue of the current highest priority task.
[0021] The application also provides a hybrid weight task scheduling system for edge heterogeneous devices, comprising:
[0022] The edge node performance detection module is configured to perform performance testing on each edge node and record performance information of the edge node in terms of CPU, MEM and DISK;
[0023] The task classification module is configured to extract target resource types affecting task running through pre-running, so as to classify tasks into one of CPU, MEM and DISK.
[0024] The hybrid weight scheduling module is configured to calculate node resource performance feature weights according to the types of tasks and the performance information of edge nodes, calculate node queue distribution weights according to the recorded node queue information, and finally determine target nodes for executing tasks by fusing the two weights; and is further configured to check all edge node waiting queues, select appropriate tasks from the waiting queues of other nodes and migrate to idle nodes for execution if there is an idle task queue, using a task queue self-adjusting algorithm.
[0025] The edge node task queue module is configured to add tasks to the task queue of the target node according to a queue priority mechanism.
[0026] As a preferred solution, the node resource performance feature weights F resource are calculated according to the types of tasks and the performance information of edge nodes.
[0027]
[0028] wherein r represents the target resource type, x represents the target edge node, n represents the total number of edge nodes, N r,x represents the performance information of the target resource type of the target edge node, N r,node represents the performance information of the target resource type of the nth edge node.
[0029] As a preferred solution, the node queue distribution weights F queueDistribution are calculated according to the recorded node queue information.
[0030]
[0031] wherein L queue,x(level≤lv) represents the number of tasks in the region of the target node task queue with a priority value not greater than lv, L queue,mode(level≤lv) represents the number of tasks in the region of the nth edge node task queue with a priority value not greater than lv.
[0032] As a preferred solution, in step S2, the two weights are fused to obtain:
[0033] F=K1F resource +K2F queueDistribution (K1+K2=1).
[0034] Compared with the prior art, the present invention has the following beneficial effects:
[0035] This invention addresses task scheduling applications in edge computing. When selecting execution nodes for tasks, it considers both the heterogeneity of edge devices and the load intensity on the current edge nodes, prioritizing them to determine target nodes. This effectively reduces task processing latency and improves resource utilization. Furthermore, the scheduling module introduces a task queue self-adjustment strategy, proactively migrating tasks to idle edge nodes for execution, further enhancing resource utilization. The task queues on edge nodes categorize tasks by priority, allowing higher-priority tasks to execute earlier, further meeting the real-time requirements of high-priority tasks in edge computing. Attached Figure Description
[0036] Figure 1 This is an architecture diagram of a hybrid weighted task scheduling system for edge heterogeneous devices according to an embodiment of the present invention;
[0037] Figure 2 This is a diagram of the edge node task queue structure according to an embodiment of the present invention;
[0038] Figure 3 This is a flowchart illustrating the dequeueing and enqueueing processes of the task queue according to an embodiment of the present invention;
[0039] Figure 4 This is a flowchart of the task queue self-adjustment mechanism according to an embodiment of the present invention;
[0040] Figure 5 This is a flowchart illustrating the task matching process according to an embodiment of the present invention.
[0041] Figure 6 This is a flowchart of a hybrid weighted task scheduling method for edge heterogeneous devices according to an embodiment of the present invention. Detailed Implementation
[0042] The present invention will be further described below with reference to the accompanying drawings.
[0043] like Figure 1 As shown, the hybrid weighted task scheduling system for edge heterogeneous devices in this embodiment of the invention is mainly divided into four modules:
[0044] (1) Task Classification Module
[0045] This module categorizes tasks based on their computer resource consumption during runtime. By pre-running tasks to detect their resource consumption, it extracts the key resource types affecting task execution. This invention focuses on three resource types: CPU, MEM, and DISK, identifying the bottleneck resource type as the task type.
[0046] (2) Edge node performance detection module
[0047] The function of this module is to detect and quantify the relative performance of all edge computing nodes. The relative performance of the edge node is used to calculate the node resource performance characteristics when selecting an edge node for a task. The detection process is divided into three rounds. Each time, the relative performance of one resource is calculated, and the resources are CPU, MEN, and DISK in turn. Taking the detection of the relative performance of the CPU as an example, a task load with a performance bottleneck of the CPU is selected, and is run on all edge nodes, and the task completion time and average resource utilization are recorded. By comparing the two indicators, the specific relative performance data can be obtained.
[0048] (3) Edge node task queue module
[0049] The function of this module is to store the tasks scheduled to the corresponding edge node. The tasks scheduled to the edge node are executed in series on the node, that is, only one task is executed at the same time on one edge node. The series execution makes all resources of the edge node used for executing one task, which guarantees that the task is executed with the highest efficiency, and guarantees the fairness of task execution, and no task is starved. In the present application, there is an independent task queue for each available edge node in the edge network, which is used to store the tasks scheduled to the node. The tasks in the queue are sorted according to the arrival time and priority, so as to ensure that the task execution order meets the expectation.
[0050] The task queue used in the embodiment of the present application can be regarded as a collection of several conventional queues, and different logical areas have different priorities. Each time, the task with the highest priority is selected for execution.
[0051] (4) Hybrid weight scheduling module
[0052] This module is the core of the embodiment of the present application, and the main function is to schedule different types of tasks. The scheduling module includes first node selection and task queue self-adjustment. For each task, the scheduling module calculates the priority of each edge node for the task when performing first node selection, and schedules the task to the node with the highest priority for execution. The calculation of the edge node priority considers the node resource performance feature weight and the node queue distribution weight. If the execution queue of a certain edge node is empty, the scheduling module will perform task queue self-adjustment, and migrate appropriate tasks to be executed on other edge nodes to the node for execution.
[0053] As Figure 2As shown, the task queue of the present application is different from the conventional queue. The enqueue and dequeue mechanism of the conventional queue is only related to time, while the enqueue and dequeue mechanism of the edge node task queue involves both time and task priority. The smaller the value of the task priority is, the higher the priority is. The edge node task queue is divided into different logical areas according to the task priority, and the tasks enter the corresponding logical area according to the priority when the tasks arrive. The tasks in the same priority area are sorted according to the arrival time. Overall structure, the task queue can be regarded as a collection of several conventional queues, and each priority has a conventional queue.
[0054] When the task arrives at the node, the enqueue process is as follows: the first step is to analyze the task priority, and the task is mapped to the corresponding priority sub-queue according to the priority; the second step is to enqueue the task from the tail of the sub-queue to ensure that the tasks in the sub-queue are sorted according to the arrival time. When the node is idle and needs to dequeue the task, the first step is to select the sub-queue with the highest priority; the second step is to obtain the head task if there is a task in the priority sub-queue; if the current priority sub-queue is empty, the next priority sub-queue is taken in order to perform the same operation, until all tasks are executed. For example, Figure 3 As shown, the enqueue and dequeue process of the task queue.
[0055] The following describes the hybrid weight scheduling module of the embodiment of the present application in detail:
[0056] The node resource performance feature is the main weight of the edge node task scheduling algorithm. When the task is executed on the node, if the task consumes resources consistent with the strong resources of the node, the resources can be fully used and the task can be executed faster. Based on this, the design idea of the resource performance feature weight model is to associate the task to the edge node with the most matched consumed resources as possible. The higher the matching degree of the task and the node is, the lower the task execution time is, and the resource performance feature weight ensures the low latency of the system.
[0057] The following describes the resource performance feature weight model in detail in combination with the formula. At this time, the resource performance data of all nodes is ready, and the scheduling system calculates the resource performance feature score of all available edge nodes through the formula. The score represents the matching degree of the node and the task, and the higher the score is, the higher the matching degree is, and the higher the scheduling priority is.
[0058]
[0059] In the above formula, r represents the target resource type, and x represents the node under investigation. Assuming that K tasks are for CPU resources, the relative performance data of the CPU resources of the k node under investigation is N cpu,k . The proportion of the k node data to the data of all nodes is calculated and normalized, and finally F resourceThat is the resource performance characteristic weight score of k node corresponding to K task. According to the method, the resource performance characteristic weight score of each node is calculated independently, and the set of the resource performance characteristic weight scores of each node is obtained. The set is sorted from high to low, and the model calculation of the resource performance characteristic weight is completed.
[0060] While modeling and calculating the resource characteristic weight, the task queue distribution of each node in the current network is modeled and the number of queue tasks of each node is introduced to calculate the score of the task queue distribution weight of each node. The task queue structure is combined to explain the task queue distribution weight model in detail. It is assumed that there are n available edge nodes in the network, and each node has an independent task queue for storing tasks waiting to be executed. The queue has no length limit and conforms to the first-in-first-out rule under the task priority. Given a task K to be scheduled, the priority of task K is lv, and the following formula is used to calculate the queue distribution weight score of node k. The score represents the matching degree of the node and the task. The higher the score, the higher the matching degree and the higher the scheduling priority.
[0061]
[0062] In the above formula, L represents the number of tasks in the node task queue whose priority value is less than or equal to lv (i.e., the priority is greater than or equal to the task). The priority factor is considered because only tasks with a priority level higher than and equal to K will be executed before K, thereby affecting the execution delay of task K. In the design of the scheduling algorithm, the longer the queue, the longer the waiting time, so the queue length L is inversely related to the final score, which is contrary to the resource performance characteristic weight model. It needs to be specially noted that when the length of a node queue is 0, it represents the highest matching value. In order to exclude the abnormality of the formula when the length is 0 (0 cannot be used as the denominator for calculation), all lengths are increased by 1. This avoids the particularity of the length being 0 while not violating the relationship between the queue length and the matching degree. Finally, all the queue distribution scores of the nodes are normalized to obtain the final data as the score data of the task queue distribution weight of the nodes.
[0063] The calculation of the edge node priority considers the node resource performance characteristic weight and the node queue distribution weight. The specific score calculation formula is as follows:
[0064] F = K1F resource + K2F queueDistributionIn the formula (K1+K2=1), F represents the final scheduling score of a specific node, and K1 and K2 represent the parameters of resource performance feature weight and task queue distribution weight, respectively. K1 and K2 essentially represent the relative importance of the two weight scores; a larger parameter indicates a greater influence of that weight on the final scheduling conclusion. In this invention, the resource performance feature weight is selected as the main weight of the scheduling algorithm, with K1:K2 = 5:1.
[0065] The specific process by which the scheduling module selects an execution node for a task is as follows:
[0066]
[0067]
[0068] like Figure 4 The diagram shows the flowchart of the task queue self-adjustment mechanism. The second part of the scheduling module is the task queue self-adjustment mechanism. By calculating the feature weights, the overall scheduling model determines the decision node and successfully schedules the task. As tasks are executed, if a node has completed all the tasks scheduled to its machine, the self-adjustment mechanism of the scheduling algorithm is triggered. This mechanism evaluates the tasks waiting in the task execution queue on other nodes and selects tasks to migrate to idle nodes for execution. This algorithm reduces resource idleness to a certain extent and improves the efficiency of resource utilization in task processing.
[0069] like Figure 5 The diagram shows the task matching process. First, a resource type is determined. Then, the task queue is traversed, and waiting tasks matching the resource type are selected to form a candidate task set. Second, the task with the highest priority is selected from the candidate task set to form a new subset of candidate tasks. This ensures that high-priority tasks are executed first. Finally, the task with the earliest submission time in the new subset of candidate tasks is output as the target task to satisfy the first-in, first-out (FIFO) rule of the queue. If no matching task exists, the above process is repeated by reselecting the resource type until a match is successful or fails.
[0070] The complete code for the task queue self-adjustment mechanism is as follows:
[0071]
[0072]
[0073] like Figure 6 As shown, the hybrid weighted task scheduling method for edge heterogeneous devices according to an embodiment of the present invention includes the following steps:
[0074] Step 1: The edge node performance detection module tests the performance of each edge node and records the performance information of the edge node in the CPU, MEM and DISK in the scheduling module.
[0075] Step 2: The task classification module extracts the key resource types affecting the task running through pre-running record, thereby classifying the task into one of the CPU, MEM and DISK.
[0076] Step 3: The hybrid weight scheduling module calculates the node resource performance feature weight according to the type of the task and the relative performance information of the edge node, calculates the node queue distribution weight according to the recorded node queue information, and finally determines the target node for executing the task by fusing the two weights;
[0077] Step 4: According to the priority mechanism of the queue, the task is added to the task queue of the target node.
[0078] Step 5: The hybrid weight scheduling module checks all the edge node waiting queues, if there is an idle task queue, uses the task queue self-adjusting algorithm to select the appropriate task from the waiting queue of other nodes and migrate to the idle node for execution.
[0079] Step 6: When the edge node has a task running end, the task with the earliest request time is selected from the task queue of the current highest priority task;
[0080] Step 7: Repeat the above steps 3, 4, 5 and 6.
[0081] The above only details the preferred embodiments and principles of the present application, and for those skilled in the art, according to the idea provided by the present application, there will be changes in the specific implementation manner, and these changes should be regarded as the protection scope of the present application.
Claims
1. A hybrid weight task scheduling method for edge heterogeneous devices, characterized in that, The method comprises the following steps: S1, testing the performance of each edge node and recording the performance information of the edge node in CPU, MEM and DISK; By pre-running, the target resource type affecting the task running is extracted, so as to divide the task into one of CPU, MEM and DISK; S2, calculating the node resource performance characteristic weight according to the type of the task and the performance information of the edge node, calculating the node queue distribution weight according to the recorded node queue information, and finally determining the target node for executing the task by fusing the two weights; S3, adding the task to the task queue of the target node according to the priority mechanism of the queue; S4, checking all edge node waiting queues, if there is an idle task queue, using the task queue self-adjusting algorithm to select the appropriate task from the waiting queue of other nodes and migrate to the idle node for execution; In step S2, the node resource performance feature weight F is calculated according to the type of the task and the performance information of the edge node resource is: ; wherein r is a target resource type, x is a target edge node, n is a total number of edge nodes, N r,x is performance information of a target resource type of a target edge node, N r,node is performance information of a target resource type of the node-th edge node; In step S2, the node queue distribution weight F is calculated according to the recorded node queue information queueDistribution is: ; wherein, L queue,x(level≤lv) represents the number of tasks in the region of the priority value level not greater than lv in the task queue of the target node, queue,node(level≤lv) represents the number of tasks in the region of the priority value level not greater than lv in the task queue of the node-th edge node; In the step S2, the two weights are fused to obtain: ; wherein .
2. The hybrid weight task scheduling method for edge-heterogeneous devices according to claim 1, wherein, The ratio of K1 to K2 is 5:
1.
3. The hybrid weight task scheduling method for edge heterogeneous devices according to any one of claims 1-2, characterized in that, For the edge node, when a task running ends, the task with the earliest request time in the task with the highest priority in the task queue is selected for execution.
4. A hybrid weight task scheduling system for edge-heterogeneous devices, characterized in that, Comprise: The edge node performance detection module is used for testing the performance of each edge node and recording the performance information of the edge node in CPU, MEM and DISK; The task classification module is used for extracting the target resource type affecting the task running by pre-running, so as to divide the task into one of CPU, MEM and DISK; The hybrid weight scheduling module is used for calculating the node resource performance characteristic weight according to the type of the task and the performance information of the edge node, calculating the node queue distribution weight according to the recorded node queue information, and finally determining the target node for executing the task by fusing the two weights; Also used for checking all edge node waiting queues, if there is an idle task queue, using the task queue self-adjusting algorithm to select the appropriate task from the waiting queue of other nodes and migrate to the idle node for execution; The edge node task queue module is used for adding the task to the task queue of the target node according to the priority mechanism of the queue; According to the type of the task and the performance information of the edge node, the node resource performance feature weight F is calculated resource is: ; wherein r is a target resource type, x is a target edge node, n is a total number of edge nodes, N r,x is performance information of a target resource type of a target edge node, N r,node is performance information of a target resource type of the node-th edge node; The node queue distribution weight F is calculated according to the recorded node queue information queueDistribution is: ; wherein, L queue,x(level≤lv) represents the number of tasks in the region of the priority value level not greater than lv in the task queue of the target node, queue,node(level≤lv) represents the number of tasks in the region of the priority value level not greater than lv in the task queue of the node-th edge node; The two weights are fused to obtain: ; wherein .
Citation Information
Patent Citations
Task management method and related device
CN113986511A
Task scheduling method and device
CN114443247A