[go: up one dir, main page]

CN117632298B - Task unloading and resource allocation method based on priority list indexing mechanism - Google Patents

Task unloading and resource allocation method based on priority list indexing mechanism Download PDF

Info

Publication number
CN117632298B
CN117632298B CN202311663171.8A CN202311663171A CN117632298B CN 117632298 B CN117632298 B CN 117632298B CN 202311663171 A CN202311663171 A CN 202311663171A CN 117632298 B CN117632298 B CN 117632298B
Authority
CN
China
Prior art keywords
dag
priority
task
subtask
resource allocation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311663171.8A
Other languages
Chinese (zh)
Other versions
CN117632298A (en
Inventor
陈益杉
罗显淞
王碧
李伟
徐中辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jiangxi University of Science and Technology
Original Assignee
Jiangxi University of Science and Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jiangxi University of Science and Technology filed Critical Jiangxi University of Science and Technology
Priority to CN202311663171.8A priority Critical patent/CN117632298B/en
Publication of CN117632298A publication Critical patent/CN117632298A/en
Application granted granted Critical
Publication of CN117632298B publication Critical patent/CN117632298B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44594Unloading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明公开了一种基于优先级列表索引机制的任务卸载及资源分配方法,包括:通过监测器收集指定区域内边缘服务器的资源信息,根据本地设备的任务请求构建DAG模型,生成优先级索引列表;基于所述优先级索引列表,采用基于优先级的贪婪算法和资源分配算法进行目标优化,获得关联型任务卸载策略及资源分配方法;根据所述关联型任务卸载策略及资源分配方法执行用户任务卸载操作。本发明通过对任务卸载和资源分配进行预测和优化,有效地降低了总体延迟,提高了资源利用率,实现了对关联型任务的高效执行和资源的合理分配。

The present invention discloses a method for task unloading and resource allocation based on a priority list index mechanism, including: collecting resource information of edge servers in a specified area through a monitor, building a DAG model according to task requests of local devices, and generating a priority index list; based on the priority index list, using a priority-based greedy algorithm and a resource allocation algorithm to perform target optimization, and obtaining an associated task unloading strategy and a resource allocation method; performing a user task unloading operation according to the associated task unloading strategy and resource allocation method. The present invention effectively reduces overall delay, improves resource utilization, and realizes efficient execution of associated tasks and reasonable allocation of resources by predicting and optimizing task unloading and resource allocation.

Description

一种基于优先级列表索引机制的任务卸载及资源分配方法A task offloading and resource allocation method based on priority list indexing mechanism

技术领域Technical Field

本发明涉及边缘计算环境下DAG任务的卸载及资源分配技术领域,尤其涉及一种基于优先级列表索引机制的任务卸载及资源分配方法。The present invention relates to the technical field of DAG task offloading and resource allocation in an edge computing environment, and in particular to a task offloading and resource allocation method based on a priority list index mechanism.

背景技术Background technique

边缘计算将计算和数据处理分散到多个边缘服务器上,实现更加高效和快速的数据处理和分发,减少了对云计算中心的依赖,降低了数据传输的延迟和带宽消耗。在这种环境下,任务需要被卸载到多个边缘服务器上进行处理,以减少延迟和带宽消耗,提高服务质量。Edge computing distributes computing and data processing to multiple edge servers, achieving more efficient and faster data processing and distribution, reducing dependence on cloud computing centers, and reducing data transmission delays and bandwidth consumption. In this environment, tasks need to be offloaded to multiple edge servers for processing to reduce delays and bandwidth consumption and improve service quality.

然而,在多用户多边缘服务器环境下,如何对关联型任务进行合理的卸载和资源分配仍然是一个具有挑战性的问题。本地设备产生的关联型任务通常被建模为DAG任务,一个DAG任务可能由多个子任务组成,这些子任务之间存在先后顺序和依赖关系,因此需要一个能够合理分配资源和协调任务之间执行顺序的策略。同时,由于边缘服务器之间的性能和资源利用率存在差异,因此需要一个能够动态调整资源分配和任务卸载的方案。However, in a multi-user and multi-edge server environment, how to reasonably offload and allocate resources for related tasks remains a challenging problem. The related tasks generated by local devices are usually modeled as DAG tasks. A DAG task may consist of multiple subtasks, which have a sequence and dependency relationship between them. Therefore, a strategy that can reasonably allocate resources and coordinate the execution order between tasks is needed. At the same time, due to the differences in performance and resource utilization between edge servers, a solution that can dynamically adjust resource allocation and task offloading is needed.

在实际应用中,资源受限是一个重要的问题。由于边缘服务器的计算能力有限,因此需要一个能够优化资源利用率和任务执行效率的方案。一方面,需要尽可能地利用边缘服务器的计算资源,以提高整个系统的处理能力和效率。另一方面,需要避免资源浪费和任务阻塞等问题,以保证系统的稳定性和可靠性。In practical applications, resource limitation is an important issue. Since the computing power of edge servers is limited, a solution that can optimize resource utilization and task execution efficiency is needed. On the one hand, it is necessary to make full use of the computing resources of edge servers to improve the processing power and efficiency of the entire system. On the other hand, it is necessary to avoid problems such as resource waste and task blocking to ensure the stability and reliability of the system.

为了解决这些问题,可以考虑引入优先级机制来合理的制定任务卸载方案和资源分配方案。In order to solve these problems, we can consider introducing a priority mechanism to reasonably formulate task offloading plans and resource allocation plans.

任务卸载中的优先级机制主要通过为不同的任务划分不同的优先级,优先级机制可以在保证任务顺序和执行效率的前提下,合理的使级别优先的任务能够优先抢占更好的卸载位置,从而提高系统的整体性能。同时,为了更加准确地进行资源分配,还需要设计一种有效的资源分配方法。这种资源分配方法需要能够考虑到DAG任务整体的计算量、各设备的计算资源情况、边缘服务器的资源利用率、任务之间的依赖关系等多个因素,从而在任务卸载和资源分配方面做出更加合理的决策,是一项实际且具有挑战性的工作。The priority mechanism in task offloading mainly assigns different priorities to different tasks. The priority mechanism can reasonably enable tasks with higher priority to take priority in better offloading positions while ensuring the order and execution efficiency of tasks, thereby improving the overall performance of the system. At the same time, in order to allocate resources more accurately, an effective resource allocation method needs to be designed. This resource allocation method needs to be able to take into account multiple factors such as the overall computing amount of DAG tasks, the computing resources of each device, the resource utilization of edge servers, the dependencies between tasks, etc., so as to make more reasonable decisions in task offloading and resource allocation. This is a practical and challenging task.

发明内容Summary of the invention

本发明针对边缘计算环境下DAG任务的卸载及资源分配问题,提供了一种基于优先级列表索引机制的任务卸载及资源分配方法。The present invention aims at the problem of unloading DAG tasks and resource allocation in an edge computing environment, and provides a task unloading and resource allocation method based on a priority list index mechanism.

一方面,为实现上述目的,本发明提供了一种基于优先级列表索引机制的任务卸载及资源分配方法,包括:On the one hand, to achieve the above-mentioned purpose, the present invention provides a task offloading and resource allocation method based on a priority list index mechanism, comprising:

收集指定区域内边缘服务器的资源信息,根据本地设备的任务请求构建DAG模型,生成优先级索引列表;Collect resource information of edge servers in the specified area, build a DAG model based on the task requests of local devices, and generate a priority index list;

基于所述优先级索引列表,采用基于优先级的贪婪算法和资源分配算法进行目标优化,获得关联型任务卸载策略及资源分配方法;Based on the priority index list, a priority-based greedy algorithm and a resource allocation algorithm are used to perform target optimization to obtain an associated task offloading strategy and a resource allocation method;

根据所述关联型任务卸载策略及资源分配方法执行用户任务卸载操作。The user task offloading operation is performed according to the associated task offloading strategy and resource allocation method.

优选地,根据所述本地设备的任务请求构建DAG模型,生成优先级索引列表,包括:Preferably, a DAG model is constructed according to the task request of the local device to generate a priority index list, including:

分别设置DAG中每个子任务的优先级以及每个DAG的优先级,将DAG中每个子任务进行排序,获得所述DAG的子任务优先级列表,再将各DAG的所述子任务优先级列表进行排序,得到DAG优先级列表,即所述优先级索引列表。The priority of each subtask in the DAG and the priority of each DAG are set respectively, each subtask in the DAG is sorted to obtain a subtask priority list of the DAG, and then the subtask priority list of each DAG is sorted to obtain a DAG priority list, that is, the priority index list.

优选地,定义所述DAG中每个子任务的优先级的方法为:Preferably, the method for defining the priority of each subtask in the DAG is:

式中,为本地设备Ix产生的子任务,i为子任务的序号,x为本地设备的序号,表示/>的优先级,/>表示/>的计算量大小,/>为本地设备Ix与系统中边缘服务器的综合计算能力,/>表示需要/>发送依赖数据的子任务的集合,/>为/>中的一个子任务,/>表示/>向/>发送的依赖数据,/>为/>的数据量大小,/>为依赖数据在系统中的平均传输速率。In the formula, is the subtask generated by the local device I x , i is the subtask number, x is the local device number, Indicates/> The priority of Indicates/> The amount of calculation, /> is the combined computing power of the local device I x and the edge server in the system,/> Indicates the need/> Send a collection of subtasks that depend on data, /> For/> A subtask in /> Indicates/> To/> Dependency data sent, /> For/> The amount of data, /> is the average transmission rate of dependent data in the system.

优选地,定义每个DAG的优先级的方法为:Preferably, the method for defining the priority of each DAG is:

式中,Gx为本地设备Ix产生的DAG任务,为Gx的开始子任务,cost(Gx)为Gx的系统代价,ψ(x)为Gx的优先级。Where Gx is the DAG task generated by the local device Ix . is the starting subtask of G x , cost(G x ) is the system cost of G x , and ψ(x) is the priority of G x .

优选地,获得所述关联型任务卸载策略及资源分配方法,包括:Preferably, obtaining the associated task offloading strategy and resource allocation method includes:

根据所述优先级索引列表,通过贪婪算法寻找使每个所述子任务具有最小的最早完成时间的卸载决策,获得每个边缘服务器的DAG卸载记录;According to the priority index list, a greedy algorithm is used to find an offloading decision that enables each of the subtasks to have the smallest earliest completion time, and a DAG offloading record of each edge server is obtained;

按所述优先级索引列表索引取出每个子任务,选择使得该子任务有最早完成时间的设备进行卸载,更新子任务卸载策略和边缘服务器的DAG卸载记录,按照所述边缘服务器的DAG卸载记录计算DAG在边缘服务器的计算资源占比,获得所述关联型任务卸载策略及资源分配方法。Each subtask is retrieved according to the priority index list index, and the device that makes the subtask have the earliest completion time is selected for unloading, the subtask unloading strategy and the DAG unloading record of the edge server are updated, and the computing resource proportion of the DAG on the edge server is calculated according to the DAG unloading record of the edge server to obtain the associated task unloading strategy and resource allocation method.

优选地,按照所述边缘服务器的DAG卸载记录计算DAG在边缘服务器的计算资源占比的方法为:Preferably, the method for calculating the computing resource proportion of DAG in the edge server according to the DAG offloading record of the edge server is:

式中,为资源分配比例,/>为记录本地设备产生的DAG任务是否卸载子任务到边缘服务器的二进制变量,ψ(n)为DAG的优先级,N为DAG任务的总数。In the formula, is the resource allocation ratio, /> It is a binary variable that records whether the DAG task generated by the local device offloads subtasks to the edge server. ψ(n) is the priority of the DAG, and N is the total number of DAG tasks.

优选地,所述关联型任务卸载策略及资源分配方法的目标函数为系统完成所有DAG任务的平均响应时间:Preferably, the objective function of the associated task offloading strategy and resource allocation method is the average response time of the system to complete all DAG tasks:

式中,ft为子任务的完成时间,为Gx的结束任务,Gx为本地设备Ix产生的DAG任务,N为DAG任务的总数。Where ft is the completion time of the subtask, is the end task of G x , G x is the DAG task generated by the local device I x , and N is the total number of DAG tasks.

另一方面,为了实现上述目的,本发明还提供了基于优先级列表索引机制的任务卸载及资源分配系统,包括:On the other hand, in order to achieve the above-mentioned purpose, the present invention also provides a task offloading and resource allocation system based on a priority list index mechanism, comprising:

系统监控单元:用于监测来自设备的任务信息和系统的资源信息;System monitoring unit: used to monitor task information from devices and system resource information;

卸载规划单元:根据所述任务信息和所述资源信息,通过DAG优先级列表索引机制规划任务卸载策略及资源分配方法;An offloading planning unit: plans a task offloading strategy and a resource allocation method through a DAG priority list indexing mechanism according to the task information and the resource information;

策略实施单元:根据已拟定的所述任务卸载策略及资源分配方法执行用户任务卸载操作。Strategy implementation unit: performs user task offloading operation according to the formulated task offloading strategy and resource allocation method.

与现有技术相比,本发明具有如下优点和技术效果:Compared with the prior art, the present invention has the following advantages and technical effects:

本发明通过任务优先级和用户优先级的综合考虑,能够更好地解决分布式计算环境下DAG任务的卸载问题,让每个子任务都能获得当前资源情况下最早的结束时间,最大化利用分布式计算环境的计算资源,从而提高DAG任务的执行效率和性能;通过对任务卸载和资源分配进行预测和优化,有效地降低了总体延迟,提高了资源利用率,实现了对关联型任务的高效执行和资源的合理分配。By comprehensively considering task priority and user priority, the present invention can better solve the problem of offloading DAG tasks in a distributed computing environment, so that each subtask can obtain the earliest end time under the current resource conditions, maximize the use of computing resources in the distributed computing environment, and thus improve the execution efficiency and performance of DAG tasks; by predicting and optimizing task offloading and resource allocation, the overall delay is effectively reduced, resource utilization is improved, and efficient execution of associated tasks and reasonable allocation of resources are achieved.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

构成本申请的一部分的附图用来提供对本申请的进一步理解,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

图1为本发明实施例的基于优先级列表索引机制的任务卸载及资源分配系统架构示意图;FIG1 is a schematic diagram of a task offloading and resource allocation system architecture based on a priority list indexing mechanism according to an embodiment of the present invention;

图2为本发明实施例的面向资源分配的DAG任务的卸载方法的流程示意图;FIG2 is a schematic flow chart of a method for offloading a DAG task oriented to resource allocation according to an embodiment of the present invention;

图3为本发明实施例的任务响应时间与参数α的关系示意图;FIG3 is a schematic diagram showing the relationship between the task response time and the parameter α according to an embodiment of the present invention;

图4为本发明实施例的任务响应时间与算法的关系示意图;FIG4 is a schematic diagram showing the relationship between task response time and algorithm according to an embodiment of the present invention;

图5为本发明实施例的任务响应时间与边缘服务器个数的关系示意图;5 is a schematic diagram of the relationship between task response time and the number of edge servers according to an embodiment of the present invention;

图6为本发明实施例的任务响应时间与本地设备个数的关系示意图;6 is a schematic diagram showing the relationship between task response time and the number of local devices according to an embodiment of the present invention;

图7为本发明实施例的任务响应时间与最大逻辑核心数的关系示意图。FIG. 7 is a schematic diagram showing the relationship between task response time and the maximum number of logical cores according to an embodiment of the present invention.

具体实施方式Detailed ways

需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本申请。It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

需要说明的是,在附图的流程图示出的步骤可以在诸如一组计算机可执行指令的计算机系统中执行,并且,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

本发明提出了一种基于优先级列表索引机制的任务卸载及资源分配方法,如图1,具体包括:The present invention proposes a task offloading and resource allocation method based on a priority list index mechanism, as shown in FIG1 , which specifically includes:

通常,任务卸载都会把更小的卸载时延作为优化目标,而环境中的计算资源是有限的,会出现一些重要的或计算量大的任务分配不到更多计算资源的情况,这对关联型任务尤为致命,一个任务的时延变长,往往会直接影响或间接影响后置任务的进行,这将提高系统整体时延。为了让计算量较大的任务或者位置特殊的任务享受到更优质的计算资源,它应该对更好的卸载位置进行优先抢占,为此,提出一种针对用户的基于优先级列表索引机制的任务卸载及资源分配方法。Usually, task offloading takes smaller offloading latency as the optimization goal, but the computing resources in the environment are limited. Some important or computationally intensive tasks may not be allocated more computing resources, which is particularly fatal for related tasks. The longer latency of a task often directly or indirectly affects the progress of subsequent tasks, which will increase the overall latency of the system. In order to allow tasks with large computational load or special locations to enjoy better computing resources, they should give priority to preempting better offloading locations. To this end, a task offloading and resource allocation method based on a priority list index mechanism for users is proposed.

通过监测器收集指定区域内边缘服务器的资源信息,根据本地设备的任务请求构建DAG模型,生成优先级索引列表;The monitor collects resource information of edge servers in the specified area, builds a DAG model based on the task requests of local devices, and generates a priority index list;

分别定义DAG中每个子任务的优先级以及每个DAG的优先级,将DAG中每个子任务进行排序,获得所述DAG的子任务优先级列表,再将各DAG的所述子任务优先级列表进行排序,得到DAG优先级列表,即所述优先级索引列表。The priority of each subtask in the DAG and the priority of each DAG are defined respectively, each subtask in the DAG is sorted to obtain a subtask priority list of the DAG, and then the subtask priority list of each DAG is sorted to obtain a DAG priority list, that is, the priority index list.

DAG中每个子任务的优先级被定义为:The priority of each subtask in the DAG is defined as:

每个DAG的优先级被定义为:The priority of each DAG is defined as:

其中:in:

1)Gx表示本地设备Ix产生的DAG任务,为Gx中序号为i的子任务,/>为Gx的开始子任务,/>表示需要/>发送依赖数据的子任务的集合。1) G x represents the DAG task generated by the local device I x , is the subtask with sequence number i in G x ,/> is the starting subtask of G x , /> Indicates the need/> Sends a collection of subtasks that depend on data.

