Method of multi-access edge computing task offloading based on D2D in internet of vehicles (IoV) environment

11627528 · 2023-04-11

Assignee

Inventors

Cpc classification

International classification

Abstract

The present disclosure discloses a method of multi-access edge computing task offloading based on D2D in IoV environment, which models a task offloading strategy, a transmission power and a channel resource allocation mode as a mixed integer nonlinear programming problem, wherein an optimization problem is to maximize the sum of time delay and energy consumption benefits of all CUE in cellular communication with a base station in the IoV system. This method has low time complexity, may effectively utilize channel resources of the IoV system, and ensures the delay reliability of the DUE for which the local V2V data exchange is performed in the form of D2D communication. In the meantime, the time delay and energy consumption of CUE are both close to the minimum, thus meeting the IoV requirements of low time delay and high reliability.

Claims

1. A method of multi-access edge computing task offloading based on D2D in Internet Of Vehicle (IoV) environment, which applies to an edge computing server deployed near a single base station, wherein the base station adopts an OFDMA access mode and has a certain number of cellular users (CUEs) and D2D users (DUEs) in its coverage area; the CUEs communicates with the base station; local data exchange is performed between the DUEs in the form of D2D; and the DUEs multiplex CUE channels, causing communication interference between the CUEs and the DUEs; wherein, the method comprises: receiving, task requests generated by the CUEs, from the CUEs and performing operations, by the edge computing server, comprising: S1, modeling an optimization problem of maximizing the sum of time delay and energy consumption benefit, wherein the benefit is defined as a ratio of a difference between the local execution cost and the actual execution cost to the local execution cost, the cost represents the time delay or energy consumption, and the optimization problem is equivalent to the problem of minimizing the sum of time delay and energy consumption; S2, decomposing the optimization problem into two sub-optimization problems comprising a sub-optimization problem of a task offloading strategy, and a sub-optimization problem of transmission power and a channel resource allocation mode; and wherein the sub-optimization problem of the task offloading strategy is independent from that of the transmission power and channel resource allocation mode; S3, determining feasible regions of CUE and DUE powers based on a known D2D time delay reliability limit condition and power limit conditions of the CUEs and the DUEs, and computing optimal transmission powers of the CUEs and the DUEs using a linear programming; S4, computing an optimal channel resource allocation mode by using a bipartite matching algorithm to solve a problem of maximum weight matching in bipartite; and S5, computing optimal task offloading strategies of the CUEs by using dynamic programming to solve a knapsack problem; and S6, transmitting the optimal task offloading strategies to corresponding CUEs; receiving, by the CUEs, their respective optimal task offloading strategies, from the edge computing server; and executing the task generated by the CUEs by the corresponding CUEs, or offloading the task generated by the CUEs to the edge computing server by the corresponding CUEs, based on their respective optimal task offloading strategies.

