# DIMDP: A Driving Intention-Based MDP Service Migration Model under MEC/MSCN Architecture

Authors: Lei Ye; Kaiwen Ling; Qingwen Han; Yufei Yan; Lingqiu Zeng; Lingfeng Qi; Li Lin; Junjun Zhang
Journal: Mobile Information Systems
 (2022)

---

## Abstract

Service migration is one of the key topics of Internet of Vehicles (IoV). MEC (mobile edge computing), which is carried on the roadside unit (RSU), could serve as a service provider and provide a V2I (vehicle to infrastructure) cooperation service. To solve the high migration rate caused by the vehicle’s high mobility feature, MSCN (mobile secondary computing node) framework is defined. To study service migration features under the MSCN framework further, in this paper, road vehicle’s motion features, e.g., driving intention and regional traffic condition, are introduced to construct the Markov decision model, which is used to explain the service migration decision procedure, while DIMDP (driving intention-based MDP) is defined. Corresponding cost functions are defined, while the optimal object is given. A two-way road scenario is selected as a typical scenario. NS3 platform is employed to fulfill the simulation process. Simulation results show that the proposed service migration strategy performs well and is intensive to vehicle density change.


---

## Body

## 1. Introduction

With the rapid growth of vehicles, road safety has become a problem faced by countries all over the world. Vehicle safety applications by means of real-time information exchange between vehicles are techniques for avoiding traffic accidents.Although cooperative vehicle infrastructure system (CVIS) is considered an effective approach to support vehicle safety applications, it has to meet the requirements of real-time ability, reliability, and service continuity.For non-local service requests, the traditional centralized cloud computing network has defects in terms of delay and throughput. Therefore, in order to match the needs of real-time driving decision making, scholars have introduced edge computing technologies such as mobile edge computing (MEC) and fog computing (FC) into CVIS. Also, the edge computing server is configured on the side close to the user, deployed at the end of the base station (BS) and roadside unit (RSU). The back-end service information can be calculated and maintained at the edge node, thus providing relatively adequate computing ability [1] and supporting computational-intensive and time-sensitive operations or flexible deployment of applications and services. But for non-local services, MEC needs to maintain a certain service migration rate to reduce service delay. However, the high mobility of vehicle nodes is a negative impact on the efficiency of feedback information and service migration rate. The reason is that the object vehicle may leave the coverage area of the previous MEC, which undertakes computing tasks. To overcome this problem, in our previous work [2], a new concept, mobile secondary computing nodes (MSCNs), was defined, while a three-layer framework is constructed.Obviously, the relative speed of MSCN and its surrounding vehicles is lower than that of RSU and its surrounding vehicles and partially solves the service migration problem. However, the corresponding migration mechanism is different from that of traditional MEC architecture. Hence, we discussed the service migration problem under MSCN architecture [3] and proposed a MDP (Markov decision process)-based service migration strategy.However, in [3], the service migration strategy was designed according to the relative distance between vehicles and did not consider the vehicle’s moving feature and motion model. Obviously, service migration decision making is influenced by the traveling trace of the vehicle, which is the reflection of driving intention and is affected by regional vehicle density. Since the vehicle prefers to go to places with good traffic conditions, we can estimate the vehicle’s intention by considering the vehicle’s moving feature and motion model.Furthermore, the MDP model is considered an effective approach to express service migration progress. By establishing a state space that conforms to the vehicle’s moving feature and combining the motion model, a trade-off is made between the cost of migration and the benefits after migration to obtain the optimal service migration strategy.Therefore, in this paper, driving intention-based MDP service migration strategy under MSCN architecture is proposed. Specifically, our research contributions are as follows:According to vehicle driving intention and regional traffic condition factors over the dynamic feature of service requirement, a MDP-based service migration method, DIMDP (driving intention-based MDP), is proposed.A two-way road scenario, which includes four microscopic events, namely, following, turn left, turn right, and U-turn, is selected as the typical scenario.The rest of the paper is structured as follows. Section2 presents the related work, and Section 3 discusses the service migration using MDP based on MSCN. The service migration algorithm under MSCN is proposed and applied to traffic for service migration as an example in Section 4. Then, experimental simulation and result analysis are presented in Section 5. Finally, the conclusion is given in Section 6.


## 2. Related Work

We briefly investigated the existing literature on service migration from the perspective of service delay and trajectory prediction.Yu et al. [4] prioritized MEC services and proposed a partial dynamic optimization algorithm (PDOA) service migration strategy calculation algorithm, which calculates the migration strategy that minimizes the average delay of long-term service by predicting the mobility of vehicles and achieves good results when the density of vehicles is small. However, the algorithm does not consider the impact of service interruption caused by the long migration time when the vehicle density is high.Ge et al. [5] proposed the FEE algorithm to calculate the best service migration strategy, which takes into account the current and future time delays in N time slots and the service migration interface between vehicles and changes the focus of the migration strategy by setting up weight coefficients for the delay of each time slot. The algorithm can achieve better results by increasing the number of time slots, which is not obvious when the number of time slots is 5. However, the algorithm does not consider the frequency of service requests, so the algorithm may not achieve better results when services require frequent requests.Nadembega et al. [6] proposed a mobility-based service migration prediction (MSMP) model, which split user requested service into several portions for service migration by estimating the throughput that the user could receive in advance.Xu et al. [7] investigated path selection for seamless service migration and proposed a path-selection algorithm to jointly optimize both interests of the network plane and service plane and designed a distance-based filter strategy to eliminate undesired switches in advance to improve the scalability of the proposed algorithm.Recently, the MDP model is considered an effective approach to express service migration progress. Corresponding researchers considered both user mobility features and MEC-based service requirements to establish decision-making strategies [8]. Moreover, cost function definition methods are proposed [9]. Combined with MDP and cost function definition. Taleb et al. [10] proposed a service migration decision algorithm to verify the effectiveness of Follow Me Cloud and provided guidelines for the method in this paper.However, the existing MDP-based research has not built a model suitable for the CVIS, which considers the vehicle’s moving feature and motion model.In view of traffic simulation, vehicle motion models are categorized into microscopic [11] and macroscopic [12]. Microscopic models focus on the dynamic features of the separate vehicles, while macroscopic models consider traffic features, such as the traffic density, average velocity, flow, and so on. Hence, in this paper, we introduce density factor into the vehicle intention prediction model, thus constructing a microscopic motion model. On the other hand, to establish the MDP model, we borrow from the idea of the cellular model [13], which has adopted the time-space discretion method, to construct a microscopic motion model.


## 3. Service Migration under MSCN Framework

According to the percentage of migrated content, service migration can be divided into partial migration and full migration. Different migration methods bring different advantages and disadvantages. Since partial migration involves real-time decisions about which part of the data to migrate, this paper only considers the overall migration of the service.


### 3.1. MSCN Framework

The MEC-based architecture, MSCN, proposed in our previous work is shown in Figure1.Figure 1
MSCN framework.Here MSCN framework includes three layers, which are MEC layer, MSCN layer, and general vehicle layer. Experimental verification shows that MSCN can provide reliable RSU-oriented services and significantly improves both communication performance and computing efficiency [2].


#### 3.1.1. MEC Layer

The MEC layer provides computing and storage resource to road vehicle. Meanwhile, the service provider could provide vehicle-oriented service via the MEC interface.


#### 3.1.2. MSCN Layer

Selected vehicle nodes, such as city buses, taxis, and so on, are used to construct the MSCN layer, which could provide local computing resources. MSCN nodes collect BSMs sent by surrounding vehicles, then fulfill information fusion, and upload corresponding results to the MEC layer.


#### 3.1.3. General Vehicle Layer

The general vehicle layer includes all road vehicle nodes, which are equipped with DSRC/LTE-V blocks, and could communicate with each other and RSU directly.


### 3.2. MDP Model Based on Two-Way Lane

In this paper, we select a two-way lane scenario to discuss the service migration problem.The problem involves the following assumption conditions:Object region is full C-V2X coverage, which means that all on-road vehicles could communicate with RSU.All road vehicles are equipped with a C-V2X module and communicate with RSU via the PC5 interface.There are enough public traffic vehicles to serve as MSCNs, which communicate with RSU and other on-road vehicles via C-V2X technologies.RSUs communicate with each other via wired networks, such as fiber backbone and Ethernet.The relationship between users and service providers is expressed by the distance factor. A service migration event should occur whendt>N. In this paper, the maximum value of N is set as 10.MSCN’s dwelling time is subject to an exponential distribution with a mean value equal to1/μ.According to the above assumptions, the two-way lane MDP model is constructed. State space of service migration under the MSCN framework is shown in Figure2(a), while corresponding state transition progress is denoted in Figure 2(b). As shown in Figure 3, service migration progress under MSCN architecture includes two migration levels, is denoted as social vehicle-oriented migration and public vehicle-oriented migration.Social vehicle-oriented migration: a social vehicle changes its association MSCN (public vehicles), for example, MSCN1⟶MSCN2 as shown in Figure3(a). It should be noted that social vehicle can only migrate to the MSCN with the same cruising direction.Public vehicle-oriented migration: a public vehicle (MSCN) changes its association RSU, for example, RSU1⟶RSU2 as shown in Figure3(b).Figure 2
MDP model based on two-way lane. (a) State space of service migration. (b) State transition progress.
(a)(b)Figure 3
Two levels of service migration under MSCN. (a) Social vehicle-oriented migration. (b) Public vehicle-oriented migration.
(a)(b)As shown in Figure2(b), for an initial state πn,n∈0,4N−1, two inclining migration events are expressed as(1)πn+1,n∈0,2N−1,cruisingforward,πn+1,n∈2N,4N−1,cruisingbackward.State transition probability matrix is defined as(2)P=p01…p04N−1⋮⋱⋮p4N−10…p4N−14N−1,where pij,i,j∈0,4N−1 is the transition probability of state i and j. In this paper, we take into account the driving intention of the vehicle to obtain the transition probability in the next section.Assume that state probability of stateπn is χn, and(3)∑n=04N−1χn=1.State transition progress could be denoted as(4)χf=χf·P.Thus, we can obtain the row probability vectorχn of states at the migration strategy N according to equations (3) and (4).


### 3.3. Vehicle Motion Features

Obviously, service migration progress is decided by vehicle motion features, e.g., cruising direction, cruising speed, and relative speed. For MSCN architecture, two kinds of relative speed, the relative speed between social vehicles (users) and public vehicles (MSCN) and relative speed between public vehicles (MSCN) and RSU, should be considered.According to [14], for traffic participants, the probability of the specific event in the time interval t,t+Δt, is defined as(5)Pt;Δt=τ−1ItΔt,where τ−1∈0,τmax−1 is the number of events that occur per unit time interval under a certain condition and I is the situation-related risk indicator function.Although equation (5) is constructed for driving risky evaluation, it could be used to express state transition probability. Hence, we define a situation indicator function Is, assuming that traffic prefers to go to places with better traffic conditions and regional traffic condition Ctraffic, to replace risk indicator function I, as shown as follows:(6)Is∼dI,Ctraffic,where dI is obtained according to path planning information and Ctraffic∈0,1 is real-time traffic information, defined as(7)Ctraffict=maxe−vℜtv¯MSCN,0vlimit,vℜtv¯,vMSCNvℜtv¯MSCN,0,vℜv¯MSCN,0≠0,1,else,where vretv¯,v¯MSCN is the relative speed between social vehicles (users) for time t and public vehicles (MSCN), while vretv¯MSCN,0 is the relative speed between public vehicles (MSCN) and RSUs for time t.vlimit is the maximum speed limit on road. v¯ is the average cruising speed of vehicles in coverage of corresponding MSCN. v¯MSCN is the average cruising speed of MSCN in coverage of corresponding RSU.The worse the traffic condition is, the higher theCtraffic value should be. Note here that we assume that path change is a result of bad traffic conditions.(8)dIt+Δt=dIt∗exp1−Ctraffict+Δt/Ctraffictexp1−Ctraffict.In view of service migration, according to vehicle cruising direction, the migration area could be divided into two parts, namely, the forward area and the backward area. As mentioned earlier, here we consider four kinds of events: the following, turn left, turn right, and U-turn. Here we categorize the following, turn left, and turn right as forward area migration inclining events while U-turn as backward area migration inclining events.Then, we define vehicle states asπn,n∈0,M−1, where M is the number of states, and pij,i,j∈0,M−1, is the state transition probability, which is denoted as(9)pij=PπΔt=πj|π=πi∼τ−1dI,CtrafficΔt,where πi is the state of time t and πj is that of time t+Δt.Considering vehicle’s inclining events, forward or backward, and with the assumption that traffic prefers to go to places with better traffic conditions and regional traffic conditionsCtraffic, the state transition probability proportional to dI is defined as follows:(10)pifdIf=pibdIb,pif+pib=1,where pif and pib are occurrence probabilities of forward event state πf and forward event state πb.Then,pif and pib could be denoted as(11)pif=dIfdIf+dIf,pib=dIbdIf+dIf.Substitute (8) into (11); then,(12)pif=exp1−Ctrafficft+Δt/Ctraffictexp1−Ctrafficbt+Δt/Ctraffict+exp1−Ctrafficft+Δt/Ctraffict,pib=exp1−Ctrafficbt+Δt/Ctraffictexp1−Ctrafficbt+Δt/Ctraffict+exp1−Ctrafficft+Δt/Ctraffict.


## 3.1. MSCN Framework

The MEC-based architecture, MSCN, proposed in our previous work is shown in Figure1.Figure 1
MSCN framework.Here MSCN framework includes three layers, which are MEC layer, MSCN layer, and general vehicle layer. Experimental verification shows that MSCN can provide reliable RSU-oriented services and significantly improves both communication performance and computing efficiency [2].


### 3.1.1. MEC Layer

The MEC layer provides computing and storage resource to road vehicle. Meanwhile, the service provider could provide vehicle-oriented service via the MEC interface.


### 3.1.2. MSCN Layer

Selected vehicle nodes, such as city buses, taxis, and so on, are used to construct the MSCN layer, which could provide local computing resources. MSCN nodes collect BSMs sent by surrounding vehicles, then fulfill information fusion, and upload corresponding results to the MEC layer.


### 3.1.3. General Vehicle Layer

The general vehicle layer includes all road vehicle nodes, which are equipped with DSRC/LTE-V blocks, and could communicate with each other and RSU directly.


## 3.1.1. MEC Layer

The MEC layer provides computing and storage resource to road vehicle. Meanwhile, the service provider could provide vehicle-oriented service via the MEC interface.


## 3.1.2. MSCN Layer

Selected vehicle nodes, such as city buses, taxis, and so on, are used to construct the MSCN layer, which could provide local computing resources. MSCN nodes collect BSMs sent by surrounding vehicles, then fulfill information fusion, and upload corresponding results to the MEC layer.


## 3.1.3. General Vehicle Layer

The general vehicle layer includes all road vehicle nodes, which are equipped with DSRC/LTE-V blocks, and could communicate with each other and RSU directly.


## 3.2. MDP Model Based on Two-Way Lane

In this paper, we select a two-way lane scenario to discuss the service migration problem.The problem involves the following assumption conditions:Object region is full C-V2X coverage, which means that all on-road vehicles could communicate with RSU.All road vehicles are equipped with a C-V2X module and communicate with RSU via the PC5 interface.There are enough public traffic vehicles to serve as MSCNs, which communicate with RSU and other on-road vehicles via C-V2X technologies.RSUs communicate with each other via wired networks, such as fiber backbone and Ethernet.The relationship between users and service providers is expressed by the distance factor. A service migration event should occur whendt>N. In this paper, the maximum value of N is set as 10.MSCN’s dwelling time is subject to an exponential distribution with a mean value equal to1/μ.According to the above assumptions, the two-way lane MDP model is constructed. State space of service migration under the MSCN framework is shown in Figure2(a), while corresponding state transition progress is denoted in Figure 2(b). As shown in Figure 3, service migration progress under MSCN architecture includes two migration levels, is denoted as social vehicle-oriented migration and public vehicle-oriented migration.Social vehicle-oriented migration: a social vehicle changes its association MSCN (public vehicles), for example, MSCN1⟶MSCN2 as shown in Figure3(a). It should be noted that social vehicle can only migrate to the MSCN with the same cruising direction.Public vehicle-oriented migration: a public vehicle (MSCN) changes its association RSU, for example, RSU1⟶RSU2 as shown in Figure3(b).Figure 2
MDP model based on two-way lane. (a) State space of service migration. (b) State transition progress.
(a)(b)Figure 3
Two levels of service migration under MSCN. (a) Social vehicle-oriented migration. (b) Public vehicle-oriented migration.
(a)(b)As shown in Figure2(b), for an initial state πn,n∈0,4N−1, two inclining migration events are expressed as(1)πn+1,n∈0,2N−1,cruisingforward,πn+1,n∈2N,4N−1,cruisingbackward.State transition probability matrix is defined as(2)P=p01…p04N−1⋮⋱⋮p4N−10…p4N−14N−1,where pij,i,j∈0,4N−1 is the transition probability of state i and j. In this paper, we take into account the driving intention of the vehicle to obtain the transition probability in the next section.Assume that state probability of stateπn is χn, and(3)∑n=04N−1χn=1.State transition progress could be denoted as(4)χf=χf·P.Thus, we can obtain the row probability vectorχn of states at the migration strategy N according to equations (3) and (4).


## 3.3. Vehicle Motion Features