2)为/>的计算量大小,/>为Ix与系统中边缘服务器的综合计算能力,表示如下:2) For/> The amount of calculation, /> is the comprehensive computing capacity of I x and the edge servers in the system, expressed as follows:

其中,α表示权重参数,fx为Ix的计算能力,Fk为边缘服务器Pk的计算能力,M为边缘服务器总数。Among them, α represents the weight parameter, fx is the computing power of Ix , Fk is the computing power of edge server Pk , and M is the total number of edge servers.

3)表示/>向/>传输的依赖数据,/>为依赖数据的大小,/>为依赖数据在系统中的平均传输速率。3) Indicates/> To/> Transmitted dependent data, /> is the size of the dependent data, /> is the average transmission rate of dependent data in the system.

4)cost(Gx)为Gx的系统代价,表示如下:4) cost(G x ) is the system cost of G x , expressed as follows:

其中,Ix为Gx中子任务的集合,Ex为Gx中依赖数据的集合。Among them, Ix is the set of subtasks in Gx , and Ex is the set of dependent data in Gx .

5)将DAG中每个子任务按rank从大到小顺序排序,得到该DAG的子任务优先级列表Q;再将各DAG的Q按照ψ从大到小的顺序排序,得到DAG优先级列表PL。5) Sort each subtask in the DAG by rank from large to small to obtain the subtask priority list Q of the DAG; then sort the Q of each DAG by ψ from large to small to obtain the DAG priority list PL.

