Vehicle task unloading allocation method and device, electronic equipment and readable storage medium
Through the collaborative multi-computing unit of pilot drones, the problem of insufficient vehicle computing resources during peak traffic is solved, and low-latency task processing and system life extension are achieved.
Patent Information
- Application Number
- CN202510343215.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-21
- Publication Date
- 2025-07-18
AI Technical Summary
During peak traffic periods, there is a large demand for unloading vehicle computing tasks, and the calculation capacity of roadside units is limited, which cannot meet the delay requirements of vehicle tasks.
Through the pilot drone and multiple computing units, the vehicle tasks are coordinated to unload the vehicle, including the target vehicle, the roadside unit, the pilot drone, the follower drone and the target base station, the processing delay is determined based on the allocation data and the target allocation data is sent to realize the task offload.
Meet the delay requirements of vehicle tasks, avoid insufficient computing resources, improve system efficiency and flexibility, and extend system life.
Smart Images

Figure CN120343633A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of edge computing, and in particular, to a method, device, electronic device, and readable storage medium for vehicle task offloading and allocation. Background Art
[0002] With the rapid development of the Internet of Vehicles and intelligent transportation systems, latency-sensitive and computationally intensive in-vehicle applications have emerged continuously, posing challenges to intelligent vehicles with limited computing resources.
[0003] In related technologies, the vehicle edge computing (VEC) technology is usually used to offload vehicle tasks to fixed roadside units (RSUs) to reduce the computing burden of vehicles. However, during peak traffic periods, due to a large number of vehicles and complex traffic behaviors, a large number of computing task offloading demands often occur, and the roadside units often become overloaded due to limited computing capabilities, thus unable to meet the latency requirements of the tasks generated by vehicles. Summary of the Invention
[0004] This application discloses a method, device, electronic device, and readable storage medium for vehicle task offloading and allocation, which can meet the latency requirements of tasks generated by vehicles.
[0005] To solve the above problems, this application adopts the following technical solutions:
[0006] In a first aspect, an embodiment of this application discloses a method for vehicle task offloading and allocation, which is applied to a leading unmanned aerial vehicle (UAV) and includes: obtaining a to-be-executed task generated by a target vehicle, where the target vehicle is any one of multiple task vehicles on a target road section; determining a processing latency of the to-be-executed task based on allocation data corresponding to the to-be-executed task, where the allocation data includes proportion data of the to-be-executed task respectively offloaded by the target vehicle to each computing unit and computing power resources allocated by each computing unit to the to-be-executed task, and the computing units include the target vehicle, multiple roadside units on the target road section, the leading UAV on the target road section, a target base station corresponding to the target road section, and multiple following UAVs corresponding to the leading UAV, and a set of the allocation data corresponds to one processing latency; taking the allocation data that meets the constraint conditions as target allocation data, where the constraint conditions include that the processing latency of the to-be-executed task is less than or equal to the maximum task allowable latency of the to-be-executed task; and sending the target allocation data to the target vehicle so that the target vehicle performs offloading and allocation of the to-be-executed task according to the target allocation data.
[0007] Second aspect, an embodiment of the present application discloses a vehicle task offloading allocation device, which is applied to a pilot unmanned aerial vehicle (UAV) and includes: an acquisition module configured to acquire a to-be-executed task generated by a target vehicle, where the target vehicle is any one of multiple task vehicles on a target road section; a determination module configured to determine a processing delay of the to-be-executed task based on allocation data corresponding to the to-be-executed task, where the allocation data includes ratio data of the to-be-executed task unloaded by the target vehicle to each computing unit and computing power resources allocated by each computing unit to the to-be-executed task, and the computing units include the target vehicle, multiple roadside units on the target road section, the pilot UAV on the target road section, a target base station corresponding to the target road section, and multiple following UAVs corresponding to the pilot UAV, and a set of the allocation data corresponds to one processing delay; the determination module is further configured to use the allocation data that meets the constraint conditions as target allocation data, where the constraint conditions include that the processing delay of the to-be-executed task is less than or equal to the maximum task allowable delay of the to-be-executed task; a sending module configured to send the target allocation data to the target vehicle so that the target vehicle performs offloading allocation on the to-be-executed task according to the target allocation data.
[0008] Third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory. The memory stores a program or instruction that can run on the processor, and when the program or instruction is executed by the processor, the steps of the method described in the first aspect are implemented.
[0009] Fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0010] Fifth aspect, an embodiment of the present application provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions, and when the program instructions are executed by a computer, the computer is caused to execute: the steps of the method described in the first aspect.
[0011] The technical solution adopted by the present application can achieve the following beneficial effects:
[0012] An embodiment of the present application provides a method for vehicle task offloading and allocation. The leading unmanned aerial vehicle (UAV) obtains the to-be-executed tasks generated by a target vehicle, where the target vehicle is any one of multiple task vehicles on a target road section. Based on the allocation data corresponding to the to-be-executed tasks, the processing delay of the to-be-executed tasks is determined. The allocation data includes the ratio data of the to-be-executed tasks respectively offloaded by the target vehicle to each computing unit, and the computing power resources allocated by each computing unit to the to-be-executed tasks. The computing units include the target vehicle, multiple roadside units on the target road section, the leading UAV on the target road section, the target base station corresponding to the target road section, and multiple following UAVs corresponding to the leading UAV. A set of allocation data corresponds to one processing delay. Then, the allocation data that meets the constraint conditions is used as the target allocation data, where the constraint conditions include that the processing delay of the to-be-executed tasks is less than or equal to the maximum task allowable delay of the to-be-executed tasks. And the target allocation data is sent to the target vehicle so that the target vehicle performs offloading and allocation of the to-be-executed tasks according to the target allocation data. This solution increases computing resources through the target base station and multiple UAVs, offloads the to-be-executed tasks generated by the target vehicle to multiple roadside units on the target road section and the leading UAV on the target road section respectively, and relays the to-be-executed tasks to the target base station and multiple following UAVs through the leading UAV, which can avoid insufficient computing resources. And this solution uses the allocation data that meets the constraint conditions as the target allocation data and sends it to the target vehicle so that the target vehicle performs offloading and allocation of the to-be-executed tasks according to the target allocation data, which can meet the delay requirements of the tasks generated by the vehicle. Description of the Drawings
[0013] Figure 1 It is an architecture diagram of a vehicle edge computing disclosed in an embodiment of the present application;
[0014] Figure 2 It is a schematic flowchart of a method for vehicle task offloading and allocation disclosed in an embodiment of the present application;
[0015] Figure 3 It is a schematic structural diagram of a device for vehicle task offloading and allocation disclosed in an embodiment of the present application;
[0016] Figure 4 It is a schematic structural diagram of an electronic device disclosed in an embodiment of the present application. Detailed Embodiments
[0017] Next, the technical solutions in the embodiments of the present application will be clearly described with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some, but not all, of the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application belong to the scope of protection of the present application.
[0018] The terms "first", "second", etc. in the description and claims of this application are used to distinguish similar objects, rather than to describe a specific order or sequence. It should be understood that such terms can be interchanged under appropriate circumstances, so that the embodiments of this application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of the same category, and do not limit the number of objects. For example, the first object can be one or multiple. In addition, "and / or" in the description and claims means at least one of the electrically connected objects, and the character " / ", generally represents an "or" relationship between the associated objects before and after.
[0019] The vehicular edge computing (VEC) architecture involved in this application is as Figure 1 shown. It consists of K intelligent connected vehicles, M unmanned aerial vehicles (UAVs) carrying multi-access edge computing (MEC) servers, I roadside units (RSUs) with MEC servers, and 1 target base station (BS) with an MEC server to form a scenario system. It should be noted that the target base station here is the base station closest to this scenario system. The vehicle set is corresponding to the three-dimensional coordinate V k =(x k , y k , 0); the RSU set is corresponding to the three-dimensional coordinate R i =(x i , y i , 0); the UAV set is corresponding to the three-dimensional coordinate U m =(x m , y m , H), where among the M UAVs, there is 1 pioneer unmanned aerial vehicle (PUAV) and M - 1 following unmanned aerial vehicles (FUAVs). The PUAV is responsible for receiving the task requests of ground vehicle users and then relaying them to the FUAVs or the BS for processing, and the FUAVs are responsible for receiving the tasks from the PUAV and performing calculations.
[0020] The following will combine the accompanying drawings and, through specific embodiments and their application scenarios, elaborate in detail on the vehicle task offloading and allocation method, device, electronic device, and readable storage medium disclosed in the embodiments of this application.
[0021] The present application discloses a vehicle task offloading and allocation method, which is applied to a leading unmanned aerial vehicle (UAV). Figure 2 It is a schematic flowchart of a vehicle task offloading and allocation method disclosed in an embodiment of the present application. As Figure 2 shown, the method includes the following steps:
[0022] S220. Obtain the to-be-executed task generated by the target vehicle, where the target vehicle is any one of multiple task vehicles on the target road section.
[0023] In the present application, the leading UAV receives the to-be-executed task generated by the target vehicle k, and the to-be-executed task generated by the target vehicle k is represented as D k is the input data volume of the to-be-executed task, and C k represents the number of CPU (Central Processing Unit / Processor) instruction cycles required to calculate 1 bit of the to-be-executed task, represents the maximum task allowable delay of the to-be-executed task.
[0024] S240. Determine the processing delay of the to-be-executed task based on the allocation data corresponding to the to-be-executed task.
[0025] Among them, the allocation data includes the proportion data of the to-be-executed task that the target vehicle unloads to each computing unit respectively, and the computing power resources allocated to the to-be-executed task by each computing unit. The computing units include the target vehicle, multiple roadside units on the target road section, the leading UAV on the target road section, the target base station corresponding to the target road section, and multiple following UAVs corresponding to the leading UAV. A set of allocation data corresponds to one processing delay.
[0026] In one implementation, based on the allocation data corresponding to the to-be-executed task, the input data volume D k of the to-be-executed task, the data transmission rate between two computing units, the number of CPU instruction cycles C k required to calculate 1 bit of the to-be-executed task, and the computing power resources allocated to the to-be-executed task by each computing unit, determine the processing delay of the to-be-executed task.
[0027] In the present application, there are the following constraints on the to-be-executed task generated by the target vehicle k: Among them, represents the proportion data of the to-be-executed task processed by the target vehicle, represents the proportion data of the to-be-executed task that the target vehicle unloads to the RSU i of the to-be-executed task. Indicates the proportional data of the tasks to be executed by the target vehicle unloaded to the PUAV m≠PUAV indicates that the PUAV relays to the FUAV m The proportional data of the tasks to be executed Indicates the proportional data of the tasks to be executed by the PUAV relayed to the target base station
[0028] In this application, the target vehicle k unloads the tasks to be executed to the RSU i , and the resulting transmission delay is expressed as Wherein Is the data transmission rate of the tasks to be executed from the target vehicle k to the RSU i The target vehicle k unloads the tasks to be executed to the PUAV, and the resulting transmission delay is expressed as Wherein Is the data transmission rate of the tasks to be executed from the target vehicle k to the PUAV. After receiving the tasks to be executed by the target vehicle k, the PUAV further transmits them to the FUAV or the target base station BS. The transmission delay from the PUAV to the FUAV m Is The transmission delay from the PUAV to the BS is Wherein Is the data transmission rate of the tasks to be executed from the PUAV to the FUAV m The data transmission rate Is the data transmission rate of the tasks to be executed from the PUAV to the BS. In addition, since the results of computing tasks are usually very small, the transmission delay of the computing results can be ignored
[0029] In this application, the computing delay of the tasks to be executed locally on the target vehicle k is expressed as Wherein Is the computing power resource allocated by the target vehicle k to the tasks to be executed The remaining computing power resource of the target vehicle. The computing delay of the tasks to be executed at the RSU i Is expressed as Wherein Is the RSU i The computing power resource allocated by the RSU to the tasks to be executed by the target vehicle k Is the RSU i The remaining computing power resource m The computing delay of the tasks to be executed at the FUAV is expressed as Wherein Is the FUAV m The computing power resource allocated by the FUAV to the tasks to be executed by the target vehicle k Is the FUAV mThe remaining computing power resources. The computing delay of the task to be executed at the BS is expressed as Wherein, is the computing power resource of the task to be executed assigned by the BS to the target vehicle k, is the remaining computing power resource of the BS.
[0030] In this application, the processing delay of the task to be executed is expressed as
[0031] S260. Use the allocation data that meets the constraint conditions as the target allocation data.
[0032] Wherein, the constraint conditions include that the processing delay of the task to be executed is less than or equal to the maximum task allowable delay of the task to be executed.
[0033] That is to say, use The corresponding allocation data at that time as the target allocation data.
[0034] S280. Send the target allocation data to the target vehicle, so that the target vehicle performs offloading allocation on the task to be executed according to the target allocation data.
[0035] An embodiment of the present application provides a method for vehicle task offloading and allocation. The leading unmanned aerial vehicle (UAV) obtains a to-be-executed task generated by a target vehicle, where the target vehicle is any one of multiple task vehicles on a target road section. Based on allocation data corresponding to the to-be-executed task, the processing delay of the to-be-executed task is determined. The allocation data includes the proportion data of the to-be-executed task unloaded by the target vehicle to each computing unit and the computing power resources allocated by each computing unit to the to-be-executed task. The computing units include the target vehicle, multiple roadside units on the target road section, the leading UAV on the target road section, a target base station corresponding to the target road section, and multiple following UAVs corresponding to the leading UAV. One set of allocation data corresponds to one processing delay. Then, the allocation data that meets the constraint conditions is used as the target allocation data, where the constraint conditions include that the processing delay of the to-be-executed task is less than or equal to the maximum task allowable delay of the to-be-executed task. And the target allocation data is sent to the target vehicle so that the target vehicle performs offloading and allocation of the to-be-executed task according to the target allocation data. This solution increases computing resources through the target base station and multiple UAVs, unloads the to-be-executed task generated by the target vehicle to multiple roadside units on the target road section and the leading UAV on the target road section respectively, and the leading UAV relays the to-be-executed task to the target base station and multiple following UAVs, which can avoid insufficient computing resources. And this solution uses the allocation data that meets the constraint conditions as the target allocation data and sends it to the target vehicle so that the target vehicle performs offloading and allocation of the to-be-executed task according to the target allocation data, which can meet the delay requirements of the tasks generated by the vehicle.
[0036] There are two types of UAVs in the present application. The following UAVs carry edge servers and can directly provide computing services, while the leading UAV is responsible for receiving task requests from ground vehicle users and then relaying them to FUAV or the target base station for processing. On the one hand, the selection of the leading UAV can save the delay and energy consumption of the vehicle-to-UAV transmission. On the other hand, the UAV-to-base station transmission is line-of-sight transmission, which can reduce the transmission delay and energy consumption. And the leading UAV is responsible for receiving task requests from ground vehicle users, making computing task scheduling decisions, communicating with the target base station, and coordinating the task allocation of multiple following UAVs, assuming the role of an "air command center", which is conducive to centralized management and optimized resource allocation. The following UAVs focus on providing computing services and executing specific tasks. Through distributed deployment, they directly provide low-latency edge computing services for vehicle users, improving the task processing efficiency. This architecture of division of labor and cooperation can improve the efficiency, flexibility, and reliability of the system.
[0037] In the embodiments of the present application, when the maximum task allowable delay is greater than the first threshold, the proportion data of the tasks to be executed that the target vehicle unloads to each of the roadside units in the allocation data is zero, and the computing power resources allocated by each of the roadside units to the tasks to be executed in the allocation data are zero. That is to say, when the maximum task allowable delay of this task to be executed is greater than the first threshold T thresh (i.e., this task to be executed is a high-delay task), this task to be executed is divided into two parts, one part is processed by the on-vehicle unit of the target vehicle, and one part is unloaded from the target vehicle to the PUAV and then relayed to the FUAV or BS for processing; when the maximum task allowable delay of this task to be executed is less than or equal to the first threshold T thresh (i.e., this task to be executed is a low-delay task), this task to be executed is divided into three parts, one part is processed by the on-vehicle unit of the target vehicle, one part is unloaded from the target vehicle to the RSU for processing, and one part is unloaded from the target vehicle to the PUAV and then relayed to the FUAV or BS for processing. According to the different tolerances of vehicle task delays in the present application, local vehicles, roadside units, drones or target base stations can be selected for task offloading, so as to ensure that low-delay tasks are preferentially processed by local vehicles or roadside units, and high-delay tasks can be processed by drones or relayed to target base stations for processing.
[0038] It should be noted that the present application does not limit the specific value of the first threshold, and the specific value of the first threshold can be set according to actual needs.
[0039] Since the battery capacity of the UAV is limited, the energy consumption of all UAVs often determines the lifespan of the entire system. Therefore, balancing the load of each UAV and reducing the energy consumption of the UAV can increase the lifespan of the entire system. In the embodiments of the present application, the constraint condition may further include that the load balancing coefficient is less than a second threshold, and the load balancing coefficient is used to characterize the difference in the load of each of the following drones. Before using the allocation data that meets the constraint conditions as the target allocation data, it may further include: based on the input data volume of the task to be executed and the proportion data of the tasks to be executed that the target vehicle unloads to each of the following drones in the allocation data, respectively determine the load of each of the following drones; based on the load of each of the following drones, determine the average load of the multiple following drones; based on the load of each of the following drones, the average load and the number of the following drones, determine the load balancing coefficient, where a set of allocation data corresponds to one load balancing coefficient.
[0040] In the present application, the load of the FUAV m (i.e., the amount of task data processed) is expressed as The average load of multiple FUAVs is expressed as The load balancing coefficient is expressed as When the load of the FUAV is completely balanced, LB is close to 0, and the larger LB is, the more unbalanced the load distribution of the FUAV is. To make the load of the FUAV as balanced as possible, let LB < σ, where σ is the second threshold value.
[0041] It should be noted that this application does not limit the specific value of the second threshold, and the specific value of the second threshold can be set according to actual needs.
[0042] In the embodiment of this application, the constraint condition may further include minimizing the maximum energy consumption among the UAVs. Before using the allocation data that meets the constraint condition as the target allocation data, it may further include: based on the proportion data of the to-be-executed tasks unloaded from the target vehicle to the pilot UAV in the allocation data, the input data volume of the to-be-executed tasks, the data transmission rate of the to-be-executed tasks from the target vehicle to the pilot UAV, the receiving power of the pilot UAV, the proportion data of the to-be-executed tasks unloaded from the target vehicle to each of the follower UAVs in the allocation data, the data transmission rate of the to-be-executed tasks from the pilot UAV to each of the follower UAVs, the transmitting power of the pilot UAV, the proportion data of the to-be-executed tasks unloaded from the target vehicle to the target base station in the allocation data, and the data transmission rate of the to-be-executed tasks from the pilot UAV to the target base station, determining the total energy consumption of the pilot UAV serving the multiple task vehicles; based on the proportion data of the to-be-executed tasks unloaded from the target vehicle to each of the follower UAVs in the allocation data, the input data volume of the to-be-executed tasks, the data transmission rate of the to-be-executed tasks from the pilot UAV to each of the follower UAVs, the receiving power of each of the follower UAVs, the effective switched capacitor corresponding to each of the follower UAVs, the number of CPU instruction cycles required to calculate 1 bit of the to-be-executed tasks, and the computing power resources allocated to the to-be-executed tasks by each of the follower UAVs in the allocation data, determining the total energy consumption of each of the follower UAVs serving the multiple task vehicles; based on the total energy consumption of each of the follower UAVs serving the multiple task vehicles and the total energy consumption of the pilot UAV serving the multiple task vehicles, determining the maximum energy consumption among the UAVs, where one set of the allocation data corresponds to one maximum energy consumption.
[0043] In this application, the energy consumption of the PUAV receiving the to-be-executed tasks of the target vehicle k is expressed as Wherein, is the receiving power of the PUAV. The PUAV sends the to-be-executed tasks to the FUAV mThe energy consumption is expressed as The energy consumption of the PUAV sending the task to be executed to the BS is expressed as where is the transmission power of the PUAV. The total energy consumption of the pilot UAV serving multiple mission vehicles is expressed as
[0044] In this application, the FUAV m The energy consumption of receiving the task to be executed relayed by the PUAV is expressed as where is the receiving power of the FUAV m The FUAV m The energy consumption of processing the task to be executed is expressed as where κ represents the effective switching capacitance, which depends on the CPU architecture of the FUAV m The FUAV m The total energy consumption of serving multiple mission vehicles is expressed as
[0045] In this application, let Minimizing the maximum energy consumption among UAVs is expressed as
[0046] In the embodiment of this application, the allocation data may further include the position coordinates of each UAV, and the constraint condition may further include that the distance between any two UAVs is greater than or equal to a fourth threshold to avoid UAV collisions, where the distance between any two UAVs is determined based on the position coordinates of the two UAVs. Exemplarily, ||U m -U m' ||2≥L min , where U m and U m' respectively represent the position coordinates of any two UAVs, and L min represents the fourth threshold.
[0047] It should be noted that this application does not limit the specific value of the fourth threshold, and the specific value of the fourth threshold can be set according to actual needs.
[0048] In this application, the task offloading strategy and the UAV position U m can be jointly optimized to minimize the maximum energy consumption among UAVs while meeting the delay requirements of all tasks and the UAV load balancing requirements. Let The optimization problem of this scheme can be expressed as:
[0049]
[0050] LB<σ (3)
[0051]
[0052] Among them, (1) is the optimization objective, indicating the minimum of the maximum energy consumption among the UAVs. Constraint (2) ensures that the tasks to be executed are completed within the maximum allowable task delay. Constraint (3) guarantees the load balance of the follower UAVs. Constraint (4) ensures that the value of the task segmentation variable to be executed is between 0 and 1. Constraint (5) guarantees that the computing power resources provided by each computing unit for the tasks to be executed are non-negative. Constraint (6) guarantees that the distance between any two UAVs is greater than or equal to L min 。
[0053] The above optimization problem is a non-convex optimization problem, and can be solved using reinforcement learning, deep learning (such as neural networks), heuristic algorithms (such as genetic algorithms, particle swarm algorithms, simulated annealing algorithms), branch and bound method, etc., to obtain the target allocation data that meets the constraint conditions To minimize the maximum energy consumption among the UAVs, while meeting the delay requirements of all tasks and the UAV load balance requirements
[0054] This application establishes a joint optimization model for minimizing the energy consumption of UAVs under delay and load balance constraints, meets the delay requirements of low-delay tasks, realizes the load balance of UAVs, and effectively extends the life of the entire system
[0055] In one implementation, the obtaining of the tasks to be executed generated by the target vehicle may include: determining the road congestion index corresponding to the target road section based on the inspection time of the target road section, the actual traffic flow of the target road section at the inspection time, the maximum designed traffic flow of the target road section, the average speed of vehicle travel on the target road section under unobstructed conditions, the actual average vehicle speed of the target road section at the inspection time, and the actual occupancy time of any vehicle on the target road section on the target road section; obtaining the tasks to be executed generated by the target vehicle when the road congestion index is greater than the third threshold
[0056] In this application, the road congestion index (RCI) corresponding to the target road section is used to indicate the congestion degree of the target road section. The road congestion index corresponding to the target road section is expressed as Among them, T represents the inspection time of the target road section, Q represents the actual traffic flow of the target road section at the inspection time (the number of vehicles passing through the target road section per unit time), Q maxRepresents the maximum traffic flow (highest traffic capacity) designed for the target road section, V free Represents the average speed of vehicle travel on the target road section under unobstructed conditions, V avg Represents the actual average vehicle speed on the target road section during the inspection time, T occ Represents the time actually occupied by any vehicle on the target road section. α, β, and γ are weight coefficients used to balance the influence of various factors on the congestion level, and satisfy α + β + γ = 1. It should be noted that RCI is usually within the range of [0, 1]. The closer it is to 1, the more congested the road is, and the closer it is to 0, the smoother the road is.
[0057] In this application, when the road congestion index corresponding to the target road section is greater than the third threshold and lasts for a preset time, obtain the to-be-executed tasks generated by the target vehicle, and execute the vehicle task offloading and allocation method described above to meet the latency requirements of low-latency tasks.
[0058] It should be noted that this application does not limit the specific value of the third threshold, and the specific value of the third threshold can be set according to actual needs.
[0059] In one implementation, before obtaining the to-be-executed tasks generated by the target vehicle, it may further include: obtaining the status data of multiple drones, where the status data includes the distance between the drone and the central position of the target road section, the remaining energy percentage, the communication bandwidth, and the current computing load; based on the status data of each drone, respectively determine the status scores corresponding to each drone; based on the status scores corresponding to each drone, determine the leading drone from multiple drones.
[0060] All drones regularly broadcast their own status data, which includes the distance (Distance) between the drone and the central position of the target road section, the remaining energy percentage (Energy), the communication bandwidth (Comm), and the current load (Load). Other drones update their understanding of all drones in the network after receiving the broadcast, and, based on the status data received from each drone, calculate the status scores corresponding to each drone, and determine the drone with the highest status score as the leading drone (which may be itself) to ensure that the leading drone can efficiently complete task reception and relay, and reduce unnecessary transmission energy consumption. After confirming the leading drone, broadcast the election result, and the leading drone starts to perform the duties of receiving task requests and relaying. If the leading drone fails due to battery exhaustion or task overload, the remaining drones can immediately initiate a re-election.
[0061] In this application, after obtaining the status data of the drone, in order to eliminate the influence of dimensions, the status data can be standardized first and then calculated. The status score of the drone can be expressed as where is the standardized index, ω1, ω2, ω3, ω4 are the weight coefficients of each index, and ω1 + ω2 + ω3 + ω4 = 1. In addition, if there are multiple drones with the highest status score, the leading drone is determined through a preset priority (such as the drone ID).
[0062] In the vehicle task offloading and allocation method provided by the embodiments of this application, the execution subject can be a vehicle task offloading and allocation device. In the embodiments of this application, taking the vehicle task offloading and allocation device executing the vehicle task offloading and allocation method as an example, the vehicle task offloading and allocation device provided by the embodiments of this application is described. This vehicle task offloading and allocation device is applied to the leading drone.
[0063] Figure 3 is a schematic structural diagram of a vehicle task offloading and allocation device disclosed in the embodiments of this application. As Figure 3 shown, the vehicle task offloading and allocation device 300 includes: an acquisition module 310, a determination module 320, and a sending module 330.
[0064] In this application, the acquisition module 310 is configured to acquire the to-be-executed task generated by the target vehicle, where the target vehicle is any one of multiple task vehicles on the target road section; the determination module 320 is configured to determine the processing delay of the to-be-executed task based on the allocation data corresponding to the to-be-executed task, where the allocation data includes the proportion data of the to-be-executed task unloaded by the target vehicle to each computing unit and the computing power resources allocated by each computing unit to the to-be-executed task, and the computing units include the target vehicle, multiple roadside units on the target road section, the leading drone on the target road section, the target base station corresponding to the target road section, and multiple following drones corresponding to the leading drone. One set of allocation data corresponds to one processing delay; the determination module 320 is further configured to use the allocation data that meets the constraint conditions as the target allocation data, where the constraint conditions include that the processing delay of the to-be-executed task is less than or equal to the maximum task allowable delay of the to-be-executed task; the sending module 330 is configured to send the target allocation data to the target vehicle so that the target vehicle performs offloading and allocation of the to-be-executed task according to the target allocation data.
[0065] In one implementation, when the maximum task allowable delay is greater than a first threshold, the ratio data of the tasks to be executed that the target vehicle unloads to each of the roadside units in the allocation data is zero, and the computing power resources allocated by each of the roadside units to the tasks to be executed in the allocation data are zero.
[0066] In one implementation, the constraint condition further includes that the load balancing coefficient is less than a second threshold, where the load balancing coefficient is used to characterize the difference degree of the loads of each of the following drones. The determining module 320 is further configured to, before taking the allocation data that meets the constraint condition as the target allocation data, respectively determine the loads of each of the following drones based on the input data volume of the tasks to be executed and the ratio data of the tasks to be executed that the target vehicle unloads to each of the following drones in the allocation data; the determining module 320 is further configured to determine the average load of the multiple following drones based on the loads of each of the following drones; the determining module 320 is further configured to determine the load balancing coefficient based on the loads of each of the following drones, the average load, and the number of the following drones, where one set of allocation data corresponds to one load balancing coefficient.
[0067] In one implementation, the constraint condition further includes minimizing the maximum energy consumption among the UAVs. The determining module 320 is further configured to, before using the allocation data that meets the constraint conditions as the target allocation data, based on the proportional data of the to-be-executed tasks unloaded from the target vehicle to the pilot UAV in the allocation data, the input data volume of the to-be-executed tasks, the data transmission rate of the to-be-executed tasks from the target vehicle to the pilot UAV, the receiving power of the pilot UAV, the proportional data of the to-be-executed tasks unloaded from the target vehicle to each of the following UAVs in the allocation data, the data transmission rate of the to-be-executed tasks from the pilot UAV to each of the following UAVs, the transmitting power of the pilot UAV, the proportional data of the to-be-executed tasks unloaded from the target vehicle to the target base station in the allocation data, and the data transmission rate of the to-be-executed tasks from the pilot UAV to the target base station, determine the total energy consumption of the pilot UAV serving the multiple task vehicles; the determining module 320 is further configured to, based on the proportional data of the to-be-executed tasks unloaded from the target vehicle to each of the following UAVs in the allocation data, the input data volume of the to-be-executed tasks, the data transmission rate of the to-be-executed tasks from the pilot UAV to each of the following UAVs, the receiving power of each of the following UAVs, the effective switching capacitance corresponding to each of the following UAVs, the number of CPU instruction cycles required to calculate 1 bit of the to-be-executed tasks, and the computing power resources allocated to the to-be-executed tasks by each of the following UAVs in the allocation data, determine the total energy consumption of each of the following UAVs serving the multiple task vehicles; the determining module 320 is further configured to determine the maximum energy consumption among the UAVs based on the total energy consumption of each of the following UAVs serving the multiple task vehicles and the total energy consumption of the pilot UAV serving the multiple task vehicles, where one set of the allocation data corresponds to one maximum energy consumption.
[0068] In one implementation, the obtaining module 310 obtains the to-be-executed tasks generated by the target vehicle, including: determining a road congestion index corresponding to the target road section based on the inspection time of the target road section, the actual traffic flow of the target road section at the inspection time, the maximum designed flow of the target road section, the average speed of vehicle travel on the target road section under unobstructed conditions, the actual average vehicle speed of the target road section at the inspection time, and the actual occupancy time of any vehicle on the target road section; and obtaining the to-be-executed tasks generated by the target vehicle when the road congestion index is greater than a third threshold.
[0069] In one implementation, the obtaining module 310 is further configured to obtain status data of a plurality of drones before obtaining a to-be-executed task generated by the target vehicle, where the status data includes the distance between the drone and the central position of the target section, the remaining energy percentage, the communication bandwidth, and the current computing load; the determining module 320 is further configured to respectively determine status scores corresponding to the drones based on the status data of the drones; the determining module 320 is further configured to determine a leading drone from the plurality of drones based on the status scores corresponding to the drones.
[0070] The vehicle task offloading and allocation device provided in the embodiments of the present application can implement each process implemented by the embodiments of the vehicle task offloading and allocation method. To avoid repetition, details are not described herein again.
[0071] Optionally, as Figure 4 shown, the embodiments of the present application further provide an electronic device 400, including a processor 401 and a memory 402. A program or instruction that can run on the processor 401 is stored on the memory 402. When the program or instruction is executed by the processor 401, it implements each step of the above-mentioned vehicle task offloading and allocation method embodiment, and can achieve the same technical effect. To avoid repetition, details are not described herein again.
[0072] It should be noted that the electronic devices in the embodiments of the present application include mobile electronic devices and non-mobile electronic devices.
[0073] The embodiments of the present application further provide a readable storage medium. A program or instruction is stored on the readable storage medium. When the program or instruction is executed by a processor, it implements each process of the above-mentioned vehicle task offloading and allocation method embodiment, and can achieve the same technical effect. To avoid repetition, details are not described herein again.
[0074] Wherein, the processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory ROM, random access memory RAM, magnetic disks, or optical discs.
[0075] The embodiments of the present application further provide a computer program product. The computer program product includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed by a computer, the computer is caused to execute the steps of the above-mentioned vehicle task offloading and allocation method.
[0076] In the above embodiments of the present application, the differences between the embodiments are mainly described. As long as the different optimization features between the embodiments are not contradictory, they can be combined to form a better embodiment. Considering the simplicity of the text, details are not described herein again.
[0077] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, various changes and modifications can be made to the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the scope of the claims of the present application.
Claims
1. A vehicle task offloading and allocation method, characterized in that Applied to a pilot unmanned aerial vehicle, including: Obtain a to-be-executed task generated by a target vehicle, where the target vehicle is any one of multiple task vehicles on a target road section; Based on allocation data corresponding to the to-be-executed task, determine the processing delay of the to-be-executed task, where the allocation data includes the proportion data of the to-be-executed task unloaded by the target vehicle to each computing unit respectively, and the computing power resources allocated by each computing unit to the to-be-executed task. The computing units include the target vehicle, multiple roadside units on the target road section, the pilot unmanned aerial vehicle on the target road section, a target base station corresponding to the target road section, and multiple following unmanned aerial vehicles corresponding to the pilot unmanned aerial vehicle. A set of allocation data corresponds to one processing delay; Use the allocation data that meets the constraint conditions as the target allocation data, where the constraint conditions include that the processing delay of the to-be-executed task is less than or equal to the maximum task allowable delay of the to-be-executed task; Send the target allocation data to the target vehicle so that the target vehicle performs unloading allocation on the to-be-executed task according to the target allocation data.
2. The method according to claim 1, wherein When the maximum task allowable delay is greater than a first threshold, the proportion data of the to-be-executed task unloaded by the target vehicle to each of the roadside units in the allocation data is zero, and the computing power resources allocated by each of the roadside units to the to-be-executed task in the allocation data are zero.
3. The method according to claim 1, characterized in that The constraint conditions further include that the load balancing coefficient is less than a second threshold. The load balancing coefficient is used to characterize the difference in loads of each of the following unmanned aerial vehicles. Before using the allocation data that meets the constraint conditions as the target allocation data, it further includes: Based on the input data volume of the to-be-executed task and the proportion data of the to-be-executed task unloaded by the target vehicle to each of the following unmanned aerial vehicles in the allocation data, determine the loads of each of the following unmanned aerial vehicles respectively; Based on the loads of each of the following unmanned aerial vehicles, determine the average load of the multiple following unmanned aerial vehicles; Based on the loads of each of the following unmanned aerial vehicles, the average load, and the number of the following unmanned aerial vehicles, determine the load balancing coefficient, where a set of allocation data corresponds to one load balancing coefficient.
4. The method according to claim 1, wherein The constraint conditions further include that the maximum energy consumption among the unmanned aerial vehicles is minimized. Before using the allocation data that meets the constraint conditions as the target allocation data, it further includes: Determine the total energy consumption of the pilot UAV serving multiple mission vehicles based on the proportion data of the to-be-executed tasks unloaded from the target vehicle to the pilot UAV in the allocation data, the input data volume of the to-be-executed tasks, the data transmission rate of the to-be-executed tasks from the target vehicle to the pilot UAV, the receiving power of the pilot UAV, the proportion data of the to-be-executed tasks unloaded from the target vehicle to each of the follower UAVs in the allocation data, the data transmission rate of the to-be-executed tasks from the pilot UAV to each of the follower UAVs, the transmitting power of the pilot UAV, the proportion data of the to-be-executed tasks unloaded from the target vehicle to the target base station in the allocation data, and the data transmission rate of the to-be-executed tasks from the pilot UAV to the target base station; Determine the total energy consumption of each follower UAV serving multiple mission vehicles based on the proportion data of the to-be-executed tasks unloaded from the target vehicle to each of the follower UAVs in the allocation data, the input data volume of the to-be-executed tasks, the data transmission rate of the to-be-executed tasks from the pilot UAV to each of the follower UAVs, the receiving power of each follower UAV, the effective switched capacitor corresponding to each follower UAV, the number of CPU instruction cycles required to calculate 1 bit of the to-be-executed tasks, and the computing power resources allocated to the to-be-executed tasks by each of the follower UAVs in the allocation data; Determine the maximum energy consumption between UAVs based on the total energy consumption of each follower UAV serving multiple mission vehicles and the total energy consumption of the pilot UAV serving multiple mission vehicles, where a set of the allocation data corresponds to one maximum energy consumption.
5. The method according to claim 1, characterized in that, The obtaining of the to-be-executed tasks generated by the target vehicle includes: Determine the road congestion index corresponding to the target road section based on the inspection time of the target road section, the actual traffic flow of the target road section at the inspection time, the maximum designed flow of the target road section, the average vehicle speed of the target road section under unobstructed conditions, the actual average vehicle speed of the target road section at the inspection time, and the actual occupancy time of any vehicle on the target road section on the target road section; Obtain the to-be-executed tasks generated by the target vehicle when the road congestion index is greater than the third threshold.
6. The method according to claim 1, characterized in that, Before the obtaining of the to-be-executed tasks generated by the target vehicle, it further includes: Obtain the status data of multiple UAVs, where the status data includes the distance between the UAV and the center position of the target road section, the remaining energy percentage, the communication bandwidth, and the current computing load; Respectively determine the status scores corresponding to each of the UAVs based on the status data of each of the UAVs; Determine the pilot UAV from multiple UAVs based on the status scores corresponding to each of the UAVs.
7. A vehicle task offloading and allocation device, characterized in that, Applied to the pilot UAV, it includes: An obtaining module, configured to obtain the to-be-executed tasks generated by the target vehicle, where the target vehicle is any one of multiple mission vehicles on the target road section; A determination module, configured to determine a processing delay of the to-be-executed task based on allocation data corresponding to the to-be-executed task, where the allocation data includes proportion data of the to-be-executed task respectively unloaded by the target vehicle to each computing unit, and computing power resources allocated by each computing unit to the to-be-executed task, and the computing units include the target vehicle, multiple roadside units of the target road section, the leading unmanned aerial vehicle (UAV) of the target road section, a target base station corresponding to the target road section, and multiple following UAVs corresponding to the leading UAV; and one set of the allocation data corresponds to one processing delay. The determination module is further configured to use the allocation data that meets the constraint conditions as target allocation data, where the constraint conditions include that the processing delay of the to-be-executed task is less than or equal to the maximum task allowable delay of the to-be-executed task. A sending module, configured to send the target allocation data to the target vehicle, so that the target vehicle performs unloading allocation on the to-be-executed task according to the target allocation data.
8. An electronic device, characterized in that, It includes a processor and a memory, and the memory stores a program or instruction that can run on the processor. When the program or instruction is executed by the processor, the steps of the vehicle task unloading allocation method according to any one of claims 1-6 are implemented.
9. A readable storage medium, characterized in that, A program or instruction is stored on the readable storage medium. When the program or instruction is executed by a processor, the steps of the vehicle task unloading allocation method according to any one of claims 1-6 are implemented.
10. A computer program product, characterized in that, The computer program product includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed by a computer, the computer is caused to execute: the steps of the vehicle task unloading allocation method according to any one of claims 1-6.