# Study on Dynamic Service Migration Strategy with Energy Optimization in Mobile Edge Computing

Authors: Jintian Hu; Gaocai Wang; Xiaotong Xu; Yuting Lu
Journal: Mobile Information Systems
 (2019)

---

## Abstract

In the mobile edge computing (MEC) platform, tasks that are being performed often change due to mobile device migration. In order to improve the energy utilization of the MEC platform and the migration process of the mobile terminal and to ensure effective and continuous operation of services, dynamic service migration strategy with energy optimization is required. Aiming at the problem of energy consumption optimization of dynamic service migration with the far-near effect in mobile networks, this article proposes a dynamic service migration strategy with energy optimization, which ensures the performance requirements of the service by considering the minimum energy cost of the relevant equipment during the dynamic migration process. First, by analyzing the relationship between migration distance and equipment transmit power, the energy consumption model associated with the migration distance is established. Then, according to the task dynamic service migration scenario, the dynamic service migration energy consumption model is constructed, so as to obtain the reward function for migrating energy consumption. Finally, the dynamic service migration strategy with energy optimization is realized through the optimal migration energy consumption expectation, which is obtained by the optimal stopping theory. The experimental results show that the optimization strategy proposed in this article can effectively reduce the energy consumption of dynamic service migration in different simulation environments and can improve the dynamic migration performance.


---

## Body

## 1. Introduction

With the rapid development of mobile cloud computing technology, mobile cloud computing-based mobile application scenarios, such as mobile video calling, smart home management, and mobile terminal access to remote desktops, are becoming more diverse [1]. To keep these terminal programs running in good condition is a critical issue. In mobile cloud computing, the mobile terminal migrates some tasks that cannot be handled by the computing power of the device to remote cloud data center and performs the execution of these tasks by means of the storage, computing, and data processing capabilities of the cloud server [2]. However, with the proliferation of network overhead, cloud computing based on centralized processing models has been difficult to meet the increasingly complex needs of various users. Mobile edge computing (MEC), which has emerged in recent years, provides a new solution.The core idea of MEC is to distribute the resources concentrated on the cloud server to mobile users, and mobile terminals can ensure the high-performance execution of terminal programs, which can be migrated by accessing the MEC platform for unified management resources [3, 4]. Although MEC is more adopted to current data processing needs than traditional cloud computing because of its distributed processing model, MEC servers’ own resources still have certain limitations (e.g., computing and storage), which results in limited service coverage. For example, when mobile user A enters the coverage area of MEC 1, the mobile terminal will connect to MEC 1 to perform the service. On the one hand, when mobile user A moves at a certain time and is far away from the MEC server, if the current MEC server is still selected to run the task, the long-distance communication will inevitably increase the delay. On the other hand, the near-far effect problem in mobile networks that will lead to a surge in communication energy consumption of mobile terminals is considered. Therefore, the service being executed on MEC 1 is migrated to MEC 2 that is closer to mobile user A, which is an advantage to maintain the execution performance of the mobile program, and this migration model is a dynamic service migration.Researchers have conducted in-depth research on the dynamic service migration energy consumption issues of MEC. Literature [5–9] has studied the computational offloading of dynamic services on virtual machines and literature [10–19] achieved multiobjective optimization such as energy consumption and delay of migration by studying how to select the appropriate MEC platform for dynamic services. Most of the abovementioned research work focuses on the task of offloading or interplatform task migration on the MEC platform. The scenario in which the MEC platform and the mobile terminal jointly migrate the service to another MEC platform has not been considered. In fact, the dynamic service migration energy optimization problem between platforms can be regarded as a path selection problem with migration energy consumption, and the optimal stopping theory is feasible for solving this problem. The optimal stopping rule is that the decision-maker takes the optimal expectation as the goal, and based on the continuously observed random variables, selects the most suitable moment to stop the observation and take further action. The optimal stopping theory has been widely used as an effective tool to solve optimization problems [20–22].This article focuses on the research of energy consumption minimization of dynamic service migration. By combining the optimal stopping theory with the migration decision to reduce the energy consumption of dynamic services migration, the optimization of migration performance can be improved. Based on the scenario of the MEC platform and mobile terminal comigration service, we propose a dynamic service migration strategy with energy optimization. The general idea of the strategy is as follows: Under the premise of given number of MEC platforms, the process of selecting the migration of the MEC platform by the mobile terminal is transformed into the optimal stopping problem, and the optimal dynamic service migration energy consumption threshold is obtained by using the optimal stopping theory. Finally, the MEC platform corresponding to the migration path with the optimal dynamic service migration energy consumption is selected to migrate to reduce the migration energy consumption and achieve the goal of improving the migration performance. The proposed strategy is different from these existing optimization strategies: it is based on the combination of dynamic service migration research and the far-near problem in wireless network, and the MEC platform is selected according to the optimal migration energy consumption threshold to realize the dynamic service migration optimization strategy.The remainder of this article is organized as follows: Section2 reviews relevant research work; Problem description and model establishment are given in Section 3; Section 4 describes dynamic migration strategy with energy optimization; Section 5 presents simulation experiments and analysis of experimental results; and the full text is summarized in Section 6.


## 2. Related Research Work

In recent years, in order to improve the migration performance of dynamic services, researchers have conducted a lot of research on the dynamic service migration problem in MEC. By summarizing and analyzing existing optimization strategies, these studies can be roughly divided into two categories: The first category is to optimize the energy consumption and latency of dynamic service offload by improving the architecture of the virtual machine, and the second category is to study how dynamic services can be more effectively remigrated to the new MEC platform.Before the program service is dynamically migrated to the new MEC platform, it needs to be uninstalled first in the virtual machine. Therefore, effectively offloading the service to ensure the migration performance is a topic of great concern to researchers. In the cloudlet network environment, in order to find a solution for effective scheduling of the migration service, Sardellitti et al. [5] proposed a heuristic-supported link path formula by studying the operating principle of the cloudlet and the satisfaction of service level agreement. And batch migration and dynamic migration are used as a service request to verify the optimization scheme. The results show that the proposed strategy can effectively reduce the energy consumption of migration. How to improve the dynamic migration performance of mobile programs in the MEC network environment? In response to this problem, Machen et al. [6] proposed a virtual machine layered-framework based on dynamic migration research of the original mobile cloud computing. The layered framework is used for the encapsulation operation of the dynamic service that needs to be migrated in the virtual machine, thereby reducing the energy consumption of the task offloading in the virtual machine. In [7], the researchers focused on computing and communication resource calling mechanisms of the MEC system and developed the virtual machine migration problem as a one-to-one contract game model. In order to effectively deal with the resources of MEC, the researchers developed a learning-based price control mechanism to capture the dynamics of the MEC system during the game and learning process. Compared with the existing MEC scheme, the proposed method has higher resource utilization and lower service delay. Mobile user migration often causes programs to change in the edge network. How to make the MEC platform meet the dynamic migration of services to ensure synchronization with mobile user data in the network? This is a common concern for researchers and users. Therefore, some researchers have proposed an edge computing platform architecture based on the full study of Docker containers. The architecture supports seamless migration of offload services while maintaining the running of programs on mobile devices. Compared with the service switching method in the edge environment, the energy consumption of service switching in is shortened by reducing the overhead file synchronization [8]. In [9], based on the previous research scheme, a hierarchical framework for dynamic service migration and encapsulation in virtual machines is proposed. Different from the scheme proposed in [6], the strategy packaged service data together with the execution status of the service, which significantly shortens the service downtime.In addition to focusing on virtual machine architecture improvements that task migration relies on, researchers have also conducted in-depth research on dynamic services migration between MEC platforms. Similar concepts, such as mobile micro cloud (MMC) [10], small cellular cloud (SCC) [11], and follow me cloud [13], have emerged when MEC technology has not yet matured. In the MMC, Wang et al. [10] considered the initial placement and subsequent migration of the service, abstracted the service program and the physical cloud system into a graph, and proposed an online approximation algorithm for finding the service location. At the same time, the dynamic service migration problem was transformed into Markov decision process (MDP) to find a suitable migration location. In [11], the path selection of mobile users between cells is converted into MDP in SCC, and the impact of transmission delay and transmission energy consumption on the decision process is considered. Compared with the traditional optimization strategy, the proposed algorithm had a better effect on the delay reduction. Most of the research on dynamic service migration between MEC platforms in the current MEC environment relies on the Markov decision process [12–15]. In [12], the MDP architecture is used to formulate sequential decision-making of service migration, and a mathematical framework of the optimal service migration strategies is designed by capturing the migration cost. Finally, the migration is completed by calculating the accurate one-dimensional mobility under MDP. In [13], the performance optimization problem of mobile edge services under long-term cost constraints is studied. Because the user’s movement is unpredictable, the researchers used the Lyapunov optimization method to decompose the research problem into NP-hard problems and used an approximate algorithm based on Markov approximation to find the approximate optimal solution. The study in [14] which differs from the [13] research method is that the researchers proposed MDP decoupling properties and updated them using Lyapunov optimization techniques. Thus, an online control algorithm was designed for the decoupling problem to optimize the migration cost. Chen et al. [15] used the special structure of the MDP problem to propose an approximate MDP-based dynamic service migration method, which reduced the dimension of the state space from the multidimensional model to the two-dimensional moving model to achieve mobility optimization. However, the current optimization method based on MDP architecture is only one of the research directions of dynamic migration. Some researchers proposed other schemes for the optimization of dynamic service migration. Al Ridhawi et al. [16] envisioned a real-time, context-aware, service-community collaboration framework at the edge of the network. The service group model is built for MEC nodes and mobile users by directly caching files and services that the mobile device requests frequently to the user’s mobile device. The results show that the solution provides end users with a cloud composite service that guarantees and delivers fast requests while maintaining the QoS requirements and load balancing between edge nodes and mobile nodes. Other researchers also proposed a dynamic service migration mechanism based on ECC in the context of new computational paradigm and edge cognitive computing (ECC), which combined artificial intelligence and edge computing. The experimental data show that the proposed strategy has ultralow latency and high user experience [17]. The focus of research in [18] is the problem of dynamic service migration with time constraints. After fully considering the task characteristics and contact modes between nodes, a heuristic algorithm is proposed to reduce the transmission overhead. Different from the research method proposed in [17, 18], Zhang et al. [19] used the Skyline graph (SG) model to store and update mobile edge services, which can achieve better migration performance than the baseline algorithm.In addition, the optimal stopping theory provides feasibility for solving some optimization problems. For example, Best et al. [20] considered the optimal stopping method for task monitoring problem and proposed a complete resolution algorithm running in polynomial time. In [21], the general form of the optimal stopping problem in the system switching model is studied and a method for finding the optimal stopping rule is proposed for the optimization of the system switching problem. Wu et al. used the optimal stop theory to obtain the maximum expected energy saving by optimizing the data cache energy consumption on server nodes.In summary, among these dynamic service migration researches of MEC, some are based on the improved strategy of virtual machine, which focus on how dynamic services can be effectively offloaded from the current MEC platform. Others are based on the dynamic migration optimization strategy between MEC platforms that considered how the service migrates from the current MEC to the new platform. Most of these optimization strategies do not consider the execution status of the task. In addition, the MEC platform and the mobile terminal are also a feasible solution for service migration.


## 3. Problem Description and Model Building

### 3.1. Problem Description

The dynamic service migration scenario studied in this article is shown in Figure1. It is assumed that in the MEC network environment, M dynamic-migrating MEC nodes are randomly dispersed around the mobile terminal device. When the mobile terminal moves from location A to location B, it will leave the current MEC platform coverage area. If the mobile terminal continues to access resources on the MEC 0 platform at this time, it will be difficult to guarantee the quality of service execution. In addition, because of the near-far effect problem in mobile networks, the device communication power often needs to be adaptively adjusted according to the distance between devices. Therefore, the MEC platform with a relatively close distance is selected for migration, which is beneficial to the equipment to maintain a low communication power migration service while ensuring service execution quality. The research goal of this article is to minimize the dynamic service migration energy consumption under the premise of ensuring service performance.Figure 1
Service dynamic migration nodes detection model.In the dynamic service migration scenario, when the service with the total amount of data C on MEC 0 needs to be dynamically migrated, the distance between the mobile terminal and MEC 0 isl. In addition, the mobile terminal can continuously and randomly detect the running state (S=S1,S2,…,Si,…,SM) of the migration nodes. At the same time, the terminal can also obtain the location information (D=D1,D2,…,Di,…,DM, i∈1,M) of the MEC nodes.During the detection process of the mobile terminal, the running state informationSi of the detected node can be obtained. When Si=0, the node is idle, and when Si=1, it is busy. If the device detects that the current node is busy, it will continue to detect the next node. Otherwise, the current node will be evaluated. Didx,dy is represented as the location information of the ith node, where dx is the distance from the migration node to the mobile terminal and dy is the distance from the migration node to the current MEC platform.At the same time, it is assumed that the mobile terminal detects the energy consumption of the migration node asEd each time and starts migration after detecting the appropriate node, and the data migration rate is R. In addition, the device communication power is P, and its value depends on the migration distance. Therefore, the overall energy consumption of the dynamic service migration process is given by(1)E=nEd+Pt,where t is the migration time of the service. It can be seen from formula (1) that the device should perform dynamic migration with a small communication power to reduce the migration energy consumption.


### 3.2. Model Establishment

#### 3.2.1. Energy Consumption Model for Migration Distance