基于优先级索引列表,采用基于优先级的贪婪算法和资源分配算法进行目标优化,获得关联型任务卸载策略及资源分配方法;Based on the priority index list, the priority-based greedy algorithm and resource allocation algorithm are used to optimize the target, and the associated task offloading strategy and resource allocation method are obtained;

图2给出了面向资源分配的DAG任务的卸载方法的流程示意图,在分布式计算环境中,监测器首先收集区域内边缘服务器的资源信息,根据本地设备的任务请求建立DAG模型,为这些DAG生成优先级索引列表。根据列表顺序,结合不同设备的计算资源以及DAG优先级为每个子任务选择最佳的卸载位置并分配合适的计算资源。Figure 2 shows a flow chart of the offloading method for DAG tasks oriented to resource allocation. In a distributed computing environment, the monitor first collects resource information of edge servers in the region, establishes a DAG model based on the task request of the local device, and generates a priority index list for these DAGs. According to the list order, combined with the computing resources of different devices and the DAG priority, the best offloading location is selected for each subtask and appropriate computing resources are allocated.

在得到卸载决策的过程中,进一步构建的优化目标为系统完成所有DAG任务的平均响应时间:In the process of obtaining the offloading decision, the optimization goal further constructed is the average response time of the system to complete all DAG tasks:

