A collaborative task offloading method for vehicle-road cooperative edge computing scenarios

By constructing a two-layer game-theoretic multi-agent collaborative task offloading method in the vehicle-road cooperative edge computing scenario, the problem of the separation between task offloading decision and resource allocation in the existing technology is solved. It realizes efficient distributed decision-making in a highly dynamic environment, taking into account both system efficiency and individual fairness, and meets the dynamic needs of the Internet of Vehicles.

CN123124019APending Publication Date: 2026-11-17BEIJING JIAOTONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611231612.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-14
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

In vehicle-road cooperative edge computing scenarios, existing methods handle task offloading decisions and the allocation of various underlying resources in a fragmented manner. Moreover, most of them rely on the premise of idealized global state knowledge and centralized coordination, which cannot adapt to the highly dynamic and rapidly changing vehicle network environment. This results in delayed decision information and high signaling overhead, making it difficult to balance the overall system efficiency and individual fairness.

Method used

A multi-agent cooperative task offloading method based on two-layer game theory is constructed. Through the solution algorithm of multi-agent cooperative task offloading based on two-layer game theory, a two-layer decision model based on policy-value network is designed. The RSU acts as the leader to formulate resource allocation strategy, and the vehicle acts as the follower to adjust offloading decisions and transmission power. The BLMAPPO algorithm is used for training to realize distributed intelligent cooperative offloading.

Benefits of technology

It achieves efficient multi-agent collaboration by relying only on local observations, reduces decision latency and interaction overhead, balances global system computation efficiency with individual service fairness, and meets the millisecond-level dynamic decision-making requirements of the Internet of Vehicles.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123124019A_ABST
    Figure CN123124019A_ABST
Patent Text Reader

Abstract

This invention discloses a collaborative task offloading method for vehicle-road cooperative edge computing scenarios, belonging to the field of vehicle-road cooperative task offloading. The method includes: determining a vehicle set and a roadside unit set; constructing a task and decision model based on the vehicle set and roadside unit set; modeling latency and energy consumption under local computing mode and offloading computing model respectively based on the task and decision model to obtain the local computing model and the offloading computing model; constructing a roadside unit-side optimization subproblem with the objective of maximizing the number of effective services; constructing a vehicle-side optimization subproblem with the objective of minimizing weighted energy consumption; and solving the roadside unit-side optimization subproblem and vehicle-side optimization subproblem based on a two-layer game-theoretic multi-agent collaborative task offloading solution algorithm to obtain the task offloading decision. This invention solves the problems of existing methods where task offloading decision-making is separated from the underlying allocation of various resources, and most rely on idealized global state knowledge and centralized coordination premises.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of vehicle-road cooperative task offloading, and particularly relates to a collaborative task offloading method for vehicle-road cooperative edge computing scenarios. Background Technology

[0002] With the increasing intelligence and computing power intensity of in-vehicle applications, offloading computationally intensive and latency-sensitive tasks to roadside units or nearby cooperating vehicles using in-vehicle edge computing technology has become a core solution to overcome the upper limit of single-vehicle hardware computing power. However, the vehicle-road cooperative environment has complex characteristics such as high coupling of computing / communication resources, rapid changes in network topology, and independent interests of multiple participating entities. Existing research on resource scheduling and task collaboration in highly dynamic scenarios has evolved from centralized static optimization to data-driven intelligent decision-making, and then to multi-entity non-cooperative game-theoretic collaboration.

[0003] (1) Centralized offloading scheduling based on non-machine learning Early research primarily explored theoretical lower bounds for system energy efficiency and latency optimization under static or quasi-static channel assumptions. Task offloading and resource allocation are typically modeled as highly nonconvex mixed-integer nonlinear programming problems. To overcome the complexity of high-dimensional solutions, researchers often employ problem relaxation, variable decoupling, or metaheuristic algorithms for approximate approximation. For example, one existing technique compares the convergence performance of heuristic algorithms such as simulated annealing and particle swarm optimization in reducing the joint cost of the system; another technique addresses the pain point of asymmetric multi-objective optimization of latency and energy consumption by designing a decomposition-based multi-objective evolutionary algorithm to search for the Pareto optimal front. To alleviate the high signaling overhead of centralized solutions, one existing technique uses Lagrange dual decomposition to transform discrete offloading decisions into continuous convex optimization problems, achieving partially decentralized resource allocation.

[0004] However, the centralized theory relies on obtaining globally perfect prior information about the network. In vehicle-to-everything (V2X) networks where high-speed vehicle movement leads to rapid changes in channel states, the massive computational complexity and extremely long iteration time of centralized algorithms cannot meet the millisecond-level dynamic decision-making requirements of services such as autonomous driving.

[0005] (2) Dynamic Cooperative Unloading Mechanism Based on Deep Reinforcement Learning To overcome the high latency bottleneck of online mathematical optimization solutions, Dynamic Reinforcement Learning (DRL) has been widely adopted in this field. With increasing node density, single-agent DRL faces severe challenges from environmental non-stationarity, leading to the increasing prevalence of Multi-Agent Reinforcement Learning (MARL) and distributed architectures. Existing technologies include: a distributed collaborative framework based on MARL; the introduction of federated learning and counterfactual baseline evaluation mechanisms; a hierarchical multi-agent proximal policy optimization mechanism; the demonstration of the necessity of hierarchical reinforcement learning; the construction of a global memory pool sharing policy using blockchain; a fully distributed asynchronous decision-making mechanism; and the extension of intelligent offloading to air-ground collaborative networks.

[0006] While MARL significantly improves online inference efficiency, most models implicitly assume perfect cooperation among nodes and unconditional sharing of state information. In today's highly competitive connected vehicle world, this black-box decision-making mechanism not only lacks rigorous theoretical fairness guarantees but also fails to accurately reflect the goals of different types of entities.

[0007] (3) Asymmetric conflict of interest scheduling based on game theory To address the prevalent selfishness and resource competition among entities in vehicle-road cooperative systems, academia has introduced non-cooperative game theory and bi-level optimization theory to characterize the hierarchical decision-making logic of both supply and demand sides. One existing technology constructs a bi-level decision-making model; another models task offloading as a Stackelberg game and provides a Nash equilibrium proof; another models offloading decisions as a repeated unknown game; another constructs an intelligent offloading equilibrium framework based on MDP; and yet another employs exact potential game theory to introduce a collaborative offloading mechanism among edge servers.

[0008] However, existing game theory models typically assume that participants possess perfect rationality and global information awareness. Solving for equilibrium requires high-frequency interaction with the global network state, real-time computational needs, and even payoff preference functions. In real-world, highly dynamic open road networks, this mechanism, heavily reliant on global information sharing, leads to extremely high signaling overhead and network congestion, and rapid channel changes cause significant delays in decision-making information. Furthermore, under actual local observation conditions, vehicles cannot directly achieve an ideal global Nash equilibrium through classical game theory.

[0009] While existing research has achieved significant results in resource scheduling, intelligent decision-making, and multi-agent optimization, core issues remain: task offloading decisions and the fragmented handling of various underlying resource allocations, largely relying on idealized global state knowledge and centralized coordination. In highly dynamic vehicle-road cooperative scenarios characterized by rapid topological changes and a lack of perfect global information, the core constraint for large-scale vehicle-to-everything (V2X) applications lies in overcoming the inherent barriers of communication bandwidth, edge computing power, and storage resources. This requires designing efficient multi-agent cooperation mechanisms that balance overall system efficiency with individual fairness, while relying solely on local node perception.

[0010] Furthermore, as the number of vehicle tasks increases and the data volume of individual tasks grows, the computing power of a single vehicle becomes insufficient to meet business demands and generates higher energy consumption. By deploying MEC servers in roadside units (RSUs), on-board edge computing provides an effective way to process vehicle tasks locally. However, in actual vehicle-road cooperative scenarios, the dynamic changes in the vehicle network topology and high-concurrency requests from multiple vehicles can easily lead to scheduling conflicts due to the limited computing resources of the RSU; concurrent wireless transmission in local areas can also introduce co-channel interference, causing the offloading performance of a single vehicle to be coupled with the decisions of other users.

[0011] Meanwhile, different entities in vehicle-road cooperative networks have different optimization objectives: vehicle users tend to minimize their own energy consumption while meeting latency constraints; RSUs, on the other hand, need to maximize the overall effective task throughput of the system. This conflict between individual and system optimization objectives makes it difficult for traditional centralized optimization methods to balance fairness and efficiency. Therefore, designing an efficient cooperative task offloading and resource management mechanism in an environment with dynamic topology changes, limited resources, and conflicting interests is a current challenge that needs to be addressed. Summary of the Invention

[0012] To address the aforementioned shortcomings in existing technologies, this invention provides a collaborative task offloading method for vehicle-road cooperative edge computing scenarios. This method solves the problem that existing methods often rely on idealized global state knowledge and centralized coordination as prerequisites for task offloading decisions and the allocation of various underlying resources.

[0013] To achieve the aforementioned objectives, the present invention employs the following technical solution: a collaborative task offloading method for vehicle-road cooperative edge computing scenarios, comprising: Determine the vehicle set and the roadside unit set; Based on the vehicle set and the roadside unit set, a task and decision model is constructed. The task and decision model is used to describe the task characteristics generated by each vehicle in the time slot, the vehicle's unloading decision on the task, and the unloading assignment decision of the task to the roadside unit. Based on the task and decision model, latency and energy consumption are modeled under the local computing mode and the offloaded computing model respectively, resulting in the local computing model and the offloaded computing model. To maximize the number of effective services, an optimization subproblem is constructed at the roadside unit level. With the goal of minimizing weighted energy consumption, a vehicle-side optimization subproblem is constructed. A multi-agent collaborative task offloading solution algorithm based on two-layer game theory is used to solve the optimization sub-problems at the roadside unit end and the vehicle end, and to obtain the task offloading decision.

[0014] Furthermore, the expression for the task and decision model is:

[0015]

[0016]

[0017]

[0018] in, For vehicles Generated tasks eigenvectors of triples; For vehicles Generated tasks The computational complexity; For vehicles Generated tasks The size of the input data; For vehicles Generated tasks Maximum allowable completion time constraint; For vehicles The generated task set; For vehicles Generated tasks The binary unloading indicator variable is 1, indicating that the vehicle... Select the uninstall computing mode, task The data will be transmitted to the roadside unit for execution; a value of 0 indicates the vehicle... Select local computing mode, task Executed only on the vehicle-mounted terminal; To unload the assigned variable, when the vehicle The task Uninstall to If the value is 1, then the value is 0; otherwise, the value is 0. For roadside units ; This is a set of roadside units.

[0019] Furthermore, the expression for the local computing model is:

[0020]

[0021]

[0022] in, For vehicles Generated tasks Processing latency generated in local computing mode; For vehicles Generated tasks Local queuing latency in local computing mode; For vehicles Generated tasks The computational complexity; For vehicles Generated tasks The size of the input data; This refers to the local CPU's computing frequency. For the vehicle at the current moment The amount of computational work backlogged in the local queue; For vehicles Generated tasks Energy consumption during execution in local computing mode; This refers to the effective energy consumption coefficient of the automotive chip.

[0023] Furthermore, the expression for the unloading calculation model is:

[0024]

[0025]

[0026]

[0027]

[0028] ,

[0029]

[0030] in, For vehicles For the task Total latency during uninstallation; For roadside units; For roadside unit sets; To unload the assigned variable, when the vehicle The task Uninstall to If the value is 1, then the value is 0; otherwise, the value is 0. For roadside units ; For vehicles Select the task Uninstall to The total delay of a single unloading process; For vehicles The task Uninstall to Transmission delay; for Processing tasks Edge computing latency; For vehicles Generated tasks The size of the input data; For vehicles and Uplink transmission rates between them are achievable. For bandwidth; For vehicles The transmission power; For vehicles Towards Channel gain when transmitting data; for The power of the additive white Gaussian noise at the receiving end; for The received vehicle Additional cumulative interference power; For vehicle users; For vehicles Generated tasks The binary unloading indicator variable is 1, indicating that the vehicle... Select the uninstall computing mode, task The data will be transmitted to the roadside unit for execution; a value of 0 indicates the vehicle... Select local computing mode, task Executed only on the vehicle-mounted terminal; For vehicles The transmission power; For vehicles Towards Channel gain when transmitting data; for The waiting time at the terminal; For vehicles Generated tasks The computational complexity; for Upon receiving the task After the data, for the task The frequency of calculations allocated; for The maximum calculation frequency; For vehicles For the task Total energy consumption during unloading; For vehicle users The task Uninstall to Transmission energy consumption.

[0031] Furthermore, the expression for the roadside unit-end optimization subproblem is:

[0032]

[0033] in, for Upon receiving the task After the data, for the task The frequency of calculations allocated; For roadside units; For roadside unit sets; for All vehicles within the coverage area are unloaded to The sum of tasks; For vehicle users; For vehicles The generated task set; To unload the assigned variable, when the vehicle The task Uninstall to If the value is 1, then the value is 0; otherwise, the value is 0. For vehicles Select the task Uninstall to The total delay of a single unloading process; For vehicles Generated tasks Maximum allowable completion time constraint; This represents the maximum computing power of the physical hardware of the roadside unit.

[0034] Furthermore, the expression for the vehicle-side optimization subproblem is:

[0035]

[0036]

[0037] in, For vehicles Generated tasks The binary unloading indicator variable is 1, indicating that the vehicle... Select the uninstall computing mode, task The data will be transmitted to the roadside unit for execution; a value of 0 indicates the vehicle... Select local computing mode, task Executed only on the vehicle-mounted terminal; To unload the assigned variable, when the vehicle The task Uninstall to If the value is 1, then the value is 0; otherwise, the value is 0. For vehicles The transmission power; For vehicles The generated task set; For vehicles Complete the task The actual total energy consumption; For vehicles Generated tasks Energy consumption during execution in local computing mode; For vehicles For the task Total energy consumption during unloading; For vehicles Complete the task The actual total delay; For vehicles Generated tasks Processing latency generated in local computing mode; For vehicles For the task Total latency during uninstallation; For vehicles Generated tasks Maximum allowable completion time constraint; This refers to the maximum rated power of the equipment. For roadside units; This is a set of roadside units.

[0038] Furthermore, the multi-agent cooperative task offloading solution algorithm based on two-layer game theory adopts a two-layer decision model architecture; the upper-layer decision model includes a roadside unit central agent; the lower-layer decision model includes several vehicle agents; both the roadside unit central agent and each vehicle agent adopt a policy-value network structure. The central intelligent agent of the roadside unit is used to observe the global state. Based on the current policy, the network outputs a resource allocation weight vector. The global state includes the local states of each vehicle; the expression for the local state of each vehicle is:

[0039] in, For vehicles in the current time slot The local state; The number of tasks generated in the current time slot; For vehicles Generated tasks The computational complexity; For vehicles Generated tasks The size of the input data; For vehicles Generated tasks Maximum allowable completion time constraint; For vehicles in the current time slot Locally available computing frequencies; For vehicles in the current time slot Average channel gain between the communicating roadside unit and the communicationable roadside unit; Each of the aforementioned vehicle intelligent agents is used to allocate resource weight vectors. As environmental features, enhanced state vectors are constructed by incorporating them into local observations through vector concatenation. Based on these enhanced state vectors, local control actions are generated using the policy network of the vehicle agent. These local control actions include unloading decisions. Transmission power Roadside unit selection preferences .

[0040] Furthermore, the solution of the roadside unit-side optimization sub-problem and the vehicle-side optimization sub-problem specifically includes: Offline training is performed on the roadside unit central agent and each vehicle agent to obtain the trained roadside unit central agent and each vehicle agent. Based on the trained side-side unit central agent and each vehicle agent, the roadside unit-side optimization sub-problem and the vehicle-side optimization sub-problem are solved to obtain the task offloading decision.

