A wide-depth learning-based internet of vehicles computing task offloading method

CN122547431APending Publication Date: 2026-08-11HENAN UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-15
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

[0005]车联网城市道路计算任务卸载的研究涉及如下关键问题:第一,车辆、任务和服务器之间关系异构且拓扑时变,如果仅使用简单的二维的状态表示车辆、任务和服务器之间关系易丢失这些结构信息,从而影响模型对环境的理解能力和决策的泛化能力;第二,无线信号波动和任务排队本身就有很大随机性,会让端到端时延和能耗出现极端偏高的情况,还会产生异常数据

Benefits of technology

第一,本发明通过将车辆、计算任务和边缘服务器建模为异构图中的不同类型节点,通过异构图神经网络挖掘三者间的拓扑关联与动态联系,完整还原车辆移动、任务生成、链路通断、服务器负载变化等实时状态。因此,在车流多变、网络拓扑频繁切换的城市道路场景中,模型泛化能力与环境理解能力显著提升。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122547431A_ABST
    Figure CN122547431A_ABST
Patent Text Reader

Abstract

This invention discloses a method for offloading computing tasks in the Internet of Vehicles (IoV) based on wide-width deep learning, belonging to the field of IoV edge computing technology. This method first models the vehicle, computing task, and edge server as time-varying graphs, and uses a heterogeneous graph neural network to extract structured correlation features among the three. Then, a modal regression wide-width learning network is used to predict multi-dimensional service quality indicators such as end-to-end latency, energy consumption, and server load. Finally, an action mask is constructed based on constraints, and a deep Q-network is used to evaluate the value of each action, ensuring that policy learning is always confined within the feasible region, thereby selecting the optimal offloading action. The offloading strategy is then iteratively optimized by combining experience replay and a target network. This invention, through the joint optimization of structured modeling, robust prediction, and action mask constraints, can improve decision stability and effectively reduce task processing latency and system energy consumption while meeting task deadlines and load balancing requirements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of edge computing technology for vehicle-to-everything (V2X) networks, and specifically to a method for offloading V2X computing tasks based on wide-depth learning. Background Technology

[0002] In a vehicle-to-everything (V2X) mobile edge computing (MEC) environment, the limited coverage of roadside units (RSUs) and the continuous changes in link quality and available edge server sets caused by high-speed vehicle movement can easily lead to increased end-to-end latency, increased energy consumption, packet loss, offloading interruptions, and even task timeouts. Therefore, it is necessary to implement offloading decisions that balance low latency, low energy consumption, and load balancing under dynamic network conditions. Since the offloading process consists of task uploading, queuing, computation, and backhaul, fluctuations in any of these stages can amplify overall performance losses. Therefore, a stable and feasible online task offloading strategy must be designed.

[0003] like Figure 1 As shown, in a typical urban road V2I scenario, multiple RSUs are deployed on both sides of the road, and vehicles travel between multiple intersections and lanes, constantly establishing or disconnecting connections with different RSUs. The tasks generated by the vehicles are heterogeneous: some tasks have small data volumes and are not sensitive to latency, and can be executed locally; some tasks, such as collision detection and emergency braking assistance, are extremely sensitive to latency and are usually prioritized for local execution; while tasks with large data volumes and complex computations (such as multi-target recognition and complex path planning) are more suitable for offloading to edge servers for processing. Therefore, it is necessary to make a reasonable choice between local execution and edge offloading, and select a suitable target server from multiple edge servers to optimize overall performance while meeting deadlines, total energy consumption for task processing, and load constraints.

[0004] When a vehicle is in an area with overlapping coverage of multiple RSUs or needs to switch offloading targets, the offloading decision needs to solve two problems: whether the task should be offloaded and which server to offload it to. Based on the decision-making form, it can be divided into binary offloading (local or complete offloading) and partial offloading (proportional splitting); based on the action space, it can be divided into discrete actions (all executed locally or all offloaded to the k-th server) and continuous actions (dividing offloading tasks according to the offloading ratio, with some remaining locally while others are offloaded to edge servers, allocating communication bandwidth and edge server computing power to the tasks to be offloaded, etc.); based on the optimization objective, it can be divided into minimum latency, minimum energy consumption, or multi-objective weighted optimization. Existing online strategies are roughly divided into two categories: one dynamically changes the offloading target and adjusts resources in real time as the vehicle's connectable edge nodes change, and the other keeps the original offloading target unchanged, maintaining the data path between the vehicle and the original server only through forwarding or multi-hop backhaul; since the latter introduces additional backhaul overhead and is difficult to reliably meet low latency requirements in highly dynamic road environments, this patent adopts the former's dynamic candidate node real-time decision-making method.

[0005] Research on offloading computational tasks in urban roads for connected vehicles involves the following key issues: First, the relationships between vehicles, tasks, and servers are heterogeneous and topologically time-varying. Using only simple two-dimensional state representations of these relationships can easily lose this structural information, thus affecting the model's ability to understand the environment and generalize its decisions. Second, wireless signal fluctuations and task queuing inherently involve significant randomness, leading to extremely high end-to-end latency and energy consumption, as well as generating anomalous data. Using the commonly used mean squared error (MSE) for QoS evaluation can easily be biased by these outliers, resulting in inaccurate loss functions and biased evaluations. Third, the discrete action space under multi-vehicle, multi-server conditions is enormous and strongly constrained by deadlines, queues, and utilization. Insufficient constraints can easily generate a large number of inactive actions and unstable training. Fourth, limited edge resources and a lack of load balancing mechanisms can lead to task concentration, queue backlog, and overload, resulting in a significant increase in end-to-end latency and energy consumption.

[0006] In summary, existing technologies struggle to simultaneously address multiple challenges, including difficulties in representing heterogeneous relationships, assessing abnormal data interference, and addressing server load imbalances. Consequently, they are ill-suited to the highly dynamic and constrained operational scenarios of vehicle-to-everything (V2X) networks in urban environments. Therefore, this invention proposes a novel task offloading scheme, improving and optimizing the V2X computing task offloading method. Summary of the Invention

[0007] The purpose of this invention is to provide a method for offloading computing tasks in the Internet of Vehicles based on wide and deep learning. By performing structured modeling of the multi-entity relationship between vehicles, computing tasks and edge servers, the end-to-end latency, energy consumption and load of tasks are robustly predicted, and a set of feasible actions that meet the deadline and load threshold are generated accordingly. This allows the strategy to learn stably within the feasible domain, achieving collaborative optimization of low latency, low energy consumption and load balancing of edge servers.

[0008] To achieve the above objectives, the technical solution adopted by the present invention is as follows: A method for offloading computing tasks in vehicle-to-everything (V2X) networks based on wide-depth learning includes the following steps: Step 1: Collect vehicle network environment information, including vehicle-side computing status, computing task-related information, communication link status, and edge server-side resource status; Step 2: Model vehicles, computing tasks, and edge servers as three types of nodes in a heterogeneous graph. Model the generation relationship between vehicles and tasks, the communication connection relationship between vehicles and edge servers, and the candidate unloading relationship between tasks and edge servers as different types of edges, and mutate the graph during construction. Step 3: Use a heterogeneous graph neural network to extract and aggregate the node features and edge features in the heterogeneous graph to obtain vehicle node embeddings, task node embeddings, edge server node embeddings, and task-server edge embeddings, and combine them with the environmental information to construct a state vector. Step 4: Input the state vector into the width learning network to predict the end-to-end latency, total energy consumption, server queue length and CPU utilization of each task-server combination, which are multi-dimensional service quality indicators. Step 5: Based on the predicted multi-dimensional service quality indicators and preset constraint thresholds, generate an action mask, mark unloading actions that do not meet the constraints as infeasible unloading actions, and retain only executable unloading actions; Step 6: Model the task unloading process as a Markov decision process. Using the state vector as the current state, use a deep Q-network to evaluate the value of each action. Apply the action mask in both the action selection stage and the target Q-value calculation stage to shield inactive actions. Only perform policy learning within the feasible region and select unloading actions. Step 7: Execute the selected unloading action, control the vehicle to complete the task calculation locally or unload the task to the selected edge server for execution, obtain the immediate reward and next state, store the experience sample and update the deep Q network parameters.

[0009] Furthermore, in step two, the update rules for the time-varying graph include: dynamically adding or deleting vehicle-server edges based on changes in vehicle location; establishing task nodes and vehicle-task edges based on the arrival of new tasks; establishing or deleting task-server edges based on changes in candidate unloading servers; and updating various node features and edge features based on real-time collected environmental information.

[0010] Furthermore, in step two, the heterogeneous graph neural network uses the HGATv2 network to target different types of relationships. The aggregation features of nodes are extracted separately, and the features of different relationships are fused through the following attention mechanism to obtain the node. final node embedding : in, Indicates the first The weight of the relationship, Indicates the first The original importance score of the relationship, For nodes In relationship The aggregation features below, For learnable parameters, The index identifier represents the traversal of all relations.

[0011] Furthermore, in step four, the loss function used to train the width learning network is a joint loss function combining Gaussian kernel modal regression loss and a regularization term. The expression is: In the formula, For the actual QoS label vector, i Indicating the first in the Internet of Vehicles i One computational task, k Indicates the number is k Edge servers, For the width feature matrix, To output the weight matrix, For kernel bandwidth parameters, The square of the L2 norm. The regularization coefficient is . for Norm regularization term.

[0012] Furthermore, in step four, the feature node matrix Z and the enhancement node matrix H of the width learning network are generated by randomly fixed weights and biases, and then concatenated column-wise to form the width feature matrix. .

[0013] Furthermore, the output weight matrix W of the width learning network is solved using a closed-form weighted ridge regression: in, It is a diagonal matrix composed of sample weights. This is the row regularization weight matrix. This is the actual output matrix.

[0014] Furthermore, in step five, the action mask is generated according to the following rules: for any candidate task-server pair, if any of the following conditions are met, the action of unloading the task to the server is marked as infeasible, and the corresponding mask value is set to 0; otherwise, it is marked as feasible, and the mask value is set to 1. (1) The end-to-end latency predicted by the width learning network exceeds the maximum allowable deadline for the task; (2) The total energy consumption of the task predicted by the width learning network exceeds the preset energy consumption budget; (3) The server CPU utilization predicted by the width learning network exceeds the preset utilization limit; (4) The server queue length predicted by the width learning network exceeds the preset maximum queue length; (5) The current vehicle cannot communicate with the roadside unit corresponding to the server.

[0015] Further, in step six, applying the action mask specifically includes: in the action selection phase, setting the Q-value corresponding to the action marked as infeasible by the mask to a minimum value, and selecting actions within the set of feasible actions using an ε-greedy strategy; in the target Q-value calculation phase, taking the maximum Q-value only within the set of feasible actions in the next state, expressed as: in, For the target Q value, For instant rewards, As a discount factor, As a termination marker, The action mask for the next state. The Q value output by the target network. For time slots The system state vector, For time slots The candidate unload actions are A, where A is the action space.

[0016] Furthermore, in step six, the instant reward Defined as the inverse of the total cost plus a feasibility penalty: In the formula, For the comprehensive cost function, The penalty coefficient is... For action The corresponding mask value.

[0017] Furthermore, the comprehensive cost function It is expressed as a weighted sum of normalized latency, energy consumption, queue length, CPU utilization, and load balancing metrics, with the following expression: in, This indicates that the task is executed locally on the vehicle. This indicates that the task will be offloaded to the k-th edge server for execution, where K is the total number of edge servers. and Representing tasks Local normalized latency and energy consumption, , These represent the normalized end-to-end latency and energy consumption predicted by the width learning network, respectively. , , These are normalized server queue length, CPU utilization, and load balancing metrics, respectively. , , , , These are the weighting coefficients.

[0018] The beneficial effects of the above technical solution are as follows: First, this invention models vehicles, computing tasks, and edge servers as different types of nodes in a heterogeneous graph. It then uses a heterogeneous graph neural network to mine the topological relationships and dynamic connections between these three entities, fully reconstructing real-time states such as vehicle movement, task generation, link connectivity, and server load changes. Therefore, in urban road scenarios with constantly changing traffic flow and frequent network topology shifts, the model's generalization ability and environmental understanding are significantly improved.

[0019] Second, this invention employs modal regression width learning to predict service quality indicators such as latency, energy consumption, and server load. By relying on the modal regression loss function to suppress communication fluctuations, extreme anomalies caused by queue congestion, and heavy-tailed noise interference, it overcomes the shortcomings of traditional prediction models that are easily biased by outliers and suffer from evaluation distortion. Simultaneously, width learning features rapid training and incremental updates, adapting to environmental changes without requiring full retraining, meeting the needs of online real-time prediction in highly dynamic vehicle-to-everything (V2X) scenarios, and providing accurate and reliable data support for subsequent offloading decisions.

