|
Algorithm 1 Resource Predictive Load Balancing SFC Migration Algorithm (RP-LBM) |
| 1 |
Input: Prediction result Physical network diagram ; SFC network diagram
|
| 2 |
Output: SFC mapping strategy ; |
| 3 |
Calculate the resource utilization of each physical node according to the prediction result; |
| 4 |
if then |
| 5 |
Select an SFC to migrate on that node; |
| 6 |
Initialize , M, (); |
| 7 |
for episode = 1, …, M do
|
| 8 |
Select mapping actions from the strategies ; |
| 9 |
if constraints are satisfied then |
| 10 |
Execute the action , get the instantaneous reward |
| 11 |
r and transfer it to the state s; |
| 12 |
Obtain the advantage function ; |
| 13 |
else
|
| 14 |
Set instantaneous reward r(t) = , and re-select the action from the policy network; |
| 15 |
end if
|
| 16 |
Compute the clipped surrogate objective for PPO |
| 17 |
Update the policy parameters using gradient ascent |
| 18 |
Update the value function parameters using gradient descent |
| 19 |
end for
|
| 20 |
end if |