[0041] Furthermore, the offline training process specifically includes: Set the maximum number of training epochs, the maximum time step T per training epoch, the PPO update epochs K, the batch size, and the learning rate. Discount Factor And generalized advantage estimation smoothing factor ; Initialize the policy-value network parameters of the roadside unit central agent, the policy-value network parameters of each vehicle agent, the experience replay buffer of the roadside unit central agent, and the experience replay buffer of each vehicle agent; roadside unit central agent In the current training round, initialize the environment and obtain the initial global state; At the current time step of the current training round Based on the global state at the current time step, the resource allocation weight vector is output using the policy network of the roadside unit central agent. For each vehicle intelligent agent, based on the resource allocation weight vector The corresponding enhanced state vector is obtained, and in each vehicle agent, the enhanced state vector is used as input to obtain the local control action of each vehicle using the policy network. Execute joint actions ( , { }), get the current time step The reward and the global and local states of the next time step; } represents the set of local control actions for each vehicle intelligent agent; Generate global trajectory data and local trajectory data The global trajectory data is stored in the experience playback buffer of the roadside unit central agent, and the local trajectory data is stored in the experience playback buffer of the corresponding vehicle agent. For the current time step The global state; For the current time step Global rewards; This represents the global state at the next time step. For the current time step vehicle The enhanced state vector; For the current time step vehicle Local control actions; For the current time step vehicle Local rewards; For the next time step vehicle The enhanced state vector; After completing the execution of T time steps in the current training round, the generalized advantage estimate is calculated based on the data in each experience replay buffer; based on the batch size, small batches of data are sampled from each experience replay buffer for K consecutive rounds, and the policy-value network parameters of the corresponding agent are updated according to each small batch of data and the generalized advantage estimate. Clear the data in each experience replay buffer and proceed to the next training round.

[0042] Furthermore, the expressions for the global reward and the local reward are:

[0043] in, For vehicle users; For vehicles The task success indicator function shows that the total latency is less than the maximum tolerable latency. If the value is 1, then the value is 0; otherwise, the value is 0. The basic revenue earned for successfully servicing a vehicle; Discount factor; For vehicles The time-saving gain; Incentives for resource utilization; Penalty for resource overflow;

[0044] in, For vehicles Basic rewards for completing the task; To unload reward weights; For vehicles Uninstall reward items; For vehicles The actual total energy consumption; For vehicles The actual total delay; Energy consumption weighting; For time delay weights.

[0045] The beneficial effects of this invention are as follows: It models the multi-vehicle cooperative task offloading problem in vehicle-road cooperative edge computing scenarios, establishes a complete system communication and computing model including local computing and offloading computing, fully considers wireless channel interference and computing resource constraints, constructs a reliability assessment mechanism, and overcomes the shortcomings of fragmented processing of task offloading and resource allocation. Addressing the hierarchical decision-making relationship and differentiated optimization objectives between the RSU and vehicle users, the task offloading process is modeled as a Markov-Stackelberg game. The RSU, as the Leader, formulates a resource pre-allocation strategy, and vehicle users, as Followers, adjust offloading decisions and transmission power, overcoming the lack of fairness guarantees in the MARL's fully cooperative assumption. A two-layer multi-agent near-end policy optimization (BLMAPPO) algorithm is designed, introducing roadside resource allocation information into the vehicle-side decision-making process through a state enhancement mechanism. This achieves distributed intelligent cooperative offloading while relying only on local observations, overcoming the shortcomings of game theory methods that rely on global information and have high signaling overhead. This paper utilizes the PPO-Clip update mechanism to improve the training stability of multi-agent systems, coordinating the service objectives of the roadside system with the individual objectives of vehicle users during interactive training. This balances global computational efficiency with fairness in individual services, enhancing training stability and overcoming the convergence limitations of existing methods. A centralized training and distributed execution (CTDE) architecture is adopted. During the training phase, global state guides policy optimization, while during the execution phase, each agent relies only on local observations for decision-making. This reduces interaction overhead and decision latency, meeting the millisecond-level dynamic decision-making requirements of vehicle-to-everything (V2X) networks. Attached Figure Description

[0046] Figure 1 This is a flowchart of the method of the present invention.

[0047] Figure 2 This is a schematic diagram illustrating the unloading of cooperative tasks in vehicle-road cooperation according to an embodiment of the present invention.

[0048] Figure 3 This is a schematic diagram of the BLMAPPO solution framework in an embodiment of the present invention.

[0049] Figure 4 This is a schematic diagram illustrating user energy consumption analysis in a typical scenario according to an embodiment of the present invention.

[0050] Figure 5 This is a schematic diagram illustrating user latency analysis in a typical scenario according to an embodiment of the present invention.

[0051] Figure 6 This is a schematic diagram illustrating the task unloading rate analysis in a typical scenario according to an embodiment of the present invention.

[0052] Figure 7 This is a schematic diagram illustrating user energy consumption analysis under different numbers of users in an embodiment of the present invention.

[0053] Figure 8This is a schematic diagram illustrating user latency analysis under different numbers of users in an embodiment of the present invention.

[0054] Figure 9 This is a schematic diagram illustrating the task unloading rate analysis under different numbers of users in an embodiment of the present invention.

[0055] Figure 10 This is a schematic diagram illustrating user energy consumption analysis under different RSU numbers in an embodiment of the present invention. Detailed Implementation

[0056] The specific embodiments of the present invention are described below to enable those skilled in the art to understand the present invention. However, it should be understood that the present invention is not limited to the scope of the specific embodiments. For those skilled in the art, various changes are obvious as long as they are within the spirit and scope of the present invention as defined and determined by the appended claims. All inventions utilizing the concept of the present invention are protected.

[0057] like Figure 1 As shown, in one embodiment of the present invention, a collaborative task offloading method for vehicle-road cooperative edge computing scenarios includes the following steps: Step 1: Build task and decision models.

[0058] Assuming vehicle user The computational task arrives in time according to the parameter. The Poisson process, i.e., the average number of tasks arriving per unit time is To facilitate discretization analysis, let the duration be... time slot Inside, vehicle Number of randomly generated tasks Follow the mean The Poisson distribution. Each arriving task Its attributes can be represented by a triplet feature vector. Characterization:

[0059] in, (Computational Intensity): Represents the number of CPU cycles (unit: Hz / bit) required to process a unit of data bit, reflecting the computational complexity of the task. (Data Scale): Indicates the amount of input data for the task (unit: bits), which directly determines the transmission latency and computational load. (Time Delay Constraint): Indicates the maximum allowed completion time delay constraint for the task (unit: s), that is, the task must be completed within this time threshold, otherwise it is considered a processing failure. :vehicle A randomly generated set of tasks. :vehicle In the time slot A randomly generated set of tasks.

[0060] For each task, the vehicle user needs to make an unloading decision. Define a binary unloading indicator variable. :when When this occurs, it indicates that the vehicle has selected the unloading calculation mode, and the task will be transferred to the Roadside Unit (RSU) for execution. When the vehicle selects local computing mode, the task is executed only on the in-vehicle terminal.

[0061] Furthermore, after a vehicle selects to unload, the specific unloading target RSU needs to be determined. Define a binary unloading assignment variable. :when When, it indicates the vehicle The task Uninstall to (Roadside unit) ),otherwise .

[0062] Since each task can only choose one processing method at a time, and if unloading is chosen, only one RSU must be connected, the decision variables must satisfy the following coupling constraints:

[0063] in, This is a set of roadside units.

[0064] Step 2: Construct a computational model.

[0065] Based on task and decision models, mathematical models are performed on latency and energy consumption under local computing and offloaded computing modes, respectively.

[0066] (1) Local computing model.