According to the dynamic migration energy consumptionE=nEd+Pt shown in the formula (1), nEd is the total energy consumption of detecting the migration node Pt is the service migration energy consumption. Because of the near-far effect problem, the devices often adaptively adjust the communication power according to the communication distance in order to optimize the communication cost.The received signal of the device during communication is given by(2)θt=gηt+φt.The theoretical study in formula (2) draws on the literature [22], where g is the attenuation factor of the wireless channel, ηt is the amplitude of the signal transmitted by the device, and φt is the Gaussian white noise of the channel, whose variance is σ to represent the noise power.According to Shannon’s formula,(3)R=Wlog21+SNR.As shown in Shannon’s formula, the data migration rateR is determined by channel bandwidth W and signal-to-noise ratio SNR. Because the data migration rate R is set to a fixed value in the migration model of this article, the signal-to-noise ratio is derived as follows:(4)SNR=2R/W−1.There is a mathematical relationship between the signal-to-noise ratioSNR and the received power Pa of the device and the noise power σ:(5)SNR=Paσ.Therefore, combined formulas (4) and (5) can obtain the received power Pa of the device:(6)Pa=σ2R/W−1.In addition, amplitude of the received signal isPa/g. According to the relationship between the transmitted power of the signal and the received power, the transmit power Ps can be obtained as follows:(7)Ps=Pag2=σ2R/W−1g2.Since the channel attenuation factorg depends on the communication distance d and the coefficient λ and satisfies g=λ/d, the expression of g is taken into formula (7) to obtain the following:(8)Ps=σ2R/W−1d2λ2.When the MEC platform dynamically migrates service with data size ofC, the energy consumption is as follows:(9)Em=C⋅PsR=C⋅σ2R/W−1d2R⋅λ2.According to formula (9), it is beneficial to save equipment energy by selecting the node with a shorter distance d to complete the migration.


#### 3.2.2. Dynamic Service Migration Energy Consumption Model

After analyzing the location of the mobile terminal and the MEC node in the migration scenario studied in this article and referring to the local task scheduling model in the MEC environment proposed in [23], a dynamic service migration model in MEC is envisaged for research content in the article, as shown in Figure 2.Figure 2
Dynamic service migration model.Suppose that when serviceC uses resources on the MEC platform, the service data are stored in the data queue according to the processing order and sequentially enter the processing unit to execute. When the service needs to be dynamically migrated, the MEC will suspend the operation of the service after data processing of the processing unit ends. Through the analysis of the migration scenario shown in Figure 1, there are two migration paths for each node that service can be migrated in the dynamic service migration model studied in this article. Path A: MEC 0 imports the unprocessed data in the service data queue into the transmission unit and then directly migrates to the MEC n platform to which the mobile terminal is to be connected. Path B: MEC 0 encapsulates the element sequence number of all the unprocessed data in the data queue as the execution information of the service C to the mobile terminal, and then the terminal device retransmits the data not executed by the service C to the MEC n platform to be connected according to the received information.In order to reduce the difficulty of research on dynamic service migration, based on the literature [6], we used the degree of service unexecuted α (α∈0%,100%) to abstract the execution state of the service to be migrated. Therefore, when the device performs dynamic migration of services, it only needs to migrate the amount of unprocessed service data with a content size of α∗C. As for now, how to effectively package and uninstall the service data have not been executed, hence we did not study it in this article.By analyzing the dynamic service migration model shown in Figure2 and combining Didx,dy and formula (9), the energy consumption of path A is obtained as follows:(10)Ei,A=αC⋅σ2R/W−1dy2R⋅λ2.And the energy consumption of path B is given as follows:(11)Ei,B=αC⋅σ2R/W−1dx2R⋅λ2.In path B, MEC 1 needs to pass the execution information of the service to the mobile terminal and its transmission timeT, and by combining formulas (8) and (10), the total energy consumption is derived as follows:(12)Ei,B=αC⋅σ2R/W−1dx2R⋅λ2+βασ2R/W−1l2⋅Tλ2.Let the service migration energy consumption beEi,B=minEi,A,Ei,B.(13)Ei,Best=α⋅C⋅σ2R/W−1d2R⋅λ2+β⋅σ2R/W−1l2⋅Tλ2.Whenβ=0, the selection is path A and when β=1, path B is selected. For the convenience of writing, formula (13) is converted to Ei,Best=δ⋅d2+ε⋅β, where δ=αC⋅σ2R/W−1/R⋅λ2 and ε=σ2R/W−1l2⋅T/λ2.


## 3.1. Problem Description

The dynamic service migration scenario studied in this article is shown in Figure1. It is assumed that in the MEC network environment, M dynamic-migrating MEC nodes are randomly dispersed around the mobile terminal device. When the mobile terminal moves from location A to location B, it will leave the current MEC platform coverage area. If the mobile terminal continues to access resources on the MEC 0 platform at this time, it will be difficult to guarantee the quality of service execution. In addition, because of the near-far effect problem in mobile networks, the device communication power often needs to be adaptively adjusted according to the distance between devices. Therefore, the MEC platform with a relatively close distance is selected for migration, which is beneficial to the equipment to maintain a low communication power migration service while ensuring service execution quality. The research goal of this article is to minimize the dynamic service migration energy consumption under the premise of ensuring service performance.Figure 1
Service dynamic migration nodes detection model.In the dynamic service migration scenario, when the service with the total amount of data C on MEC 0 needs to be dynamically migrated, the distance between the mobile terminal and MEC 0 isl. In addition, the mobile terminal can continuously and randomly detect the running state (S=S1,S2,…,Si,…,SM) of the migration nodes. At the same time, the terminal can also obtain the location information (D=D1,D2,…,Di,…,DM, i∈1,M) of the MEC nodes.During the detection process of the mobile terminal, the running state informationSi of the detected node can be obtained. When Si=0, the node is idle, and when Si=1, it is busy. If the device detects that the current node is busy, it will continue to detect the next node. Otherwise, the current node will be evaluated. Didx,dy is represented as the location information of the ith node, where dx is the distance from the migration node to the mobile terminal and dy is the distance from the migration node to the current MEC platform.At the same time, it is assumed that the mobile terminal detects the energy consumption of the migration node asEd each time and starts migration after detecting the appropriate node, and the data migration rate is R. In addition, the device communication power is P, and its value depends on the migration distance. Therefore, the overall energy consumption of the dynamic service migration process is given by(1)E=nEd+Pt,where t is the migration time of the service. It can be seen from formula (1) that the device should perform dynamic migration with a small communication power to reduce the migration energy consumption.


## 3.2. Model Establishment

### 3.2.1. Energy Consumption Model for Migration Distance

According to the dynamic migration energy consumptionE=nEd+Pt shown in the formula (1), nEd is the total energy consumption of detecting the migration node Pt is the service migration energy consumption. Because of the near-far effect problem, the devices often adaptively adjust the communication power according to the communication distance in order to optimize the communication cost.The received signal of the device during communication is given by(2)θt=gηt+φt.The theoretical study in formula (2) draws on the literature [22], where g is the attenuation factor of the wireless channel, ηt is the amplitude of the signal transmitted by the device, and φt is the Gaussian white noise of the channel, whose variance is σ to represent the noise power.According to Shannon’s formula,(3)R=Wlog21+SNR.As shown in Shannon’s formula, the data migration rateR is determined by channel bandwidth W and signal-to-noise ratio SNR. Because the data migration rate R is set to a fixed value in the migration model of this article, the signal-to-noise ratio is derived as follows:(4)SNR=2R/W−1.There is a mathematical relationship between the signal-to-noise ratioSNR and the received power Pa of the device and the noise power σ:(5)SNR=Paσ.Therefore, combined formulas (4) and (5) can obtain the received power Pa of the device:(6)Pa=σ2R/W−1.In addition, amplitude of the received signal isPa/g. According to the relationship between the transmitted power of the signal and the received power, the transmit power Ps can be obtained as follows:(7)Ps=Pag2=σ2R/W−1g2.Since the channel attenuation factorg depends on the communication distance d and the coefficient λ and satisfies g=λ/d, the expression of g is taken into formula (7) to obtain the following:(8)Ps=σ2R/W−1d2λ2.When the MEC platform dynamically migrates service with data size ofC, the energy consumption is as follows:(9)Em=C⋅PsR=C⋅σ2R/W−1d2R⋅λ2.According to formula (9), it is beneficial to save equipment energy by selecting the node with a shorter distance d to complete the migration.


### 3.2.2. Dynamic Service Migration Energy Consumption Model

After analyzing the location of the mobile terminal and the MEC node in the migration scenario studied in this article and referring to the local task scheduling model in the MEC environment proposed in [23], a dynamic service migration model in MEC is envisaged for research content in the article, as shown in Figure 2.Figure 2
Dynamic service migration model.Suppose that when serviceC uses resources on the MEC platform, the service data are stored in the data queue according to the processing order and sequentially enter the processing unit to execute. When the service needs to be dynamically migrated, the MEC will suspend the operation of the service after data processing of the processing unit ends. Through the analysis of the migration scenario shown in Figure 1, there are two migration paths for each node that service can be migrated in the dynamic service migration model studied in this article. Path A: MEC 0 imports the unprocessed data in the service data queue into the transmission unit and then directly migrates to the MEC n platform to which the mobile terminal is to be connected. Path B: MEC 0 encapsulates the element sequence number of all the unprocessed data in the data queue as the execution information of the service C to the mobile terminal, and then the terminal device retransmits the data not executed by the service C to the MEC n platform to be connected according to the received information.In order to reduce the difficulty of research on dynamic service migration, based on the literature [6], we used the degree of service unexecuted α (α∈0%,100%) to abstract the execution state of the service to be migrated. Therefore, when the device performs dynamic migration of services, it only needs to migrate the amount of unprocessed service data with a content size of α∗C. As for now, how to effectively package and uninstall the service data have not been executed, hence we did not study it in this article.By analyzing the dynamic service migration model shown in Figure2 and combining Didx,dy and formula (9), the energy consumption of path A is obtained as follows:(10)Ei,A=αC⋅σ2R/W−1dy2R⋅λ2.And the energy consumption of path B is given as follows:(11)Ei,B=αC⋅σ2R/W−1dx2R⋅λ2.In path B, MEC 1 needs to pass the execution information of the service to the mobile terminal and its transmission timeT, and by combining formulas (8) and (10), the total energy consumption is derived as follows:(12)Ei,B=αC⋅σ2R/W−1dx2R⋅λ2+βασ2R/W−1l2⋅Tλ2.Let the service migration energy consumption beEi,B=minEi,A,Ei,B.(13)Ei,Best=α⋅C⋅σ2R/W−1d2R⋅λ2+β⋅σ2R/W−1l2⋅Tλ2.Whenβ=0, the selection is path A and when β=1, path B is selected. For the convenience of writing, formula (13) is converted to Ei,Best=δ⋅d2+ε⋅β, where δ=αC⋅σ2R/W−1/R⋅λ2 and ε=σ2R/W−1l2⋅T/λ2.


## 3.2.1. Energy Consumption Model for Migration Distance

According to the dynamic migration energy consumptionE=nEd+Pt shown in the formula (1), nEd is the total energy consumption of detecting the migration node Pt is the service migration energy consumption. Because of the near-far effect problem, the devices often adaptively adjust the communication power according to the communication distance in order to optimize the communication cost.The received signal of the device during communication is given by(2)θt=gηt+φt.The theoretical study in formula (2) draws on the literature [22], where g is the attenuation factor of the wireless channel, ηt is the amplitude of the signal transmitted by the device, and φt is the Gaussian white noise of the channel, whose variance is σ to represent the noise power.According to Shannon’s formula,(3)R=Wlog21+SNR.As shown in Shannon’s formula, the data migration rateR is determined by channel bandwidth W and signal-to-noise ratio SNR. Because the data migration rate R is set to a fixed value in the migration model of this article, the signal-to-noise ratio is derived as follows:(4)SNR=2R/W−1.There is a mathematical relationship between the signal-to-noise ratioSNR and the received power Pa of the device and the noise power σ:(5)SNR=Paσ.Therefore, combined formulas (4) and (5) can obtain the received power Pa of the device:(6)Pa=σ2R/W−1.In addition, amplitude of the received signal isPa/g. According to the relationship between the transmitted power of the signal and the received power, the transmit power Ps can be obtained as follows:(7)Ps=Pag2=σ2R/W−1g2.Since the channel attenuation factorg depends on the communication distance d and the coefficient λ and satisfies g=λ/d, the expression of g is taken into formula (7) to obtain the following:(8)Ps=σ2R/W−1d2λ2.When the MEC platform dynamically migrates service with data size ofC, the energy consumption is as follows:(9)Em=C⋅PsR=C⋅σ2R/W−1d2R⋅λ2.According to formula (9), it is beneficial to save equipment energy by selecting the node with a shorter distance d to complete the migration.


## 3.2.2. Dynamic Service Migration Energy Consumption Model

After analyzing the location of the mobile terminal and the MEC node in the migration scenario studied in this article and referring to the local task scheduling model in the MEC environment proposed in [23], a dynamic service migration model in MEC is envisaged for research content in the article, as shown in Figure 2.Figure 2
Dynamic service migration model.Suppose that when serviceC uses resources on the MEC platform, the service data are stored in the data queue according to the processing order and sequentially enter the processing unit to execute. When the service needs to be dynamically migrated, the MEC will suspend the operation of the service after data processing of the processing unit ends. Through the analysis of the migration scenario shown in Figure 1, there are two migration paths for each node that service can be migrated in the dynamic service migration model studied in this article. Path A: MEC 0 imports the unprocessed data in the service data queue into the transmission unit and then directly migrates to the MEC n platform to which the mobile terminal is to be connected. Path B: MEC 0 encapsulates the element sequence number of all the unprocessed data in the data queue as the execution information of the service C to the mobile terminal, and then the terminal device retransmits the data not executed by the service C to the MEC n platform to be connected according to the received information.In order to reduce the difficulty of research on dynamic service migration, based on the literature [6], we used the degree of service unexecuted α (α∈0%,100%) to abstract the execution state of the service to be migrated. Therefore, when the device performs dynamic migration of services, it only needs to migrate the amount of unprocessed service data with a content size of α∗C. As for now, how to effectively package and uninstall the service data have not been executed, hence we did not study it in this article.By analyzing the dynamic service migration model shown in Figure2 and combining Didx,dy and formula (9), the energy consumption of path A is obtained as follows:(10)Ei,A=αC⋅σ2R/W−1dy2R⋅λ2.And the energy consumption of path B is given as follows:(11)Ei,B=αC⋅σ2R/W−1dx2R⋅λ2.In path B, MEC 1 needs to pass the execution information of the service to the mobile terminal and its transmission timeT, and by combining formulas (8) and (10), the total energy consumption is derived as follows:(12)Ei,B=αC⋅σ2R/W−1dx2R⋅λ2+βασ2R/W−1l2⋅Tλ2.Let the service migration energy consumption beEi,B=minEi,A,Ei,B.(13)Ei,Best=α⋅C⋅σ2R/W−1d2R⋅λ2+β⋅σ2R/W−1l2⋅Tλ2.Whenβ=0, the selection is path A and when β=1, path B is selected. For the convenience of writing, formula (13) is converted to Ei,Best=δ⋅d2+ε⋅β, where δ=αC⋅σ2R/W−1/R⋅λ2 and ε=σ2R/W−1l2⋅T/λ2.


## 4. Dynamic Service Migration Strategy with Energy Optimization

### 4.1. Construction of the Strategy for Problem of Minimizing the Optimal Stopping Rule with Energy Consumption

In the research model of this article, the mobile terminal can obtain the location information of the MEC through random detection, and the maximum number of detections isM. Assume that the number of detections when the mobile terminal stops detecting is n, n∈N, where N=N:1≤N≤M is the set of detections. In previous studies on dynamic service migration, after the mobile terminal was connected to the appropriate MEC platform, the service was migrated by the original MEC platform. Since the mobile terminal is closer to the new migration node, the dynamic service migration strategy is implemented by considering the energy consumption situation on each migration path and selecting a path with less energy consumption.If the currently detected node is busy or the mobile terminal is not satisfied with its migration performance, it can continue to detect the next node. Then the expected rewardYN for dynamic service migration costs is given as follows:(14)YN=En−1,Best−En,Best−nEd.LetXN=En−1,Best−En,Best−nEd, then the goal of optimal energy migration is to maximize the expected reward YN, which is given by(15)maxEYN=EXN−nEd.The purpose of formula (15) is to obtain the optimal integrated cost of dynamic migration by finding the optimal number of stop detections n∗, thereby minimizing the energy consumption of service migration. Therefore, the problem of selecting the optimal migration node for the device is converted into the optimal stopping rule problem, and the optimal number of stop detections N∗ is given by(16)N∗=argsupN∈N∗EYN.


### 4.2. Proof and Solution of Optimal Stopping Rules

To solve the optimal stopping rule problem of optimal energy consumption of migration data, we must first prove that there is an optimal stopping rule for the problem and then solve the optimal stopping rule problem.Proposition 1.
Formula (15) has an optimal stopping rule.Proof.
According to the literature [24], if the optimal stopping rule of the proposition exists, it must meet the following two conditions:(17)A1.EsupnYn<∞,A2.limsupn⟶∞Yn≤Y∞a.s.
According to the definition of formula (14), the expected reward YN that stops at nth detection is expanded to YN=XN−nEd=δ⋅dn−12−dn2+εβn−1−βn−nEd.
Since the internode sequenceD is a finite range of random variable sequences, we can obtain δ⋅dn−12−dn2<∞. In addition, ε=σ2R/W−1l2⋅T/λ2 has a fixed value, which indicates the energy consumption of information transmission between MEC 1 and the mobile terminal so that ε⋅βn−1−βn<∞ is established. When δ⋅dn−12−dn2+εβn−1−βn<∞, then YN<∞ is established so that EsupnYn<∞ exists and the condition A1 is satisfied.
At the same time, whenY∞⟶−∞, −nEd<∞, there is Yn⟶∞. Obviously, Y∞⟶−∞ is also true so limsupn⟶∞Yn≤−∞=Y∞, the condition A2, is satisfied.
In summary, formula (12) satisfies the conditions A1 and A2; therefore, the optimal stopping rule exists.
According to the literature [24], when the mobile terminal obtains the optimal expected reward V∗=supN∈N∗EYN, the number of stop detections N is the solution of the optimal stop rule problem (15). Therefore, the optimal stop detection count N∗ is(18)N∗=minN≥1:YN≥V∗,where the optimal expected reward V∗ satisfies the optimal formula as follows:(19)V∗=EmaxXN,V∗−Ed.
Formula (19) compares the detected optimized value XN with the expected reward V∗ and takes the maximum value to obtain the new most desirable reward. In addition, the optimized value XN has the same function distribution over all stop detection times N. Then, formula (19) is changed to(20)Ed=EmaxXN,0.
Under the MEC network, each service on the MEC platform completes the migration by selecting the node with the optimal migration energy consumption, which can achieve the goal of minimizing the energy consumption of the service dynamic migration, improving the migration performance.


### 4.3. Algorithm Description

In the MEC environment, when the user is away from the current MEC, the currently executed service needs to be dynamically migrated to a platform closer to the user. When the service needs to be dynamically migrated on the MEC, the mobile terminal needs to detect the location information of the migratable MEC node that is randomly distributed in the vicinity of the device and obtain the optimal migration path informationβi,j that is dynamically migrated to the node and the energy consumption expectation corresponding to the path.When the mobile device finds that the migration energy consumption on the migration path of the node is less than or equal to the optimal energy consumption expectation, the mobile device stops detecting and will select the node for migration. If the mobile device has detected the last migration node which does not find a migration path that meets the requirements, then it selects the migratable node closest to the user to complete the dynamic service migration. Since theM MEC nodes are randomly scattered in the vicinity of the mobile terminal, the maximum number of detections of the device is M. At the same time, according to the dynamic service migration model shown in Figure 2, the device can obtain two selectable migration paths for each node randomly detected and select a better one as the migration path of the node. Therefore, the maximum number of migration paths can be obtained as M.The dynamic service migration strategy with energy optimization is described as follows:(1)
Initialize serviceC, distance l, optimal path marker βbest=0,0, detect energy consumption Ed, number of MEC platforms M, transmission rate R, detection node number i∈1,M, and Dmin=l.(2)
Start to randomly detect the running stateSi of the MEC node; if Si=0, perform step 3. If Si=1, i++, continue to detect the next node.(3)
Start detecting node location informationDidx,dy.(4)
Calculate the total energy consumptionEi,A of path A according to formula (10) and obtain the total energy consumption Ei,B of path B from (12); let Ei,Best=minEi,A,Ei,B, and recording the current optimal migration path βi,j according to formula (13), j∈0,1, where i is the detection sequence number of the node, and j∈0,1, when j=0, record path A, and when j=1, record path B.(5)
Calculate the optimal migration energy consumptionV∗ according to formula (15). If EBest≤V∗, perform step 9; otherwise, perform step 6.(6)
LetDmin=minDmin,dx and βbest=βi,j, where i is the node number of Didx=Dmin, i++; perform step 2.(7)
Wheni=M, it still has not migrated, then Dmin=minDmin,DMdx.(8)
Select the node with the distanceDidx=Dmin as the migration platform.(9)
Stop the detection and select the optimal migration pathβbest of the current node for migration.The maximum number of times the mobile terminal device detects the migration node with the optimal migration energy consumption threshold isM. Steps 2∼6 are performed for the mobile terminal detection and selection phase for a total of M−1 times. And the worst case of the algorithm is that the Mth node is detected and still not migrated. Therefore, the time complexity of this strategy is OM.


## 4.1. Construction of the Strategy for Problem of Minimizing the Optimal Stopping Rule with Energy Consumption