其中,in,

1)ft表示子任务的完成时间,为Gx的结束任务,故/>也表示Gx的响应时间,ft的计算公式如下:1) ft represents the completion time of the subtask, is the end task of G x , so/> It also represents the response time of G x . The calculation formula of ft is as follows:

fx为本地设备Ix的计算能力,Fk为边缘服务器Pk的计算能力,为Gx在边缘服务器Pk上的计算资源占比。 fx is the computing power of the local device Ix , Fk is the computing power of the edge server Pk , is the computing resource ratio of G x on edge server P k .

2)在Pk接收到执行所需的依赖数据并且Pk可用之前,不能开始执行/>因此,/>的开始时间表示如下:2) After P k receives the execution Execution cannot begin until the required dependency data and P k are available/> Therefore,/> The start time is expressed as follows:

其中,表示向/>发送依赖数据的子任务集合,ava(Gx,Pk)表示Pk对Gx的子任务的开始可用时间,它与Pk处理的上一个Gx的子任务有关,且ava(Gx,P0)表示本地设备Ix的开始可用时间,/>为依赖数据的传输时间。in, Indicates to/> Send a set of subtasks that depend on data, ava(G x , P k ) represents the start availability time of P k for the subtask of G x , which is related to the last subtask of G x processed by P k , and ava(G x , P 0 ) represents the start availability time of the local device I x ,/> Depends on the data transfer time.

