Abstract
Computation offloading is a key computing paradigm used in mobile edge computing. The principle of computation offloading is to leverage powerful infrastructures to augment the computing capability of less powerful devices. However, the most existing computation offloading algorithms assume that the mobile device is not moving, and these algorithms do not take into account the reliability of task execution. In this paper, we firstly present the formalized description of the workflow, the wireless signal, the wisdom medical scenario and the moving path. Then, inspired by the Bayesian cognitive model, a trust evaluation model is presented to reduce the probability of failure for task execution based on the reliable behaviors of multiply computation resources. According to the location and the velocity of the mobile device, the execution time and the energy consumption model based on the moving path are constructed, task deferred execution and task migration are introduced to guarantee the service continuity. On this basis, considering the whole scheduling process from a global viewpoint, the genetic algorithm is used to solve the energy consumption optimization problem with the constraint of response time. Experimental results show that the proposed algorithm optimizes the workflow under the mobile edge environment by increasing 20.4% of successful execution probability and decreasing 21.5% of energy consumption compared with traditional optimization algorithms.
Introduction
Mobile edge computing (MEC) is a new computing approach in which computation tasks carried by a mobile device (MD) can be offloaded to edge servers, the cloud or computed locally [1]. In recent years, with the rapid development of smart mobile devices and the Internet of Things (IoT), a great progress of the MEC system has been achieved [2]. However, the hasty development of the MEC also leads to the neglection of some challenges to a large extent in MEC platforms and their enabled applications.
On the one hand, when the MD is in the communication range of the edge server, the MD and the edge server can communicate with each other via the wireless network. As the MD moves, the communication rates between them will change constantly. Therefore, the mobility is an important property in the MEC system, and the mobility of the MD should be considered.
On the other hand, when the computation tasks are offloaded to a computation resource, it is generally considered that these tasks are executed successfully. However, in an MEC system with multiple computation resources, communication links and computation resources are inevitably unreliable due to the open and unattended environment, which has a significant impact on task execution and scheduling [3]. Therefore, novel algorithms are needed to schedule the tasks on the trusty resources to lower the ratio of failure execution, especially in the wisdom medical scenario.
Wisdom Health is a real-time and ubiquitous healthcare service. At present, in the research of wisdom health, the focus is on how to use the cloud or the edge to complete the challenges of massive health data and improve service performance, including related issues such as collection, transmission and calculation of health big data [4]. In the meantime, the patients are always in a state of motion, they need mobile wisdom health services to maintain long-term health monitoring and real-time analytics. Therefore, with the appearance of new breeds of applications, such as the human motion inspection and the intensive care therapy, which have high mobility demands, mobile devices face challenges in terms of time constraint, mobility, and consequent reliability. It is nontrivial to build a reliable execution environment and further support user mobility in wisdom medical scenario. Many existing studies have focused on the task scheduling in MEC environment [5–16], the key technical areas they cover include latency time, energy consumption and terminal mobility. However, the mobility of the MD and the reliability of the computation resources have not been studied in-depth. Further study is needed to apply the task offloading strategy to a more complex scenario, such as the wisdom medical scenario.
In this paper, we focus on the wisdom medical scenario, in which the moving MD sharing the cloud or the edge. Specially, we optimize the scheduling of computation tasks to minimize the energy consumption and reduce the failure probability. The main contributions are summarized as follows: Due to the open and unattended environment, workflow tasks should be offloaded to the trusty resources to lower the ratio of failure execution. Inspired by the Bayesian cognitive model and the trust relationship model of sociology, a new trust evaluation model is presented to reduce the probability of failure for task execution based on the reliable behaviors of multiply computation resources in MEC environment. According to the location and the velocity of the mobile device, a novel mobility-aware energy consumption model based on the moving path in wisdom medical scenario is proposed. In addition, task deferred execution strategy and task migration strategy are introduced to guarantee the service continuity. Considering the whole scheduling process from a global viewpoint, by integrating the trustworthiness of multiply computation resources, we propose a reliability and mobility aware task offloading and scheduling algorithm based on genetic algorithm. The performances of the proposed algorithms are analyzed theoretically and evaluated experimentally. Both theoretical analyses and experimental results show that the proposed algorithm can optimize the workflow by increasing 20.4% of successful execution probability and decreasing 21.5% of energy consumption compared with traditional optimization algorithm.
The remainder of this paper is organized as follows: Section 2 presents the related work. The system model and problem definition are proposed in Section 3. Section 4 and Section 5 proposes the novel algorithm and model. Section 6 demonstrates the experimental results. Finally, Section 7 concludes this paper.
Related work
Computation offloading is an important technique in MEC system, in which the MD can leverage remote servers to speed up computing. As shown in Fig. 1, the granularity of offloading can be classified into four categories: (a) Local execution: The whole workflow task is executed locally; (b) Full offloading strategy: The whole workflow tasks are offloaded and executed by the edge servers; (c) Partial offloading strategy: A part of the workflow tasks are offloaded and executed by the edge servers [5]; (d) Multi-resource computation offloading strategy: The task can be offloaded to both the edge and the cloud [6]. The task offloading strategy determines whether full or partial offloading is applicable, what can be offloaded, and how it can be offloaded. Therefore, the computation offloading is a very complex process affected by different factors, such as optimization objective, user preferences or connection quality [7].

