A DAG real-time task offloading optimization method based on edge computing

By constructing a DAG real-time task flowchart and using integer programming optimization decision-making, the problems of low latency and resource utilization in DAG task unloading in edge computing are solved, achieving high efficiency and real-time performance in task unloading.

CN117938851BActive Publication Date: 2026-05-29CHONGQING UNIV OF POSTS & TELECOMM

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHONGQING UNIV OF POSTS & TELECOMM
Filing Date
2024-01-22
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

In scenarios with multiple heterogeneous edge servers, how can we optimize the real-time task offloading of DAG applications to avoid task waiting and blocking caused by limited resources, improve the utilization of edge computing resources, and meet low latency requirements?

Method used

By constructing a DAG real-time task flowchart, the execution time of tasks on different servers is calculated. Integer programming is used to optimize the unloading decision. The SDN controller periodically obtains server information, selects the optimal server for task unloading, and considers task dependencies and remaining tolerable latency during the unloading process to perform secondary unloading optimization.

Benefits of technology

The data communication latency of DAG tasks was optimized, which improved system utilization, reduced server congestion, met real-time processing requirements, and improved task unloading efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117938851B_ABST
    Figure CN117938851B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of task offloading, and particularly relates to a DAG real-time task offloading optimization method based on edge computing; the method comprises the following steps: an SDN controller receives a user-sent real-time task to be offloaded, and constructs a task earliest completion time model; the execution time of the task on different servers is calculated to obtain a primary task offloading strategy; all tasks are offloaded to a waiting queue in the server according to the primary task offloading strategy, and the real-time tasks with a dependency relationship in the waiting queue are executed; the remaining real-time tasks in the waiting queue in the server are sorted and a secondary offloading task set is constructed according to the remaining tolerance delay; a secondary offloading strategy is obtained according to the remaining tolerance delay of the real-time task, and the secondary offloading of the task is executed according to the secondary offloading strategy; the server executes the real-time tasks in the waiting queue, and completes the offloading and execution of the DAG real-time task; the application improves the system utilization rate and reduces the congestion of the server when a large number of tasks are executed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of task unloading technology, specifically relating to a DAG real-time task unloading optimization method based on edge computing. Background Technology

[0002] With the rapid arrival of the Internet of Things (IoT) era and the widespread adoption of wireless networks, the number of devices at the network edge is also growing rapidly. Edge computing (EC), as an emerging distributed computing architecture, provides services closer to the user, ensuring lower network latency and better meeting the low-latency requirements of IoT applications. However, real-time application processing remains a major challenge in task offloading. The real-time processing needs arising from the massive generation of unstructured and real-time data are urgent problems to be solved. How to achieve real-time offloading in resource-constrained edge environments is the main research objective.

[0003] To fully leverage the advantages of edge computing and further optimize application latency, many studies have proposed new edge computing task models. These models optimize the DAG task model to increase task parallelism and reduce processing latency. Offloading real-time DAG tasks requires considering both the execution latency of multiple tasks on the server and the communication latency incurred by data transmission between servers. Some researchers have proposed new multi-user resource allocation schemes and application-level adjustment decisions to achieve near real-time task processing. However, these schemes still cannot effectively meet the low-latency requirements of real-time task offloading.

[0004] When performing real-time offloading in scenarios with multiple heterogeneous edge servers, how to ensure the optimal minimum completion time for the offloading strategy of dependent DAG application subtasks? How to avoid task waiting and blocking issues caused by limited server resources when a large number of real-time tasks are offloaded to the same server? How to enable collaborative services between servers to improve the utilization of edge computing resources? These are all pressing issues that need to be addressed. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention proposes a DAG real-time task offloading optimization method based on edge computing, which includes:

[0006] S1: The SDN controller receives the real-time tasks to be unloaded sent by the user and constructs a DAG real-time task flowchart. Based on the DAG real-time task flowchart, it constructs the earliest completion time model of the task.

[0007] S2: Calculate the execution time of tasks on different servers to obtain the initial task unloading strategy; unload all tasks into the waiting queue on the server according to the initial task unloading strategy;

[0008] S3: Execute real-time tasks with dependencies in the waiting queue based on the earliest completion time model of the tasks;

[0009] S4: Calculate the remaining tolerance latency of the task and sort the remaining real-time tasks in the waiting queue in the server according to the remaining tolerance latency, and construct a set of tasks to be unloaded a second time.