In the research model of this article, the mobile terminal can obtain the location information of the MEC through random detection, and the maximum number of detections isM. Assume that the number of detections when the mobile terminal stops detecting is n, n∈N, where N=N:1≤N≤M is the set of detections. In previous studies on dynamic service migration, after the mobile terminal was connected to the appropriate MEC platform, the service was migrated by the original MEC platform. Since the mobile terminal is closer to the new migration node, the dynamic service migration strategy is implemented by considering the energy consumption situation on each migration path and selecting a path with less energy consumption.If the currently detected node is busy or the mobile terminal is not satisfied with its migration performance, it can continue to detect the next node. Then the expected rewardYN for dynamic service migration costs is given as follows:(14)YN=En−1,Best−En,Best−nEd.LetXN=En−1,Best−En,Best−nEd, then the goal of optimal energy migration is to maximize the expected reward YN, which is given by(15)maxEYN=EXN−nEd.The purpose of formula (15) is to obtain the optimal integrated cost of dynamic migration by finding the optimal number of stop detections n∗, thereby minimizing the energy consumption of service migration. Therefore, the problem of selecting the optimal migration node for the device is converted into the optimal stopping rule problem, and the optimal number of stop detections N∗ is given by(16)N∗=argsupN∈N∗EYN.


## 4.2. Proof and Solution of Optimal Stopping Rules

To solve the optimal stopping rule problem of optimal energy consumption of migration data, we must first prove that there is an optimal stopping rule for the problem and then solve the optimal stopping rule problem.Proposition 1.
Formula (15) has an optimal stopping rule.Proof.
According to the literature [24], if the optimal stopping rule of the proposition exists, it must meet the following two conditions:(17)A1.EsupnYn<∞,A2.limsupn⟶∞Yn≤Y∞a.s.
According to the definition of formula (14), the expected reward YN that stops at nth detection is expanded to YN=XN−nEd=δ⋅dn−12−dn2+εβn−1−βn−nEd.
Since the internode sequenceD is a finite range of random variable sequences, we can obtain δ⋅dn−12−dn2<∞. In addition, ε=σ2R/W−1l2⋅T/λ2 has a fixed value, which indicates the energy consumption of information transmission between MEC 1 and the mobile terminal so that ε⋅βn−1−βn<∞ is established. When δ⋅dn−12−dn2+εβn−1−βn<∞, then YN<∞ is established so that EsupnYn<∞ exists and the condition A1 is satisfied.
At the same time, whenY∞⟶−∞, −nEd<∞, there is Yn⟶∞. Obviously, Y∞⟶−∞ is also true so limsupn⟶∞Yn≤−∞=Y∞, the condition A2, is satisfied.
In summary, formula (12) satisfies the conditions A1 and A2; therefore, the optimal stopping rule exists.
According to the literature [24], when the mobile terminal obtains the optimal expected reward V∗=supN∈N∗EYN, the number of stop detections N is the solution of the optimal stop rule problem (15). Therefore, the optimal stop detection count N∗ is(18)N∗=minN≥1:YN≥V∗,where the optimal expected reward V∗ satisfies the optimal formula as follows:(19)V∗=EmaxXN,V∗−Ed.
Formula (19) compares the detected optimized value XN with the expected reward V∗ and takes the maximum value to obtain the new most desirable reward. In addition, the optimized value XN has the same function distribution over all stop detection times N. Then, formula (19) is changed to(20)Ed=EmaxXN,0.
Under the MEC network, each service on the MEC platform completes the migration by selecting the node with the optimal migration energy consumption, which can achieve the goal of minimizing the energy consumption of the service dynamic migration, improving the migration performance.


## 4.3. Algorithm Description

In the MEC environment, when the user is away from the current MEC, the currently executed service needs to be dynamically migrated to a platform closer to the user. When the service needs to be dynamically migrated on the MEC, the mobile terminal needs to detect the location information of the migratable MEC node that is randomly distributed in the vicinity of the device and obtain the optimal migration path informationβi,j that is dynamically migrated to the node and the energy consumption expectation corresponding to the path.When the mobile device finds that the migration energy consumption on the migration path of the node is less than or equal to the optimal energy consumption expectation, the mobile device stops detecting and will select the node for migration. If the mobile device has detected the last migration node which does not find a migration path that meets the requirements, then it selects the migratable node closest to the user to complete the dynamic service migration. Since theM MEC nodes are randomly scattered in the vicinity of the mobile terminal, the maximum number of detections of the device is M. At the same time, according to the dynamic service migration model shown in Figure 2, the device can obtain two selectable migration paths for each node randomly detected and select a better one as the migration path of the node. Therefore, the maximum number of migration paths can be obtained as M.The dynamic service migration strategy with energy optimization is described as follows:(1)
Initialize serviceC, distance l, optimal path marker βbest=0,0, detect energy consumption Ed, number of MEC platforms M, transmission rate R, detection node number i∈1,M, and Dmin=l.(2)
Start to randomly detect the running stateSi of the MEC node; if Si=0, perform step 3. If Si=1, i++, continue to detect the next node.(3)
Start detecting node location informationDidx,dy.(4)
Calculate the total energy consumptionEi,A of path A according to formula (10) and obtain the total energy consumption Ei,B of path B from (12); let Ei,Best=minEi,A,Ei,B, and recording the current optimal migration path βi,j according to formula (13), j∈0,1, where i is the detection sequence number of the node, and j∈0,1, when j=0, record path A, and when j=1, record path B.(5)
Calculate the optimal migration energy consumptionV∗ according to formula (15). If EBest≤V∗, perform step 9; otherwise, perform step 6.(6)
LetDmin=minDmin,dx and βbest=βi,j, where i is the node number of Didx=Dmin, i++; perform step 2.(7)
Wheni=M, it still has not migrated, then Dmin=minDmin,DMdx.(8)
Select the node with the distanceDidx=Dmin as the migration platform.(9)
Stop the detection and select the optimal migration pathβbest of the current node for migration.The maximum number of times the mobile terminal device detects the migration node with the optimal migration energy consumption threshold isM. Steps 2∼6 are performed for the mobile terminal detection and selection phase for a total of M−1 times. And the worst case of the algorithm is that the Mth node is detected and still not migrated. Therefore, the time complexity of this strategy is OM.


## 5. Simulation Results and Analysis

The dynamic service migration strategy with energy optimization (DMSEO) proposed in this article is based on the solution of minimum migration energy consumption. In order to test the performance of the strategy during the dynamic migration process, the MATLAB simulation tool is used to simulate the proposed migration strategy and compare it with other transmission strategies. This section compares each strategy from four aspects: average migration energy consumption, average effective data migration energy efficiency [23], average channel transmission power, and average migration distance energy efficiency. Next, a brief description of the two migration strategies for comparison is given.(1)
The service migration strategy is based on the shortest node distance (SMSND) [11]. The mobile terminal selects the migratable MEC platform that is detected closest to the mobile device as the migration node and remigrates the service on the mobile terminal to the new node to continue execution.(2)
The dynamic service migration strategy is based on immediate execution (DSMIE) [12]. When dx≤l in the migratable MEC node information Ddx,dy detected by the mobile terminal, the current MEC immediately migrates the service having the execution state to the detected node.We used different service content sizesC1∼20∗2∗104bit and different migration rates R1∼20∗2∗103bps to test the migration performance of the three optimization strategies. The simulation experiments were carried out in two simulation environments with detection energy consumption Ed of 0.1 J and 1 J, respectively.The parameters in the simulation experiment are shown in Table1.Table 1
Simulation experiment parameter value.
Parameter
Description
Value
W
Bandwidth (MHz)
1
R
Transmission rate (bps)
2∗ 104
C
Service content size (bit)
2∗ 105
σ
Noise power
3
l
MEC and mobile device spacing (m)
200


### 5.1. Average Migration Energy Consumption

The average migration energy consumption is the mean of the total energy consumption (inJ) in multiple sets of service migration simulation experiments. The size of the migration energy is a good indicator of the performance of the migration strategy. Since excessive energy overhead often imposes a huge operational burden on the migration device, the smaller the migration energy consumption is, the lower the performance optimization effect of the migration strategy will be.Figure3 shows the changes in the energy consumption of the three strategies. Figures 3(a) and 3(b) are the migration energy consumption of the service at different transmission rates R1∼20∗2∗103bps when the service content size C is 2∗105 bit. Figures 3(c) and 3(d) are the energy consumption of migration under different service content sizes C1∼20∗2∗103bit when the transmission rate R is 2∗103bps. As can be observed from Figure 3, the DMSEO optimization strategy always has the smallest migration energy consumption, indicating that it has the optimal dynamic service migration energy consumption. Because the DMSEO strategy uses the optimal stopping theory to obtain the optimal migration energy expectation, it is also used for migration node selection. So the service can be effectively dynamically migrated with minimal energy consumption. However, the DSMIE strategy and the SMSND strategy are less effective in optimizing energy consumption. The reason for this experimental result is that the DSMIE strategy does not consider the energy consumption caused by long-distance migration. And the SMSDN policy ignores the impact of the execution state of the service on the migration performance, resulting in the mobile terminal device remigrating many redundant data. From the perspective of average migration energy consumption, the energy saving effect of DMSEO optimization strategy has a good performance.Figure 3
Average migration energy consumption. (a)R1∼20∗2∗103bps,Ed=0.1J. (b) R1∼20∗2∗103bps,Ed=1J. (c) C1∼20∗2∗103bit,Ed=0.1J. (d) C1∼20∗2∗103bit,Ed=1J.
(a)
(b)
(c)
(d)


### 5.2. Effective Data Average Migration Energy Efficiency

It is difficult to circumvent the impact of the degree of service unexecutedα on migration energy consumption in dynamic service migration simulation experiments because the degree of service unexecuted α in each round of experiments is randomly changed. Therefore, the effective data average migration energy efficiency is used for the comparison of strategies. This value is equal to the ratio of the amount of task data not performed by the service to the migration energy consumption, and its unit is bit/J, which represents the amount of data that can be migrated by the device within the unit energy consumption. This value can fully reflect the energy utilization of the device. The higher the average energy efficiency of the effective data migration is, the better the migration performance of the strategy will be.As shown in Figure4, the DMSEO optimization strategy has the highest effective data average migration energy efficiency in the four experimental environments. The performance of the DSMIE policy and the SMSND policy is poor. The reason is that the strategy proposed in this article takes energy consumption into account during the migration process, while the DSMIE strategy and the SMSND strategy do not have. Through the comparison of this indicator, it can be seen that the DMSEO strategy has higher energy utilization.Figure 4
Effective data average migration energy efficiency. (a)R1∼20∗2∗103bps,Ed=0.1J. (b) R1∼20∗2∗103bps,Ed=1J. (c) C1∼20∗2∗103bit,Ed=0.1J. (d) C1∼20∗2∗103bit,Ed=1J.
(a)
(b)
(c)
(d)


### 5.3. Average Signal Transmission Power

Considering that the device needs to adaptively adjust the signal transmission power according to the migration distance, in this section, we use the average signal transmission power (inW) to evaluate the performance of each migration strategy. The average signal transmission power value is equal to the ratio of the average migration energy consumption (in J) to the equipment migration delay (in s). The smaller the value during the migration process is, the better the energy optimization effect of the migration strategy will be.Figure5 shows the comparison of the average signal transmission power among the three strategies. Considering the purpose of energy saving, the equipment needs to reduce the communication power as much as possible while ensuring the quality of service. It can be observed from the figure that the average consumed transmit power of the DMSEO strategy is smaller among the three strategies. Since the relationship between the migration energy consumption and the signal transmission power is fully considered when our strategy solves the optimal migration energy consumption threshold, the device maintains a low communication power as much as possible when performing dynamic service migration. The DSMIE strategy and the SMSND strategy have higher communication power, and neither of these strategies considers the energy consumption factor. The DSMIE strategy ignores the relationship between the signal transmit power and migration distance; the SMSND strategy is due to the migration of redundant service data resulting in an excessive average transmit power.Figure 5
Average signal transmission power. (a)R1∼20∗2∗103bps,Ed=0.1J. (b) R1∼20∗2∗103bps,Ed=1J. (c) C1∼20∗2∗103bit,Ed=0.1J. (d) C1∼20∗2∗103bit,Ed=1J.
(a)
(b)
(c)
(d)


### 5.4. Average Migration Distance Energy Efficiency

In the MEC, the distance between the mobile terminal and the MEC platform has an impact on the quality of service execution. The task migration to a node with a short distance is not only beneficial to guarantee the performance of the service, but also can reduce the energy cost of the device migration. Therefore, this section uses the average migration distance energy efficiency, which is equal to the ratio of the average migration energy consumption (inJ) to the average migration distance (in m) to verify whether each migration strategy can effectively guarantee the performance after service migration. The smaller the average migration distance energy efficiency is, the better the dynamic service migration performance will be.It can be observed from Figure6 that the DMSEO optimization strategy has the lowest average migration distance energy efficiency in any experimental environment because the DMSEO strategy continues to optimize on the distance energy model and chooses node migration with optimal migration energy expectations. Therefore, the node selected by the strategy for migration basically has a short communication distance, which is of great significance for ensuring high-performance execution of the service. In contrast, the DSMIE strategy and the SMSND strategy have larger migration energy efficiency and poor effect on the migration performance. In particular, the DSMIE strategy does not take the distance factor into account in the migration decision. It is difficult to guarantee the performance of the service after the migration is completed.Figure 6
Average migration distance energy efficiency. (a)R1∼20∗2∗103bps,Ed=0.1J. (b) R1∼20∗2∗103bps,Ed=1J. (c) C1∼20∗2∗103bit,Ed=0.1J. (d) C1∼20∗2∗103bit,Ed=1J.
(a)
(b)
(c)
(d)Through the analysis of the above simulation results, the DMSEO optimization strategy has better migration performance than the other two migration strategies. In summary, the dynamic service migration strategy with energy optimization proposed in this article can effectively reduce the energy consumption of migration and optimize the migration performance under the condition of ensuring high-performance execution of services.


## 5.1. Average Migration Energy Consumption

The average migration energy consumption is the mean of the total energy consumption (inJ) in multiple sets of service migration simulation experiments. The size of the migration energy is a good indicator of the performance of the migration strategy. Since excessive energy overhead often imposes a huge operational burden on the migration device, the smaller the migration energy consumption is, the lower the performance optimization effect of the migration strategy will be.Figure3 shows the changes in the energy consumption of the three strategies. Figures 3(a) and 3(b) are the migration energy consumption of the service at different transmission rates R1∼20∗2∗103bps when the service content size C is 2∗105 bit. Figures 3(c) and 3(d) are the energy consumption of migration under different service content sizes C1∼20∗2∗103bit when the transmission rate R is 2∗103bps. As can be observed from Figure 3, the DMSEO optimization strategy always has the smallest migration energy consumption, indicating that it has the optimal dynamic service migration energy consumption. Because the DMSEO strategy uses the optimal stopping theory to obtain the optimal migration energy expectation, it is also used for migration node selection. So the service can be effectively dynamically migrated with minimal energy consumption. However, the DSMIE strategy and the SMSND strategy are less effective in optimizing energy consumption. The reason for this experimental result is that the DSMIE strategy does not consider the energy consumption caused by long-distance migration. And the SMSDN policy ignores the impact of the execution state of the service on the migration performance, resulting in the mobile terminal device remigrating many redundant data. From the perspective of average migration energy consumption, the energy saving effect of DMSEO optimization strategy has a good performance.Figure 3
Average migration energy consumption. (a)R1∼20∗2∗103bps,Ed=0.1J. (b) R1∼20∗2∗103bps,Ed=1J. (c) C1∼20∗2∗103bit,Ed=0.1J. (d) C1∼20∗2∗103bit,Ed=1J.
(a)
(b)
(c)
(d)


## 5.2. Effective Data Average Migration Energy Efficiency

It is difficult to circumvent the impact of the degree of service unexecutedα on migration energy consumption in dynamic service migration simulation experiments because the degree of service unexecuted α in each round of experiments is randomly changed. Therefore, the effective data average migration energy efficiency is used for the comparison of strategies. This value is equal to the ratio of the amount of task data not performed by the service to the migration energy consumption, and its unit is bit/J, which represents the amount of data that can be migrated by the device within the unit energy consumption. This value can fully reflect the energy utilization of the device. The higher the average energy efficiency of the effective data migration is, the better the migration performance of the strategy will be.As shown in Figure4, the DMSEO optimization strategy has the highest effective data average migration energy efficiency in the four experimental environments. The performance of the DSMIE policy and the SMSND policy is poor. The reason is that the strategy proposed in this article takes energy consumption into account during the migration process, while the DSMIE strategy and the SMSND strategy do not have. Through the comparison of this indicator, it can be seen that the DMSEO strategy has higher energy utilization.Figure 4
Effective data average migration energy efficiency. (a)R1∼20∗2∗103bps,Ed=0.1J. (b) R1∼20∗2∗103bps,Ed=1J. (c) C1∼20∗2∗103bit,Ed=0.1J. (d) C1∼20∗2∗103bit,Ed=1J.
(a)
(b)
(c)
(d)


## 5.3. Average Signal Transmission Power

Considering that the device needs to adaptively adjust the signal transmission power according to the migration distance, in this section, we use the average signal transmission power (inW) to evaluate the performance of each migration strategy. The average signal transmission power value is equal to the ratio of the average migration energy consumption (in J) to the equipment migration delay (in s). The smaller the value during the migration process is, the better the energy optimization effect of the migration strategy will be.Figure5 shows the comparison of the average signal transmission power among the three strategies. Considering the purpose of energy saving, the equipment needs to reduce the communication power as much as possible while ensuring the quality of service. It can be observed from the figure that the average consumed transmit power of the DMSEO strategy is smaller among the three strategies. Since the relationship between the migration energy consumption and the signal transmission power is fully considered when our strategy solves the optimal migration energy consumption threshold, the device maintains a low communication power as much as possible when performing dynamic service migration. The DSMIE strategy and the SMSND strategy have higher communication power, and neither of these strategies considers the energy consumption factor. The DSMIE strategy ignores the relationship between the signal transmit power and migration distance; the SMSND strategy is due to the migration of redundant service data resulting in an excessive average transmit power.Figure 5
Average signal transmission power. (a)R1∼20∗2∗103bps,Ed=0.1J. (b) R1∼20∗2∗103bps,Ed=1J. (c) C1∼20∗2∗103bit,Ed=0.1J. (d) C1∼20∗2∗103bit,Ed=1J.
(a)
(b)
(c)
(d)


## 5.4. Average Migration Distance Energy Efficiency

In the MEC, the distance between the mobile terminal and the MEC platform has an impact on the quality of service execution. The task migration to a node with a short distance is not only beneficial to guarantee the performance of the service, but also can reduce the energy cost of the device migration. Therefore, this section uses the average migration distance energy efficiency, which is equal to the ratio of the average migration energy consumption (inJ) to the average migration distance (in m) to verify whether each migration strategy can effectively guarantee the performance after service migration. The smaller the average migration distance energy efficiency is, the better the dynamic service migration performance will be.It can be observed from Figure6 that the DMSEO optimization strategy has the lowest average migration distance energy efficiency in any experimental environment because the DMSEO strategy continues to optimize on the distance energy model and chooses node migration with optimal migration energy expectations. Therefore, the node selected by the strategy for migration basically has a short communication distance, which is of great significance for ensuring high-performance execution of the service. In contrast, the DSMIE strategy and the SMSND strategy have larger migration energy efficiency and poor effect on the migration performance. In particular, the DSMIE strategy does not take the distance factor into account in the migration decision. It is difficult to guarantee the performance of the service after the migration is completed.Figure 6
Average migration distance energy efficiency. (a)R1∼20∗2∗103bps,Ed=0.1J. (b) R1∼20∗2∗103bps,Ed=1J. (c) C1∼20∗2∗103bit,Ed=0.1J. (d) C1∼20∗2∗103bit,Ed=1J.
(a)
(b)
(c)
(d)Through the analysis of the above simulation results, the DMSEO optimization strategy has better migration performance than the other two migration strategies. In summary, the dynamic service migration strategy with energy optimization proposed in this article can effectively reduce the energy consumption of migration and optimize the migration performance under the condition of ensuring high-performance execution of services.


## 6. Conclusions

Aiming at the problem of migration energy optimization of dynamic services, this article transforms it into a migration path selection problem, and a dynamic service migration strategy with energy optimization is proposed. This article combines the near-far effect problem in the mobile network with the dynamic service migration problem and solves the problem by using the optimal stopping theory. First, the energy consumption model on the migration path is constructed by the relationship between migration distance and equipment transmit power. Then, the optimal stopping rule problem of minimizing the migration energy consumption is constructed, and its existence and the optimal migration energy consumption threshold are solved. Finally, the mobile device detects the migratable nodes with the optimal migration energy consumption threshold and selects a suitable migration path for dynamic service migration to reduce the migration energy consumption. The experimental results show that the proposed strategy can achieve smaller average signal transmission power, lower average migration energy consumption, better average migration distance energy efficiency and larger effective data average migration energy efficiency, and better migration performance improvement effect.In our future work, we will consider the latency of the dynamic service migration process and how to implement dynamic service caching to optimize the performance of dynamic service migration.



---

*Source: 5794870-2019-10-13.xml*