Granularity of offloading strategy.
In recent years, both industry and academia have invested tremendous efforts in the field of computation offloading and have made great progress. Many previous works have investigated the offloading strategy in MEC systems with two optimization objectives: execution time and energy consumption.
(1) Minimization of execution time. The main objective of the first category of previous work is to reduce the execution time. Liu et al. [8] investigate the computation offloading problem by one-dimensional search algorithm. The computation tasks are scheduled based on the application buffer queuing state, execution state and power consumption. Chamola et al. [9] consider a network of some connected cloudlets which provide service to the MDs. These connected cloudlets are stationed near the mobile devices. Accordingly, the computation intensive tasks are offloaded to the cloud, and the communication intensive tasks are offloaded to the cloudlets to reduce the latency. Kuang et al. [10] transform the original offloading problem to the classic 0-1 knapsack problem by the filtering process, and a dynamic programming based offloading strategy is proposed to enable the device to receive offloading results faster.
(2) Minimization of energy consumption. The second category of previous work studies the computation offloading problem to minimize the energy consumption of MD by satisfying latency constraints. You et al. [11] study a consumed energy minimization problem based on time-division multiple access and orthogonal frequency-division multiple access. The authors assume that time is divided into several time slots. During each time slot, MDs can offload a part of their data to the edge servers according to their channel gains and local energy consumption. Zhang et al. [12] intend to reduce the energy consumption based on an iterative search algorithm combining the interior penalty function. The residual energy of the mobile devices’ battery is introduced into the definition of the weighting factor. Fang et al. [13] investigate the energy consumption problem in a multi-user MEC system. An online control algorithm is proposed by leveraging the Lyapunov optimization technique and jointly considering CPU frequency scaling, transmit power allocation and subcarrier bandwidth assignment.
With gradually deepening the study on computation offloading, the trade-off analysis between the execution time and the energy consumption for the offloading decision is becoming a hot research scholars and cutting-edge issues. Some papers aim to find a proper trade-off between these two metrics [14]. In addition, end devices may need to be constantly moving in a MEC environment in reality. Unfortunately, the above studies do not take into account the mobility of the MDs, which is an important property in some specific application scenarios.
In view of this problem, Deng et al. [15] design a centralized computation offloading framework for partitionable applications, which can dynamically offload the data to the edge server. However, the premise of applying this framework to practice properly is that the data stream application is partitionable, which makes cross-edge collaboration possible. Moreover, the latency in the downlink transmission is ignored in this paper. Zhu et al. [16] consider a more complex scenario. In the offloading process, the input data has to be transmitted to the edge server, and the edge server will transmit the output data back to the mobile device after the execution of the task. Therefore, the moving mobile devices share multiple heterogeneous edge servers in the MEC system. Nevertheless, when the mobile device offloads computation to the MEC, the task migration can guarantee the service continuity and QoS requirements. Yet the task migration is not considered in [16]. When the distance between MD and ES beyonds the maximum communication range, MD is out of contact with the recently communicated edge server, and then the computational results of the offloaded task cannot be placed back on the original edge server which makes the makesplan larger.
Xu et al. [17] propose a Mobility-aware workflow offloading and scheduling strategy (MAWOSS), which covers the task scheduling algorithm and tasks migration strategy. However, the proposed patient health monitoring scenario and the wireless signal model are relatively simple. Furthermore, the use of the task migration is unavoidable to cause some reliability problems. However, this paper ignores the failure probability of the offloading process and execution process. In a field as complicated as MEC system, there are many sources of error(such as connection failure, execution failure, node crash or input error), most of which will lead to the failure execution of the tasks. Although various trust models have been proposed in the traditional distributed computing environments (such as grid computing [18], cloud computing [19] and wireless sensor network [20]). However, the mobile edge computing pushes the computing from the centralized cloud to decentralized edges, which makes these previous studies unsuitable for resource-constrained MEC system. Therefore, novel trust management method and task offloading strategy are required to optimize the selection of trustworthy computation resources.
Wisdom medical scenario
In this subsection, the characteristics and environment under which MEC system designed are described. Surgery and postoperative care are classic scenarios of wisdom medical. Figure 2 illustrates the cross-sectional view of the wisdom hospital, and this graph is referenced from the cross-sectional graph of the emergency department in Tongling People’s Hospital. In this wisdom medical scenario, there are various medical zones, such as operating room, emergency treatment room, anesthetic room and recovery room. After the operation, the patients lie in the mobile wisdom bed, then the mobile wisdom bed is used to help the patients to move into the recovery room. The moving path and the moving speed of the mobile wisdom bed are predetermined. While moving, the mobile wisdom bed provides health monitoring and analytics for the patients. These artificial intelligence based applications have high computing resource demands. Accordingly, the mobile wisdom bed faces challenges in terms of computational power, storage and battery life. We optimize the scheduling of the workflow tasks to reduce the energy consumption and the failure probability and satisfy the deadline of each task as well.

Cross-sectional view of wisdom hospital and moving path.
For the sake of simplicity, we describe the wisdom medical scenario in an orthogonal coordinate system. As illustrated in Fig. 3, the wisdom medical scenario shown in Fig. 2 is transformed into a planar graph. This planar graph is divided into a lot of square grids and the size of each grid can be adjusted when necessary. The edge servers, operating room and recovery room are already marked in this planar graph according to their coordinate position. We model the moving path(MP) as a set of continuous and reachable position coordinates, MP ={ coord1, coord2, …, coord n MP }, where n MP is the total number of the grids in the moving path, coord i is the i-th grid. Each grid can be represented by two-tuples, coord i =(x i , y i ), where x i is the x-coordinate of coord i , and y i is the y-coordinate of coord i . The different moving paths between two medical zones are marked in threads of different colors in Fig. 3.

Planar graph of wisdom hospital and moving path in MEC environment.
In this subsection, we will provide some basic terminologies and notations which are necessary for the understanding of subsequent results. We consider a MEC system in the wisdom hospital with MD, cloud and several edge servers as shown in Fig. 3. Summary of key symbols used in this section can be found in Table 1. The medical workflow and multiply computation resources are defined as follows.
Summary of key symbols in Section 3
Summary of key symbols in Section 3
Figure 4 demonstrates an example. When the patients lie in the mobile wisdom bed after the operation, the mobile wisdom bed provides health monitoring and analytics for the patients, and the blood pressure and the heart rhythm should be extracted to evaluate the health of the patients. The DAG task-graph of this medical workflow includes 6 tasks, where W = {w1, w2, w3, w4, w5, w6}, E = {(w1, w2), (w1, w3), (w2, w4), (w3, w5), (w4, w6), (w5, w6)}.

