Cooperative task scheduling method in mobile edge computing under user mobile scene

文档序号:196791 发布日期:2021-11-02 浏览:30次 中文

阅读说明:本技术 一种移动边缘计算中用户移动场景下的协同任务调度方法 (Cooperative task scheduling method in mobile edge computing under user mobile scene ) 是由 张伟哲 魏博文 王德胜 武化龙 韩啸 邱志豪 林军任 何慧 方滨兴 于 2021-08-05 设计创作,主要内容包括:一种移动边缘计算中用户移动场景下的协同任务调度方法,属于移动边缘计算技术领域,用以解决现有移动边缘计算中的任务调度方法对于用户处于移动场景时不能有效减少任务的执行时间的问题。本发明的技术要点包括:提出任务紧迫度排序算法对任务进行排序,以让执行时间较为紧迫的任务得到优先执行;提出基于资源匹配的MEC服务器选择算法得到资源匹配度最高的MEC服务器;比较任务的执行时间,调度任务在执行时间最小的MEC服务器或本地移动设备上计算执行。在用户移动场景下,本发明方法在任务平均执行时间和任务超时率上拥有最优性能,在保证用户服务质量的同时优化了任务的平均执行时间。本发明适用于用户移动场景下移动设备与MEC服务器的协同任务调度。(A cooperative task scheduling method in a user moving scene in moving edge computing belongs to the technical field of moving edge computing and is used for solving the problem that the task scheduling method in the existing moving edge computing can not effectively reduce the execution time of a task when a user is in a moving scene. The technical points of the invention comprise: a task urgency degree sequencing algorithm is provided to sequence the tasks so that the tasks with more urgent execution time are preferentially executed; an MEC server selection algorithm based on resource matching is provided to obtain an MEC server with the highest resource matching degree; and comparing the execution time of the tasks, and scheduling the tasks to be calculated and executed on the MEC server or the local mobile equipment with the minimum execution time. Under the mobile scene of the user, the method of the invention has the optimal performance on the average execution time of the task and the task overtime rate, and optimizes the average execution time of the task while ensuring the service quality of the user. The invention is suitable for scheduling the cooperative task of the mobile equipment and the MEC server in the mobile scene of the user.)

1. A cooperative task scheduling method in a user mobile scene in mobile edge computing is characterized by comprising the following steps:

step one, acquiring a mobile equipment set, a corresponding moving track, an MEC server set, network information and a task set of all mobile equipment;

acquiring a task queue set of the mobile equipment by using a task urgency ranking algorithm; wherein, the urgency degree refers to the maximum time waiting for scheduling of a task under the premise that the execution time does not exceed the calculation deadline;

step three, acquiring a task queue set to be scheduled according to whether the mobile equipment is in a transmission state, namely when the mobile equipment is not in the transmission state, all tasks in the task queue set are ready for scheduling;

step four, calling an MEC server selection algorithm based on resource matching to each task in the standby scheduling task queue set to obtain an MEC server with the highest resource matching degree;

and fifthly, calculating and comparing the execution time of each task in the ready-to-dispatch task queue set on an access MEC server of the mobile equipment, the MEC server with the highest resource matching degree and the local mobile equipment, and calculating and executing the scheduling task on the MEC server with the smallest execution time or the local mobile equipment.

2. The method as claimed in claim 1, wherein a task of the mobile device is represented by a quadruple in the step one, and the task includes an input data size of the task, an output size of a calculation result of the task, a CPU cycle number required for processing the task, and a calculation deadline of the task.

3. The method for scheduling cooperative tasks in a user mobile scenario in mobile edge computing according to claim 2, wherein the specific steps in step two are as follows:

step two, calculating the maximum wireless bandwidth and the maximum CPU frequency in all MEC servers;

secondly, calculating the urgency of each task of the mobile equipment according to the maximum wireless bandwidth and the maximum CPU frequency, adding the urgency into a priority queue which is ordered from small to large, and ordering all tasks on the mobile equipment according to the urgency priority, wherein the most urgent task is arranged at the head position in the priority queue;

and step two, returning the task queue sets of all the mobile devices.

4. The method for scheduling cooperative tasks in a mobile scenario in mobile edge computing according to claim 3, wherein the urgency degree calculation formula in step two is as follows:

wherein maxB represents the maximum wireless bandwidth among all MEC servers;represents the maximum CPU frequency among all MEC servers; biogacyi,jRepresenting the urgency value, wherein the smaller the urgency value is, the more urgent the task is; deadlinei,jRepresenting a computational deadline for the task; dataini,jAn input data size representing a task; dataouti,jThe output size of the calculation result of the task is represented; cpusizei,jIndicating the amount of CPU cycles required to process a task.

5. The method for scheduling cooperative tasks in a user mobile scenario in mobile edge computing according to claim 4, wherein the specific steps of step four are as follows:

step four, calculating the average bandwidth, the average CPU frequency and the average queuing time of all MEC servers;

step four, calculating the time requirement of the task according to the average bandwidth and the average CPU frequency; the time requirements comprise transmission time requirements and calculation time requirements of tasks in the MEC server network;

step four, calculating a resource demand coefficient of the task according to the time demand of the task; the resource demand coefficient comprises a network resource demand coefficient and a computing resource demand coefficient;

and fourthly, calculating the resource matching degree of the task of each MEC server according to the network resource demand coefficient and the calculation resource demand coefficient, and selecting the MEC server with the task queuing time not more than 1.5 times of the average queuing time and the largest task resource matching degree as the optimal resource matching server.