3)Gx在边缘服务器Pk上的计算资源分配比例与DAG优先级有关,表示为:3) Computing resource allocation ratio of Gx on edge server Pk Related to DAG priority, expressed as:

其中,为记录Gn是否卸载子任务到Pk的二进制变量,N为DAG任务的总数。in, is a binary variable that records whether Gn offloads subtasks to Pk , and N is the total number of DAG tasks.

本发明针对多用户DAG任务的卸载问题,采用基于优先级的贪婪算法和资源分配算法和进行目标优化。将关联型任务卸载问题映射到DAG任务模型中,DAG任务产生之后,通过计算子任务优先级和DAG优先级得到一个DAG之间有序,每个子任务之间有序的优先级索引列表。按列表索引顺序,通过贪心算法得到每个子任务的卸载决策。最后,通过卸载决策得到边缘服务器的DAG卸载记录,分配每个子任务的计算资源占比。整个优先级列表索引机制过程如下:The present invention aims at the problem of offloading multi-user DAG tasks, and adopts a priority-based greedy algorithm and a resource allocation algorithm to perform target optimization. The associative task offloading problem is mapped to the DAG task model. After the DAG task is generated, a priority index list with an order between DAGs and an order between each subtask is obtained by calculating the subtask priority and the DAG priority. According to the list index order, the offloading decision of each subtask is obtained by the greedy algorithm. Finally, the DAG offloading record of the edge server is obtained through the offloading decision, and the computing resource proportion of each subtask is allocated. The entire priority list indexing mechanism process is as follows:

1)初始化1) Initialization

对所有关联型任务的数据元素进行收集和处理,建模其所对应的DAG任务图,收集当前情况下边缘服务器资源信息。Collect and process the data elements of all related tasks, model the corresponding DAG task graph, and collect the edge server resource information under the current situation.

2)索引操作2) Index operation

计算每个DAG及其子任务的优先级,构建优先级列表PL。Calculate the priority of each DAG and its subtasks and build a priority list PL.

3)贪婪选择3) Greedy selection

按PL索引取出每个子任务,选择使得该子任务有最早完成时间的设备进行卸载,更新子任务卸载策略和边缘服务器DAG卸载记录。Take out each subtask according to the PL index, select the device that makes the subtask have the earliest completion time for unloading, and update the subtask unloading strategy and edge server DAG unloading record.

4)资源分配4) Resource Allocation

按照边缘服务器DAG卸载记录计算DAG在边缘服务器的计算资源占比:Calculate the computing resource ratio of DAG on the edge server based on the DAG offloading record of the edge server:

通过上述贪婪算法和资源分配,本发明能够高效地解决多用户DAG任务的卸载问题,并实现了资源的优化利用,从而提高了边缘计算环境下的任务执行效率。Through the above-mentioned greedy algorithm and resource allocation, the present invention can efficiently solve the problem of offloading multi-user DAG tasks and realize the optimal utilization of resources, thereby improving the task execution efficiency in the edge computing environment.

卸载操作Uninstall Operation

根据已拟定的卸载策略和资源分配方法执行用户任务卸载操作。Perform user task offloading operations according to the proposed offloading strategy and resource allocation method.

采用本发明进行任务卸载和资源分配的过程如下:The process of task offloading and resource allocation using the present invention is as follows:

1)初始化阶段:处理器接收来自各设备的任务处理请求;1) Initialization phase: The processor receives task processing requests from various devices;

2)任务卸载决策制定阶段:根据DAG优先级和子任务优先级构造DAG优先级列表,通过贪婪算法寻找使每个子任务具有最小的最早完成时间的卸载决策,得到每个边缘服务器的DAG卸载记录。2) Task offloading decision-making stage: Construct a DAG priority list based on the DAG priority and subtask priority, and use a greedy algorithm to find the offloading decision that makes each subtask have the smallest earliest completion time, and obtain the DAG offloading record of each edge server.

3)计算资源分配阶段:根据得到的DAG卸载记录进行边缘服务器计算资源分配。3) Computing resource allocation stage: edge server computing resources are allocated according to the obtained DAG offloading records.

4)执行阶段:根据任务卸载决策以及计算资源分配策略,进行所有DAG任务的卸载。4) Execution phase: All DAG tasks are offloaded according to the task offloading decision and computing resource allocation strategy.

本实施例还提供了一种基于优先级列表索引机制的任务卸载及资源分配系统,用于实施基于优先级列表索引机制的任务卸载及资源分配方法,包括:This embodiment also provides a task offloading and resource allocation system based on a priority list index mechanism, which is used to implement a task offloading and resource allocation method based on a priority list index mechanism, including:

系统监控单元:用于监测来自设备的任务信息和系统的资源信息;System monitoring unit: used to monitor task information from devices and system resource information;

卸载规划单元:根据所述任务信息和所述资源信息,通过DAG优先级列表索引机制规划任务卸载策略及资源分配方法;An offloading planning unit: plans a task offloading strategy and a resource allocation method through a DAG priority list indexing mechanism according to the task information and the resource information;

策略实施单元:根据已拟定的所述任务卸载策略及资源分配方法执行用户任务卸载操作。Strategy implementation unit: performs user task offloading operation according to the formulated task offloading strategy and resource allocation method.

仿真模拟Simulation

对比本发明方法(PBGTS)与差分进化算法(MDE)、异构最早完成时间算法(MHEFT)、多应用多任务调度算法(MAMTS)、粒子群算法(PSO)和遗传算法(GA)的数据结果。由图3中的对比可知,α对系统平均响应时间的影响控制在2s以内,经过对比分析,将轻量级(Lw)DAG的α设置为0.9,计算密集型(Cpi)DAG的α设置为0.875,通信密集型(Cmi)DAG的α设置为0.7。由图4中的对比可知,本发明的单个DAG的响应时间和系统平均响应时间要优于其他算法。由图5和图6中的对比可知,本发明的优势在计算环境发生变化时并不受影响,无论是改变边缘服务器的数量还是改变本地设备的数量,本发明都能得到一个较好的结果。由图7可知,最大逻辑核心的数量影响了本发明和其他算法的效果,经过对比分析,本发明将处理轻量级DAG、计算密集型DAG、通信密集型DAG的最大逻辑核心数分别设置为10、7、6能得到最好的效果。Compare the data results of the method of the present invention (PBGTS) with the differential evolution algorithm (MDE), the heterogeneous earliest completion time algorithm (MHEFT), the multi-application multi-task scheduling algorithm (MAMTS), the particle swarm algorithm (PSO) and the genetic algorithm (GA). As can be seen from the comparison in Figure 3, the influence of α on the average response time of the system is controlled within 2s. After comparative analysis, the α of the lightweight (Lw) DAG is set to 0.9, the α of the computationally intensive (Cpi) DAG is set to 0.875, and the α of the communication intensive (Cmi) DAG is set to 0.7. As can be seen from the comparison in Figure 4, the response time of a single DAG of the present invention and the average response time of the system are better than other algorithms. As can be seen from the comparison in Figures 5 and 6, the advantages of the present invention are not affected when the computing environment changes. Whether it is changing the number of edge servers or the number of local devices, the present invention can obtain a better result. As shown in FIG7 , the maximum number of logical cores affects the effects of the present invention and other algorithms. After comparative analysis, the present invention sets the maximum number of logical cores for processing lightweight DAG, computationally intensive DAG, and communication-intensive DAG to 10, 7, and 6, respectively, to achieve the best effect.

本发明主要面向边缘计算环境下的DAG任务的卸载决策及资源分配问题,设计了一种基于优先级的任务卸载决策系统,在降低总体延迟进行任务卸载的前提下,以每个子任务都能获得当前情况下最早开始时间为目标,在计算资源受限的分布式计算环境中找到了满意的任务卸载方案和资源分配方案,提出基于优先级列表索引机制的任务卸载及资源分配方法。The present invention mainly focuses on the offloading decision and resource allocation problems of DAG tasks in edge computing environments. A priority-based task offloading decision system is designed. Under the premise of reducing the overall delay for task offloading, the goal is for each subtask to obtain the earliest start time under the current circumstances. A satisfactory task offloading scheme and resource allocation scheme are found in a distributed computing environment with limited computing resources, and a task offloading and resource allocation method based on the priority list indexing mechanism is proposed.