Workflow instance and abstract workflow DAG graph.
In the offloading process, the energy consumption of the MD is generated by the transmitting procedure, receiving procedure and idle procedure. Besides, when the task is computed locally, the energy consumption is generated by the task execution. Suppose that the transmitting, receiving, idle and execution powers of the mobile device are p tra , p rec , p idle and p exec respectively, and then the energy consumption P={p tra , p rec , p idle , p exec }.
In the meantime, for each edge server, there is a communication range, which means that the increasing distance between a mobile device and an edge server will decrease the data transfer rate until the distance extends beyond the positive radius of communication. Suppose the transmission bandwidth of edge server es j be BW es j , the instantaneous transmission rate R(es j ,MD) between es j and MD can be expressed as follow:
In this section, we first propose a Bayesian method based trust evaluation model for multiply computation resources. Then, we present a mobility-aware energy consumption model in the MEC system. Finally, we extend this mobile model by considering the trustworthiness of multiply computation resources. Summary of key symbols used in this section can be found in Table 2.
Summary of key symbols in Section 4
Summary of key symbols in Section 4
Trust is the core of relationships in social networks [21]. Trust degree is the evaluation of certain entities’ reliable behaviors. MEC system and social networks have great similarities. In an MEC system, trust reflects the computation resource’s ability of providing service. Before the tasks are offloaded to the other computation resources, MD needs to transmit evaluation messages to obtain the trust degree of the target computation resource and guide its cooperation decision. In this subsection, we present a novel trust evaluation model for the edge servers, cloud and MD. The Bayesian cognitive model and Beta reputation system is used to evaluate the trust degree because of their accuracy of describing interaction behavior and low computational complexity.
(1) Trust degree of the edge servers
The trust evaluation model for the edge servers is shown in Fig. 5. There are two kinds of trust degree: direct and indirect. As shown in Fig. 5(a), when there are n times direct interactions between the mobile device and the edge server es
j
, es
j
∈ES, we define the probability of successful interaction at n + 1 times as the direct trust degree

Trust evaluation model for edge server.
1) Direct trust degree evaluation approach
In this paper, the interaction results between MD and es
j
are described by binomial events(successful interaction or failure interaction). When MD calculates the trust degree of es
j
, the previous interactions between MD and es
j
are used to represent the direct trust degree MD has on es
j
. Suppose that the previous interactions between them are n times, let the successful interactions be α times, the failure interactions be β times. Define the direct trust degree
However, as mentioned in Formula (2), the accuracy of the direct trust degree is related to the number of total interactions. Therefore, the measure of the confidence level of
As the confidence level and the accuracy of interval estimation cannot be improved together, we set a threshold of confidence level γ0, and improve the accuracy by increasing the number of interaction records. The relationship between n0, γ0, and ɛ can be expressed as follow:
2) Indirect trust degree evaluation approach
When there are few interactions or even no interactions between MD and es j , the indirect interaction records is needed to calculate the indirect trust degree. For example, as shown in Fig. 5(b), the edge server es k is an intermediate resource. MD combines the indirect records(between es k and es j ) sent by es k with its own interaction records(between MD and es j ) to calculate the indirect trust degree. The selection of intermediate resources is depended on the trust degree.
Assume that the interactions between MD and es k , es k and es j are independent. Suppose the number of interactions between them be n1, n2 respectively, in which the successful interactions and the failure interactions are (α1, β1) and (α2, β2) respectively. The indirect trust degree of MD has on es j by es k can be calculated as follow:
3) Update process of trust degree
Just as individuals in social networks, the trust degree of computation resources is continuously changing over time. The recent interaction records have more impact than the old interaction records, and the old interaction records gradually lose their reference value. Therefore, the concept of time sliding window and time slot are used to improve the dynamic adaptability in this paper. As shown in Fig. 6, we define the time slot as 90 seconds, and the time sliding window is composed of m recent time slots. Decay factor η(0≤η≤1) is used to dynamically set the weights of the corresponding time slot. Thus, the interaction records in Formula (5) and Formula (8) should be redefined as follows:

Time sliding window.
(2) Trust degree of Cloud
The cloud environment has played a major role to support general computing systems in recent years. Generally speaking, the execution of tasks in the cloud environment is esteemed to be trustworthy, the unreliability factors of offloading tasks to the cloud will be more from the communication link between MD and the cloud. Therefore, we should evaluate the trust degree of these communication links.
Suppose that there are n times interaction records between MD and the cloud, in which the successful interactions are α times and the failure interactions are β times. n0 is the minimum sample size required for the trust evaluation. Due to the lack of interaction records, it is not suitable to use
The similarity degree of different MDs is calculated by cosine similarity as follows:
(3) Trust degree of MD
When the whole computation is done locally at MD, the offloading to the cloud and MEC is not performed and the communication link is not required. However, computation-intensive and high real time demanding applications may lead to the task execution failure at MD due to the limited battery and computation capacity. Therefore, we should evaluate the trust degree of MD.
Suppose that there are n times execution records at MD, in which the successful execution records are α times and the failure execution records are β times. The trust degree is calculated by Formula (8) and Formula (12).
The similarity degree of different MDs is calculated by cosine similarity as follows:
As discussed in Section 3, the patients lie in the mobile wisdom bed after the operation, the mobile wisdom bed is used to help the patients to move between two medical zones. While moving, the mobile wisdom bed provides health monitoring and analytics for the patients. Thus, the mobile device should determine whether methods to be executed remotely or locally according to the energy consumption and execution time model. Besides this, the possibility to leverage the task migration and task deferred execution should be considered to guarantee the service continuity and satisfy the execution time constraint.
In this subsection, we present a novel mobility-aware energy consumption model for the edge server, the cloud and the mobile device.
(1) Energy consumption model of the edge servers
In the normal offloading process, when the MD is in the communication range of the edge server, the task data should be transmitted to the edge server, then the edge server will transmit the output back to the MD after finishing the task execution. Therefore, the energy consumption of the edge server is consisted by the energy consumption of transmitting procedure, receiving procedure and idle procedure. Let us denote n
es
as the number of tasks offloaded to the edge servers, the execution time T
es
and the energy consumption E
es
can be calculated as follows:
In Formula (14), when the task w
j
∈W is offloaded to an edge server(denoted by es
j
), f
es
j
denotes the computational capability of es
j
, l
j
is the CPU cycles frequency that is required to process w
j
.
As shown in Fig. 5 and Fig. 7, firstly, we assume that the moving path between two medical zones is predetermined. Then we define (TraX
inti
, TraY
inti
) and (TraX
end
, TraY
end
) as the coordinate of the initial position and the end position in transmitting procedure. Suppose that the speed of the mobile wisdom bed is V(m/s), the length of each grid is L(m). Thus, the size of data transferred Data|Loc
es
j
,Loc
MD
| within each grid is:
As illustrated in Fig. 8, the position coordinate of MD is changing from (TraX
inti
, TraY
inti
) to (TraX
end
, TraY
end
) along the pre-set path. Therefore, when the summation of the transmitting data within these grids is equal to or greater than the input data size of task w
j
, the transmitting procedure of w
j
is over. Let us denote

Energy consumption model of edge servers.

Transmitting procedure of mobile device.
Thus, the time of transmitting procedure
The coordinate of the end position (TraX
end
, TraY
end
) is in the
(2) Energy consumption model of task migration and task deferred execution
When the MD offloads computation to the edge server, it is important to ensure the service continuity. However, when an offloaded task is processing or transmitting by an edge server, MD has moved out of the communication range. The service continuity can be guaranteed either by the task migration or by task deferred execution. In fact, there exist three cases to cope with this problem.
1) As illustrated in Fig. 9, when MD is not in the communication range of es j , and there is no edge server satisfying the condition of wireless communication along the moving path of MD, w j cannot be offloaded to the edge.

Situation of offloaded failure.
2) As illustrated in Fig. 10(a), w
j
cannot be offloaded to the edge in the transmitting procedure. However, there are several edge servers satisfying the condition of wireless communication along the moving path of MD. “Task deferred execution” is used to guarantee the service continuity by selection of the subsequent nearest edge server. We define the deferred time as