6. The method according to claim 5, wherein the calculation formula of the transmission time requirement in the second step is as follows:

the calculation time requirement calculation formula is as follows:

wherein, avgwan represents the average value of network bandwidth resources of all MEC servers, i.e. the average bandwidth;represents the average of the CPU frequencies of all MEC servers, i.e. the average CPU frequency.

7. The method according to claim 6, wherein the network resource demand coefficient calculation formula in step four or three is:

the calculation formula of the calculation resource demand coefficient is as follows:

wherein, TNeti,jRepresenting the transmission time requirements of the tasks in the MEC server network; TCpui,jRepresenting the computation time requirements of the task in the MEC server network.

8. The method according to claim 7, wherein the calculation formula for calculating the task resource matching degree of each MEC server in the fourth step is as follows:

wherein, Ci(n) represents the access server serial number of the user accessing the MEC server network;representing MEC servers SkWith access point MEC serverNetwork bandwidth in between; alpha is alphaijRepresenting a network resource demand factor; beta is aijRepresenting a computing resource demand coefficient;representing MEC servers SkThe maximum CPU frequency.

9. The method according to claim 8, wherein the calculation formula of the execution time of the task on the local mobile device in the step five is as follows:

wherein the content of the first and second substances,representing the waiting scheduling time of the task;represents a maximum CPU frequency of the mobile device; n denotes a time slot, and the time that the user moves is divided into n time segments, each time segment being referred to as a time slot.

10. The method according to claim 9, wherein the calculation formula of the execution time of the task on the MEC server in step five is as follows:

wherein the content of the first and second substances,representing the waiting scheduling time of the task;representing the uploading time of the mobile equipment for unloading the task to the edge server;representing a migration transfer time for one MEC server to transfer a task to another MEC server;representing the latency of tasks offloaded to the edge server;representing edge execution time of tasks in the queue;a migration transmission time representing a calculation result of the task;indicating the time of receipt of the calculation result of the task.

Technical Field

The invention relates to the technical field of mobile edge computing, in particular to a cooperative task scheduling method in a user mobile scene in mobile edge computing.

Background

With the rapid development of technologies such as 5G communication, internet of things, big data, artificial intelligence and the like, the intelligent era of everything interconnection is accelerating, so that explosive growth of intelligent mobile equipment is caused, the applications of the intelligent mobile equipment are more diversified and complicated, the requirements on network performance, delay and computing capacity are increasingly higher, and meanwhile, new challenges are provided for wireless mobile communication network services in the aspects of computing performance, service delay and the like. On one hand, most of intelligent mobile equipment is small in size and limited in calculation and storage capacity; on the other hand, most of the smart mobile devices use batteries as energy sources, so that it is difficult to continuously process various newly emerging computing-intensive tasks, and the contradiction between the computing-intensive and low-delay characteristics of resource-limited mobile devices and new tasks becomes more remarkable. To address the above issues, the european telecommunications standards institute ETSI proposed a Mobile Edge Computing (MEC) architecture in 2014 and defined as: a new platform for IT and cloud computing capabilities is provided within a Radio Access Network (RAN) close to mobile users. The mobile edge computing sinks the computing and storage capacity of the cloud data center to the edge of the network, an IT service environment and cloud computing capacity are provided for a user at the edge of the network, and application tasks on the mobile equipment can be unloaded to the MEC server to be executed through a proper scheduling strategy, so that the energy consumption of the mobile equipment is reduced, the processing time of the tasks is reduced, and the experience quality of the user is improved.

However, the movement of the user between different base stations not only changes the distance between the mobile device and the base station, but also may span the service range of the base station, and change the size of the bandwidth allocated to the mobile device, thereby affecting the transmission time and energy consumption of the offloading task of the mobile device. In addition, how to schedule the cooperative tasks of the mobile device and the MEC server to fully utilize the MEC system resources is also a considerable problem.

Disclosure of Invention

In view of the above problems, the present invention provides a cooperative task scheduling method in a user mobile scenario in mobile edge computing, so as to solve the problem that the task scheduling method in the existing mobile edge computing cannot effectively reduce the execution time of a task when a user is in a mobile scenario.

A cooperative task scheduling method in a user mobile scene in mobile edge computing comprises the following steps:

step one, acquiring a mobile equipment set, a corresponding moving track, an MEC server set, network information and a task set of all mobile equipment;

acquiring a task queue set of the mobile equipment by using a task urgency ranking algorithm; wherein, the urgency degree refers to the maximum time waiting for scheduling of a task under the premise that the execution time does not exceed the calculation deadline;

step three, acquiring a task queue set to be scheduled according to whether the mobile equipment is in a transmission state, namely when the mobile equipment is not in the transmission state, all tasks in the task queue set are ready for scheduling;

step four, calling an MEC server selection algorithm based on resource matching to each task in the standby scheduling task queue set to obtain an MEC server with the highest resource matching degree;

and fifthly, calculating and comparing the execution time of each task in the ready-to-dispatch task queue set on an access MEC server of the mobile equipment, the MEC server with the highest resource matching degree and the local mobile equipment, and calculating and executing the scheduling task on the MEC server with the smallest execution time or the local mobile equipment.

Further, in the step one, a task of the mobile device is represented by a quadruple, and the task comprises an input data size of the task, an output size of a calculation result of the task, a CPU (Central processing Unit) cycle number size required for processing the task and a calculation deadline of the task.

Further, the specific steps of the second step are as follows:

step two, calculating the maximum wireless bandwidth and the maximum CPU frequency in all MEC servers;

secondly, calculating the urgency of each task of the mobile equipment according to the maximum wireless bandwidth and the maximum CPU frequency, adding the urgency into a priority queue which is ordered from small to large, and ordering all tasks on the mobile equipment according to the urgency priority, wherein the most urgent task is arranged at the head position in the priority queue;

and step two, returning the task queue sets of all the mobile devices.

Further, the second step is that the calculation formula of the urgency degree is:

wherein maxB represents the maximum wireless bandwidth among all MEC servers;represents the maximum CPU frequency among all MEC servers; biogacyi,jRepresenting the urgency value, wherein the smaller the urgency value is, the more urgent the task is; deadlinei,jRepresenting a computational deadline for the task; dataini,jAn input data size representing a task; dataouti,jThe output size of the calculation result of the task is represented; cpusizei,jIndicating the amount of CPU cycles required to process a task.

Further, the specific steps of the fourth step are as follows:

step four, calculating the average bandwidth, the average CPU frequency and the average queuing time of all MEC servers;

step four, calculating the time requirement of the task according to the average bandwidth and the average CPU frequency; the time requirements comprise transmission time requirements and calculation time requirements of tasks in the MEC server network;

step four, calculating a resource demand coefficient of the task according to the time demand of the task; the resource demand coefficient comprises a network resource demand coefficient and a computing resource demand coefficient;

and fourthly, calculating the resource matching degree of the task of each MEC server according to the network resource demand coefficient and the calculation resource demand coefficient, and selecting the MEC server with the task queuing time not more than 1.5 times of the average queuing time and the largest task resource matching degree as the optimal resource matching server.

Further, the transmission time requirement calculation formula in the fourth step is as follows:

the calculation time requirement calculation formula is as follows:

wherein, avgwan represents the average value of network bandwidth resources of all MEC servers, i.e. the average bandwidth;represents the average of the CPU frequencies of all MEC servers, i.e. the average CPU frequency.

Further, the network resource demand coefficient calculation formula in the fourth step and the third step is as follows:

the calculation formula of the calculation resource demand coefficient is as follows:

wherein, TNeti,jRepresenting the transmission time requirements of the tasks in the MEC server network; TCpui,jRepresenting the computation time requirements of the task in the MEC server network.

Further, in the fourth step, a calculation formula for calculating the task resource matching degree of each MEC server is as follows:

wherein, Ci(n) represents the access server serial number of the user accessing the MEC server network;representing MEC servers SkWith access point MEC serverNetwork bandwidth in between; alpha is alphaijRepresenting a network resource demand factor; beta is aijRepresenting a computing resource demand coefficient;representing MEC servers SkThe maximum CPU frequency.

Further, in the fifth step, the calculation formula of the execution time of the task on the local mobile device is as follows:

wherein the content of the first and second substances,representing the waiting scheduling time of the task; f. ofi lRepresents a maximum CPU frequency of the mobile device; n denotes a time slot, and the time that the user moves is divided into n time segments, each time segment being referred to as a time slot.

Further, the calculation formula of the execution time of the task on the MEC server in the step five is as follows:

wherein the content of the first and second substances,representing the waiting scheduling time of the task;representing the uploading time of the mobile equipment for unloading the task to the edge server;representing a migration transfer time for one MEC server to transfer a task to another MEC server;representing the latency of tasks offloaded to the edge server;representing edge execution time of tasks in the queue;a migration transmission time representing a calculation result of the task;indicating the time of receipt of the calculation result of the task.

The beneficial technical effects of the invention are as follows:

the invention provides a cooperative task scheduling method in a user mobile scene in mobile edge computing, which considers double-layer cooperative scheduling between mobile equipment and an MEC server and between the MEC server and the MEC server, takes the aim of optimizing the average execution time of a task, fully utilizes local computing resources, cooperatively utilizes the MEC server resources and reduces the average execution time of the task; furthermore, the tasks are sequenced according to the urgency of the tasks, so that the tasks with more urgent execution time are preferentially executed, and a lower task timeout rate can be obtained; therefore, under the mobile scene of the user, the method has optimal performance on the average execution time of the task and the task timeout rate, and optimizes the average execution time of the task while ensuring the service quality of the user; in addition, the method has better performance on the average execution energy consumption and unloading profit of the task.

Drawings

The invention may be better understood by referring to the following description in conjunction with the accompanying drawings, in which like reference numerals are used throughout the figures to indicate like or similar parts. The accompanying drawings, which are incorporated in and form a part of this specification, illustrate preferred embodiments of the present invention and, together with the detailed description, serve to further explain the principles and advantages of the invention.

FIG. 1 is a block diagram of a mobile edge computing system in accordance with the present invention;

FIG. 2 is a diagram of a user movement trace in the present invention;

FIG. 3 is a diagram of an edge calculation process in the present invention;

FIG. 4 is a comparison graph of average execution time of tasks under the condition of changing the number of mobile devices in the user mobile scene;

FIG. 5 is a comparison graph of average performance energy consumption of tasks under a change in the number of mobile devices in a user's mobile scenario in the present invention;

FIG. 6 is a comparison graph of task timeout rates for a user's mobile devices in a mobile scenario of the present invention;

FIG. 7 is a comparison graph of task offloading revenue for a change in the number of mobile devices in a user's mobile scenario in accordance with the present invention;

FIG. 8 is a comparison graph of average execution time of tasks under the condition of varying the number of tasks in the user's mobile scene in the present invention;

FIG. 9 is a comparison graph of average task execution energy consumption under the condition of varying task number in the user mobile scene in the present invention;

FIG. 10 is a comparison graph of task timeout rates for varying numbers of tasks in a user's mobile scenario in accordance with the present invention;

FIG. 11 is a comparison chart of the unloading profit of the task under the condition of the change of the number of the tasks of the user mobile scene in the invention.

Detailed Description

In order that those skilled in the art will better understand the disclosure, exemplary embodiments or examples of the disclosure are described below with reference to the accompanying drawings. It is obvious that the described embodiments or examples are only some, but not all embodiments or examples of the invention. All other embodiments or examples obtained by a person of ordinary skill in the art based on the embodiments or examples of the present invention without any creative effort shall fall within the protection scope of the present invention.

As shown in fig. 1, the mobile edge computing system is divided into a cloud edge three-layer architecture, the bottom layer is a mobile device layer, and the mobile device is connected to a base station through a wireless channel, and further accesses to an MEC (mobile edge computing) network to receive services from the MEC system; the middle layer is an edge server layer, the edge servers are deployed on the base station, high-bandwidth and low-delay computing services can be provided for users at positions close to the network edge, and the edge servers are connected with each other through a core network and a remote cloud; the top layer is a cloud server layer, and the cloud server has strong computing and storage capacity, but is far away from the terminal, so that the service with high bandwidth, low delay and real-time performance is difficult to provide.

The invention considers a multi-user, multi-edge mobile edge computing scenario, using S to represent a set of m edge servers:

S={S1,S2,S3,...,Sm}

the edge servers are connected via a wired network using a WANi,jTo represent an edgeEdge server SiAnd edge server SjNetwork bandwidth in between, using MD to represent a set of n mobile devices:

MD={md1,md2,...,mdn}

the mobile device is connected to only the nearest MEC server at the same time. The mobile device needs to process a plurality of tasks, and a Task is used for representing a Task set needing to be executed on the mobile device, wherein the Taski,jRepresenting a Mobile device mdiThe j-th task that needs to be performed. Representing detailed information of one task by using a quadruple (datain, dataout, cpu size, depth), wherein datain represents an input data size of the task, and dataout represents an output size of a calculation result of the task; cpusize represents the size of the number of CPU cycles required to process a task; deadline represents the computation deadline of the task.

1. Description of various models

User mobility model as shown in fig. 2, a user moves between different base stations with a mobile device, and the base stations connected to the user change according to the location of the user. In the process of moving with the user, the mobile device in fig. 2 is connected to BS1, BS2, and BS3 in sequence, and the MEC server accessed by the mobile device is also changed to MEC server 1, MEC server 2, and MEC server 3, and in this process, the transmission rate of the mobile device is also changed accordingly.

The invention constructs a user mobility model based on the obtained user movement track information, ignores the position information of the user in height, assumes that the user moves on a two-dimensional plane space, and the user movement track can be accurately predicted in T time, and uses L (T) { x (T), y (T) }, T epsilon [0, T ] to represent the predictable movement track information of the user, and the mobile equipment starts to process the calculation task from 0 moment. Dividing a moving track in a user T time into N time slots with equal size and length of T/N, when N is larger, the length of T/N of each time slot is smaller, the position of the user in each time slot can be approximately considered to be unchanged, further converting a continuous track in the user T time into N discrete track lines, and expressing a discretized user moving track by using L (N) ((x) (N), y (N)), N ∈ {0,1, 2.

Use of Ci(N), N ∈ {0,1, 2.. and N } to represent mobile device mdiThe serial number of the MEC server connected in each timeslot is given by N ═ 0,1,2kThe set of connected mobile devices may be calculated as follows:

CDSk(n)={mdi|Ci(n)=k,i=1,2,3,..,N},n∈N

local computing refers to the performance of tasks by the mobile device, usingTo represent a mobile device mdiFor convenience of discussion and research, assuming that the CPU of the mobile device will always use the maximum frequency to process the Task, in the scenario of considering the dynamic change of the user mobility, the Task is performed in the nth sloti,jThe total time of the task calculated locally can be expressed as:

wherein the content of the first and second substances,task representationi,jWaiting for scheduling time, numerically

The prior literature indicates that the power consumption of one CPU cycle can be controlled byGiven that k is a constant related to the hardware architecture, therefore Task for Taski,jIn other words, its locally calculated energy consumption is expressed as follows:

edge computing refers to offloading tasks to an MEC server for processing by a mobile device over a wireless channel. Fig. 3 shows two flows of the cooperative processing task, the first: when only the mobile device and the MEC server perform the cooperative processing task, the calculation unloading process is as follows: 1) uploading data, 2) performing calculation, and 3) receiving the result, wherein the task of the mobile equipment can be only unloaded to the MEC server accessed by the mobile equipment for execution. And the second method comprises the following steps: after the collaboration between the MEC servers is added, the computing tasks can be migrated to other MEC servers through the MEC servers to be executed, and the computing unloading process comprises the following steps: 1) uploading data, 4) migrating tasks, 5) performing calculation, 6) returning results, and 3) receiving results.

In the invention, B is used for representing the bandwidth size of the wireless channel of the base station, and the mobile equipment shares the bandwidth resource of the wireless channel of the base station. Assuming that the bandwidth resources of the base station will be evenly allocated to the mobile devices within its coverage, the MEC server S will allocate the mobile devices in the nth slotkNumber of connected devices cdnn=|CDSk(n) |, connecting MEC server SkThe bandwidth resources allocated to each mobile device are represented as follows:

due to noise interference in the wireless channel, mobile device md is moved in the presence of noise according to Shannon-Hartley theorem (Shannon-Hartley theorem)iThe maximum transmission rate that can be achieved in a wireless communication channel of a given bandwidth w is defined as follows:

wherein psiRepresenting the transmission power of the mobile device, giRepresenting the channel gain, N, between the mobile device and the base station0Representing the average power of the noise interference on the wireless channel. Product ps of mobile device transmission power and channel gaini*giRepresents the average transmission signal power of the mobile device as a ratio to the average power of the noise interferenceRepresenting the signal-to-noise ratio of a wireless channel established between a mobile device and a station. Channel gain giThe calculation method of (c) is as follows:

wherein h isnIs the corresponding rayleigh fading channel coefficient and d represents the euclidean distance between the mobile device and the base station. Thus, the transmission rate of the mobile device can be expressed as:

mobile device md according to the task model and communication model defined aboveiTask of unloadingi,jTo the edge server SkThe upload time performed may be expressed as:

transmission power of mobile device is psiThen the energy consumption in uploading data is:

in the mobile edge computing scenario proposed by the present invention, tasks may be cooperatively processed between the MEC servers, and the tasks are transmitted to the access MEC server through a wireless channel and may be migrated to other MEC servers in the network via the access MEC server for execution. By MEC server SmTransmitting tasks to an MEC server S over a core networkkMigration ofThe transmission time is defined as follows:

wherein, WANmkRepresenting MEC servers SmAnd SkThe network bandwidth size in between.

Suppose that the MEC server only executes one task at the same time, and other tasks unloaded to the MEC server need to be placed in a waiting queue for waiting, Q is usedkRepresenting MEC servers SkIs then offloaded to the edge server SkTask ofijThe latency of (a) is expressed as follows:

wherein the content of the first and second substances,is shown in queue QkTask in (1)m,nThe calculation formula is as follows:

wherein the content of the first and second substances,representing MEC servers SkThe maximum CPU frequency.

The transmission of the calculation result is similar to the task data uploading process, and the migration transmission time, the receiving time and the mobile equipment receiving energy consumption of the calculation result are defined as follows:

integrating the above process, TaskijThe total time and total energy consumption of edge calculation are calculated as follows:

2. formalized description of a problem

Use of the invention ai,j,n,kE { -1,0,1} represents a mobile device mdiTask of (1)i,jTo offload decisions. Offload decision ai,j,n,kIs set to 0 when ai,j,n,kWhen-1, the Task is expressedi,jScheduling the nth time slot to local for calculation processing; when a isi,j,n,kWhen 1, the mobile device md is representediTask of (1)i,jScheduling to MEC server S at nth time slotkPerforming calculation processing; note ai,j,n=∑k∈Sai,j,n,kWhen a isi,j,nWhen the value is 0, the Task is represented by the time slot ni,jScheduling is not yet performed.

Using the set a ═ ai,j,n,k|i∈MD,j∈TaskiN ∈ N, k ∈ S } to represent the set of scheduling policies for all tasks on all mobile devices. For a characteristic scheduling policy set a, the total time for processing tasks according to all the offload decisions in a is equal to the sum of the computation time of each task, and is expressed as follows:

the total energy consumption for executing the processing tasks according to all the unloading decisions in the scheduling policy set a is equal to the sum of the energy consumption for executing each task, and is expressed as follows:

on the premise of ensuring the service quality, the average execution time of the task is minimized as an optimization target, and the average execution time of the task can be expressed as:

in summary, in the mobile edge computing scenario, the cooperative task scheduling problem considering user mobility may be formally defined as follows:

the above equation (3) includes 5 constraints, where the constraint (3a) represents the connection limit of the mobile device, and the mobile device is connected to only one MEC server per timeslotThe MEC server connected in the middle of the Ming is set as the MEC server closest to the mobile equipment; constraint (3b) represents the scheduling number limit of tasks, one task can only be scheduled once in the whole time period N and must be scheduled once; constraint (3c) represents the task unloading limit, the task is an independent and complete entity and cannot be split, and the task can only wait for scheduling or be completely scheduled; constraint (3d) represents scheduling scenario limitation, and tasks can only be scheduled to local mobile device computation or to MEC server computation; constraint (3e) represents the quality of service (QoS) limit of the MEC system, at which the execution completion time of each task needs to be deadlinedi,jPreviously, the quality of experience (QoE) of the user would be affected otherwise.

3. Heuristic optimization algorithm based on user mobility perception

The decision variables of the cooperative task scheduling problem in the user mobile scene comprise shaping variables (task id and the like) and continuous variables (unloading time), the optimization target is a nonlinear form of the decision variables, and the problem is a mixed integer nonlinear optimization problem and an NP-hard problem. In order to solve the problem with lower complexity, the invention provides a Heuristic Optimization Algorithm (MAHO Algorithm) based on user mobility perception on the assumption that scheduling only occurs at the beginning of a time slot, and the Algorithm optimizes the average execution time of a task on the premise of ensuring the service quality of the task.

The algorithm divides the task scheduling problem into two problems: the method comprises the steps of selecting a task, a computing mode and a computing position, designing a task urgency ranking algorithm and an MEC server selection algorithm based on resource matching to solve the task selection problem and the edge computing server selection problem, and finally adding local computing and accessing MEC server computing for comparison, so as to design a complete heuristic optimization algorithm based on user mobility perception.

3.1 task urgency ranking Algorithm

In order to ensure the service quality of the task, the MAHO algorithm converts the data uploading and downloading amount of the task and the calculated CPU period demand amount into the time for uploading and downloading the task and the calculating time of the task from the time perspective, and then compares the time with the deadline in the unified time perspective. Urgency (urgency) of tasks is defined to uniformly quantify execution priority over time between different tasks. The urgency degree refers to the maximum time that a task can wait for scheduling theoretically on the premise that the execution time does not exceed the deadline, and the numerical urgency degree is calculated by the following method:

wherein maxB represents the maximum wireless bandwidth among all MEC servers,indicating the maximum CPU frequency, urgent, among all MEC serversi,jThe smaller the theoretical maximum waiting schedule time for a task, the more urgent the task is, and the task should be executed with priority. The pseudo code of the task urgency ranking algorithm is as follows:

algorithm 1 by computing Mobile device mdiEach Taski,jUrgency ofi,jAnd adds it into a priority queue task _ queue ordered from small to largeiAll tasks on the mobile device are ordered by urgency priority (lines 4-7), minimum urgencyi,jThe most urgent task will be queued at the head of queue position, and finally the task queue set taskquelsit of all mobile devices will be returned.

In the algorithm 1, all the mobile devices are traversed n times in the 2 nd row, the tasks on the mobile devices are sorted according to the urgency by using the priority queue in the 4 th-7 th rows, the time complexity is O (k × logk), so the total time complexity of the algorithm is O (n × k × logk), wherein n represents the number of the mobile devices, and k represents the number of the tasks on the mobile devices.

3.2 MEC Server selection Algorithm based on resource matching

