技术领域Technical Field
本发明涉及边端协作场景中资源调度技术领域,尤其涉及一种边端协作场景中适应动态环境的算力资源调度方法。The present invention relates to the technical field of resource scheduling in edge-end collaboration scenarios, and in particular to a computing resource scheduling method that adapts to dynamic environments in edge-end collaboration scenarios.
背景技术Background Art
随着智能设备和物联网的发展,越来越多的应用飞速产生,比如虚拟现实/增强现实技术、人脸识别、智能驾驶等。这些应用对于计算能力的需求较高。在传统云计算中,大量的应用和数据被传输到云数据中心进行处理,云数据中心有强大的计算能力和存储能力,可以满足这些应用的需求。但同时,终端设备与云中心往往距离较远,可能产生较长的传输时延。对于一些时延敏感型业务,云计算难以满足其低时延的要求。With the development of smart devices and the Internet of Things, more and more applications are emerging rapidly, such as virtual reality/augmented reality technology, face recognition, and smart driving. These applications have high requirements for computing power. In traditional cloud computing, a large number of applications and data are transmitted to cloud data centers for processing. Cloud data centers have strong computing and storage capabilities to meet the needs of these applications. However, at the same time, the terminal devices are often far away from the cloud center, which may cause long transmission delays. For some delay-sensitive businesses, cloud computing is difficult to meet their low latency requirements.
边缘计算在近年来得到了突飞猛进的发展和广泛的应用。与传统云计算不同,边缘计算在用户附近部署高性能服务器,将计算能力下沉到网络边缘,增强网络边缘的计算能力,可以将计算密集型、时延敏感型业务部署到边缘服务器上进行处理。Edge computing has developed rapidly and been widely used in recent years. Unlike traditional cloud computing, edge computing deploys high-performance servers near users, sinks computing power to the edge of the network, enhances computing power at the edge of the network, and can deploy computing-intensive and delay-sensitive services to edge servers for processing.
边缘智能(EI)是移动边缘计算(MEC)和人工智能技术的集成,最近已成为支持网络边缘计算密集型人工智能应用的一种有前景的范例。在上述虚拟现实/增强现实技术、人脸识别、智能驾驶等应用中,广泛应用了人工智能算法,例如人脸识别技术需要用到CNN等算法为其提供服务。在边缘智能技术中,可以将人工智能算法部署到边缘服务器上,在边缘服务器上完成训练和推理过程,为人脸识别等业务提供更高效的服务。相比于传统的云中心,边缘服务器与用户距离较近,传输时延较短,但是边缘服务器的资源有限。Edge intelligence (EI) is the integration of mobile edge computing (MEC) and artificial intelligence technologies. It has recently become a promising paradigm for supporting computing-intensive artificial intelligence applications at the edge of the network. Artificial intelligence algorithms are widely used in the above-mentioned applications such as virtual reality/augmented reality technology, face recognition, and intelligent driving. For example, face recognition technology requires algorithms such as CNN to provide services for it. In edge intelligence technology, artificial intelligence algorithms can be deployed on edge servers, where training and inference processes are completed to provide more efficient services for services such as face recognition. Compared with traditional cloud centers, edge servers are closer to users and have shorter transmission delays, but edge servers have limited resources.
为了合理利用资源,现有的调度方法中,CN114490018A(现有技术1)提出一种基于资源特征匹配的服务调度算法,将资源特征匹配的机制引入服务调度算法中来解决在服务调度场景下面临的不能满足用户MQoS需求和不能充分利用资源的问题。通过引入资源特征匹配的概念,提高了执行效率,降低了能耗,并且支持动态调整优化方向。In order to reasonably utilize resources, among the existing scheduling methods, CN114490018A (prior art 1) proposes a service scheduling algorithm based on resource feature matching, which introduces the resource feature matching mechanism into the service scheduling algorithm to solve the problems of not being able to meet user MQoS requirements and not being able to fully utilize resources in the service scheduling scenario. By introducing the concept of resource feature matching, the execution efficiency is improved, the energy consumption is reduced, and the dynamic adjustment of the optimization direction is supported.
CN113821317A(现有技术2)提出一种边云协同的微服务调度方法、装置及设备,通过将一个应用服务程序解耦成多个微服务,并基于改进的粒子群优化算法,以服务完成时间和边缘服务器的资源利用率为优化目标,通过不断迭代最终得到实现多目标优化的微服务调度策略;一方面,服务调度使得服务执行尽可能地靠近数据源,满足了用户低时延的需求,另一方面,将部分非时延敏感型应用的微服务调度到云服务器上,很好地缓解了边缘服务器的计算压力,避免出现边缘服务器过载的问题,影响服务质量。CN113821317A (prior art 2) proposes an edge-cloud collaborative microservice scheduling method, device and equipment, which decouples an application service program into multiple microservices, and based on an improved particle swarm optimization algorithm, takes the service completion time and the resource utilization of the edge server as the optimization goals, and finally obtains a microservice scheduling strategy that achieves multi-objective optimization through continuous iteration; on the one hand, service scheduling makes the service execution as close to the data source as possible to meet the user's low latency requirements, and on the other hand, scheduling some microservices of non-delay-sensitive applications to cloud servers, which greatly alleviates the computing pressure of the edge server and avoids the problem of edge server overload, affecting the service quality.
CN113391647A(现有技术3)提出一种多无人机边缘计算服务部署及调度方法和系统,涉及无人机通信及服务部署技术领域。所述方法包括如下步骤:服务依赖和拓扑感知的微服务部署;贪心微服务调度;负载感知的微服务重部署和失效触发的服务重部署。所述方法服务响应速度快:能够根据微服务的流行情况、微服务间的依赖关系和网络拓扑,初始化微服务部署,并贪心地进行微服务调度,有效降低应用响应时延;环境适应性好:能够感知边缘计算节点上微服务运行的排队长度和空闲状态,从而在服务拥塞或资源空闲时动态调整服务功能部署,更好地适应变化的执行环境;失效调整灵活:当无人机边缘节点发生失效时,可以及时进行服务重部署,保证服务的连续性。CN113391647A (prior art 3) proposes a multi-UAV edge computing service deployment and scheduling method and system, which relates to the field of UAV communication and service deployment technology. The method comprises the following steps: service dependency and topology-aware microservice deployment; greedy microservice scheduling; load-aware microservice redeployment and failure-triggered service redeployment. The method has a fast service response speed: it can initialize microservice deployment and greedily schedule microservices according to the popularity of microservices, the dependencies between microservices and the network topology, effectively reducing the application response delay; good environmental adaptability: it can perceive the queue length and idle state of microservices running on edge computing nodes, so as to dynamically adjust the service function deployment when the service is congested or resources are idle, so as to better adapt to the changing execution environment; flexible failure adjustment: when the UAV edge node fails, the service can be redeployed in time to ensure the continuity of the service.
在现有的调度方法中,技术方案1将资源特征匹配的机制引入服务调度算法中,但是其考虑的资源特征不够全面,可能会出现其他资源不匹配或者未得到合理利用的情况。技术方案2和技术方案3在进行服务调度时考虑的优化目标为时延、资源利用率等,在边端协作场景中的复杂环境下,其优化目标不够全面。技术方案2采用了粒子群优化算法进行微服务调度,传统启发式算法一般是基于确定的问题给出最优解,在动态环境下解决问题效率较低。因此本发明制定了一套算法单元调度方法,适应动态环境,同时合理利用资源。In the existing scheduling methods, Technical Solution 1 introduces the resource feature matching mechanism into the service scheduling algorithm, but the resource features it considers are not comprehensive enough, and other resources may not be matched or not reasonably utilized. The optimization goals considered by Technical Solution 2 and Technical Solution 3 when performing service scheduling are latency, resource utilization, etc. In the complex environment of the edge collaboration scenario, their optimization goals are not comprehensive enough. Technical Solution 2 uses a particle swarm optimization algorithm for microservice scheduling. Traditional heuristic algorithms generally give the optimal solution based on a certain problem, and are less efficient in solving problems in a dynamic environment. Therefore, the present invention develops a set of algorithm unit scheduling methods that adapt to dynamic environments and make rational use of resources.
发明内容Summary of the invention
本发明针对动态边端协作场景中现有技术考虑的资源特征、优化目标不够全面的问题,提出一种边端协作场景中适应动态环境的算力资源调度方法,在动态边端协作的场景下,将算法单元等算力资源进行调度,使其适应动态变化的环境,同时优化时延,提高边缘层的贡献度,使边缘服务器的资源利用率更加均衡。In response to the problem that the resource characteristics and optimization objectives considered in the existing technologies in dynamic edge-end collaboration scenarios are not comprehensive enough, the present invention proposes a computing resource scheduling method that adapts to dynamic environments in edge-end collaboration scenarios. In the dynamic edge-end collaboration scenario, computing resources such as algorithm units are scheduled to adapt to the dynamically changing environment. At the same time, the latency is optimized, the contribution of the edge layer is improved, and the resource utilization of the edge server is more balanced.
为了实现上述目的,本发明提供如下技术方案:In order to achieve the above object, the present invention provides the following technical solutions:
本发明提供一种边端协作场景中适应动态环境的算力资源调度方法,包括如下步骤:The present invention provides a computing resource scheduling method that adapts to a dynamic environment in an edge-end collaboration scenario, comprising the following steps:
S1、构建对业务请求、边缘服务器、算法单元的资源评估模型,每个资源评估模型从计算、通信、存储、内存四个维度建模;S1. Build resource evaluation models for business requests, edge servers, and algorithm units. Each resource evaluation model is modeled from four dimensions: computing, communication, storage, and memory.
S2、基于历史业务请求量进行预测,得到未来的业务请求量,将预测结果作为算法单元调度的依据;S2. Predict the future business request volume based on the historical business request volume, and use the prediction result as the basis for scheduling the algorithm unit;
S3、用计算、通信、存储、内存四个维度的资源指标对业务请求、边缘服务器、算法单元进行评估,根据评估结果进行业务请求和边缘服务器的匹配;S3, using resource indicators in four dimensions of computing, communication, storage, and memory to evaluate business requests, edge servers, and algorithm units, and matching business requests with edge servers based on the evaluation results;
S4、综合预测得到的业务请求量、业务请求和边缘服务器的匹配结果、业务请求所需算法单元类型,考虑时延、边缘层贡献度、边缘服务器资源利用均衡程度,制定多目标优化问题模型;S4. Comprehensively predict the amount of business requests, the matching results between business requests and edge servers, and the type of algorithm units required for business requests, and consider latency, edge layer contribution, and the balance of edge server resource utilization to develop a multi-objective optimization problem model.
S5、基于深度强化学习算法进行算法单元调度。S5. Perform algorithm unit scheduling based on deep reinforcement learning algorithm.
进一步地,步骤S1中,业务请求建模为四元组requesti=(tci,tbi,tsi,tmi),0≤i<Mt,其中,四元组内的元素分别表示业务的计算需求、通信需求、存储需求、内存需求,Mt表示当前时隙t的业务请求数目;Further, in step S1, the service request is modeled as a four-tuple requesti =(tci ,tbi ,tsi ,tmi ), 0≤i<Mt , wherein the elements in the four-tuple represent the computing demand, communication demand, storage demand, and memory demand of the service respectively, and Mt represents the number of service requests in the current time slot t;
边缘服务器建模为四元组Ei=(Ci,Bi,Si,Mi),0≤i<N,其中,四元组内的元素分别表示服务器的计算能力、通信能力、存储能力、内存能力,N表示服务器数目;The edge server is modeled as a four-tuple Ei =(Ci ,Bi ,Si ,Mi ), 0≤i<N, where the elements in the four-tuple represent the computing power, communication power, storage power, and memory power of the server, respectively, and N represents the number of servers;
算法单元建模为四元组rk=(ck,bk,sk,mk),0≤k<W,其中,四元组内的元素分别表示算法单元需要占用的计算资源、通信资源、存储资源、内存资源,W表示算法单元数目。The algorithm unit is modeled as a quaternary group rk =(ck ,bk ,sk ,mk ), 0≤k<W, where the elements in the quaternary group represent the computing resources, communication resources, storage resources, and memory resources required by the algorithm unit, respectively, and W represents the number of algorithm units.
进一步地,步骤S2中,基于历史业务请求量进行预测的方法为:设第t个时隙的业务请求量为X(t),时间序列滑窗大小d,采用GRU深度学习算法,用过去的d个时隙的业务请求量用于预测未来1个时间窗的业务请求量。Furthermore, in step S2, the method for prediction based on historical business request volume is: let the business request volume of the tth time slot be X(t), the time series sliding window size be d, and use the GRU deep learning algorithm to use the business request volume of the past d time slots to predict the business request volume of the next 1 time window.
进一步地,步骤S3中,用计算、通信、存储、内存四个维度的资源指标对业务请求和边缘服务器进行评估,首先对业务请求和边缘服务器数据进行归一化处理,过程如下:Furthermore, in step S3, the service request and edge server are evaluated using resource indicators in four dimensions: computing, communication, storage, and memory. First, the service request and edge server data are normalized. The process is as follows:
对业务的计算需求序列进行归一化,得到归一化结果同理,对业务请求的通信需求、存储需求、内存需求进行归一化处理,对边缘服务器拥有的计算、通信、存储、内存资源进行归一化处理,结果如下:Sequence of computing requirements for business Normalize and get the normalized result Similarly, the communication requirements, storage requirements, and memory requirements of the business requests are normalized, and the computing, communication, storage, and memory resources owned by the edge server are normalized. The results are as follows:
将请求i的资源需求归一化结果表示为The normalized resource requirement of request i is expressed as
将服务器i拥有的资源归一化结果表示为The normalized result of the resources owned by server i is expressed as
然后为四项指标赋予不同权重Q=(a,b,c,d),得到综合评估结果TRi和ERi,如下公式所示:Then, different weights Q = (a, b, c, d) are assigned to the four indicators to obtain the comprehensive evaluation results TRi and ERi , as shown in the following formula:
TRi=GTi·QTTRi =GTi ·QT
ERi=GEi·QTERi = GEi ·QT
其中,TRi为业务请求i的综合评估结果,ERi为为边缘服务器i的综合评估结果,GEi为为边缘服务器i拥有的资源的归一化结果,GTi为业务请求i的资源需求的归一化结果,QT为四项资源指标的权重。Among them, TRi is the comprehensive evaluation result of business request i, ERi is the comprehensive evaluation result of edge server i, GEi is the normalized result of the resources owned by edge server i, GTi is the normalized result of the resource demand of business request i, and QT is the weight of the four resource indicators.
进一步地,步骤S3中,业务请求和边缘服务器通过Rank方法进行分级,根据等级通过Map方法进行匹配;Further, in step S3, the service request and the edge server are graded by the Rank method, and matched by the Map method according to the grade;
业务请求和边缘服务器通过Rank方法进行分级,方法如下:Business requests and edge servers are ranked using the Rank method, as follows:
1)找到综合评价结果序列中的最大值和最小值,并计算其差值;1) Find the maximum and minimum values in the comprehensive evaluation result sequence and calculate their difference;
2)定义要划分的等级数量rankcount;2) Define the number of levels to be divided rankcount;
3)用综合评价结果中最大值和最小值的差值,除以等级数量,得到等级间距gap,即每个等级范围内的最大值和最小值的差值为gap;等级区间划分{[a0,a1),[a1,a2),...,[arankcount-1,arankcount]},其中an-an-1=gap;3) Divide the difference between the maximum and minimum values in the comprehensive evaluation result by the number of levels to obtain the level interval gap, that is, the difference between the maximum and minimum values in each level range is the gap; the level interval is divided into {[a0 ,a1 ),[a1 ,a2 ),...,[arankcount-1 ,arankcount ]}, where an -an-1 = gap;
4)用评价结果与等级区间进行对应,得到分级结果;4) Use the evaluation results to correspond to the grade intervals to obtain the grading results;
根据等级通过Map方法进行匹配的方法如下:The method of matching by level through Map method is as follows:
1)根据业务的等级,为其选择等级相同的服务器;1) According to the level of the business, select a server of the same level;
2)若某个业务的等级为r,则为其选择等级为r的服务器,如果等级为r的服务器数目大于1,则在这些服务器中,选择其上业务数目最少的服务器,与该业务进行匹配;若某个业务的等级为r,但不存在等级为r的服务器,则为其选择等级最相近的服务器;2) If the level of a service is r, a server of level r is selected for it. If the number of servers of level r is greater than 1, the server with the least number of services is selected among these servers to match the service. If the level of a service is r, but there is no server of level r, a server with the closest level is selected for it.
3)得到最终的匹配结果矩阵A,表示如下:3) The final matching result matrix A is obtained, which is expressed as follows:
其中,ai表示业务i匹配到了服务器ai。Here,ai indicates that service i is matched to serverai .
进一步地,步骤S4中,时延模型构建过程如下:Furthermore, in step S4, the delay model building process is as follows:
业务请求需传输到服务器进行处理,分为两种情况:Business requests need to be transmitted to the server for processing, which can be divided into two cases:
情况一:若匹配到的服务器j有业务requesti所需的算法单元rk,即btj,k=1,则直接在服务器响应该业务请求;Case 1: If the matched server j has the algorithm unit rk required by the service requesti , that is, btj,k = 1, the service request is directly responded to on the server;
情况二:若匹配到的服务器j没有业务requesti所需的算法单元rk,即btj,k=0,则将此业务请求传输到中心云;Case 2: If the matched server j does not have the algorithm unit rk required by the service requesti , that is, btj,k = 0, then the service request is transmitted to the central cloud;
在情况一中,终端设备到服务器的时延为设情况一时延为在情况二中,若无法得到响应需要传输到中心云,设情况二时延为为τvc;将业务i的时延定义为用如下公式表示:In case 1, the delay from the terminal device to the server is Assume that the delay in case 1 is In case 2, if no response is received and the data needs to be transmitted to the central cloud, let the delay of case 2 be τvc ; define the delay of service i as It is expressed as follows:
将平均时延定义为:The average delay is defined as:
其中,M表示业务请求数目。Wherein, M represents the number of service requests.
进一步地,步骤S4中,边缘层贡献度模型构建过程如下:Furthermore, in step S4, the edge layer contribution model construction process is as follows:
用表示业务请求i是否可以在边缘层得到响应,设业务请求i匹配到的服务器为j,业务请求i所需的算法单元为k,用如下公式表示:use Indicates whether business request i can get a response at the edge layer. Let the server matched by business request i be j, and the algorithm unit required by business request i be k. It is expressed as follows:
其中,若匹配到的服务器j有业务requesti所需的算法单元rk,即btj,k=1,则直接在服务器响应该业务请求;若匹配到的服务器j没有业务requesti所需的算法单元rk,即btj,k=0,则将此业务请求传输到中心云;If the matched server j has the algorithm unit rk required by the service requesti , that is, btj,k = 1, the service request is directly responded to on the server; if the matched server j does not have the algorithm unit rk required by the service requesti , that is, btj,k = 0, the service request is transmitted to the central cloud;
边缘层贡献度表示为Ht,定义为该时隙t中在边缘层响应的业务数目与总业务数目的比值,用如下公式表示:The edge layer contribution is denoted as Ht , which is defined as the ratio of the number of services responded to at the edge layer in the time slot t to the total number of services, and is expressed by the following formula:
其中,Mt表示当前时隙t的业务请求数目。Wherein,Mt represents the number of service requests in the current time slot t.
进一步地,步骤S4中,边缘服务器资源利用均衡程度模型构建如下:Furthermore, in step S4, the edge server resource utilization balance model is constructed as follows:
用rcj(yj,zk)表示服务器j在某一指标下剩余资源的百分比,表示为:Let rcj (yj ,zk ) represent the percentage of remaining resources of server j under a certain indicator, expressed as:
其中,y∈{C,B,S,M},表示服务器在某一指标下的当前资源量,z∈{c,b,s,m},表示算法单元在某一指标下需要占用的资源;Among them, y∈{C,B,S,M} represents the current resource amount of the server under a certain indicator, and z∈{c,b,s,m} represents the resources that the algorithm unit needs to occupy under a certain indicator;
用RCt={rc1,rc2,...,rcN}表示算法单元部署后的服务器当前综合资源量,服务器当前资源量表示为:RCt = {rc1 , rc2 , ..., rcN } represents the current comprehensive resource amount of the server after the algorithm unit is deployed. The current resource amount of the server is expressed as:
将资源利用均衡度δt定义为1减去rcj序列的标准差,表示各服务器当前资源的均衡度大小,边缘服务器资源利用均衡程度用如下公式表示:The resource utilization balanceδt is defined as 1 minus the standard deviation of thercj sequence, which represents the balance of the current resources of each server. The balance of edge server resource utilization is expressed by the following formula:
其中,表示RCt序列的均值。in, Represents the mean of the RCt series.
进一步地,步骤S4的多目标优化问题模型构建为:Furthermore, the multi-objective optimization problem model of step S4 is constructed as follows:
其中,表示平均时延,Ht表示边缘层贡献度,δt表示边缘服务器资源利用均衡程度,α,β,γ分别表示时延、边缘层贡献度、资源利用均衡程度的权重系数。in, represents the average delay,Ht represents the contribution of the edge layer,δt represents the balance of edge server resource utilization, and α, β, and γ represent the weight coefficients of delay, edge layer contribution, and resource utilization balance, respectively.
进一步地,步骤S5中,通过基于深度强化学习的调度方法将算法单元部署在服务器上,将结果表示为矩阵Bt:Furthermore, in step S5, the algorithm unit is deployed on the server through a scheduling method based on deep reinforcement learning, and the result is represented as a matrix Bt :
其中bij为二元变量,若bij为1,则表示算法单元j存在于服务器i上;若bij为0,则表示算法单元j不存在于服务器i上。Wherebij is a binary variable. Ifbij is 1, it means that algorithm unit j exists on server i; ifbij is 0, it means that algorithm unit j does not exist on server i.
与现有技术相比,本发明的有益效果为:Compared with the prior art, the present invention has the following beneficial effects:
本发明提出的边端协作场景中适应动态环境的算力资源调度方法,在动态边端协作场景中,进行业务请求量预测,综合考虑多维度资源对业务请求、边缘服务器和算法单元进行评估,并进行业务请求和边缘服务器的匹配,使用深度强化学习算法解决算法单元调度问题,使其适应动态变化的环境,同时对时延、边缘层贡献度、边缘服务器资源利用均衡程度进行了优化,优化时延,提高边缘层的贡献度,使边缘服务器的资源利用率更加均衡。通过仿真实验表明,本发明提出的方法,可以在一定程度上降低时延、提高边缘层贡献度,同时提高边缘服务器资源利用均衡程度。The computing resource scheduling method that adapts to the dynamic environment in the edge-end collaboration scenario proposed in the present invention predicts the business request volume in the dynamic edge-end collaboration scenario, comprehensively considers multi-dimensional resources to evaluate the business request, edge server and algorithm unit, and matches the business request with the edge server. The algorithm unit scheduling problem is solved by using a deep reinforcement learning algorithm to adapt to the dynamically changing environment. At the same time, the latency, edge layer contribution, and edge server resource utilization balance are optimized, the latency is optimized, the edge layer contribution is improved, and the resource utilization of the edge server is more balanced. Simulation experiments show that the method proposed in the present invention can reduce latency, improve edge layer contribution, and improve the edge server resource utilization balance to a certain extent.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1为本发明实施例提供的边端协作场景中适应动态环境的算力资源调度方法流程图。FIG1 is a flow chart of a computing resource scheduling method that adapts to a dynamic environment in an edge collaboration scenario provided by an embodiment of the present invention.
图2为本发明实施例提供的业务请求和边缘服务器的匹配方法示意图。FIG. 2 is a schematic diagram of a method for matching a service request and an edge server according to an embodiment of the present invention.
图3为本发明实施例提供的时延对比图。FIG. 3 is a delay comparison diagram provided by an embodiment of the present invention.
图4为本发明实施例提供的边缘层贡献度对比图。FIG. 4 is a comparison diagram of edge layer contributions provided by an embodiment of the present invention.
图5为本发明实施例提供的资源利用均衡程度对比图。FIG5 is a diagram comparing resource utilization balance levels provided by an embodiment of the present invention.
具体实施方式DETAILED DESCRIPTION
边缘服务器的资源是有限的,要制定合理的算法单元调度方法,充分利用有限的资源为业务请求提供服务。环境中的业务请求是动态变化的,在制定算法单元调度方案是要考虑到环境的动态特征,同时要兼顾用户的服务质量和边缘服务器的资源利用情况。因此,本发明制定了边端协作场景中适应动态环境的算力资源调度方法。The resources of the edge server are limited, and a reasonable algorithm unit scheduling method should be formulated to make full use of limited resources to provide services for business requests. The business requests in the environment are dynamically changing. When formulating the algorithm unit scheduling plan, the dynamic characteristics of the environment should be taken into account, while taking into account the user's service quality and the resource utilization of the edge server. Therefore, the present invention formulates a computing resource scheduling method that adapts to the dynamic environment in the edge-end collaboration scenario.
为了更好地理解本技术方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整的描述。显然,所描述的实例仅仅是本发明实施例一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员基于本申请所获得的所有其他实施例,都属于本发明保护的范围。In order to better understand the technical solution, the technical solution in the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described examples are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field based on this application belong to the scope of protection of the present invention.
本发明提出的边端协作场景中适应动态环境的算力资源调度方法,如图1所示,包括如下步骤:The computing resource scheduling method adapted to a dynamic environment in an edge-end collaboration scenario proposed by the present invention, as shown in FIG1 , includes the following steps:
S1、构建对业务请求、边缘服务器、算法单元的资源评估模型,每个资源评估模型从计算、通信、存储、内存四个维度建模。S1. Build resource evaluation models for business requests, edge servers, and algorithm units. Each resource evaluation model is modeled from four dimensions: computing, communication, storage, and memory.
具体地,业务请求建模为四元组requesti=(tci,tbi,tsi,tmi),0≤i<Mt,其中,四元组内的元素分别表示业务的计算需求、通信需求、存储需求、内存需求,Mt表示当前时隙t的业务请求数目。Specifically, the service request is modeled as a four-tuple requesti =(tci ,tbi ,tsi ,tmi ), 0≤i<Mt , where the elements in the four-tuple represent the computing demand, communication demand, storage demand, and memory demand of the service respectively, andMt represents the number of service requests in the current time slot t.
将边缘服务器建模为四元组Ei=(Ci,Bi,Si,Mi),0≤i<N,其中,四元组内的元素分别表示服务器的计算能力、通信能力、存储能力、内存能力,N表示服务器数目。The edge server is modeled as a four-tuple Ei =(Ci ,Bi ,Si ,Mi ), 0≤i<N, where the elements in the four-tuple represent the computing power, communication power, storage power, and memory power of the server respectively, and N represents the number of servers.
算法单元在运行时需要占用一定的计算、通信、存储、内存资源,类型为rk的算法单元占用的资源用四元组rk=(ck,bk,sk,mk),0≤k<W来表示。其中,四元组内的元素分别表示算法单元需要占用的计算资源、通信资源、存储资源、内存资源,W表示算法单元数目。The algorithm unit needs to occupy certain computing, communication, storage, and memory resources when running. The resources occupied by the algorithm unit of type rk are represented by the quaternary group rk = (ck , bk , sk , mk ), 0≤k<W. The elements in the quaternary group represent the computing resources, communication resources, storage resources, and memory resources required by the algorithm unit, respectively, and W represents the number of algorithm units.
业务请求量具有一定的时间特性,所以首先根据业务的历史数据特征来训练业务预测模型,用于未来的业务请求量的预测。采用GRU深度学习算法,对业务请求量进行主动式预测,将预测结果作为算法单元调度的依据。设第t个时隙的业务请求量为X(t),时间序列滑窗大小d,用过去的d个时隙的业务请求量用于预测未来1个时间窗的业务请求量。采用GRU来进行预测,训练阶段,历史观察样本集合为X={X(t-d),(t-d+1),…,X(t-1)|X(t)},用{X(t-d),…,X(t-1)}作为GRU网络模型的输入,输出预测结果X'(t),通过比较X^'(t)和X(t)调整模型参数,进行模型训练。The business request volume has certain time characteristics, so firstly, the business prediction model is trained according to the historical data characteristics of the business, which is used to predict the future business request volume. The GRU deep learning algorithm is used to actively predict the business request volume, and the prediction results are used as the basis for the scheduling of the algorithm unit. Let the business request volume of the tth time slot be X(t), the time series sliding window size is d, and the business request volume of the past d time slots is used to predict the business request volume of the next time window. GRU is used for prediction. In the training stage, the historical observation sample set is X={X(t-d),(t-d+1),…,X(t-1)|X(t)}, and {X(t-d),…,X(t-1)} is used as the input of the GRU network model, and the prediction result X'(t) is output. The model parameters are adjusted by comparing X^'(t) and X(t), and the model training is performed.
S2、基于历史业务请求量进行预测,得到未来的业务请求量,将预测结果作为算法单元调度的依据。S2. Based on the historical business request volume, the future business request volume is predicted, and the prediction result is used as the basis for scheduling the algorithm unit.
具体地,基于历史业务请求量进行预测的方法为:设第t个时隙的业务请求量为X(t),时间序列滑窗大小d,采用GRU深度学习算法,用过去的d个时隙的业务请求量用于预测未来1个时间窗的业务请求量。Specifically, the method for prediction based on historical business request volume is as follows: let the business request volume in the tth time slot be X(t), the time series sliding window size be d, and use the GRU deep learning algorithm to use the business request volume in the past d time slots to predict the business request volume in the next 1 time window.
本发明制定了业务和服务器以资源为主要考虑因素的匹配方法。首先对业务需求和服务器资源进行综合评估,得到综合评估结果。然后根据评估结果,对业务和服务器进行分级。分级后,业务与服务器根据等级进行匹配。若不采用此方法,可能会导致资源需求大的业务匹配到性能差的服务器,从而导致无法满足业务需求。采用此方法,可以使服务器的资源得到更加合理的利用,同时匹配结果也可以为后续的算法单元调度工作提供有效的参考依据。The present invention develops a matching method for services and servers with resources as the main consideration. First, a comprehensive evaluation is performed on service requirements and server resources to obtain a comprehensive evaluation result. Then, based on the evaluation result, services and servers are graded. After the grading, services and servers are matched according to the grade. If this method is not adopted, services with large resource requirements may be matched to servers with poor performance, resulting in failure to meet service requirements. By adopting this method, server resources can be used more reasonably, and the matching results can also provide an effective reference basis for subsequent algorithm unit scheduling work.
S3、用计算、通信、存储、内存四个维度的资源指标对业务请求、边缘服务器、算法单元进行评估,根据评估结果进行业务请求和边缘服务器的匹配。S3. Use resource indicators in four dimensions, namely computing, communication, storage, and memory, to evaluate business requests, edge servers, and algorithm units, and match business requests and edge servers based on the evaluation results.
具体地,对业务请求和边缘服务器进行评估,首先对业务请求和边缘服务器数据进行归一化处理,过程如下:Specifically, the business request and edge server are evaluated. First, the business request and edge server data are normalized. The process is as follows:
对所有业务的计算需求序列进行归一化,得到归一化结果同理,对业务请求的通信需求、存储需求、内存需求进行归一化处理,对边缘服务器拥有的计算、通信、存储、内存资源进行归一化处理,结果如下:Computational requirements for all businesses Normalize and get the normalized result Similarly, the communication requirements, storage requirements, and memory requirements of the business requests are normalized, and the computing, communication, storage, and memory resources owned by the edge server are normalized. The results are as follows:
将请求i的资源需求归一化结果表示为The normalized resource requirement of request i is expressed as
将服务器i拥有的资源归一化结果表示为The normalized result of the resources owned by server i is expressed as
然后为四项指标赋予不同权重Q=(a,b,c,d),得到综合评估结果TRi和ERi,如下公式所示:Then, different weights Q = (a, b, c, d) are assigned to the four indicators to obtain the comprehensive evaluation results TRi and ERi , as shown in the following formula:
TRi=GTi·QTTRi =GTi ·QT
ERi=GEi·QTERi = GEi ·QT
其中,TRi为业务请求i的综合评估结果,ERi为为边缘服务器i的综合评估结果,GEi为为边缘服务器i拥有的资源的归一化结果,GTi为业务请求i的资源需求的归一化结果,QT为四项资源指标的权重。Among them, TRi is the comprehensive evaluation result of business request i, ERi is the comprehensive evaluation result of edge server i, GEi is the normalized result of the resources owned by edge server i, GTi is the normalized result of the resource demand of business request i, and QT is the weight of the four resource indicators.
然后,业务请求与服务器通过Rank方法进行分级,并通过Map方法进行匹配,将匹配结果定义为矩阵A。Then, the business request and the server are ranked by the Rank method and matched by the Map method, and the matching result is defined as the matrix A.
业务请求和边缘服务器通过Rank方法进行分级,方法如下:Business requests and edge servers are ranked using the Rank method, as follows:
根据综合评价结果TRi和ERi,对业务和服务器进行分级:According to the comprehensive evaluation results TRi and ERi , the services and servers are graded:
Rank(TRi)=RTRiRank(TRi ) =RTRi
Rank(ERi)=RERiRank(ERi )=RERi
对于分级方式Rank,定义如下:For the grading method Rank, the definition is as follows:
1)找到综合评价结果序列中的最大值和最小值,并计算其差值;1) Find the maximum and minimum values in the comprehensive evaluation result sequence and calculate their difference;
2)定义要划分的等级数量rankcount;例如,要划分为5个等级,则令rankcount=5;2) Define the number of levels to be divided, rankcount; for example, to divide into 5 levels, set rankcount = 5;
3)用综合评价结果中最大值和最小值的差值,除以等级数量,得到等级间距gap,即每个等级范围内的最大值和最小值的差值为gap;等级区间划分{[a0,a1),[a1,a2),...,[arankcount-1,arankcount]},其中an-an-1=gap;3) Divide the difference between the maximum and minimum values in the comprehensive evaluation result by the number of levels to obtain the level interval gap, that is, the difference between the maximum and minimum values in each level range is the gap; the level interval is divided into {[a0 ,a1 ),[a1 ,a2 ),...,[arankcount-1 ,arankcount ]}, where an -an-1 = gap;
4)用评价结果与等级区间进行对应,得到分级结果。4) Use the evaluation results to match the grade intervals to obtain the grading results.
分级后,业务与服务器根据等级通过Map方法进行匹配,方法如下:After classification, services and servers are matched according to their levels through the Map method, as follows:
1)根据业务的等级,为其选择等级相同的服务器;1) According to the level of the business, select a server of the same level;
2)若某个业务的等级为r,则为其选择等级为r的服务器,如果等级为r的服务器数目大于1,则在这些服务器中,选择其上业务数目最少的服务器,与该业务进行匹配;若某个业务的等级为r,但不存在等级为r的服务器,则为其选择等级最相近的服务器;2) If the level of a service is r, a server of level r is selected for it. If the number of servers of level r is greater than 1, the server with the least number of services is selected among these servers to match the service. If the level of a service is r, but there is no server of level r, a server with the closest level is selected for it.
3)得到最终的匹配结果矩阵A,表示如下:3) The final matching result matrix A is obtained, which is expressed as follows:
其中,ai表示业务i匹配到了服务器ai。Here,ai indicates that service i is matched to serverai .
不同的业务需要不同的算法单元为其提供服务,用映射关系NS(requesti)=rk表示业务i所需要的算法单元为rk。Different services require different algorithm units to provide services therefor. The mapping relationship NS(requesti )=rk indicates that the algorithm unit required by service i is rk .
如图2所示。首先通过综合评价方法和分级方法对业务请求和服务器进行分级,得到业务请求和服务器的分级结果,然后根据分级结果通过匹配方法Map进行业务请求和服务器的匹配。As shown in Figure 2. First, the business request and the server are graded by the comprehensive evaluation method and the grading method to obtain the grading results of the business request and the server, and then the business request and the server are matched by the matching method Map according to the grading results.
S4、综合预测得到的业务请求量、业务请求和边缘服务器的匹配结果、业务请求所需算法单元类型,考虑时延、边缘层贡献度、边缘服务器资源利用均衡程度,制定多目标优化问题模型。S4. Comprehensively predict the amount of business requests, the matching results between business requests and edge servers, and the type of algorithm units required for business requests, taking into account latency, edge layer contribution, and the balance of edge server resource utilization, and formulate a multi-objective optimization problem model.
具体地,时延模型构建过程如下:Specifically, the delay model construction process is as follows:
业务请求需传输到服务器进行处理,分为两种情况:Business requests need to be transmitted to the server for processing, which can be divided into two cases:
情况一:若匹配到的服务器j有业务requesti所需的算法单元rk,即btj,k=1,则直接在服务器响应该业务请求;Case 1: If the matched server j has the algorithm unit rk required by the service requesti , that is, btj,k = 1, the service request is directly responded to on the server;
情况二:若匹配到的服务器j没有业务requesti所需的算法单元rk,即btj,k=0,则将此业务请求传输到中心云;Case 2: If the matched server j does not have the algorithm unit rk required by the service requesti , that is, btj,k = 0, then the service request is transmitted to the central cloud;
在情况一中,终端设备到服务器的时延为设情况一时延为在情况二中,若无法得到响应需要传输到中心云,设情况二时延为为τvc;将业务i的时延定义为用如下公式表示:In case 1, the delay from the terminal device to the server is Assume that the delay in case 1 is In case 2, if no response is received and the data needs to be transmitted to the central cloud, let the delay of case 2 be τvc ; define the delay of service i as It is expressed as follows:
将平均时延定义为:The average delay is defined as:
其中,M表示业务请求数目。Wherein, M represents the number of service requests.
边缘层贡献度模型构建过程如下:The construction process of the edge layer contribution model is as follows:
本方案的优化目标之一为最大限度地让业务请求在匹配到的边缘服务器上得到响应,以最大化边缘层的作用。因此设置了边缘层贡献度。将业务与服务器利用上述匹配方法进行匹配,若服务器上存在了业务请求所需的算法单元,可以处理此业务请求,则业务可以在边缘层得到响应,否则业务无法在边缘层得到响应。边缘层贡献度表示为Ht,定义为该时隙t中在边缘层响应的业务数目与总业务数目的比值。One of the optimization goals of this solution is to maximize the response of business requests on the matched edge servers to maximize the role of the edge layer. Therefore, the edge layer contribution is set. The business and the server are matched using the above matching method. If the algorithm unit required by the business request exists on the server and can process the business request, the business can be responded to at the edge layer. Otherwise, the business cannot be responded to at the edge layer. The edge layer contribution is expressed as Ht , which is defined as the ratio of the number of businesses responded at the edge layer to the total number of businesses in the time slot t.
用表示业务请求i是否可以在边缘层得到响应,设业务请求i匹配到的服务器为j,业务请求i所需的算法单元为k,用如下公式表示:use Indicates whether business request i can get a response at the edge layer. Let the server matched by business request i be j, and the algorithm unit required by business request i be k. It is expressed as follows:
其中,若匹配到的服务器j有业务requesti所需的算法单元rk,即btj,k=1,则直接在服务器响应该业务请求;若匹配到的服务器j没有业务requesti所需的算法单元rk,即btj,k=0,则将此业务请求传输到中心云;If the matched server j has the algorithm unit rk required by the service requesti , that is, btj,k = 1, the service request is directly responded to on the server; if the matched server j does not have the algorithm unit rk required by the service requesti , that is, btj,k = 0, the service request is transmitted to the central cloud;
边缘层贡献度表示为Ht,定义为该时隙t中在边缘层响应的业务数目与总业务数目的比值,用如下公式表示:The edge layer contribution is denoted as Ht , which is defined as the ratio of the number of services responded to at the edge layer in the time slot t to the total number of services, and is expressed by the following formula:
其中,Mt表示当前时隙t的业务请求数目。Wherein,Mt represents the number of service requests in the current time slot t.
边缘服务器资源利用均衡程度模型构建如下:The edge server resource utilization balance model is constructed as follows:
算法单元需要占用服务器的资源空间。为使服务器的资源利用情况尽可能保持平衡,本发明定义了资源利用均衡度来表示各服务器资源利用情况的差异度。The algorithm unit needs to occupy the resource space of the server. In order to keep the resource utilization of the server as balanced as possible, the present invention defines a resource utilization balance to represent the difference in resource utilization of each server.
用rcj(yj,zk)表示服务器j在某一指标下剩余资源的百分比,表示为:Let rcj (yj ,zk ) represent the percentage of remaining resources of server j under a certain indicator, expressed as:
其中,y∈{C,B,S,M},表示服务器在某一指标下的当前资源量,z∈{c,b,s,m},表示算法单元在某一指标下需要占用的资源;例如rcj(Cj,ck)表示服务器j在计算指标下的当前剩余资源百分比。Among them, y∈{C,B,S,M} represents the current resource amount of the server under a certain indicator, and z∈{c,b,s,m} represents the resources that the algorithm unit needs to occupy under a certain indicator; for example, rcj (Cj ,ck ) represents the current remaining resource percentage of server j under the calculation indicator.
用RCt={rc1,rc2,...,rcN}表示算法单元部署后的服务器当前综合资源量,由于四项指标在数量级上存在较大差异,因此服务器当前资源量表示为:RCt = {rc1 , rc2 , ..., rcN } represents the current comprehensive resource amount of the server after the algorithm unit is deployed. Since the four indicators have large differences in magnitude, the current resource amount of the server is expressed as:
约束条件为以下公式中四个子项均不小于零。The constraint condition is that all four sub-terms in the following formula are not less than zero.
将资源利用均衡度δt定义为1减去rcj序列的标准差,表示各服务器当前资源的均衡度大小,边缘服务器资源利用均衡程度用如下公式表示:The resource utilization balanceδt is defined as 1 minus the standard deviation of thercj sequence, which represents the balance of the current resources of each server. The balance of edge server resource utilization is expressed by the following formula:
其中,表示RCt序列的均值,δt越大,则资源利用率越均衡。in, It represents the mean of the RCt sequence. The larger δt is, the more balanced the resource utilization is.
从业务的角度来看,它们需要得到尽快响应在边缘服务器得到响应,因此时延是重要的评价指标,本发明期望较小的时延。从边缘服务器的角度,应最大化边缘层发挥的作用,使尽可能多的业务请求在边缘层得到响应,同时进行算法单元调度时应使各服务器的资源利用尽量保持平衡,本发明期望较高的资源利用均衡度。因此,本发明制定了总优化目标函数G,如下所示。From the business perspective, they need to get a response as soon as possible on the edge server, so latency is an important evaluation indicator, and the present invention expects a smaller latency. From the perspective of the edge server, the role of the edge layer should be maximized so that as many business requests as possible can be responded to at the edge layer. At the same time, when scheduling the algorithm unit, the resource utilization of each server should be kept as balanced as possible. The present invention expects a higher resource utilization balance. Therefore, the present invention formulates the total optimization objective function G, as shown below.
多目标优化问题模型(综合优化目标)构建为:The multi-objective optimization problem model (comprehensive optimization goal) is constructed as:
其中,表示平均时延,Ht表示边缘层贡献度,δt表示边缘服务器资源利用均衡程度,α,β,γ分别表示时延、边缘层贡献度、资源利用均衡程度的权重系数。in, represents the average delay,Ht represents the contribution of the edge layer,δt represents the balance of edge server resource utilization, and α, β, and γ represent the weight coefficients of delay, edge layer contribution, and resource utilization balance, respectively.
S5、基于深度强化学习算法进行算法单元调度。S5. Perform algorithm unit scheduling based on deep reinforcement learning algorithm.
深度强化学习算法中智能体与环境进行交互、学习,基于环境的实时状态做出调度决策,能较好地适应动态变化的环境,因此我们采用深度强化学习算法解决调度问题。此外,本发明的部署场景中包含多个服务器和多个算法单元,状态空间和动作空间维度较高,强化学习中的Q学习方法难以解决高维问题,因此采用了强化学习与深度学习相结合的DQN方法。本方法与环境进行交互,依据动态变化的环境信息,实现算法单元的动态调度。此外,为防止算法单元长期占用服务器资源,为算法单元设置生命周期,已部署完成的算法单元达到一定生命周期Tend后会自动删除,并释放相应资源空间。本方法可以进行算法单元的动态调度,并最大限度降低时延、提高业务响应率、提高服务器资源利用均衡度。In the deep reinforcement learning algorithm, the intelligent agent interacts and learns with the environment, makes scheduling decisions based on the real-time state of the environment, and can better adapt to the dynamically changing environment. Therefore, we use the deep reinforcement learning algorithm to solve the scheduling problem. In addition, the deployment scenario of the present invention includes multiple servers and multiple algorithm units, and the dimensions of the state space and action space are high. The Q learning method in reinforcement learning is difficult to solve high-dimensional problems. Therefore, the DQN method combining reinforcement learning and deep learning is adopted. This method interacts with the environment and realizes the dynamic scheduling of the algorithm unit based on the dynamically changing environmental information. In addition, in order to prevent the algorithm unit from occupying server resources for a long time, a life cycle is set for the algorithm unit. The deployed algorithm unit will be automatically deleted after reaching a certain life cycle Tend , and the corresponding resource space will be released. This method can perform dynamic scheduling of algorithm units, minimize latency, improve service response rate, and improve the balance of server resource utilization.
具体地,本发明通过基于深度强化学习的调度方法将算法单元部署在服务器上,将结果表示为矩阵Bt:Specifically, the present invention deploys the algorithm unit on the server through a scheduling method based on deep reinforcement learning, and expresses the result as a matrix Bt :
其中bij为二元变量,若bij为1,则表示算法单元j存在于服务器i上;若bij为0,则表示算法单元j不存在于服务器i上。Wherebij is a binary variable. Ifbij is 1, it means that algorithm unit j exists on server i; ifbij is 0, it means that algorithm unit j does not exist on server i.
算法模型训练过程如下:The algorithm model training process is as follows:
首先定义算法单元调度环境下的状态空间、动作空间和奖励函数,马尔可夫模型定义如下:First, define the state space, action space and reward function in the algorithm unit scheduling environment. The Markov model is defined as follows:
状态:服务器上当前的算法单元存在状态state(t)=[s0,s1,...,sp,...,sN*W-1],sp∈{0,1},若sp=1,则令p/N=i,p%N=j,其中,N为服务器数目,W为算法单元数目;即元素序号p除以服务器数目取整等于i,取余等j,表示表示服务器i上存在算法单元j;State: The current algorithm unit existence state on the server state(t) = [s0 ,s1 ,...,sp ,...,sN*W-1 ],sp ∈{0,1}. If sp = 1, then let p/N = i, p%N = j, where N is the number of servers and W is the number of algorithm units. That is, the element number p divided by the number of servers is equal to i, and the remainder is j, which means that algorithm unit j exists on server i.
动作:算法单元调度决策a(t)=[ac0,ac1,...,acW-1],0≤aci<N,其中aci表示算法单元i部署到服务器aci上;如果算法单元已存在,则不再重复部署;如果服务器的剩余资源无法满足算法单元的资源需求,则不部署;Action: Algorithm unit scheduling decision a(t) = [ac0 ,ac1 ,...,acW-1], 0≤aci <N, where aci indicates that algorithm unit i is deployed on server aci ; if the algorithm unit already exists, it will not be deployed again; if the remaining resources of the server cannot meet the resource requirements of the algorithm unit, it will not be deployed;
奖励函数:奖励函数设置为综合优化目标函数;Reward function: The reward function is set as the comprehensive optimization objective function;
R(t)=Gt (16)R(t)=Gt (16)
然后定义算法单元存在时间矩阵:Then define the algorithm unit existence time matrix:
其中,N为服务器数目,W为算法单元数目,di.j表示服务器i上的算法单元j已存在的时间,用于判断算法单元是否达到生命周期限制,是否需要被删除。Where N is the number of servers, W is the number of algorithm units, anddij represents the existence time of algorithm unit j on server i, which is used to determine whether the algorithm unit has reached its life cycle limit and needs to be deleted.
基于深度强化学习的算法单元调度算法流程如表1所示。The algorithm flow of the algorithm unit scheduling based on deep reinforcement learning is shown in Table 1.
表1基于深度强化学习的算法单元调度算法流程Table 1 Algorithm flow of algorithm unit scheduling based on deep reinforcement learning
基于历史业务请求量进行预测,随机生成边缘服务器的资源量和业务请求、算法单元的资源需求,进行业务请求和边缘服务器的匹配,以及基于深度强化学习的调度算法的训练。设置综合优化目标函数中时延、边缘层贡献度、边缘服务器资源利用均衡程度的权重分别为α=1,β=5,γ=1。使用训练好的基于深度强化学习的算法单元调度方法进行算法单元调度,并与随机调度方法、只优化时延的贪心调度方法进行对比。在三个指标下的对比结果分别如图3、4、5所示。图3展示了时延对比结果,其中只优化时延的贪心调度方法得到的时延最优,基于深度强化学习的调度方法次之,随机调度方法最差。图4展示了边缘层贡献度对比结果,其中只优化时延的贪心调度方法得到的边缘层贡献度最优,基于深度强化学习的调度方法次之,随机调度方法最差。图5展示了资源利用均衡程度的对比结果,其中基于深度强化学习的调度方法得到的时延最优,随机调度方法次之,只优化时延的贪心调度方法最差。因为只优化时延的贪心调度方法只考虑时延,同时因为边缘层贡献度和时延密切相关,所以在这两个指标下只优化时延的贪心调度方法表现最优,但是由于其忽视了其他指标,导致资源利用均衡程度最差。基于深度强化学习的调度方法综合考虑三个指标,相比于随机调度方法,都进行了一定程度的优化。通过仿真实验表明,本发明提出的方法可以在一定程度上降低时延、提高边缘层贡献度,同时提高边缘服务器资源利用均衡程度。Based on the historical business request volume, the resource volume of the edge server and the resource requirements of the business request and algorithm unit are randomly generated to match the business request with the edge server, and the scheduling algorithm based on deep reinforcement learning is trained. The weights of latency, edge layer contribution, and edge server resource utilization balance in the comprehensive optimization objective function are set to α=1, β=5, and γ=1 respectively. The algorithm unit scheduling method based on deep reinforcement learning is used to schedule the algorithm unit, and is compared with the random scheduling method and the greedy scheduling method that only optimizes latency. The comparison results under the three indicators are shown in Figures 3, 4, and 5 respectively. Figure 3 shows the latency comparison results, among which the greedy scheduling method that only optimizes latency obtains the best latency, the scheduling method based on deep reinforcement learning is second, and the random scheduling method is the worst. Figure 4 shows the edge layer contribution comparison results, among which the greedy scheduling method that only optimizes latency obtains the best edge layer contribution, the scheduling method based on deep reinforcement learning is second, and the random scheduling method is the worst. Figure 5 shows the comparison results of the degree of resource utilization balance, among which the scheduling method based on deep reinforcement learning obtains the best delay, the random scheduling method is second, and the greedy scheduling method that only optimizes the delay is the worst. Because the greedy scheduling method that only optimizes the delay only considers the delay, and because the edge layer contribution is closely related to the delay, the greedy scheduling method that only optimizes the delay performs best under these two indicators, but because it ignores other indicators, the degree of resource utilization balance is the worst. The scheduling method based on deep reinforcement learning comprehensively considers the three indicators, and compared with the random scheduling method, they are all optimized to a certain extent. Simulation experiments show that the method proposed in the present invention can reduce the delay, improve the edge layer contribution, and improve the degree of resource utilization balance of the edge server to a certain extent.
以上所述仅是对本发明的优选实施例及原理进行了详细说明,并非用于限定本发明的保护范围。对本领域的普通技术人员而言,依据本发明提供的思想,凡在本发明的精神和原则之内所作的任何修改、等同替换、改进等,均应视为本发明的保护范围。The above description is only a detailed description of the preferred embodiments and principles of the present invention, and is not intended to limit the scope of protection of the present invention. For those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention based on the ideas provided by the present invention shall be deemed as the scope of protection of the present invention.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310670378.1ACN116647604B (en) | 2023-06-07 | 2023-06-07 | A computing resource scheduling method that adapts to dynamic environments in edge-end collaboration scenarios |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310670378.1ACN116647604B (en) | 2023-06-07 | 2023-06-07 | A computing resource scheduling method that adapts to dynamic environments in edge-end collaboration scenarios |
| Publication Number | Publication Date |
|---|---|
| CN116647604Atrue CN116647604A (en) | 2023-08-25 |
| CN116647604B CN116647604B (en) | 2025-08-26 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202310670378.1AActiveCN116647604B (en) | 2023-06-07 | 2023-06-07 | A computing resource scheduling method that adapts to dynamic environments in edge-end collaboration scenarios |
| Country | Link |
|---|---|
| CN (1) | CN116647604B (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN117992230A (en)* | 2024-02-21 | 2024-05-07 | 北京驭达科技有限公司 | A vehicle-mounted edge computing method and system based on autonomous learning |
| CN118939412A (en)* | 2024-07-11 | 2024-11-12 | 中国司法大数据研究院有限公司 | A delay-guaranteed cloud-edge collaborative optimization and balanced deployment method |
| CN119376955A (en)* | 2024-12-27 | 2025-01-28 | 中科边缘智慧信息科技(苏州)有限公司 | Computing resource evaluation method and system for mobile edge application scenarios |
| CN120256150A (en)* | 2025-06-06 | 2025-07-04 | 清华海峡研究院(厦门) | Computer resource configuration method and device for differentiated teaching scenarios |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113993218A (en)* | 2021-11-18 | 2022-01-28 | 国网福建省电力有限公司经济技术研究院 | A collaborative offloading and resource allocation method based on multi-agent DRL under MEC architecture |
| WO2022027776A1 (en)* | 2020-08-03 | 2022-02-10 | 威胜信息技术股份有限公司 | Edge computing network task scheduling and resource allocation method and edge computing system |
| CN116137724A (en)* | 2023-02-20 | 2023-05-19 | 重庆邮电大学 | A task offloading and resource allocation method based on mobile edge computing |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2022027776A1 (en)* | 2020-08-03 | 2022-02-10 | 威胜信息技术股份有限公司 | Edge computing network task scheduling and resource allocation method and edge computing system |
| CN113993218A (en)* | 2021-11-18 | 2022-01-28 | 国网福建省电力有限公司经济技术研究院 | A collaborative offloading and resource allocation method based on multi-agent DRL under MEC architecture |
| CN116137724A (en)* | 2023-02-20 | 2023-05-19 | 重庆邮电大学 | A task offloading and resource allocation method based on mobile edge computing |
| Title |
|---|
| 石文玉;张蕊;: "边云协同计算中安全感知的工作流任务调度策略", 长春师范大学学报, no. 08, 20 August 2020 (2020-08-20)* |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN117992230A (en)* | 2024-02-21 | 2024-05-07 | 北京驭达科技有限公司 | A vehicle-mounted edge computing method and system based on autonomous learning |
| CN118939412A (en)* | 2024-07-11 | 2024-11-12 | 中国司法大数据研究院有限公司 | A delay-guaranteed cloud-edge collaborative optimization and balanced deployment method |
| CN119376955A (en)* | 2024-12-27 | 2025-01-28 | 中科边缘智慧信息科技(苏州)有限公司 | Computing resource evaluation method and system for mobile edge application scenarios |
| CN120256150A (en)* | 2025-06-06 | 2025-07-04 | 清华海峡研究院(厦门) | Computer resource configuration method and device for differentiated teaching scenarios |
| CN120256150B (en)* | 2025-06-06 | 2025-08-05 | 清华海峡研究院(厦门) | Computer resource allocation method and device for differentiated teaching scene |
| Publication number | Publication date |
|---|---|
| CN116647604B (en) | 2025-08-26 |
| Publication | Publication Date | Title |
|---|---|---|
| Chen et al. | Energy-efficient offloading for DNN-based smart IoT systems in cloud-edge environments | |
| Dong et al. | Quantum particle swarm optimization for task offloading in mobile edge computing | |
| CN116647604A (en) | A Computing Resource Scheduling Method Adapting to Dynamic Environments in Edge-to-Edge Collaboration Scenarios | |
| CN111953510B (en) | Smart grid slice wireless resource allocation method and system based on reinforcement learning | |
| Hoang et al. | Deep reinforcement learning-based online resource management for UAV-assisted edge computing with dual connectivity | |
| CN113242568A (en) | Task unloading and resource allocation method in uncertain network environment | |
| CN111835827A (en) | IoT edge computing task offloading method and system | |
| Yang et al. | Perllm: Personalized inference scheduling with edge-cloud collaboration for diverse llm services | |
| Cui et al. | Multiagent reinforcement learning-based cooperative multitype task offloading strategy for Internet of Vehicles in B5G/6G network | |
| Nath et al. | Multi-user multi-channel computation offloading and resource allocation for mobile edge computing | |
| Singh | Effective load balancing strategy using fuzzy golden eagle optimization in fog computing environment | |
| CN111711962B (en) | A method for coordinated scheduling of subtasks in mobile edge computing systems | |
| CN114340016A (en) | A method and system for offloading and distributing power grid edge computing | |
| CN116541106B (en) | Calculation task offloading method, computing device and storage medium | |
| Li et al. | A trade-off task-offloading scheme in multi-user multi-task mobile edge computing | |
| CN113747504A (en) | Method and system for multi-access edge computing combined task unloading and resource allocation | |
| CN115967990A (en) | A Classification and Prediction Based Edge-End Collaborative Service Offloading Method | |
| Li et al. | SFC-enabled reliable service provisioning in mobile edge computing via digital twins | |
| Chai et al. | A dynamic queuing model based distributed task offloading algorithm using deep reinforcement learning in mobile edge computing | |
| Mebrek et al. | Energy-efficient solution using stochastic approach for IoT-Fog-Cloud Computing | |
| Hussein et al. | Efficient Computation Offloading of IoT-Based Workflows Using Discrete Teaching Learning-Based Optimization. | |
| CN117395252A (en) | Cooperative game theory-based heterogeneous resource load balancing method | |
| Zhang | Task Offloading and Resource Allocation using Deep Reinforcement Learning | |
| Ji et al. | Intelligent Scheduling Strategies for Computing Power Resources in Heterogeneous Edge Networks | |
| Guo et al. | Multi-resource fair allocation for composited services in edge micro-clouds |
| 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 |