Obviously, service migration progress is decided by vehicle motion features, e.g., cruising direction, cruising speed, and relative speed. For MSCN architecture, two kinds of relative speed, the relative speed between social vehicles (users) and public vehicles (MSCN) and relative speed between public vehicles (MSCN) and RSU, should be considered.According to [14], for traffic participants, the probability of the specific event in the time interval t,t+Δt, is defined as(5)Pt;Δt=τ−1ItΔt,where τ−1∈0,τmax−1 is the number of events that occur per unit time interval under a certain condition and I is the situation-related risk indicator function.Although equation (5) is constructed for driving risky evaluation, it could be used to express state transition probability. Hence, we define a situation indicator function Is, assuming that traffic prefers to go to places with better traffic conditions and regional traffic condition Ctraffic, to replace risk indicator function I, as shown as follows:(6)Is∼dI,Ctraffic,where dI is obtained according to path planning information and Ctraffic∈0,1 is real-time traffic information, defined as(7)Ctraffict=maxe−vℜtv¯MSCN,0vlimit,vℜtv¯,vMSCNvℜtv¯MSCN,0,vℜv¯MSCN,0≠0,1,else,where vretv¯,v¯MSCN is the relative speed between social vehicles (users) for time t and public vehicles (MSCN), while vretv¯MSCN,0 is the relative speed between public vehicles (MSCN) and RSUs for time t.vlimit is the maximum speed limit on road. v¯ is the average cruising speed of vehicles in coverage of corresponding MSCN. v¯MSCN is the average cruising speed of MSCN in coverage of corresponding RSU.The worse the traffic condition is, the higher theCtraffic value should be. Note here that we assume that path change is a result of bad traffic conditions.(8)dIt+Δt=dIt∗exp1−Ctraffict+Δt/Ctraffictexp1−Ctraffict.In view of service migration, according to vehicle cruising direction, the migration area could be divided into two parts, namely, the forward area and the backward area. As mentioned earlier, here we consider four kinds of events: the following, turn left, turn right, and U-turn. Here we categorize the following, turn left, and turn right as forward area migration inclining events while U-turn as backward area migration inclining events.Then, we define vehicle states asπn,n∈0,M−1, where M is the number of states, and pij,i,j∈0,M−1, is the state transition probability, which is denoted as(9)pij=PπΔt=πj|π=πi∼τ−1dI,CtrafficΔt,where πi is the state of time t and πj is that of time t+Δt.Considering vehicle’s inclining events, forward or backward, and with the assumption that traffic prefers to go to places with better traffic conditions and regional traffic conditionsCtraffic, the state transition probability proportional to dI is defined as follows:(10)pifdIf=pibdIb,pif+pib=1,where pif and pib are occurrence probabilities of forward event state πf and forward event state πb.Then,pif and pib could be denoted as(11)pif=dIfdIf+dIf,pib=dIbdIf+dIf.Substitute (8) into (11); then,(12)pif=exp1−Ctrafficft+Δt/Ctraffictexp1−Ctrafficbt+Δt/Ctraffict+exp1−Ctrafficft+Δt/Ctraffict,pib=exp1−Ctrafficbt+Δt/Ctraffictexp1−Ctrafficbt+Δt/Ctraffict+exp1−Ctrafficft+Δt/Ctraffict.


## 4. Service Migration Algorithm and Typical Applications under DIMDP-Based MSCN Architecture

### 4.1. Migration and Transmission Cost

Obviously, the optimization target of the service migration strategy is to minimize migration and transmission costs, and thus it could improve service performance.Here we assume that the dwelling time of vehicle nodei is calculated as(13)Tdewll,vehiclei=rt,rsuvvehiclei,where rt,rsu is the coverage radius of vehicle i’s home RSU and vvehiclei is the cruising speed of vehicle i.We define two cost functions, namely, transmission cost functionCtransd and migration cost function CmN, as follows:(14)Ctransd=Dtransd·rt,rsu·fvi,CmN=DmN+ImN,where Dtransd is the message transmission delay between the user vehicle node and service provider, at a distance d, (f) is the packet transmission frequency, and N is the migration distance. Migration progress should occur if d>N. DmN is the migration delay function, while ImN is the service interruption function, defined as follows:(15)DmN=θmR+β+1λfRN+1,ImN=expDmNk−1,where R is the data transfer rate, λm is the size of the data that needs to be transmitted during the service request process, λf represents the size of data frame structure waiting to be sent in the queue, and β represents the number of the frame structure, which is affected by network congestion.Message transmission delay is the sum of dissemination delayDtd as shown in (16) and queuing delay Dqd, as shown as(16)Dtd=λmR+dc,Dqd=β+1λfRd,where dc, which is a constant, represents the wireless communication delay between the vehicle and the RSU.Then, we defineDtransd as(17)Dtransd=Dtd+Dqd=λmR+β+1λfRd+dc.Average total cost function, where the state probability of stateπn, χn, is used as a weight to calculate the weighted average of cost, is defined as(18)Ca¯N=∑d=1N−1CtransdχN−1±d+χ3N−1±d+CtransNχ2N+χ2N−1+CmNχ2Np2Nf+χ2N−1p2N−1f,while the optimal objective is to minimize the average total cost as follows:(19)P1:S=argminNCa¯n.The pseudocode of optimal strategy is shown in Algorithm1, while corresponding variables and functions are explained in Table 1. Firstly, the algorithm obtained the state transition probability matrix P according to vehicle driving intention and obtained the row probability vector χn according to (3) and (4) in different migration distance N. Then, the average total cost Ca¯ is obtained according to (18). Finally, we compare the total cost at each migration distance to obtain the optimal service migration distance corresponding to the minimum average total cost Ca¯.Table 1
Explanation for Algorithm 1’s variables and functions.
Variable/functionExplanationpifProbability set of forward area migration inclining eventsλmService request data sizeθmService migration data sizeλfThe data size of frame structurert,rsuThe coverage radius of RSUvvehicleVehicle speedfService request frequencyCminThe minimal average total costCa¯SThe optimal migration strategy, a service migration event occurring whendt≥Sget_Pmatrix (pif, N)Obtain the state transition probability matrix P according to pif at migration distance Nget_state (P, N)Obtain the row probability vectorχn of states at the migration distance N according to (3) and (-4)Get_cost (Cset,χn, N)Obtain the average total costCa¯N according to (18). Cset is λm,θm,λf,rt,rsu,vvehicle,f.Algorithm 1: Optimal strategy.
Input:pif, λm, θm, λf, (r), rt,rsu, vvehicle, (f)Output:Optimal migration strategySCmin←∞;S←10;forN = 1 to 10 doP← get_Pmatrix (pif, N);χn← get_state (P, N);Ca¯← = get_cost (Cset, χn,N);ifCmin>Ca¯Cmin←Ca¯;S←N;elsebreak;endendReturnS;Note here that to avoid the impact of the sudden speed change on service migration performance, in this paper, we use regional average speed as the input value of vehicle speed.