2. The method of multi-access edge computing task offloading based on D2D in IoV environment according to claim 1, wherein in S1, signal-to-noise ratios of the m.sup.th CUE and the k.sup.th pair of DUEs received by the base station are respectively: γ m = p m h m , B σ 2 + .Math. k K ρ m , k p k h k , B and γ k = p k h k σ 2 + .Math. m M ρ m , k p m h m , k wherein M is a number of the CUEs, m represents the m.sup.th CUE, a number of the DUEs is K pairs, and k represents the k.sup.th pair of DUEs; a channel allocated for the m.sup.th CUE is multiplexed by the k.sup.th pair of DUEs, and B is a total bandwidth of the base station; p.sub.m and p.sub.k represent transmission powers of the m.sup.th CUE and k.sup.th pair of DUEs respectively, h.sub.m,B is a channel gain between the m.sup.th CUE and the base station, h.sub.k,B is a channel gain between the k.sup.th pair of DUEs and the base station, h.sub.k is a channel gain between the k.sup.th pair of DUEs, h.sub.m,k is a channel gain between the m.sup.th CUE and the k.sup.th pair of DUEs, σ.sup.2 is a noise power, ρ.sub.m,k is a channel resource allocation mode, ρ.sub.m,k=1 indicates that the k.sup.th pair of DUEs multiplexes a channel of the m.sup.th CUE, and ρ.sub.m,k=0 indicates that the k.sup.th pair of DUEs does not multiplex the channel of the m.sup.th CUE; the channel gains only take into consideration large-scale gains which comprise:
h.sub.m,B=β.sub.m,BAL.sub.m,B.sup.−γ
h.sub.k,B=β.sub.k,BAL.sub.k,B.sup.−γ
h.sub.k=β.sub.kAL.sub.k.sup.−γ
h.sub.m,k=β.sub.m,kAL.sub.m,k.sup.−γ wherein β.sub.m,B is shadowing fading between the m.sup.th CUE and the base station, β.sub.k,B is shadowing fading between the k.sup.th pair of DUEs and the base station, β.sub.k is shadowing fading between the k.sup.th pair of DUEs, β.sub.m,k is shadowing fading between the m.sup.th CUE and the k.sup.th pair of DUEs, L.sub.m,B is a distance between the m.sup.th CUE and the base station, L.sub.k,B is a distance between the k.sup.th pair of DUEs and the base station, L.sub.k is a distance between the k.sup.th pair of DUEs, L.sub.k is proportional to vehicle speed v, L.sub.m,k is a distance between the m.sup.th CUE and the k.sup.th pair of DUEs, γ is an attenuation factor, and A is a path loss constant; the benefits are: v m ( s m , p m , p k , ρ m , k ) = s m ( β t t m loc - t m off t m loc + β e e m loc - e m off e m loc ) wherein, s.sub.m represents the task offloading strategy, s.sub.m=0 represents local task computing, s.sub.m=1 represents offloading the task to the edge computing server for computing, β.sub.t and β.sub.e are trade-off coefficients of time delay and energy consumption respectively, and t.sub.m.sup.loc and e.sub.m.sup.loc represent the time delay and energy consumption of local task computing respectively: t m l o c = C m f m l
e.sub.m.sup.loc=εE.sub.m wherein, C.sub.m is a number of CPU cycles of the task, f.sub.m.sup.l is a local CPU computing rate, and ε is energy consumption per unit of CPU cycle; t.sub.m.sup.off and e.sub.m.sup.off respectively represent time delay and energy consumption of offloading the task to the edge computing server for computing;
t.sub.m.sup.off=t.sub.m.sup.up+t.sub.m.sup.exe
e.sub.m.sup.off=p.sub.mt.sub.m.sup.up wherein, t.sub.m.sup.up and t.sub.m.sup.exe are respectively task uploading time delay and edge computing server execution time delay; t m up = D m r m t m e x e = C m f m wherein, D.sub.m is a data size of the task, f.sub.m is a computing resource allocated by the edge computing server to the m.sup.th CUE, and r.sub.m is a task uploading rate: r m = B M log 2 ( 1 + γ m ) ; and a function of the optimization problem is expressed as: max v m ( s m , p m , p k , ρ m , k ) = max .Math. m = 1 M s m ( β t t m l o c - t m off t m l o c + β e e m l o c - e m off e m l o c ) s.t. C1: t.sub.m≤T.sub.m.sup.max C2: Pr(t.sub.k≥T.sub.k.sup.max)≤P.sub.0 C3: 0≤p.sub.m≤P.sub.max.sup.c C4: 0≤p.sub.k≤P.sub.max.sup.d C5: Σ.sub.mϵM ρ.sub.m,k≤1 C6: Σ.sub.kϵK ρ.sub.m,k≤1 C7: s.sub.m ϵ{0,1} C8: Σ.sub.mϵM s.sub.m C.sub.m≤F wherein the benefit v.sub.m(s.sub.m, p.sub.m, p.sub.k, ρ.sub.m,k) is normalized according to the time delay and energy consumption, and the maximization of v.sub.m(s.sub.m, p.sub.m, p.sub.k, ρ.sub.m,k) is equivalent to minimization of the time delay and energy consumption; condition C1 indicates the maximum time delay limit of the m.sup.th CUE, wherein T.sub.m.sup.max is the maximum time delay allowable to the m.sup.th CUE and t.sub.m is an actual execution time delay of the m.sup.th CUE as follows:
t.sub.m=s.sub.mt.sub.m.sup.off+(1−s.sub.m)t.sub.m.sup.loc condition C2 indicates the reliability guarantee of D2D communication for the k.sup.th pair of DUEs, T.sub.k.sup.max is the maximum time delay allowable to the k.sup.th pair of DUEs, p.sub.0 is the reliability guarantee probability of D2D communication, Pr(t.sub.k≥T.sub.k.sup.max) is the probability that t.sub.k is larger than or equal to T.sub.k.sup.max, and t.sub.k is transmission delay of the k.sup.th pair of DUEs as follows: t k = D k r k wherein, D.sub.k represents a task transmission size of the k.sup.th pair of DUEs, and r.sub.k represents a transmission speed of the k.sup.th pair of DUEs as follows: r k = B M log 2 ( 1 + γ k ) ; conditions C3 and C4 indicate the maximum power limits of the m.sup.th CUE and the k.sup.th pair of DUEs, and P.sub.max.sup.c and P.sub.max.sup.d are respectively the maximum transmission powers of the m.sup.th CUE and the k.sup.th pair of DUEs; condition C5 indicates that a pair of DUEs multiplex a channel of one CUE at most; condition C6 indicates that the channel of one CUE is multiplexed by one pair of DUEs at most; condition C7 indicates that a task offloading strategy variable s.sub.m is an integer of 0 or 1; and condition C8 indicates the maximum computing resource limit of the edge computing server, and F is a number of the maximum CPU cycles that the edge computing server is capable of.