[0010] S5: Obtain the secondary unloading strategy based on the remaining tolerable latency of real-time tasks in the secondary unloading task set, and execute the secondary unloading of tasks according to the secondary unloading strategy.

[0011] S6: The server executes the real-time tasks in the waiting queue, completing the unloading and execution of the DAG real-time tasks. Preferably, the earliest completion time model of the task is represented as:

[0012] F i =min{F max_i +D i +p i}

[0013] Among them, F i Indicates task R i The earliest completion time, F max_i Task R i Earliest completion time of the largest precursor mission, D i p represents the transmission delay of the task. i This indicates the computation delay of the task.

[0014] Preferably, the process of obtaining the initial task unloading strategy includes:

[0015] The SDN controller periodically obtains the execution rate and the amount of unfinished tasks for each server; based on the data size of the real-time tasks, the server's execution rate, and the amount of unfinished tasks, it calculates the execution time of the real-time tasks on different servers and selects the server with the shortest execution time as the offloading server.

[0016] Furthermore, the formula for calculating the execution time of a task on the server is:

[0017]

[0018] Among them, T i,j Indicates task R i On server ES j Execution time on p i,j Indicates task R i On server ES j The computational latency on W j Indicates server ES j The size of the unfinished task data, q j Indicates server ESj Execution speed.

[0019] Preferably, the process of constructing the set of tasks to be unloaded a second time includes: selecting real-time tasks that cannot be completed within the limited tolerance time from the remaining real-time tasks, sorting the real-time tasks that cannot be completed according to the remaining tolerance time, and obtaining the set of tasks to be unloaded a second time.

[0020] Preferably, the process of obtaining the secondary unloading strategy includes: determining whether each server meets the latency condition based on the remaining tolerable latency of the real-time tasks in the secondary unloading task set; if it does, selecting the server with the smallest sum of transmission latency and computation latency as the unloading server.

[0021] Furthermore, the delay condition is:

[0022]

[0023] Where, p i,k Indicates task R i On server ES k The computational delay on d i Indicates task R i The amount of data to be processed, v j,k Indicates server ES j With server ES k Data transfer rate between W k Indicates server ES k The size of the unfinished task data, q k Indicates server ES k Execution rate; T i ′ represents task R i The remaining tolerance delay.

[0024] The beneficial effects of this invention are as follows:

[0025] (1) This invention optimizes the data communication latency of DAG tasks while satisfying the real-time processing of tasks; it processes the data dependencies between tasks, adopts an integer programming method, takes the real-time requirements as a constraint, minimizes the real-time task completion time, and obtains the optimized unloading decision, effectively mapping the server and DAG real-time tasks.

[0026] (2) In the edge environment facing a large number of real-time tasks, the present invention adopts multi-server collaborative processing, which improves system utilization, reduces server congestion when a large number of tasks are executed, and meets the real-time processing of tasks. Attached Figure Description

[0027] Figure 1 This is an architecture diagram of the DAG real-time task offloading optimization method based on edge computing in this invention. Detailed Implementation

[0028] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0029] This invention proposes a DAG-based optimization method for real-time task offloading using edge computing, such as... Figure 1 As shown, the method includes the following:

[0030] S1: The SDN controller receives the real-time tasks to be unloaded sent by the user and constructs a DAG real-time task flowchart. Based on the DAG real-time task flowchart, it constructs the earliest completion time model of the task.

[0031] The SDN controller periodically obtains initial information about the edge computing server nodes, using a complete graph. This represents the communication relationships between edge servers within an edge computing environment, where the complete graph Gt has vertices ES = {ES1, ..., ES2}. j , ..., ES J} represents edge server computing nodes. Let Gt be the set of edges. element e x,y Indicates connection to ES x ES y An edge between two vertices, where v is the weight of the edge in Gt, i.e., the transmission rate between edge server computing nodes v = {v1, ..., v2}. j , ..., v J}, ES j With ES y The data transfer rate between them is v i,y At the same time, it obtains the waiting queue information of the edge computing server nodes.