Task for a given Taski,j(dataini,j,dataouti,j,cpusizei,j,deadlinei,j) The invention defines the amount of resources R requiredi,j={Neti,j,Cpui,jGet rid of, where, Neti,j=dataini,j+dataouti,jCpu, the network traffic size of a taski,j=cpusizei,jAnd represents the amount of computing resource demand of the task. Unifying them to time dimension for comparison, defining Taski,jTime requirement TRi,j={TNeti,j,TCpui,j}, transport time requirement TNeti,jAnd calculating the time demand TCpui,jThe calculation method of (c) is as follows:

wherein, avgwan represents an average value of wan network bandwidth resources of all MEC servers in the MEC server network,represents the average of the CPU frequencies of all MEC servers in the MEC server network. TNeti,jRepresents the Taski,jEstimate of transmission time in a server network, TCpui,jTask delegatei,jAn estimate of time is calculated.

Defining Taski,jNetwork resource demand coefficient alphaijAnd a computing resource demand coefficient betaijThe calculation method of (c) is as follows:

wherein alpha isijijAnd 1, according to the resource demands of different proportions of the tasks, finding the MEC server with the highest matching degree of the resource demands in the MEC server network. Defining MEC Server SkTaski,jResource matching matchk,i,jThe calculation method of (2) is as follows:

wherein, Ci(n) denotes an access server number of the subscriber accessing the MEC network,representing MEC servers SkWith access point MEC serverWan network bandwidth in between. In order to avoid that all tasks select the same MEC server, the algorithm also limits the selection process of the server according to the queuing time of the tasks. Algorithm Taski,jOff-load to Server SkQueue time ofAverage queuing time avgT with all servers in MEC server networkqueueMaking a comparison, empirically, ifGreater than avgTqueue1.5 times, the algorithm selects the MEC server with suboptimal resource matching degree for unloading selection. The MEC server selection algorithm pseudo code based on resource matching is as follows:

algorithm 2 Task based on Taski,jResource requirement R ofi,jCalculating its time requirement TRi,jCalculating the network resource demand coefficient alpha of the task through normalization processingijAnd a computing resource demand coefficient betaij(lines 1-3). Network resource demand coefficient alpha according to taskijAnd a computing resource demand coefficient betaijFor each server SkCalculating the resource matching degree of the task, selecting the average task queuing time with the task queuing time not more than 1.5 times and the task resource matching degree matchk,i,jThe largest MEC server acts as the best resource matching server (lines 4-12).

In the algorithm 2, the 1 st line calculates the average bandwidth, the average CPU frequency and the average queuing time of the MEC server, and the time complexity is O (m); 2, carrying out assignment operation on the 2 nd to 4 th behaviors, wherein the time complexity is O (1); lines 5-12 traverse all MEC servers to find the server with the highest resource matching degree, the time complexity in the cycle is O (1), and the time complexity in the cycle is O (m). In summary, the overall algorithm time complexity is o (m), where m represents the number of MEC servers.

3.3 heuristic optimization Algorithm based on user mobility awareness

In the above, a task urgency ranking algorithm and an MEC server selection algorithm based on resource matching are respectively provided for the task selection process, the calculation mode and the calculation position selection process, the algorithms provided in the two processes are combined, and the unloading process under the local calculation scene and the MEC server calculation scene which are not considered in the MEC server selection algorithm based on resource matching is perfected. In summary, the heuristic optimization algorithm pseudo-code based on user mobility awareness is as follows:

and the algorithm 3 calls an algorithm Task _ Unrgency _ Queue to acquire a Task Queue list Task _ Queue _ list (line 1) of the mobile equipment, acquires a Task Queue Task _ ready _ Queue to be scheduled (lines 4-10) according to whether the mobile equipment is in a transmission state, calls a algorithm Base _ Resource _ March to acquire a server with the highest Resource matching degree for each Task in the Task _ ready _ Queue, and selects the minimum time for scheduling according to the execution time of the tasks compared with the accessed MEC server and the local mobile equipment (lines 11-28).

Line 1 in algorithm 3 calls algorithm Task _ unlock _ Queue with time complexity O (n × klogk); line 3 determines whether all tasks are scheduled, possibly called O (n × k) times at most; the 5 th row to the 10 th row circularly traverse all the mobile devices to obtain a task queue to be scheduled, wherein the time complexity in the circulation is O (1), the time complexity of the circulation is O (m), the circulation is possibly called O (n) times at most, and the worst time complexity in the whole scheduling process is O (m n k); lines 11-28 schedule each task ready for scheduling, since one task can be scheduled only once, the loop needs to be executed n × k times, line 13 in the loop calls the algorithm Base _ Resource _ March with time complexity of O (m), lines 14 and 15 have assigned and calculated operation time complexity of O (1), lines 16-27 compare the task execution time under 3 scenarios with time complexity of O (1), and therefore the time complexity in the loop is O (m), and in the whole scheduling process, the loop of lines 11-28 is called n × k times with time complexity of O (m × n). In summary, the total time complexity of the algorithm is O (n × k × logk + m × n × k), where m denotes the number of MEC servers, n denotes the number of mobile devices, and k denotes the number of tasks on the mobile devices.

4. Simulation experiment

The technical effect of the invention is verified through simulation experiments, the method of the invention is compared with an algorithm in the prior research and two baseline algorithms, and the comparison algorithm is introduced as follows:

the tas (the Assignment scheme) algorithm is a multi-user multitask heuristic algorithm in a user moving scene, and the core idea is that a task with shorter calculation time is preferentially unloaded to an MEC server with the smallest execution time to reduce the overall task queuing time of the MEC server, but the considered scene is relatively static, the dynamic processes of task transmission and task execution of the MEC server are omitted, and the cooperation between the MEC servers is only limited to the MEC server above the user moving track.

The baseline algorithm MCL (Mobility Complete Local, under user Mobility) algorithm performs all the computational tasks locally; the baseline algorithm MCE (Mobility Complete Edge, completely local under user Mobility) algorithm all tasks choose to be executed at the accessed MEC server.

Comparing the performance difference of the method and the comparison algorithm in the average execution time of the task, the average energy consumption of the task, the overtime rate of the task and the unloading profit, and introducing the meaning of 4 individual performance parameters as follows: the average execution time of the tasks reflects the speed of task execution, influences the experience quality of a user and is an optimization target of the method; the average energy consumption of the tasks represents the energy consumption level of the mobile device for processing one task, and influences the service time of the mobile device, generally, the energy consumption of local computation execution is greater than that of edge computation execution; the overtime rate of the task represents that the execution time exceeds the task rate of the deadline set by the task, and the higher the overtime rate is, the lower the service quality of the MEC system is; the unloading profit represents the comprehensive profit size of the mobile device in terms of execution time and energy consumption relative to local calculation after the mobile device unloads the task to the MEC server through the scheduling policy, and is defined as follows:

wherein, TlocalAnd ElocalRespectively representing the total time and the total energy consumption of the local computation, TAAnd TERespectively represent byThe offloading policy a, total time and total energy consumption for task execution on the mobile device, α and β represent time gain and energy gain scaling factors, respectively, and α + β is 1. The experimental setting time coefficient and the energy consumption coefficient are the same and are both 0.5, namely, alpha-beta-0.5.

In the simulation experiment, the physical network topology among the MEC servers is of a honeycomb briquette network structure, the service range of each MEC server is in a regular hexagon shape, and the mobile equipment randomly moves in the service range of the MEC servers. The parameter settings of the MEC server and the mobile device are as follows:

table 1 MEC server and mobile device parameter table

The task types in the experiment are divided into 4 types, and the task types respectively represent 4 typical tasks: the method is characterized in that the method comprises the following steps of enhancing an actual task, a health monitoring task, a calculation intensive task and an information downloading task, wherein 4 tasks have respective characteristics, and specific experimental parameters are set as follows:

TABLE 2 task parameters Table

4.1 Experimental Scenario 1: under the mobile scene of the user, the number of the mobile devices changes

In the experimental scenario 1, the number of MEC servers is fixed to 19, the number of tasks of each mobile device is fixed to 10, and the number of mobile devices is increased from 20 to 200 by 20 each time. In the experimental scenario 1, the total amount of tasks in the MEC system is increasing, but the corresponding local resources are also increasing. The variation of the average execution time of the tasks of the 4 algorithms with the increase of the number of the mobile devices in the user moving scene is shown in fig. 4. The experimental results show that the MAHO method always has the minimum average execution time, the TAS comparison algorithm has the suboptimal result, the average execution time of the tasks of the MCE algorithm is linearly increased, the average execution time of the tasks of the MCE is maintained at a level, and the change is not obvious. The MAHO algorithm of the method of the invention aims at optimizing the average execution time of the tasks, fully utilizes local computing resources, and cooperatively utilizes MEC server resources, so that the average execution time of the tasks can be reduced, and the MAHO algorithm always has the minimum average execution time.

In addition, the number of mobile devices increases, the upper limit of the wireless channel bandwidth available to each mobile device decreases, the transmission time of tasks increases during edge calculation, and more tasks are offloaded to MEC for execution, which also results in that the queuing time of the MEC server increases, so except for completely executing the MCL locally, the average execution time of tasks of other algorithms increases with the number of mobile devices, while the MCL algorithm does not perform edge calculation, and executes tasks only using local resources, and the execution process is not affected by the MEC server and other mobile devices, so the average execution time of tasks of the MCE algorithm is not affected by the number of mobile devices, and hereinafter, the average execution energy consumption and the task timeout rate of tasks of the MCE algorithm also change at a horizontal level.

In the user mobile scenario, the variation of the average execution energy consumption of the tasks of the 4 algorithms as the number of mobile devices increases is shown in fig. 5. According to the method, after the number of the mobile devices is larger than 70, the average execution energy consumption of the tasks is lower than that of a comparison algorithm TAS, the increase rate of the energy consumption is lower than that of the TAS, and the MCL always has the maximum energy consumption. Only the energy consumption problem of the mobile equipment is discussed in the invention, the mobile equipment needs to execute a calculation task locally during local calculation, and the mobile equipment needs to be responsible for the energy consumption of the calculation task; the mobile equipment transmits the task to the MEC server for execution during edge calculation, the mobile equipment only needs to be responsible for transmitting the energy consumption of the task, generally speaking, the energy consumption of the calculation task is greater than that of the transmission task, and therefore the MCE algorithm always has the minimum energy consumption. Compared with the TAS, the method can more reasonably configure the proportion of the edge tasks and the local tasks, so that the method has smaller average execution energy consumption of the tasks compared with the TAS, and the method is more obvious along with the increase of the number of the mobile devices.

The variation of the task timeout rate of the 4 algorithms with the increase of the number of mobile devices in the user mobile scenario is shown in fig. 6. The experimental results show that the task timeout rate of the method of the invention is always kept to be the lowest, the task is sequenced by the MAHO algorithm according to the urgency of the task, so that the task with more urgent execution time is preferentially executed, and a lower task timeout rate can be obtained.

The variation of the task offload benefit of the 4 algorithms with the increase of the number of mobile devices in the user mobile scenario is shown in fig. 7. From the experimental results, it can be seen that MAHO of the method of the present invention has the maximum unloading yield after the number of mobile devices is greater than 60. The unloading profit is an unloading strategy, and compared with a local algorithm, the unloading profit calculated completely locally is 0 all the time in time and energy consumption. With the increase of the number of mobile devices, the load of the MEC server increases, the time of task edge calculation increases, the energy consumption increases, and the unloading profit decreases.

4.2 Experimental scenario 2: under the mobile scene of the user, the task number of the mobile equipment changes

In the experimental scenario 2, the number of MEC servers is fixed to 19, the number of mobile devices is fixed to 50, and the number of tasks of the mobile devices is increased from 10 to 100 by 10 each time. In the experimental scenario 2, although the total amount of tasks in the MEC system is increasing, the resources of the whole MEC system are not changed.

The variation of the average execution time of the tasks of the 4 algorithms with the increase of the number of tasks of the mobile device in the user moving scene is shown in fig. 8. The experimental results show that the MAHO method always has the minimum average task execution energy consumption. Since the total resource amount of the whole MEC system is not changed, as the number of tasks of the mobile device is increased, the waiting scheduling time of the tasks is increased, and therefore the average task execution time of the 4 algorithms is increased along with the increase of the number of the tasks.

In the user mobile scenario, the variation of the average execution energy consumption of the tasks of the 4 algorithms as the number of tasks of the mobile device increases is shown in fig. 9. From experimental results, it can be seen that the algorithm MAHO has suboptimal energy consumption. The number of the mobile devices is kept unchanged, which means that the average bandwidth possessed by the mobile devices is unchanged, the transmission energy consumption of the tasks is less affected, and in addition, although the number of the tasks is increased, the number of the tasks scheduled at the same time is kept unchanged, so as the number of the tasks is continuously increased, the unloading strategy of the MAHO and TAS algorithms maintains the ratio of the local computation to the edge computation at a fixed level, and as seen from fig. 10, the average execution energy consumption of the tasks of the MAHO and TAS algorithms tends to a fixed value as the number of the tasks is increased.

The variation of the task timeout rate of the 4 algorithms with the increase of the number of tasks of the mobile device in the user mobile scenario is shown in fig. 10. From the experimental results, it can be seen that the task timeout rate of MAHO of the method of the present invention is always kept to be the lowest, and the timeout rate of TAS algorithm is obviously increased as the number of tasks is increased.

The variation of the task offload benefit of the 4 algorithms with the increase of the number of tasks of the mobile device in the user mobile scenario is shown in fig. 11. The experimental results show that the MAHO algorithm of the method keeps higher unloading yield, and the TAS algorithm obviously reduces the unloading yield along with the increase of the number of tasks.

The experimental results in the experimental scene 1 and the experimental scene 2 are comprehensively analyzed, and under the user mobile scene, the MAHO algorithm of the method has optimal performance on the average task execution time and the task timeout rate, so that the average task execution time is optimized while the user service quality is ensured. In addition, the MAHO algorithm of the method has better performance on average task execution energy consumption and unloading profit, has optimal performance under the condition of more mobile devices, and is inferior to the MCE algorithm in the aspect of average task execution energy consumption.

While the invention has been described with respect to a limited number of embodiments, those skilled in the art, having benefit of this description, will appreciate that other embodiments can be devised which do not depart from the scope of the invention as described herein. The present invention has been disclosed in an illustrative rather than a restrictive sense, and the scope of the present invention is defined by the appended claims.

24页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种被用于无线通信的节点中的方法和装置

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!