Research Article

A Network Fault Prediction-Based Service Migration Approach for Unstable Mobile Edge Environment

Algorithm 1

: Service migration based on network fault prediction and DQN.
Input:
  State set S, Action set A, discounting factor , explore probability
Output:
  Migration strategy .
1:Initialize the Experience Pool with a capacity of M
2:Initialize the evaluation network neuron weight vector
3:Initialize the target network neuron weight vector ,the rest of the parameters are the same as the evaluation network
4:for episode = 1, 2…do
5: Initialize user location and the location of edge server ,initialize the first state
6:fort = 1, 2…do
7:  Predict the faulty node f and add it to the set of faulty nodes
8:  Randomly choose action with probability
9:  Or choose the action
10:  perform action ,calculate the penalty value p, reward value and the next moment state
11:  Put the sample into the experience pool
12:  Randomly select a small batch of samples from EP
13:  if if episode terminates at step t + 1 then
14:   set
15:  else
16:   set
17:  end if
18:  Train the network according to the loss function
19:  Set every x steps
20:end for
21:end for