[0020] Third, this invention introduces an action masking mechanism based on deep Q-networks. This mechanism masks unexecutable offloading actions that could cause task timeouts, server overload, or link unreachability, thus limiting the policy search scope to the set of feasible actions. Combined with the DQN algorithm with action masking, invalid actions are avoided from participating in model training, effectively solving the problems of large action spaces, susceptibility to illegal decisions, training oscillations, and slow convergence in existing reinforcement learning methods. The model training process of this invention exhibits low fluctuations and fast convergence speed, and the output offloading decisions meet the requirements of low latency and low energy consumption.

[0021] Fourth, this invention takes end-to-end latency, total system energy consumption, and edge server load balancing as joint optimization objectives, rationally allocating computing tasks while considering multiple core indicators. On the one hand, it fully utilizes the computing power of edge servers to share the pressure on vehicle terminals, effectively reducing overall task processing latency and the operating energy consumption of vehicles and servers; on the other hand, it guides the rational distribution of tasks through constraints, avoiding queue backlog and local server overload, achieving load balancing of edge resources across the entire network, and significantly improving the overall operating efficiency and service stability of the vehicle-to-everything (V2X) edge computing system. Attached Figure Description

[0022] Figure 1 Diagram illustrating the computational offloading scenario for the Internet of Vehicles (IoV). Figure 2 A framework diagram for offloading computing tasks in vehicle-to-everything (V2X) networks based on Masked-DQN; Figure 3 This is an overall flowchart of the present invention; Figure 4 This is a comparison chart of the normalized average cumulative reward of different unloading strategies during the training process in an embodiment of the present invention. Figure 5 This is a comparison chart of normalized average latency during the training process for different unloading strategies in this embodiment of the invention. Figure 6 This is a comparison chart of normalized average energy consumption of different unloading strategies during the training process in embodiments of the present invention. Figure 7 This is a comparison chart of normalized load balancing during the training process for different unloading strategies in this embodiment of the invention. Figure 8 Explanation of parameter symbols for this invention; Figure 9 This is pseudocode for unloading vehicle-to-everything (V2X) computing tasks based on Masked-DQN in an embodiment of the present invention. Detailed Implementation

[0023] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments.

[0024] It should be noted that, unless otherwise specified, all technical and scientific terms used in this invention have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains.

[0025] Example 1

[0026] This embodiment provides a method for offloading vehicle-to-everything (V2X) computing tasks based on wide-depth learning, applied to urban road V2X edge computing scenarios. For example... Figure 1 As shown, multiple Roadside Units (RSUs) are deployed on both sides of the road, each RSU is bound to an edge server. Vehicles travel between multiple intersections and lanes, constantly establishing or disconnecting connections with different RSUs. Vehicles continuously generate computationally intensive and latency-sensitive tasks, requiring dynamic decisions between local execution and edge offloading.

[0027] Figure 2 This invention presents a framework diagram for offloading vehicular network (V2N) computing tasks based on Masked Deep Q-Network (Masked-DQN). First, it collects V2N environment, vehicle, computing task, and edge server state information at each decision time slot, constructing a time-varying graph with vehicles, computing tasks, and edge servers as heterogeneous graph nodes. A heterogeneous graph neural network is used to extract and aggregate the features of each node, obtaining a unified state vector that integrates node embeddings and environmental features. This unified state vector is input into a modality regression width learning network to predict the multi-dimensional service quality index and comprehensive offloading cost corresponding to each task-server pairing. An action masking mechanism is used to shield invalid, high-cost offloading actions, ensuring that the decision results meet the constraints. Finally, within a reinforcement learning framework, the agent selects an offloading action based on the current environmental state. The environment returns an immediate reward and the state at the next time step. The agent continuously optimizes the task offloading strategy by updating the policy network parameters through experience replay and the target network.

[0028] Figure 3 The following is a detailed flowchart of the method of the present invention, in conjunction with... Figure 3 The specific steps of this embodiment will be described in detail.

[0029] Step 1: Collect vehicle network environment information, system modeling, and problem description.

[0030] In each decision-making time slot First, it is necessary to collect the environmental information of the current vehicle-to-everything (V2X) system and use it as input for subsequent modeling and decision-making. The environmental information comes from an offline dataset. This includes vehicle-side computing status (e.g., the vehicle's own computing status, current CPU usage, remaining available computing power, and energy consumption), computing task-related information (e.g., task arrival speed, task data size, required computation, completion time, and task queue length), communication link status (e.g., the currently connectable RSU set, available bandwidth, transmission latency, and channel quality or packet loss), and edge server-side resource status (e.g., the server's current CPU utilization, task queuing status, and remaining available computing power). After collecting the above information, the information is organized in a unified format to form an environmental feature vector that reflects the current system status. This is for use by subsequent heterogeneous graph modeling, unloading cost prediction, and unloading decision modules.

[0031] System modeling and problem description: A unified model is constructed for vehicle mobile communication, local task execution, edge unloading processing, and edge server load status involved in the task unloading process. Based on this model, the task unloading optimization objectives and their constraints are described, thus providing a theoretical basis for the design and implementation of subsequent unloading decision-making methods.

[0032] (1) Communication model Vehicle assembly is denoted as ,vehicle In the time slot The position and velocity are denoted as follows: and RS The fixed position is denoted as Its wireless coverage radius is The distance between the vehicle and the RSU is: Where t is the discrete decision time slot index. At this time, the vehicle establishes a V2I link with the RSU and performs task offloading. The channel gain model between the vehicle and the RSU is as follows: in, This is the path loss factor. This represents the small-scale fading coefficient. RS In the time slot The available uplink bandwidth is Bandwidth allocated to vehicles Must meet: in, Indicates time slot The connectivity indicator variable between vehicle v and edge server k. The task transmission rate of the vehicle is: in, Indicates vehicle The task transmission power, This indicates noise power or noise power spectral density.

[0033] (2) Local computing model for computing tasks The system consists of a set of all tasks to be uninstalled. ,in Indicates the first One computing task to be unloaded. Each task By vehicle Generates, with input data volume Computational requirements Arrival time and deadline Define binary decision variables. Indicates whether the task should be uninstalled, and introduces... Indicates whether the task is assigned to an edge server. It satisfies the uniqueness constraint: When the task is executed locally on the vehicle, its computation latency and energy consumption are as follows: in, This indicates the operating frequency of the vehicle's local CPU. This represents the energy consumption coefficient of the vehicle's CPU. Considering local queuing, the end-to-end latency is: (3) Computational task edge unloading model Let the set of edge servers be К={1,2,...,K}, where K represents the total number of edge servers; for any edge server, we have ∈K. When the task is offloaded to the edge server During execution, its end-to-end delay consists of three parts: transmission, queuing, and computation. Among them, transmission delay Queuing delay Calculate latency They are respectively: in, Indicates the generation of a task vehicles In the time slot To edge servers The transfer rate when uploading task data. Its total energy consumption is: in, Indicates task Transmission energy consumption, Indicates task On the edge server The energy consumption of edge computing generated during the above calculation.