### 4.2. Service Migration Strategy

The proposed MDP-based service migration strategy under the MSCN framework is shown in Algorithm2, and the corresponding variables and functions are explained in Table 2. First, the current position of each vehicle is obtained and compared with the position of the previous moment to determine whether the MSCN directly under the vehicle has changed. After that, if the MSCN directly under the vehicle changes, determine whether the RSU directly under the vehicle has changed. Then, if the RSU directly under the vehicle changes, compare the distance from the current distance with the optimal strategy obtained by Algorithm 1. Finally, once the distance to the optimal policy is reached, service migration is performed and P is updated, with the new service provider as the center. This completes a service migration.Table 2
Explanation for Algorithm 2’s variables and functions.
Variable/functionExplanationVVehicle set(xcn, ycn)Center coordinates of middle cellt1Last momentt2Current momentdDistance between service requester and service providerCsetA set ofλm,θm,λf,rt,rsu,vvehicle,fpifAs explained in Table1VtargetThe vehicle member currently traversedget_position (V, t)Get the position of vehicle V at time tget_cellnum ((xt, yt), (xcn, ycn))Obtain the cell number of coordinate (xt,yt) by taking coordinate (xcn, ycn) as a reference pointget_MSCN (cellnum)Obtain the MSCN id corresponding to cell cellnumget_rsu (MSCNid)Obtain the RSU id to which MSCNid belongsmscnMigrationA map < vehicle_id,flag > which represents the vehicle who’s id is vehicle_id will perform or not service migration at the MSCN level while the flag is true or falsersuMigrationA map < vehicle_id,flag > which represents the vehicle who’s id is vehicle_id will perform or not service migration at the RSU level while the flag is true or falsesetMigrationThe service migration set {rsuMigration, mscnMigration}get_strategy (pif, cset)Obtain the optimal strategy according to Algorithm 1 with variable pif and variable CsetAlgorithm 2: Service migration under MSCN framework.
Input:V, (xcn, ycn), t1, t2, d, Cset, pifOutput:setMigration {rsuMigration, mscnMigration}forVtarget each in V(xt1,yt1) ← get_position (Vtarget,t1);(xt2,yt2) ← get_position (Vtarget,t2);cellnum1 ← getcell_num ((xt1, yt1),(xcn, ycn));cellnum2 ← getcell_num ((xt2, yt2),(xcn, ycn));MSCNid1 ← get_MSCN (cellnum1);MSCNid2 ← get_MSCN (cellnum2);rsu1 ← get_rsu (MSCNid1);rsu2 ← get_rsu (MSCNid2);if (MSCNid1 = = MSCNid2) thenrsuMigration.insert (Vtarget, false);elsemscnMigration.insert (Vtarget, true);endif (rsu1 = = rsu2) thenrsuMigration.insert (Vtarget, false);elseS ← get_strategy (pif,Cset);if (d > S) thenrsuMigration.insert (Vtarget, true);update pif;elsersuMigration.insert (Vtarget, false);endendend forReturnsetMigration;According to the 3GPP suggestion, corresponding parameters are set as(20)λm=1200bit,θm=3.5Mb,λf=1024bit,R=5Mbps,f=10Hz.The relationship between migration distance N and migration cost with differentp values is shown in Figure 4. Here regional average speed is set as 20 m/s.Figure 4
Total cost vs. migration distance N at differentp.As shown in Figure4, total cost increases with increasing p, and thus we verify the validity of the cost function. Moreover, the optimal object S, which is defined by (19), varies from 3 to 4.The relationship between migration distanceN and migration cost with different regional average speed values is shown in Figure 5.Figure 5
Total cost vs. migration distance (N) at different regional average speed (v).As shown in Figure5, the average total cost increases with increasing regional average speed, which expresses the influence of the vehicle’s cruising intention. The value range of optimal object S is [2, 5] and consistent with the result of Figure 5.


### 4.3. Intersection Control under the MSCN Framework