Task deferred execution and task migration.
3) As illustrated in Fig. 10(b), MD is moving out of the communication range of es
j
in the receiving procedure. In the meantime, there are several edge servers satisfying the condition of wireless communication along the moving path of MD. “Task migration” is used to migrate the task to another edge server. Let us denote f
curr
and f
tgt
as the computational capability of the current edge server and target edge server respectively, denote R
migr
as the instantaneous transmission rate between two edge servers. There are two options to cope with the task migration: ① The whole task is migrated to target edge server and executed by it, the migrated data is IN
j
and the execution time
(3) Energy consumption model of the cloud
When the task w
k
∈W is offloaded to the cloud, the energy consumption of the cloud is consisted by the energy consumption of transmitting procedure, receiving procedure and idle procedure. Let us denote n
cc
as the number of tasks offloaded to the cloud, the execution time T
cc
and the energy consumption E
cc
can be calculated as follows:
(4) Energy consumption model of the mobile device
When the task w
i
∈W is executed locally, the energy consumption is generated by task execution. Let us denote n
md
as the number of tasks executed by MD, the execution time T
md
and the energy consumption E
md
can be calculated as follows:
According to the trust evaluation method presented in Section 4.1, we extend the energy consumption model by considering the trustworthiness of multiply computation resources. Thus, the energy consumption in Formula (19), Formula (20) and Formula (21) should be redefined as follows:
In this section, we first present a workflow task partitioning algorithm(WTP-Algorithm). Then, we construct a task offloading strategy and scheduling algorithm based on the trust evaluation model and mobility-aware energy consumption model. The proposed algorithm has two main phases: (1) According to the location and the velocity of MD, the selection optimization algorithm is used to screen out the optimal offloading edge server; (2) Considering the whole scheduling process from a global viewpoint, we propose a reliability and mobility aware task offloading and scheduling algorithm.
Workflow task partitioning algorithm
The workflow task is associated with its successor task by priority queue. Denote N as the total number of the priority level, then the priority queues can be represented as C={S1,S2, ... , S
N
}, where S
i
is a matrix of task execution, (i∈[1,N], S
i
> S
i
+1). S
i
is constructed as follows:
When the task is prepared to offloaded to the edge servers, the proposed algorithm is used to find the optimal offloading edge server according to the initial location and the velocity of MD. The edge server will not be added to the candidate set of edge servers when it is executing other tasks. Then we update the position coordinate of MD as the initial location for the subsequent task.
Reliability and mobility aware task offloading and scheduling algorithm
In this subsection, we propose a reliability and mobility aware task offloading and scheduling algorithm based on genetic algorithm(GA).
(1) Encoding scheme
0-1 encoding method is used to encode the task schedule in this paper. Every chromosome represents a solution to the problem. Let us denote C
k
as the k-th generation,
(2) Fitness function
According to the trust evaluation model and mobility-aware energy consumption model proposed in section 4, we construct the fitness function as follows:
(3) Selection operator
The selection operator is carried out by the roulette method. According to the roulette choice strategy in the evolution process, the bigger the fitness value is, the higher the frequency of being chosen is. Let us denote
(4) Crossover operator
In order to reduce the possibility of premature convergence, a crossover operator is applied to exchange information between randomly selected parent chromosomes. In this paper, the crossover operator is carried out by the vector crossover method. Suppose the probability of a crossover is p c .
(5) Mutation operator
The purpose of mutation is to prevent the selection and crossover from the GA getting stuck in a local optimum. Denote p m as the mutation probability.
(6) Algorithm description
In the first step of the proposed algorithm, the workflow tasks are associated with its successor task by priority queue, the computation complexity of WTP Algorithm is O(N). In the second step, according to the location and the velocity of MD, SOAES algorithm is used to screen out the optimal offloading edge server within the positive radius of communication. The inner loop of the SOAES algorithm is based on the greedy algorithm. Suppose that the number of candidate edge servers is D, the computation complexity of SOAES Algorithm is O(D). In the third step, RMA-TOS algorithm mainly includes three parts: initialization of the task scheduling plan, iterative process, and return the best task scheduling plan. The outer loop updates the task scheduling plan and algorithm parameters. The inner loop calculates the fitness value of each task scheduling plan according to the moving pathway and position coordinates. Suppose that the number of initial task scheduling plans, iterations and tasks are M, k and V, respectively. The computation complexity of SOAES Algorithm is O(MkV).
In order to describe the relationships among WTP algorithm, SOAES algorithm and RMA-TOS algorithm, a basic step flowchart used for the proposed system model is shown in Fig. 11.