[0034] (4) Edge server load balancing model Edge server The maximum calculation frequency is In the time slot The queue length is It changes over time as follows: in, Indicates the length of the time period. Indicates time slot The set of tasks that have arrived. Satisfying the queue length constraint, for any... ,have ,in This indicates the maximum task queue length. To avoid server overload, CPU utilization is introduced: And apply constraints ,in This represents the upper limit threshold for edge server CPU utilization. Simultaneously, to characterize system-level load balancing, a utilization variance metric is defined. ,in A smaller value indicates a more balanced system load distribution. This indicates the total number of edge servers. This indicates the average utilization rate.

[0035] (5) Problem Description Based on the above model, the task offloading optimization objective considered in this invention is to minimize the overall system operating cost while satisfying task deadlines, vehicle energy consumption budgets, and edge server resource and load constraints. The task offloading computation problem can be formulated as the following optimization problem: in, For the task Priority weights, and Tasks The end-to-end latency and total energy consumption, This is a server load balancing metric, determined by the task queue length of each edge server. and CPU utilization Composition, used to characterize the uniformity of server load distribution. These are non-negative weighting coefficients used to balance latency, energy consumption, and load balancing. Optimization variables include task offloading decisions. Edge server selection decision Vehicle local CPU frequency Edge server allocation frequency With bandwidth allocation The process requires a joint decision-making process, under certain constraints, to determine whether a task should be unloaded and to select its target edge server. This aims to minimize the combined cost resulting from end-to-end latency, system energy consumption, and server load imbalance. This is a typical high-dimensional time-varying optimization problem, providing a modeling foundation for subsequent learning-based unloading decision-making methods. The parameter symbols involved in this patent are... Figure 8 As shown.

[0036] Step 2: Variable graph construction during construction.

