CN113515378A - Method and device for migration and calculation resource allocation of 5G edge calculation task - Google Patents
Method and device for migration and calculation resource allocation of 5G edge calculation task Download PDFInfo
- Publication number
- CN113515378A CN113515378A CN202110719376.8A CN202110719376A CN113515378A CN 113515378 A CN113515378 A CN 113515378A CN 202110719376 A CN202110719376 A CN 202110719376A CN 113515378 A CN113515378 A CN 113515378A
- Authority
- CN
- China
- Prior art keywords
- computing
- task
- computing task
- migration
- executed
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 230000005012 migration Effects 0.000 title claims abstract description 112
- 238000013508 migration Methods 0.000 title claims abstract description 112
- 238000013468 resource allocation Methods 0.000 title claims abstract description 65
- 238000000034 method Methods 0.000 title claims abstract description 52
- 238000004364 calculation method Methods 0.000 title claims description 81
- 238000005265 energy consumption Methods 0.000 claims abstract description 74
- 238000012545 processing Methods 0.000 claims description 45
- 238000004590 computer program Methods 0.000 claims description 12
- 230000005540 biological transmission Effects 0.000 claims description 10
- 238000004422 calculation algorithm Methods 0.000 claims description 8
- 238000006243 chemical reaction Methods 0.000 claims description 6
- 230000009471 action Effects 0.000 description 14
- 239000013598 vector Substances 0.000 description 12
- 230000008901 benefit Effects 0.000 description 8
- 238000005516 engineering process Methods 0.000 description 7
- 238000004891 communication Methods 0.000 description 6
- 230000008569 process Effects 0.000 description 6
- 238000010586 diagram Methods 0.000 description 5
- 230000006870 function Effects 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 230000006399 behavior Effects 0.000 description 2
- 238000010295 mobile communication Methods 0.000 description 2
- 230000002787 reinforcement Effects 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5094—Allocation of resources, e.g. of the central processing unit [CPU] where the allocation takes into account power or heat criteria
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5061—Partitioning or combining of resources
- G06F9/5072—Grid computing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/50—Indexing scheme relating to G06F9/50
- G06F2209/502—Proximity
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Abstract
The invention provides a method and a device for migration and allocation of computing resources of a 5G edge computing task. The method comprises the following steps: determining a task migration variable of each computing task based on a system total consumption minimization principle, wherein the task migration variable meets a preset constraint condition; the total system consumption comprises a first computing time delay and a first computing energy consumption of a first computing task executed at a user terminal in a computing task set, and a second computing time delay and a second computing energy consumption of a second computing task executed at an edge server. The method and the device for migrating the computing tasks provided by the invention aim at minimizing the total energy consumption of the system, simultaneously consider the computing time delay and the computing energy consumption, determine the migration variable and the computing resource allocation variable of each computing task in the computing task set, effectively reduce the system consumption and improve the resource utilization rate.
Description
Technical Field
The invention relates to the technical field of mobile edge computing application, in particular to a method and a device for migration and computing resource allocation of a 5G edge computing task.
Background
At present, the 5G (the 5th generation mobile communication) technology is rapidly developed, the wireless communication technology and the internet of things technology are connected, and the technology is developed into the realization of mobile applications with large calculation amount and sensitive time delay, such as autonomous driving, online games, real-time navigation and the like, so that a road is paved. However, due to the limited CPU computing power and energy of the smart mobile device, many of the related applications and services cannot be handled by the smart mobile device. In recent years, moving edge calculation has been proposed to solve this problem. Unlike traditional mobile cloud computing, 5G mobile edge computing can deploy computing resources at the edge of the network. By migrating the task to the mobile edge computing server, the task migration delay can be effectively reduced, and the energy consumption of the user terminal is reduced.
Compared with the traditional cloud computing, the 5G mobile edge computing can effectively reduce the system consumption and the task migration delay. However, the computing power of the mobile edge compute server is limited in view of the deployment cost of the mobile edge compute server. Therefore, new task migration and computing resource allocation schemes need to be proposed to improve resource utilization.
Disclosure of Invention
Aiming at the problems in the prior art, the invention provides a method and a device for migration of 5G edge computing tasks and allocation of computing resources.
In a first aspect, the present invention provides a method for migration and allocation of computing resources for a 5G edge computing task, including:
determining a migration variable and a calculation resource allocation variable of each calculation task based on a target of minimizing total system consumption, wherein the migration variable and the calculation resource allocation variable meet preset constraint conditions;
the total system consumption comprises a first computing time delay and a first computing energy consumption of a first computing task executed at a user terminal in a computing task set, and a second computing time delay and a second computing energy consumption of a second computing task executed at an edge server.
In one embodiment, the migration variables and the computing resource allocation variables are obtained based on a Q-learning algorithm.
In one embodiment, the method further comprises:
acquiring a variable of each computing task in a computing task set;
determining a first computing time delay T of the first computing task executed at the user terminal based on the computing resource required for processing the first computing task and the computing resource distributed by the first computing task executed at the user terminal0i;
Determining the first calculation based on the conversion coefficient of the user terminal equipment, the calculation resource required for processing the first calculation task and the calculation resource distributed by the first calculation task in the user terminalFirst computing energy consumption of task execution at user terminal
Determining the migration time for the second computing task to migrate to the edge server based on the transmission rate of the second computing task from the user terminal to the edge server and the size of the second computing task;
determining the computation time delay executed by the second computing task at the edge server based on the computing resources required for processing the second computing task and the computing resource distribution variables corresponding to the second computing task;
summing the migration time and the calculation time delay executed by the edge server to obtain a second calculation time delay T executed by the edge server for a second calculation taski mec;
Determining second computing energy consumption of the second computing task executed at the edge server based on the scaling factor of the edge server, the computing resource required for processing the second computing task and the computing resource distributed by the edge server for the second computing task
Wherein the variables of each computing task include: the computing resources required for processing each computing task, the size of each computing task, and the maximum time delay allowed for processing each computing task.
In one embodiment, the formula for the total consumption of the system is:
wherein alpha isiFor each of the migration variables of the computing task,andcalculating a delay weight and calculating an energy consumption weight performed by the user terminal for the ith task,andand respectively calculating the time delay weight and the energy consumption weight when the ith task is calculated by the edge calculation server.
In one embodiment, the preset constraint condition includes:
the computing time delay of each computing task executed by the user terminal or executed by the edge server is less than or equal to the maximum time delay allowed for processing each computing task;
when each computing task is executed by the edge server, the computing resource distributed by the edge server is less than or equal to the total computing resource of the edge server;
when all the computing tasks in the computing task set are executed by the edge server, the computing resources distributed by the edge server are less than or equal to the total computing resources of the edge server;
and the value range of the migration variable of each computing task is {0,1 }.
In a second aspect, the present invention provides an apparatus for 5G edge computing task migration and computing resource allocation, including:
the determining module is used for determining a migration variable and a computing resource allocation variable of each computing task based on a target of minimizing the total system consumption, and the migration variable and the computing resource allocation variable meet preset constraint conditions;
the total system consumption comprises a first computing time delay and a first computing energy consumption of a first computing task executed at the user terminal, and a second computing time delay and a second computing energy consumption of a second computing task executed at the edge server, wherein the first computing task and the second computing task are different.
In one embodiment, the migration variables and the computing resource allocation variables are obtained based on a Q-learning algorithm.
In one embodiment, the apparatus further comprises an obtaining module configured to:
acquiring a variable of each computing task in a computing task set;
determining a first computing time delay T of the first computing task executed at the user terminal based on the computing resource required for processing the first computing task and the computing resource distributed by the first computing task executed at the user terminal0i;
Based on a conversion coefficient of user terminal equipment, the computing resources required for processing the first computing task and the computing resources allocated to the execution of the first computing task at the user terminal, and determining first computing energy consumption of the first computing task executed at the user terminal
Determining the migration time for the second computing task to migrate to the edge server based on the transmission rate of the second computing task from the user terminal to the edge server and the size of the second computing task;
determining the computation time delay executed by the second computing task at the edge server based on the computing resources required for processing the second computing task and the computing resource distribution variables corresponding to the second computing task;
summing the migration time and the calculation time delay executed by the edge server to obtain a second calculation time delay T executed by the edge server for a second calculation taski mec;
Determining second computing energy consumption of the second computing task executed at the edge server based on the scaling factor of the edge server, the computing resource required for processing the second computing task and the computing resource distributed by the edge server for the second computing task
Wherein the variables of each computing task include: the computing resources required for processing each computing task, the size of each computing task, and the maximum time delay allowed for processing each computing task.
In a third aspect, the present invention provides an electronic device, including a processor and a memory storing a computer program, where the processor implements the steps of the method for 5G edge computing task migration and computing resource allocation described in the first aspect when executing the program.
In a fourth aspect, the present invention provides a processor-readable storage medium storing a computer program for causing a processor to perform the steps of the method for 5G edge computing task migration and computing resource allocation of the first aspect.
The method and the device for migrating the 5G edge computing tasks and allocating the computing resources provided by the invention aim at minimizing the total energy consumption of the system, simultaneously consider the computing time delay and the computing energy consumption, determine the migration variable and the computing resource allocation variable of each computing task in the computing task set, further obtain the total consumption of each computing task executed at a user terminal or an edge server, effectively reduce the system consumption and improve the resource utilization rate.
Drawings
In order to more clearly illustrate the technical solutions of the present invention or the prior art, the drawings needed for the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
FIG. 1 is a schematic flow chart of a method for migration and allocation of computing resources for a 5G edge computing task provided by the present invention;
FIG. 2 is a schematic structural diagram of an edge server and a user terminal provided in the present invention;
FIG. 3 is a schematic flow chart of the Q algorithm provided by the present invention;
FIG. 4 is a schematic structural diagram of an apparatus for 5G edge computing task migration and computing resource allocation provided by the present invention;
fig. 5 is a schematic structural diagram of an electronic device provided in the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The method and apparatus for 5G edge computing task migration and computing resource allocation of the present invention are described below with reference to FIGS. 1-5.
Fig. 1 is a schematic flowchart of a method for migrating a 5G edge computing task and allocating computing resources provided by the present invention, and as shown in fig. 1, the method for migrating a 5G edge computing task and allocating computing resources includes:
the total system consumption comprises a first computing time delay and a first computing energy consumption of a first computing task executed at the user terminal, and a second computing time delay and a second computing energy consumption of a second computing task executed at the edge server, wherein the first computing task and the second computing task are different.
Specifically, an Edge Computing (EC) technology is a key technology of 5G, an Edge server is deployed at a network Edge close to a data source, and upward to a cloud, the Edge server can share the pressure of the cloud, and downward to a mobile terminal, due to being closer to a user, the terminal migrates a task to the Edge server, so that the uploading delay of the task can be effectively reduced. For example, an edge server may be deployed near a gNB node in a 5G network, so as to implement efficient processing of computing tasks by the edge server. Meanwhile, an edge server may also be deployed near an eNodeB node in a 4G (the 4th generation mobile communication) network to implement efficient processing of computing tasks.
Mobile Edge Computing (MEC) and Cloudlet are representative types of ECs. The MEC allows mobile users to conveniently access IT and cloud services over wireless or mobile networks by deploying edge servers in close proximity to the users.
The user terminal can utilize the edge computing technology to transfer some computing tasks to the edge server, meanwhile, the edge server can avoid unnecessary data transmission by configuring a sharable cache, and the current transfer decision only considers a certain index, such as the influence factor of computing time delay or energy consumption.
As shown in fig. 2, the present invention is mainly explained by taking the case that a gNB node additionally deploys a mobile edge computing server MEC server. Different user terminals UE may migrate the computation task to the edge server for execution.
In a gNB node equipped with a mobile edge computing server, and I single antenna smart mobile device systems, each smart mobile device has a task that requires computation. Definition ofIs a collection of tasks and is also an identification of the smart mobile device.
Computing task collectionThe total consumption of each computing task executed in the user terminal comprises the computing time delay and the computing energy consumption of the computing task executed in the user terminal, and the total consumption of each computing task executed in the edge serverIncluding the computational latency and computational energy consumption of the computational task performed at the edge server.
Each computing task execution main body can be a user terminal or an edge server, and each computing task is not distributed to different execution main bodies for computation.
Defining a migration variable α for the ith computing taskiWhen is alphaiAnd 1, the ith calculation task is migrated to the mobile edge calculation server for calculation, and otherwise, the task is calculated by the user terminal. Then compute the task setThe migration vector of (a) may be expressed as:
α={α1,...,αi,...,αI}。
the total system consumption can be expressed as:
wherein the migration variable αiIndicates whether the ith computing task is executed at the edge server (alpha)iIs 1 denotes aiNo if 0), i.e., αi0 denotes that a computing task is executed by the user terminal, and the corresponding computing task is also referred to as a first computing task; alpha is alphaiBy 1 is meant that the computing task is executed by the edge server, and the corresponding computing task is also referred to as the second computing task. The set of computing tasks is comprised of a first computing task and a second computing task.The total consumption of the ith computation task executed at the edge server is represented, that is, the total consumption of the second computation task executed at the edge server includes the second computation delay and the second computation energy consumption.
Represents the ith computerThe total consumption of the service executed at the user terminal, i.e. the total consumption of the first computation task executed at the user terminal, includes the first computation delay and the first computation energy consumption.
When the migration variable and the calculation resource allocation variable meet the preset constraint condition, the total consumption of the system is minimized, and a calculation task set is determinedEach migration variable a in the migration vector aiAnd each computing resource allocation variable f in the computing resource allocation vector fi mecThe value of (c).
The method and the device for migrating the 5G edge computing tasks and allocating the computing resources provided by the invention aim at minimizing the total energy consumption of the system, simultaneously consider the computing time delay and the computing energy consumption, determine the migration variable and the computing resource allocation variable of each computing task in the computing task set, further obtain the total consumption of each computing task executed at a user terminal or an edge server, effectively reduce the system consumption and improve the resource utilization rate.
Optionally, the migration variable and the calculation resource allocation variable are obtained based on a Q learning algorithm.
Specifically, the task migration policy of the user terminal depends only on the current state and operation. Therefore, the task migration strategy can be regarded as a Markov decision process, and a Q learning method based on reinforcement learning can solve the problem. In the present invention, first the state of learning s, action a and benefit Q are defined. Q ═ s, a, indicates the gain that can be achieved by taking action a at a certain time state s.
The system state is composed of two parts, s ═ tΩAc) where t isΩThe total system cost omega. ac is the computing resources that the mobile edge compute server can allocate,
the task migration policy α and the computing resource allocation f are two action vectors, and thus the action vector can be represented asConsidering the constraints in the problem, the optimal task migration and computing resource allocation strategy can be described as:
τ*=argminΩ(s,τ),
where τ is a feasible task migration and computing resource allocation strategy, τ*And (4) a strategy for optimal task migration and computing resource allocation.
By determining τ*Namely, the optimal task migration variable and the optimal computing resource allocation variable are determined.
The method and the device for migrating the 5G edge computing tasks and allocating the computing resources provided by the invention aim at minimizing the total energy consumption of the system, simultaneously consider the computing time delay and the computing energy consumption, determine the migration variable and the computing resource allocation variable of each computing task in the computing task set, further obtain the total consumption of each computing task executed at a user terminal or an edge server, effectively reduce the system consumption and improve the resource utilization rate.
Optionally, the method further includes:
acquiring a variable of each computing task in a computing task set;
determining a first computing time delay T of the first computing task executed at the user terminal based on the computing resource required for processing the first computing task and the computing resource distributed by the first computing task executed at the user terminal0i;
Based on a conversion coefficient of user terminal equipment, the computing resources required for processing the first computing task and the computing resources allocated to the execution of the first computing task at the user terminal, and determining first computing energy consumption of the first computing task executed at the user terminal
Determining the migration time for the second computing task to migrate to the edge server based on the transmission rate of the second computing task from the user terminal to the edge server and the size of the second computing task;
determining the computation time delay executed by the second computing task at the edge server based on the computing resources required for processing the second computing task and the computing resource distribution variables corresponding to the second computing task;
summing the migration time and the calculation time delay executed by the edge server to obtain a second calculation time delay T executed by the edge server for a second calculation taski mec;
Determining second computing energy consumption of the second computing task executed at the edge server based on the scaling factor of the edge server, the computing resource required for processing the second computing task and the computing resource distributed by the edge server for the second computing task
Wherein the variables of each computing task include: the computing resources required for processing each computing task, the size of each computing task, and the maximum time delay allowed for processing each computing task.
Specifically, the present invention employs three variablesTo represent a computational task i, where ciThe computational resources required to process the ith task, siIs the data size of the ith task,the maximum computation latency requirement for the ith task.
When each computing task is executed, corresponding time delay is generated, and when the computing task is executed on different equipment, corresponding energy consumption is generated on the executing equipment according to different chip structures of the equipment. The computing task set is composed of a first computing task and a second computing task, the computing task executed at the user terminal is called the first computing task, and the computing task executed at the edge server is called the second computing task.
According to the three variables of the calculation task i, when the calculation task i is executed in the user terminal, the corresponding calculation time delay and the corresponding calculation energy consumption can be determined; when the method is executed at the edge server, the corresponding total migration delay and the computing energy consumption can be determined;
when a computing task is executed at a user terminal, the corresponding computing task is a first computing task, fi locAnd allocating the computing resources of the task to the ith user terminal, namely, allocating the computing resources of the computing task to the ith user terminal when the ith computing task is executed by the ith user terminal. c. CiFor processing the computing resource required by the ith task, when the computing task i is computed by the user terminal itself, the computing delay of the computing task i may be expressed as:
the computational energy consumption when the ith task is executed by the user terminal is as follows:
whereinIs the scaling factor of the ith user terminal, and is related to the CPU chip structure of the user terminal.
Defining the total consumption of the user terminal as the migration delay and the calculation energy consumption of the calculation task, and when the calculation task is executed by the user terminal, the total consumption of the ith task is as follows:
whereinAndthe calculation time delay weight and the calculation energy consumption weight which are respectively executed by the user terminal for the ith task have the value range of [0,1]。
When a computing task is executed at the edge server, the corresponding computing task is a second computing task,computing the total computing resources of the server for the mobile edge, fi mecAnd allocating the computing resources of the ith computing task to the edge computing server. c. CiThe computational resources required to process the ith task. Therefore, when the computation task i is computed by the edge computation server, the corresponding computation latency is:
similarly, the computing energy consumption of the ith task when executed by the edge computing server is as follows:
wherein, κmecAnd calculating the scaling factor of the server at the edge for the ith calculation task, wherein the scaling factor is related to the CPU chip structure of the mobile edge calculation server.
When task i is calculated by an edge calculation server, firstly determining the transmission rate of the calculation task transmitted from a user terminal to the edge serveriThe channel gain between the ith user terminal and the edge server is hiThe information transmission power of the ith user terminal is pi. In the invention, the user terminal adopts fixed power for distribution. The transmission rate of the ith task from the ith user terminal to the edge serverriCan be expressed as:
wherein n is0Is the noise power of the system.
Further, when the edge server executes the calculation task i, the total migration delay of the task may be represented as:
wherein, ciThe computational resources required to process the ith task, siIs the data size of the ith task, riTransmission rate, f, for the ith task from the ith user terminal to the edge serveri mecAnd allocating the computing resources of the ith computing task to the edge computing server.
The ith task total energy consumption can be expressed as:
whereinAndrespectively calculating the time delay weight and the energy consumption weight when the ith task is calculated by the edge calculation server, wherein the value range is [0,1 ]]。
The method and the device for migrating the 5G edge computing tasks and allocating the computing resources provided by the invention aim at minimizing the total energy consumption of the system, simultaneously consider the computing time delay and the computing energy consumption, determine the migration variable and the computing resource allocation variable of each computing task in the computing task set, further obtain the total consumption of each computing task executed at a user terminal or an edge server, effectively reduce the system consumption and improve the resource utilization rate.
Optionally, the total system consumption is determined based on the calculation time delay of each calculation task and a weighted value of the calculation energy consumption, and the formula of the total system consumption is as follows:
wherein alpha isiFor each of the migration variables of the computing task,andcalculating a delay weight and calculating an energy consumption weight performed by the user terminal for the ith task,andand respectively calculating the time delay weight and the energy consumption weight when the ith task is calculated by the edge calculation server.
Specifically, the total system consumption can be analyzed from the perspective of the execution subject, and the sum of the total consumption of each calculation task corresponding to different execution subjects is minimized; the total consumption of the system can also be minimized by determining the corresponding computation time delay and computation energy consumption when each computation task is executed and summing the computation time delay and the computation energy consumption. And isAndis in the value range of [0,1 ]]。
The method and the device for migrating the 5G edge computing tasks and allocating the computing resources provided by the invention aim at minimizing the total energy consumption of the system, simultaneously consider the computing time delay and the computing energy consumption, determine the migration variable and the computing resource allocation variable of each computing task in the computing task set, further obtain the total consumption of each computing task executed at a user terminal or an edge server, effectively reduce the system consumption and improve the resource utilization rate.
Optionally, the preset constraint condition includes:
the computing time delay of each computing task executed by the user terminal or executed by the edge server is less than or equal to the maximum time delay allowed for processing each computing task;
when each computing task is executed by the edge server, the value of the corresponding computing resource distribution variable is less than or equal to the total computing resource of the edge server;
when all the computing tasks in the computing task set are executed by the edge server, the sum of the values of all the computing resource distribution variables is less than or equal to the total computing resources of the edge server;
and the value range of the migration variable of each computing task is {0,1 }.
Wherein α ═ { α ═ α1,...,αi,...,αIIs the migration vector of the task, the migration variable alphaiIndicates whether the ith task is executed at the edge server (alpha)iIs 1 denotes aiNo if 0), i.e., αi0 indicates that the calculation task is performed by the user terminal.For computing resource allocation vectors, fi mecAnd allocating the computing resources of the ith computing task to the edge computing server.
The preset constraint conditions to be met are as follows:
αi∈{0,1};
wherein the migration variable αiIndicates whether the ith task is executed at the edge server (alpha)iIs 1 denotes aiNo if 0), i.e., αi0 indicates that the calculation task is performed by the user terminal. f. ofi mecThe computing resources allocated to the ith computing task for the edge computing server,calculating the calculation delay T of the task i executed by the user terminal for the maximum calculation delay requirement of the ith task0iComputing time delay T of computing task i performed by edge serveri mec,The total computing resources of the server are calculated for the mobile edge.
The calculation resource allocation vector f varies according to the variation of the migration vector α of the task, for example, for a calculation task i, initially executed at the user terminal, with its migration variable αi0, the corresponding computing task is not performed by the edge server, and thus, the computing resource allocation vector fi mecAlso zero. If the execution subject of the computing task is changed to be the edge server, the corresponding migration variable alphaiAt the same time, the edge server will allocate the computing resource f corresponding to the computing task as 1i mecAnd f isi mecIs not zero.
The method and the device for migrating the 5G edge computing tasks and allocating the computing resources provided by the invention aim at minimizing the total energy consumption of the system, simultaneously consider the computing time delay and the computing energy consumption, determine the migration variable and the computing resource allocation variable of each computing task in the computing task set, further obtain the total consumption of each computing task executed at a user terminal or an edge server, effectively reduce the system consumption and improve the resource utilization rate.
The invention adopts Q learning algorithm to determine the migration variable of the calculation task, and the specific steps are as follows:
firstly, initializing user system parameters in the system, wherein the user system parameters comprise the transmitting power of a user, a task migration strategy, computing resources distributed to the user by an edge computing server and the like.
The task migration policy of the user terminal depends only on the current state and operation. Therefore, the task migration strategy can be regarded as a Markov decision process, and a Q learning method based on reinforcement learning can solve the problem. In the present invention, first the state of learning s, action a and benefit Q are defined. Q ═ s, a, indicates the gain that can be achieved by taking action a at a certain time state s.
The system state is composed of two parts, s ═ tΩAc) where t isΩThe total system cost omega. ac is the computing resources that the mobile edge compute server can allocate,
the task migration policy α and the computing resource allocation f are two action vectors, and thus the action vector can be represented asConsidering the constraints in the problem, the optimal task migration and computing resource allocation strategy can be described as:
where τ is a feasible task migration and computing resource allocation strategy, τ*Migration for optimal tasksAnd moving and calculating resource allocation strategies.
As shown in fig. 3, the problem is solved by using the Q learning method, and the solving process is as follows:
when computing using the Q learning method, the state action, the revenue function can be expressed as:
where γ is the attenuation value of the gain, k is the number of iterations,for the total cost, Q τ(s), corresponding to the (k + 1) th iterationk +1,ak+1|sk=s,akA) is the state s at the k-th iterationkThe action is akIn the case of (3), the expected value of the parameter is finally obtained as the final benefit Q of the (k + 1) th iteration by taking the corresponding benefit Q after the task migration action of tau in the (k + 1) th iteration.
The (k + 1) th action. We can first obtain Q (s, a) by state and operation. It is then stored in the Q-table, minimizing all costs. The Q value may be updated when the new Q value is less than the last Q value.
Where x represents the learning rate and where,for the total cost for the kth iteration, Q (s ', a) represents the benefit in memory, and if the maximum benefit is available in a state s ', then the state s ' is entered by selecting the correct action at the next selection.
And step 305, updating the Q-table according to the updated benefit.
The condition of iteration termination is that the Q function value in the Q-table is converged or reaches the maximum iteration number.
The method and the device for migrating the 5G edge computing tasks and allocating the computing resources provided by the invention aim at minimizing the total energy consumption of the system, simultaneously consider the computing time delay and the computing energy consumption, determine the migration variable and the computing resource allocation variable of each computing task in the computing task set, further obtain the total consumption of each computing task executed at a user terminal or an edge server, effectively reduce the system consumption and improve the resource utilization rate.
The apparatus for migrating 5G edge computing tasks and allocating computing resources provided by the present invention is described below, and the apparatus for migrating 5G edge computing tasks and allocating computing resources described below and the method for migrating 5G edge computing tasks and allocating computing resources described above may be referred to correspondingly.
Fig. 4 is a schematic structural diagram of an apparatus for migrating 5G edge computing tasks and allocating computing resources, according to fig. 4, the apparatus for migrating 5G edge computing tasks and allocating computing resources includes:
a determining module 401, configured to determine, based on a target of minimizing total system consumption, a migration variable and a calculation resource allocation variable of each of the calculation tasks, where the migration variable and the calculation resource allocation variable meet a preset constraint condition;
the total system consumption comprises a first computing time delay and a first computing energy consumption of a first computing task executed at the user terminal, and a second computing time delay and a second computing energy consumption of a second computing task executed at the edge server, wherein the first computing task and the second computing task are different.
Optionally, the migration variable and the calculation resource allocation variable are obtained based on a Q learning algorithm.
Optionally, the apparatus further includes an obtaining module 402, configured to obtain a variable of each computation task in the computation task set;
determining a first computing time delay T of the first computing task executed at the user terminal based on the computing resource required for processing the first computing task and the computing resource distributed by the first computing task executed at the user terminal0i;
Based on a conversion coefficient of user terminal equipment, the computing resources required for processing the first computing task and the computing resources allocated to the execution of the first computing task at the user terminal, and determining first computing energy consumption of the first computing task executed at the user terminal
Determining the migration time for the second computing task to migrate to the edge server based on the transmission rate of the second computing task from the user terminal to the edge server and the size of the second computing task;
determining the computation time delay executed by the second computing task at the edge server based on the computing resources required for processing the second computing task and the computing resource distribution variables corresponding to the second computing task;
summing the migration time and the calculation time delay executed by the edge server to obtain a second calculation time delay T executed by the edge server for a second calculation taski mec;
Processing the second of the calculated task based on the scaling factor of the edge serverComputing resources required by the task and computing resources allocated by the edge server for a second computing task, and determining second computing energy consumption of the second computing task executed at the edge server
Wherein the variables of each computing task include: the computing resources required for processing each computing task, the size of each computing task, and the maximum time delay allowed for processing each computing task.
Optionally, the formula of the total consumption of the system is as follows:
wherein alpha isiFor each of the migration variables of the computing task,andcalculating a delay weight and calculating an energy consumption weight performed by the user terminal for the ith task,andand respectively calculating the time delay weight and the energy consumption weight when the ith task is calculated by the edge calculation server. And isAndis in the value range of [0,1 ]]。
Optional preset constraints of the device include:
the computing time delay of each computing task executed by the user terminal or executed by the edge server is less than or equal to the maximum time delay allowed for processing each computing task;
when each computing task is executed by the edge server, the value of the corresponding computing resource distribution variable is less than or equal to the total computing resource of the edge server;
when all the computing tasks in the computing task set are executed by the edge server, the sum of the values of all the computing resource distribution variables is less than or equal to the total computing resources of the edge server;
and the value range of the migration variable of each computing task is {0,1 }.
The user terminal according to the embodiments of the present application may refer to a device providing voice and/or data connectivity to a user, a handheld device having a wireless connection function, or another processing device connected to a wireless modem. In different systems, the names of the UEs may be different, for example, in a 5G system, the UE may be called a User Equipment (UE).
Fig. 5 illustrates a physical structure diagram of an electronic device, which may include, as shown in fig. 5: a processor (processor)510, a Communication Interface (Communication Interface)520, a memory (memory)530 and a Communication bus 540, wherein the processor 510, the Communication Interface 520 and the memory 530 are communicated with each other via the Communication bus 540.
Optionally, the processor 510 may be a Central Processing Unit (CPU), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA), or a Complex Programmable Logic Device (CPLD), and may also adopt a multi-core architecture.
determining a migration variable and a calculation resource allocation variable of each calculation task based on a target of minimizing total system consumption, wherein the migration variable and the calculation resource allocation variable meet preset constraint conditions;
the total system consumption comprises a first computing time delay and a first computing energy consumption of a first computing task executed at a user terminal in a computing task set, and a second computing time delay and a second computing energy consumption of a second computing task executed at an edge server.
Furthermore, the logic instructions in the memory 530 may be implemented in the form of software functional units and stored in a computer readable storage medium when the software functional units are sold or used as independent products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It should be noted that, the electronic device provided in the embodiment of the present invention can implement all the method steps implemented by the above method embodiment, and can achieve the same technical effect, and detailed descriptions of the same parts and beneficial effects as those of the method embodiment in this embodiment are not repeated herein.
In another aspect, the present invention also provides a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform the steps of the method of computing task migration provided by the above methods, for example comprising:
determining a migration variable and a calculation resource allocation variable of each calculation task based on a target of minimizing total system consumption, wherein the migration variable and the calculation resource allocation variable meet preset constraint conditions;
the total system consumption comprises a first computing time delay and a first computing energy consumption of a first computing task executed at a user terminal in a computing task set, and a second computing time delay and a second computing energy consumption of a second computing task executed at an edge server.
On the other hand, an embodiment of the present application further provides a processor-readable storage medium, where the processor-readable storage medium stores a computer program, where the computer program is configured to cause the processor to perform the steps of the method for migrating a computing task provided in the foregoing embodiments, for example, the method includes:
determining a migration variable and a calculation resource allocation variable of each calculation task based on a target of minimizing total system consumption, wherein the migration variable and the calculation resource allocation variable meet preset constraint conditions;
the total system consumption comprises a first computing time delay and a first computing energy consumption of a first computing task executed at a user terminal in a computing task set, and a second computing time delay and a second computing energy consumption of a second computing task executed at an edge server.
The processor-readable storage medium can be any available medium or data storage device that can be accessed by a processor, including, but not limited to, magnetic memory (e.g., floppy disks, hard disks, magnetic tape, magneto-optical disks (MOs), etc.), optical memory (e.g., CDs, DVDs, BDs, HVDs, etc.), and semiconductor memory (e.g., ROMs, EPROMs, EEPROMs, non-volatile memory (NAND FLASH), Solid State Disks (SSDs)), etc.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.
Claims (10)
1. A method for migration and allocation of computing resources for 5G edge computing tasks, comprising:
determining a migration variable and a calculation resource allocation variable of each calculation task based on a target of minimizing total system consumption, wherein the migration variable and the calculation resource allocation variable meet preset constraint conditions;
the total system consumption comprises a first computing time delay and a first computing energy consumption of a first computing task executed at a user terminal in a computing task set, and a second computing time delay and a second computing energy consumption of a second computing task executed at an edge server.
2. The method for 5G edge computing task migration and computing resource allocation according to claim 1, wherein the migration variables and the computing resource allocation variables are obtained based on a Q-learning algorithm.
3. The method for 5G edge computing task migration and computing resource allocation according to claim 1, further comprising:
acquiring a variable of each computing task in a computing task set;
determining a first computing time delay T of the first computing task executed at the user terminal based on the computing resource required for processing the first computing task and the computing resource distributed by the first computing task executed at the user terminal0i;
Based on a conversion coefficient of user terminal equipment, the computing resources required for processing the first computing task and the computing resources allocated to the execution of the first computing task at the user terminal, and determining first computing energy consumption of the first computing task executed at the user terminal
Determining the migration time for the second computing task to migrate to the edge server based on the transmission rate of the second computing task from the user terminal to the edge server and the size of the second computing task;
determining the computation time delay executed by the second computing task at the edge server based on the computing resources required for processing the second computing task and the computing resource distribution variables corresponding to the second computing task;
summing the migration time and the computing time delay executed by the edge server to obtain a second computing time delay executed by the edge server for a second computing task
Edge-based serverThe computing resources required for processing the second computing task and the computing resources allocated by the edge server for the second computing task determine a second computing energy consumption of the second computing task executed at the edge server
Wherein the variables of each computing task include: the computing resources required for processing each computing task, the size of each computing task, and the maximum time delay allowed for processing each computing task.
4. The method for 5G edge computing task migration and computing resource allocation according to claim 1, wherein the formula of the total system consumption is:
wherein alpha isiFor each of the migration variables of the computing task,andcalculating a delay weight and calculating an energy consumption weight performed by the user terminal for the ith task,andand respectively calculating the time delay weight and the energy consumption weight when the ith task is calculated by the edge calculation server.
5. The method for 5G edge computing task migration and computing resource allocation according to claim 1, wherein the preset constraints comprise:
the computing time delay of each computing task executed by the user terminal or executed by the edge server is less than or equal to the maximum time delay allowed for processing each computing task;
when each computing task is executed by the edge server, the value of the corresponding computing resource distribution variable is less than or equal to the total computing resource of the edge server;
when all the computing tasks in the computing task set are executed by the edge server, the sum of the values of all the computing resource distribution variables is less than or equal to the total computing resources of the edge server;
and the value range of the migration variable of each computing task is {0,1 }.
6. An apparatus for 5G edge computing task migration and computing resource allocation, comprising:
the determining module is used for determining a migration variable and a computing resource allocation variable of each computing task based on a target of minimizing the total system consumption, and the migration variable and the computing resource allocation variable meet preset constraint conditions;
the total system consumption comprises a first computing time delay and a first computing energy consumption of a first computing task executed at a user terminal in a computing task set, and a second computing time delay and a second computing energy consumption of a second computing task executed at an edge server.
7. The apparatus for 5G edge computing task migration and computing resource allocation according to claim 6, wherein the migration variables and the computing resource allocation variables are obtained based on a Q-learning algorithm.
8. The apparatus for 5G edge computing task migration and computing resource allocation according to claim 6, further comprising an obtaining module configured to:
acquiring a variable of each computing task in a computing task set;
determining a first computing time delay T of the first computing task executed at the user terminal based on the computing resource required for processing the first computing task and the computing resource distributed by the first computing task executed at the user terminal0i;
Based on a conversion coefficient of user terminal equipment, the computing resources required for processing the first computing task and the computing resources allocated to the execution of the first computing task at the user terminal, and determining first computing energy consumption of the first computing task executed at the user terminal
Determining the migration time for the second computing task to migrate to the edge server based on the transmission rate of the second computing task from the user terminal to the edge server and the size of the second computing task;
determining the computation time delay executed by the second computing task at the edge server based on the computing resources required for processing the second computing task and the computing resource distribution variables corresponding to the second computing task;
summing the migration time and the computing time delay executed by the edge server to obtain a second computing time delay executed by the edge server for a second computing task
Determining second computing energy consumption of the second computing task executed at the edge server based on the scaling factor of the edge server, the computing resource required for processing the second computing task and the computing resource distributed by the edge server for the second computing task
Wherein the variables of each computing task include: the computing resources required for processing each computing task, the size of each computing task, and the maximum time delay allowed for processing each computing task.
9. An electronic device comprising a processor and a memory storing a computer program, wherein the processor when executing the computer program performs the steps of the method for 5G edge computing task migration and computing resource allocation of any of claims 1 to 5.
10. A non-transitory computer readable storage medium having stored thereon a computer program, wherein the computer program when executed by a processor implements the steps of the method for 5G edge computing task migration and computing resource allocation of any of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110719376.8A CN113515378A (en) | 2021-06-28 | 2021-06-28 | Method and device for migration and calculation resource allocation of 5G edge calculation task |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110719376.8A CN113515378A (en) | 2021-06-28 | 2021-06-28 | Method and device for migration and calculation resource allocation of 5G edge calculation task |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113515378A true CN113515378A (en) | 2021-10-19 |
Family
ID=78066066
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110719376.8A Pending CN113515378A (en) | 2021-06-28 | 2021-06-28 | Method and device for migration and calculation resource allocation of 5G edge calculation task |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113515378A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114047971A (en) * | 2021-11-09 | 2022-02-15 | 北京中电飞华通信有限公司 | Edge computing resource allocation method and device |
CN115766030A (en) * | 2022-11-16 | 2023-03-07 | 国家工业信息安全发展研究中心 | Data sharing method and device based on trusted exchange sharing comprehensive service platform |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170277568A1 (en) * | 2016-03-25 | 2017-09-28 | International Business Machines Corporation | Allocating resources among tasks under uncertainty |
CN109951821A (en) * | 2019-02-26 | 2019-06-28 | 重庆邮电大学 | Minimum energy consumption of vehicles task based on mobile edge calculations unloads scheme |
CN112153145A (en) * | 2020-09-26 | 2020-12-29 | 江苏方天电力技术有限公司 | Method and device for unloading calculation tasks facing Internet of vehicles in 5G edge environment |
CN112416554A (en) * | 2020-11-20 | 2021-02-26 | 北京邮电大学 | Task migration method and device, electronic equipment and storage medium |
CN112860350A (en) * | 2021-03-15 | 2021-05-28 | 广西师范大学 | Task cache-based computation unloading method in edge computation |
-
2021
- 2021-06-28 CN CN202110719376.8A patent/CN113515378A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170277568A1 (en) * | 2016-03-25 | 2017-09-28 | International Business Machines Corporation | Allocating resources among tasks under uncertainty |
CN109951821A (en) * | 2019-02-26 | 2019-06-28 | 重庆邮电大学 | Minimum energy consumption of vehicles task based on mobile edge calculations unloads scheme |
CN112153145A (en) * | 2020-09-26 | 2020-12-29 | 江苏方天电力技术有限公司 | Method and device for unloading calculation tasks facing Internet of vehicles in 5G edge environment |
CN112416554A (en) * | 2020-11-20 | 2021-02-26 | 北京邮电大学 | Task migration method and device, electronic equipment and storage medium |
CN112860350A (en) * | 2021-03-15 | 2021-05-28 | 广西师范大学 | Task cache-based computation unloading method in edge computation |
Non-Patent Citations (2)
Title |
---|
BOUTHEINA DAB: "Q-Learning Algorithm for Joint Computation Offloading and Resour", 《2019 IFIP/IEEE SYMPOSIUM ON INTEGRATED NETWORK AND SERVICE MANAGEMENT (IM)》 * |
JIANBO DU: "Computation Offloading and Resource Allocation in Mixed Fog/Cloud Computing Systems With Min-Max Fairness Guarantee", 《IEEE TRANSACTIONS ON COMMUNICATIONS ( VOLUME: 66 , ISSUE: 4 , APRIL 2018 )》 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114047971A (en) * | 2021-11-09 | 2022-02-15 | 北京中电飞华通信有限公司 | Edge computing resource allocation method and device |
CN114047971B (en) * | 2021-11-09 | 2023-12-08 | 北京中电飞华通信有限公司 | Edge computing resource allocation method and device |
CN115766030A (en) * | 2022-11-16 | 2023-03-07 | 国家工业信息安全发展研究中心 | Data sharing method and device based on trusted exchange sharing comprehensive service platform |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111953758B (en) | Edge network computing unloading and task migration method and device | |
CN110543336B (en) | Edge calculation task unloading method and device based on non-orthogonal multiple access technology | |
US11018979B2 (en) | System and method for network slicing for service-oriented networks | |
CN112286677B (en) | Resource-constrained edge cloud-oriented Internet of things application optimization deployment method | |
CN110968426B (en) | Edge cloud collaborative k-means clustering model optimization method based on online learning | |
CN112689303B (en) | Edge cloud cooperative resource joint allocation method, system and application | |
CN111953759A (en) | Collaborative computing task unloading and transferring method and device based on reinforcement learning | |
CN113225377B (en) | Internet of things edge task unloading method and device | |
CN112015545B (en) | Task unloading method and system in vehicle edge computing network | |
CN113268341B (en) | Distribution method, device, equipment and storage medium of power grid edge calculation task | |
CN113515378A (en) | Method and device for migration and calculation resource allocation of 5G edge calculation task | |
CN112272102B (en) | Method and device for unloading and scheduling edge network service | |
CN112788605B (en) | Edge computing resource scheduling method and system based on double-delay depth certainty strategy | |
CN113867843B (en) | Mobile edge computing task unloading method based on deep reinforcement learning | |
CN114585006B (en) | Edge computing task unloading and resource allocation method based on deep learning | |
CN114020326A (en) | Micro-service response time prediction method and system based on graph neural network | |
CN113810233A (en) | Distributed computation unloading method based on computation network cooperation in random network | |
CN111539534B (en) | General distributed graph processing method and system based on reinforcement learning | |
CN113645637A (en) | Method and device for unloading tasks of ultra-dense network, computer equipment and storage medium | |
CN113573363A (en) | MEC calculation unloading and resource allocation method based on deep reinforcement learning | |
CN111158893B (en) | Task unloading method, system, equipment and medium applied to fog computing network | |
US9740510B2 (en) | Minimizing overhead over-provisioning costs in machine configurations | |
CN112988275B (en) | Task perception-based mobile edge computing multi-user computing unloading method | |
CN115220818A (en) | Real-time dependency task unloading method based on deep reinforcement learning | |
CN114745386A (en) | Neural network segmentation and unloading method under multi-user edge intelligent scene |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20211019 |
|
RJ01 | Rejection of invention patent application after publication |