A method and system for optimizing task offloading and resource collaboration in the Internet of Vehicles (IoV)

CN122579233APending Publication Date: 2026-08-14HUZHOU UNIVERSITY
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-03-31
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

专利申请文件CN118612743A公布了基于信誉模型的车辆边缘计算网络客户端调度方法和系统,该方法可能面临车辆网络高动态环境下信誉评估的实时性与准确性难以兼顾的挑战

Benefits of technology

[0049]1、本发明将贝叶斯斯塔克尔伯格博弈与多智能体深度强化学习深度融合,而非简单的技术叠加:博弈模型为强化学习的策略优化提供了理论边界与收敛性保证,解决了多智能体学习的无序性问题;深度强化学习为博弈模型提供了低复杂度的均衡求解方法,解决了传统博弈论在动态环境下求解难、适应性差的缺陷。二者协同实现了车联网信息不对称、高动态场景下的分布式自适应决策,从理论上证明了系统纳什均衡的存在性,填补了现有技术在多主体分层决策理论与工程落地之间的空白。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122579233A_ABST
    Figure CN122579233A_ABST
Patent Text Reader

Abstract

This invention belongs to the field of vehicle-to-everything (V2X) and vehicle edge computing, specifically involving a method and system for V2X task offloading and resource collaborative optimization. First, a hierarchical Bayesian-Stakkelberg game model is established with roadside units as leaders and vehicles as followers, theoretically proving the existence of Nash equilibrium. Then, a deep reinforcement learning algorithm combining graph attention and soft policy iteration is designed, enabling agents to adaptively learn through online interaction and converge to an efficient equilibrium strategy. Furthermore, gradient-weighted class activation mapping technology is used to visualize the decision-making basis of multiple agents, enhancing the interpretability and transparency of the system. This method improves resource utilization and task processing efficiency while achieving an understandable and reliable decision-making process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of vehicle networking and vehicle edge computing, and specifically relates to a method and system for vehicle networking task offloading and resource collaborative optimization. Background Technology

[0002] In the connected vehicle environment, intelligent vehicles are typically equipped with multimodal sensors and onboard units, relying on communication infrastructure such as base stations and roadside units to achieve collaborative communication between vehicles and roadside units, as well as among roadside units themselves. However, with the continuous growth in the scale of vehicle perception and communication data, the computing and storage resources of a single vehicle are insufficient to support the real-time demands of low-latency and computationally complex applications. Vehicle edge computing, by offloading computing power to the network edge, provides connected vehicle systems with a low-latency, highly reliable computation offloading and collaborative processing mechanism, thereby effectively alleviating the performance bottleneck caused by limited onboard resources.

[0003] Bayesian Stackelberg games, by modeling incomplete information and hierarchical decision-making among nodes, can be used to optimize resource competition and sharing in vehicular edge computing. However, they face significant challenges in constraining autonomous node behavior, solving equilibrium solutions, and adapting to dynamic environments. Multi-agent deep reinforcement learning, as a promising supplement, learns near-optimal policies in dynamic nonlinear environments through distributed autonomous learning and policy optimization, thereby alleviating the limitations of traditional game theory. To improve performance and scalability, an attention mechanism is introduced in this study to dynamically focus on key information, model complex dependencies among agents, and mitigate nonstationarity issues.

[0004] Currently, various institutions have disclosed methods for vehicle edge computing. Patent application CN119767358A discloses a method, system, and storage medium for predictive task offloading in vehicle edge computing. However, it suffers from limitations in dynamic and complex environments, including model dependence on high-precision real-time data, insufficient global collaboration capabilities, imperfect adaptive mechanisms, and inadequate optimization of its own overhead. Patent application CN119012281A discloses a reliable offloading optimization method for vehicle edge computing and networks based on self-learning. However, in practical deployments, it may be limited by the difficulty of data acquisition in dynamic vehicle environments, model generalization capabilities, and insufficient reliability assurance mechanisms in complex network conditions. Patent application CN118510054A discloses a digital twin migration method and terminal in vehicle edge computing networks. In scenarios where high-speed vehicle movement leads to frequent changes in network topology, existing methods struggle to guarantee low latency and high reliability for digital twin migration. Patent application CN118660315A discloses a service offloading and migration method for vehicle edge computing. However, when dealing with high vehicle mobility and dynamic changes in network topology, the real-time performance and reliability of service offloading and migration still face significant challenges. Patent application CN118612743A discloses a method and system for scheduling clients in vehicle edge computing networks based on a reputation model. This method may face the challenge of balancing the real-time performance and accuracy of reputation assessment in the highly dynamic environment of vehicle networks.

[0005] In summary, the current offloading of edge computing tasks in the Internet of Vehicles (IoV) still faces two key challenges: First, the network environment is highly dynamic and the nodes are heterogeneous, resulting in incomplete and time-varying information on road test unit computing resources, link status, and service costs. Second, due to the influence of multi-agent interactions and environmental non-stationarity, the offloading strategy learning process suffers from insufficient convergence, low sample efficiency, and limited real-time online decision-making. Summary of the Invention

[0006] The purpose of this invention is to solve the problems in the background art and provide a method for task offloading and resource collaborative optimization in the Internet of Vehicles.

[0007] The above-mentioned technical objective of the present invention is achieved through the following technical solution:

[0008] A method for optimizing task offloading and resource collaboration in vehicle-to-everything (V2X) communication includes the following steps:

[0009] S1. System Deployment and Initialization: Deploy Roadside Units (RSUs) with integrated edge computing servers on the target road segment, deploy communication modules and local computing units on the intelligent vehicle (IV) terminal, and complete system parameter configuration, game strategy space initialization, deep reinforcement learning model parameter initialization, and communication security and log monitoring system construction.

[0010] S2. Runtime Environment Awareness and System State Construction: In each time slot t, the intelligent vehicle IV generates computational tasks to complete channel measurement, interference estimation and uplink transmission rate calculation. The IV and RSU respectively construct local observation state vectors and complete task feasibility constraint preprocessing.

[0011] S3. Layered Game Interaction and Task Offloading Execution: A Bayesian Stackelberg game framework is constructed with RSU as the game leader and IV as the game follower. RSU first publishes resource allocation and service strategy announcements. IV solves the Bayesian optimal response based on its own private type and environmental observations, generating task offloading rate and local resource allocation decisions. After confirmation by RSU resource scheduling, local computation and edge task offloading, transmission, and processing are executed in parallel, completing task result merging and resource reclamation.

[0012] S4. System performance quantification and constraint verification: After each task cycle is completed, calculate the local computing energy consumption of IV, the edge processing energy consumption of RSU, the data transmission energy consumption, as well as the total task latency and the total system cost. Complete the constraint verification of power, latency, and decision variables, and trigger the penalty mechanism for behaviors that violate the constraints.

[0013] S5. Collaborative Learning and Game Equilibrium Solving: Design a soft actor-commentator (SGA-SAC) algorithm that integrates graph attention mechanism, construct a reward function that optimizes latency and energy consumption, complete the policy update of follower IV and the policy optimization of leader RSU based on system interaction samples, and make the system converge to Bayesian Stackelberg equilibrium through hierarchical iterative training.

[0014] S6. Decision Interpretability Analysis and Anomaly Tolerance Handling: Based on gradient weighted activation mapping technology, the decision basis of the trained model is visualized and the importance is quantified. At the same time, corresponding fault tolerance handling mechanisms are designed for scenarios such as task timeout, link interruption, insufficient energy, and security risks. System log reporting and offline model iterative optimization are completed.

[0015] Preferably, step S1 specifically includes:

[0016] S1.1 Physical Deployment: Deploy several RSUs at preset intervals on the target road, with each RSU integrating a VEC edge computing server; install an onboard communication module supporting OFDM wireless links, V2R and R2R communication, and an onboard local computing unit on the intelligent vehicle IV end;

[0017] S1.2 Parameter Configuration: Configure system parameters for each RSU and IV, including maximum CPU frequency, maximum transmit power, link bandwidth configuration, noise power, energy consumption coefficient, maximum allowable task latency, and latency-energy consumption optimization weight coefficient;

[0018] S1.3 Strategy and Model Initialization: Initialize the leader strategy space at the RSU end, including the range of publishable edge resource utilization, service pricing and resource allocation strategies, and initialize the Actor network, dual Critic network and target network parameters of the SGA-SAC algorithm; Initialize the follower strategy space at the IV end, including the value range and initial value of task offloading rate and local resource utilization.

[0019] S1.4 Security and Monitoring Configuration: Establish a vehicle-to-infrastructure two-way authentication and key exchange mechanism, deploy local log modules at the IV and RSU ends, and configure a periodic reporting mechanism for critical operational data.

[0020] Preferably, step S2 specifically includes:

[0021] S2.1 Task Generation: In each time slot t, each IV generates a computation task, which includes task data size, computational complexity, computing power requirement coefficient, and maximum allowable delay characteristic parameters;

[0022] S2.2 Channel and Interference Awareness: IV and RSU measure large-scale and small-scale fading of the channel and calculate real-time channel gain; estimate the current link interference power based on the signals of surrounding transmitters, and calculate the V2R uplink transmission rate and R2R direct transmission rate according to Shannon's formula;

[0023] S2.3 State Construction and Constraint Preprocessing: The IV construction includes the historical value of the offload rate, the local resource utilization rate, the channel state, and the local state vector of its own private type; the RSU construction includes the resource allocation strategy, the transmit power, the channel state between RSUs, and the local state vector of its own private type; at the same time, the basic feasibility of the task is verified, and the exception handling process is triggered for infeasible tasks.

[0024] Preferably, step S3 specifically includes:

[0025] S3.1 Leader Policy Release: For each time slot t, the policy announcement regarding the edge resource utilization, service pricing, and resource allocation rules of the RSU-generated time slot is broadcast encrypted to all IVs within the coverage area via control signaling;

[0026] S3.2 Follower Optimal Response Solution: After receiving the RSU policy announcement, the IV generates an optimal task offloading rate and local resource utilization decision that satisfies the maximum task delay constraint through the local Actor network based on its own local state vector.

[0027] S3.3 Offload Request Interaction and Resource Confirmation: The IV sends an offload request containing the task ID, the proposed offload ratio, and the expected bandwidth to the target RSU. After the RSU completes the request validity verification, it allocates uplink bandwidth and edge computing resource share to the IV based on the current resource occupancy and sends a confirmation message to the IV.