[0037] Constructing a time-varying map based on the environmental information collected in step one. , where the set of nodes Includes vehicle nodes Task Nodes With edge server nodes Among them, vehicle nodes Indicates vehicle Vehicle location Represented as two-dimensional planar position coordinates, where =( , Its eigenvector is: These represent the local CPU frequency, CPU utilization, the vehicle's two-dimensional planar position coordinates, vehicle speed, and the length of the vehicle's local task queue, respectively. Therefore, the feature vector dimension of the vehicle node is 6, and the task node... Indicates the task generated by the vehicle The feature vector is: These represent the task input data volume, computational cost, deadline, priority weight, and task arrival time, respectively; therefore, the feature vector dimension of the task node is 5. Server node Represents edge server The feature vector is: in, This represents the server's maximum computing frequency. This represents the total computational load of currently queued tasks on the server. For CPU utilization, Given the currently available uplink bandwidth, the feature vector dimension of the server node is 4.

[0038] The edge set includes task generation relationship edges between vehicles and tasks, V2I connection relationship edges between vehicles and edge servers, and candidate offloading relationship edges between tasks and edge servers. As vehicles move in the road network, when a vehicle leaves the coverage area of ​​a certain RSU, the change in vehicle position triggers the update of vehicle-server connection relationships, and deletes the corresponding vehicle-server edges and the corresponding invalid task-server edges generated along with the vehicle-server edges. When a vehicle enters a new RSU coverage area, new vehicle-server edges and corresponding task-server edges are dynamically added. When a new task arrives, it triggers the update of task nodes and vehicle-task edges. When candidate offloading nodes change, it triggers the update of task-server edges. When server load changes, it triggers the update of server node characteristics and task-server edge characteristics, so that the heterogeneous graph can reflect the time-varying topology of the vehicle network environment.

[0039] Time slice The update rules for heterogeneous graphs can be summarized as follows: ① Read time slices The vehicle's location, speed, task arrival, channel status, and server status. ② For each vehicle... and each edge server ,calculate If a vehicle enters the coverage area, a vehicle-server edge is added or retained; if it leaves the coverage area, the vehicle-server edge is deleted. ③ For newly arriving tasks, task nodes and vehicle-task edges are created; for completed or failed tasks, task nodes and their associated edges are deleted. ④ For each incomplete task, a candidate set of offload servers is generated based on the vehicle's current connectable server set, task deadline, server queue length, and server utilization. ⑤ For servers in the candidate set, task-server edges are created or retained; task-server edges that no longer meet reachability, latency, or load constraints are deleted. ⑥ The feature vectors of vehicle nodes, task nodes, server nodes, and each type of edge are updated. ⑦ The updated... Input the HGATv2 module to obtain the vehicle node embedding, task node embedding, server node embedding, and task-server edge embedding for the current time slice.

[0040] Step 3: Heterogeneous graph embedding feature extraction.

[0041] The constructed heterogeneous graph is input into the heterogeneous graph neural network HGATv2 for feature extraction. Since the heterogeneous graph contains different types of nodes such as vehicles, computing tasks, and edge servers, and the connection relationships between them are also different, HGATv2 targets different relationship types. Learn independent linear transformation matrices separately and attention vector For two nodes connected in a heterogeneous graph, the current features of both nodes are first linearly transformed to better suit the information interaction under the current relationship. Then, the features of the two nodes are combined to calculate the importance of neighboring nodes to the current node. Neighbors with higher importance are given greater weight in subsequent feature updates; neighbors with lower importance have a relatively smaller impact. For relationships... The next edge The current layer node is represented as First, perform linear transformation and splicing: Then, neighboring nodes are calculated. For the current node The importance weights are used for subsequent weighted aggregation of neighbor information, as shown below: At the node Relationship Neighbors set The attention weights are obtained by performing softmax normalization, as shown below: in, This represents a temporary index variable used for summation. Node In relationship The aggregation results are as follows: in, This is a non-linear activation function. Subsequently, a weighted summation is used to fuse the aggregation results of different relations, as shown below: in, For nodes In relationship The aggregation features below, For learnable parameters, The index identifier represents the traversal of all relations.

[0042] By stacking two layers of HGATv2 and combining residual connections and normalization operations, high-dimensional embedding representations of vehicle nodes, computation task nodes, and server nodes are finally obtained, denoted as follows: , and For task-server side features After concatenating the task embedding, server embedding, and the original task-server edge features, a linear transformation is performed to obtain: in, The task-server raw edge features are the initial attribute information used to describe the association between task nodes and server nodes, while the edge features... For task nodes With server node The feature representation of the relationships between them is used to comprehensively represent the communication conditions, computational conditions, and constraint satisfaction when the task is unloaded onto the server. Similarly, the edge features of vehicle-server and vehicle-task can be obtained, thereby... The three elements together depict the mission. With server The structured relationships between them are then established. The obtained heterogeneous graph is embedded and represented along with the environmental features from step one. Normalization is performed, and a state vector is constructed by concatenation and weighted fusion. ,in This is used to fully characterize the relationship between the vehicle, the task, and the edge server in the current time slot. The output matrix X includes node embeddings and vehicle-to-everything (V2X) environment features. The inputs are fed into the width learning network and the DQN network, respectively, as the state vector inputs for subsequent width learning offloading cost prediction. and subsequent Masked-DQN state inputs .

[0043] Step 4: Predicting the cost of building and unloading the wide learning network.

[0044] For each candidate task-server pair Embed its corresponding task node Server node embedding and task-server side features Concatenated into input features : The input features of all candidate task-server pairs are stacked to form an input matrix. ,in This indicates the number of candidate task-server pairs.

[0045] For each candidate "task-edge server" unloading pair, the corresponding individual node embeddings and combined node embeddings, along with the necessary environmental features, are input into a width learning prediction model employing a modality regression mechanism to construct a width learning network. The network structure consists of a feature node layer and an enhancement node layer.

[0046] First, the input features are linearly mapped using fixed random weights and biases, and a feature node matrix is ​​generated using a nonlinear function, as shown below: in, The weights and biases are randomly generated and fixed. It is a non-linear activation function. This represents the number of feature nodes.

[0047] In the feature node matrix Based on this, an enhanced node matrix is ​​generated using another set of random weights and biases, as shown below: in, For random weights and biases, It is a nonlinear function. To increase the number of nodes.

[0048] Concatenate the feature nodes and enhancement nodes column-wise to obtain the width feature matrix as shown below: in, The number of feature nodes, To increase the number of nodes.

[0049] For each task-server pair, multiple offload-related metrics need to be predicted simultaneously, including end-to-end latency, energy consumption, and server load metrics in the current time slot. End-to-end latency includes transmission latency, queuing latency, and computation latency; total energy consumption includes task transmission energy consumption and computation energy consumption; and load metrics preferably include server CPU utilization and queue length. Therefore, a multi-output regression model is adopted. The corresponding true output vector is represented as follows: in, Indicates task Offload to edge server End-to-end latency, Indicates task Offload to edge server Total energy consumption Represents edge server Task queue length, Represents edge server CPU utilization. The predicted output is obtained by a linear mapping between the width feature matrix and the output weight matrix: in, This is the output weight matrix to be learned.

[0050] Considering that the wireless transmission latency and queuing latency in vehicle-to-everything (V2X) networks typically exhibit non-Gaussian, heavy-tailed distribution characteristics, this invention employs a modal regression loss function based on a Gaussian kernel to reduce the impact of outliers on prediction results: in, This is the kernel bandwidth parameter, used to control the sensitivity of the modal regression loss function to the predicted residuals. If... If the value is too small, the model will be more sensitive to small prediction errors, which may lead to instability in the training process; if... If the value is too large, the modal regression loss will weaken its ability to suppress outliers, resulting in decreased robustness. Therefore, this invention preferably determines the value adaptively based on the residual distribution of the training samples. First, use an initial model or a mean squared error regression model to obtain the training sample residuals. , and then The kernel bandwidth parameter is determined based on the residual standard deviation, which is proportional to the residual standard deviation. To further reduce redundant width nodes and enhance feature selection capability, a kernel bandwidth parameter is introduced on top of the modal regression loss. Norm regularization terms yield the overall optimization objective: in, These are regularization coefficients used to adjust the output weight matrix. Apply sparsity constraints.

[0051] The HGATv2 module and the QoS prediction module are jointly trained for candidate task-server pairs. Let the actual QoS label be The predicted QoS output is The QoS tags include end-to-end task processing latency, total task processing energy consumption, server task queue length, and server CPU utilization. The joint training loss uses the modality regression loss and regularization term described above: The parameters of HGATv2 are updated via backpropagation of the Adam optimizer based on the QoS prediction loss, and the MR-BLS output weights are updated via a weighted ridge regression closed-form solution or a semi-closed-form iterative method. Through joint training, the vehicle, task, and server embeddings learned by the HGATv2 module can directly serve the prediction of end-to-end latency, energy consumption, queue length, and CPU utilization, ensuring that the extracted structural features are consistent with the task offloading performance evaluation objectives, thus providing reliable input for subsequent offloading decisions.

[0052] In this embodiment, the regularization coefficient is in the preset candidate set. The model selects values ​​based on the comprehensive prediction error of end-to-end latency, energy consumption, queue length, and CPU utilization on the validation set. The values ​​with the smallest comprehensive error or those exhibiting stronger sparsity when the error is close to the minimum are chosen to balance QoS prediction accuracy, feature sparsity, and generalization ability. The final regularization coefficient is determined by this selection process. The value is 1×1 .

[0053] This constraint allows the weights of some less effective or ineffective feature nodes and enhancement nodes to automatically decrease or even approach zero, thereby automatically filtering effective features and reducing redundant information interference. Since the original optimization objective contains nonlinear terms, direct solution is difficult. Therefore, a semi-quadratic optimization method is used to transform the nonlinear objective function into a weighted quadratic optimization problem. Under the condition of fixed auxiliary weights and regularization weights, the output weights are... The optimization problem can be written in the form of weighted ridge regression, and its closed-form solution is as follows: in, It is a diagonal matrix composed of sample weights. This is the row regularization weight matrix. This represents the actual output matrix. Using the above method, robust multi-output offloading performance prediction results can be obtained with low computational overhead, providing a reliable basis for subsequent offloading cost prediction and task offloading decisions.

[0054] Since the hidden layer weights of the width learning network are randomly generated and fixed, this invention preferably adopts an incremental update mechanism: when new sample data is collected, it is only necessary to update the expanded width feature matrix. Based on the newly added samples and the concatenation of the feature node matrix and the enhancement node matrix, the output layer weights are adjusted. The update is performed efficiently using a pseudo-inverse closed-form solution in block matrix form, eliminating the need to retrain the entire network, thus reducing online update overhead and improving adaptability to dynamic environments. After obtaining the trained MRBLS (Modal Regression Width Learning) model, multi-dimensional QoS metrics can be predicted simultaneously for each candidate task-server pair: To facilitate the evaluation of rewards and offloading costs in reinforcement learning, the above predictions are normalized based on the global maximum value: in, , and These represent the maximum end-to-end task processing time, maximum task processing energy consumption, maximum task queue length, and maximum edge server CPU utilization, respectively. Based on these, a task-server offloading cost function is constructed: in, Indicates task Uninstall to server The corresponding server load balancing metrics at that time This is a weighting coefficient used to adjust the proportion of indicators such as latency, energy consumption, server task queue, and server resource utilization in the overall cost.

[0055] Step 5: Generate the action mask.

[0056] To ensure that the offloading decision meets constraints such as task deadline, total energy consumption, and edge server load, this embodiment generates an executable action mask based on the predicted normalized QoS metric, as shown below: When the predicted end-to-end latency of a candidate unloading pair exceeds the maximum allowable deadline of the task, or the CPU utilization of the prediction server exceeds the preset utilization limit, or the queue length of the prediction server exceeds the preset maximum queue length, or the total energy consumption of the prediction task exceeds the preset energy consumption budget, or there is no communication connection between the vehicle and the roadside unit corresponding to the server, the corresponding unloading action is marked as infeasible and set to 0 (infeasible) in the mask; otherwise, it is set to 1 (feasible), thereby obtaining a set of feasible actions and achieving prior masking of illegal unloading actions. Through the action mask, unloading actions that will inevitably lead to timeouts or overloads can be masked in the subsequent reinforcement learning decision-making process, so that policy learning and action selection are always limited to the feasible domain, thereby improving the legality of decisions and training stability.

[0057] Step 6: Build the MDP and use Masked-DQN to select the unload action.

[0058] The task offloading process in the vehicle-to-everything (V2X) network is modeled as a discrete-time Markov decision process. The system uses the task unloading cycle as its time step. The global state of each time slot is denoted as: The agent is in a state Select action The environment executes actions and updates the vehicle location, vehicle-RSU connectivity, edge server queue status, and task completion status to obtain the next state. With instant rewards To simultaneously express structural relationships, unloading costs, and global statistical information, this invention represents the state as a combined vector of heterogeneous graph embedding, MR-BLS-predicted unloading costs, and vehicle-to-everything (V2X) statistical features, specifically: in, These are the embeddings for vehicles, computing tasks, edge servers, and task-server edges, respectively. Normalized QoS prediction The comprehensive cost function; This serves as a feasibility indicator for the action. To avoid the complexity brought about by the multi-dimensional action space, this invention adopts a joint action coding method, uniformly mapping "whether to uninstall" and "target edge server selection" to a discrete action set: in, This indicates that the task is executed locally on the vehicle. This indicates that the task will be unloaded to the first... Taiwan edge server. MR-BLS output mask matrix. Used to indicate the feasibility of an uninstallation action; executing the action locally is allowed by default. For the task... The joint action mask is defined as: And form a mask vector This is used to mask inactive actions during the decision-making process. The action mask threshold is determined by the task deadline, the connectivity status of the vehicle and RSU, the maximum queue length of the edge server, the upper limit of edge server CPU utilization, and the vehicle's energy consumption budget. For the task... and candidate edge servers If the vehicle With edge servers If the corresponding RSU is unreachable, or the end-to-end task processing latency predicted by MR-BLS exceeds the task deadline, or the predicted server task queue length exceeds the preset maximum queue length, or the predicted server CPU utilization exceeds the preset utilization limit, or the predicted total energy consumption for task processing exceeds the maximum energy consumption budget allowed by the vehicle or task, then the unloading action is marked as an inactive action and its mask value is set to 0; otherwise, its mask value is set to 1. Local execution actions are allowed by default, and their mask value is set to 1.

[0059] This invention aims to minimize the combined costs of normalized latency, energy consumption, and server load, and uses the negative value of the combined cost as an immediate reward. The overall cost of the corresponding task-server pair is defined as follows: in, This indicates that the task is executed locally on the vehicle. This indicates that the task will be offloaded to the k-th edge server for execution, where K is the total number of edge servers. and Representing tasks Local normalized latency and energy consumption, , These represent the normalized end-to-end latency and energy consumption predicted by the width learning network, respectively. , , These are normalized server queue length, CPU utilization, and load balancing metrics, respectively. , , , , These are the weighting coefficients.

[0060] Instant rewards Defined as the inverse of the total cost plus a feasibility penalty: In the formula, For the comprehensive cost function, The penalty coefficient is... For action The corresponding mask value.

[0061] By adding penalties when actions violate feasibility constraints, the agent is encouraged to choose low-cost actions that satisfy the constraints. Penalties are also introduced when actions violate deadlines or resource constraints, ensuring that when... This generates additional negative feedback, thereby guiding the strategy to maximize long-term discount returns within the feasible region: In state Below, candidate unloading actions are generated based on the heterogeneous graph node embeddings and environmental features, and then applied to the action mask. Under constraints, the action value of each joint action is calculated using an online deep Q-network. Estimation is performed. Actions marked as infeasible by the mask are masked by minimizing their Q-values, thus allowing masked actions to be used only within the set of feasible actions. -greedy strategy selects the final action .when When performing actions locally, the vehicle control system completes task calculations locally; when During the unloading action, the vehicle controls the task to be offloaded to the selected edge server via the V2I link for execution and to obtain the calculation results, thus completing the unloading decision for the current time slot. Specifically, the state... The feature is mapped to a vector. The data is then input into an online Q-network. This Q-network employs a three-layer fully connected structure, with each layer containing 256 neurons, and outputs the Q-values ​​of all combined actions at once, as shown below: in, , These are nodes in two fully connected layers. It is the ReLU activation function. For online network parameters, It is the output layer weight matrix. It is the output layer bias vector; at the same time, the target network with the same structure is set. Its parameters Updates are performed through periodic copying. To reflect constraint information during the decision-making phase, an action masking operation is introduced for the Q-value, as shown below: in, This represents the Q value after masking. This indicates that the DQN network, before undergoing action masking, processes actions... The value estimate, A sufficiently large constant. Using a masked approach. -Greedy strategy selects actions: To avoid the unreasonable impact of inactive actions during the value iteration process, the maximum value is taken only from the set of active actions in the next state during the target Q-value calculation phase, as shown below: in, For the target Q value, For instant rewards, As a discount factor, As a termination marker, The action mask for the next state. The Q value output by the target network. For time slots The system state vector, For time slots Candidate uninstall actions.

[0062] The online network parameters are updated using the mean squared error loss function: Where B is a constant. And it is updated using gradient descent: in, Learning rate; target network parameters Update synchronously according to a preset cycle.

[0063] In summary, the action masking mechanism operates simultaneously in both the action selection and target value calculation phases, ensuring that Masked-DQN's exploration, sampling, and value updates are all confined within a feasible domain that satisfies deadline and resource load constraints. This allows for the learning of a stable and feasible task offloading strategy. .

[0064] Step 7: Perform the uninstallation and update.

[0065] Execute the selected uninstall action when When performing actions locally, the vehicle control system completes task calculations locally; when During the unloading action, the vehicle controls the task to be offloaded to the selected edge server via a V2I link for execution and to obtain the calculation results. An immediate reward is returned after the environment executes the action. Next state Transition samples Store in the experience replay pool When training conditions are met, a small batch of samples is randomly sampled from the experience replay pool. The target Q-network is used to calculate the time difference (TD) target value, and the TD error and loss function are constructed to update the online Q-network parameters. Simultaneously, the target Q-network parameters are updated synchronously according to a preset period or a soft update method. When calculating the maximum Q value of the next state, action mask constraints are also applied to ensure that the update process is within the feasible region. This process iteratively obtains an approximately optimal offloading strategy that satisfies the minimum end-to-end task processing time, total energy consumption, and resource constraints. The pseudocode for the vehicle-to-everything (V2X) computing task offloading based on Masked-DQN is as follows: Figure 9 As shown.

[0066] Experimental verification: To demonstrate the feasibility and effectiveness of this invention, comparative experiments were conducted using a real-world vehicle network unloading dataset to evaluate the proposed method's performance in terms of end-to-end latency, energy consumption, and server load balancing.

[0067] In this embodiment, the specific experimental parameters are set as follows: the heterogeneous graph neural network has 3 node types, 3 edge types, 2 network layers, 128 hidden layer dimensions, and the number of attention heads is set to [4,1] sequentially. The number of training rounds is 20. The input dimension of the MR-BLS QoS regressor is 25, the output dimension is 4, the mapping layer and enhancement layer structure is 10×800, the feature node layer contains 10 mapping windows, each window has 800 feature nodes; the enhancement node layer contains 10 enhancement windows, each window has 800 enhancement nodes. Since the input feature dimension of the candidate task-server pair is 25 dimensions and the output QoS index is 4 dimensions, if the number of nodes is too small, the random feature mapping capability will be insufficient, making it difficult to fit the nonlinear relationship between end-to-end latency, energy consumption, queue length and server CPU utilization; if the number of nodes is too large, it will increase the computational overhead of matrix inversion or pseudo-inversion and may introduce redundant nodes leading to overfitting. The activation functions used are tanh and sigmoid, and the regularization coefficient is... 1×10 -5 The maximum number of iterations is 20, and the numerical stability parameter ε is 1×10. -8 The random seed is 42.

[0068] The Masked-DQN offloading policy network employs a three-layer fully connected neural network structure, with 256 neurons in each layer. The hidden layer activation function is ReLU, and the output layer has 1+K neurons, where K=10 represents the number of candidate edge servers. Each neuron in the output layer corresponds to the action value of a joint offloading action. Action 0 indicates that the task is executed locally on the vehicle, while actions 1 through K represent offloading the task to the corresponding edge server for execution. The Adam optimizer is used during training, with a learning rate of 5×10⁻⁶. -4 The discount factor γ was set to 0.97, and the experience replay pool capacity was set to 1×10. 5 The batch size is set to 64, the target network synchronizes with the online network every 800 steps, and the number of training rounds is set to 1000.

[0069] The experiments were conducted on a desktop computer running Windows 10, with an Intel Core i7-10700F processor (8 cores, 2.90GHz), 32GB of RAM, and an NVIDIA GeForce RTX 3060 graphics card (12GB of VRAM). Both deep learning and reinforcement learning components were implemented using Python 3.8. The graph neural network and reinforcement learning algorithms were based on PyTorch 2.0.1, while the HGAT-related code relied on TensorFlow 1.15 and Keras. Heterogeneous graph construction and data preprocessing used libraries such as pandas and NumPy. All experiments were performed on the same hardware platform with fixed random parameters. Multithreaded parallel environments were not used during the reinforcement learning training phase to avoid additional randomness.

[0070] We construct the dynamic process of task arrival and vehicle-to-RSU connection based on real-world vehicle network offloading datasets. Training and online decision-making are completed according to the Masked-DQN decision-making process under heterogeneous graph embedding, QoS prediction, and action masking constraints. Under unified parameters, we compare with baseline methods such as RAND, Greedy-Delay, Greedy-Energy, DQN-Basic, and DDPG. Evaluation metrics include average cumulative reward, average task latency, average task energy consumption, and edge server load balancing (load standard deviation).

[0071] like Figure 4 As shown, the method of the present invention has a continuous and stable increase in cumulative reward during the training process, and converges to the highest level in the middle and late stages with smaller fluctuations compared to other schemes. This indicates that the method of the present invention can obtain better long-term comprehensive benefits in dynamic vehicle networking environment, and has better training stability and convergence performance.

[0072] like Figure 5 As shown, the latency curve of the method of the present invention remains at its lowest throughout the training process, and after a rapid decrease in the early stage, it remains stable for a long time. This indicates that the method of the present invention can continuously output low-latency and stable unloading decisions, thereby significantly reducing the average completion latency of vehicle networking tasks.

[0073] like Figure 6 As shown, the average energy consumption of the method of the present invention is relatively high in the early stage of training, but it continues to decrease and stabilizes in a lower range as the training rounds progress, and the fluctuation is smaller in the middle and later stages. This indicates that the method of the present invention can effectively reduce the energy consumption of the unloading process while ensuring the quality of task completion and system constraints, thereby improving the system energy efficiency and reducing energy consumption.

[0074] like Figure 7As shown, the load standard deviation of the method of this invention is significantly lower than that of the random scheme and the DQN comparison scheme, and remains stable over a long period of time, on the same order of magnitude as the DDPG scheme. This is because Masked-DQN imposes feasibility constraints on offloading actions, dynamically reduces the candidate server set and masks infeasible actions, resulting in a significant reduction in the number of available servers under certain vehicle locations and time windows. The smaller selection set naturally leads to tasks being more easily concentrated on a few nodes, increasing the load standard deviation. DDPG does not have such a hard constraint mask. It can distribute tasks in a larger action space through continuous policy output, offloading them to different edge servers. Therefore, the load standard deviation is lower. However, considering latency, energy consumption and cumulative reward indicators, this invention achieves better overall performance.

[0075] Experimental results show that the method of this invention exhibits a stable increase in cumulative reward and rapid convergence during training, stabilizing after approximately several hundred rounds. Furthermore, its overall performance after convergence surpasses the baseline, demonstrating the highest average cumulative reward, lowest average latency, and lowest average energy consumption. It also more effectively distributes offloading tasks across multiple edge servers to maintain good load balancing. This proves that the present invention can generate executable offloading strategies that satisfy constraints and achieve superior system QoS in dynamic vehicular network scenarios.

[0076] Finally, it should be noted that any parts of this invention not described in detail are prior art. Those skilled in the art will understand that the above descriptions are merely preferred embodiments of the invention and are not intended to limit the invention. Although the invention has been described in detail with reference to the foregoing examples, those skilled in the art can still modify the technical solutions described in the foregoing examples or make equivalent substitutions for some of the technical features. All modifications and equivalent substitutions made within the spirit and principles of the invention should be included within the scope of protection of the invention.

Claims

1. A method for offloading computing tasks in vehicle-to-everything (V2X) networks based on wide-depth learning, characterized in that, Includes the following steps: Step 1: Collect vehicle network environment information, including vehicle-side computing status, computing task-related information, communication link status, and edge server-side resource status; Step 2: Model vehicles, computing tasks, and edge servers as three types of nodes in a heterogeneous graph. Model the generation relationship between vehicles and tasks, the communication connection relationship between vehicles and edge servers, and the candidate unloading relationship between tasks and edge servers as different types of edges, and mutate the graph during construction. Step 3: Use a heterogeneous graph neural network to extract and aggregate the node features and edge features in the heterogeneous graph to obtain vehicle node embeddings, task node embeddings, edge server node embeddings, and task-server edge embeddings, and combine them with the environmental information to construct a state vector. Step 4: Input the state vector into the width learning network to predict the end-to-end latency, total energy consumption, server queue length and CPU utilization of each task-server combination, which are multi-dimensional service quality indicators. Step 5: Based on the predicted multi-dimensional service quality indicators and preset constraint thresholds, generate an action mask, mark unloading actions that do not meet the constraints as infeasible unloading actions, and retain only executable unloading actions; Step 6: Model the task unloading process as a Markov decision process. Using the state vector as the current state, use a deep Q-network to evaluate the value of each action. Apply the action mask in both the action selection stage and the target Q-value calculation stage to shield inactive actions. Only perform policy learning within the feasible region and select unloading actions. Step 7: Execute the selected unloading action, control the vehicle to complete the task calculation locally or unload the task to the selected edge server for execution, obtain the immediate reward and next state, store the experience sample and update the deep Q network parameters.

2. The method for offloading computing tasks in vehicle networking based on wide-depth learning according to claim 1, characterized in that, In step two, the update rules for the time-varying graph include: dynamically adding or deleting vehicle-server edges based on changes in vehicle location; establishing task nodes and vehicle-task edges based on the arrival of new tasks; establishing or deleting task-server edges based on changes in candidate unloading servers; and updating various node features and edge features based on real-time collected environmental information.

3. The method for offloading computing tasks in vehicle networking based on wide-depth learning according to claim 1, characterized in that, In step two, the heterogeneous graph neural network uses the HGATv2 network to target different types of relationships. The aggregation features of nodes are extracted separately, and the features of different relationships are fused through the following attention mechanism to obtain the node. final node embedding : in, Indicates the first The weight of the relationship, Indicates the first The original importance score of the relationship, For nodes In relationship The aggregation features below, For learnable parameters, The index identifier represents the traversal of all relations.

4. The method for offloading computing tasks in vehicle networking based on wide-depth learning according to claim 1, characterized in that, In step four, the loss function used to train the width learning network is a joint loss function combining Gaussian kernel modal regression loss and a regularization term. The expression is: In the formula, For the actual QoS label vector, i Indicating the first in the Internet of Vehicles i One computational task, k Indicates the number is k Edge servers, For the width feature matrix, To output the weight matrix, For kernel bandwidth parameters, The square of the L2 norm. The regularization coefficient is . for Norm regularization term.

5. The method for offloading computing tasks in vehicle networking based on wide-depth learning according to claim 4, characterized in that, In step four, the feature node matrix Z and the augmentation node matrix H of the width learning network are generated using randomly fixed weights and biases, and then concatenated column-wise to form the width feature matrix. .

6. The method for offloading computing tasks in vehicle networking based on wide-depth learning according to claim 5, characterized in that, The output weight matrix W of the width learning network is solved using a closed-form weighted ridge regression: in, It is a diagonal matrix composed of sample weights. This is the row regularization weight matrix. This is the actual output matrix.

7. The method for offloading computing tasks in vehicle networking based on wide-depth learning according to claim 1, characterized in that, In step five, the action mask is generated according to the following rules: For any candidate task-server pair, if any of the following conditions are met, the action of unloading the task to the server is marked as infeasible, and the corresponding mask value is set to 0; otherwise, it is marked as feasible, and the mask value is set to 1. (1) The end-to-end latency predicted by the width learning network exceeds the maximum allowable deadline for the task; (2) The total energy consumption of the task predicted by the width learning network exceeds the preset energy consumption budget; (3) The server CPU utilization predicted by the width learning network exceeds the preset utilization limit; (4) The server queue length predicted by the width learning network exceeds the preset maximum queue length; (5) The current vehicle cannot communicate with the roadside unit corresponding to the server.

8. The method for offloading computing tasks in vehicle networking based on wide-depth learning according to claim 1, characterized in that, In step six, applying the action mask specifically includes: in the action selection phase, setting the Q-value corresponding to the action marked as infeasible by the mask to a minimum value, and selecting actions within the set of feasible actions using an ε-greedy strategy; in the target Q-value calculation phase, taking the maximum Q-value only within the set of feasible actions in the next state, expressed as: in, For the target Q value, For instant rewards, As a discount factor, As a termination marker, The action mask for the next state. The Q value output by the target network. For time slots The system state vector, For time slots The candidate unload actions are A, where A is the action space.

9. The method for offloading computing tasks in vehicle networking based on wide-depth learning according to claim 1, characterized in that, In step six, the instant reward Defined as the inverse of the total cost plus a feasibility penalty: In the formula, For the comprehensive cost function, The penalty coefficient is... For action The corresponding mask value.

10. A method for offloading computing tasks in vehicle networking based on wide-depth learning according to claim 9, characterized in that, The comprehensive cost function It is expressed as a weighted sum of normalized latency, energy consumption, queue length, CPU utilization, and load balancing metrics, with the following expression: in, This indicates that the task is executed locally on the vehicle. This indicates that the task will be unloaded to the first... The operation is performed on a single edge server, where K is the total number of edge servers. and Representing tasks Local normalized latency and energy consumption, , These represent the normalized end-to-end latency and energy consumption predicted by the width learning network, respectively. , , These are normalized server queue length, CPU utilization, and load balancing metrics, respectively. , , , , These are the weighting coefficients.