Research Article

An Effective Task Offloading Method for Separable Complex Mobile Terminal Tasks

Algorithm 1

Task slicing algorithm based on similarity between subtasks.
(1)function [S] = Slice (, SM, A)
(2)Input:
(3)  SM//Number of edge servers, 0 < M < m
(4)  A//Logical hierarchy matrix
(5)output: S
(6)InitNum(T)//Initializes the subtask
(7)taskNum = Count(T)//the number of T
(8)for i = 1: taskNum
(9) TD = TaskSim ()//TD is sliceNum  sliceNum matrix, and the similarity between sub-tasks is calculated
(10)sliceNum = taskNum
(11)while true
(12)if sliceNum ≤ SM
(13)  break;
(14)Stemp = MaxSim (TD);
(15)if Notlevel (Stemp, A)//Tasks at the same logical level cannot be divided into a task slice
(16)  Cluster = Merge (Stemp)//Task clustering, forming a new task slice division
(17)  sliceNum = Count (Cluster)
(18)S = Cluster