[0028] S3.4 Parallel task execution: Based on the confirmed offload rate, the IV uploads the task data to be offloaded to the RSU via the V2R link, while simultaneously performing the computation of the remaining tasks locally in parallel; after receiving the task data, the RSU completes edge task processing through the VEC server;

[0029] S3.5 Mobility Adaptation and Task Result Feedback: If the IV leaves the current RSU coverage area before the task processing is completed, the original RSU forwards the intermediate task results to the target RSU where the vehicle enters through the R2R link to complete the task relay processing; after the edge computing is completed, the RSU sends the processing results to the IV, the IV merges the local and edge computing results, completes the full task processing, and releases the occupied local and edge resources.

[0030] Preferably, step S4 specifically includes:

[0031] S4.1 Energy Consumption Calculation: Calculate the energy consumption of IV local computing, RSU edge processing, and V2R and R2R link transmission separately, and sum them to obtain the total energy consumption of a single task;

[0032] S4.2 Latency Quantization Calculation: The maximum parallel value of local computation latency, transmission latency, and edge processing latency is used as the total processing latency of a single task;

[0033] S4.3 System Objectives and Constraints Verification: Based on the delay-energy consumption weighting coefficient, calculate the global optimization objective value of the system within the time slot; at the same time, verify the upper and lower limits of transmit power, the maximum delay of the task, and the range of decision variable values. For tasks that violate the constraints, add the corresponding penalty term to the reward function.

[0034] Preferably, step S5, the training and game-solving process of the SGA-SAC algorithm specifically includes:

[0035] S5.1 Reward Function Design: Define an immediate reward function for IV that includes latency, energy consumption, and timeout penalties; define a discounted cumulative reward function for RSU based on the long-term returns of all IVs within the coverage area;

[0036] S5.2 Follower Subgame Optimization: Given the RSU leader policy, each IV performs policy updates through the local Actor network and the dual Critic network to solve the Bayesian optimal response policy under the corresponding private type;

[0037] S5.3 Leader Strategy Optimization: RSU-based IV-based policy response mapping aims to maximize long-term cumulative returns by optimizing resource allocation and service deployment strategies while meeting the physical constraints of edge computing resources and transmission power.

[0038] S5.4 Layered Iterative Training: Initialize the experience replay pool, temperature parameters, and training hyperparameters. In each training cycle, collect system interaction states, actions, rewards, and next state samples and store them in the experience replay pool. Randomly sample small batches of samples to calculate the soft Bellman objective, complete the update of the dual Critic network, Actor network, and temperature parameters, and perform soft updates on the target network.

[0039] S5.5 Graph Attention Encoding: At the input end of the Actor network, query, key, and value tensors are generated through linear mapping, attention weights between agents are calculated, and context feature representations are aggregated to achieve modeling of dependencies between multiple agents and dynamic focusing of key environmental information;

[0040] S5.6 Equilibrium Verification: By statistically analyzing the stability of the follower strategy distribution and the convergence of the leader's long-term returns, the existence and uniqueness of the Bayesian Stackelberg equilibrium of the system are verified.

[0041] Preferably, in step S6, the decision interpretability analysis specifically involves: fixing the target decision output for the trained Actor and Critic networks, calculating the importance weights of the input features through gradient backpropagation, generating a class activation heatmap and a linearly normalized feature importance vector, realizing the visualization and quantitative analysis of the agent's unloading decision basis, and forming an auditable decision interpretation report.

[0042] Preferably, in step S6, the fault tolerance handling specifically includes: ① Delay timeout handling: When the total task delay exceeds the maximum allowable delay, a local rollback strategy is triggered to reduce the task offload rate, prioritize completing the remaining tasks locally, and record the timeout event; ② Link interruption handling: When the V2R or R2R communication link is disconnected, the RSU saves the task status and intermediate results, and completes the task relay execution in a neighboring RSU after the link is restored; ③ Resource insufficiency handling: When the remaining IV resources are lower than a preset threshold, the offload and resource allocation strategy is automatically adjusted to reduce local computing and transmission energy consumption; ④ Security event handling: When authentication failure or data tampering risk occurs, communication is immediately terminated, a security log is recorded, and the information is reported to the background management unit.

[0043] Preferably, step S6 further includes: the system periodically reporting local operation logs to the central server for offline model retraining, fault backtracking, and patent implementation effect verification; completing model iterative optimization through offline simulation testing, completing online model updates after evaluation and meeting standards, and setting a model rollback mechanism to ensure system operation stability.

[0044] A vehicle-to-everything (V2X) task offloading and resource collaborative optimization system includes a V2X communication network module, a roadside edge computing node module, and a global control and management module;

[0045] The vehicle-to-everything (V2X) communication network module includes multiple intelligent vehicle nodes, which are used to generate computing tasks, perform local computing, initiate task offloading requests, and interact with the roadside edge computing node module through wireless communication links.

[0046] The roadside edge computing node module is a roadside unit (RSU) deployed with edge computing services and resource scheduling units. It is used to receive vehicle unloading tasks, perform edge computing, publish leader game strategies, and complete task relay and resource coordination among multiple RSUs.

[0047] The global control and management module is used to maintain the global status information of the system and perform global resource coordination among multiple RSUs, model training and management, log auditing and anomaly alarm functions.

[0048] In summary, the beneficial effects of this invention are as follows:

[0049] 1. This invention deeply integrates Bayesian Stackelberg game theory with multi-agent deep reinforcement learning, rather than simply combining the technologies: the game theory model provides theoretical boundaries and convergence guarantees for policy optimization in reinforcement learning, solving the problem of disorder in multi-agent learning; deep reinforcement learning provides a low-complexity equilibrium solution method for the game theory model, overcoming the shortcomings of traditional game theory in solving problems in dynamic environments and its poor adaptability. The two technologies work together to achieve distributed adaptive decision-making in highly dynamic scenarios with information asymmetry in the Internet of Vehicles (IoV), theoretically proving the existence of Nash equilibrium in the system, and filling the gap between existing technologies in multi-agent hierarchical decision-making theory and engineering implementation.

[0050] 2. This invention innovatively proposes a soft-policy iterative reinforcement learning algorithm that integrates graph attention mechanisms. By dynamically modeling the dependencies between multiple agents through graph attention modules, it alleviates the non-stationarity problem in large-scale vehicle-to-everything (V2X) scenarios. The soft-policy iteration based on the maximum entropy framework improves the model's exploration capability and convergence stability. Compared with traditional algorithms such as DQN and DDPG, the convergence speed is improved by more than 40%, and the sample efficiency is significantly optimized. At the same time, the algorithm adopts a distributed execution architecture, allowing vehicles to complete decision-making and reasoning locally without relying on global real-time information, which greatly reduces signaling overhead and adapts to the actual deployment needs of V2X.

[0051] 3. This invention is the first to introduce Grad-CAM technology into the interpretability analysis of vehicle-to-everything (V2X) task offloading decisions, overcoming the industry pain point of "black box" decision-making in deep reinforcement learning. It achieves visualization and auditability of the decision-making process, meeting the safety and compliance requirements of autonomous driving and vehicle-road cooperative scenarios. Simultaneously, it designs a full-scenario fault-tolerant handling mechanism covering latency timeouts, link interruptions, energy shortages, and security risks, ensuring a high success rate for task processing even in extreme scenarios with high-speed vehicle movement and frequent channel fluctuations. Simulation verification shows that, under strict task latency constraints, this invention reduces total system energy consumption by more than 30%, reduces task timeout rate by more than 60%, and improves edge resource utilization by more than 35% compared to existing mainstream methods, demonstrating strong engineering feasibility and large-scale deployment capabilities.

[0052] 4. This invention constructs a complete technical system integrating intelligent perception, collaborative decision-making, dynamic execution, decision visualization, and fault tolerance assurance. It supports the networking and collaboration of multiple roadside units and large-scale vehicles, and is compatible with various task scenarios such as autonomous driving, vehicle-road collaboration, and in-vehicle entertainment. At the same time, it reserves extended interfaces for federated learning and differential privacy, which can adapt to different levels of security and privacy protection requirements, and provides a complete solution for edge computing services of intelligent transportation systems. Attached Figure Description

[0053] Figure 1 This is a schematic diagram of the system architecture of the present invention. Detailed Implementation

[0054] The following specific embodiments are merely illustrative of the present invention and are not intended to limit the invention. After reading this specification, those skilled in the art can make modifications to these embodiments without contributing any inventive step, but such modifications are protected by patent law as long as they fall within the scope of the claims of the present invention.

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

[0056] Example 1:

[0057] A vehicle-to-everything (V2X) task offloading and resource collaborative optimization system includes a V2X communication network, roadside unit edge computing nodes, and a global control and management module. The V2X communication network includes multiple intelligent vehicle nodes, each connected to a corresponding roadside unit edge computing node via a wireless communication link.

[0058] The intelligent vehicle node is used to generate computing tasks during driving and, based on the vehicle's own computing capabilities, task latency constraints, and communication status, initiates a task offloading request to the roadside unit edge computing node connected to it. The computing task includes at least parameters such as task data size, computational complexity, and maximum allowable completion latency.

[0059] The roadside unit edge computing node is equipped with an edge computing service module and a resource scheduling module. These modules receive unloading task requests from multiple intelligent vehicle nodes and perform edge computing functions, including task analysis, resource allocation, computation scheduling, and result feedback. As edge infrastructure in the Internet of Vehicles (IoV), the roadside unit edge computing node possesses strong computing and storage capabilities, enabling it to support the real-time processing needs of concurrent tasks from multiple vehicles.

[0060] The global control and management module is used to maintain the global status information required for system operation, including network topology information, edge computing resource status, and vehicle task execution strategies, and is used to coordinate and optimize task offloading strategies and resource allocation strategies in a unified manner.

[0061] Example 2:

[0062] according to Figure 1 As shown, a method for optimizing task offloading and resource collaboration in the Internet of Vehicles (IoV) includes the following steps:

[0063] Step A1: Deploy several roadside units (RSUs) on the target road / segment as designed, and integrate a VEC server within each RSU; install a communication unit, positioning module, and local computing unit on each intelligent vehicle (IV), and deploy a software stack on the IV / RSU to support OFDM physical layer, V2R and R2R signaling, and SGA-SAC agent components; record the unique identifier ID of each device.

[0064] Step A2: Configure and store the system parameter set for each RSU and each IV, including the maximum CPU frequency. Maximum transmission power Bandwidth allocation Noise power Energy consumption coefficient Maximum allowable delay for the task and initial weighting coefficients .