[0067] When vehicle users Decide to process the task locally (Right now When the task is performed, it primarily consumes the CPU resources of the onboard terminal. Given the task data volume... With calculation intensity The total number of CPU cycles required for the task is The processing delay caused by local computation. It can be represented as:

[0068] in, It is the local queuing latency of the task. This represents the amount of computational tasks currently backlogged in the local queue. This refers to the amount of computational tasks that the onboard equipment can process per unit of time.

[0069] Since vehicle users incur energy consumption (unit: J) when performing local calculations, let... The effective power consumption coefficient of the automotive chip (unit: J / Hz, depends on the chip architecture and effective switched capacitors) is then used for local task execution. energy consumption Defined as the product of energy consumption per cycle and the total number of cycles, i.e.: .

[0070] (2) Unloading calculation model.

[0071] When vehicle users Decide to execute the uninstallation policy (i.e.) When performing a task, the process includes two main stages: uplink wireless transmission and edge computing.

[0072] ①Uplink transmission and interference analysis.

[0073] In a vehicle-road cooperative network, it is assumed that all vehicles and RSUs share the same radio frequency band (bandwidth is...). When the vehicle Towards When transmitting data, its communication quality depends not only on its own transmission power. With channel gain It will also be subject to co-frequency interference from other vehicles carrying out unloading and transmission within the same coverage area.

[0074] According to Shannon's theorem, vehicles and Uplink transmission rate between them can reach Represented as:

[0075] In the formula, This represents the power of the additive white Gaussian noise at the receiving end. It covers the effects of path loss and small-scale fading. express Received from the user The cumulative interference power other than that. Since the interference originates only from vehicles that have also made an unload decision and are in the transmit state within the current time slot, the interference term is defined as follows:

[0076] The formula introduces the unloading variable. Accurately reflects the dynamic coupling characteristics of network interference environment: only when At that time, the vehicle That would interfere with the network. For vehicle users; For vehicles The transmission power; For vehicles Towards Channel gain when transmitting data; Based on transmission rate Vehicle users The task Uninstall to Transmission delay It can be represented as: ; Corresponding transmission power consumption It can be represented as: .

[0077] ② Edge computing stage Upon receiving the task After obtaining the data, the task is scheduled according to its resource scheduling strategy. Assignment calculation frequency ,but Edge computing latency for processing this task It can be represented as:

[0078] in, This represents the maximum calculation frequency. yes The waiting time at the terminal.

[0079] In summary, when vehicle users Select the task Uninstall to At that time, the total delay of a single unloading process Total energy consumption They can be represented as:

[0080]

[0081] Combined with unload assignment variables Vehicle users For the task Final total latency during uninstallation Total energy consumption This can be represented by iterating through all candidate RSUs as follows: ; .

[0082] Step 3: Model the multi-objective optimization problem of unloading vehicle-road cooperative tasks.

[0083] Due to the highly dynamic and heterogeneous nature of vehicular edge network environments, RSUs and vehicle users face complex resource competition during task offloading. On one hand, roadside units, as service providers, strive to improve overall service throughput and resource utilization; on the other hand, vehicle users, as service consumers, prioritize low latency constraints while minimizing their own energy consumption. This difference in objectives between service supply and consumption leads to multi-dimensional conflicts of interest in optimization.

[0084] (1) Optimize target conflict analysis and problem decomposition.

[0085] Based on the construction of task and decision models and computational models, it can be seen that the vehicle-road cooperative task offloading scenario is a typical complex system with multiple users, multiple servers, and limited resources (such as...). Figure 2 (As shown). When formulating an unloading strategy, we face multi-dimensional resource competition and target conflicts, mainly reflected in the following three aspects: The coupling between offloading decisions and communication resources: Any user's offloading decisions and power control will change the system interference environment and affect the transmission performance of other users.

[0086] The asymmetry of supply and demand of computing resources: MEC servers have limited resources when facing high concurrency requests. A large number of users offloading to the same RSU at the same time can lead to queuing congestion or even task failure.

[0087] The diversity and conflict of optimization objectives: vehicles aim to minimize individual energy consumption, while RSUs aim to maximize system throughput, and the two are mutually restrictive.

[0088] Therefore, this is a process that includes uninstallation decisions. , As discrete variables and power Resource allocation This invention addresses the mixed-integer nonlinear programming (MINLP) problem, which is a continuous variable problem. To reduce the solution complexity of this MINLP while considering both overall efficiency and individual vehicle user experience, this invention decomposes the optimization problem into two sub-problems for modeling and solving: Roadside optimization issues: Focus on maximizing service capacity under resource constraints, i.e., improving the service rate of task unloading; User-side optimization problems focus on optimizing individual performance under distributed decision-making, i.e. minimizing energy consumption while satisfying constraints.

[0089] (2) Modeling the maximization of effective service numbers at the roadside end.

[0090] In vehicle-road cooperative edge computing systems, the RSU, as the provider of edge computing services, aims to maximize the overall service throughput of the vehicle network system within its limited computing resources. Since the RSU's computing capacity (CPU frequency) is constrained by its own hardware physical characteristics, it needs to formulate reasonable resource allocation strategies to maximize the number of successfully serviced offloading tasks when facing concurrent offloading requests from multiple users.

[0091] definition for Total number of successfully accepted and processed uninstallation tasks. Based on the uninstallation assignment variable. ,Will This indicates that all vehicle users within the coverage area will be able to uninstall to [the specified method / system]. The sum of tasks: ; Considering service performance, the optimization objective of the roadside unit is modeled as maximizing the total number of service tasks across all RSUs. However, pursuing service quantity must be predicated on meeting the user's Quality of Service (QoS), meaning that accepted tasks must be guaranteed to be completed within the maximum latency tolerance. Therefore, the optimization problem at the roadside unit... It can be formally described as follows:

[0092] The constraints not only reflect physical limitations but also ensure service quality: Constraint C1 (Delay Constraint): This means that for any offloading task accepted by RSU, its total processing delay should be strictly less than or equal to the task's maximum delay tolerance threshold. If a computational task fails to meet this constraint, it should be considered an unloading failure by the RSU, and the RSU should not accept the task.

[0093] Constraint C2 (Computational Capacity Constraint): This means that the sum of the computational frequencies allocated to all concurrent tasks by each RSU cannot exceed the maximum computational capacity of its physical hardware. This is the core hard constraint of resource allocation, which determines the upper limit of concurrent services of RSU.

[0094] (3) Weighted energy consumption minimization modeling for vehicle users.

[0095] Unlike roadside systems that prioritize throughput, vehicle users, as rational decision-makers, primarily aim to minimize their energy consumption to extend equipment runtime while meeting task latency requirements.

[0096] Based on the computational model, combining local computation and offloading computation modes, vehicle users Complete the task Actual total delay Total energy consumption This can be achieved by introducing unloading decision variables. To use a unified expression:

[0097]

[0098] The above formula shows that when When, only locally generated latency and energy consumption are calculated; when When that happens, the transmission and edge processing overhead caused by unloading is calculated.

[0099] Vehicle users need to jointly optimize unloading decisions. RSU selection and uplink transmit power This is to minimize its own energy consumption. This is a user-side optimization problem. It can be modeled as:

[0100] question Essentially, this is a multi-user distributed optimization problem, where each vehicle user solves independently to minimize their own objective function. The specific physical meaning of each constraint is explained below: Constraint C1 (Delay Constraint): This is a hard constraint for task processing. Regardless of whether the vehicle chooses local computation or offload computation, the final completion time of the task must be within the deadline. Otherwise, the strategy is ineffective.

[0101] Constraint C2 (Power Limitation Constraint): Limits the transmit power of the vehicle's wireless transmitter. The maximum rated power of the equipment must not be exceeded. It complies with the hardware specifications of vehicle-mounted terminals.

[0102] Constraint C3 (Decision Consistency Constraint): This equality constraint establishes the unloading decision. With RSU assignment The logical relationship between them. It ensures that the vehicle decides to unload the task if and only if... When selecting an RSU, one and only one must be chosen. If you choose to connect, you can do so; otherwise, if you choose local computing, you will not establish a connection with any RSU.

[0103] Constraints C4 and C5 (discrete variable constraints): define the binary integer property of the optimization variables, indicating that this is a combinatorial optimization problem.

[0104] In optimizing the problem In this context, the optimization variables include discrete binary variables. , and continuous variables Meanwhile, the objective function and constraints include logarithmic functions (transmission rate formula) and fractional forms, and the decisions of different users are coupled together through a common-channel interference term. Therefore, This is a typical MINLP problem. Such problems are usually non-convex and have been proven to be NP-hard problems, which are difficult to solve directly using traditional convex optimization methods (such as gradient descent and Lagrange multiplier method).

[0105] Step 4: Algorithm for solving multi-agent cooperative task unloading based on two-layer game theory.

[0106] The two optimization sub-problems constructed ( and This problem involves discrete unloading decision variables and continuous power control variables, and the communication interference between users leads to a highly non-convex and strongly coupled objective function, making it a typical MINLP problem. Given the instantaneous changes in the vehicle-to-everything (V2X) environment, traditional centralized convex optimization algorithms struggle to find the global optimum within a finite time and are unsuitable for non-cooperative game relationships among multiple users.

[0107] To address the aforementioned challenges, a MARL-based solution scheme is proposed. First, considering the dominant role of the Resource Provider Allocation Unit (RSU) in resource allocation and the response characteristics of vehicle users, the original optimization problem is modeled as a Markov-Stackelberg game. In this model, the RSU, acting as the leader, formulates a resource pre-allocation strategy, and vehicle users, acting as followers, adjust their unloading decisions accordingly. Subsequently, to achieve efficient solution of game equilibrium in a high-dimensional continuous action space, a multi-agent cooperative proximal policy optimization algorithm based on a two-layer game theory approach is designed. Through state enhancement mechanisms and two-layer interactive training, the algorithm jointly optimizes system performance and individual user experience.

[0108] (1) Construction of the Markov-Stackelberg game model.

[0109] To solve the aforementioned two-level optimization problem, it is modeled as a multi-agent partially observable Markov decision process (POMDP) ​​based on a master-slave game. In this process, the RSU acts as the leader, possessing a global perspective and prioritizing the formulation of computational resource allocation strategies; vehicle users, as followers, formulate offloading decisions and power control strategies based on their own task attributes and the observed RSU resource allocation schemes. This game model mainly consists of three parts: a state space, an action space, and a reward function.

[0110] ①State space.

[0111] State reflects the dynamic characteristics of the vehicle-to-everything (V2X) environment. Due to the mobility of vehicles and the time-varying nature of channels, state is defined as... A collection of environmental characteristics at any given moment.

[0112] Global state For the RSU acting as the leader, its goal is to optimize global unloading efficiency; therefore, it observes global state information. The global state consists of the set of local state features of all vehicle users, i.e. .

[0113] Local state For vehicle users The observed state includes both its own task attributes and network environment characteristics. Specifically, the local state Defined as a six-tuple:

[0114] in, This indicates the number of tasks generated in the current time slot; and These represent the data volume (bit) and computational intensity (Hz / bit) of the task, respectively. This represents the maximum latency tolerance for the task. This represents the vehicle's current locally available computing frequency. This represents the average channel gain between the vehicle and the surrounding RSUs.

[0115] Follower enhanced state Following the decision-making sequence of Stackelberg games, when the Follower (vehicle user) outputs actions through the policy network, it depends not only on its own local state. Furthermore, it allows observation of the resource weights the Leader (RSU) intended to allocate to it in the previous stage. Therefore, the Follower's input state is expanded to... ,in It is an RSU for vehicles Resource allocation weights.

[0116] ② Action space.

[0117] Action space defines the controllable variables for both sides in a game at the decision-making moment.

[0118] Leader Actions The task of RSU is to pre-allocate computing resources. Its action is defined as a continuous vector, representing the weight matrix of the RSU cluster's allocation of computing resources to all vehicle users within its coverage area. This weight, after normalization, determines the allocation of resources to each vehicle. Calculation frequency Size.

[0119] Follower action Vehicle user actions involve both discrete and continuous variables, specifically consisting of three parts: Uninstallation decision : A binary variable representing whether a task is unloaded (in continuous control, this is the unloading probability); Transmit power : Transmit power control variable when the vehicle is transmitting uplink; RSU selection preference : The probability distribution vector of a vehicle selecting a target server among multiple RSUs.

[0120] ③ Reward function.

[0121] The design of the reward function directly determines the optimization direction of the agent. A multi-objective weighted approach is used to construct the reward mechanism in order to solve the trade-off between latency, energy consumption and success rate.

[0122] Vehicle user rewards The goal of vehicle users is to minimize energy consumption while meeting latency constraints. Therefore, the reward function consists of three parts: a completion reward, an energy consumption penalty, and a latency penalty.

[0123] in, Vehicle users The task success indicator function shows that the total latency is less than the maximum tolerable latency. If the value is 1, then the value is 0; otherwise, the value is 0. For vehicle users Basic rewards for completing the task; To unload reward weights; For vehicle users Uninstall reward items; and For vehicle users The actual energy consumption and time delay generated; Energy consumption weighting; This is used for latency weighting. When a task fails, the vehicle will receive a negative penalty to guide the agent to learn a strategy that satisfies latency constraints.

[0124] Roadside Unit Rewards As a service provider, the RSU's goal is to maximize resource utilization and improve overall service throughput. Its reward function is defined as:

[0125] in, It is the basic benefit gained from successfully serving a user; This is a latency gain that saves users, reflecting RSU's contribution to improving user experience; Incentives are provided to encourage RSUs to make full use of computing resources; As a resource overflow penalty, a severe penalty is imposed when the total weights allocated by RSUs exceed their physical capacity limits, thereby forcing RSUs to learn legitimate resource allocation strategies.

[0126] This reward design ensures that vehicles pay attention to their own energy consumption, while guiding the rational allocation of global resources through the RSU system rewards, ultimately achieving a balance between individual interests and system efficiency at the Stackelberg equilibrium point.

[0127] (2) BLMAPPO algorithm design process and complexity analysis.

[0128] To address the challenges of hierarchical decision-making and continuous action space optimization in vehicle-road cooperative edge computing, a solution architecture based on two-layer multi-agent proximal policy optimization is proposed. This architecture maps the Markov-Stackelberg game model to a two-layer reinforcement learning task, and achieves Nash equilibrium convergence in the master-slave game by introducing a state enhancement mechanism and a truncated trust domain policy gradient algorithm.

[0129] ① A solution architecture based on multi-agent proximal policy optimization (BLMAPPO framework).

[0130] The core of the BLMAPPO framework lies in explicitly modeling the decision dependencies between the Leader and Followers. Unlike the parallel decision-making model of traditional MARL, this architecture designs a two-layer interaction mechanism with causal relationships.

[0131] The two-layer decision-making model is divided into two decision planes: an upper layer and a lower layer. The upper layer consists of the RSU central agent, whose goal is to optimize the pre-allocation strategy of computing resources based on the global network state to maximize overall throughput and resource utilization. The lower layer consists of multiple isomorphic vehicle agents, whose goal is to optimize the offloading ratio, transmit power, and access node selection based on their own local state perception and RSU decisions, in order to minimize individual latency and energy consumption costs. At any given moment, the two-layer interaction process is as follows: Upper-level decision-making: RSU agent observes the global state. Based on the current strategy Output resource allocation weight vector .

[0132] Lower-level state enhancement: To enable lower-level agents to make optimal responses to upper-level policies, this architecture introduces a state enhancement mechanism. This involves enhancing the response of lower-level agents to RSU actions. As an additional environmental feature, it is incorporated into the vehicle through vector concatenation operations. In local observations, construct an enhanced state vector .

[0133] Lower-level response: Vehicle agent based on enhanced state Utilizing its policy network Generate local control actions Includes uninstallation decisions ,power wait.

[0134] Based on the above interaction logic, the designed BLMAPPO solution framework is as follows: Figure 3 As shown in the diagram, the complete data flow from RSU global decision-making to vehicle state enhancement and then to PPO truncation update is clearly illustrated. The BLMAPPO framework aims to maximize the cumulative expected return of a two-layer agent through a parameterized policy network. For the upper-layer RSU and the lower-layer vehicle... Their optimization objectives are defined as follows:

[0135] in, The optimization objective for the upper-level RSU; The optimization goal for the lower-level vehicles; and This represents the parameters of the upper and lower layer policy networks. As a discount factor, For sampling interaction trajectories; For RSU strategy The expected value of the generated trajectory distribution is calculated, which represents the return as a statistical average of all trajectories sampled from the policy. For vehicle strategy The expected value of the generated trajectory distribution is calculated, which represents the return as a statistical average of all trajectories sampled from the policy. Rewards for roadside unit agents; For vehicles The reward; The maximum time step for a training round; For the current time step Local control actions for each vehicle.

[0136] ② Network structure design and update rules.

[0137] To achieve stable and efficient policy search in a continuous action space, the proposed BLMAPPO architecture employs an Actor-Critic policy-value network structure and constructs a stochastic policy based on a Gaussian distribution. Each agent (RSU or vehicle) contains two core neural networks: an Actor network and a Critic network.

[0138] Policy Network: Responsible for establishing the mapping from state to action distribution. Considering that power control and resource allocation are both continuous variables, the Actor network does not directly output deterministic action values, but rather outputs Gaussian distributed statistical parameters. Let the input state be... The Actor network extracts features through an MLP and then outputs an action mean vector using fully connected layers. and standard deviation vector Specific actions Obtained through reparameterized sampling:

[0139] in, The noise sampling vector introduced for the reparameterization technique; It follows a multivariate standard normal distribution; It follows a multivariate standard normal distribution.

[0140] For discrete actions of the vehicle agent, the network outputs selection probabilities through the Sigmoid or Softmax function.

[0141] Value network: responsible for estimating the value function of the current state. This is used to evaluate the quality of actions and reduce the variance of policy gradients. The network structure employs a fully connected feedforward neural network, outputting a scalar value estimate.

[0142] To address the training oscillations caused by the difficulty in determining the step size in traditional policy gradient algorithms, BLMAPPO introduces the PPO mechanism.

[0143] Generalized dominance estimation: First, the time series difference error is calculated using a Critic network. And based on this, the generalized dominance function is calculated. To achieve a balance between bias and variance: ,

[0144] in, It is the smoothing factor for GAE; For single-step instant rewards; Discount factor; For the next time step state Status valuation; To determine the state at the current time step Status valuation; To move backward Timing difference error after step.

[0145] Policy network update: Define the probability ratio of the old and new policies as... ; For the new strategy to be updated; The old policy used for sampling trajectories. To limit the policy update magnitude, a clipped surrogate objective function is introduced. :

[0146] in, The function limits the probability ratio to Within the interval, This is a hyperparameter. The objective function ensures that policy iterations always remain within the trust domain, avoiding performance collapse caused by excessive importance sampling weights.

[0147] Value Network Update: Critic Network Parameters Update by minimizing the mean squared error between the predicted value and the target return:

[0148] in, The value network loss function; To calculate the expected value for samples across all time steps; For Critic value network.

[0149] Based on the above network structure and parameter update mechanism, the proposed two-layer multi-agent proximal policy optimization algorithm adopts the idea of ​​CTDE architecture and solves the Markov-Stackelberg game equilibrium through two-layer interaction and alternating update.

[0150] In terms of complexity, the original problem and It also includes unloading decision variables. RSU assignment variables Transmission power and computing power allocation variables and transmission rate There are interfering items caused by the unloading behavior of other vehicles. Therefore, the original problem is not a simple continuous optimization problem, but a MINLP problem with discrete decision-making, continuous control, non-convex functions, and multi-user coupling constraints. Let the total number of tasks in the current time slot be... Each task can be directly searched locally or unloaded to... If there are 1 RSUs, then the size of the discrete unloading and assignment combination is approximately In each combination, further solutions are needed for power control and computational resource allocation. The computational load increases rapidly with the number of vehicles, RSUs, and tasks, making it difficult to meet the requirements for rapid decision-making in vehicle-road cooperative scenarios.

[0151] The BLMAPPO approach used in this application does not change the complexity of the original problem. Instead, it transforms the joint optimization into offline training and online inference through two-layer game modeling and RL approximation. In the two-layer structure, the upper-layer RSU is based on the global state. Output resource pre-allocation action The main overhead comes from global state construction, Actor network forward propagation, and value function estimation; lower-level vehicles are based on the enhanced state. Output vehicle actions This includes offloading decisions, RSU selection preferences, and transmit power. Let the state dimension be... Action dimension is The parameter size of a single Actor-Critic network is Then the cost of policy forward propagation within a single time step can be approximately expressed as: Meanwhile, environmental feedback requires calculating link speed, task latency, energy consumption, and reward functions. Interference calculation involves the mutual influence of multiple workshops, and the calculation typically involves… to The magnitude of the overhead depends on whether interfering vehicles within the same RSU coverage area are screened.

[0152] The computational load during the training phase mainly consists of trajectory sampling and multiple rounds of PPO updates. Let the maximum number of training rounds be... The number of time steps per round is The PPO update round is Batch size is Therefore, the trajectory sampling phase needs to complete an RSU decision and... The complexity of a vehicle decision is approximately This incurs additional overhead from environmental state transitions, reward calculations, and experience storage. During the parameter update phase, the temporal difference error needs to be calculated based on buffer samples. and generalized advantage estimation This part is approximately linearly correlated with the sampling trajectory length; subsequently, the RSU and vehicle Actor / Critic networks were analyzed respectively. The main computational cost of each mini-batch update is as follows: Since PPO pruning requires calculating the probability ratio of the old and new policies and performing truncation target optimization, its training cost is higher than that of a single policy gradient update, but it can improve the stability of the multi-agent training process.

[0153] During the online execution phase, the trained BLMAPPO does not need to be resolved in each time slot. and Instead of addressing the MINLP problem in the standard implementation, this approach directly calls the pre-trained policy network's output for resource pre-allocation, offloading decisions, RSU selection, and power control based on the current observation state. In this case, the main computational load comes from the forward propagation of the Actor network, which is approximately [amount missing]. No longer need to The BLMAPPO performs an enumeration search for various unloading combinations. Therefore, BLMAPPO's complexity advantage mainly lies in shifting the high-overhead policy search to the offline training stage and replacing direct optimization with neural network inference during online deployment, thereby reducing the real-time decision-making overhead in dynamic vehicle-road cooperative task unloading scenarios.

[0154] The parameters in the experimental environment were set according to the urban scenario and channel model in the 3GPP TR 36.885 standard, as shown in Table 1.

[0155] Table 1 Experimental Environment Parameter Settings

[0156] This embodiment selects MAPPO, SAC, IDQN, and TD3 as comparison baselines. MAPPO is a PPO-based multi-agent method using the CTDE framework; SAC is the maximum entropy stochastic Actor-Critic method; IDQN is an independent Q-learning baseline; and TD3 is a deterministic policy gradient algorithm. Through the above comparisons, the performance of BLMAPPO can be verified from the dimensions of multi-agent cooperation, continuous control, independent decision-making, and two-layer cooperation.

[0157] Figure 4 The results show that BLMAPPO experiences a brief spike in the early stages of training, followed by a rapid decline and stabilization at a low energy consumption level, outperforming other algorithms. MAPPO exhibits convergence lag, SAC and IDQN show significant fluctuations, and TD3 remains energy-intensive. Figure 5 The results show that BLMAPPO latency decreases rapidly and remains in a low range; MAPPO exhibits non-monotonic variation, SAC and IDQN show local fluctuations, and TD3 latency optimization capability is limited. Figure 6The data shows that the BLMAPPO unloading rate initially decreased but then rapidly increased and stabilized at a high level; MAPPO required more rounds to converge, SAC and IDQN were generally low, and the TD3 unloading rate remained low for a long time. These three indicators suggest that BLMAPPO does not reduce energy consumption by decreasing unloading, but rather controls energy consumption and latency while maintaining a high unloading rate, demonstrating the coordination effect between the roadside and vehicle-side systems.

[0158] Figure 5 The changes in user latency over training rounds are shown in typical scenarios. User latency includes local computation latency, uplink transmission latency, and edge computation latency. BLMAPPO initially shows high latency, which then rapidly decreases and remains low, indicating that after exploration, it gradually avoids high-latency offloading strategies and learns appropriate RSU access targets, transmit power, and offloading ratios. MAPPO is initially low, then rises and gradually falls back. This non-monotonic change indicates that when the algorithm more aggressively chooses offloading to reduce local pressure, increased queuing at the RSU end and wireless transmission contention lead to increased latency in the mid-term, and the latency decreases after the strategy stabilizes. SAC and IDQN exhibit local fluctuations, reflecting their insufficient adaptability to dynamic interference and task contention environments. TD3 maintains a high latency level in the later stages, indicating that its latency optimization capability is limited when facing a mixed decision-making problem involving offloading decisions, RSU selection, and power control.

[0159] Figure 6 The changes in offload rate over training rounds are shown in typical scenarios. The offload rate reflects the service capacity of the RSU for vehicle tasks; a higher value indicates a higher proportion of offload tasks completed by the system. BLMAPPO initially experienced a significant decrease followed by a rapid increase, then stabilized at a high level: in the early stages of training, vehicle decision-making and RSU resource pre-allocation were not yet stable, and some tasks failed due to latency exceeding limits or unreasonable resource allocation; after policy updates, RSU could allocate computing resources more rationally, and vehicles could adjust their offload behavior according to resource status, significantly improving the service rate. MAPPO remained low for a long time before rapidly increasing, indicating that more rounds are needed to learn an effective collaborative strategy. While SAC and IDQN showed some improvement, their overall performance was lower than BLMAPPO and exhibited more significant fluctuations. TD3's offload rate remained low for a long time, offering limited improvement to the success rate. Figure 7 and Figure 4 , Figure 5 Complementary: BLMAPPO does not reduce energy consumption by reducing offloading tasks, but rather controls energy consumption and latency while maintaining a high offloading service rate, reflecting the coordination effect between the roadside and the vehicle side.

[0160] Figure 7 The results show that as the number of vehicles increases, the energy consumption of most algorithms rises, while BLMAPPO maintains the lowest energy consumption across all scales. Figure 8The results show that BLMAPPO latency remains at a low level; MAPPO is unstable at different scales, and SAC and IDQN exhibit policy fluctuations. Figure 9 The results show that the unloading rate of each algorithm decreases as the number of vehicles increases, while BLMAPPO maintains the highest unloading rate and the smallest decrease across all scales. Considering all three indicators, BLMAPPO demonstrates good overall adaptability to scaling.

[0161] Figure 8 The data shows the changes in user latency under different numbers of vehicles. As the number of vehicles increases, BLMAPPO latency generally increases but remains at a low level, indicating that while task contention, interference, and RSU queuing pressure can increase completion time, BLMAPPO can maintain controllable latency under high load through RSU resource pre-allocation and vehicle offloading response. MAPPO first decreases and then increases, rebounding after 160 vehicles, indicating that its balance between offloading ratio and resource contention is not stable under different scales: when there are fewer vehicles, the edge computing benefits of offloading are significant, and latency may decrease; as the number of vehicles increases, RSU queuing and channel contention intensify, and latency increases accordingly. SAC increases significantly as the number of vehicles increases, then decreases in the later stages, possibly related to a shift to a more conservative offloading strategy (relying more on local computation) under higher loads, but combined with... Figure 9 Its offloading service rate is still significantly lower than BLMAPPO, which does not necessarily indicate superior overall performance. The overall decrease in IDQN latency is related to its lower offloading rate and greater reliance on local processing. TD3's latency spiked significantly around 140 vehicles before leveling off, indicating strong policy fluctuations with scale changes. Latency metrics need to be interpreted in conjunction with offloading rate and energy consumption; the merits of an algorithm cannot be judged solely based on a local decrease in a single curve.

[0162] Figure 9 The changes in task offloading rate are shown under different vehicle numbers. With increasing vehicle numbers, the offloading service rates of BLMAPPO, MAPPO, SAC, and IDQN all show a downward trend, consistent with the characteristics of resource-constrained systems: more tasks simultaneously compete for RSU computing resources and uplink radio channels, and some tasks fail due to unmet latency constraints or insufficient resource allocation. BLMAPPO maintains the highest offloading service rate and the smallest decrease across all scales, indicating its effective coordination of RSU-side computing resources and vehicle-side offloading requests in high-load scenarios. MAPPO's significant decrease with increasing vehicle numbers suggests that the lack of a two-layer master-slave interaction structure makes it more susceptible to resource contention under high-concurrency tasks. SAC and IDQN have generally low offloading rates, indicating that these two algorithms offer limited improvement to system service capabilities in multi-agent task offloading scenarios. TD3 shows an increase in the 100-140 vehicle range followed by a stable low level, possibly related to its strategy adjustments under different loads, but its overall offloading rate is significantly lower than other algorithms, and this local increase cannot be interpreted as superior service capability. Figure 7 and Figure 8 Although BLMAPPO's energy consumption and latency increased after the number of vehicles increased, it still maintained a high unloading service rate, indicating that it has good overall adaptability under scale expansion.

[0163] Figure 10 This figure illustrates the changes in user energy consumption under different numbers of RSUs. Increasing the number of RSUs means more roadside computing resources and selectable access nodes, theoretically reducing transmission pressure from vehicles to RSUs and edge computing queuing pressure. BLMAPPO generally shows a downward trend, indicating that the newly added RSU resources are well utilized, and energy consumption is reduced through more reasonable resource pre-allocation and access selection. However, energy consumption increases slightly when the number of RSUs increases from 4 to 5, possibly related to the expanded action selection space and readjustment of resource allocation strategies after the addition of RSUs, but this does not change the overall low-energy-consumption trend. MAPPO first rises and then falls, indicating a lag in the utilization of new resources: increasing RSUs does not necessarily lead to a decrease in energy consumption. If vehicle unloading decisions and RSU resource allocation are not adjusted synchronously, uneven access selection or local resource competition may occur. SAC first decreases and then slightly rebounds, IDQN fluctuates less overall but has relatively high energy consumption, and TD3 remains at a high energy consumption level with local increases followed by a decline. This figure shows that increasing the number of RSUs can improve system resource supply, but whether the algorithm can effectively utilize these resources still depends on its joint decision-making ability regarding vehicle task requirements, channel states, and RSU load. Figure 10 This only shows the impact of the number of RSUs on user energy consumption; the impact on latency and offload rate needs to be further determined through subsequent experiments.

[0164] Based on the simulations above, BLMAPPO achieves a relatively balanced effect among user energy consumption, latency, and offloading rate. Its advantages are reflected in its collaborative performance under multiple constraints: it maintains low energy consumption, controllable latency, and a high offloading rate even when competition intensifies due to an increase in the number of vehicles; and it effectively utilizes roadside resources even when the number of RSUs changes. Incorporating RSU resource pre-allocation and vehicle offloading decisions into a two-layer collaborative framework helps alleviate target conflicts and resource competition problems.

Claims

1. A method for offloading collaborative tasks in a vehicle-road cooperative edge computing scenario, characterized in that, include: Determine the vehicle set and the roadside unit set; Based on the vehicle set and the roadside unit set, a task and decision model is constructed. The task and decision model is used to describe the task characteristics generated by each vehicle in the time slot, the vehicle's unloading decision on the task, and the unloading assignment decision of the task to the roadside unit. Based on the task and decision model, latency and energy consumption are modeled under the local computing mode and the offloaded computing model respectively, resulting in the local computing model and the offloaded computing model. To maximize the number of effective services, an optimization subproblem is constructed at the roadside unit level. With the goal of minimizing weighted energy consumption, a vehicle-side optimization subproblem is constructed. A multi-agent collaborative task offloading solution algorithm based on two-layer game theory is used to solve the optimization sub-problems at the roadside unit end and the vehicle end, and to obtain the task offloading decision.

2. The collaborative task offloading method for vehicle-road cooperative edge computing scenarios according to claim 1, characterized in that, The expression for the task and decision model is: in, For vehicles Generated tasks eigenvectors of triples; For vehicles Generated tasks The computational complexity; For vehicles Generated tasks The size of the input data; For vehicles Generated tasks Maximum allowable completion time constraint; For vehicles The generated task set; For vehicles Generated tasks The binary unloading indicator variable is 1, indicating that the vehicle... Select the uninstall computing mode, task The data will be transmitted to the roadside unit for execution; a value of 0 indicates the vehicle... Select local computing mode, task Executed only on the vehicle-mounted terminal; To unload the assigned variable, when the vehicle The task Uninstall to If the value is 1, then the value is 0; otherwise, the value is 0. For roadside units ; This is a set of roadside units.

3. The collaborative task offloading method for vehicle-road cooperative edge computing scenarios according to claim 1, characterized in that, The expression for the local computing model is: in, For vehicles Generated tasks Processing latency generated in local computing mode; For vehicles Generated tasks Local queuing latency in local computing mode; For vehicles Generated tasks The computational complexity; For vehicles Generated tasks The size of the input data; This refers to the local CPU's computing frequency. For the vehicle at the current moment The amount of computational work backlogged in the local queue; For vehicles Generated tasks Energy consumption during execution in local computing mode; This is the effective energy consumption coefficient of the automotive chip.

4. The collaborative task offloading method for vehicle-road cooperative edge computing scenarios according to claim 1, characterized in that, The expression for the unloading calculation model is: , in, For vehicles For the task Total latency during uninstallation; For roadside units; For roadside unit sets; To unload the assigned variable, when the vehicle The task Uninstall to If the value is 1, then the value is 0; otherwise, the value is 0. For roadside units ; For vehicles Select the task Uninstall to The total delay of a single unloading process; For vehicles The task Uninstall to Transmission delay; for Processing tasks Edge computing latency; For vehicles Generated tasks The size of the input data; For vehicles and Uplink transmission rates between them are achievable. For bandwidth; For vehicles The transmission power; For vehicles Towards Channel gain when transmitting data; for The power of the additive white Gaussian noise at the receiving end; for The received vehicle Additional cumulative interference power; For vehicle users; For vehicles Generated tasks The binary unloading indicator variable is 1, indicating that the vehicle... Select the uninstall computing mode, task The data will be transmitted to the roadside unit for execution; a value of 0 indicates the vehicle... Select local computing mode, task Executed only on the vehicle-mounted terminal; For vehicles The transmission power; For vehicles Towards Channel gain when transmitting data; for The waiting time at the terminal; For vehicles Generated tasks The computational complexity; for Upon receiving the task After the data, for the task The frequency of calculations allocated; for The maximum calculation frequency; For vehicles For the task Total energy consumption during unloading; For vehicle users The task Uninstall to Transmission energy consumption.

5. The collaborative task offloading method for vehicle-road cooperative edge computing scenarios according to claim 1, characterized in that, The expression for the roadside unit end optimization subproblem is: in, for Upon receiving the task After the data, for the task The frequency of calculations allocated; For roadside units; For roadside unit sets; for All vehicles within the coverage area are unloaded to The sum of tasks; For vehicle users; For vehicles The generated task set; To unload the assigned variable, when the vehicle The task Uninstall to If the value is 1, then the value is 0; otherwise, the value is 0. For vehicles Select the task Uninstall to The total delay of a single unloading process; For vehicles Generated tasks Maximum allowable completion time constraint; This represents the maximum computing power of the physical hardware of the roadside unit.

6. The collaborative task offloading method for vehicle-road cooperative edge computing scenarios according to claim 1, characterized in that, The expression for the vehicle-side optimization subproblem is: in, For vehicles Generated tasks The binary unloading indicator variable is 1, indicating that the vehicle... Select the uninstall computing mode, task The data will be transmitted to the roadside unit for execution; a value of 0 indicates the vehicle... Select local computing mode, task Executed only on the vehicle-mounted terminal; To unload the assigned variable, when the vehicle The task Uninstall to If the value is 1, then the value is 0; otherwise, the value is 0. For vehicles The transmission power; For vehicles The generated task set; For vehicles Complete the task The actual total energy consumption; For vehicles Generated tasks Energy consumption during execution in local computing mode; For vehicles For the task Total energy consumption during unloading; For vehicles Complete the task The actual total delay; For vehicles Generated tasks Processing latency generated in local computing mode; For vehicles For the task Total latency during uninstallation; For vehicles Generated tasks Maximum allowable completion time constraint; This refers to the maximum rated power of the equipment. For roadside units; This is a set of roadside units.

7. The collaborative task offloading method for vehicle-road cooperative edge computing scenarios according to claim 1, characterized in that, The multi-agent cooperative task offloading solution algorithm based on two-layer game theory adopts a two-layer decision model architecture; the upper-layer decision model includes a roadside unit central agent; the lower-layer decision model includes several vehicle agents; both the roadside unit central agent and each vehicle agent adopt a policy-value network structure. The central intelligent agent of the roadside unit is used to observe the global state. Based on the current policy, the network outputs a resource allocation weight vector. The global state includes the local states of each vehicle; the expression for the local state of each vehicle is: in, For vehicles in the current time slot The local state; The number of tasks generated in the current time slot; For vehicles Generated tasks The computational complexity; For vehicles Generated tasks The size of the input data; For vehicles Generated tasks Maximum allowable completion time constraint; For vehicles in the current time slot Locally available computing frequencies; For vehicles in the current time slot Average channel gain between the communicating roadside unit and the communicationable roadside unit; Each of the aforementioned vehicle intelligent agents is used to allocate resource weight vectors. As environmental features, enhanced state vectors are constructed by incorporating them into local observations through vector concatenation. Based on these enhanced state vectors, local control actions are generated using the policy network of the vehicle agent. These local control actions include unloading decisions. Transmission power Roadside unit selection preferences .

8. The collaborative task offloading method for vehicle-road cooperative edge computing scenarios according to claim 7, characterized in that, The solution of the roadside unit-side optimization sub-problem and the vehicle-side optimization sub-problem specifically includes: Offline training is performed on the roadside unit central agent and each vehicle agent to obtain the trained roadside unit central agent and each vehicle agent. Based on the trained side-side unit central agent and each vehicle agent, the roadside unit-side optimization sub-problem and the vehicle-side optimization sub-problem are solved to obtain the task offloading decision.

9. The collaborative task offloading method for vehicle-road cooperative edge computing scenarios according to claim 8, characterized in that, The offline training process specifically involves: Set the maximum number of training epochs, the maximum time step T per training epoch, the PPO update epochs K, the batch size, and the learning rate. Discount Factor And generalized advantage estimation smoothing factor ; Initialize the policy-value network parameters of the roadside unit central agent, the policy-value network parameters of each vehicle agent, the experience replay buffer of the roadside unit central agent, and the experience replay buffer of each vehicle agent; roadside unit central agent In the current training round, initialize the environment and obtain the initial global state; At the current time step of the current training round Based on the global state at the current time step, the resource allocation weight vector is output using the policy network of the roadside unit central agent. ; For each vehicle intelligent agent, based on the resource allocation weight vector The corresponding enhanced state vector is obtained, and in each vehicle agent, the enhanced state vector is used as input to obtain the local control action of each vehicle using the policy network. Execute joint actions ( , { }), get the current time step The reward and the global and local states of the next time step; } represents the set of local control actions for each vehicle intelligent agent; Generate global trajectory data and local trajectory data The global trajectory data is stored in the experience playback buffer of the roadside unit central agent, and the local trajectory data is stored in the experience playback buffer of the corresponding vehicle agent. For the current time step The global state; For the current time step Global rewards; This represents the global state at the next time step. For the current time step vehicle The enhanced state vector; For the current time step vehicle Local control actions; For the current time step vehicle Local rewards; For the next time step vehicle The enhanced state vector; After completing the execution of T time steps in the current training round, the generalized advantage estimate is calculated based on the data in each experience replay buffer; based on the batch size, small batches of data are sampled from each experience replay buffer for K consecutive rounds, and the policy-value network parameters of the corresponding agent are updated according to each small batch of data and the generalized advantage estimate. Clear the data in each experience replay buffer and proceed to the next training round.

10. The collaborative task offloading method for vehicle-road cooperative edge computing scenarios according to claim 9, characterized in that, The expressions for the global reward and the local reward are: in, For vehicle users; For vehicles The task success indicator function indicates that the total latency is less than the maximum tolerable latency. If the value is 1, then the value is 0; otherwise, the value is 0. The basic revenue earned for successfully servicing a vehicle; Discount factor; For vehicles The time-saving gain; Incentives for resource utilization; Penalty for resource overflow; in, For vehicles Basic rewards for completing the task; To unload reward weights; For vehicles Uninstall reward items; For vehicles The actual total energy consumption; For vehicles The actual total delay; Energy consumption weighting; For time delay weights.