随着移动通信技术和互联网的快速发展,虚拟现实、增强现实和人脸识别等具有计算密集、时延敏感等特性的应用不断出现[1-2]。然而,由于终端设备在计算能力和电池寿命方面存在一定的局限性,导致它们难以支持上述应用[3]。受软件定义网络(Software Defined Network,SDN)和网络功能虚拟化(Network Function Virtualization,NFV)的驱动,移动云计算(Mobile Cloud Computing,MCC)技术应运而生,其允许用户将计算密集型任务卸载到资源丰富的远端云服务器执行,以缓解终端设备资源受限与高性能任务处理需求之间的冲突[4-5]。但是,在实际情况中,云服务器一般距离用户较远,云计算方案难以适用一些时延敏感的应用。为了解决这一问题,移动边缘计算(Mobile Edge Computing,MEC)技术被提出[6],它能够在靠近移动设备的网络边缘提供云资源,不仅可以满足时延敏感型应用的QoS需求,而且还在一定程度上降低了计算密集型应用所带来的网络负载和设备终端能耗[7-8]。
目前,已有学者针对MEC任务卸载与资源分配问题进行研究。文献[9]考虑信道状态和任务到达的随机性,研究MEC系统中能量效率与时延的权衡问题。文献[10]针对正交频分多址的移动边缘网络,设计一种基于计算能效的资源分配方案。文献[11]以最小化移动设备和MEC服务器的平均总功耗为目标,提出一种在线无线资源和计算资源管理算法。文献[12]引入能量和时延加权因子,提出一种能量感知的卸载方案。虽然上述研究在一定程度上降低了任务时延和系统能耗,但考虑的均是单MEC服务器场景下的资源分配问题,存在一定的局限性。在多服务器的MEC系统场景下,文献[13]提出一种以最小化服务成本、最大化服务终端数量为目标的任务卸载和资源分配算法,文献[14]以最小化设备能耗和任务时延为目标,提出一种两层博弈论的贪婪卸载方案,文献[15]研究任务卸载和资源分配的联合优化问题,以降低设备能耗为目标,分别设计基于分支界定算法的最优方案以及基于组合算法的次优方案,这些方案更适用于实际边缘计算网络场景。此外,文献[16-17]将MEC与能量收集技术相结合,研究卸载策略与资源分配问题。然而,上述基于平均值设计的MEC系统难以满足低时延、高可靠的业务需求。文献[18]虽然保证了用户低时延、高可靠的需求,但是其忽略了对MEC服务器计算资源的优化,从而提高了执行任务所消耗的功率成本并最终影响MEC的系统收益。
考虑到任务到达的随机性,本文建立一种任务队列动态调度模型。为了满足用户对时延和可靠性的需求,对任务队列施加概率约束并建立最大化MEC系统平均收益的资源优化模型。在此基础上,利用马尔科夫不等式[19]将概率混合优化问题转化为非概率优化问题,通过Lyapunov优化理论将不同时隙下的耦合优化问题转化为3个子问题并分别进行求解,以得到最优任务卸载与资源分配方案。
1 系统模型与问题建模 1.1 系统场景MEC系统场景如图 1所示,其由
|
Download:
|
| 图 1 移动边缘计算系统场景 Fig. 1 The system scenarios of mobile edge computing | |
假设每个用户都有一个队列缓冲区,存储到达但未处理的计算任务。在每个时隙内,用户计算任务的到达过程是独立同分布的,且平均到达率为
| $ {Q}_{i}(t+1)=\mathrm{m}\mathrm{a}\mathrm{x}\left\{{Q}_{i}\left(t\right)+{A}_{i}\left(t\right)-{D}_{{\mathit \Sigma} , i}\left(t\right), 0\right\} $ | (1) |
其中,
| $ {D}_{{\mathit \Sigma} , i}\left(t\right)=\frac{\tau {f}_{i}\left(t\right)}{{L}_{i}}+\sum \limits_{j\in S}R{}_{ij}(t) $ | (2) |
式(2)等号右侧的第一部分为用户本地处理的计算任务量,
| $ R{}_{ij}(t)={\xi }_{ij}(t)W\tau \mathrm{l}\mathrm{b}\left(1+\frac{{p}_{ij}\left(t\right){h}_{ij}\left(t\right)}{{\xi }_{ij}\left(t\right){N}_{0}W}\right) $ | (3) |
其中,
任务请求具有动态性,可能出现任务队列长度超出用户缓存空间的情况,从而导致数据包的丢失。因此,为了满足低时延、高可靠的任务需求,本文对用户队列长度添加概率约束[20],即:
| $ \underset{t\to \mathrm{\infty }}{\mathrm{l}\mathrm{i}\mathrm{m}}P\left({Q}_{i}\left(t\right)\ge {Q}_{i}^{\mathrm{m}\mathrm{a}\mathrm{x}}\right)\le {\varepsilon }_{i} $ | (4) |
其中,
每个MEC服务器中有多个队列缓冲区,可以同时存储多个用户卸载但尚未由MEC服务器处理的计算任务。本文定义MEC服务器
| $ {X}_{ji}(t+1)=\mathrm{m}\mathrm{a}\mathrm{x}\left\{{X}_{ji}\left(t\right)+{A}_{ji}\left(t\right)-\frac{\tau {f}_{ji}\left(t\right)}{{L}_{i}}, 0\right\} $ | (5) |
其中,
本文同样对MEC服务器任务队列长度添加概率约束,即:
| $ \underset{t\to \mathrm{\infty }}{\mathrm{l}\mathrm{i}\mathrm{m}}P\left({X}_{ji}\left(t\right)\ge {X}_{ji}^{\mathrm{m}\mathrm{a}\mathrm{x}}\right) <{\varepsilon }_{ji} $ | (6) |
其中,
由式(1)可得
| $ {D}_{i}=\underset{T\to \mathrm{\infty }}{\mathrm{l}\mathrm{i}\mathrm{m}}\frac{1}{T}\sum \limits_{t=0}^{T-1}E\left\{{D}_{{\mathit \Sigma} , i}\left(t\right)\right\} $ | (7) |
进一步定义MEC系统的时间平均收入为:
| $ \stackrel{-}{r}=\sum\limits _{i\in M}{\alpha }_{i}{D}_{i} $ | (8) |
其中,
由式(2)、式(3)可知,用户
| $ {p}_{i, \mathrm{c}\mathrm{o}\mathrm{m}\mathrm{p}}\left(t\right)=\kappa {\left[{f}_{i}\left(t\right)\right]}^{3} $ | (9) |
| $ {p}_{i, \mathrm{t}\mathrm{r}\mathrm{a}\mathrm{n}}\left(t\right)=\sum\limits_{j\in S}{p}_{ij}\left(t\right) $ | (10) |
其中,
| $ {p}_{i}=\underset{T\to \mathrm{\infty }}{\mathrm{l}\mathrm{i}\mathrm{m}}\frac{1}{T}\sum\limits_{t=0}^{T-1}\left\{{p}_{i, \mathrm{c}\mathrm{o}\mathrm{m}\mathrm{p}}\left(t\right)+{p}_{i, \mathrm{t}\mathrm{r}\mathrm{a}\mathrm{n}}\left(t\right)\right\} $ | (11) |
由式(5)可知,MEC服务器
| $ {p}_{j}\left(t\right)=\sum\limits_{i\in M}\kappa {\left[{f}_{ji}\left(t\right)\right]}^{3} $ | (12) |
则MEC服务器
| $ {p}_{j}=\underset{T\to \mathrm{\infty }}{\mathrm{l}\mathrm{i}\mathrm{m}}\frac{1}{T}\sum\limits_{t=0}^{T-1}E\left\{{p}_{j}\left(t\right)\right\} $ | (13) |
基于上述用户和MEC服务器的时间平均功耗,可定义用户和MEC服务器的时间平均功率消耗成本分别为:
| $ {\stackrel{-}{c}}_{u}=\beta \sum\limits_{i\in M}{p}_{i} $ | (14) |
| $ {\stackrel{-}{c}}_{m}=\gamma \sum\limits_{j\in S}{p}_{j} $ | (15) |
其中,
本文设计一种联合功率、带宽以及计算资源的分配算法,以在满足低时延、高可靠业务需求的同时最大化MEC系统的时间平均收益。时间平均收益指系统中所有用户任务的时间平均收入与用户和MEC服务器时间功率消耗成本的差值,其优化模型如下:
| $ \begin{array}{l}\mathrm{P}1:\underset{p, f, \xi }{\mathrm{m}\mathrm{a}\mathrm{x}}\mathrm{ }(\stackrel{-}{r}-{\stackrel{-}{c}}_{u}-{\stackrel{-}{c}}_{m})\\ \mathrm{s}.\mathrm{t}.\;\;\;\mathrm{C}1:0\le {f}_{i}\left(t\right)\le {f}_{i}^{\mathrm{m}\mathrm{a}\mathrm{x}}, \forall i\in M\\ \begin{array}{cc}& \mathrm{ }\mathrm{C}2:\sum\limits_{j\in S}{p}_{ij}\left(t\right)\le {p}_{i}^{\mathrm{m}\mathrm{a}\mathrm{x}}, \forall i\in M\end{array}\\ \begin{array}{cc}& \mathrm{ }\mathrm{C}3:{p}_{ij}\left(t\right)\ge 0, \forall i\in M\end{array}, \forall j\in S\\ \begin{array}{cc}& \mathrm{ }\mathrm{C}4:\sum\limits_{i\in M}{\xi }_{ij}\left(t\right)\le 1, \end{array}\forall j\in S\\ \begin{array}{cc}& \mathrm{ }\mathrm{C}5:0 <{\xi }_{ij}\left(t\right)\le 1, \end{array}\forall i\in M, \forall j\in S\\ \begin{array}{cc}& \mathrm{ }\mathrm{C}6:\sum\limits_{i\in M}\left\{{f}_{ji}\left(t\right)>0\right\}\le N, \end{array}\forall j\in S\\ \begin{array}{cc}& \mathrm{ }\mathrm{C}7:0\le {f}_{ji}\left(t\right)\le {f}_{ji}^{\mathrm{m}\mathrm{a}\mathrm{x}}, \end{array}\forall i\in M, \forall j\in S\mathrm{ }\mathrm{ }\mathrm{ }\\ \begin{array}{cc}& \mathrm{ }\mathrm{C}8:\end{array}\underset{t\to \mathrm{\infty }}{\mathrm{l}\mathrm{i}\mathrm{m}}P\left({Q}_{i}\left(t\right)\ge {Q}_{i}^{\mathrm{m}\mathrm{a}\mathrm{x}}\right)\le {\varepsilon }_{i}, \forall i\in M\\ \begin{array}{cc}& \mathrm{ }\mathrm{C}9:\underset{t\to \mathrm{\infty }}{\mathrm{l}\mathrm{i}\mathrm{m}}P\left({X}_{ji}\left(t\right)\ge {X}_{ji}^{\mathrm{m}\mathrm{a}\mathrm{x}}\right)<{\varepsilon }_{ji}\end{array}, \forall i\in M, \forall j\in S\end{array} $ | (16) |
约束条件说明:
由上述优化模型可得问题
定义1 (马尔科夫不等式) 若
利用定义1可将约束
| $ \mathrm{C}{8}^{\text{'}}:\overline{{Q}_{i}}=\underset{T\to \mathrm{\infty }}{\mathrm{l}\mathrm{i}\mathrm{m}}\frac{1}{T}\sum\limits_{t=1}^{T}E\left\{{Q}_{i}\left(t\right)\right\}\le {Q}_{i}^{\mathrm{m}\mathrm{a}\mathrm{x}}\cdot {\varepsilon }_{i} $ | (17) |
| $ \mathrm{C}{9}^{\text{'}}:\overline{{X}_{ji}}=\underset{T\to \mathrm{\infty }}{\mathrm{l}\mathrm{i}\mathrm{m}}\frac{1}{T}\sum\limits_{t=1}^{T}E\left\{{X}_{ji}\left(t\right)\right\}\le {Q}_{ji}^{\mathrm{m}\mathrm{a}\mathrm{x}}\cdot {\varepsilon }_{ji} $ | (18) |
其中,
本文引入虚拟队列
| $ {Y}_{i}(t+1)=\mathrm{m}\mathrm{a}\mathrm{x}\left\{{Y}_{i}\left(t\right)+{Q}_{i}(t+1)-{Q}_{i}^{\mathrm{m}\mathrm{a}\mathrm{x}}\cdot {\varepsilon }_{i}, 0\right\} $ | (19) |
| $ {Z}_{ji}(t+1)=\mathrm{m}\mathrm{a}\mathrm{x}\left\{{Z}_{ji}\left(t\right)+{X}_{ji}(t+1)-{X}_{ji}^{\mathrm{m}\mathrm{a}\mathrm{x}}\cdot {\varepsilon }_{ji}, 0\right\} $ | (20) |
在
| $ L\left(\mathit{\boldsymbol{ \boldsymbol{\varTheta} }}\left(t\right)\right)=\frac{1}{2}\left[\sum\limits_{i=1}^{M}{\left({Y}_{i}\left(t\right)\right)}^{2}+\sum\limits_{j=1}^{S}\sum\limits_{i=1}^{M}{\left({Z}_{ji}\left(t\right)\right)}^{2}\right] $ | (21) |
式(21)表征了系统中的队列拥塞程度,函数值越大,队列越长,相应的用户任务处理等待时间就越长。因此,为了缩短用户的等待时延,保持系统的稳定性,本文定义单时隙Lyapunov偏移为:
| $ \mathrm{\Delta }\left(\mathit{\boldsymbol{ \boldsymbol{\varTheta} }}\left(t\right)\right)=E\left\{L\left(\mathit{\boldsymbol{ \boldsymbol{\varTheta} }}(t+1)\right)-L\left(\mathit{\boldsymbol{ \boldsymbol{\varTheta} }}\left(t\right)\right)\left|\mathit{\boldsymbol{ \boldsymbol{\varTheta} }}\right(t)\right\} $ | (22) |
在优化理论中,Lyapunov偏移通常用来进行资源分配策略选择,为其添加一个加权代价函数,从而得到Lyapunov偏移加罚。本文的Lyapunov偏移加罚定义为单时隙Lyapunov偏移与该时隙MEC系统时间平均收益期望的加权差,即:
| $ \begin{array}{l}\mathrm{\Delta }\left(\mathit{\boldsymbol{ \boldsymbol{\varTheta} }}\left(t\right)\right)-VE\left\{\stackrel{-}{r}-{\stackrel{-}{c}}_{u}-{\stackrel{-}{c}}_{m}\left|\mathit{\boldsymbol{ \boldsymbol{\varTheta} }}\left(t\right)\right.\right\}\le \\ \zeta -E\left\{\sum\limits_{i\in M}\left[{Q}_{i}\left(t\right)+{Y}_{i}\left(t\right)\right]{D}_{\mathrm{\Sigma }, i}\left(t\right)\left|\mathit{\boldsymbol{ \boldsymbol{\varTheta} }}\left(t\right)\right.\right\}+\\ E\left\{\sum\limits_{i\in M}\sum\limits_{j\in S}\left\{\left[\left({X}_{ji}\left(t\right)+{Z}_{ji}\left(t\right)\right){R}_{ij}\left(t\right)\right]-\right.\right.\\ \left.\left.\left[\left({X}_{ji}\left(t\right)+{Z}_{ji}\left(t\right)\right){D}_{ji}\left(t\right)\right]\right\}\left|\mathit{\boldsymbol{ \boldsymbol{\varTheta} }}\left(t\right)\right.\right\}-\\ VE\left\{\stackrel{-}{r}-{\stackrel{-}{c}}_{u}-{\stackrel{-}{c}}_{m}\left|\mathit{\boldsymbol{ \boldsymbol{\varTheta} }}\left(t\right)\right.\right\}\end{array} $ | (23) |
其中,
进一步将问题
| $ \begin{array}{l}\mathrm{P}2:\mathrm{ }\underset{p, f, \xi }{\mathrm{m}\mathrm{i}\mathrm{n}}\mathrm{ }\sum\limits_{i=1}^{M}\left[V\beta \kappa {\left[{f}_{i}\left(t\right)\right]}^{3}-{\mathit \Phi }_{i}\left(t\right)\frac{\tau {f}_{i}\left(t\right)}{{L}_{i}}\right]+\\ \mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\sum\limits_{i=1}^{M}\sum\limits_{j=1}^{S}\left[V\beta {p}_{ij}\left(t\right)-\left({\mathit \Phi }_{i}\left(t\right)-{\mathit \Psi }_{ji}\left(t\right)\right)R{}_{ij}(t)\right]+\\ \mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\sum\limits_{j=1}^{S}\sum\limits_{i=1}^{M}\left[V\gamma \kappa {\left[{f}_{ji}\left(t\right)\right]}^{3}-{\mathit \Psi }_{ji}\left(t\right)\frac{\tau {f}_{ji}\left(t\right)}{{L}_{i}}\right]\\ \mathrm{s}.\mathrm{t}.\;\;\;\;\mathrm{C}1\sim\mathrm{C}7\end{array} $ | (24) |
在优化问题
由文献[11, 21]可知,问题
根据式(24)可得用户本地计算资源分配问题如下:
| $ \begin{array}{l}\mathrm{P}2.1:\mathrm{ }\underset{\boldsymbol{f}}{\mathrm{m}\mathrm{i}\mathrm{n}}\sum\limits_{i=1}^{M}\left\{V\beta \kappa {\left[{f}_{i}\left(t\right)\right]}^{3}-{\mathit \Phi }_{i}\left(t\right)\frac{\tau {f}_{i}\left(t\right)}{{L}_{i}}\right\}\\ \mathrm{s}.\mathrm{t}.\mathrm{ }\;\;\;\;\mathrm{C}1:0\le {f}_{i}\left(t\right)\le {f}_{i}^{\mathrm{m}\mathrm{a}\mathrm{x}}, \forall i\in M\end{array} $ | (25) |
从式(25)可以看出,问题
| $ {f}_{i}^{\mathrm{*}}\left(t\right)=\mathrm{m}\mathrm{i}\mathrm{n}\left\{\sqrt{\frac{{\mathit \Phi }_{i}\left(t\right)\tau }{3V\beta \kappa {L}_{i}}}, {f}_{i}^{\mathrm{m}\mathrm{a}\mathrm{x}}\right\} $ | (26) |
与无线资源相关的系统决策包括任务卸载的发射功率分配和带宽分配,因为两者为常数,所以难以适应时变的系统状态[11],因此,本文对问题
| $ \mathrm{C}{5}^{\text{'}}:\delta <{\xi }_{ij}\left(t\right)\le 1, \forall i\in M, \forall j\in S $ | (27) |
其中,
| $ \begin{array}{l}\mathrm{P}2.2\mathrm{ }:\mathrm{ }\mathrm{ }\underset{p, \xi }{\mathrm{m}\mathrm{i}\mathrm{n}}\sum\limits_{i=1}^{M}\sum\limits_{j=1}^{S}\left[V\beta {p}_{ij}\left(t\right)-\left({\mathit \Phi }_{i}\left(t\right)-{\mathit \Psi }_{ji}\left(t\right)\right){R}_{ij}\left(t\right)\right]\\ \mathrm{s}.\mathrm{t}.\;\;\;\;\mathrm{C}2:\sum\limits_{j\in S}{p}_{ij}\left(t\right)\le {p}_{i}^{\mathrm{m}\mathrm{a}\mathrm{x}}, \forall i\in M\\ \begin{array}{cc}& \mathrm{ }\mathrm{C}3:{p}_{ij}\left(t\right)\ge 0, \forall i\in M\end{array}, \forall j\in S\\ \begin{array}{cc}& \mathrm{ }\mathrm{C}4:\sum\limits_{i\in M}{\xi }_{ij}\left(t\right)\le 1, \end{array}\forall j\in S\\ \begin{array}{cc}& \mathrm{ }\mathrm{C}{5}^{\text{'}}:\delta <{\xi }_{ij}\left(t\right)\le 1, \end{array}\forall i\in M, \forall j\in S\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\end{array} $ | (28) |
当
当
| $ \begin{array}{l}\mathrm{P}2.{2}^{\text{'}}:\mathrm{ }\mathrm{ }\underset{p, \xi }{\mathrm{m}\mathrm{i}\mathrm{n}}\sum\limits_{i\in \tilde{M}\left(t\right)}\left[V\beta {p}_{ij}\left(t\right)\mathrm{ }-\left({\mathit \Phi }_{i}\left(t\right)\mathrm{ }-{\mathit \Psi }_{ji}\left(t\right)\right){R}_{ij}\left(t\right)\right]\\ \mathrm{s}.\mathrm{t}.\;\;\;\;\mathrm{C}2:{p}_{ij}\left(t\right)\le {p}_{i}^{\mathrm{m}\mathrm{a}\mathrm{x}}, \forall i\in \tilde{M}\left(t\right), \forall j\in S\\ \mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\begin{array}{cc}\mathrm{C}3:{p}_{ij}\left(t\right)\ge 0, \forall i\in \tilde{M}\left(t\right), \forall j\in S, & \end{array}\\ \begin{array}{cc}\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{C}{4}^{\text{'}}:\sum\limits_{i\in \tilde{M}\left(t\right)}{\xi }_{ij}\left(t\right)\le 1-{M}^{\text{'}}\left(t\right)\delta , \forall j\in S& \end{array}\\ \begin{array}{cc}\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{C}{5}^{\text{'}}:{\xi }_{ij}\left(t\right)>\delta , \forall i\in \tilde{M}\left(t\right), \forall j\in S& \end{array}\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\end{array} $ | (29) |
子问题
给定带宽分配比例,用户的功率资源分配问题可表示为:
| $ \begin{array}{l}\mathrm{P}2.{2}^{\text{'}}.1:\mathrm{ }\mathrm{ }\underset{p}{\mathrm{m}\mathrm{i}\mathrm{n}}\sum\limits_{i\in \mathrm{ }\tilde{M}\left(t\right)}\left[V\beta {p}_{ij}\left(t\right)\mathrm{ }-\left({\mathit \Phi }_{i}\left(t\right)\mathrm{ }-{\mathit \Psi }_{ji}\left(t\right)\right){R}_{ij}\left(t\right)\right]\\ \mathrm{s}.\mathrm{t}.\;\;\;\;\mathrm{C}2:{p}_{ij}\left(t\right)\mathrm{ }\le \mathrm{ }{p}_{i}^{\mathrm{m}\mathrm{a}\mathrm{x}}, \forall i\mathrm{ }\in \mathrm{ }\tilde{M}\left(t\right), \forall j\in S\\ \begin{array}{cc}& \mathrm{ }\mathrm{C}3:{p}_{ij}\left(t\right)\mathrm{ }\ge \mathrm{ }0, \forall i\mathrm{ }\in \mathrm{ }\tilde{M}\left(t\right)\end{array}, \forall j\in S\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\end{array} $ | (30) |
类似于问题
| $ \begin{array}{l}{p}_{ij}^{\mathrm{*}}\left(t\right)=\mathrm{m}\mathrm{i}\mathrm{n}\\ \left\{\mathrm{m}\mathrm{a}\mathrm{x}\left\{\frac{\left[{\mathit \Phi }_{i}\left(t\right)-{\mathit \Psi }_{ji}\left(t\right)\right]\tau {\xi }_{ij}\left(t\right)W}{V\beta \mathrm{l}\mathrm{n}\mathrm{ }2}-\frac{{\xi }_{ij}\left(t\right){N}_{0}W}{{h}_{ij}\left(t\right)}, 0\right\}, {p}_{i}^{\mathrm{m}\mathrm{a}\mathrm{x}}\right\}, \\ i\in \tilde{M}\left(t\right)\end{array} $ | (31) |
给定功率分配方案,用户的带宽资源分配问题可表示为:
| $ \begin{array}{l}\mathrm{P}2.{2}^{\text{'}}.2:\mathrm{ }\underset{\xi }{\mathrm{m}\mathrm{i}\mathrm{n}}\sum\limits_{i\in \tilde{M}\left(t\right)}\left[-\left({\mathit \Phi }_{i}\left(t\right)-{\mathit \Psi }_{ji}\left(t\right)\right){R}_{ij}\left(t\right)\right]\\ \mathrm{s}.\mathrm{t}.\;\;\;\mathrm{C}{4}^{\text{'}}:\sum\limits_{i\in \tilde{M}\left(t\right)}{\xi }_{ij}\left(t\right)\le 1-{M}^{\text{'}}\left(t\right)\delta , \forall j\in S\\ \begin{array}{cc}& \mathrm{ }\mathrm{C}{5}^{\text{'}}:{\xi }_{ij}\left(t\right)>\delta , \end{array}\forall i\in \tilde{M}\left(t\right)\mathrm{ }, \forall j\in S\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\end{array} $ | (32) |
子问题
| $ \begin{array}{l}L(\xi , \mu )=\sum\limits_{i\in \tilde{M}\left(t\right)}\left[-\left({\mathit \Phi }_{i}\left(t\right)-{\mathit \Psi }_{ji}\left(t\right)\right){R}_{ij}\left(t\right)\right]+\\ \mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mu \left(\sum\limits_{i\in \tilde{M}\left(t\right)}{\xi }_{ij}\left(t\right)-(1-{M}^{\text{'}}(t\left)\delta \right)\right)\end{array} $ | (33) |
其中,
| $ -\left({\mathit \Phi }_{i}\left(t\right)-{\mathit \Psi }_{ji}\left(t\right)\right)\frac{\mathrm{d}{R}_{ij}\left(t\right)}{\mathrm{d}{\xi }_{ij}\left(t\right)}+\mu =0 $ | (34) |
定义
| $ \left\{\begin{array}{l}\sum\limits_{i\in \tilde{M}\left(t\right)}{\xi }_{ij}^{\mathrm{*}}\left(t\right)=\left(1-{M}^{\text{'}}\left(t\right)\delta \right)\\ {\xi }_{ij}^{\mathrm{*}}\left(t\right)=\mathrm{m}\mathrm{a}\mathrm{x}\left\{\delta , {G}_{i}\left({\mu }^{\mathrm{*}}\right)\right\}\\ {\mu }^{\mathrm{*}}\ge 0\\ \mu \left[\sum\limits_{i\in \tilde{M}\left(t\right)}{\xi }_{ij}^{\mathrm{*}}\left(t\right)-\left(1-{M}^{\text{'}}\left(t\right)\delta \right)\right]=0\end{array}\right. $ | (35) |
由式(35)可知,
| $ {\mu }_{\mathrm{m}\mathrm{i}\mathrm{n}}=\underset{i\in \tilde{M}\left(t\right)}{\mathrm{m}\mathrm{a}\mathrm{x}}\left({\mathit \Phi }_{i}\left(t\right)-{\mathit \Psi }_{ji}\left(t\right)\right)\frac{\mathrm{d}{R}_{ij}\left(t\right)}{\mathrm{d}{\xi }_{ij}\left(t\right)}\left|{}_{{\xi }_{ij}\left(t\right)=1-{M}^{\text{'}}\left(t\right)\delta }\right. $ | (36) |
| $ {\mu }_{\mathrm{m}\mathrm{a}\mathrm{x}}=\underset{i\in \tilde{M}\left(t\right)}{\mathrm{m}\mathrm{a}\mathrm{x}}\left({\mathit \Phi }_{i}\left(t\right)-{\mathit \Psi }_{ji}\left(t\right)\right)\frac{\mathrm{d}{R}_{ij}\left(t\right)}{\mathrm{d}{\xi }_{ij}\left(t\right)}\left|{}_{{\xi }_{ij}\left(t\right)=\delta }\right. $ | (37) |
进一步利用二分搜索法得到
根据式(24)可以得到MEC服务器的计算资源分配问题,如下:
| $ \begin{array}{l}\mathrm{P}2.3:\mathrm{ }\underset{f}{\mathrm{m}\mathrm{i}\mathrm{n}}\sum\limits_{j=1}^{S}\sum\limits_{i=1}^{M}\left\{V\gamma \kappa {\left[{f}_{ji}\left(t\right)\right]}^{3}-{\mathit \Psi }_{ji}\left(t\right)\frac{\tau {f}_{ji}\left(t\right)}{{L}_{i}}\right\}\\ \mathrm{s}.\mathrm{t}.\;\;\;\mathrm{C}6:\sum\limits_{i\in M}\left\{{f}_{ji}\left(t\right)>0\right\}\le N, \forall j\in S\mathrm{ }\mathrm{ }\mathrm{ }\\ \begin{array}{cc}& \mathrm{ }\mathrm{C}7:0\le {f}_{ji}\left(t\right)\le {f}_{ji}^{\mathrm{m}\mathrm{a}\mathrm{x}}, \end{array}\forall i\in M, \forall j\in S\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\mathrm{ }\end{array} $ | (38) |
由于约束条件
算法1 MEC服务器计算资源分配算法
1.初始化:MEC服务器CPU核数
2.在时隙
3.for
4.for
5.
6.更新
7.end for
8.end for
9.if
10.得到MEC服务器计算资源分配的最优解
11.else
12.while
13.
14.
15.end while
16.得到MEC服务器计算资源分配方案
17.end if
3.4 本文算法描述结合3.1节~3.3节的分析,基于Lyapunov的任务卸载与资源分配算法描述如算法2所示。该算法是一个2层迭代算法:外层循环是移动边缘计算系统内的用户队列、MEC服务器队列以及虚拟队列的更新;内层循环是对任务卸载与资源分配的3个子问题求解。
算法2 基于Lyapunov的任务卸载与资源分配算法
1.初始化:
1)用户任务队列
2)时间因子
2.for
3.根据式(26)得到用户本地计算资源分配方案
4.while
5.根据式(31)得到功率分配方案
6.基于功率分配方案,利用二分搜索法得到带宽分配方案进而更新
7.end while
8.执行算法1得到MEC服务器计算资源分配方案
9.输出当前时隙的资源调度方案
10.end for
4 仿真结果与分析为了验证本文所提算法的有效性,在一个
|
下载CSV 表 1 仿真参数设置 Table 1 Simulation parameters setting |
图 2所示为用户数为40时MEC系统时间平均收益随控制参数V的变化情况。从图 2可以看出,时间平均收益随控制参数V的增加而逐渐增大并趋于平稳,这是因为在Lyapunov优化过程中,控制参数V越大,则系统越倾向于优化罚函数,即系统时间平均收益,该结果验证了本文所提算法的有效性。
|
Download:
|
| 图 2 系统时间平均收益和控制参数V的关系 Fig. 2 The relationship between system time average profit and control parameter V | |
图 3所示为不同算法下任务到达率与系统时间平均收益的关系。从图 3可以看出,系统时间平均收益随着任务到达率的增大而增大,而且对于任意任务到达率,本文算法在所有算法中收益最高。这是因为本文综合考虑功率、带宽资源以及计算资源并进行优化,能在满足用户QoS需求的同时合理地分配任务资源。
|
Download:
|
| 图 3 系统时间平均收益和任务到达率的关系 Fig. 3 The relationship between system time average profit and task arrival rate | |
从图 4可以看出,本文算法相比其他3种算法平均端到端时延更短,说明本文算法在当前业务激增的网络环境下具有较好的时延性能。此外,Fully-MEC算法相比其他算法平均端到端时延最长,这是因为其他3种算法考虑了用户本地执行,在一定程度上缩短了时延。
|
Download:
|
| 图 4 平均端到端时延和任务到达率的关系 Fig. 4 The relationship between average end-to-end delay and task arrival rate | |
图 5所示为不同算法下系统时间平均收益与用户数的关系,从图 5可以看出,4种算法的系统时间平均收益都随用户数的增加而增加,但是当用户数大于40后,收益的增长速率变缓。由于本文算法在分配带宽资源时根据用户实际需求动态分配而非均等划分,提高了系统任务的收入,另一方面,该算法根据任务队列状态对MEC服务器的计算资源进行分配,提高了资源利用率,节约了系统成本。因此,本文算法在系统时间平均收益上明显优于其他3种算法。
|
Download:
|
| 图 5 系统时间平均收益与用户数的关系 Fig. 5 The relationship between system time average profit and the number of users | |
由于队列长度是评估用户时延和数据可靠性的关键因素,因此本文对任务队列长度的互补累积分布函数(CCDF)进行仿真,并将本文算法与LRA-TORA和OJ-TORA算法进行对比。当任务到达率为3 kb/slot时,定义用户队列阈值和MEC服务器队列阈值分别为
|
Download:
|
| 图 6 3种算法的任务队列长度CCDF对比 Fig. 6 Comparison of task queue length CCDF of three algorithms | |
本文基于Lyapunov优化理论,提出一种最大化MEC系统时间平均收益的任务卸载与资源分配算法。该算法在多MEC服务器多用户系统模型下,建立任务队列动态调度模型并为队列施加概率约束,在保证用户时延和可靠性需求的同时对无线资源和计算资源实现联合分配。同时,利用马尔科夫不等式以及Lyapunov优化理论将优化问题转化为3个子问题并进行求解。仿真结果表明,该算法在时延、可靠性以及系统收益方面均具有较好的性能表现。下一步将对动态场景下的任务卸载与资源分配问题进行研究。
| [1] |
MACH P, BECVAR Z. Mobile edge computing: a survey on architecture and computation offloading[J]. IEEE Communications Surveys & Tutorials, 2017, 19(3): 1628-1656. |
| [2] |
MAO Yuyi, YOU Changsheng, ZHANG Jun, et al. A survey on mobile edge computing: the communication perspective[J]. IEEE Communications Surveys & Tutorials, 2017, 19(4): 2322-2358. |
| [3] |
RODRIGUEZ N V, CROWCROFT J. Energy management techniques in modern mobile handsets[J]. IEEE Commu-nications Surveys & Tutorials, 2013, 15(1): 179-198. |
| [4] |
JARARWEH Y, DOULAT A, ALQUDAH O, et al.The future of mobile cloud computing: integrating cloudlets and mobile edge computing[C]//Proceedings of 2016 International Conference on Telecommunications.Washington D.C., USA: IEEE Press, 2016: 1-5.
|
| [5] |
LI Yun, XIA Shichao, ZHENG Mengyan, et al. Lyapunov optimization based trade-off policy for mobile cloud offloading in heterogeneous wireless networks[J]. IEEE Transactions on Cloud Computing, 2019, 42(9): 15-26. |
| [6] |
ETSI GS MEC 001-2016.Mobile Edge Computing (MEC): terminology[EB/OL].[2020-04-20].https://www.etsi.org/deliver/etsi_gs/MEC/001_099/001/01.01.01_60/gs_MEC001v010101p.pdf.
|
| [7] |
ABBAS N, ZHANG Y, TAHERKORDI A, et al. Mobile edge computing: a survey[J]. IEEE Internet of Things Journal, 2018, 5(1): 450-465. DOI:10.1109/JIOT.2017.2750180 |
| [8] |
TRAN T X, HAJISAMI A, PANDEY P, et al. Collaborative mobile edge computing in 5G networks: new paradigms, scenarios, and challenges[J]. IEEE Communications Magazine, 2017, 55(4): 54-61. DOI:10.1109/MCOM.2017.1600863 |
| [9] |
MAO S, LENG S, MAHARJAN S, et al. Energy efficiency and delay tradeoff for wireless powered mobile-edge computing systems with multi-access schemes[J]. IEEE Transactions on Wireless Communications, 2020, 19(3): 1855-1867. DOI:10.1109/TWC.2019.2959300 |
| [10] |
WU Yuhang, WANG Yuhao, ZHOU Fuhui, et al. Computation efficiency maximization in OFDMA-based mobile edge computing networks[J]. IEEE Communications Letters, 2019, 24(1): 159-163. |
| [11] |
MAO Yuyi, ZHANG Jun, SONG Shihang, et al. Stochastic joint radio and computational resource management for multi-user mobile-edge computing systems[J]. IEEE Transactions on Wireless Communications, 2017, 16(9): 5994-6009. DOI:10.1109/TWC.2017.2717986 |
| [12] |
ZHANG Jiao, HU Xiping, NING Zhaolong, et al. Energy-latency tradeoff for energy-aware offloading in mobile edge computing networks[J]. IEEE Internet of Things Journal, 2017, 5(4): 2633-2645. |
| [13] |
DU Wei, LEI Tao, HE Qiang, et al.Service capacity enhanced task offloading and resource allocation in multi-server edge computing environment[C]//Proceedings of 2019 IEEE International Conference on Web Services.Washington D.C., USA: IEEE Press, 2019: 83-90.
|
| [14] |
GUO Hongzhi, ZHANG Jie, LIU Jiajia, et al. Mobile-edge computation offloading for ultradense IoT networks[J]. IEEE Internet of Things Journal, 2018, 5(6): 4977-4988. DOI:10.1109/JIOT.2018.2838584 |
| [15] |
YANG Xiaotong, YU Xueyong, HUANG Hao, et al. Energy efficiency based joint computation offloading and resource allocation in multi-access MEC systems[J]. IEEE Access, 2019, 7: 117054-117062. DOI:10.1109/ACCESS.2019.2936435 |
| [16] |
ZHANG Guanglin, ZHANG Wenqian, CAO Yu, et al. Energy-delay tradeoff for dynamic offloading in mobile-edge computing system with energy harvesting devices[J]. IEEE Transactions on Industrial Informatics, 2018, 14(10): 4642-4655. DOI:10.1109/TII.2018.2843365 |
| [17] |
ZHANG Z C, YU F R, FU F, et al.Joint offloading and resource allocation in mobile edge computing systems: an actor-critic approach[C]//Proceedings of 2018 IEEE Global Communications Conference.Washington D.C., USA: IEEE Press, 2018: 1-6.
|
| [18] |
LIU C F, BENNIS M, POOR H V.Latency and reliability-aware task offloading and resource allocation for mobile edge computing[EB/OL].[2020-04-20].https://arxiv.org/pdf/1710.00590.pdf.
|
| [19] |
LI Chao, LI Bo, DING Hongwei, et al. Design and implementation of tactical data link protocol based on FPGA[J]. Computer Engineering, 2020, 46(10): 173-181. (in Chinese) 李超, 李波, 丁洪伟, 等. 基于FPGA的战术数据链协议设计与实现[J]. 计算机工程, 2020, 46(10): 173-181. |
| [20] |
ASHRAF M I, LIU C F, BENNIS M, et al.Towards low-latency and ultra-reliable vehicle-to-vehicle communication[EB/OL].[2020-04-20].https://arxiv.org/pdf/1704.06894.pdf.
|
| [21] |
WANG Xinhou, WANG Kezhi, WU Song, et al. Dynamic resource scheduling in mobile edge cloud with cloud radio access network[J]. IEEE Transactions on Parallel and Distributed Systems, 2018, 29(11): 2429-2445. DOI:10.1109/TPDS.2018.2832124 |
| [22] |
WANG Yue, TAO Xiaofeng, ZHANG Xuefei, et al. Cooperative task offloading in three-tier mobile computing networks: an ADMM framework[J]. IEEE Transactions on Vehicular Technology, 2019, 68(3): 2763-2776. DOI:10.1109/TVT.2019.2892176 |
2021, Vol. 47
