Task Offloading Strategy of 6G Heterogeneous Edge-Cloud Computing Model considering Mass Customization Mode Collaborative Manufacturing Environment

With the continuous integration of cloud computing, edge computing, and Internet of things (IoT), various mobile applications will emerge in future 6G network. Driven by real-time response and low energy consumption requirements, mobile edge-cloud computing (MECC) will play an important role to improve user experience and reduce costs. However, due to the complexity of applications, the computing capacity of devices cannot meet the low-latency and low energy consumption requirement. Meanwhile, subject to the limited supplement of power and energy system, the heterogeneous multilayer mobile edge-cloud computing (HetMECC) is proposed to join cloud server, edge server, and terminal devices for data calculation and transmission. By dividing computing tasks, terminal applications can receive reliable and efficient computing services. -e simulation results show that the proposed model can achieve the low-latency requirement of data calculation and transmission and improve the robustness of architecture.

EMTC can exchange information based on large-scale data between machines without human intervention. In the future 6G era, massive multisource data will occupy a lot of network bandwidth resources and call for more reliable transmission and real-time processing; this is a challenge to the power and energy system and network system. In engineering production, real-time data acquisition and processing is important for reducing the loss caused by failure. e cdn-p2p system based on Hadoop was proposed by Shaikh et al. [2]. However, this method occupies a lot of network bandwidth and computing resources. Georgakopoulos et al. [3] integrated the edge device into the data center. However, there is a long transmission delay to upload the task to the data center. Subramanya et al. [4] put forward MEC, which is a practical edge computing architecture. However, the computing power of the edge server is limited compared with that of the cloud computing center, so it is difficult to process computing intensive tasks.
e HetMECC model based on heterogeneous multilayer edge computing is proposed in this paper. It combines cloud computing with multilayer edge computing to upload unhandled tasks from the lower edge server to the upper edge server. According to data generation rates, the robustness of the system is analyzed from the perspective of computing resources and transmission resources. e computing power can be fully used to avoid network congestion and reduce the system latency.

Proposed Methodology
An analytical methodology is proposed to analyze system latency of the HetMECC model, as shown in Figure 1. e dynamic analysis process is shown in Figure 2: first of all, the raw data are obtained through the monitoring of the IOT technology in application scenarios. Secondly, the task offloading model of HetMECC network processes the input dynamic raw data through computation of the system latency method, computation of energy consumption method, and fitness computing method. Finally, PSO algorithm is used for optimized the task offloading plan. Task completion and robust analysis of HetMECC network are given in case study. e main devices in HetMECC model are classified into three categories: cloud computing center, edge server, and edge device. e servers are sorted form the upper layer (cloud computing server was defined as layer 0) to the lower layer (defined as layer 1 to layer n). Edge devices are located in the lowest layer (defined as layer n + 1). e variable M n (i) denotes the number of devices connecting to the device i in layer n.

Computation Task Offloading
Model. Computation task offloading strategy was classified into three types: local computation, edge computation task offloading, and multilayers computation task offloading, as shown in  e number (1-5) denotes the allocated computation tasks. ese tasks can be processed by edge devices, edge server, or cloud server. e edge device is located in the lowest layer in the HetMECC model, such as multifunction sensors, computer numerical control machine (CNC), and other smart communication devices. e device i is taken as example in Figure 3. It can process the raw data generated by itself and transfer computation result to cloud server. v n+1 (i) denotes the raw data generation rate of edge device i in layer n + 1. b n+1 (i) denotes the number of local computation cycles. Q n+1 (i) denotes quantities of computation resources for device i. θ n+1 (j, i) denotes quantities of the allocated transmission resources for device i from edge server j.
In Figure 4, computation tasks were transferred to edge server j; allocated transmission resources θ n+1 (j, i) and raw data generation rate v n+1 (i) were considered for the edge device i.
In Figure 5, the computation task was offloaded by the multilayer scheduling method.
e computation result of current layer and other layers, some unprocessed raw data, should be taken into consideration. v n (i, j) denotes raw data arrived rate of edge server j from edge device i in layer N. Q n (j) denotes quantities of computation resources for edge server j. θ n (k, j) denotes quantities of the allocated transmission resources for edge server j from upper server k.

Computation of System Latency Method.
In the Het-MECC model, the system latency consisted of computation time, raw data transmission time, and temporary results receiving/sending time. It is assumed as follows: (1) All computation tasks can be divided (2) e quantity of allocated computation tasks will not exceed maximum computation capacity of devices (3) All allocated transmission tasks can be completed e latency T n (i) of device i in layer n can be calculated by where s n (i) denotes task offloading ratio, ρ denotes the data volume compression ratio, ρ * s n (i) * v n (i) denotes the quantity of raw data for transmission, [1 − s n (i)] * v n (i) denotes the quantity of processed data in layer n, and β n (i) denotes the quantity of temporary results received. For any device in layer n, T edge (n) can be calculated by where T edge (n) denotes the total system latency of edge servers and edge devices in layer n. Assume the computation time T server of cloud computing server is known. e total system latency of the Het MECC model can be calculated by

Computation of Energy Consumption
Method. e energy consumption of devices is classified as follows: (1) Tasks were all offloaded to edge device. P device (i) denotes the power of edge device i in layer n + 1. e energy consumption E device (i) can be calculated by (2) Tasks were offloaded only to multilayer servers, such as edge servers and cloud computing servers. So, the energy consumption consisted of many parts and can be calculated by e total energy consumption of edge servers can be calculated by e total energy consumption of cloud computing servers can be calculated by