Intersection control in the MSCN framework leverages RSU collaboration across multiple intersections and decides whether to perform service migration of applications based on DIMDP.Intersection traffic flow detection in the MSCN framework requires to collect three sets of data, including(1)
The number of queued vehicles in each lane group (left-turn, straight turn, and right-turn lane group) of the main road at intersections.(2)
The number of vehicles queued on the branch entrance road.(3)
The speed of straight-line vehicles exiting the intersection, which can be obtained by the vehicle’s own speed sensor.The intersection control application in the MSCN framework is shown in Figure6, in which blue vehicles represent upcoming right-turn vehicles after passing through the intersection, red represents upcoming straight-traffic vehicles, and black represents upcoming left-turn vehicles. RSUs deploying MEC services are set up between upstream and downstream intersections, and the distance between RSUs is determined according to their transmission range. The specific data flow is as follows:(1)
The road vehicles decide whether to perform service migration according to the DIMDP in the MSCN framework.(2)
The road vehicles send application messages (including node id, MSCN id, direction information, vehicle current speed, vehicle current acceleration, and time stamp information) to the MSCN in the region through the information distribution mechanism in the MSCN framework.(3)
The MSCN receives road vehicle information and performs preliminary calculations and statistics to obtain Table3.(4)
The MSCN decides whether to perform application service migration based on the DIMDP optimization policy.(5)
The MSCN sends Table3 to the optimal RSU.(6)
Optimal RSU assembles and organizes Table3 from each cluster and MSCN to obtain Table 4.(7)
The adjacent RSUs exchange Table4 to generate updating Table 4.(8)
The optimal RSU sends updating Table4 to the traffic light controller and executes intersection control.Figure 6
Intersection control under MSCN framework.Table 3
MSCN.
Node idMSCN idSending timeDirectionSpeed (m/s)Acce (m/s2)1110.23.33Right20.51.018110.23.45Left21.20.323110.23.55Right24.31.512110.23.58Straight23.50.58………………Table 4
RSU.
Cluster idMSCN idReceiving timeTotal rightTotal leftTotal straight1310.32.0883121110.32.134681210.32.455153310.32.584616………………Table3 shows the preliminary results after MSCN collects all the normal vehicle nodes and its own application information in its region and conducts statistical sorting. Then, the MSCN sends Table 3 to the optimal RSU, which receives Table 3 from each cluster and each MSCN within the cluster, processes, and counts it to form Table 4.


## 4.1. Migration and Transmission Cost

Obviously, the optimization target of the service migration strategy is to minimize migration and transmission costs, and thus it could improve service performance.Here we assume that the dwelling time of vehicle nodei is calculated as(13)Tdewll,vehiclei=rt,rsuvvehiclei,where rt,rsu is the coverage radius of vehicle i’s home RSU and vvehiclei is the cruising speed of vehicle i.We define two cost functions, namely, transmission cost functionCtransd and migration cost function CmN, as follows:(14)Ctransd=Dtransd·rt,rsu·fvi,CmN=DmN+ImN,where Dtransd is the message transmission delay between the user vehicle node and service provider, at a distance d, (f) is the packet transmission frequency, and N is the migration distance. Migration progress should occur if d>N. DmN is the migration delay function, while ImN is the service interruption function, defined as follows:(15)DmN=θmR+β+1λfRN+1,ImN=expDmNk−1,where R is the data transfer rate, λm is the size of the data that needs to be transmitted during the service request process, λf represents the size of data frame structure waiting to be sent in the queue, and β represents the number of the frame structure, which is affected by network congestion.Message transmission delay is the sum of dissemination delayDtd as shown in (16) and queuing delay Dqd, as shown as(16)Dtd=λmR+dc,Dqd=β+1λfRd,where dc, which is a constant, represents the wireless communication delay between the vehicle and the RSU.Then, we defineDtransd as(17)Dtransd=Dtd+Dqd=λmR+β+1λfRd+dc.Average total cost function, where the state probability of stateπn, χn, is used as a weight to calculate the weighted average of cost, is defined as(18)Ca¯N=∑d=1N−1CtransdχN−1±d+χ3N−1±d+CtransNχ2N+χ2N−1+CmNχ2Np2Nf+χ2N−1p2N−1f,while the optimal objective is to minimize the average total cost as follows:(19)P1:S=argminNCa¯n.The pseudocode of optimal strategy is shown in Algorithm1, while corresponding variables and functions are explained in Table 1. Firstly, the algorithm obtained the state transition probability matrix P according to vehicle driving intention and obtained the row probability vector χn according to (3) and (4) in different migration distance N. Then, the average total cost Ca¯ is obtained according to (18). Finally, we compare the total cost at each migration distance to obtain the optimal service migration distance corresponding to the minimum average total cost Ca¯.Table 1
Explanation for Algorithm 1’s variables and functions.
Variable/functionExplanationpifProbability set of forward area migration inclining eventsλmService request data sizeθmService migration data sizeλfThe data size of frame structurert,rsuThe coverage radius of RSUvvehicleVehicle speedfService request frequencyCminThe minimal average total costCa¯SThe optimal migration strategy, a service migration event occurring whendt≥Sget_Pmatrix (pif, N)Obtain the state transition probability matrix P according to pif at migration distance Nget_state (P, N)Obtain the row probability vectorχn of states at the migration distance N according to (3) and (-4)Get_cost (Cset,χn, N)Obtain the average total costCa¯N according to (18). Cset is λm,θm,λf,rt,rsu,vvehicle,f.Algorithm 1: Optimal strategy.
Input:pif, λm, θm, λf, (r), rt,rsu, vvehicle, (f)Output:Optimal migration strategySCmin←∞;S←10;forN = 1 to 10 doP← get_Pmatrix (pif, N);χn← get_state (P, N);Ca¯← = get_cost (Cset, χn,N);ifCmin>Ca¯Cmin←Ca¯;S←N;elsebreak;endendReturnS;Note here that to avoid the impact of the sudden speed change on service migration performance, in this paper, we use regional average speed as the input value of vehicle speed.


## 4.2. Service Migration Strategy

The proposed MDP-based service migration strategy under the MSCN framework is shown in Algorithm2, and the corresponding variables and functions are explained in Table 2. First, the current position of each vehicle is obtained and compared with the position of the previous moment to determine whether the MSCN directly under the vehicle has changed. After that, if the MSCN directly under the vehicle changes, determine whether the RSU directly under the vehicle has changed. Then, if the RSU directly under the vehicle changes, compare the distance from the current distance with the optimal strategy obtained by Algorithm 1. Finally, once the distance to the optimal policy is reached, service migration is performed and P is updated, with the new service provider as the center. This completes a service migration.Table 2
Explanation for Algorithm 2’s variables and functions.
Variable/functionExplanationVVehicle set(xcn, ycn)Center coordinates of middle cellt1Last momentt2Current momentdDistance between service requester and service providerCsetA set ofλm,θm,λf,rt,rsu,vvehicle,fpifAs explained in Table1VtargetThe vehicle member currently traversedget_position (V, t)Get the position of vehicle V at time tget_cellnum ((xt, yt), (xcn, ycn))Obtain the cell number of coordinate (xt,yt) by taking coordinate (xcn, ycn) as a reference pointget_MSCN (cellnum)Obtain the MSCN id corresponding to cell cellnumget_rsu (MSCNid)Obtain the RSU id to which MSCNid belongsmscnMigrationA map < vehicle_id,flag > which represents the vehicle who’s id is vehicle_id will perform or not service migration at the MSCN level while the flag is true or falsersuMigrationA map < vehicle_id,flag > which represents the vehicle who’s id is vehicle_id will perform or not service migration at the RSU level while the flag is true or falsesetMigrationThe service migration set {rsuMigration, mscnMigration}get_strategy (pif, cset)Obtain the optimal strategy according to Algorithm 1 with variable pif and variable CsetAlgorithm 2: Service migration under MSCN framework.
Input:V, (xcn, ycn), t1, t2, d, Cset, pifOutput:setMigration {rsuMigration, mscnMigration}forVtarget each in V(xt1,yt1) ← get_position (Vtarget,t1);(xt2,yt2) ← get_position (Vtarget,t2);cellnum1 ← getcell_num ((xt1, yt1),(xcn, ycn));cellnum2 ← getcell_num ((xt2, yt2),(xcn, ycn));MSCNid1 ← get_MSCN (cellnum1);MSCNid2 ← get_MSCN (cellnum2);rsu1 ← get_rsu (MSCNid1);rsu2 ← get_rsu (MSCNid2);if (MSCNid1 = = MSCNid2) thenrsuMigration.insert (Vtarget, false);elsemscnMigration.insert (Vtarget, true);endif (rsu1 = = rsu2) thenrsuMigration.insert (Vtarget, false);elseS ← get_strategy (pif,Cset);if (d > S) thenrsuMigration.insert (Vtarget, true);update pif;elsersuMigration.insert (Vtarget, false);endendend forReturnsetMigration;According to the 3GPP suggestion, corresponding parameters are set as(20)λm=1200bit,θm=3.5Mb,λf=1024bit,R=5Mbps,f=10Hz.The relationship between migration distance N and migration cost with differentp values is shown in Figure 4. Here regional average speed is set as 20 m/s.Figure 4
Total cost vs. migration distance N at differentp.As shown in Figure4, total cost increases with increasing p, and thus we verify the validity of the cost function. Moreover, the optimal object S, which is defined by (19), varies from 3 to 4.The relationship between migration distanceN and migration cost with different regional average speed values is shown in Figure 5.Figure 5
Total cost vs. migration distance (N) at different regional average speed (v).As shown in Figure5, the average total cost increases with increasing regional average speed, which expresses the influence of the vehicle’s cruising intention. The value range of optimal object S is [2, 5] and consistent with the result of Figure 5.


## 4.3. Intersection Control under the MSCN Framework

Intersection control in the MSCN framework leverages RSU collaboration across multiple intersections and decides whether to perform service migration of applications based on DIMDP.Intersection traffic flow detection in the MSCN framework requires to collect three sets of data, including(1)
The number of queued vehicles in each lane group (left-turn, straight turn, and right-turn lane group) of the main road at intersections.(2)
The number of vehicles queued on the branch entrance road.(3)
The speed of straight-line vehicles exiting the intersection, which can be obtained by the vehicle’s own speed sensor.The intersection control application in the MSCN framework is shown in Figure6, in which blue vehicles represent upcoming right-turn vehicles after passing through the intersection, red represents upcoming straight-traffic vehicles, and black represents upcoming left-turn vehicles. RSUs deploying MEC services are set up between upstream and downstream intersections, and the distance between RSUs is determined according to their transmission range. The specific data flow is as follows:(1)
The road vehicles decide whether to perform service migration according to the DIMDP in the MSCN framework.(2)
The road vehicles send application messages (including node id, MSCN id, direction information, vehicle current speed, vehicle current acceleration, and time stamp information) to the MSCN in the region through the information distribution mechanism in the MSCN framework.(3)
The MSCN receives road vehicle information and performs preliminary calculations and statistics to obtain Table3.(4)
The MSCN decides whether to perform application service migration based on the DIMDP optimization policy.(5)
The MSCN sends Table3 to the optimal RSU.(6)
Optimal RSU assembles and organizes Table3 from each cluster and MSCN to obtain Table 4.(7)
The adjacent RSUs exchange Table4 to generate updating Table 4.(8)
The optimal RSU sends updating Table4 to the traffic light controller and executes intersection control.Figure 6
Intersection control under MSCN framework.Table 3
MSCN.
Node idMSCN idSending timeDirectionSpeed (m/s)Acce (m/s2)1110.23.33Right20.51.018110.23.45Left21.20.323110.23.55Right24.31.512110.23.58Straight23.50.58………………Table 4
RSU.
Cluster idMSCN idReceiving timeTotal rightTotal leftTotal straight1310.32.0883121110.32.134681210.32.455153310.32.584616………………Table3 shows the preliminary results after MSCN collects all the normal vehicle nodes and its own application information in its region and conducts statistical sorting. Then, the MSCN sends Table 3 to the optimal RSU, which receives Table 3 from each cluster and each MSCN within the cluster, processes, and counts it to form Table 4.


## 5. Simulation and Result Analysis

### 5.1. Simulation Setup

Simulation is done based on the NS-3.28 platform. Simulation parameters are listed in Table5. We excerpted a 600-meter two-way road used in the simulation as a diagram as shown in Figure 7.Table 5
Simulation parameters.
ParameterValueLane number2RSU number5MSCN number15Distance between RSUs300mLane width3mLane length1500mVehicles’ velocity±20 m/s–±25 m/sFigure 7
The diagram of the two-way road used in the simulation.Corresponding communication parameters are listed in Table6.Table 6
Communication simulation parameters.
ParameterValueFrequency band5.9 GHzChannel bandwidth10 MHzData rate5 MbpsTransmit power23 dBmPacket size1200 bitPacket delivery frequency10 HzNote here that V2X information is one kind of timeliness information. Hence, re-transmission procedure is disabled. Moreover, until today, most C-V2X-based modules do not support power adjusting function and use fixed transmit power, valued as 23 dBm.Three parameters, average backhaul delay (ABL), packet delivery rate (PDR), and effective feedback ratio (EFR), are used to evaluate the performance of the proposed mechanism.Here effective feedback ratio is defined as the ratio of received effective service message number to uploaded BSM number, while the average backhaul delay is defined as the service response delay, which is the interval between the source node’s BSM sending timetbsm and destination node’s service response time tservice. Considering the influence of BSM dissemination delay, here we employ the average BSM dissemination delay to calculate ABL tABL as follows:(21)tABL=1N∑i=0Ntservice−tbsm,where N is the BSM packet number.To verify the performance of DIMDP under MSCN architecture, three others are selected as a contrast.(i)
MDP service migration strategy without driving intention under MSCN architecture.(ii)
Always migration strategy under MSCN architecture, whose migration condition is set asd (t) ≥ 0.(iii)
DIMDP under pure MEC architecture.As shown in Figure8, the p value has no significant effect on packet delivery rate and backhaul delay. The proposed DIMDP method performs better backhaul delay, which means the V2X security applications can respond faster.Figure 8
The impact ofp value. (a) Packet delivery rate. (b) Average backhaul delay.
(a)(b)As shown in Figure9, with the increase in road vehicle density, both the ABL and PDR of the proposed DIMDP method under MSCN architecture are nearly equal to a constant and perform better, which means it can still maintain excellent and stable performance in scenes with high vehicle density.Figure 9
The impact of vehicle density. (a) Packet delivery rate. (b) Average backhaul delay.
(a)(b)As shown in Figure10, the higher the vehicle velocity is, the lower the effective feedback ratio should be. Moreover, the effective feedback ratio of the proposed DIMDP method under MSCN architecture is higher than that of other methods.Figure 10
EFR vs. vehicle speed of four methods.


## 5.1. Simulation Setup

Simulation is done based on the NS-3.28 platform. Simulation parameters are listed in Table5. We excerpted a 600-meter two-way road used in the simulation as a diagram as shown in Figure 7.Table 5
Simulation parameters.
ParameterValueLane number2RSU number5MSCN number15Distance between RSUs300mLane width3mLane length1500mVehicles’ velocity±20 m/s–±25 m/sFigure 7
The diagram of the two-way road used in the simulation.Corresponding communication parameters are listed in Table6.Table 6
Communication simulation parameters.
ParameterValueFrequency band5.9 GHzChannel bandwidth10 MHzData rate5 MbpsTransmit power23 dBmPacket size1200 bitPacket delivery frequency10 HzNote here that V2X information is one kind of timeliness information. Hence, re-transmission procedure is disabled. Moreover, until today, most C-V2X-based modules do not support power adjusting function and use fixed transmit power, valued as 23 dBm.Three parameters, average backhaul delay (ABL), packet delivery rate (PDR), and effective feedback ratio (EFR), are used to evaluate the performance of the proposed mechanism.Here effective feedback ratio is defined as the ratio of received effective service message number to uploaded BSM number, while the average backhaul delay is defined as the service response delay, which is the interval between the source node’s BSM sending timetbsm and destination node’s service response time tservice. Considering the influence of BSM dissemination delay, here we employ the average BSM dissemination delay to calculate ABL tABL as follows:(21)tABL=1N∑i=0Ntservice−tbsm,where N is the BSM packet number.To verify the performance of DIMDP under MSCN architecture, three others are selected as a contrast.(i)
MDP service migration strategy without driving intention under MSCN architecture.(ii)
Always migration strategy under MSCN architecture, whose migration condition is set asd (t) ≥ 0.(iii)
DIMDP under pure MEC architecture.As shown in Figure8, the p value has no significant effect on packet delivery rate and backhaul delay. The proposed DIMDP method performs better backhaul delay, which means the V2X security applications can respond faster.Figure 8
The impact ofp value. (a) Packet delivery rate. (b) Average backhaul delay.
(a)(b)As shown in Figure9, with the increase in road vehicle density, both the ABL and PDR of the proposed DIMDP method under MSCN architecture are nearly equal to a constant and perform better, which means it can still maintain excellent and stable performance in scenes with high vehicle density.Figure 9
The impact of vehicle density. (a) Packet delivery rate. (b) Average backhaul delay.
(a)(b)As shown in Figure10, the higher the vehicle velocity is, the lower the effective feedback ratio should be. Moreover, the effective feedback ratio of the proposed DIMDP method under MSCN architecture is higher than that of other methods.Figure 10
EFR vs. vehicle speed of four methods.


## 6. Conclusion

V2X safety applications have time-sensitive characteristics, and their application performance largely depends on the effectiveness of the information sharing issues. Due to the high mobility of vehicle nodes, service providers, such as MEC servers and cloud servers, could not disseminate the useful messages to vehicle nodes on time. Fortunately, a reasonable calculation framework and effective transmission guarantee measure are useful to solve the above problems.MSCN framework, which uses public vehicles as mobile service providers, could decrease the service migration rate and maintain service continuity. On the other hand, although the MDP model could be used to express service migration progress, the vehicle motion features should be considered in the construction of the MDP model.In this paper, we use vehicle driving intention and regional traffic conditions to express the vehicle’s mobile tendency. A complex cost function, which considers both transmission factor and migration cost, is defined. Simulation results show that the proposed DIMDP model performs well.In the future, we shall work on the vehicle motion model, thus further refining our model and improving its performance.



---

*Source: 4988266-2022-10-11.xml*