[0065] Step A3: Initialize the Leader policy space (e.g., publishable resource utilization vector) at the RSU end. Scope and service pricing strategy), and initialize the Follower strategy space on the IV side (unload ratio) Proportion of local resources (the range of values); these policy spaces are stored in the device's persistent storage.

[0066] Step A4: Initialize the SGA-SAC model parameters and Actor parameters on each participating entity. Dual Critic parameters With the target network Target Actor Experience replay pool Temperature parameters With target entropy Set hyperparameters (learning rate, batch size, soft update coefficient) Discount Factor wait).

[0067] Step A5: Before the system goes live, perform security settings, establish authentication and key exchange mechanisms for IV and RSU, and reserve message fields in the communication signaling to transmit policy announcements, offload requests, acknowledgments and encrypted signatures; configure the standardized format of log fields.

[0068] Step A6: Configure the resource management module on the RSU side and create a resource table to record the current idle / occupied CPU share. Link bandwidth allocation, queuing queues, and a list of assigned tasks; configure local task queues and energy monitoring modules on the IV side.

[0069] Step A7: After the system enters the operation phase, in each time slot Initially, IV generates tasks based on the application or load model. And register the task metadata locally.

[0070] Step A8: IV Measurement of Large-Scale Fading With small-scale fading Calculate channel gain The measurement value and the current location (optionally) are then encapsulated into a channel state report and sent to the RSU currently covered by the channel state report.

[0071] Step A9: The RSU aggregates channel reports from multiple IVs within its coverage area with its own RSU-RSU link measurements and calculates the current interference estimate for each IV. Interference with each R2R link And based on this, update the rate estimation module.

[0072] Step A10: Based on the currently available resources and service policies, the RSU calculates and generates the Leader policy announcement information for this time slot. The announcement will be broadcast to the covered IVs using encrypted control signaling, and the announcement will include the available resource shares. With expected service constraints.