Basic step flowchart used for the proposed system model.
In order to analyze the proposed RMA-TOS algorithm, we develop the simulation experiment based on the MATLAB R2017b(The MathWorks, Inc., MA, U.S.A) platform. In the experiments, the workflow structure is defined using the Montage workflow which is widely used for simulation experiments [23]. The MEC servers have been randomly deployed in a 400m×100 m area. This area is divided into 40000 square grids, the position coordinates of the simulated medical zones, edge servers and moving path are set beforehand. The maximum radius of each edge server is randomly generated from [25, 50].
The transmitting, receiving, idle and executing powers of MD are set to 0.1 W, 0.05 W, 0.02 W and 0.5 W respectively. The instantaneous transmission rate between MD and the cloud is set to 5Mb/s, the instantaneous transmission rates between MD and the edge servers are related to the distance. The CPU frequency of MD and the cloud are set to 1 GHz and 8 GHz respectively, the CPU frequency of edge servers are randomly generated from [2GHz∼4GHz] [24].
Workflow task graph is generated randomly, the required CPU cycles frequency of each task of the task graph is constrained between 1 and 5 GHz, the input data size and output data size of each task is constrained between 1∼15Mb [23]. The size of data transferred among tasks is decided by the communication to computation ratio (CCR), and the task type is related to the value of CCR. The computation intensive applications can be modeled by assuming CCR = 0.1; In contrast, the communication intensive applications can be modeled by assuming CCR = 10. According to the former literatures, we evaluate the algorithm with CCR as 1.0 [24, 25]. The deadline of each task is 100% more than the time of the same task executed by a virtual machine with 1.4 GHz CPU frequency [26].
The failure probabilities of communication failures and execution failures are sampled following the Weibull distribution, where the shape parameter is 0.75, the scale parameter is 60. Moreover, one failure often makes the computation resource more easily to encounter another failure. The failure frequency of recently failed resources is constrained between 1∼3, which obey uniform distribution [27, 28]. There are two kinds of non-cooperative resources, which are set to 20% and 30% of the total resources with the failure probabilities of 80% and 50% [29]. ɛ and γ0 are set to 0.1 and 0.95 respectively in Formula (7), θ es , θ cc , θ md are all set to 1.0 in Formula (22).
In the following experiments, we first discuss the effect of the proposed trust evaluation model, then we evaluate the performance of the proposed RMA-TOS algorithm under varying numbers of tasks.
Trust evaluation model
In order to analyze the sensitivity and validity of the proposed trust evaluation model, we evaluate the trustworthiness of the computation resource by different time slots. The time is divided into 20 time slots. During the first 10 time slots, the computation resource cooperates well with other resources to obtain positive evaluation. In the next 10 time slots, the computation resource behaves badly and obtains negative evaluation. The experiment parameters are list as follows: The time sliding window is composed of 6 recent time slots, the delay factor η is set to 1.0, 0.5 and 0.0 respectively. Figure 12 shows the results.

Effect of decay factor to trust degree.
As shown in Fig. 12, when η=1.0, the decay factor is not considered. The whole history records are aggregated and the trust value drops slowly although the computation resource has behaved badly. Accordingly, the sensitivity of the trust degree cannot be embodied in the trust evaluation. When μ=0.0, only the latest time slot is considered. The trust degree reaches a stable value very quickly. However, each failure will lead to a significantly decline in the trust value. Therefore, the trust value presents great fluctuation from a global viewpoint. When μ=0.5, the trust value keeps up with the node’s current status much better. The experiment results show that the decay factor can objectively and effectively reflect the trustworthiness of the computation resource. Bayesian cognitive model based trust evaluation algorithm is used for the following simulation experiments, and the delay factor η is set to 0.8.
In order to analyze the effect of varying number of edge servers, we evaluate the energy consumption and successful execution probability of the proposed RMA-TOS algorithm under varying numbers of edge servers. The experiment parameters are list as follows: The numbers of three workflows are set to 10, 50 and 100 respectively, which are marked as workflow_10, workflow_50 and workflow_100. The number of edge servers is constrained between 1∼10.
Figures 13 and 14 show the experiment results. As the number of edge servers increasing, the average ratio of successful execution grows accordingly, yet there is a tendency of gradually decline of the energy consumption. And, more remarkable, when the number of edge servers is greater than 5, the growth rate of successful execution probability and the decreasing rate of the energy consumption decrease significantly. The mainly reason is that the task execution is affected by workflow DAG graph. When the number of concurrent tasks is less than the number of edge servers, a part of computation resources are idle. Therefore, in the case of the computation offloading, it is important to deploy the most appropriate number of edge servers to be used for task offloading.

Comparison of energy consumption with varying number of edge servers.