[0032] Users send real-time tasks to the SDN controller. The SDN controller receives the real-time tasks to be offloaded from the users and constructs a DAG (Directed Acyclic Graph) real-time task flowchart with I nodes. Specifically: Analyzing the task dependencies involves obtaining the predecessor task and the amount of data that the predecessor task needs to transmit for each task. The dependency matrix is ​​represented by an I x I matrix pro, where pro... i,x =u x Indicates task R i Need to receive from the predecessor mission R x Transmitted data u x When pro i,x =0 indicates Ri No need to receive R x The transmitted data, i.e., R x Not R i The current task can only begin execution after all its predecessor tasks have been completed. A directive graph (DAG) is constructed based on the task dependencies, introducing a virtual start task R0 linked to each actual start task, and a virtual end task R0 that each actual end task needs to point to. I+1 To simulate actual needs; the processing time for virtual start tasks and virtual end tasks is 0, and they are placed on the same server.

[0033] Construct the earliest completion time model for tasks based on the DAG real-time task flowchart, specifically:

[0034] The earliest completion time model for a task is represented as:

[0035] F i =min{F max_i +D i +p i}

[0036] Among them, F i Indicates task R i The earliest completion time, D i p represents the transmission delay of the task. i F represents the computational latency of the task. max_i For task R i Earliest completion time for the largest precursor mission:

[0037] F max_i =max{F x |pro i,x >0}

[0038] Among them, F x Indicates the precursor mission R x Earliest completion time.

[0039] S2: Calculate the execution time of tasks on different servers to obtain the initial task unloading strategy; unload all tasks into the waiting queue on the server according to the initial task unloading strategy.

[0040] The DAG real-time task unloading strategy is X = {X1, ..., X}. i ,...,X n}, where X i ={x1, ..., x j , ..., x m}, x j∈ {0, 1}, where 0 indicates no unloading and 1 indicates unloading. The SDN controller periodically obtains the execution rate and the data size of unfinished tasks for each server, and calculates the execution time of the real-time task on different servers based on the data size of the real-time task, the server's execution rate, and the data size of unfinished tasks; Task R i On server ES j The execution time is:

[0041]

[0042]

[0043] Where, p i,j Indicates task R i The computational latency, W j Indicates server ES j The amount of data in the unfinished task, d i Indicates task R i The size of the data, q j Indicates server ES j Execution speed.

[0044] The server with the shortest execution time is selected as the unloading server, resulting in the initial task unloading strategy. Therefore, in the initial task unloading strategy, the execution time of the task on the unloading server is:

[0045]

[0046] Among them, T i Indicates task R i The execution time, m represents the number of servers, X i,j Indicates task R i Should I uninstall it to the Elasticsearch server? j superior.

[0047] According to the initial task unloading strategy, all tasks are unloaded into the waiting queue in the server. Real-time tasks enter the waiting queue with a leader L in the target edge server compute node to wait for execution. The leader L of the waiting queue is updated to L′+1, where L′ represents the leader before the update.

[0048] S3: Execute real-time tasks with dependencies in the waiting queue based on the earliest completion time model of the tasks.

[0049] Based on the earliest completion time model, the execution order of real-time tasks with dependencies can be determined, and the server executes these real-time tasks with dependencies.

[0050] S4: Calculate the remaining tolerance latency of the task and sort the remaining real-time tasks in the waiting queue in the server according to the remaining tolerance latency, and construct a set of tasks to be unloaded a second time.

[0051] After the initial uninstallation, the waiting queue on the same server may contain tasks from different DAG flowcharts or tasks with no data dependencies. These tasks can be further optimized in terms of execution order during the actual uninstallation process. Specifically:

[0052] The remaining tolerable delay for the computation task:

[0053] T i ′=θ i -D i

[0054] Among them, T i ′ represents task R i The remaining tolerance delay, θ i Indicates task R i The limited tolerance delay, D i Indicates task R i Transmission delay.

[0055] The remaining real-time tasks in the server's waiting queue are sorted according to the remaining tolerance latency, with smaller remaining tolerance latency resulting in higher ranking. Real-time tasks that cannot be completed within the limited tolerance latency are then selected from the remaining real-time tasks and sorted according to their remaining tolerance latency (smaller remaining tolerance latency results in higher ranking), resulting in a set of tasks awaiting secondary unloading.

[0056] S5: Obtain the secondary unloading strategy based on the remaining tolerable latency of real-time tasks in the secondary unloading task set, and execute the secondary unloading of tasks according to the secondary unloading strategy.

[0057] Real-time information from each server is obtained to calculate task computation latency, remaining tolerable latency, and inter-server transmission latency. Servers meeting latency conditions are selected from the real-time tasks in the secondary unloading task set based on their remaining tolerable latency. The server with the smallest sum of transmission latency and computation latency is chosen as the unloading server, thus obtaining the secondary unloading strategy. If no server meets the conditions, the secondary unloading is canceled. Preferably, the latency conditions are:

[0058]

[0059] Among them, p i,k Indicates task R i On server ES k The computational delay on d i Indicates task R i The amount of data to be processed, v j,kIndicates server ES j With server ES k Data transfer rate between W k Indicates server ES k The size of the unfinished task data, q k Indicates server ES k Execution rate; T i ′ represents task R i of.

[0060] The secondary uninstallation of tasks is performed according to the secondary uninstallation strategy, and the real-time tasks in the secondary uninstallation task set are uninstalled to the waiting queue of the corresponding target server in sequence.

[0061] S6: The server executes the real-time tasks in the waiting queue and completes the unloading and execution of the DAG real-time tasks.

[0062] The server executes the real-time tasks in the waiting queue, completes the unloading and execution of the DAG real-time tasks, and obtains the minimum latency after optimization of the DAG real-time tasks. The minimum completion time of the DAG real-time tasks is the completion time of the task in the DAG real-time task flowchart.

[0063] In summary, this invention improves task unloading efficiency in edge computing scenarios involving large-scale DAG real-time task unloading, takes into account the transmission latency of tasks during the unloading process, and coordinates computationally intensive or low-priority tasks with other servers on resource-limited edge servers to avoid congestion and ensure real-time task processing.

[0064] The above-described embodiments further illustrate the purpose, technical solution, and advantages of the present invention. It should be understood that the above-described embodiments are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made to the present invention within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for optimizing the offloading of real-time tasks using a DAG based on edge computing, characterized in that, include: S1: The SDN controller receives the real-time tasks to be unloaded sent by the user and constructs a DAG real-time task flowchart. Based on the DAG real-time task flowchart, it constructs the earliest completion time model of the task. The earliest completion time model for the task is represented as follows: ; in, Indicates task The earliest completion time, Task The earliest completion time of the largest precursor mission. Indicates the transmission latency of the task. Indicates the computation latency of the task; S2: Calculate the execution time of tasks on different servers to obtain the initial task unloading strategy; unload all tasks into the waiting queue on the server according to the initial task unloading strategy; S3: Execute real-time tasks with dependencies in the waiting queue based on the earliest completion time model of the tasks; S4: Calculate the remaining tolerance latency of the task and sort the remaining real-time tasks in the waiting queue in the server according to the remaining tolerance latency, and construct a set of tasks to be unloaded a second time; the process of constructing the set of tasks to be unloaded a second time includes: selecting real-time tasks that cannot be completed within the limited tolerance latency from the remaining real-time tasks, sorting the real-time tasks that cannot be completed according to the remaining tolerance latency, and obtaining the set of tasks to be unloaded a second time. S5: Obtain the secondary offloading strategy based on the remaining tolerable latency of real-time tasks in the secondary offloading task set, and execute the secondary offloading of tasks according to the secondary offloading strategy; the process of obtaining the secondary offloading strategy includes: determining whether each server meets the latency condition based on the remaining tolerable latency of real-time tasks in the secondary offloading task set; if it does, select the server with the smallest sum of transmission latency and calculation latency as the offloading server; the latency condition is: ; in, Indicates task On the server computational latency, Indicates task The amount of data that needs to be processed Indicates server With server Data transfer rate between them Indicates server The size of the unfinished task data. Indicates server Execution speed; Indicates task of Remaining tolerance delay; S6: The server executes the real-time tasks in the waiting queue and completes the unloading and execution of the DAG real-time tasks.

2. The DAG real-time task offloading optimization method based on edge computing according to claim 1, characterized in that, The process of obtaining the initial task unloading strategy includes: The SDN controller periodically obtains the execution rate and the amount of unfinished tasks for each server; based on the data size of the real-time tasks, the server's execution rate, and the amount of unfinished tasks, it calculates the execution time of the real-time tasks on different servers and selects the server with the shortest execution time as the offloading server.

3. The DAG real-time task offloading optimization method based on edge computing according to claim 2, characterized in that, The formula for calculating the execution time of a task on the server is: ; in, Indicates task On the server Execution time on Indicates task On the server computational latency, Indicates server The size of the unfinished task data. Indicates server Execution speed.