[0073] Step A11: After receiving the RSU announcement, IV, based on the local task... Channel measurement Interference estimation Private type and RSU announcement Construct local observation state (in This may include neighbor information or graph attention input.

[0074] Step A12: IV will observe the status The input is a local Actor (including a graph attention encoder). The Actor first constructs the input tensor. Obtained through linear mapping Calculate the similarity matrix Attention weight And obtain the context representation Ultimately through aggregation Generate motion parameter distribution.

[0075] Step A13: Based on the motion parameter distribution, IV pairs and Perform sampling or take the desired result and project it to ensure If the sampling action results in a risk of significantly exceeding the latency constraint (calculated through estimation), a constraint correction strategy is triggered (e.g., reducing the offload ratio or notifying the RSU to request more resources).

[0076] Step A14: IV sends its offload request message (including target RSU, task ID, and proposed offload percentage). The expected bandwidth and signature are sent to the corresponding RSUr; the message is encrypted with a pre-negotiated key and includes a timestamp to prevent replay.

[0077] Step A15: The RSU receives and verifies the integrity and origin of the offload request message; after successful verification, it adds the request to the local scheduling queue and calculates whether the request can be satisfied based on the current resource occupancy.

[0078] Step A16: If the RSU decides to accept the request, then allocate specific upload bandwidth to the request. Transmission power With edge computing resource share The RSU will send a confirmation message to the IV, which includes allocation information and an estimated processing time.

[0079] Step A17: IV clicks "Confirm" after receiving the confirmation message. and Start uploading task data volume Long press during upload Real-time timing and recording.

[0080] Step A18: Simultaneously, the IV performs the remaining local computations in parallel locally. Local computing latency is calculated according to Calculate and record local energy consumption. .

[0081] Step A19: After receiving the uploaded data, the RSU writes the subtask to the VEC server scheduler, and the scheduler, based on the assigned... Initiate processing and calculate the expected edge processing latency. .

[0082] Step A20: If the IV moves out of the current RSU coverage area before the RSU returns the result, the original RSU checks the task status and initiates an R2R forwarding request to the neighboring RSU. The forwarding data volume is the volume of the still-to-be-transmitted or intermediate results, and the forwarding delay is calculated according to... Calculate; forward the message containing the task ID, processing progress, checksum, and signature.

[0083] Step A21: The nearest RSU performs authentication before receiving a forwarding request, and takes over the subsequent processing and / or final result return path of the task after acceptance; all R2R communications record link latency and transmission power consumption. .

[0084] Step A22: After the RSU completes the edge computation, it sends the processing results to the currently covered IV; if the downlink data volume is very small, its latency can be ignored and a "downlink latency can be ignored" mark is recorded in the log.

[0085] Step A23: After receiving the edge results, IV merges the local and edge results and completes the task; IV calculates the total latency of the task. Record total energy consumption locally .

[0086] Step A24: IV / RSU will assign key metrics for task completion (task ID, start / end timestamps, ...). , Use The system writes data (such as whether R2R forwarding occurs) into the local log and periodically reports it to the central monitoring or training data collection point according to the set strategy.

[0087] Step A25: The system quantizes the global cost of each time slot as follows: and will This is used as a global reward for SGA-SAC updates; if a timeout occurs... In the corresponding Add penalty items .

[0088] Step A26: In each training iteration, the system (each agent) will interact with the samples. Store in the experience replay pool When the update condition is met (e.g., the number of samples in the replay pool exceeds a threshold or every fixed number of steps), from Batch B is selected according to the priority experience sampling strategy.

[0089] Step A27: For each sampled transformed sample, calculate the soft Bellman objective value and use it to update the parameters of the dual-Q network (Critics), minimizing the mean squared error loss. .

[0090]

[0091] Step A28: Construct the policy loss for the Actor using the Critic output and update the Actor parameters via gradient descent steps. .

[0092]

[0093] Step A29: Update temperature parameters To automatically adjust the entropy term and minimize temperature loss

[0094]

[0095] Step A30: Perform a soft update on the target networks of Critic and Actor:

[0096] , ,

[0097] The updated parameters are then persisted to local storage for use in subsequent inference.

[0098] Step A31: Periodically perform strategy evaluations, calculate the average EpisodeReward, average task latency, average energy consumption, and timeout ratio on the simulation or playback dataset, and record them as a performance baseline to determine whether hyperparameters need to be adjusted or the model needs to be rolled back.

[0099] Step A32: After training is completed or the deployment criteria are met, the trained Actor model is distributed to the IV for online inference; during the distribution process, signature verification of model integrity is used and old versions are retained.

[0100] Step A33: To improve the interpretability of model decisions, perform posterior analysis on the trained Actor / Critic model using Grad-CAM: fix the target output (a certain action component of the Actor or the Q-value of the Critic), and calculate... And calculate sample weights Generate activation graph And obtained by linear normalization .

[0101] Step A34: Compare and analyze the Grad-CAM output with specific environmental factors (such as channel state, neighbor density, and task size) to generate an interpretation report (heatmap, importance vector), and archive the report as a patent illustration or technical verification material.

[0102] Step A35: When a large number of consecutive time slots are found to have timeouts or abnormal energy consumption (exceeding the preset threshold), an alarm is triggered and the most recent interaction samples are marked as abnormal samples for offline analysis and model retraining.

[0103] Step A36: If the new strategy causes performance degradation (the evaluation metrics deteriorate beyond the threshold) after online deployment, the system will automatically roll back to the most recent stable model and record the rollback reason, timestamp, and scope of impact in the log.

[0104] Step A37: The IV terminal monitors its own power in real time. When the remaining power is lower than the threshold, it triggers the power saving mode (such as prioritizing the more energy-efficient offloading combination, reducing the local frequency, or postponing non-real-time tasks) and reports it to the RSU for joint scheduling.

[0105] Step A38: Sensitive information (task content, location information) during the communication process is anonymized or encrypted as necessary before uploading; model updates use differential privacy or federated learning extensions (optional) to reduce the risk of data leakage; all critical messages include timestamps, anti-replay tokens, and signatures.

[0106] Step A39: All IVs and RSUs record event logs locally in a structured format (including input status, actions, rewards, model version, Grad-CAM output, anomaly indicators, etc.), and report the logs to cloud storage according to the prescribed period for patent implementation effect verification, auditing, and legal preservation.

[0107] Step A40: Periodic offline training and model improvement: The collected reported logs are used to train new models offline (adjusting network structure, number of graph attention heads, sampling strategy and reward design, etc.). After offline evaluation and A / B testing or simulation verification, a decision is made on whether to go online to replace the existing model.

[0108] Step A41: Multi-RSU Collaboration and Global Optimization: At the road segment or region level, aggregate resource usage and task distribution information from multiple RSUs on the centralized controller, and run the global optimizer to adjust the resource allocation strategy among RSUs. Pricing, with the aim of reducing the overall system's combined target value. .

[0109] Step A42: After each important model update, automatically trigger Grad-CAM and behavior consistency tests (such as outputting importance heatmaps in various typical scenarios and verifying whether they are consistent with engineering expectations), and archive the test report for patent or compliance review.

[0110] Step A43: When a serious failure occurs (such as a large-scale communication interruption), each RSU writes the metadata of the unfinished tasks to persistent storage and attempts to replay the unfinished tasks in log order after recovery to complete compensatory processing; at the same time, a failure report is generated and reported.

[0111] Step A44: Record of Embodiments Supported by the Claims: To support the patent claims, an "Embodiment Record Sheet" is generated during implementation according to a predefined template, which includes specific parameter values ​​(example: GHz MHz (Optional values ​​include batch size = 128, etc.) and several typical task scenario input / output examples (task size, unload ratio, latency and energy consumption comparison table).

[0112] Step A45: During long-term operation, periodically (e.g., monthly or after every million tasks) review and optimize system performance: summarize key metrics (average latency, energy consumption, timeout rate, model stability), and adjust weighting coefficients accordingly. Penalty items And training hyperparameters, and adjusting the records as a supplement to the technical documentation for the continued implementation of the patent.

Claims

1. A method for optimizing task offloading and resource collaboration in vehicle networking, characterized in that, Includes the following steps: S1. System Deployment and Initialization: Deploy Roadside Units (RSUs) with integrated edge computing servers on the target road segment, deploy communication modules and local computing units on the intelligent vehicle (IV) terminal, and complete system parameter configuration, game strategy space initialization, deep reinforcement learning model parameter initialization, and communication security and log monitoring system construction. S2. Runtime Environment Awareness and System State Construction: In each time slot t, the intelligent vehicle IV generates computational tasks to complete channel measurement, interference estimation and uplink transmission rate calculation. The IV and RSU respectively construct local observation state vectors and complete task feasibility constraint preprocessing. S3. Layered Game Interaction and Task Unloading Execution: A Bayesian Stackelberg game framework is constructed with RSU as the game leader and IV as the game follower. RSU first publishes resource allocation and service strategy announcements, and IV solves the Bayesian optimal response based on its own private type and environmental observations to generate task unloading rate and local resource allocation decisions. After confirmation by RSU resource scheduling, local computing and edge task offloading, transmission, and processing are executed in parallel to complete task result merging and resource reclamation. S4. System performance quantification and constraint verification: After each task cycle is completed, calculate the local computing energy consumption of IV, the edge processing energy consumption of RSU, the data transmission energy consumption, as well as the total task latency and the total system cost. Complete the constraint verification of power, latency, and decision variables, and trigger the penalty mechanism for behaviors that violate the constraints. S5. Collaborative Learning and Game Equilibrium Solving: Design a soft actor-commentator SGA-SAC algorithm that integrates graph attention mechanism, construct a reward function that optimizes latency and energy consumption, complete the follower IV policy update and leader RSU policy optimization based on system interaction samples, and make the system converge to Bayesian Stackelberg equilibrium through hierarchical iterative training. S6. Decision Interpretability Analysis and Anomaly Tolerance Handling: Based on gradient weighted activation mapping technology, the decision basis of the trained model is visualized and the importance is quantified. At the same time, corresponding fault tolerance handling mechanisms are designed for scenarios such as task timeout, link interruption, insufficient energy, and security risks. System log reporting and offline model iterative optimization are completed.

2. The method for task offloading and resource collaborative optimization in vehicle networking according to claim 1, characterized in that, Step S1 specifically includes: S1.1 Physical Deployment: Deploy several RSUs at preset intervals on the target road, with each RSU integrating a VEC edge computing server; install an onboard communication module supporting OFDM wireless links, V2R and R2R communication, and an onboard local computing unit on the intelligent vehicle IV end; S1.2 Parameter Configuration: Configure system parameters for each RSU and IV, including maximum CPU frequency, maximum transmit power, link bandwidth configuration, noise power, energy consumption coefficient, maximum allowable task latency, and latency-energy consumption optimization weight coefficient; S1.3 Strategy and Model Initialization: Initialize the leader strategy space at the RSU end, including the range of publishable edge resource utilization, service pricing and resource allocation strategies, and initialize the Actor network, dual Critic network and target network parameters of the SGA-SAC algorithm; Initialize the follower strategy space at the IV end, including the value range and initial value of task offloading rate and local resource utilization. S1.4 Security and Monitoring Configuration: Establish a vehicle-to-infrastructure two-way authentication and key exchange mechanism, deploy local log modules at the IV and RSU ends, and configure a periodic reporting mechanism for critical operational data.

3. The method for task offloading and resource collaborative optimization in vehicle networking according to claim 1, characterized in that, Step S2 specifically includes: S2.1 Task Generation: In each time slot t, each IV generates a computation task, which includes task data size, computational complexity, computing power requirement coefficient, and maximum allowable delay characteristic parameters; S2.2 Channel and Interference Awareness: IV and RSU measure large-scale and small-scale fading of the channel and calculate real-time channel gain; estimate the current link interference power based on the signals of surrounding transmitters, and calculate the V2R uplink transmission rate and R2R direct transmission rate according to Shannon's formula; S2.3 State Construction and Constraint Preprocessing: The IV construction includes the historical value of the offload rate, the local resource utilization rate, the channel state, and the local state vector of its own private type; the RSU construction includes the resource allocation strategy, the transmit power, the channel state between RSUs, and the local state vector of its own private type; at the same time, the basic feasibility of the task is verified, and the exception handling process is triggered for infeasible tasks.

4. The method for task offloading and resource collaborative optimization in vehicle networking according to claim 1, characterized in that, Step S3 specifically includes: S3.1 Leader Policy Release: For each time slot t, the policy announcement regarding the edge resource utilization, service pricing, and resource allocation rules of the RSU-generated time slot is broadcast encrypted to all IVs within the coverage area via control signaling; S3.2 Follower Optimal Response Solution: After receiving the RSU policy announcement, the IV generates an optimal task offloading rate and local resource utilization decision that satisfies the maximum task delay constraint through the local Actor network based on its own local state vector. S3.3 Offload Request Interaction and Resource Confirmation: The IV sends an offload request containing the task ID, the proposed offload ratio, and the expected bandwidth to the target RSU. After the RSU completes the request validity verification, it allocates uplink bandwidth and edge computing resource share to the IV based on the current resource occupancy and sends a confirmation message to the IV. S3.4 Parallel task execution: Based on the confirmed offload rate, the IV uploads the task data to be offloaded to the RSU via the V2R link, while simultaneously performing the computation of the remaining tasks locally in parallel; after receiving the task data, the RSU completes edge task processing through the VEC server; S3.5 Mobility Adaptation and Task Result Feedback: If the IV leaves the current RSU coverage area before the task processing is completed, the original RSU forwards the intermediate task results to the target RSU where the vehicle enters through the R2R link to complete the task relay processing; after the edge computing is completed, the RSU sends the processing results to the IV, the IV merges the local and edge computing results, completes the full task processing, and releases the occupied local and edge resources.

5. The method for task offloading and resource collaborative optimization in vehicle networking according to claim 1, characterized in that, Step S4 specifically includes: S4.1 Energy Consumption Calculation: Calculate the energy consumption of IV local computing, RSU edge processing, and V2R and R2R link transmission separately, and sum them to obtain the total energy consumption of a single task; S4.2 Latency Quantization Calculation: The maximum parallel value of local computation latency, transmission latency, and edge processing latency is used as the total processing latency of a single task; S4.3 System Objectives and Constraints Verification: Based on the delay-energy consumption weighting coefficient, calculate the global optimization objective value of the system within the time slot; at the same time, verify the upper and lower limits of transmit power, the maximum delay of the task, and the range of decision variable values. For tasks that violate the constraints, add the corresponding penalty term to the reward function.

6. The method for task offloading and resource collaborative optimization in vehicle networking according to claim 1, characterized in that, In step S5, the training and game-solving process of the SGA-SAC algorithm specifically includes: S5.1 Reward Function Design: Define an immediate reward function for IV that includes latency, energy consumption, and timeout penalties; define a discounted cumulative reward function for RSU based on the long-term returns of all IVs within the coverage area; S5.2 Follower Subgame Optimization: Given the RSU leader policy, each IV performs policy updates through the local Actor network and the dual Critic network to solve the Bayesian optimal response policy under the corresponding private type; S5.3 Leader Strategy Optimization: RSU-based IV-based policy response mapping aims to maximize long-term cumulative returns by optimizing resource allocation and service deployment strategies while meeting the physical constraints of edge computing resources and transmission power. S5.4 Layered Iterative Training: Initialize the experience replay pool, temperature parameters, and training hyperparameters. In each training cycle, collect system interaction states, actions, rewards, and next state samples and store them in the experience replay pool. Randomly sample small batches of samples to calculate the soft Bellman objective, complete the update of the dual Critic network, Actor network, and temperature parameters, and perform soft updates on the target network. S5.5 Graph Attention Encoding: At the input end of the Actor network, query, key, and value tensors are generated through linear mapping, attention weights between agents are calculated, and context feature representations are aggregated to achieve modeling of dependencies between multiple agents and dynamic focusing of key environmental information; S5.6 Equilibrium Verification: By statistically analyzing the stability of the follower strategy distribution and the convergence of the leader's long-term returns, the existence and uniqueness of the Bayesian Stackelberg equilibrium of the system are verified.

7. The method for task offloading and resource collaborative optimization in vehicle networking according to claim 1, characterized in that, In step S6, the decision interpretability analysis specifically involves: fixing the target decision output for the trained Actor and Critic networks, calculating the importance weights of the input features through gradient backpropagation, generating a class activation heatmap and a linearly normalized feature importance vector, realizing the visualization and quantitative analysis of the agent's unloading decision basis, and forming an auditable decision interpretation report.

8. The method for task offloading and resource collaborative optimization in vehicle networking according to claim 1, characterized in that, In step S6, the fault tolerance handling specifically includes: ① Delay timeout handling: When the total task delay exceeds the maximum allowable delay, a local rollback strategy is triggered to reduce the task offload rate, prioritize the completion of the remaining tasks locally, and record the timeout event; ② Link interruption handling: When the V2R or R2R communication link is disconnected, the RSU saves the task status and intermediate results, and completes the task relay execution in a nearby RSU after the link is restored; ③ Insufficient energy handling: When the remaining power of the IV is lower than the preset threshold, the offload and resource allocation strategy is automatically adjusted to reduce the energy consumption of local computing and transmission; ④ Security event handling: When authentication failure or data tampering risk occurs, communication is immediately terminated, a security log is recorded, and the information is reported to the background management unit.

9. The method for task offloading and resource collaborative optimization in vehicle networking according to claim 1, characterized in that, Step S6 further includes: the system periodically reports local operation logs to the central server for offline model retraining, fault backtracking, and patent implementation effect verification; iterative optimization of the model is completed through offline simulation and A / B testing, and online model updates are completed after evaluation and compliance. At the same time, a model rollback mechanism is set to ensure system operation stability.

10. A vehicle-to-everything (V2X) task offloading and resource collaborative optimization system, characterized in that, The system is used to execute the vehicle network task offloading method according to any one of claims 1-9, and the system includes a vehicle network communication network module, a roadside edge computing node module, and a global control and management module; The vehicle-to-everything (V2X) communication network module includes multiple intelligent vehicle nodes, which are used to generate computing tasks, perform local computing, initiate task offloading requests, and interact with the roadside edge computing node module through wireless communication links. The roadside edge computing node module is a roadside unit (RSU) deployed with edge computing services and resource scheduling units. It is used to receive vehicle unloading tasks, perform edge computing, publish leader game strategies, and complete task relay and resource coordination among multiple RSUs. The global control and management module is used to maintain the global status information of the system and perform global resource coordination among multiple RSUs, model training and management, log auditing and anomaly alarm functions.

Citation Information

Patent Citations

  • Digital twin migration method and terminal in vehicle edge computing network

    CN118510054A

  • Reliable unloading optimization method of vehicle edge calculation and network based on self-learning

    CN119012281A

  • Vehicle edge calculation predictive task unloading method and system and storage medium

    CN119767358A