Comparison of successful execution probability with varying number of edge servers.
In this simulation experiment, we compare the proposed RMA-TOS algorithm with Non-RMA-TOS, CLOUD, EDGE, MOBILE, and LoPRTC [16] under varying number of tasks, where CLOUD, EDGE and MOBILE refer to the whole tasks are executed by cloud, edge servers and mobile device, respectively. LoPRTC is a local-based task schedule algorithm with single MD. LoPRTC balances the energy consumption among MD and MEC servers through offloading some tasks to MEC servers. Non-RMA-TOS is the proposed algorithm solely based on the proposed mobility-aware energy consumption model, which does not consider the trustworthiness of multiply computation resources. The experiment parameters are list as follows: the number of edge servers is set to 5. The number of tasks is constrained between 10∼100. The experiment results are illustrated in Figs. 15 and 16.

Comparison of task energy consumption of RMA-TOS, Non-RMA-TOS, CLOUD, EDGE, MOBILE and LoPRTC with varying number of tasks.

Comparison of successful execution probability of RMA-TOS, Non-RMA-TOS, CLOUD, EDGE, MOBILE and LoPRTC with varying number of tasks.
As shown in Fig. 15, when the number of tasks increasing, the energy consumption of six algorithms are all growth gradually. Compared with CLOUD, EDGE, MOBILE and LoPRTC, the energy consumption returned by RMA-TOS algorithm is 40.9∼31.4%, 38.8∼34.8%, 72.0∼61.1% and 21.2∼21.9% less than four baseline algorithms, respectively. In the meantime, it can be seen that the energy consumption returned by Non-RMA-TOS is less than the other five algorithms. The experiment results illustrate that the proposed mobility-aware energy consumption model can reduce the energy consumption effectively.
As shown in Fig. 16, it is easily to be noticed that, the successful execution probability of our algorithm is much better than five baseline algorithms. Specifically, it outperforms Non-RMA-TOS, CLOUD, EDGE, MOBILE and LoPRTC by 14.3∼24.2%, 11.2∼11.3%, 18.1∼23.0%, 5.3∼28.1% and 16.5∼24.2%, respectively. This indicates that the proposed trust evaluation model and the trust model based offloading strategy can assure the successful execution of tasks. Moreover, it is worth mentioning that, compared with Non-RMA-TOS, the energy consumption returned by RMA-TOS is increased by 13.1∼15.3%. However, the proposed algorithm improves the task successful completion rate by 14.3∼24.2%. This indicates that the proposed RMA-TOS algorithm can assure the successful execution of tasks in the MEC system, but increases some energy consumption. With the increasing number of tasks, the increased performance is more than the cost of energy consumption, which is very practical in large-scale MEC system.
Task offloading strategy is an important problem in the MEC system. In this paper, we study a reliability and mobility aware computation offloading strategy. Comparing with existing works, we first consider the trustworthiness of multiply computation resources, and the trust evaluation models for multiply computation resources are proposed to guarantee that the tasks are executed on the trusty computation resources. Then we investigate the task offloading problem in the wisdom medical scenario when the mobile wisdom bed is in a state of motion. By integrating the trust evaluation model, a reliability and mobility aware task offloading and scheduling algorithm based on genetic algorithm is proposed. The main contribution of this study to MEC system is that it extends the traditional formulation of the task offloading and scheduling problem so that both energy consumption and reliability of applications are simultaneously accounted for. Comprehensive experimental results show that compared with others, our algorithm is able to achieve the optimal fitness with lower energy consumption, smaller workflow makespan and execution failure under the deadlines.
In a real wisdom hospital, the scenario of multiple MDs and multiply MEC servers can make the MEC system more practical. The computation offloading problem in the case of multiple MDs sharing multiple MEC servers is our future work, including the path planning of multiple MDs and the workload scheduling of multiply MEC servers. How to combine these factors so as to meet the users’ requirements is a challenge in wisdom medical scenario.
In the meantime, the research and development on edge computing security are still in their infancy stages. One of the most prominent challenges is how to ensure the development of trustworthy smart services given the dynamic and distributed nature of mobile edge computing in different scenarios.
Data availability
The experiment data supporting this experiment analysis are from previously reported studies, which have been cited, and are also included within the article.
Conflicts of interest
The authors declare that there are no conflicts of interest regarding the publication of this paper.
Footnotes
Acknowledgments
This work is supported by key research and development program of Anhui province, under Grant No. 202004a05020010; key program in the youth elite support plan in universities of Anhui province, under Grant No. gxyqZD2020043; Anhui Key Laboratory of Network and Information Security, under No. AHNIS2020003.