本发明通过任务优先级和用户优先级的综合考虑,能够更好地解决分布式计算环境下DAG任务的卸载问题,让每个子任务都能获得当前资源情况下最早的结束时间,最大化利用分布式计算环境的计算资源,从而提高DAG任务的执行效率和性能;通过对任务卸载和资源分配进行预测和优化,有效地降低了总体延迟,提高了资源利用率,实现了对关联型任务的高效执行和资源的合理分配。By comprehensively considering task priority and user priority, the present invention can better solve the problem of offloading DAG tasks in a distributed computing environment, so that each subtask can obtain the earliest end time under the current resource conditions, maximize the use of computing resources in the distributed computing environment, and thus improve the execution efficiency and performance of DAG tasks; by predicting and optimizing task offloading and resource allocation, the overall delay is effectively reduced, resource utilization is improved, and efficient execution of associated tasks and reasonable allocation of resources are achieved.

以上,仅为本申请较佳的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应该以权利要求的保护范围为准。The above are only preferred specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims (5)

1. The task unloading and resource allocation method based on the priority list indexing mechanism is characterized by comprising the following steps:
collecting resource information of an edge server in a designated area, constructing a DAG model according to a task request of local equipment, and generating a priority index list;
Constructing a DAG model according to the task request of the local equipment, and generating a priority index list, wherein the method comprises the following steps:
The method comprises the steps of respectively setting the priority of each subtask in a DAG and the priority of each DAG, sequencing each subtask in the DAG to obtain a subtask priority list of the DAG, and sequencing the subtask priority lists of all DAGs to obtain a DAG priority list, namely the priority index list;
the method for defining the priority of each subtask in the DAG comprises the following steps:
In the method, in the process of the invention, Subtasks generated for local device I x, I is the serial number of the subtask, x is the serial number of the local device,/>Representation/>Priority of/>Representation/>Calculated amount size of,/>For the integrated computing power of the local device I x and the edge servers in the system,/>Representing the need/>Sending a set of dependent data subtasks,/>For/>Is one of the sub-tasks,/>Representation/>Direction/>Transmitted dependent data,/>For/>Data size of,/>To rely on the average transmission rate of data in the system;
the method of defining the priority of each DAG is:
Where G x is the DAG task generated by local device I x, For the start subtask of G x, cost (G x) is the system cost of G x, ψ (x) is the priority of G x;
based on the priority index list, performing target optimization by adopting a greedy algorithm and a resource allocation algorithm based on priority to obtain an associated task unloading strategy and a resource allocation method;
And executing user task unloading operation according to the associated task unloading strategy and the resource allocation method.
2. The method for task offloading and resource allocation of claim 1, wherein obtaining the associated task offloading policy and resource allocation method comprises:
Searching an unloading decision which enables each subtask to have the minimum earliest completion time through a greedy algorithm according to the priority index list, and obtaining DAG unloading records of each edge server;
And taking out each subtask according to the index of the priority index list, selecting equipment with earliest completion time for the subtask to unload, updating a subtask unloading strategy and a DAG unloading record of an edge server, and calculating the computing resource duty ratio of the DAG in the edge server according to the DAG unloading record of the edge server to obtain the associated task unloading strategy and the resource allocation method.
3. The task offloading and resource allocation method of claim 2, wherein the method for calculating a computing resource duty ratio of the DAG at the edge server according to the DAG offloading record of the edge server is:
In the method, in the process of the invention, For resource allocation proportion,/>To record whether the local device-generated DAG tasks offload subtasks to the binary variables of the edge server, ψ (N) is the priority of the DAG and N is the total number of DAG tasks.
4. The method for task offloading and resource allocation of claim 1, wherein the objective function of the associated task offloading policy and resource allocation method is an average response time for the system to complete all DAG tasks:
Where ft is the completion time of the subtask, For the ending task of G x, G x is the DAG task generated by local device I x, and N is the total number of DAG tasks.
5. A priority list indexing mechanism based task offloading and resource allocation system, comprising:
and a system monitoring unit: for monitoring task information from the device and resource information of the system;
and (3) unloading the planning unit: planning a task unloading strategy and a resource allocation method through a DAG priority list indexing mechanism according to the task information and the resource information,
The method specifically comprises the following steps:
The method comprises the steps of respectively setting the priority of each subtask in a DAG and the priority of each DAG, sequencing each subtask in the DAG to obtain a subtask priority list of the DAG, and sequencing the subtask priority lists of all DAGs to obtain a DAG priority list, namely a priority index list;
the method for defining the priority of each subtask in the DAG comprises the following steps:
In the method, in the process of the invention, Subtasks generated for local device I x, I is the serial number of the subtask, x is the serial number of the local device,/>Representation/>Priority of/>Representation/>Calculated amount size of,/>For the integrated computing power of the local device I x and the edge servers in the system,/>Representing the need/>Sending a set of dependent data subtasks,/>For/>Is one of the sub-tasks,/>Representation/>Direction/>Transmitted dependent data,/>For/>Data size of,/>To rely on the average transmission rate of data in the system;
the method of defining the priority of each DAG is:
Where G x is the DAG task generated by local device I x, For the start subtask of G x, cost (G x) is the system cost of G x, ψ (x) is the priority of G x;
Policy enforcement unit: and executing user task unloading operation according to the formulated task unloading strategy and the resource allocation method.
CN202311663171.8A 2023-12-06 2023-12-06 Task unloading and resource allocation method based on priority list indexing mechanism Active CN117632298B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311663171.8A CN117632298B (en) 2023-12-06 2023-12-06 Task unloading and resource allocation method based on priority list indexing mechanism

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311663171.8A CN117632298B (en) 2023-12-06 2023-12-06 Task unloading and resource allocation method based on priority list indexing mechanism