Fitness Computing
Method. e traditional qualitative security analysis cannot provide sufficient information in application scenarios. is paper proposed a quantitative security analysis model. It is used as the quality evaluation index of the task offloading model. e safety factor of the device is defined as F(i), and the task is offloaded only once. e safety factor F sum of the whole task offloading model is derived as follows: where F(i) denotes the safety factor and the value of F(i) ranges from (0, 1]. Tasks were offloaded to edge devices or cloud computing servers when the value is 1. Otherwise, tasks were offloaded to edge servers. So, the sum of F(i) should be larger in the task offloading model. is paper proposed a fitness function to evaluate the task offloading model under the time constraint [10,15] as follows: where p1 and p2 denote device type parameters under determined task offloading strategy, E sum denotes the total energy consumption, T sum denotes the total system latency, and T c denotes the time constraint.

TOMO Algorithm Design
Based on the HetMECC model, the task offloading model optimization (TOMO) algorithm and the particle swarm optimization (PSO) algorithm [28] are used to optimize the task offloading plan and reduce the conflict probabilities of network resource. TOMO algorithm is shown in Table 1.    (1) for i � 1 to k do (2) random initialization of device type parameters pi and particle speed v i ; (3) setting initialization pi as optimal device type parameters; (4) end for (5) for t � 1 to Iter do (6) for i � 1 to k do (7) update data type parameters pi and particle speed v i ; (8) in the process of execution, multiple tasks request the same resource at the same time, and the Multiple layer resources optimal algorithm is used to reduce the conflict; (9) calculate total system latency T sum considering device type parameter pi; (10) calculate total energy consumption E sum considering device type parameter pi; (11) calculate total safety factor F sum considering device type parameter pi; (12) calculate fitness value according equation (10); (13) if (fitness(pi) < fitness(p best )) then (14) setting pi as the best offloading scheme p best ; (15) end if (16) end for (17) e offloading scheme with the lowest fitness value is selected as the global optimal offloading scheme p best ; (18) end for (19) return value of p best Parameters setting 5 Task processing 6

Simulation Environment and Parameter Setting.
Computer hardware includes enhanced processor and bulk memory. MATLAB is used for simulation software. In the experiment, each layer publishes 50-200 tasks. e task load is a random value that follows normal distribution. e allocation of computing resources and transmission resources is shown in Table 2. Assume that data transmission bandwidth is 30 Gbps and 3000 Gbps in LAN and WAN. e time constraint is set to 20%∼100% of the mean task completion time on 3.6 GHz CPU, and the value of node safety factor F(i) is (0.5, 1]. e sequence diagram of simulation experiment for HetMECC model is shown as Figure 6.

Experimental Results and Analysis.
e task offloading strategy TOMO algorithm is compared with local execution (LE), edge server execution (EC), and cloud computing center execution (CC) from aspects of end device energy consumption, task completion, system latency, fitness value, and robustness analysis. en, the comparison result is obtained. e end device energy consumption of the four task offloading models is shown in Figure 7. LE has the highest energy consumption value. e reason why EC has higher energy consumption is that all tasks are offloaded and executed in the edge server node. In the HetMECC model, some tasks can be executed in the cloud. e execution ability of the edge server is weaker than that of the cloud server. So, the energy consumption in CC increased. e task completion time of the four task offloading models is shown in Figure 8. e completion time of LE is the highest and exceeds the time constraint due to the low execution speed of end devices. When the number of published tasks is 50 in each layer, the completion time of HetMECC is lower than EC. When the number of published tasks is 200 in each layer, the completion time of CC is smaller than HetMECC and EC. But, the completion time gap is small. e system latency comparison is shown in Figures 9 and  10. e TOMO algorithm based on the HetMECC model can reduce the system latency more efficiently. It is useful in the case of high data generation rate under high computing pressure. When the data generation rate v n+1 (i) is greater than 6, other task offloading models will have network congestion. But, TOMO can reduce the system latency by using multilayer edge servers and cloud computing centers for calculation and transmission. When the data generation rate of double layers in HetMECC network has increased to Single layer data generation rate (×60Kbytes) Figure 9: System latency comparison of single layer. 6 Mathematical Problems in Engineering 11, TOMO can also has better performance. It is indicated that the network robustness has been improved significantly. e fitness values of the four offloading models are shown in Figure 11. When the number of published tasks ranged from 50 to 200, the fitness value obtained by TOMO is the lowest. When the number of published tasks is 50, the fitness value of TOMO is 39.2% lower than CC and 17.6% lower than EC. When the number of published tasks is 200, the fitness value of TOMO was 7.4% lower than CC and 14.3% lower than EC.
So, the task offloading model proposed in this paper can execute the task more efficiently. Terminal devices' energy consumption, task completion time, system latency, and network robustness have been optimized.

Conclusion
In this paper, the fitness calculation method is improved based on the HetMECC mode considering the requirement of low-latency and low energy consumption in future 6G heterogeneous network. Taking the energy consumption and safety factor of terminal devices as the evaluation index, system latency computation equation and TOMO algorithm were proposed to optimize the model. e energy consumption, task completion time, system latency, and network robustness are optimized according to the experiment result.

Data Availability
e data used to support the study are available within the article.