An unmanned aerial vehicle auxiliary-based internet of vehicles task offloading optimization method and system
By constructing a hierarchical optimization framework in the Internet of Vehicles and using dual-deep Q-networks and federated learning, task offloading and caching are optimized, solving the problem of uneven load in the collaborative service between UAVs and roadside units, and improving system efficiency and resource utilization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANDONG NORMAL UNIV
- Filing Date
- 2026-04-30
- Publication Date
- 2026-06-16
AI Technical Summary
Existing technologies lack a global caching and coordination mechanism when drones and roadside units collaborate in the Internet of Vehicles. This leads to dynamic changes in the distribution of service requests caused by the rapid movement of vehicles and uneven load on edge nodes due to the heterogeneity of road traffic density. The system fails to comprehensively consider the multi-dimensional factors in the task unloading process, resulting in low overall system efficiency.
By establishing a joint optimization objective, constructing a hierarchical optimization framework, and employing dual-deep Q-networks and federated learning, the system optimizes task offloading, service caching, computing resource allocation, and UAV trajectories, thereby maximizing overall system performance.
Under latency and resource constraints, we optimize task unloading and caching to improve overall system performance, reduce latency and increase resource utilization, and achieve efficient resource utilization in dynamic environments.
Smart Images

Figure CN122227318A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of vehicle-to-everything (V2X) communication and computing technology, and particularly relates to a method and system for optimizing V2X task offloading based on unmanned aerial vehicle (UAV) assistance. Background Technology
[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.
[0003] With the development of intelligent transportation systems and communication technologies, the demand for low-latency, high-reliability computing and communication services in vehicle-to-everything (V2X) networks is increasing. Mobile edge computing (MEC) effectively alleviates the problem of insufficient local computing power in vehicles by offloading computing tasks to roadside units (RSUs) at the network edge. To further reduce latency, service caching technology has been introduced, pre-storing the programs and data required for tasks in the RSUs. However, fixed RSU deployments are costly, have limited coverage, and are difficult to adapt to the dynamic load changes brought about by the high mobility of vehicles.
[0004] With their flexible deployment capabilities and line-of-sight communication advantages, drones have become an ideal vehicle for expanding edge service coverage. Drones equipped with MEC servers can act as mobile edge nodes, working in conjunction with RSUs to provide services to vehicles.
[0005] Currently, technical solutions for drone-RSU collaborative services face the following problems: Due to the dynamic changes in the distribution of service requests caused by the rapid movement of vehicles, there is a lack of a global caching and coordination mechanism between drones and RSUs. The spatial heterogeneity of road traffic density causes severe uneven load on edge nodes, resulting in existing technical solutions failing to comprehensively consider multiple factors during the task unloading process, further leading to the low overall efficiency of current vehicle networking systems. Summary of the Invention
[0006] To overcome the shortcomings of the prior art, this invention provides a method and system for optimizing vehicle networking task offloading based on unmanned aerial vehicle (UAV) assistance. Under the premise of satisfying task latency and node resource constraints, it jointly optimizes multi-dimensional decision variables to maximize the overall system performance with latency, load balancing and cache hit rate as the core.
[0007] To achieve the above objectives, one or more embodiments of the present invention provide the following technical solutions: The first aspect of this invention provides a method for optimizing task offloading in vehicle-to-everything (V2X) networks based on drone assistance, comprising: A joint optimization objective is established to maximize the overall system performance; the decision variables of the joint optimization objective include task offloading, service caching, computing resource allocation, and UAV trajectory. A hierarchical optimization framework is constructed, including an upper-layer federated learning server deployed at the base station and a lower-layer dual-deep Q-network agent deployed at each edge node; a local dual-deep Q-network model and a global collaborative optimization model are constructed. Each edge node uses the global collaborative optimization model parameters distributed by the upper layer as initial parameters, trains a local dual-deep Q-network model using locally stored historical interaction data, updates the parameters, and uploads the parameter update to the upper layer; the upper layer aggregates the parameter update, updates the global collaborative optimization model, and redistributes it; the above steps are repeated until the global collaborative optimization model converges. Each edge node uses local observation information as input based on the converged global collaborative optimization model, and outputs and executes the optimal task unloading, service caching, resource allocation, and UAV trajectory decisions.
[0008] As a further technical solution, the overall system performance is defined as a weighted harmonic index of average system service latency, edge node load balancing, and cache hit rate.
[0009] As a further technical solution, the average service latency of the system is calculated as follows: The task completion latency is calculated separately for local execution latency, edge node execution latency, and base station execution latency, depending on the unloading method. The local execution latency includes local computation time. The edge node execution latency includes the transmission time from the vehicle to the edge node, the computation time for querying the edge node's cache, the transmission time between edge nodes, and the task processing time at the edge node. The base station execution latency includes the transmission time from the vehicle to the edge node, the transmission time from the edge node to the base station, and the base station's processing time. The average service latency of the system is the sum of the local execution latency, edge node execution latency, and base station execution latency of all tasks in each time slot, divided by the total number of tasks in that time slot.
[0010] As a further technical solution, the edge node load balancing degree is calculated by the load rate variance of each edge node, where the load rate is the ratio of the actual amount of computing tasks carried by the edge node to the maximum computing resource capacity of the node; and the cache hit rate is the ratio of the number of tasks that the edge node successfully matches the cache and processes directly to the total number of unloaded tasks.
[0011] As a further technical solution, the training process of the local dual-depth Q-network model includes: Initialize the evaluation network and the target network with consistent structures; Construct an experience replay pool to store interaction samples; define the state space, action space, and reward function; The agent selects an action based on the current state using an ε-greedy strategy. After executing the action, it calculates the reward based on the overall system performance and stores the state, action, reward, and interaction samples for the next state. When the number of interactive samples in the experience replay pool reaches a preset threshold, a batch of samples is randomly selected to calculate the loss function for training, updating and evaluating the network parameters. The parameters of the evaluation network are softly updated to the target network, and the process is iterated until the reward function converges.
[0012] As a further technical solution, the state space includes edge node location, current load rate, cache occupancy status, task queue length, remaining drone energy, and relative distance between the vehicle and the edge node; the action space includes task unloading target selection, cache content update, computing resource allocation ratio adjustment, and drone flight direction and speed adjustment; the reward function is positively correlated with the overall system performance, and the higher the overall system performance, the greater the reward.
[0013] As a further technical solution, the optimization process of the global collaborative optimization model includes: The base station acts as a federated learning server, periodically distributing the global parameter vector of the current best global collaborative optimization model to all edge nodes participating in the collaboration; After receiving the global parameter vector, each edge node uses the historical interaction data stored locally as the training set to perform multiple rounds of gradient descent training, adapt to local features, calculate the parameter update amount, and upload it to the base station. The base station collects the parameter updates of all edge nodes, uses a federated average aggregation algorithm to calculate the weighted average global parameter update, updates the global collaborative optimization model, and enters the next distribution cycle to achieve global collaborative optimization.
[0014] A second aspect of the present invention provides a vehicle-to-everything (V2X) task offloading optimization system based on unmanned aerial vehicle (UAV) assistance, comprising: The objective establishment module is configured to: establish a joint optimization objective to maximize the overall system performance; the decision variables of the joint optimization objective include task offloading, service caching, computing resource allocation, and UAV trajectory; The model building module is configured to: build a hierarchical optimization framework, including an upper-layer federated learning server deployed at the base station and a lower-layer dual-deep Q-network agent deployed at each edge node; and build a local dual-deep Q-network model and a global collaborative optimization model. The model optimization module is configured as follows: each edge node uses the global collaborative optimization model parameters distributed by the upper layer as initial parameters, trains a local dual-depth Q network model using locally stored historical interaction data and updates the parameters, and uploads the parameter update amount to the upper layer; the upper layer aggregates the parameter update amounts, updates the global collaborative optimization model and redistributes it; the above steps are repeated until the global collaborative optimization model converges. The action execution module is configured such that each edge node, based on the converged global collaborative optimization model, obtains local observation information as input, outputs optimal task unloading, service caching, resource allocation, and UAV trajectory decisions, and executes them.
[0015] A third aspect of the present invention provides a computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements the steps of a drone-assisted vehicle-to-everything (V2X) task offloading optimization method as described in the first aspect of the present invention.
[0016] The fourth aspect of the present invention provides an electronic device including a memory, a processor, and a program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the unmanned aerial vehicle-to-everything (V2X) task offloading optimization method as described in the first aspect of the present invention.
[0017] The above one or more technical solutions have the following beneficial effects: This invention provides an optimization scheme for vehicle-to-everything (V2X) task offloading based on UAV-assisted collaborative caching in a V2X environment. It defines an evaluation function called system comprehensive performance to reflect the computational status of vehicle tasks at edge nodes. Under latency and energy constraints, the system comprehensive performance is maximized by optimizing task offloading, cache placement, resource allocation, and UAV trajectories. Since the original problem is a mixed-integer nonlinear programming problem, a federated dual-depth Q-network algorithm for UAV collaborative offloading and caching is proposed to address this issue. First, localized training is performed at edge nodes based on the DDQN algorithm to update local model parameters. Then, a federated learning architecture is adopted to aggregate updates from each edge node and construct a globally optimal model to drive the system comprehensive performance to its optimal level. Extensive simulation results verify that the proposed algorithm has good convergence, effectively reduces system latency, and improves resource utilization.
[0018] Advantages of additional aspects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0019] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.
[0020] Figure 1 This is a flowchart of the vehicle network task unloading optimization method in the first embodiment; Figure 2 This is a schematic diagram of the vehicle network task unloading and cache optimization scenario in the first embodiment. Detailed Implementation
[0021] It should be noted that the following detailed descriptions are exemplary and intended to provide further illustration of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0022] It should be noted that the terminology used herein is for the purpose of describing particular implementations only and is not intended to limit the exemplary implementations of the present invention.
[0023] Where there is no conflict, the embodiments and features in the embodiments of the present invention can be combined with each other.
[0024] Research on vehicle-to-everything (V2X) communication and computing has revealed that existing technical solutions still face numerous complex problems: (1) The rapid movement of vehicles causes dynamic changes in the distribution of service requests, and the existing edge caching strategy is difficult to adjust in real time, resulting in a mismatch between cached content and actual needs; (2) The lack of a global cache coordination mechanism between drones and RSUs can easily lead to repeated caching of popular content on multiple nodes or cache gaps in key areas. (3) The spatial heterogeneity of road traffic density leads to severe uneven load on edge nodes. Existing solutions fail to make full use of the maneuverability of UAVs for dynamic task scheduling to balance the load.
[0025] To address the aforementioned issues, this invention proposes a scheme that jointly optimizes task offloading, cache placement, resource allocation, and UAV trajectory. It achieves optimal overall system performance through DDQN and federated learning. Compared to traditional optimization strategies, this invention fully considers the interrelationships between various stages, enabling efficient resource utilization in a dynamic vehicle-to-everything (V2X) environment. Specific embodiments are described below.
[0026] Example 1 like Figure 1 As shown, this embodiment discloses a method for optimizing vehicle-to-everything (V2X) task offloading based on drone assistance, including: Step 1: Establish a joint optimization objective to maximize the overall system performance; the decision variables of the joint optimization objective include task offloading, service caching, computing resource allocation, and UAV trajectory; Step 2: Construct a hierarchical optimization framework, including an upper-layer federated learning server deployed at the base station and a lower-layer dual-deep Q-network agent deployed at each edge node; construct a local dual-deep Q-network model and a global collaborative optimization model; Step 3: Each edge node uses the global collaborative optimization model parameters distributed by the upper layer as initial parameters, trains a local dual-depth Q-network model using locally stored historical interaction data, updates the parameters, and uploads the parameter update amount to the upper layer; the upper layer aggregates the parameter update amounts, updates the global collaborative optimization model, and redistributes it; repeat the above steps until the global collaborative optimization model converges. Step 4: Each edge node uses the converged global collaborative optimization model to obtain local observation information as input, outputs the optimal task unloading, service caching, resource allocation, and UAV trajectory decision, and executes them.
[0027] like Figure 2 The diagram shown illustrates the vehicle-to-everything (V2X) task unloading and caching optimization scenario in this embodiment. Specifically: In step 1, a vehicle-to-everything (V2X) system model is constructed, comprising base stations, multiple roadside units, multiple drones, and multiple vehicles, with roadside units and drones serving as edge nodes. The system acquires information on vehicle-generated tasks, vehicle and edge node location status, network communication status, and edge node cache and load information. The overall system performance is defined as a weighted harmonic metric of average system latency, edge node load balancing, and cache hit rate.
[0028] With the goal of maximizing the overall system performance, a joint optimization objective is established. In this embodiment, the problems of jointly optimizing task offloading decisions, service caching decisions, computing resource allocation decisions, and UAV trajectory planning decisions are formalized into a mixed-integer nonlinear programming problem.
[0029] In this embodiment, the vehicle-to-everything (V2X) system model is assumed to have U unmanned aerial vehicles (UAVs), N roadside units (RSUs), one base station (BS), and V vehicle users. Let U = {1,2,...,U} represent the set of UAVs, N = {1,2,...,N} represent the set of RSUs, M=0 represent the BS, and V = {1,2,...,V} represent the set of vehicle users.
[0030] Furthermore, a discrete time slot model is adopted, which divides the total duration of system operation into several discrete time slots t. The duration of each time slot t is denoted as τ, and the set of time slots is denoted as T = {0,1,2,…,T}. Within each time slot t∈T, the service cache is updated according to the changes in vehicle location and service demand.
[0031] Assume there are S types of tasks generated by vehicles, denoted as S = {1, 2, ..., S}. Each type of task requires a corresponding service cache on the mobile edge computing (MEC) server for computation and processing. Typically, each vehicle user generates only one task of each type within a single time slot. Let... This represents a task generated by vehicle user v in time slot t that requires service type s. The task is modeled as a triple. ,in, Indicates the amount of data for the task. This indicates the number of CPU cycles required to process the data for each task. This indicates the maximum delay time that the task can tolerate.
[0032] The positions of drones, roadside units, and vehicle users in time slot t can be represented as:
[0033] Where H=h represents the flight altitude of the drone, and H=0 represents the altitude of the roadside unit and vehicle user.
[0034] The locations of the vehicle user and the drone are updated in real time. The coordinates of the vehicle user v and the drone u in time slot t+1 can be represented as:
[0035]
[0036] in, , These represent the forward speeds of the drone and vehicle users, respectively. , These indicate the directions for drone and vehicle users, respectively.
[0037] As a further technical solution, to better evaluate the rationality of the optimization of decision variables in the joint optimization objective—task unloading, service caching, computing resource allocation, and UAV trajectory—a target function is designed. The optimization objective is the reciprocal of the weighted average of task completion latency, edge node balance, and cache hit rate. The optimization objective is expressed as:
[0038] St. C1:
[0039] C2:
[0040] C3:
[0041] C4:
[0042] C5:
[0043] C6:
[0044] C7:
[0045] in, Indicates the task completion delay. Describe the load balancing degree of edge nodes. The cache hit rate of edge nodes is represented by O, the load balancing weight factor is W, and the cache hit rate is Z. O represents task offloading decision, W represents service caching decision for edge nodes, Z represents migration decision, C represents computing resource allocation decision for edge nodes, and L represents UAV trajectory planning decision. Constraints include: C1 represents the decision to offload the task to the edge node RSU / UAV: Using binary decision variables Let C1 be used to represent this.
[0046] in, Indicates task It is unloaded to edge node j (RSU or UAV). Indicates task The tasks are handled locally by the vehicle user v, and the service cache required by the vehicle to process its tasks is pre-installed in the onboard unit.
[0047] C2 represents the task migration decision received by the edge node: Using binary decision variables This indicates the task migration strategy for UAV reception in C2.
[0048] in, This indicates that the task of vehicle user v is migrated from UAV u to RSU n in time slot t. This indicates that the task is retained in UAV u and processed.
[0049] Using binary decision variables This indicates the task migration strategy received by the RSU in C2.
[0050] in, This indicates that the task will be migrated from RSU n to BS. This indicates that no migration is performed during the RSU n computation.
[0051] C3 represents the caching decision for the service type.
[0052] Using binary decision variables , Let C3 represent whether the caching service s is cached on the edge node j in time slot t.
[0053] in, This indicates that the service cache of type s is not cached on edge node j. This indicates that the corresponding service cache exists in edge node j.
[0054] C4 represents the computing resources allocated to the edge node. It must not exceed the total computing resources C5 represents the UAV's own energy consumption constraint, real-time energy consumption. Not exceeding its maximum energy budget C6 represents the task computation delay constraint, which is the delay in task completion. Not exceeding the maximum latency that the task can tolerate C7 indicates the storage resource constraint of the edge node; the total amount of various service data cached by the edge node shall not exceed its maximum storage resource capacity. .
[0055] In this embodiment, the task offloading methods include: the vehicle can choose to process the computing task locally or offload it to the RSU for processing. Specifically, there are three categories: The first type is executed locally. If the vehicle's local computing resources meet the task requirements and the execution delay is within the allowable range, then the task is executed locally. The second type of task is offloaded to an edge node (RSU or UAV) within the communication range for execution. If local resources are insufficient, but the UAV within the communication range has sufficient computing and caching resources, the task is offloaded to that UAV for execution. After receiving the task, the UAV first checks its local cache. If the cached data required by the task exists, it immediately performs the computation. If the cache is missing, it attempts to offload the task to a nearby RSU that has the relevant cache for processing. If the RSU has the cached data required by the task, it can process the task directly. The third type of offloading is performed at the base station (BS). Regardless of whether the RSU directly receives tasks as the initial offloading target of the vehicle or receives tasks from the UAV, if it faces cache missing or the current workload exceeds the processing limit, it directly uploads the tasks to the base station (BS) for processing. The BS can provide support for caching all services for the vehicle.
[0056] As a further technical solution, task completion delay Depending on the unloading method, the local execution latency, edge node execution latency, and base station execution latency are calculated separately. Local execution latency includes local computation time; edge node execution latency includes the transmission time from the vehicle to the edge node, the computation time for querying the edge node's cache, the transmission time between edge nodes, and the task processing time at the edge node; base station execution latency includes the transmission time from the vehicle to the edge node, the transmission time from the edge node to the base station, and the base station's processing time. Therefore, the system's average service latency is the sum of the local execution latency, edge node execution latency, and base station execution latency of all tasks in each time slot, divided by the total number of tasks in that time slot. The specific calculation method is as follows:
[0057]
[0058]
[0059] In the formula, This represents the signal-to-noise ratio (SINR) from vehicle v to RSU. Communication between the vehicle and RSU is considered a non-line-of-sight (NLoS) link. This represents the transmission power of vehicle v; Indicates the channel gain for task transmission; This indicates signals transmitted to the RSU from vehicles other than vehicle v. Indicates the vehicle's transmission power. This represents the channel gain from the vehicle to RSUn; This indicates that the distribution of the data received by the RSU is (0, ...). Additive white Gaussian noise; This indicates additional transmission loss caused by obstacles (only present in NLOS links). This represents the signal-to-noise ratio (SINR) from vehicle v to UAV u. Communication between the vehicle and the UAV is considered as a line-of-sight (LoS) link. , This represents the channel gain from the vehicle to the UAVu; This represents additive white Gaussian noise received by the UAV. This represents the signal-to-noise ratio (SINR) from UAVu to RSUn. Communication between UAV and RSU is considered a line-of-sight (LoS) link. This indicates the transmission power of the UAV; This represents the channel gain from UAVu to RSUn.
[0060]
[0061]
[0062]
[0063] In the formula, This represents the channel gain at a reference distance d = 1 m; This represents the Euclidean distance between vehicle user v and RSUn; This represents the coordinates of vehicle v in time slot t; This represents the coordinates of RSUn in time slot t; This represents the Euclidean distance between vehicle user v and RSUn; This represents the coordinates of the UAV in time slot t; This represents the Euclidean distance between UAVu and RSUn.
[0064]
[0065]
[0066]
[0067] In the formula, B represents the transmission rate between vehicle user v and RSUn; B represents the allocated communication bandwidth. This indicates the transmission rate between vehicle user v and UAVu; This indicates the transmission rate between UAVu and RSUn.
[0068] , ,
[0069] In the formula, This represents the transmission time j from vehicle v unloading to the edge node; This represents the transmission rate between vehicle v (unloading) and edge node j. This indicates the transfer time from UAVu to RSUn; This indicates the transfer rate at which the task is offloaded from UAVu to RSUn; Indicates the transmission time of the task from RSUn to BS; This indicates a fixed transmission rate.
[0070]
[0071] In the formula, Introducing binary decision variables To represent the unloading decision, Indicates task It was uninstalled to UAV; This indicates the uplink transmission time from vehicle v to UAVu; This indicates whether the caching service s is cached on UAVu in time slot t. This indicates that the corresponding service cache exists in UAVu; This indicates the computational latency incurred when the task is performed in the UAV; This indicates the computational latency incurred by the task being computed at the BS. Introducing binary decision variables To represent the unloading decision, Indicates task It was unloaded to the RSU; Indicates the uplink transmission time from vehicle v to RSUn; , Let the load rate of the edge nodes (UAV and RSU) be denoted as t when they are operating in time slot t; let the total computing resources of node j be denoted as t, ... Assigned to task The computing resources can be written as ,so , These represent the computing resources allocated to the UAV and the computing resources allocated to the RSU, respectively.
[0072] As a further technical solution, edge node load balancing is calculated using the load rate variance of each edge node. The load rate is the ratio of the actual computing tasks carried by the edge node to the node's maximum computing resource capacity. The specific calculation method for edge node load balancing is as follows:
[0073]
[0074] ,
[0075] in, , These represent the load balancing degree of the drone and the roadside unit, respectively. , Total computing resources for the UAV or RSU representing the vehicle.
[0076] As a further technical solution, the cache hit rate is the ratio of the number of tasks that successfully match the cache and are directly processed by the edge node to the total number of unloaded tasks. The specific calculation method is as follows:
[0077] in, This represents the total number of tasks generated by the vehicle in time slot t.
[0078] Specifically, in step 2, a hierarchical optimization framework is designed. The bottom layer uses a dual-deep Q-network (DDQN) to enable each node to quickly adapt to local dynamics, while the upper layer achieves global collaboration through federated learning. This framework can reduce the average service latency of the system and improve the cache hit rate while satisfying energy and latency constraints. Simultaneously, a local dual-deep Q-network model is built at the lower layer, and a global collaborative optimization model is built at the upper layer.
[0079] Specifically, in step 3, each lower-layer edge node (RSU or UAV) deploys a DDQN algorithm for local training. The agent observes the node's location, load, cache status, task queue, and remaining UAV energy, outputting locally relevant actions (such as task unloading targets, cache placement, and resource allocation proposals), and uses a function related to overall system performance as the reward. It learns locally optimal strategies through interaction with the environment. The DDQN algorithm solves the problems of task unloading, cache placement, resource allocation, and UAV trajectory. UAV trajectory decisions need to consider dynamic changes in vehicle location, edge node load distribution, and its own energy constraints; therefore, the DDQN algorithm learns the optimal flight path to achieve service coverage optimization and load balancing. The specific steps for training the local dual-depth Q-network model are as follows: 1) Initialize a consistent evaluation network and target network (together forming a local dual-depth Q-network model), build an experience replay pool to store interaction samples, and determine the state space, action space, and reward function. The state space includes edge node positions, current load rate, cache occupancy status, task queue length, remaining drone energy, and the relative distance between the vehicle and the edge node; the action space includes task unloading target selection, cache content update, adjustment of computing resource allocation ratio, and adjustment of drone flight direction and speed; the reward function is positively correlated with the overall system performance, the higher the overall system performance, the greater the reward.
[0080] 2) During each training cycle, the agent selects actions based on the current state using an ε-greedy strategy. After execution, it collects task completion time and energy consumption data to calculate rewards and stores the state, actions, rewards, and samples of the next state.
[0081] 3) After the sample size of the experience replay pool reaches the target, batch samples are extracted to train the evaluation network. The error is calculated and the parameters are updated through the loss function. The target network is then softly updated and iterated until the reward function converges.
[0082] The upper layer employs a federated learning framework, continuously optimizing the global collaborative decision-making model through a cyclical mechanism of "distribution-local training-aggregation." The base station, acting as the central server, also uses a federated learning framework. It periodically distributes global model parameters to each edge node; each node fine-tunes the model using local data and then only uploads the updated model parameters; the base station aggregates the updates from all nodes to generate a new generation of a more powerful and better generalized global model, thereby achieving cross-node global cache coordination and load balancing. The specific steps for optimizing the global collaborative decision-making model are as follows: 1) The base station acts as a federated learning server, periodically transmitting the current optimal global model parameter vector to all edge nodes (including RSUs and drones) participating in the collaboration within the network. 2) After receiving the global parameters, each edge node uses its locally stored task interaction history data as the training set to perform multiple rounds of gradient descent training locally. This process aims to adapt the global model to the local features of the area covered by the node (such as vehicle movement patterns and task popularity), and calculate the parameter update amount optimized for local data. Uploaded back to the base station; 3) The base station collects parameter updates uploaded by all nodes and uses a federated average aggregation algorithm to calculate a weighted average of the global parameter updates. This updates the global model, which then enters the next distribution cycle.
[0083] Specifically, in step 4, after model training, the agent obtains local observation information as input. Based on the results of the globally optimal model output, it coordinates the scheduling of task unloading paths, cache placement locations, computational resource allocation ratios, and UAV flight trajectories to ensure maximum overall system efficiency and outputs relevant local actions. The local observation information includes edge node locations, current load rates, cache occupancy status, task queue length, remaining UAV energy, and the relative distance between vehicles and nodes.
[0084] Example 2 This embodiment discloses a vehicle-to-everything (V2X) task offloading optimization system based on drone assistance, including: The objective establishment module is configured to: establish a joint optimization objective to maximize the overall system performance; the decision variables of the joint optimization objective include task offloading, service caching, computing resource allocation, and UAV trajectory; The model building module is configured to: build a hierarchical optimization framework, including an upper-layer federated learning server deployed at the base station and a lower-layer dual-deep Q-network agent deployed at each edge node; and build a local dual-deep Q-network model and a global collaborative optimization model. The model optimization module is configured as follows: each edge node uses the global collaborative optimization model parameters distributed by the upper layer as initial parameters, trains a local dual-depth Q network model using locally stored historical interaction data and updates the parameters, and uploads the parameter update amount to the upper layer; the upper layer aggregates the parameter update amounts, updates the global collaborative optimization model and redistributes it; the above steps are repeated until the global collaborative optimization model converges. The action execution module is configured such that each edge node, based on the converged global collaborative optimization model, obtains local observation information as input, outputs optimal task unloading, service caching, resource allocation, and UAV trajectory decisions, and executes them.
[0085] Example 3 The purpose of this embodiment is to provide a computer-readable storage medium.
[0086] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of a drone-assisted vehicle networking task offloading optimization method as described in Embodiment 1 of this disclosure.
[0087] Example 4 The purpose of this embodiment is to provide an electronic device.
[0088] An electronic device includes a memory, a processor, and a program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps in a drone-assisted vehicle networking task offloading optimization method as described in Embodiment 1 of this disclosure.
[0089] The steps and methods involved in the apparatuses of Embodiments 2, 3, and 4 above correspond to those in Embodiment 1. For specific implementation details, please refer to the relevant description section of Embodiment 1. The term "computer-readable storage medium" should be understood as a single medium or multiple media including one or more instruction sets; it should also be understood as including any medium capable of storing, encoding, or carrying an instruction set for execution by a processor and enabling the processor to perform any of the methods in this invention.
[0090] Those skilled in the art will understand that the modules or steps of the present invention described above can be implemented using general-purpose computer devices. Optionally, they can be implemented using computer-executable program code, thereby allowing them to be stored in a storage device for execution by a computer device, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. The present invention is not limited to any particular combination of hardware and software.
[0091] While the specific embodiments of the present invention have been described above in conjunction with the accompanying drawings, this is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative effort based on the technical solutions of the present invention are still within the scope of protection of the present invention.
Claims
1. A method for optimizing task offloading in vehicle-to-everything (V2X) communication based on drone assistance, characterized in that, include: Establish joint optimization objectives to maximize the overall system effectiveness; The decision variables for the joint optimization objective include task offloading, service caching, computing resource allocation, and UAV trajectory. A hierarchical optimization framework is constructed, including an upper-layer federated learning server deployed at the base station and a lower-layer dual-deep Q-network agent deployed at each edge node; a local dual-deep Q-network model and a global collaborative optimization model are constructed. Each edge node uses the global collaborative optimization model parameters distributed by the upper layer as initial parameters, trains a local dual-deep Q-network model using locally stored historical interaction data, updates the parameters, and uploads the parameter update to the upper layer; the upper layer aggregates the parameter update, updates the global collaborative optimization model, and redistributes it; the above steps are repeated until the global collaborative optimization model converges. Each edge node uses local observation information as input based on the converged global collaborative optimization model, and outputs and executes the optimal task unloading, service caching, resource allocation, and UAV trajectory decisions.
2. The method for optimizing vehicle-to-everything (V2X) task offloading based on unmanned aerial vehicle (UAV) assistance as described in claim 1, characterized in that, The overall system performance is defined as a weighted harmonic index of average system service latency, edge node load balancing, and cache hit rate.
3. The method for optimizing vehicle-to-everything (V2X) task offloading based on unmanned aerial vehicle (UAV) assistance as described in claim 2, characterized in that, The average service latency of the system is calculated as follows: The task completion latency is calculated separately for local execution latency, edge node execution latency, and base station execution latency, depending on the unloading method. The local execution latency includes local computation time. The edge node execution latency includes the transmission time from the vehicle to the edge node, the computation time for querying the cache at the edge node, the transmission time between edge nodes, and the task processing time at the edge node. The base station execution delay includes the transmission time from the vehicle to the edge node, the transmission time from the edge node to the base station, and the base station processing time. The average service latency of the system is the sum of the local execution latency, edge node execution latency, and base station execution latency of all tasks in each time slot, divided by the total number of tasks in that time slot.
4. The method for optimizing vehicle-to-everything (V2X) task offloading based on unmanned aerial vehicle (UAV) assistance as described in claim 2, characterized in that, The edge node load balancing is calculated by the load rate variance of each edge node, where the load rate is the ratio of the actual amount of computing tasks carried by the edge node to the maximum computing resource capacity of the node; and the cache hit rate is the ratio of the number of tasks that the edge node successfully matches the cache and processes directly to the total number of unloaded tasks.
5. The method for optimizing vehicle-to-everything (V2X) task offloading based on unmanned aerial vehicle (UAV) assistance as described in claim 1, characterized in that, The training process of the local dual-deep Q-network model includes: Initialize the evaluation network and the target network with consistent structures; Construct an experience replay pool to store interaction samples; define the state space, action space, and reward function; The agent selects an action based on the current state using an ε-greedy strategy. After executing the action, it calculates the reward based on the overall system performance and stores the state, action, reward, and interaction samples for the next state. When the number of interactive samples in the experience replay pool reaches a preset threshold, a batch of samples is randomly selected to calculate the loss function for training, updating and evaluating the network parameters. The parameters of the evaluation network are softly updated to the target network, and the process is iterated until the reward function converges.
6. The method for optimizing vehicle-to-everything (V2X) task offloading based on unmanned aerial vehicle (UAV) assistance as described in claim 5, characterized in that, The state space includes edge node location, current load rate, cache occupancy status, task queue length, drone remaining energy, and the relative distance between the vehicle and the edge node; The action space includes task unloading target selection, cache content update, computing resource allocation ratio adjustment, and drone flight direction and speed adjustment; the reward function is positively correlated with the overall system performance, the higher the overall system performance, the greater the reward.
7. The method for optimizing vehicle-to-everything (V2X) task offloading based on unmanned aerial vehicle (UAV) assistance as described in claim 1, characterized in that, The optimization process of the global collaborative optimization model includes: The base station acts as a federated learning server, periodically distributing the global parameter vector of the current best global collaborative optimization model to all edge nodes participating in the collaboration; After receiving the global parameter vector, each edge node uses the historical interaction data stored locally as the training set to perform multiple rounds of gradient descent training, adapt to local features, calculate the parameter update amount, and upload it to the base station. The base station collects the parameter updates of all edge nodes, uses a federated average aggregation algorithm to calculate the weighted average global parameter update, updates the global collaborative optimization model, and enters the next distribution cycle to achieve global collaborative optimization.
8. A vehicle-to-everything (V2X) task offloading optimization system based on unmanned aerial vehicle (UAV) assistance, characterized in that, include: The objective establishment module is configured to: establish a joint optimization objective to maximize the overall system performance; the decision variables of the joint optimization objective include task offloading, service caching, computing resource allocation, and UAV trajectory; The model building module is configured to: build a hierarchical optimization framework, including an upper-layer federated learning server deployed at the base station and a lower-layer dual-deep Q-network agent deployed at each edge node; and build a local dual-deep Q-network model and a global collaborative optimization model. The model optimization module is configured as follows: each edge node uses the global collaborative optimization model parameters distributed by the upper layer as initial parameters, trains a local dual-depth Q network model using locally stored historical interaction data and updates the parameters, and uploads the parameter update amount to the upper layer; the upper layer aggregates the parameter update amounts, updates the global collaborative optimization model and redistributes it; the above steps are repeated until the global collaborative optimization model converges. The action execution module is configured such that each edge node, based on the converged global collaborative optimization model, obtains local observation information as input, outputs optimal task unloading, service caching, resource allocation, and UAV trajectory decisions, and executes them.
9. A computer-readable storage medium having a program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps in the unmanned aerial vehicle-to-everything (V2X) task offloading optimization method as described in any one of claims 1-7.
10. An electronic device comprising a memory, a processor, and a program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps in the unmanned aerial vehicle-to-everything (V2X) task offloading optimization method as described in any one of claims 1-7.