## 3 System Model
### Problem Modeling
#### 3.2.1 Latency Model  
If task \(t_{i}\) is offloaded to the edge server for execution, then \(t_{i}\) must not start execution until all its parent tasks are completed, the WPT service charging is performed, and the different resources required are accessible. Assuming that the set of parent tasks of task \(t_{i}\) is parent(\(t_{i}\)), the task upload completion time \(FT_{i}^{upload}\) and uplink availability time \(AT_{i}^{upload}\) may be calculated from the following equations according to the preceding requirements:  
\[\begin{split} FT_{i}^{upload}&=\ max\Bigg{\{}AT_{i}^{upload },\underset{j\in\text{parent}(t_{i})}{\max}\Big{\{}FT_{j}^{\text{MD}},FT_{j}^{ download}\Big{\}}\Bigg{\}}\\ &\qquad\qquad+T_{i}^{upload}+T_{i}^{WPT}\\ AT_{i}^{upload}&=\ max\Big{\{}AT_{i-1}^{upload}, FT_{i-1}^{upload}\Big{\}}\\ T_{i}^{upload}&=\ \frac{data_{i}^{u}}{R_{u}}\end{split}. \tag{2}\]  
The edge server computation completion time \(FT_{i}^{compute}\) for task \(t_{i}\) relies on the time when computing resources are available \(AT_{i}^{compute}\), the parent task completion time, and the actual computation time. Where the two requirements, parent task completion and computation resource availability, must be met at the same time, the bigger of these two values is picked. When the calculation is performed, the mobile device may start downloading the results only when the downlink is available. Hence, the time to start downloading is stated as the larger of the downlink availability time \(AT_{i}^{download}\) and the  
Figure 1: Example of face recognition in MEC.  
the remaining power of the device after the two policies of processing tasks, local execution and offloading to the edge server, can be expressed as follows:  
\[B_{i}^{MD} = max\big{(}B_{i}^{CE}-E_{i}^{MD},0\big{)}, \tag{8}\]  
\[B_{i}^{offload} = max\Big{(}B_{i}^{CE}-E_{i}^{offload},0\Big{)}. \tag{9}\]  
If there is insufficient power, the processing task is considered unsuccessful. When the task offloading decision is denoted by \(d_{i}\in\{0,1\}\), the remaining processing power after task \(t_{i}\) is expressed as  
\[B_{i}^{remain} = B_{i}^{MD}\cdot d_{i}+B_{i}^{offload}\cdot(1-d_{i}). \tag{10}\]  
In the edge environment, the offloading method of DAG tasks is highly flexible, but most of the tasks have very strict requirements for latency. Solving mixed-integer linear programming problems using standard heuristic algorithms demands a huge amount of processing resources, which is power-consuming, takes a long time to make decisions for edge devices, and does not match the real-time requirements. Deep reinforcement learning enhances the strategy by learning to support a large state space and action space, which is beneficial to solving such complex problems and meets the real-time requirements. However, deep reinforcement learning is sensitive to changes in the environment and DAG types, and, when the environment changes, relearning the strategy takes great time and computational resources, which hinders practical applications. Therefore, this paper proposes a task offloading algorithm called MTD3 CO, which is based on meta reinforcement learning, to solve this problem. Table 2 shows the description of the main parameters in the text.