3. The method of multi-access edge computing task offloading based on D2D in IoV environment according to claim 2, wherein v.sub.m (s.sub.m, p.sub.m, p.sub.k, ρ.sub.m,k) S2 comprises: changing the function of the optimization problem to: max s v max ρ m , k , p m , p k .Math. m S v m ( s m , ρ m , k , p m , p k ) s.t. C1: t.sub.m≤T.sub.m.sup.max C2: Pr(t.sub.k≥T.sub.k.sup.max)≤P.sub.0 C3: 0≤p.sub.m≤P.sub.max.sup.c C4: 0≤p.sub.k≤P.sub.max.sup.d C5: Σ.sub.mϵM ρ.sub.m,k≤1 C6: Σ.sub.kϵK ρ.sub.m,k≤1 C7: s.sub.m ϵ{0,1} C8: Σ.sub.mϵM s.sub.m C.sub.m≤F wherein s.sup.v is a task offloading strategy vector, S is a set of the CUEs choosing task offloading, and S={m|s.sub.m=1}; decomposing the optimization problem into two independent sub-optimization problems, wherein the optimization problem is expressed as: max s v r ( S ) wherein, under the set of CUEs-specific task offloading strategies S, r(S) is a sub-optimization problem about the transmission power and channel resource allocation mode as follows: max ρ m , k , p m , p k .Math. m S v m ( s m , ρ m , k , p m , p k ) s.t. C2: Pr(t.sub.k≥T.sub.k.sup.max)≤P.sub.0 C3: 0≤p.sub.m≤P.sub.max.sup.c C4: 0≤p.sub.k≤P.sub.max.sup.d C5: Σ.sub.mϵM ρ.sub.m,k≤1 C6: Σ.sub.kϵK ρ.sub.m,k≤1 wherein r(S) has an optimal solution r*(S), and the optimization problem is transformed into a sub-optimization problem about the task offloading strategy s.sub.m as follows: max s v r * ( S ) ; and substituting the time delays and energy consumptions of the local execution and the edge execution into benefits to obtain the sub-optimization problem r(S) of transmission power and channel resource allocation mode, wherein r(S) is expressed as: max ρ m , k , p m , p k { .Math. m S ( β T + β E ) - .Math. m S ( β T t m off t m l o c + β E e m off e m l o c ) wherein Σ.sub.mϵS(β.sub.T+β.sub.E) is a constant, and r(S) is equivalent to: min ρ m , k , p m , p k .Math. m S ( β T t m off t m l o c + β E e m off e m l o c ) .

4. The method of multi-access edge computing task offloading based on D2D in IoV environment according to claim 3, wherein, S3 comprises: assuming that the k.sup.th pair of DUEs multiplexes the channel of the m.sup.th CUE, for this CUE-DUE multiplexing pair, simplifying the sub-optimization problem r(S) of transmission power and channel resource allocation mode to: min p m , p k ( β T t m off t m l o c + β E e m off e m l o c ) s.t. C2: Pr(t.sub.k≥T.sub.k.sup.max)≤P.sub.0 C3: 0≤p.sub.m≤P.sub.max.sup.c C4: 0≤p.sub.k≤P.sub.max.sup.d obtaining a limit condition satisfied by the m.sup.th CUE and the k.sup.th pair of DUEs transmission powers based on the reliability limit condition C2: p m h k p k γ 0 d h m , k ( e - γ 0 d σ 2 h k p k 1 - P 0 - 1 ) wherein γ.sub.0.sup.d is a threshold of signal-to-noise ratio, and γ.sub.0.sup.d is acquired according to the maximum time delay allowable to the k.sup.th pair of DUEs for the D2D communication; obtaining the feasible regions of powers by combining the limit conditions satisfied by the m.sup.th CUE and the k.sup.th pair of DUEs transmission powers with C3 and C4 conditions; and computing the optimal transmission power of the m.sup.th CUE p*.sub.m and the optimal transmission power of the k.sup.th pair of DUEs p*.sub.k by using linear programming to solve the sub-optimization problem of transmission power.

5. The method of multi-access edge computing task offloading based on D2D in IoV environment according to claim 4, wherein, according to a fact that the CUEs and the DUEs multiplex channels randomly, the sub-optimization problem of channel resource allocation mode is transformed into a maximum weight matching problem in bipartite, and the Hungarian method is used to obtain the optimal channel resource allocation mode, and S4 comprises: transforming the sub-optimization problem r(S) of transmission power and channel resource allocation mode into based on the optimal transmission power of the m.sup.th CUE p*.sub.m and the optimal transmission power of the k.sup.th pair of DUEs p*.sub.k: max ρ m , k .Math. m S .Math. k K ρ m , k v m * ( s m , ρ m , k , p m , p k ) s.t. C5: Σ.sub.mϵM ρ.sub.m,k≤1 C6: Σ.sub.kϵK ρ.sub.m,k≤1 wherein v*.sub.m(s.sub.m, ρ.sub.m,k, p.sub.m, p.sub.k) is an optimal benefit that is computed according to the optimal transmission power p*.sub.m of the m.sup.th CUE and the optimal transmission power p*.sub.k of the k.sup.th pair of DUEs in the case of assuming that the k.sup.th pair of DUEs multiplexes the channel of the m.sup.th CUE; and transforming the sub-optimization problem r(S) of transmission power and channel resource allocation mode into the maximum weight matching problem in bipartite; and obtaining the optimal channel resource allocation mode p*.sub.m,k using the Hungarian algorithm for solution.

6. The method of multi-access edge computing task offloading based on D2D in IoV environment according to claim 5, wherein the optimization problem is transformed into the knapsack problem about the task offloading strategy, and the optimal task offloading strategy is obtained through the dynamic programming, and S5 comprises: transforming the optimization problem into the sub-optimization problem about the task offloading strategy, based on the optimal transmission power of the m.sup.th CUE p*.sub.m and the optimal transmission power of the k.sup.th pair of DUEs p*.sub.k, as well as the optimal channel resource allocation mode ρ*.sub.m,k: max .Math. m = 1 M s m r * ( S ) C7: s.sub.m ϵ{0,1} C8: Σ.sub.mϵM s.sub.m C.sub.m≤F; and obtaining the optimal task offloading strategy s.sub.m using the dynamic programming for solution, wherein the sub-optimization problem of task offloading strategy is a knapsack problem.

Description

BRIEF DESCRIPTION OF THE DRAWINGS

(1) FIG. 1 is a physical structure diagram of the IoV system according to an embodiment of the present disclosure;

(2) FIG. 2 is a flowchart of a method of multi-access edge computing task offloading based on D2D in IoV environment disclosed in embodiments of the present disclosure;

(3) FIG. 3 is a schematic diagram of the relationship among the average CUE time delay, the vehicle speed, and the maximum CUE transmission power according to an embodiment of the present disclosure;

(4) FIG. 4 is a schematic diagram of the relationship among the average CUE energy consumption, the vehicle speed, and the maximum CUE transmission power according to an embodiment of the present disclosure;

(5) FIG. 5 is a schematic diagram of the relationship among the average CUE time delay, the maximum DUE time delay, and the task load according to an embodiment of the present disclosure;

(6) FIG. 6 is a schematic diagram of the relationship among the average CUE time delay, the maximum DUE time delay, and the computing rate of the base station according to an embodiment of the present disclosure;

(7) FIG. 7 is a schematic diagram of the relationship among the average CUE time delay, the DUE reliability probability, and the task load according to an embodiment of the present disclosure;

(8) FIG. 8 is a schematic diagram of the relationship among the average CUE time delay, the DUE reliability probability, and the computing rate of the base station according to an embodiment of the present disclosure.

DETAILED DESCRIPTION

(9) So that the above mentioned purposes, technical schemes and advantages in embodiments of the present disclosure can be more apparently understood, the technical schemes in the embodiments of the present disclosure will be described clearly and completely with reference to the accompanying drawings thereof. Apparently, the embodiments described herein are part of, not all of, embodiments in the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those of ordinary skills in the art without creative work belong to the scope claimed by the present disclosure.

Embodiments

(10) As shown in FIG. 1, the method applies to a single base station deployed along the road, wherein an edge computing server is deployed near the single base station, the base station adopts an OFDMA access mode and has a certain number of CUE and DUE in its coverage area; CUE may communicate with the base station; task requests generated by CUE may choose to be executed at the local of CUE or the edge computing server; the local data exchange is performed between DUE in the form of D2D; DUE multiplexes CUE channels, thus causing communication interference between CUE and DUE.

(11) FIG. 2 shows a flowchart of the entire method of multi-access edge computing task offloading. In this embodiment, the method of multi-access edge computing task offloading based on D2D in IoV environment specifically includes the following steps:

(12) In Step 1, an optimization problem is modeled as a problem of maximizing the sum of time delay and energy consumption benefit, wherein the benefit is defined as a ratio of a difference between the local execution cost and the actual execution cost to the local execution cost, the cost herein represents the time delay or energy consumption, and the optimization problem is equivalent to the problem of minimizing the sum of time delay and energy consumption.

(13) In the application of this field, traditional methods directly regard the minimization of the sum of time delay and energy consumption as an optimization problem. Due to the difference in unit between time delay and energy consumption, either time delay is minimized while energy consumption is not yet, or energy consumption is minimized while time delay is not yet. Therefore, in this embodiment, the maximization of the sum of time delay and energy consumption benefits is regarded as an optimization problem, wherein the benefits are normalized according to time delay and energy consumption so as to minimize both time delay and energy consumption at the same time and to set different preferences for both time delay and energy consumption. For example, when a terminal needs energy saving, its preference for energy consumption may be increased and its preference for time delay may be reduced; and when the terminal needs lower time delay, its preference for time delay may be increased and its preference for energy consumption may be reduced.

(14) The process of Step 1 is as follows:

(15) It is assumed that the number of CUE is M, m represents the m.sup.th CUE, the number of DUE is K pairs, and k represents the k.sup.th pair of DUE. Since the channel is less used, it facilitates the management of the base station interference. In order to improve the spectrum usage efficiency, the channel allocated for CUE is multiplexed by DUE, and a total bandwidth of the base station is B.

(16) Signal-to-noise ratios of the m.sup.th CUE and the k.sup.th pair of DUE received by the base station are respectively:

(17) 0 γ m = p m h m , B σ 2 + .Math. k K ρ m , k p k h k , B
and

(18) γ k = p k h k σ 2 + .Math. m M ρ m , k p m h m , k

(19) Wherein p.sub.m and p.sub.k represent transmission powers of the m.sup.th CUE and k.sup.th pair of DUE respectively, h.sub.m,B is a channel gain between the m.sup.th CUE and the base station, h.sub.k,B is a channel gain between the k.sup.th pair of DUE and the base station, h.sub.k is a channel gain between the k.sup.th pair of DUE, h.sub.m,k is a channel gain between the m.sup.th CUE and the k.sup.th pair of DUE, σ.sup.2 is a noise power, ρ.sub.m,k is a channel resource allocation mode, ρ.sub.m,k=1 indicates that the k.sup.th pair of DUE multiplexes the channel of the m.sup.th CUE, or otherwise ρ.sub.m,k=0 indicates that the k.sup.th pair of DUE does not multiplex the channel of the m.sup.th CUE.

(20) In the above formulas, the channel gains only take into consideration large-scale gains which include:
h.sub.m,B=β.sub.m,BAL.sub.m,B.sup.−γ
h.sub.k,B=β.sub.k,BAL.sub.k,B.sup.−γ
h.sub.k=β.sub.kAL.sub.k.sup.−γ
h.sub.m,k=β.sub.m,kAL.sub.m,k.sup.−γ

(21) Wherein, β.sub.m,B is shadowing fading between the m.sup.th CUE and the base station, β.sub.k,B is shadowing fading between the k.sup.th pair of DUE and the base station, β.sub.k is shadowing fading between the k.sup.th pair of DUE, β.sub.m,k is shadowing fading between the m.sup.th CUE and the k.sup.th pair of DUE, L.sub.m,B is a distance between the m.sup.th CUE and the base station, L.sub.k,B is a distance between the k.sup.th pair of DUE and the base station, L.sub.k is a distance between the k.sup.th pair of DUE, L.sub.k is proportional to vehicle speed v, L.sub.m,k is a distance between the m.sup.th CUE and the k.sup.th pair of DUE, γ is an attenuation factor, and A is a path loss constant.

(22) The benefits are:

(23) v m ( s m , p m , p k , ρ m , k ) = s m ( β t t m loc - t m off t m loc + β e e m loc - e m off e m loc )

(24) Wherein, s.sub.m represents a task offloading strategy, s.sub.m=0 represents local task computing, s.sub.m=1 represents offloading the task to the edge computing server for computing, β.sub.t and β.sub.e are trade-off coefficients of time delay and energy consumption respectively, and t.sub.m.sup.loc and e.sub.m.sup.loc represent the time delay and energy consumption of local task computing respectively:

(25) t m loc = C m f m l e m loc = ε C m

(26) Wherein, C.sub.m is a number of CPU cycles of the task, f.sub.m.sup.l is a local CPU computing rate, and ε is energy consumption per unit of CPU cycles.

(27) t.sub.m.sup.off and e.sub.m.sup.off respectively represent time delay and energy consumption of offloading the task to the edge computing server for computing;
t.sub.m.sup.off=t.sub.m.sup.up+t.sub.m.sup.exe
e.sub.m.sup.off=p.sub.mt.sub.m.sup.up

(28) Wherein, t.sub.m.sup.up and t.sub.m.sup.exe are respectively task uploading time delay and edge computing server execution time delay;

(29) t m up = D m r m

(30) t m exe = C m f m

(31) Wherein, D.sub.m is the data size of the task, f.sub.m is a computing resource allocated by the edge computing server to the m.sup.th CUE, and r.sub.m is the task uploading rate:

(32) r m = B M log 2 ( 1 + γ m )

(33) Therefore, the function of the optimization problem is expressed as:

(34) max v m ( s m , p m , p k , ρ m , k ) = max .Math. m = 1 M s m ( β t t m l o c - t m off t m l o c + β e e m l o c - e m off e m l o c )

(35) s.t. C1: t.sub.m≤T.sub.m.sup.max

(36) C2: Pr(t.sub.k≥T.sub.k.sup.max)≤P.sub.0

(37) C3: 0≤p.sub.m≤P.sub.max.sup.c

(38) C4: 0≤p.sub.k≤P.sub.max.sup.d

(39) C5: Σ.sub.mϵM ρ.sub.m,k≤1

(40) C6: Σ.sub.kϵK ρ.sub.m,k≤1

(41) C7: s.sub.m ϵ{0,1}

(42) C8: Σ.sub.mϵM s.sub.m C.sub.m≤F

(43) The benefit v.sub.m(s.sub.m, p.sub.m, p.sub.k, ρ.sub.m,k) is normalized according to the time delay and energy consumption, and the maximization of v.sub.m(s.sub.m, p.sub.m, p.sub.k, ρ.sub.m,k) is equivalent to minimization of the time delay and energy consumption.

(44) Condition C1 indicates the maximum time delay limit of the m.sup.th CUE, wherein T.sub.m.sup.max is the maximum time delay allowable to the m.sup.th CUE and t.sub.m is an actual execution time delay of the m.sup.th CUE as follows:
t.sub.m=s.sub.mt.sub.m.sup.off+(1−s.sub.m)t.sub.m.sup.loc

(45) Condition C2 indicates the reliability guarantee of D2D communication for the k.sup.th pair of DUE, T.sub.k.sup.max is the maximum time delay allowable to the k.sup.th pair of DUE, p.sub.0 is the reliability guarantee probability of D2D communication, Pr(t.sub.k≥T.sub.k.sup.max) is the probability that t.sub.k is larger than or equal to and T.sub.k.sup.max is transmission delay of the k.sup.th pair of DUE as follows:

(46) t k = D k r k

(47) Wherein, D.sub.k represents a task transmission size of the k.sup.th pair of DUE, and r.sub.k represents a transmission speed of the k.sup.th pair of DUE as follows:

(48) r k = B M log 2 ( 1 + γ k )

(49) Conditions C3 and C4 indicate the maximum power limits of the m.sup.th CUE and the k.sup.th pair of DUE, and P.sub.max.sup.c and P.sub.max.sup.d are respectively the maximum transmission powers of the m.sup.th CUE and the k.sup.th pair of DUE.

(50) Condition C5 indicates that a pair of DUE may multiplex a channel of one CUE at most.

(51) Condition C6 indicates that the channel of one CUE may be multiplexed by one pair of DUE at most.

(52) Condition C7 indicates that a task offloading strategy variable s.sub.m is an integer of 0 or 1.

(53) Condition C8 indicates the maximum computing resource limit of the edge computing server, and F is a number of the maximum CPU cycles that the edge computing server is capable of.

(54) In Step 2, the optimization problem is decomposed.

(55) In the application of traditional methods in this field, heuristic algorithms that are quite high in time complexity are directly adopted for the minimization of time delay and energy consumption. Therefore, in an embodiment, this method takes full advantage of a feature that a sub-optimization problem of the task offloading strategy is independent from that of the transmission power and channel resource allocation mode, in order to decompose the optimization problem into two sub-optimization ones: one for the task offloading strategy, and the other one for the transmission power and channel resource allocation mode, thereby reducing the time complexity.

(56) The process of Step 2 is as follows:

(57) The sub-optimization problem of the task offloading strategy is independent from that of the transmission power and channel resource allocation mode. The task offloading strategy and channel resource allocation mode refer to an integer variable, the transmission power is a continuous variable, and the optimization problem is a mixed integer nonlinear programming problem.

(58) In order to solve optimization problem, the optimization problem is decomposed into two independent sub-optimization problems: one for the task offloading strategy, and the other one for the transmission power and channel resource allocation mode. As a result, the optimization problem turns into:

(59) 0 max s v max ρ m , k , p m , p k .Math. m S v m ( s m , ρ m , k , p m , p k )

(60) s.t. C1: t.sub.m≤T.sub.m.sup.max

(61) C2: Pr(t.sub.k≥T.sub.k.sup.max)≤P.sub.0

(62) C3: 0≤p.sub.m≤P.sub.max.sup.c

(63) C4: 0≤p.sub.k≤P.sub.max.sup.d

(64) C5: Σ.sub.mϵM ρ.sub.m,k≤1

(65) C6: Σ.sub.kϵK ρ.sub.m,k≤1

(66) C7: s.sub.m ϵ{0,1}

(67) C8: Σ.sub.mϵM s.sub.m C.sub.m≤F

(68) Wherein s.sup.v is a task offloading strategy vector, S is a set of CUE choosing task offloading, and S={m|s.sub.m=1}.

(69) The optimization problem is decomposed into two independent sub-optimization problems, which is expressed as follows:

(70) max s v r ( S )

(71) Wherein, under the set of CUE-specific task offloading strategies S, r(S) is a sub-optimization problem about the transmission power and channel resource allocation mode as follows:

(72) max ρ m , k , p m , p k .Math. m S v m ( s m , ρ m , k , p m , p k )

(73) s.t. C2: Pr(t.sub.k≥T.sub.k.sup.max)≤P.sub.0

(74) C3: 0≤p.sub.m≤P.sub.max.sup.c

(75) C4: 0≤p.sub.k≤P.sub.max.sup.d

(76) C5: Σ.sub.mϵM ρ.sub.m,k≤1

(77) C6: Σ.sub.kϵK ρ.sub.m,k≤1

(78) Wherein r(S) has an optimal solution r*(S), and then the optimization problem is transformed into a sub-optimization problem about the task offloading strategy s.sub.m as follows:

(79) max s v r * ( S )

(80) By substituting the time delays and energy consumptions of the local execution and the edge execution into benefits, the sub-optimization problem r(S) of transmission power and channel resource allocation mode will be:

(81) max ρ m , k , p m , p k { .Math. m S ( β T + β E ) - .Math. m S ( β T t m off t m l o c + β E e m off e m l o c )

(82) Wherein Σ.sub.mϵS(β.sub.T+β.sub.E) is constant, and therefore r(S) is equivalent to:

(83) min ρ m , k , p m , p k .Math. m S ( β T t m off t m l o c + β E e m off e m l o c )

(84) In Step 3, an optimal transmission power of CUE and DUE are computed, wherein according to the known D2D time delay reliability limit condition and power limit conditions of CUE and DUE, feasible regions of CUE and DUE powers are determined, and then a linear programming is used for obtaining the optimal transmission powers of CUE and DUE;

(85) The process of Step 3 is as follows:

(86) Assuming that the k.sup.th pair of DUE multiplexes a channel of the m.sup.th CUE, for this CUE-DUE multiplexing pair, the sub-optimization problem r(S) of transmission power and channel resource allocation mode is simplified as follows:

(87) min p m , p k ( β T t m off t m l o c + β E e m off e m l o c )

(88) s.t. C2: Pr(t.sub.k≥T.sub.k.sup.max)≤P.sub.0

(89) C3: 0≤p.sub.m≤P.sub.max.sup.c

(90) C4: 0≤p.sub.k≤P.sub.max.sup.d

(91) According to the reliability limit condition C2, a limit condition satisfied by the CUE and DUE transmission powers may be obtained as follows:

(92) p m h k p k γ 0 d h m , k ( e γ 0 d σ 2 h k p k 1 - P 0 - 1 )

(93) Wherein γ.sub.0.sup.d is a threshold of signal-to-noise ratio, and γ.sub.0.sup.d is acquired according to the maximum time delay allowable to DUE for the D2D communication.

(94) By combining the above limit conditions satisfied by CUE and DUE transmission powers with C3 and C4 conditions, feasible regions of powers can be obtained, and the optimal transmission power of CUE p*.sub.m and the optimal transmission power of DUE p*.sub.k may be obtained by using linear programming to solve the sub-optimization problem of transmission power.

(95) In Step 4, an optimal channel resource allocation mode is computed, wherein the optimal channel resource allocation mode is acquired by solving a problem of maximum weight matching in bipartite by using a bipartite matching algorithm;

(96) The process of Step 4 is as follows:

(97) According to the optimal transmission power of CUE p*.sub.m and the optimal transmission power of DUE p*.sub.k, the sub-optimization problem r(S) of transmission power and channel resource allocation mode is transformed into:

(98) max ρ m , k .Math. m S .Math. k K ρ m , k v m * ( s m , ρ m , k , p m , p k )

(99) s.t. C5: t.sub.m≤T.sub.m.sup.max

(100) C6: Σ.sub.kϵK ρ.sub.m,k≤1

(101) Wherein V*.sub.m(s.sub.m, ρ.sub.m,k, p.sub.m, P.sub.k) is the optimal benefit that is computed according to the optimal transmission power p*.sub.m of CUE and the optimal transmission power p*.sub.k of DUE in the case of assuming that the k.sup.th pair of DUE multiplexes the channel of the m.sup.th CUE.

(102) The sub-optimization problem r(S) of transmission power and channel resource allocation mode is a maximum weight matching problem in bipartite, and the Hungarian algorithm is used for solution to obtain the optimal channel resource allocation mode ρ*.sub.m,k.

(103) In Step 5, an optimal task offloading strategy is computed, wherein the optimal task offloading strategy of CUE is acquired by solving a knapsack problem by using dynamic programming.

(104) The process of Step 5 is as follows:

(105) According to the optimal transmission power of CUE p*.sub.m and the optimal transmission power of DUE p*.sub.k, as well as the optimal channel resource allocation mode ρ*.sub.m,k, the optimization problem is transformed into a sub-optimization problem about the task offloading strategy:

(106) max .Math. m = 1 M s m r * ( S )

(107) s.t. C7: s.sub.m ϵ{0,1}

(108) C8: Σ.sub.mϵM s.sub.m C.sub.m≤F

(109) The above sub-optimization problem of task offloading strategy is a typical knapsack problem, and the optimal task offloading strategy s*.sub.m is obtained by solving the dynamic programming.

(110) TABLE-US-00001 TABLE 1 Simulation Parameter Setting Table B 20 MHz f.sub.m.sup.l 1-1.5 GHz P.sub.0 0.0001 K 20 M 20 N.sub.0 −414 dbm P.sub.max.sup.c 17 dbm, 23 dbm P.sub.max.sup.d 17 dbm, 23 dbm v 60-140 km/h Channel model 3GPP TR 36.885

(111) FIG. 3 shows the relationship between the average CUE time delay and the CUE vehicle speed when the maximum CUE transmission power is 23 dbm and 17 dbm respectively. It can be seen from FIG. 3 that as the CUE vehicle speed increases, the average CUE time delay also increases. The larger the maximum CUE transmission power is, the less the average CUE time delay would be.

(112) FIG. 4 shows the relationship between the average CUE energy consumption and the CUE vehicle speed when the maximum CUE transmission power is 23 dbm and 17 dbm respectively. It can be seen from FIG. 4 that as the CUE vehicle speed increases, the average CUE energy consumption also increases. The increase of the maximum CUE transmission power decreases the average CUE time delay while increases the average CUE energy consumption.

(113) FIG. 5 shows the relationship between the average CUE time delay and the maximum time delay allowable to DUE when task loads of CUE are (100-200)KB, (200-300)KB, (300-400)KB and (400-500)KB respectively. It can be seen from FIG. 5 that the larger the maximum time delay allowable to DUE is, the less the average CUE time delay would be; and at the same time, the smaller the CUE task load is, the less the average CUE time delay would be.

(114) FIG. 6 shows the relationship between the average CUE time delay and the maximum DUE time delay when the computing rate of the base station is 40 G/s, 60 G/s, 80 G/s and 100 G/s. The larger the computing rate of the base station is, the less the average CUE time delay would be.

(115) FIG. 7 shows the relationship between the average CUE time delay and the DUE reliability probability when task loads of CUE are (100-200)KB, (200-300)KB, (300-400)KB and (400-500)KB respectively. It can be seen from FIG. 7 that the higher the DUE reliability probability is, the less the average CUE time delay would be; and at the same time, as the CUE task load decreases, the average CUE time delay would decreases as well.

(116) FIG. 8 shows the relationship between the average CUE time delay and the DUE reliability probability when the computing rate of the base station is 40 G/s, 60 G/s, 80 G/s and 100 G/s. It can be seen from FIG. 8 that the larger the computing rate of the base station is, the less the average CUE time delay would be.

(117) Embodiments described above are preferred embodiments of the present disclosure, but implementations of the present disclosure are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations and simplifications made without departing from the spirit and principle of the present disclosure shall be equivalent alternations and fall within the protection scope claimed by the present disclosure.