Publications (2)

Publication Number Publication Date
CN117632298A CN117632298A (en) 2024-03-01
CN117632298B true CN117632298B (en) 2024-05-31

Family

ID=90028618

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311663171.8A Active CN117632298B (en) 2023-12-06 2023-12-06 Task unloading and resource allocation method based on priority list indexing mechanism

Country Status (1)

Country Link
CN (1) CN117632298B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114661466A (en) * 2022-03-21 2022-06-24 东南大学 A task offloading method for intelligent workflow applications in edge computing environment
CN116450241A (en) * 2023-04-20 2023-07-18 北京工业大学 Multi-user time sequence dependent service calculation unloading method based on graph neural network
CN116755882A (en) * 2023-06-16 2023-09-15 山东省计算中心(国家超级计算济南中心) Computing unloading method and system with dependency tasks in edge computing
CN116886703A (en) * 2023-03-24 2023-10-13 华南理工大学 A cloud-edge collaborative computing offloading method based on priority and reinforcement learning

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10552161B2 (en) * 2017-06-21 2020-02-04 International Business Machines Corporation Cluster graphical processing unit (GPU) resource sharing efficiency by directed acyclic graph (DAG) generation
US10956211B2 (en) * 2019-02-25 2021-03-23 GM Global Technology Operations LLC Method and apparatus of allocating automotive computing tasks to networked devices with heterogeneous capabilities
US11334382B2 (en) * 2019-04-30 2022-05-17 Intel Corporation Technologies for batching requests in an edge infrastructure
CN113220356B (en) * 2021-03-24 2023-06-30 南京邮电大学 User computing task unloading method in mobile edge computing

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114661466A (en) * 2022-03-21 2022-06-24 东南大学 A task offloading method for intelligent workflow applications in edge computing environment
CN116886703A (en) * 2023-03-24 2023-10-13 华南理工大学 A cloud-edge collaborative computing offloading method based on priority and reinforcement learning
CN116450241A (en) * 2023-04-20 2023-07-18 北京工业大学 Multi-user time sequence dependent service calculation unloading method based on graph neural network
CN116755882A (en) * 2023-06-16 2023-09-15 山东省计算中心(国家超级计算济南中心) Computing unloading method and system with dependency tasks in edge computing

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
边缘计算中基于综合信任评价的任务卸载策略;熊小峰 等;电子学报;20220930;第50卷(第09期);第2134-2145页 *

Also Published As

Publication number Publication date
CN117632298A (en) 2024-03-01

Similar Documents

Publication Publication Date Title
Shi et al. MDP and machine learning-based cost-optimization of dynamic resource allocation for network function virtualization
CN107911478B (en) Multi-user calculation unloading method and device based on chemical reaction optimization algorithm
CN111813506B (en) Resource perception calculation migration method, device and medium based on particle swarm optimization
Yakubu et al. An efficient meta-heuristic resource allocation with load balancing in IoT-Fog-cloud computing environment
Mattess et al. Scaling mapreduce applications across hybrid clouds to meet soft deadlines
Agarwal et al. Load balancing in cloud computing using mutation based particle swarm optimization
Tang et al. Dependent task offloading for multiple jobs in edge computing
Gabi et al. Systematic review on existing load balancing techniques in cloud computing
Barlaskar et al. Enhanced cuckoo search algorithm for virtual machine placement in cloud data centres
Mostafa Cooperative fog communications using a multi-level load balancing
CN109710372A (en) A computationally intensive cloud workflow scheduling method based on owl search algorithm
Chhabra et al. QoS-aware energy-efficient task scheduling on HPC cloud infrastructures using swarm-intelligence meta-heuristics
Naik A processing delay tolerant workflow management in cloud-fog computing environment (DTWM_CfS)
Mansouri Network and data location aware approach for simultaneous job scheduling and data replication in large-scale data grid environments
CN117632298B (en) Task unloading and resource allocation method based on priority list indexing mechanism
Rahul et al. Optimization of Resource Scheduling and Allocation Algorithms
Mo et al. Computation offloading and resource management for energy and cost trade-offs with deep reinforcement learning in mobile edge computing
Naidu et al. Secure workflow scheduling in cloud environment using modified particle swarm optimization with scout adaptation
Swagatika et al. SLA-aware task allocation with resource optimisation on cloud environment
Dominic et al. The comparative study of algorithms in building the green mobile cloud computing environment
Gupta et al. An Enhanced MIN-MIN algorithm for workflow scheduling in Cloud Computing
Prasadhu et al. An efficient hybrid load balancing algorithm for heterogeneous data centers in cloud computing
Alshammari et al. Delay and total network usage optimisation using GGCN in fog computing
Sing et al. A load balancing algorithm for cloud-fog-based iot networks using bald eagle search optimization
Li et al. Effective algorithms for scheduling workflow tasks on mobile clouds

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant