A latency-minimizing task scheduling method for heterogeneous edge clusters
By establishing a task time prediction model in heterogeneous UAV clusters and adopting a greedy strategy task allocation method, the problem of low task scheduling efficiency in heterogeneous UAV clusters is solved, and the task delay is minimized and the cluster throughput is improved.
Patent Information
- Application Number
- CN202410489177.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-23
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2044-04-23
AI Technical Summary
In heterogeneous UAV clusters, task scheduling faces the problems of node resource heterogeneity and task demand heterogeneity, which leads to low task execution efficiency and increased task delay.
A time-delay minimization task scheduling method (TPDMS) for heterogeneous edge clusters is proposed. By dividing the task into hard resources and soft resources, a task time prediction model is established to calculate the execution time of tasks on different nodes. A greedy task allocation strategy is adopted to optimize the distribution of tasks among nodes.
It effectively reduces the total execution time of tasks, improves the performance of task execution and cluster throughput, and reduces task latency.
Smart Images

Figure CN118363726B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of edge computing and cluster task scheduling, and specifically provides a heterogeneous edge cluster delay minimization task scheduling method. Background Art
[0002] With the rapid advancement of artificial intelligence, automatic control, and unmanned systems, swarm intelligence has been adopted globally, with applications spanning military, agriculture, logistics, and other fields. Unmanned swarms, leveraging their diverse functionality, high robustness, and large-scale integration, enable collaboration among multiple simple units, demonstrating swarm intelligence. However, research on unmanned swarm technology is still in its early stages, facing numerous challenges. Many challenges remain to be overcome before achieving deeper swarm intelligence. One key issue is task coordination within unmanned swarms: effectively allocating tasks to heterogeneous nodes. Given the significant differences in performance and resources between nodes, task coordination strategies must be optimized to ensure that tasks are completed in the shortest possible time, maximizing the synergistic benefits of the swarm.
[0003] In the edge computing environment of drone clusters, the main challenges facing task scheduling include:
[0004] 1. Node resource heterogeneity. An unmanned aerial vehicle (UAV) cluster is composed of different heterogeneous UAV nodes, and the resources owned by these nodes are heterogeneous.
[0005] 2. Heterogeneous task requirements. The tasks generated within the unmanned cluster are heterogeneous, and different tasks have different resource requirements.
[0006] The key to optimizing task scheduling performance and efficiency lies in selecting the most suitable node for execution based on matching task characteristics with node capabilities. Furthermore, resource contention when tasks run on the same node can also affect execution efficiency, necessitating effective management and allocation of node resources. Therefore, accurately matching tasks with nodes and rationally allocating node resources are crucial for improving operational performance. Summary of the Invention
[0007] In response to the above-mentioned drone cluster task scheduling problem, the present invention proposes a heterogeneous edge cluster delay minimizing task scheduling method (Time-Predictive based Delay Minimizing Scheduling, TPDMS). The method first divides the node resources into hard resources and soft resources according to the different impacts of the tasks, and then establishes a task time prediction model according to the impact of soft resources on the task processing delay. According to the task time prediction model, the estimated execution time of all tasks in the current time period in different nodes is calculated. For all tasks, the node with the lowest execution time is pre-allocated based on the greedy idea. The task of the node with the longest execution time in the cluster is transferred to the queue of the task with the shortest execution time to reduce the total execution time of the cluster as a whole, and the iterative adjustment is continuously made until the total execution time of the cluster is the lowest.
[0008] The specific steps of the present invention are:
[0009] Step 1: Construct an optimization model for the task scheduling problem in heterogeneous drone clusters.
[0010] Step 1.1: In an unmanned cluster, the node set Δ={δ1,δ2,…,δ j ,…,δ n}, the set of tasks generated by the cluster at a certain moment is Τ={τ1,τ2,…,τ i ,…,τ m}, the task types and sizes in the task set can be different, and some tasks are delay-sensitive tasks with a specified completion time limit. j The resource set can be expressed as Π=(ζ1,ζ2,…,ζ u ), if the resource does not have this type, it can be 0, and the node resource set Π can be further divided into Π s and Π h , where π s Represents the soft resource set of the node, Π h Indicates the hard resource collection of the node.
[0011] For the task τ i , define the resource demand of the task as the resource demand vector ρ i =(σ i1 ,σ i2 ,…,σ is ), where σ ij Represents the task τ i For resources j The resource demand matrix Ρ=(ρ1,ρ2,…,ρ n ) represents the resource requirements of the entire task set T.
[0012] Defining the Scheduling Decision Matrix Reasonably allocate the task set T to the unmanned cluster so as to meet the requirements of delay-sensitive tasks and minimize the total delay of cluster tasks, where x ij Can only take the value 0 or 1, χ ij =0 means task τ j Not assigned to node δ i , χ ij =1 means that the task τ is successfully completed. j Assigned to node δ i Each task τ j It means that an independent individual cannot be split and can only be scheduled to run on one node. The complete mathematical definition is shown in formula (1) and formula (2):
[0013]
[0014]
[0015] Task τ j Can it be scheduled to node δ? i , depends on the task τ j Can the hard resource requirements of node δ be met? i Satisfy. Use resource matrix R=(r1,r2,…,r i ,…,r n ) represents the resource situation of heterogeneous unmanned cluster, where r i =(t i1 ,t i2 ,…,t ik ,…,t is ) represents the node δ in the node cluster i The remaining resource vector, t ik Indicates the resources on the node k The remaining cases, task τ j Can be scheduled to node δ i Be fooled and only if node δ i The hard resources can meet the task τ j The hard resource requirements required for the task τ j The hard resource requirements of HC j =(hc j1 ,hc j2 ,…,hc j1 ,…,hc jt ),t=|Π h | to represent, where hc j1 Represents the task τ j Resources q The length of the hardware resource vector is the type of hardware resource Πh The mold length.
[0016] When the scheduling algorithm gives a scheduling decision matrix X, the scheduling decision matrix is feasible if and only if the remaining hard resource vector of the node can meet the hard resource requirements of all tasks. Equations (3) and (4) formally give the relationship between cluster scheduling and resource constraints, where Γ represents the set of resources remaining in the cluster after scheduling by the task scheduling strategy, and γ ij Represents node δ i About Resources j The remaining cases cannot have negative numbers, i.e., γ ij ≥0.
[0017]
[0018]
[0019] The final optimization goal is defined as minimizing the timeout loss of the cluster task. Formula (5) is the task τ j Timeout loss Loss j Specific definition:
[0020] Loss j = max{T j -t j ,0}*κ j (5)
[0021] Where T j Represents the task τ j The actual response time, t j Represents the task τ j The expected response time, κ j Represents the task τ j The timeout loss coefficient of the task τ j type.
[0022] Based on the above constraints and the modeling of the target optimization function: according to the existing resource situation and the resource requirements of the task, all tasks are scheduled to the entire heterogeneous cluster so that all tasks can run, and the timeout loss of the task is minimized, and the execution delay of the cluster task is reduced. The optimization model is shown in (6).
[0023]
[0024] Aiming at the optimization model of task scheduling problem in heterogeneous UAV clusters, the present invention proposes a heterogeneous edge cluster time delay minimization task scheduling method (TPDMS). This method divides the task scheduling strategy into two stages: task deployment expected time calculation stage and iterative tuning stage.
[0025] Step 2: Based on the optimization model proposed in Step 1, in order to make the heterogeneous cluster task scheduling decision more reasonable, a task time prediction model based on resource constraints is constructed to find the bottleneck soft resources that affect task performance and calculate the expected task running time.
[0026] When the task τ j Assigned to node δ i When i The total amount of soft resources is expressed as in Represents node δ i About soft resources k The maximum amount of resources of node δ i The remaining soft resource vector Π capacity , we need to vector Π capacity Each resource is stress tested separately, and other resources are kept idle during the test. k For specific tasks τ j When the node's resource vector is affected by in Indicates that resources are being k Perform stress testing and Obtained about resources k The test results are All soft resource constraints are stress tested using the above method to obtain task τ j For node δ i The stress test results are Actual task τ j At node δ i The task execution time obtained needs to be obtained based on the node's current remaining soft resources. The specific definition is shown in formula (7):
[0027]
[0028] in Represents node δ i Soft resources have been used k The size of the quantity, Then it means node δ i The remaining soft resources k , the vector of all remaining soft resources is defined as Π surplus , the final execution time model predicts the function exectime ij The calculation is shown in formula (8):
[0029]
[0030] The above formula shows that the current node δ i All remaining soft resources for task τ j The task execution time prediction model of the current node is the maximum value of the prediction time obtained by all soft resource prediction models.
[0031] Step 3: Based on the expected running time of the task, in order to achieve the ultimate goal of maximizing the throughput of the edge cluster, TPDMS comprehensively considers the latency urgency of different tasks, performs preliminary deployment and global adjustments of the tasks, and completes task scheduling.
[0032] Step 3.1: Task latency can be categorized into three groups. Three queues are set up based on their priorities. First, all tasks in the task set are placed in their respective priority queues. The queue with the shorter latency requirement is assigned a higher priority. Next, a task time balancing strategy is applied to each queue, from high to low priority, offloading tasks from that queue to the heterogeneous unmanned cluster.
[0033] Step 3.2: The task time balancing strategy first sets up an array for storing tasks for each node. Tasks are allocated in the first round. Due to the differences in performance of different nodes, the first round of allocation behavior assigns each task to the node with the shortest estimated execution time. The estimated time of tasks on different nodes is derived from the task time prediction model.
[0034] Step 3.3: Find the two nodes with the longest and shortest estimated time to execute all pre-assigned tasks, and try to move the tasks of the longest node to the shortest node to reduce the total task execution time.
[0035] When adjusting the task, you can traverse the elements in the array in ascending order according to the degree of delay increase to reduce the number of calculations. It represents the degree of increase in the delay of task τ moving from node i to node j. The calculation formula is shown in (9):
[0036]
[0037] in, represents the estimated runtime of task τ on node k. Task movement requires comparing the estimated total latency of the original longest node with the estimated runtime of the task moved to the shortest node. If the total latency of all tasks decreases after the move, the task movement is feasible. The task is moved from the longest node to the shortest node, and the algorithm continues to adjust the task. If the total latency does not decrease after the move, the task cannot be moved, and other tasks are selected for testing. If all tasks fail, the tasks are considered balanced across nodes, and iteration stops, resulting in the final scheduling decision matrix.
[0038] Beneficial effects of the present invention: In a heterogeneous UAV cluster, due to the significant resource and performance differences between different UAV nodes, making reasonable decisions to schedule tasks to the most suitable node in order to maximize system throughput and minimize task delays presents certain challenges. Compared with existing task scheduling algorithms, the TPDMS algorithm proposed in the present invention pays special attention to the resource and performance heterogeneity between edge nodes. The TPDMS algorithm ensures that tasks with high latency requirements are executed first by partitioning priority queues based on latency, and adopts a greedy strategy to unload tasks in each layer of queues to speed up the output of allocation results and avoid spending too much time on the scheduling algorithm. In addition, the algorithm effectively allocates tasks to the most suitable nodes, and reasonably allocates resources to parallel tasks on the nodes to maximize task execution performance and reduce execution delays. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 Flowchart of the latency-minimizing task scheduling strategy for heterogeneous edge clusters;
[0040] Figure 2 A diagram showing the process of allocating cluster tasks to different nodes;
[0041] Figure 3 This is the simulation architecture diagram;
[0042] Figure 4 This is a comparison chart of task offloading success rate versus request density;
[0043] Figure 5 This is a comparison chart of the average task response time as the request density changes;
[0044] Figure 6 This is a comparison chart of task timeout as a function of request density;
[0045] Figure 7 This is a comparison chart between TPDMS and random scheduling;
[0046] Figure 8 This is a comparison chart between TPDMS and round-robin scheduling;
[0047] Figure 9 This is a comparison chart between TPDMS and weighted round-robin scheduling;
[0048] Figure 10 Comparison chart of maximum throughput and average throughput of different algorithms;
[0049] Figure 11 This is the Node-1-CPU utilization change chart;
[0050] Figure 12 This is the Node-2-CPU utilization change chart;
[0051] Figure 13 This is the Node-3-CPU utilization change chart;
[0052] Figure 14 This is a graph showing the CPU utilization changes of Node-4. DETAILED DESCRIPTION
[0053] The following describes the overall structure and process of the heterogeneous edge cluster delay minimization task scheduling strategy method (TPDMS) proposed by the present invention, the specific implementation of each step, and the experimental results with reference to the accompanying drawings.
[0054] Figure 1 This is a flowchart of the heterogeneous edge cluster latency minimization task scheduling strategy (TPDMS). The method consists of three parts. TPDMS first takes the drone nodes and the tasks to be executed as input and builds a heterogeneous drone cluster task scheduling optimization model. It then constructs a task time prediction model based on resource constraints, identifies the bottleneck soft resources that affect task performance, and calculates the expected task runtime based on the bottleneck resources. Taking into account the urgency of different task delays, tasks are divided into different priorities, and tasks of the same priority are pre-allocated using greedy methods. The task decision matrix is then iteratively tuned until the completion time of all tasks in the system is minimized.
[0055] The following are the specific implementation methods of each step
[0056] Step 1: Construct an optimization model for the task scheduling problem in heterogeneous drone clusters.
[0057] Step 1.1: In an unmanned cluster, the node set Δ={δ1,δ2,…,δ j ,…,δ n}, the set of tasks generated by the cluster at a certain moment is Τ={τ1,τ2,…,τ i ,…,τ m}, the task types and sizes in the task set can be different, and some tasks are delay-sensitive tasks with a specified completion time limit. j The resource set can be expressed as Π=(ζ1,ζ2,…,ζ u ), if the resource does not have this type, it can be 0, and the node resource set Π can be further divided into Π s and Π h , where π s Represents the soft resource set of the node, Π h Indicates the hard resource collection of the node.
[0058] For the task τ i, define the resource demand of the task as the resource demand vector ρ i =(σ i1 ,σ i2 ,…,σ is ), where σ ij Represents the task τ i For resources j The resource demand matrix Ρ=(ρ1,ρ2,…,ρ n ) represents the resource requirements of the entire task set T.
[0059] Defining the Scheduling Decision Matrix Reasonably allocate the task set T to the unmanned cluster so as to meet the requirements of delay-sensitive tasks and minimize the total delay of cluster tasks, where x ij Can only take the value 0 or 1, χ ij =0 means task τ j Not assigned to node δ i , χ ij =1 means that the task τ is successfully completed. j Assigned to node δ i Each task τ j It means that an independent individual cannot be split and can only be scheduled to run on one node. The complete mathematical definition is shown in formula (1) and formula (2):
[0060]
[0061]
[0062] Task τ j Can it be scheduled to node δ? i , depends on the task τ j Can the hard resource requirements of node δ be met? i Satisfy. Use resource matrix R=(r1,r2,…,r i ,…,r n ), represents the resource situation of heterogeneous unmanned cluster, where r i =(t i1 ,t i2 ,…,t ik ,…,t is ), represents the node δ in the node cluster i The remaining resource vector, t ik Indicates the resources on the node k The remaining cases, task τ j Can be scheduled to node δ i Be fooled and only if node δ i The hard resources can meet the task τ j The hard resource requirements required. Task τj The hard resource requirements of HC j =(hc j1 ,hc j2 ,…,hc j1 ,…,hc jt ),t=|Π h | to indicate that hc j1 Represents the task τ j Resources q The length of the hardware resource vector is the type of hardware resource Π h The mold length.
[0063] When the scheduling algorithm gives a scheduling decision matrix X, the decision matrix is feasible if and only if the remaining hard resource vector of the node can meet the hard resource requirements of all tasks. Equations (3) and (4) formally give the relationship between cluster scheduling and resource constraints, where Γ represents the set of resources remaining in the cluster after scheduling by the task scheduling strategy, and γ ij Represents node δ i About Resources j The remaining cases cannot have negative numbers, i.e., γ ij ≥0.
[0064]
[0065]
[0066] The final optimization goal is defined as minimizing the timeout loss of the cluster task. Formula (5) is the task τ j Timeout loss Loss j Specific definition:
[0067] Loss j = max{T j -t j ,0}*κ j (5)
[0068] Where T j Represents the task τ j The actual response time, t j Represents the task τ j The expected response time, κ j Represents the task τ j The timeout loss coefficient of the task τ j type.
[0069] Based on the above constraints and the modeling of the target optimization function: according to the existing resource situation and the resource requirements of the task, all tasks are reasonably scheduled to the entire heterogeneous cluster so that all tasks can run normally, minimize the timeout loss of the task, and reduce the execution delay of the cluster task. The optimization model is shown in (6).
[0070]
[0071] Step 2: Based on the optimization model proposed in Step 1, in order to make the heterogeneous cluster task scheduling decision more reasonable, a task time prediction model based on resource constraints is constructed to find the bottleneck soft resources that affect task performance and calculate the expected task running time.
[0072] During the actual operation process, tasks will be affected by the synergistic influence of multiple soft resource constraints. In order to make the task scheduling decision of heterogeneous clusters more reasonable, a task time prediction model based on resource constraints is proposed. This model can give a reasonable estimate of the task running time based on the existing soft resource margin of the node.
[0073] The performance of a task running on a heterogeneous cluster depends on the number of soft resources the task requires and the remaining soft resources available on the node. Among the many soft resource constraints, a particular soft resource may become a bottleneck that affects the overall performance of the task. By gradually stress testing each soft resource, we can identify the bottleneck affecting task performance.
[0074] When the task τ j Assigned to node δ i When i The total amount of soft resources is expressed as in Represents node δ i About soft resources k The maximum amount of resources of node δ i The remaining soft resource vector Π capacity , we need to vector Π capacity Each resource is stress tested separately, and other resources are kept idle during the test. k For specific tasks τ j When the node's resource vector is affected by in Indicates that resources are being k Perform stress testing and Obtained about resources k The test results are All soft resource constraints are stress tested using the above method to obtain task τj For node δ i The stress test results are Actual task τ j At node δ i The task execution time obtained needs to be obtained based on the node's current remaining soft resources. The specific definition is shown in formula (7):
[0075]
[0076] in Represents node δ i Soft resources have been used k The size of the quantity, Then it means node δ i The remaining soft resources k , the vector of all remaining soft resources is defined as Π surplus , the final task execution time model prediction function exectime ij The calculation is shown in formula (8):
[0077]
[0078] The above formula means first finding the current node δ i All remaining soft resources for task τ j The task execution time prediction of the current node is the maximum value of the prediction time obtained by all soft resource prediction models. That is, the bottleneck soft resource that affects the task performance is first found, and this task execution time is used as the expected task execution time for scheduling the task to this node.
[0079] Step 3: Based on the expected execution time of the task, in order to achieve the ultimate goal of maximizing the throughput of the edge cluster, TPDMS comprehensively considers the latency urgency of different tasks and performs preliminary deployment and global iterative adjustments of the tasks.
[0080] Step 3.1: Task latency can be categorized into three groups. Three queues are set up based on their priorities. First, all tasks in the task set are placed in their respective priority queues. The queue with the shorter latency requirement is assigned a higher priority. Next, a task time balancing strategy is applied to each queue, from high to low priority, offloading tasks from that queue to the heterogeneous unmanned cluster.
[0081] Step 3.2: The task time balancing strategy first sets up an array for storing tasks for each node. Tasks are allocated in the first round. Due to the differences in performance of different nodes, the first round of allocation behavior assigns each task to the node with the shortest estimated execution time. The estimated time of tasks on different nodes is derived from the task time prediction model.
[0082] Step 3.3: After the initial round of allocation, most tasks will be assigned to a small number of nodes. Subsequent adjustments will be made to these nodes based on the estimated task times. The node with the longest estimated task completion time is the key node that affects overall task performance. To reduce the total latency of all tasks, the duration of the node with the longest estimated execution time must be shortened. The algorithm's performance adjustment process begins by selecting the two nodes with the longest and shortest estimated execution times and attempting to move the task from the longest node to the node with the shortest estimated execution time.
[0083] Since each task is executed on the node with the shortest execution time, moving a task will inevitably increase the execution time of the task. In order to reduce the delay caused by moving the task, when selecting tasks, all tasks on the longest node need to be sorted in ascending order according to the degree of delay increase per unit time, and each task is selected in turn for judgment. Available indicators It represents the increase in the unit time delay of task τ moving from node i to node j. The calculation formula is shown in (9):
[0084]
[0085] in, represents the estimated running time of task τ on node k. After the task is moved, the execution time of the original shortest node task will increase. To prevent the overall delay from increasing after the task is moved, it is necessary to compare the estimated total time of the original longest node with the execution time of the task moved to the shortest node. If the total delay of all tasks is reduced after the move, the task move is feasible. The task is moved from the longest node to the shortest node, and the algorithm is continued to adjust. If the total delay does not decrease after the move, the task cannot be moved, and other tasks are selected for testing. If all tasks fail, the tasks are considered balanced across the nodes, and the iteration is stopped to obtain the final scheduling decision matrix.
[0086] Table 1. Running time of different tasks on different nodes
[0087]
[0088] Assume that there are 6 tasks to be offloaded in the priority queue of a certain layer and there are 3 nodes in the cluster. Now the tasks of this layer need to be offloaded to three heterogeneous nodes. Using the time prediction model proposed in step 2, the predicted execution time of each task on each node is calculated as shown in Table 1. Since some nodes do not meet the hard resource constraints of the task, the task cannot be run on this node, and the table does not include the predicted execution time of the task on the node.
[0089] According to the TPDMS scheduling algorithm, tasks will choose the node with the shortest running time when performing the first round of allocation. According to the table above, tasks 1, 2, 3, and 4 are assigned to node A, and tasks 5 and 6 are assigned to node B. Figure 2 As shown in the left picture.
[0090] According to the results of the first round of allocation, the longest running time is expected to be node A, and the shortest is node C. The second round of allocation requires moving the tasks of node A to node C, and increasing the indicator according to the delay of each node. It can be calculated that node 3 is the smallest, and the result is 0.75. Figure 2 As shown in the second figure, the second round of allocation results in Task 3 being moved to Node C. After the allocation, the nodes with the longest and shortest running times are still Node A and Node C. At this time, when calculating Tasks 1, 2, and 4, Indicator, the minimum result of Task 4 is 1.0, and the results of the third round of allocation are as follows Figure 2 As shown in the right figure, Task 4 has been moved to Node C. At this point, the nodes with the longest and shortest running times are A and B. Regardless of whether Task 1 or Task 2 is assigned to Node B, the time it takes to run on Node B after the assignment will be longer than the time it took to run on Node A before the assignment. This invalidates the assignment, and all task assignments for this layer are complete.
[0091] Based on the above, a heterogeneous cluster time-predictive based delay minimizing scheduling algorithm (TPDMS) is proposed.
[0092] Algorithm 1 Heterogeneous Cluster Delay Minimization Scheduling Algorithm
[0093]
[0094]
[0095] Algorithm 1 consists of two parts. Lines 1-5 of the algorithm store tasks into different task priority queues. Lines 6-30 of the algorithm use a greedy multi-node task time balancing method for each priority queue to offload tasks from each queue to the edge heterogeneous cluster.
[0096] Experimental platform: The following is an evaluation of the running effect of the heterogeneous cluster delay minimization scheduling algorithm (TPDMS) in the simulation environment. The simulation architecture diagram is shown in Figure 3 .
[0097] The unmanned cluster scheduling system consists of two main components: a central scheduling node and other nodes in the unmanned cluster. The unmanned cluster first selects a node as the central scheduling node. Other nodes in the cluster that need to handle heavy tasks send task requests to the scheduling node. The central scheduling node then centrally processes and schedules the task requests received during this period.
[0098] In this system, the resource monitoring module monitors its own resources, including both hard and soft resources, in real time. It then continuously sends heartbeat messages to other nodes in the unmanned cluster, indicating its survival and its available resources. During scheduling intervals, the scheduling decision module analyzes the available resources in the cluster and selects a scheduling algorithm to offload incoming task requests to the unmanned cluster. Each task is redirected to the scheduled node. Upon receiving an assigned task, the task processing module sends it to the task processing module, which allocates resources for it. After the task completes, the results are processed and returned by the data persistence module, which persists the results in the database.
[0099] The operating environment of this embodiment is a small unmanned edge cluster that is actually built. All nodes are interconnected under the same network. The hardware configuration information of all nodes is shown in Table 2.
[0100] Table 2 Cluster node hardware and software parameters
[0101]
[0102]
[0103] The four nodes in the experiment are all heterogeneous nodes with different performance configurations. Node-1 is a virtual machine opened on a PC with 4 cores and 4GB of memory allocated to it. Node-2 is a Cambrian node, Node-3 is a Raspberry Pi 4b, and Node-4 is a Raspberry Pi 3b with the weakest performance and the least memory. These four nodes are used to simulate a small heterogeneous cluster.
[0104] The task load in the experiment selected three tasks of unmanned swarm search operations for simulation, namely radar obstacle avoidance, path planning, and target recognition. Radar obstacle avoidance is to process the radar data generated by the scheduling node simulation to determine whether there are obstacles around. Path planning is to calculate the optimal path from the source to the destination given a map data. Target recognition is to use Yolo5 to process the image generated by the video stream and analyze the target in the image. The system randomly generates different types of tasks, and the number of tasks generated follows a Poisson distribution with parameter λ, denoted as τ. interval ~P(λ). These three tasks have different sensitivities to delay. Radar obstacle avoidance has the most urgent delay requirement, followed by path planning, and target recognition has no delay requirement. Table 3 shows the delay requirements of the three tasks and the timeout loss coefficients when the task response time exceeds the delay requirement.
[0105] Table 3 Experimental parameters for different tasks
[0106]
[0107] The control algorithms used in this experiment are Random Scheduling (RANDOM), Round-Robin Scheduling (RR), and Weighted Round-Robin Scheduling (WRR). When scheduling tasks, weighted round-robin scheduling must first assign a weight to each node. The size of the weight is usually determined by the node's processing performance. This article performs full-load stress tests on four nodes for three tasks, and uses the test results to comprehensively derive a weight ratio. The approximate weight ratio of the four nodes Node-1, Node-2, Node-3, and Node-4 is 6:5:3:2.
[0108] Analysis of simulation results: The following analysis is conducted from three perspectives: the impact of different task densities on performance indicators, the impact of different scheduling algorithms on system throughput, and the CPU utilization of different algorithms on different nodes.
[0109] 1. Impact of different task densities on performance indicators:
[0110] The experiment first analyzed various performance indicators of different scheduling algorithms under varying task request densities, observing how the algorithm's performance changes under varying load conditions. Task request density is controlled by the Poisson distribution parameter λ. A larger λ indicates a greater number of unit request tasks within the unmanned cluster and a greater cluster load. The range of λ in this experiment was controlled within [5, 23]. The scheduling node dispatches tasks to different nodes for processing based on the different scheduling algorithms.
[0111] Figure 4 The following graph shows the offloading success rates of four scheduling algorithms in a cluster under different task request densities. As can be seen from the graph, all four scheduling algorithms show a downward trend as the task request density increases. When the task request density is low (λ <= 10), all four scheduling algorithms maintain a high offloading success rate. However, as the task request density continues to increase, the offloading success rates of the random and round-robin scheduling algorithms decrease rapidly, indicating that some tasks cannot be processed promptly. Because random and round-robin scheduling do not consider the weights of different scheduling nodes, tasks are not assigned to better nodes. The offloading success rates of the weighted round-robin scheduling algorithm and TPDMS also show a significant downward trend when (λ >= 12), but the downward trend is slower than that of random and round-robin scheduling. The TPDMS scheduling algorithm considers both the weights between nodes and the remaining resources of nodes, maintaining a good offloading success rate even when the task request density is high.
[0112] Figure 5 This is a trend chart of the average task response time of the four scheduling algorithms as the task request density changes. From the figure, it can be seen that when the request density is small (λ<=10), the average task response delay of the four scheduling algorithms is small. Then, as the task request density increases, the average task response time increases rapidly. The average task response time of the weighted round-robin scheduling and TPDMS algorithms only increases significantly when (λ>=14), and then the average response time of the four algorithms becomes significantly different. The reason why the task response time increases so quickly with the task request density in the later period is that the system has reached the bottleneck of processing tasks. The previous tasks have not been processed, and new tasks need to wait before they arrive. The average task response time is largely determined by the waiting time of the tasks. As the task request density increases, it can be seen that the TPDMS algorithm has obvious advantages over other algorithms.
[0113] Figure 6 This is a graph showing the changing trend of task timeout losses for the four scheduling algorithms as the task request density changes during the experiment. The experiment set up three types of tasks, two of which were delay-sensitive tasks, each with its own timeout loss coefficient. Timeout losses were calculated for tasks that exceeded the specified completion time. At the end of the experiment, the timeout losses of all tasks were summed to obtain the system task loss. As can be seen from the figure, when the task request density is low (λ <= 10), all four scheduling algorithms have relatively small timeout losses. As the task request density continues to increase, the system reaches a bottleneck in task processing and cannot process newly arrived tasks on time, causing task timeout losses to increase rapidly. The TPDMS algorithm, because it can reasonably allocate real-time tasks to the cluster based on the remaining node resources, only shows a significant increase when the node request density (λ >= 13), resulting in lower timeout losses than the other three scheduling algorithms.
[0114] 2. System operation throughput analysis:
[0115] The main purpose of this study is to compare the system throughput of different scheduling algorithms during system operation. System throughput refers to the rate at which a system can process tasks. A higher throughput indicates a higher ability of the system to handle cluster task requests. In this experiment, the task request density was fixed at (λ>=20), the system run time was 30 seconds, and the number of tasks processed per second was recorded as the system throughput (Request Per Second, req / s). Because the task request density in this experiment was higher than the cluster's processing capacity, the cluster did not stop running immediately after task allocation was completed. It had to wait for each node in the cluster to complete processing its assigned tasks.
[0116] Figure 7 、 Figure 8 、 Figure 9 The system throughput comparisons of the TPDMS algorithm with random scheduling, round-robin scheduling, and weighted round-robin scheduling during operation are shown. The TPDMS algorithm shows significant advantages over random scheduling and round-robin scheduling in the early stages. TPDMS maintains high throughput until around 38 seconds, when throughput begins to decline. However, both random scheduling and round-robin scheduling experience a significant drop in throughput around 33 seconds.
[0117] Figure 7 、 Figure 8 、 Figure 9 The throughput recorded in the figure is the overall cluster throughput, which is the sum of the throughputs of all working nodes in the cluster. The apparent decrease in throughput for the scheduling algorithm in the figure is due to some nodes having already completed their assigned tasks and having no further tasks to process. This significantly reduces the system throughput. Random and round-robin scheduling distribute tasks more evenly, allowing higher-performing nodes to complete their assigned tasks early, leaving a large number of tasks on weaker nodes. This explains the rapid performance degradation in the early stages of the random and round-robin scheduling algorithms, and the subsequent longer processing times. The TPDMS and weighted round-robin scheduling algorithms also have certain advantages. Initially, the average throughput of the TPDMS algorithm is higher than that of the weighted round-robin algorithm. This is because the TPDMS algorithm considers not only the operational weight of each node but also its remaining resources, enabling more efficient resource utilization. Weighted round-robin scheduling only considers the static performance of each node. During actual operation, the remaining performance of a node is not equivalent to its static performance, so it fails to fully utilize the system's processing power in the early stages.
[0118] Figure 10The maximum and average system throughputs of the four scheduling algorithms were demonstrated. The average system throughput of the TPDMS algorithm was 11.31 (req / s), the average system throughput of the random scheduling algorithm was 6.28 (req / s), the average system throughput of the round-robin scheduling algorithm was 6.69 (req / s), and the average system throughput of the weighted round-robin scheduling algorithm was 9.1 (req / s). Compared with the other three scheduling algorithms, the average system throughput of the TPDMS algorithm increased by 80.09%, 69.05%, and 24.29%, respectively. During system operation, the maximum system throughput increased by 18.75%, 26.67%, and 11.76%, respectively. This demonstrates that the TPDMS algorithm fully considers the resource headroom in the cluster, schedules tasks to appropriate nodes, and achieves high task processing performance.
[0119] 3.CPU consumption and utilization analysis:
[0120] This study mainly explores the changes in cluster node resource utilization during system operation under different scheduling algorithms. The performance of the system is often closely related to its resource utilization. The more fully the system resources are utilized, the better the external performance is. Since the tasks taken in this experiment are all CPU-consuming tasks, it is only necessary to observe the CPU resource usage of all nodes.
[0121] Figure 11 、 Figure 12 、 Figure 13 、 Figure 14Figure 3 shows the changes in CPU utilization for the four scheduling algorithms on Node-1, Node-2, Node-3, and Node-4. On Node-1 and Node-2, the CPU utilization of the four scheduling algorithms differed significantly. The TPDMS algorithm achieved the highest resource utilization, followed by the weighted argument scheduling algorithm. The random and round-robin scheduling algorithms failed to fully utilize resources and terminated early. This is because these two nodes were the higher-performing of the four nodes, and the random and round-robin scheduling algorithms assigned fewer tasks to them, resulting in underutilized resources and early completion. The TPDMS algorithm, taking into account node weights and remaining resource information, assigned more tasks to nodes with better performance, fully utilizing their resources. On Node-3 and Node-4, the four scheduling algorithms all had high utilization of CPU resources in the early stage. Then the utilization of TPDMS dropped sharply, followed by the weighted argument scheduling algorithm, then the round-robin scheduling algorithm, and finally the random scheduling. The low CPU utilization indicates that the node task has been completed. Since TPDMS can make full use of the remaining resources to achieve load balancing of tasks, the two nodes can end the operation at a faster speed under this algorithm. Due to the different performance of the four nodes, the CPU utilization of each node cannot directly reflect the CPU utilization of the system. In order to further measure the utilization of system resources by different algorithms, the system CPU resource utilization is introduced. cpu The concept is defined as shown in formula (20):
[0122]
[0123] Where N represents all nodes in the cluster, r i represents the CPU utilization of node i in cluster N, w i represents the weight of node i in cluster N. Node weights reflect the strength of the computing performance between nodes. The weight relationship of the four nodes in the experiment was determined by performing full-load stress tests on different nodes, ultimately resulting in a weight relationship of 6:5:3:2. Calculations show that the average system CPU utilization for the TPDMS algorithm is 96.4%, the average system CPU utilization for random scheduling is 79.5%, the average system CPU utilization for round-robin scheduling is 81.1%, and the average system CPU utilization for weighted round-robin scheduling is 90.2%. The TPDMS algorithm improves average cluster resource utilization by 21.26%, 18.87%, and 6.87%, respectively, compared to the other three algorithms.
[0124] To sum up, the TPDMS algorithm can make more effective use of cluster resources and can reasonably allocate tasks to other nodes based on the existing resources of the cluster to improve system performance.
[0125] The above is a preferred implementation process of the present invention. Any changes made according to the technology of the present invention, as long as the resulting functions do not exceed the scope of the technical solution of the present invention, shall fall within the scope of protection of the present invention.
Claims
1. A method for scheduling tasks with minimal latency in heterogeneous edge clusters, characterized in that: The following steps are involved: Step 1: Build an optimization model for the task scheduling problem in heterogeneous UAV clusters; Step 2: Based on the optimization model, a task time prediction model based on resource constraints is constructed to identify bottleneck soft resources that affect task performance and calculate the expected task runtime. The task time prediction model is as follows: When the task τ j Assigned to node δ i When node δ i The total amount of soft resources is expressed as in Represents node δ i About soft resources k The maximum amount of resources of node δ i The remaining soft resource vector Π capacity , for the vector Π capacity Each resource is stress tested separately, and other resources are kept idle during the test. k For specific tasks τ j When the node's resource vector is affected by in Indicates that resources are being k Perform stress testing and Obtained about resources k The test results are All soft resource constraints are stress tested using the above method to obtain task τ j For node δ i The stress test results are Actual task τ j At node δ i The task execution time is obtained based on the remaining soft resources of the node. It is defined as shown in formula (7): in Represents node δ i Soft resources have been used k The size of the quantity, Then it means node δ i The remaining soft resources k , the vector of all remaining soft resources is defined as Π surplus , time model prediction function exectime ij The calculation is shown in formula (8): The above formula shows that the current node δ i All remaining soft resources for task τ j The task execution time prediction model of the current node is the maximum value of the prediction time obtained by all soft resource prediction models; Step 3: Perform preliminary deployment and global adjustments to complete task scheduling based on the expected task run time. The specific process is as follows: Step 3.1: Classify task latencies into three categories and set up three queues based on their priorities. First, place all tasks in the task set into their respective priority queues. The queue with the shorter latency requirement has a higher priority. Second, apply a task time balancing strategy to each queue from high to low priority, offloading the tasks in that queue to the heterogeneous unmanned cluster. Step 3.2: The task time balancing strategy first sets up an array for storing tasks for each node. The tasks are allocated in the first round. The first round of allocation assigns each task to the node with the shortest estimated execution time. The estimated time of tasks on different nodes is obtained by the task time prediction model. Step 3.3: Find the two nodes with the longest and shortest estimated time to execute all pre-assigned tasks, and move the tasks of the longest node to the shortest node to reduce the total task execution time.
2. The method for scheduling tasks to minimize latency in heterogeneous edge clusters according to claim 1, wherein: The step 1 also includes: In an unmanned cluster, the node set Δ={δ1,δ2,…,δ j ,…,δ n }, the set of tasks generated by the cluster at a certain moment is Τ={τ1,τ2,…,τ i ,…,τ m }, the task set includes delay-sensitive tasks with specified completion time constraints; the node δ in the unmanned cluster j The resource set is expressed as Π=(ζ1,ζ2,…,ζ u ), if it does not have this type of resource, it is 0, and the node resource set Π is divided into Π s and Π h , where π s Represents the soft resource set of the node, Π h Indicates the hard resource collection of the node.
3. The method for scheduling tasks to minimize latency in heterogeneous edge clusters according to claim 2, wherein: The step 1 is specifically implemented as follows: Step 1.1: For task τ i , define the resource demand of the task as the resource demand vector ρ i =(σ i1 ,σ i2 ,…,σ ij …,σ is ), σ ij Represents the task τ i For resources j Demand situation; using resource demand matrix Ρ=(ρ1,ρ2,…,ρ n ) represents the resource requirements of the entire task set T; Defining the Scheduling Decision Matrix Assign the task set T to the unmanned cluster so as to meet the requirements of delay-sensitive tasks and minimize the total delay of cluster tasks, where x ij The value is 0 or 1, χ ij =0 means task τ j Not assigned to node δ i , χ ij =1 means that the task τ is successfully completed. j Assigned to node δ i ; Each task τ j It means that an independent individual cannot be split and can only be scheduled to run on one node. The mathematical definition is shown in formula (1) and formula (2): Step 1.2: Use the resource matrix R = (r1, r2, ..., r i ,…,r n ) represents the resource situation of heterogeneous unmanned cluster, where r i =(t i1 ,t i2 ,…,t ik ,…,t is ) represents the node δ in the node cluster i The remaining resource vector, t ik Indicates the resources on the node k The remaining cases, task τ j Can be scheduled to node δ i Be fooled and only if node δ i The hard resources can meet the task τ j Required hard resource requirements; task τ j The hard resource requirements of HC j =(hc j1 ,hc j2 ,…,hc j1 ,…,hc jt ),t=|Π h | indicates that hc j1 Represents the task τ j Resources q The length of the hardware resource vector is the type of hardware resource Π h Length of the module; When the scheduling algorithm gives a scheduling decision matrix X, the scheduling decision matrix is feasible if and only if the remaining hard resource vector of the node can meet the hard resource requirements of all tasks; Equations (3) and (4) give the relationship between cluster scheduling and resource constraints, where Γ represents the set of resources remaining in the cluster after scheduling by the task scheduling strategy, and γ ij Represents node δ i About Resources j The remaining cases, and γ ij ≥0; The optimization objective is defined as minimizing the timeout loss of cluster tasks. Formula (5) is the task τ j Timeout loss Loss j Definition: Loss j = max{T j -t j ,0}*κ j (5) Where T j Represents the task τ j The actual response time, t j Represents the task τ j The expected response time, κ j Represents the task τ j The overtime loss coefficient; Step 1.3: Based on the existing resource situation and the resource requirements of the tasks, all tasks are scheduled to the entire heterogeneous cluster so that all tasks can run, and the timeout loss of tasks is minimized, and the execution delay of cluster tasks is reduced. The optimization model is shown in (6):
4. The method for scheduling tasks to minimize latency in heterogeneous edge clusters according to claim 3, wherein: Step 3.3 is specifically implemented as follows: when adjusting the task, traverse the elements in the array in ascending order according to the degree of delay increase to reduce the number of calculations; use the indicator It represents the degree of increase in the delay of task τ moving from node i to node j. The calculation formula is shown in (9): in, represents the estimated running time of task τ on node k; task movement requires judging the estimated total time of the original longest node and the execution time of moving to the shortest node. If the total delay of all tasks is reduced after the move, the task is moved from the longest node to the shortest node and continues to be adjusted; if the total delay does not decrease after the move, the task cannot be moved, and other tasks are selected for testing. If all tasks fail, it is considered that the tasks have been balanced among the nodes, and the iteration is stopped to obtain the final scheduling decision matrix.
Citation Information
Patent Citations
Hierarchical edge computing unloading method based on priority
CN111954236A
Multi-heterogeneous resource load balancing method based on cooperative game theory
CN117395252A