A Preemptive Task Offloading Strategy for Vehicular Edge Computing in Computing-Power-Constrained Heterogeneous Scenarios
-
摘要: 针对车联网算力紧缺场景中任务实时性差异化需求问题,该文提出一种基于车辆聚类与路侧单元(RSU)中继协作的双层深度Q网络(DQN)资源抢占式任务卸载策略(CR-D2QN)。首先,构建包含卸载、运行与挂起队列的多队列管理框架,区分任务紧急程度并设计智能协同调度机制,以决策新进、排队和运行任务在多队列管理框架中队列位置。其次,为利用空闲计算资源,采用基于密度的含噪声应用空间聚类(DBSCAN)算法对车辆的位置、速度、计算资源的多维状态进行动态聚类,形成服务簇,并借助RSU中继转发扩展可用计算资源的范围,增强可用资源的稳定性,保障抢占机制的实施。最后,设计双层DQN分层协同优化,第一层选择卸载节点,第二层在所选节点上决策是否进行资源抢占或队列插入。仿真表明,所提策略不仅能保障紧急任务高完成率,还能提升系统整体任务完成率,并将任务平均完成时延维持在较低水平。Abstract:
Objective In Vehicular Edge Computing (VEC) environments, computation-intensive and delay-sensitive tasks impose stringent real-time requirements on the scheduling of computing resources. Conventional non-preemptive scheduling schemes frequently cause urgent tasks to miss their deadlines due to resource contention. However, directly introducing a preemption mechanism into highly dynamic environments presents significant challenges. The high mobility of vehicles can easily cause link disconnections, leading to the failure of preempted tasks. Furthermore, the limited range of vehicle-to-vehicle (V2V) communications makes it difficult to effectively utilize idle computing resources over a wider area. To provide differentiated guarantees and orderly management to ensure timely task completion during the offloading and scheduling process in the Internet of Vehicles, this paper proposes a Dual-layer DQN-based Preemptive Resource Task Offloading Strategy with Vehicle Clustering and Roadside Unit (RSU) Relay Collaboration (CR-D2QN). Methods A multi-queue cooperative task management framework is established, comprising offloading, execution and suspended queues. Based on task urgency, this framework dynamically decides whether to preempt a currently executing task and move it to the suspended queue, or insert a new task into the offloading queue. A Density-Based Spatial Clustering of Applications with Noise (DBSCAN) method is then developed to form dynamic vehicle groups, considering vehicle position, velocity and computational capability. This method adaptively creates stable service clusters within VEC, thereby reducing the offloading decision space. Simultaneously, RSU relay forwarding is introduced to overcome the constraints of direct vehicle-to-vehicle communication, thereby enhancing link stability to guarantee the implementation of the preemption mechanism. On this basis, a dual-layer DQN framework is constructed, where the first layer selects the optimal offloading node within the cluster and the second layer determines whether to preempt the computational resources or insert the task into a specific position in the offloading queue at the selected node. The optimization objective is to maximize the system task completion rate subject to the defined constraints. Results and Discussions Simulation experiments are conducted using Python 3.8 and the PyTorch framework, with key experimental parameters listed in Table 1 . The proposed CR-D2QN strategy is benchmarked against five baselines including Random, Proximal Policy Optimization (PPO), Clustering and Relaying based on Deep Q-Network (CR-DQN), Resource Preemption and Task Queue Offloading based on Dual-Layer Deep Q-Network (PQO-D2QN) and Deadline-Ordered Deep Q-Network (DQN-order). The evaluation is conducted under varying conditions, including time-slot durations, task sizes and task volumes. As the time-slot duration increases, CR-D2QN maintains the highest urgent task completion rate among all compared strategies ( Fig. 4 ). The average task completion delay of CR-D2QN is lower than that of Random, PPO, CR-DQN and PQO-D2QN, though higher than that of DQN-order (Fig. 5 ). This is because DQN-order prioritizes tasks with the shortest remaining deadlines to minimize overall waiting time, whereas CR-D2QN sacrifices the latency of non-urgent tasks to ensure the reliability of urgent tasks. Similarly, as task sizes grow, CR-D2QN continues to achieve the highest urgent task completion rate (Fig. 6 ), while maintaining a low average latency compared to most baselines (Fig. 7 ). When the task volume increases, these performance advantages are consistently sustained (Fig. 8 ,9 ). These results confirm that the CR-D2QN strategy significantly enhances both resource utilization and scheduling efficiency in dynamic VEC environments.Conclusions A Preemptive Task Offloading Strategy named CR-D2QN is proposed for VEC in this work. This strategy integrates vehicle clustering, RSU relay cooperation and the dual-layer DQN-based preemption mechanism. By means of a three-tier queue management framework and a dual-layer reinforcement learning decision architecture, this strategy achieves the cooperative optimization of task offloading and task scheduling. Simulation results demonstrate that CR-D2QN not only guarantees a high completion rate for urgent tasks but also improves the overall system task completion rate while maintaining a low average task completion delay. Future work will extend the strategy to more complex scenarios, including multi-RSU cross-region coordination and unmanned aerial vehicle (UAV)-assisted air-ground integrated vehicular systems. -
1 基于DBSCAN的车辆聚类算法
输入:当前时隙$ t $,车辆集合$ {V}^{t} $,邻域半径$ \text{eps} $,最小邻域点数$ \text{MinPts} $,权重系数$ \varpi ,\omega ,\gamma $; 输出:车辆簇集合$ {\boldsymbol{C}}^{t}=\{\boldsymbol{C}_{1}^{t},\cdots ,\boldsymbol{C}_{K}^{t}\} $,噪声车辆集合$ {\text{Noise}}^{t} $; 1. 初始化:初始化核心车辆集合$ {\varOmega }\leftarrow 0 $,聚类簇数$ K\leftarrow 0 $,未访问车辆集合$ {\varGamma }\leftarrow 0 $,车辆簇划分$ \boldsymbol{C}_{K}^{t}\leftarrow \varnothing $; 2. 对每个车辆$ v_{i}^{t}\in {V}^{t} $的状态向量$ Z_{i}^{t}=(\boldsymbol{l}_{i}^{t},{s}_{i},{f}_{i}) $进行Min-Max归一化得到$ \tilde{\boldsymbol{l}}_{i}^{t},{\tilde{s}}_{i},{\tilde{f}}_{i} $; 3. For$ v_{i}^{t} $to$ {V}^{t} $do 4. 计算加权距离$ d(v_{i}^{t},v_{j}^{t}) $,构建$ \text{eps} $邻域$ {N}_{\text{eps}}(v_{i}^{t})=\{v_{i}^{t}\in {V}^{t}|d(v_{i}^{t},v_{j}^{t}) \lt \text{eps}\} $; 5. If $ |{N}_{\text{eps}}(v_{i}^{t})|\geq \text{MinPts} $then 6. 将$ v_{i}^{t} $加入核心车辆集合$ {\varOmega }\leftarrow {\varOmega }\cup \{v_{i}^{t}\} $; 7. End if 8. End for 9. While$ {\varOmega }\neq \varnothing $do 10. 从$ {\varOmega } $中选择一个核心车辆$ o $,初始化当前簇核心$ {{\varOmega }}_{\text{cur}}\leftarrow \{o\} $,车辆簇$ \boldsymbol{C}_{K}^{t}\leftarrow \{o\} $并更新集合$ {\varGamma }\leftarrow {\varGamma }\backslash \{o\} $$ ; $ 11. While$ {{\varOmega }}_{\text{cur}}\neq \varnothing $do 12. 从$ {{\varOmega }}_{\text{cur}} $中取出首个核心车辆$ q $$ , $计算$ q $的$ \text{eps} $邻域$ {N}_{\text{eps}}({q}^{t}) $; 13. If $ |{N}_{\text{eps}}({q}^{t})|\geq \text{MinPts} $then 14. 令$ {\varDelta }={N}_{\text{eps}}({q}^{t})\cap {\varGamma } $,将$ \Delta $中的车辆加入$ \boldsymbol{C}_{K}^{t} $,$ {\varDelta }\cap {\varOmega } $中的核心车辆加入$ {{\varOmega }}_{\text{cur}} $并更新集合$ {\varGamma }\leftarrow {\varGamma }\backslash {\varDelta } $; 15. End if 16. End while 17. 更新车辆簇划分$ {\boldsymbol{C}}^{t}\leftarrow {\boldsymbol{C}}^{t}\cup \boldsymbol{C}_{K}^{t} $,核心车辆集合$ {\varOmega }\leftarrow {\varOmega }\backslash \boldsymbol{C}_{K}^{t} $,$ K\leftarrow K+1 $; 18. End while 2 基于车辆聚类与RSU中继协作的双层DQN计算资源抢占式任务卸载算法
输入: 当前时隙$ t $,车辆集合$ {V}^{t} $,邻域半径$ \text{eps} $,最小邻域点数$ \text{MinPts} $,权重系数$ \varpi ,\omega ,\gamma $,任务集合Taskt; 输出:任务卸载决策集合$ {\mathcal{A}}_{1} $,资源抢占决策集合$ {\mathcal{A}}_{2} $,训练完成的DQN网络参数; 1. 初始化评价网络$ {Q}_{1} $,$ {Q}_{2} $、目标网络$ {Q}_{1}{}^{\prime} $,$ {Q}_{2}{}^{\prime} $和经验回放池$ {D}_{1} $,$ {D}_{2} $; 2. For $ t=0 $ to T do 3. 执行算法1,获得车辆簇集合$ {\boldsymbol{C}}^{t}=\{\boldsymbol{C}_{1}^{t},\cdots ,\boldsymbol{C}_{K}^{t}\} $; 4. For each 车辆簇$ \boldsymbol{C}_{k}^{t}\in {\boldsymbol{C}}^{t} $do 5. 获取当前簇内的任务集合$ \text{Task}_{k}^{t}\subseteq {\text{Task}}^{t} $,获取当前簇的状态$ S_{1,k}^{t} $和$ S_{2,k}^{t} $; 6. 基于当前评价网络$ {Q}_{1} $,采用$ \varepsilon - $贪婪策略选择卸载动作$ A_{1,k}^{t} $并执行动作; 7. 基于当前评价网络$ {Q}_{2} $,采用$ \varepsilon - $贪婪策略选择抢占或队列插入动作$ A_{2,k}^{t} $并执行动作; 8. 计算奖励$ \text{RW}_{1,k}^{t} $,并观测下一状态$ S_{1,k}^{t+1} $,将训练经验$ (S_{1,k}^{t},A_{1,k}^{t},S_{1,k}^{t+1},\text{RW}_{1,k}^{t}) $存入回放经验池$ {D}_{1} $; 9. 计算奖励$ \text{RW}_{2,k}^{t} $,并观测下一状态$ S_{2,k}^{t+1} $,将训练经验$ (S_{2,k}^{t},A_{2,k}^{t},S_{2,k}^{t+1},\text{RW}_{2,k}^{t}) $存入回放经验池$ {D}_{2} $; 10. If 经验回放池$ {D}_{1} $,$ {D}_{2} $样本数量达到批量大小then 11. 从经验回放池$ {D}_{1} $,$ {D}_{2} $抽取样本,计算目标网络$ {Q}_{1}{}^{\prime} $,$ {Q}_{2}{}^{\prime} $的Q值; 12. 根据梯度下降法更新评估网络$ {Q}_{1} $参数和软更新目标网络$ {Q}_{1}{}^{\prime} $参数; 13. 根据梯度下降法更新评估网络$ {Q}_{2} $参数和软更新目标网络$ {Q}_{2}{}^{\prime} $参数; 14. End If 15. End for 16. 合并所有簇的卸载决策$ A_{1}^{t}\leftarrow \cup _{k=1}^{K}A_{1,k}^{t} $和资源抢占决策$ A_{2}^{t}\leftarrow \cup _{k=1}^{K}A_{2,k}^{t} $; 17. End for 18. 合并所有时隙的卸载决策$ {\mathcal{A}}_{1}\leftarrow \cup _{t=0}^{T}A_{1}^{t} $和资源抢占决策$ {\mathcal{A}}_{2}\leftarrow \cup _{t=0}^{T}A_{2}^{t} $; 表 1 实验参数表
参数 取值 参数 取值 参数 取值 车辆计算能力$ {f}_{i} $ [10, 15] MHz 路径损失指数$ \lambda $ 2.4 学习率$ {\eta }_{l} $ 0.001 基站计算能力$ {f}_{m} $ 450 MHz 车辆发射功率$ {P}_{i} $ [0.1, 0.2] W 折扣因子$ \Upsilon $ 0.99 任务所需计算资源$ {C}_{i,t} $ [6, 14] Mcycle 噪声功率$ {N}_{0} $ -114 dBm 经验回放池大小 10000 任务数据大小$ {d}_{i,t} $ [2, 8] Mb 最小样本数$ \text{MinPts} $ 1 批大小 64 车辆无线信道带宽$ {b}_{i} $ 20 MHz 邻域半径$ \text{eps} $ 0.3 目标网络更新频率 100 -
[1] 霍如, 吕科呈, 黄韬. 车联网中路径预测驱动的任务切分与计算资源分配方法[J]. 电子与信息学报, 2025, 47(10): 3658–3669. doi: 10.11999/JEIT250135.HUO Ru, LÜ Kecheng, and HUANG Tao. Task segmentation and computing resource allocation method driven by path prediction in internet of vehicles[J]. Journal of Electronics & Information Technology, 2025, 47(10): 3658–3669. doi: 10.11999/JEIT250135. [2] 杨淼焱, 方旭明. 车联网中采用混合分层DRL的无人机辅助移动边缘计算[J]. 电子与信息学报, 2026, 48(4): 1668–1677. doi: 10.11999/JEIT250743.YANG Miaoyan and FANG Xuming. UAV-assisted mobile edge computing based on hybrid hierarchical DRL in the Internet of Vehicular[J]. Journal of Electronics & Information Technology, 2026, 48(4): 1668–1677. doi: 10.11999/JEIT250743. [3] JIANG Qinting, XU Xiaolong, BILAL M, et al. Potential game based distributed IoV service offloading with graph attention networks in mobile edge computing[J]. IEEE Transactions on Intelligent Transportation Systems, 2024, 25(9): 10912–10925. doi: 10.1109/TITS.2024.3369190. [4] 张冰雪, 李希胜, 尤佳. 多接入边缘计算网络中动态资源感知与任务卸载方案设计[J]. 电子与信息学报, 2026, 48(5): 2199–2209. doi: 10.11999/JEIT250640.ZHANG Bingxue, LI Xisheng, and YOU Jia. Design of dynamic resource awareness and task offloading schemes in multi-access edge computing networks[J]. Journal of Electronics & Information Technology, 2026, 48(5): 2199–2209. doi: 10.11999/JEIT250640. [5] CAI Qing, ZHOU Yiqing, LIU Ling, et al. Prioritized assignment with task dependency in collaborative mobile edge computing[J]. IEEE Transactions on Mobile Computing, 2024, 23(12): 13505–13521. doi: 10.1109/TMC.2024.3427380. [6] MENG Deng, GUO Jianmeng, ZHOU Huan, et al. Incentive-driven partial offloading and resource allocation in vehicular edge computing networks[J]. IEEE Internet of Things Journal, 2025, 12(8): 11023–11035. doi: 10.1109/JIOT.2024.3515075. [7] QIU Bin, WANG Yunxiao, XIAO Hailin, et al. Deep reinforcement learning-based adaptive computation offloading and power allocation in vehicular edge computing networks[J]. IEEE Transactions on Intelligent Transportation Systems, 2024, 25(10): 13339–13349. doi: 10.1109/TITS.2024.3391831. [8] LIU Zhixin, GAO Lei, MA Ziyang, et al. Joint task offloading and resource allocation scheme with UAV assistance in vehicle edge computing networks[J]. Computer Networks, 2025, 273: 111746. doi: 10.1016/j.comnet.2025.111746. [9] 王俊华, 罗菲, 高广鑫, 等. 动态车辆网络场景中的协同空地计算卸载和资源优化[J]. 电子与信息学报, 2025, 47(1): 102–115. doi: 10.11999/JEIT240464.WANG Junhua, LUO Fei, GAO Guangxin, et al. Collaborative air-ground computation offloading and resource optimization in dynamic vehicular network scenarios[J]. Journal of Electronics & Information Technology, 2025, 47(1): 102–115. doi: 10.11999/JEIT240464. [10] LUO Quyuan, LUAN T H, SHI Weisong, et al. Heterogeneous task oriented data scheduling in vehicular edge computing via deep reinforcement learning[J]. IEEE Transactions on Vehicular Technology, 2024, 73(12): 19582–19596. doi: 10.1109/TVT.2024.3444815. [11] GAO Kangyu, SONG Jaeyoung, ZHOU Changjun, et al. Task offloading and scheduling under hard deadlines in vehicular edge computing systems[J]. IEEE Transactions on Vehicular Technology, 2025, 74(6): 10029–10034. doi: 10.1109/TVT.2025.3539885. [12] UDDIN A, SAKR A H, and ZHANG Ning. Adaptive prioritization and task offloading in vehicular edge computing through deep reinforcement learning[J]. IEEE Transactions on Vehicular Technology, 2025, 74(3): 5038–5052. doi: 10.1109/TVT.2024.3499962. [13] CHEN Geng, ZHANG Yiming, SONG Zhenghan, et al. Distributed grade-clustering assisted computing offloading optimization for cooperative vehicular-edge networks with near-field communications[J]. IEEE Transactions on Cognitive Communications and Networking, 2026, 12: 4089–4104. doi: 10.1109/TCCN.2025.3593519. [14] CAO Dun, SU Yuan, WANG Wenqian, et al. A dynamic priority-aware task offloading and resource allocation strategy assisted by RSU-relay in vehicular edge computing[J]. IEEE Open Journal of the Communications Society, 2026, 7: 353–369. doi: 10.1109/OJCOMS.2025.3649533. [15] RUBLEIN A C, MEHMETI F, MAHON M, et al. Improved methods of task assignment and resource allocation with preemption in edge computing systems[J]. IEEE Transactions on Parallel and Distributed Systems, 2025, 36(9): 1857–1871. doi: 10.1109/TPDS.2025.3583966. [16] HUANG Tao, QIU Haoxiang, TANG Qinqin, et al. P2TS: A preemptive approach for priority-aware task scheduling in computing power networks[J]. IEEE Transactions on Mobile Computing, 2026, 25(2): 1840–1856. doi: 10.1109/TMC.2025.3606454. [17] SHANNON C E. A mathematical theory of communication[J]. The Bell System Technical Journal, 1948, 27(3): 379–423. doi: 10.1002/j.1538-7305.1948.tb01338.x. [18] ZHANG Wenqian, ZHANG Guanglin, MAO Shiwen, et al. Deep-reinforcement-learning-based joint caching and resources allocation for cooperative MEC[J]. IEEE Internet of Things Journal, 2024, 11(7): 12203–12215. doi: 10.1109/JIOT.2023.3333826. [19] LIAO Zhuofan, YUAN Chuhao, ZHENG Bin, et al. An adaptive deployment scheme of unmanned aerial vehicles in dynamic vehicle networking for complete offloading[J]. IEEE Internet of Things Journal, 2024, 11(13): 23509–23520. doi: 10.1109/JIOT.2024.3385414. -
下载: