Dependent task calculation unloading method based on collaborative vehicle-mounted edge computing power network
By constructing a dynamic in-vehicle edge computing network, utilizing the idle computing resources of opportunistic vehicles, identifying and merging dependent tasks, and employing an improved quantum genetic algorithm and graph convolutional neural network for task offloading decisions and scheduling, the resource contradictions and redundant computing problems in the in-vehicle edge computing system are solved, and latency and energy consumption are optimized.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 太原学院
- Filing Date
- 2026-02-02
- Publication Date
- 2026-05-12
AI Technical Summary
Existing vehicle-mounted edge computing systems face challenges such as the contradiction between fixed edge server deployment density and dynamic computing needs, resource waste, redundant computing, and difficulties in scheduling high-dimensional state spaces, making it difficult to optimize latency and energy consumption.
A dynamic vehicular edge computing network is constructed, which utilizes the idle computing resources of opportunistic vehicles. Dependent tasks are identified through directed acyclic graphs, and task offloading decisions and scheduling are performed using an improved quantum genetic algorithm and graph convolutional neural network. Adaptive scheduling is then performed by combining a near-end policy optimization algorithm.
It effectively integrates fixed and mobile resources, eliminates redundant computing, optimizes task latency and energy consumption, and improves resource utilization efficiency and scheduling stability.
Smart Images

Figure CN122019010A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of vehicle-mounted edge computing, and particularly relates to a method for offloading dependent task computation based on a collaborative vehicle-mounted edge computing network. Background Technology
[0002] With the widespread adoption of intelligent in-vehicle applications such as autonomous driving and augmented reality navigation, in-vehicle computing tasks are characterized by high complexity, strong subtask dependencies, and stringent real-time requirements. Traditional cloud computing models, due to their large backhaul latency, struggle to meet the real-time response needs of vehicles. Vehicular edge computing (VEC) effectively alleviates the limitations of computing power and energy consumption in in-vehicle terminals by offloading computing tasks to fixed servers (such as roadside units) at the network edge. Current mainstream research and practices are mostly based on a three-layer fixed architecture of "cloud-edge-device," aiming to reduce latency and energy consumption by optimizing task offloading and resource allocation.
[0003] However, existing VEC systems still face several challenges: First, the deployment density and cost of fixed edge servers are limited, creating a contradiction between coverage and the dynamic, high-frequency demands of in-vehicle computing, easily leading to resource shortages or uneven utilization. Second, existing architectures fail to fully exploit and utilize the fragmented computing resources carried by a large number of idle vehicles in the road environment. Third, most studies do not consider the potential for identical subtasks (repetition) between different vehicle tasks, resulting in redundant computation and resource waste. Finally, facing the scheduling problem of directed acyclic graphs composed of large-scale dependent tasks, existing task scheduling methods based on heuristics or traditional reinforcement learning often face convergence difficulties and policy instability in high-dimensional state spaces, making it difficult to achieve joint fine-grained optimization of latency and energy consumption. Summary of the Invention
[0004] To address the aforementioned technical problems, this invention provides a method for offloading dependent task computation based on a collaborative in-vehicle edge computing network, comprising: Construct a dynamic vehicular edge computing network paradigm consisting of user vehicles, opportunistic vehicles, and edge servers, wherein opportunistic vehicles are vehicles with idle computing resources and predictable movement trajectories. Identify the in-vehicle computing tasks with dependencies generated by the user vehicle, and represent the tasks as a directed acyclic graph, wherein repeated subtasks are merged in the directed acyclic graph; Based on the resource status of the dynamic vehicle edge computing network paradigm and the directed acyclic graph, the computation offloading decision of the subtask is determined. The offloading decision includes local execution, offloading to an edge server for execution, or offloading to an opportunistic vehicle for execution. Based on the computational unloading decision, the subtasks are scheduled to determine the execution order and start time of each subtask.
[0005] Optionally, the in-vehicle computing task with dependencies generated by identifying the user's vehicle includes: Obtain the set of subtasks generated by the user's vehicle, where each subtask is represented by a triplet of data volume, required computing resources, and maximum tolerable latency. Construct an initial directed acyclic graph based on the execution order dependencies between subtasks; Identify and merge identical subtasks in the initial directed acyclic graph to eliminate redundant computations.
[0006] Optionally, the determination of the computational unloading decision includes: The computation offloading problem is modeled as a multiprocessor scheduling problem; An improved quantum genetic algorithm is used to solve the problem to obtain an offloading decision that minimizes the system cost function, where the system cost function is a weighted sum of task execution delay and system energy consumption.
[0007] Optionally, the improved quantum genetic algorithm includes: The offloading decision of the subtask is represented by qubit encoding; The quantum population is updated using a quantum rotation gate, where the rotation angle is dynamically adjusted based on the algorithm's evolutionary state. A load balancing correction coefficient is introduced into the fitness function. This correction coefficient is dynamically calculated based on the variance of resource utilization of edge computing nodes.
[0008] Optionally, the scheduling of subtasks includes: The task scheduling problem is modeled as a Markov decision process; The Markov decision process is solved using a reinforcement learning method based on proximal policy optimization to obtain the task scheduling policy.
[0009] Optionally, the state of the Markov decision process is the directed acyclic graph of the current task, and the encoding of the state is achieved by extracting the topological features and node attribute features of the graph through a graph convolutional neural network.
[0010] Optionally, the graph convolutional neural network aggregates multiple neighbor information of nodes by stacking multiple graph convolutional layers and performs global pooling on all node features to generate a global state vector for reinforcement learning decisions.
[0011] Optionally, the action of the Markov decision process is to add edges to the directed acyclic graph to reduce task dependencies, and the selection of the action includes selecting the start node and the end node in sequence. The computational model for the opportunity vehicle incorporates a resource availability factor and an estimated waiting time. The estimated waiting time is calculated based on the computational load of existing tasks in the vehicle's task queue and the resource availability factor. The process of minimizing the system cost function satisfies the following constraints: each subtask is executed on only one processor; the computing resources allocated to the task do not exceed the total amount of processor resources; the subtask must begin execution only after all its preceding tasks have been completed; and the actual execution time of the subtask does not exceed its maximum tolerable delay.
[0012] On the other hand, the present invention also provides an electronic device including a memory, a processor, and a computing program stored in the memory and executable on the processor, wherein the processor implements the method when executing the computing program.
[0013] On the other hand, the present invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method.
[0014] Compared with the prior art, the present invention has the following advantages and technical effects: This invention effectively integrates the distributed resources of fixed infrastructure and mobile nodes by constructing a dynamic edge computing network pool that merges the idle computing power of opportunistic vehicles, thereby expanding the computing power supply. By identifying and merging repetitive subtasks in a directed acyclic graph (VEC), redundant computations are eliminated, reducing the overall system load. For dependent tasks, a two-stage collaborative optimization strategy is adopted: the first stage uses an improved quantum genetic algorithm to solve the computation offloading decision, and its introduced load balancing correction mechanism avoids node congestion; the second stage models task scheduling as a Markov decision process and uses a graph convolutional neural network to extract topological features, combined with a near-end policy optimization algorithm for adaptive scheduling, effectively handling the high-dimensional state space. This method significantly optimizes the average task execution latency and system energy consumption, improving the overall efficiency of resource utilization and scheduling stability in a dynamic VEC environment. Attached Figure Description
[0015] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings: Figure 1 This is a schematic diagram of the dynamic VEC paradigm structure according to an embodiment of the present invention; Figure 2 This is a schematic diagram of a DAG of dependent tasks according to an embodiment of the present invention; Figure 3 This is a flowchart illustrating the algorithm solution process of an embodiment of the present invention; Figure 4 This is a schematic diagram illustrating the average execution latency of tasks in a performance comparison of different subtask data sizes according to an embodiment of the present invention. Figure 5This is a schematic diagram illustrating the average system energy consumption for performance comparison of different subtask data sizes in an embodiment of the present invention. Figure 6 This is a schematic diagram illustrating the average execution latency of tasks in a performance comparison of different Elasticsearch computing capabilities according to an embodiment of the present invention. Figure 7 This is a schematic diagram showing the average system energy consumption for performance comparison of different ES computing capabilities in an embodiment of the present invention. Figure 8 This is a schematic diagram illustrating the average execution latency of a task in a performance comparison of different numbers of opportunity vehicles according to an embodiment of the present invention. Figure 9 This is a schematic diagram illustrating the average system energy consumption for performance comparison of different numbers of opportunity vehicles in an embodiment of the present invention. Figure 10 This is a schematic diagram illustrating the impact of the average number of repetitions of different subtasks on the average execution delay in an embodiment of the present invention. Figure 11 This is a schematic diagram illustrating the impact of the average number of repetitions of different subtasks on the average system energy consumption in an embodiment of the present invention. Figure 12 This is a schematic diagram illustrating the impact of load balancing on task execution latency in an embodiment of the present invention. Detailed Implementation
[0016] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0017] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0018] Example 1 This embodiment provides a method for offloading dependent task computation based on a collaborative in-vehicle edge computing network, including: Construct a dynamic vehicular edge computing network paradigm consisting of user vehicles, opportunistic vehicles, and edge servers, wherein opportunistic vehicles are vehicles with idle computing resources and predictable movement trajectories. Identify the in-vehicle computing tasks with dependencies generated by the user vehicle, and represent the tasks as a directed acyclic graph, wherein repeated subtasks are merged in the directed acyclic graph; Based on the resource status of the dynamic vehicle edge computing network paradigm and the directed acyclic graph, the computation offloading decision of the subtask is determined. The offloading decision includes local execution, offloading to an edge server for execution, or offloading to an opportunistic vehicle for execution. Based on the computational unloading decision, the subtasks are scheduled to determine the execution order and start time of each subtask.
[0019] like Figure 1 As shown, this embodiment studies a dynamic VEC paradigm based on an edge computing network pool, consisting of roadside ES (Intelligent Service Providers) equipped with limited communication and computing capabilities and opportunity vehicles acting as dynamic distributed computing infrastructure. It comprises three core components: the vehicle layer, the edge computing network layer, and the cloud layer. Vehicles can be divided into two categories: task-oriented vehicles (user vehicles), which continuously generate computing tasks while moving; and service-oriented vehicles (opportunity vehicles), which, in addition to computing their own onboard tasks, also cooperate with the ES to perform computational offloading tasks. Roadside ES typically consists of traffic infrastructure such as RSUs (Roadside Units) and small base stations, enabling real-time analysis of vehicle-generated data, thereby accelerating decision-making and reducing latency. The cloud server is equipped with sufficient computing resources to handle complex computational tasks. Definitions , and Let these represent the user vehicle set, the opportunity vehicle set, and the ES set, respectively. The type and number of computational tasks generated by each vehicle vary depending on the service request; assuming the number of tasks generated by each vehicle is [number missing]. ,in, The value is not fixed and varies between different vehicles. Furthermore, to better describe the calculation of the unloading process, an unloading decision is defined. ,in, This indicates that the subtask is executed locally. and These represent offloading the subtask to the ES or the opportunity vehicle for execution, respectively. Therefore, the offloading decision for all subtasks generated by the vehicle is represented as follows: .
[0020] A directed directive algebra (DAG) is used to represent the dependencies between subtasks. Subtasks with dependencies can be represented as follows: ,in, Indicates user vehicle A set of subtasks is generated, each subtask consisting of a set of triples. It means that, among them, Subtasks The size of the data, Subtasks Required computing resources Subtasks Maximum tolerable delay; This represents the interdependencies between subtasks, represented by... Matrix representation, for example, Represents the vehicle's subtasks and The execution order, this value is 1. Must Completed beforehand, otherwise 0, and used This indicates the amount of data that needs to be passed to the subtask after the calculation is complete; Indicates vehicle The set of computational resources required for all subtasks. To parallelize the onboard computing tasks, the task DAGs of all vehicles are merged into a single graph, which is generated by a cloud data center. Simultaneously, the DAGs are simplified to account for redundancy between subtasks. To ensure consistency, two virtual nodes are added to the DAG: an entry subtask and an exit subtask. The data size of both nodes is set to zero, ensuring that each DAG contains only one entry subtask and one exit subtask. For example... Figure 2 As shown, in Figure 2 In (a), if subtasks C2 and C4 are exactly the same, then there is no need to calculate them repeatedly, and the calculation results and resources will be shared. In this case, the DAG can be further simplified to... Figure 2 The structure shown in (b).
[0021] The process of constructing the computational unloading model includes: Each user vehicle has three computation offloading decisions to complete its onboard computing tasks: execution locally, execution on Elasticsearch (ES), and execution on the opportunistic vehicle. The computational models for these three offloading strategies are given below.
[0022] (1) Local computation model: This means the user's car The Sub-tasks Calculations are performed locally on the vehicle. In this case, task execution latency and energy consumption can be expressed as: (1) (2) in, Indicates user vehicle The computing power. The energy consumption of local execution is proportional to the square of the CPU voltage, and also to the CPU clock frequency. It has a roughly linear relationship with the voltage supply. Therefore, the energy consumption of one CPU cycle can be expressed as: ,in The value depends on the vehicle CPU architecture.
[0023] (2) Edge server computing model: This means that when the vehicle's computing resources are insufficient to meet the task requirements, ES assists in calculating the user vehicle's computing power. The first Subtask And return the calculation results to the vehicle. Since the computational results of onboard tasks are typically small, the transmission time of the results can be ignored. In this case, the subtask... The total execution latency calculated on Elasticsearch mainly includes the time for uploading task data to Elasticsearch and the execution time of the task, expressed as: (3) in, Indicates ES computing power Subtasks Shared ES The proportion of computing resources, Indicates user vehicle and ES The uplink transmission rate is expressed as: (4) in, Indicates channel bandwidth. Indicates noise power. Indicates user vehicle Unload tasks to ES Transmission power at that time Indicates the use of user vehicles Interference caused by other vehicles on the same channel. This represents the path loss index, a parameter that primarily describes the degree of attenuation of wireless signals during transmission; it is set to 3. It is a constant coefficient. Considering path loss and random effects in actual communication transmission, Indicates user vehicle and ES The small-scale fading channel power gain is used to describe the rapid fluctuation of the signal in a short time or short distance caused by multipath propagation. It is modeled as Rayleigh fading, that is, its power gain follows an exponential distribution with a mean of 1.
[0024] Energy consumption on Elasticsearch (ES) primarily comprises two parts: transmission and computation. Therefore, in ES... Complete the sub-tasks The total energy required is: (5) in, Indicates ES Energy consumption of each computing resource.
[0025] (3) Opportunity vehicle calculation unloading model: This means that when the vehicle's computing resources are insufficient to meet the task requirements, the vehicle may assist in calculating the user's needs if there are available idle computing resources nearby. The first Subtask And return the calculation results to the vehicle. In this case, subtasks The total execution latency in opportunity vehicle computation includes upload latency, task execution time, and wait-for-response latency, expressed as: (6) in, The calculation method can be referred to in formula (4).
[0026] When subtask Unloaded to opportunity vehicle At this time, because the opportunity vehicle may serve multiple requests simultaneously, the task needs to enter the waiting queue. Defined as the estimated waiting time, and incorporating a resource availability factor. This represents the probability that an opportunistic vehicle will experience resource fluctuations due to its local tasks or mobility. Simultaneously, this formula is primarily used for a coarse-grained evaluation of unloading in the first phase, serving as a fitness reference for the quantum genetic algorithm; while the precise execution time, considering task priority and dependencies, will be accurately determined in the PPO task scheduling model of the second phase. The estimated waiting time model is expressed as: (7) in, Indicates in subtask Priority vehicle The set of subtasks that already exist in the queue. Subtasks Computational complexity Indicates opportunity vehicle Its computing power.
[0027] In the opportunity vehicle Complete the sub-tasks The total energy required is similar to that of offloading to ES, and is expressed as follows: (8) Based on the actual start time of the task and actual execution completion time This is used to determine the priority order of task scheduling. Because different subtasks belonging to the same in-vehicle task have dependencies, subtasks... It cannot be processed until all its prerequisite tasks are completed. Therefore, subtasks Preparation time for: (9) in, Subtasks The set of prerequisite tasks, i.e., subtasks Must be in subtask The subtask is executed only after it is completed; therefore, the actual start time of the subtask's execution is... for: (10) in, This indicates that the subtask is unloaded to ES or the Opportunity Vehicle. Then prepare for the earliest possible time to execute the task. At this point, the subtask... Actual execution completion time for: (11) Therefore, the actual start time of the subtask is converted into a task scheduling strategy. .
[0028] This embodiment uses joint optimization calculation to determine the unloading decision. and task scheduling strategy The goal is to minimize the system cost function, which consists of task execution latency and system energy consumption. To achieve this, a weighted combination function of task execution latency and system energy consumption is constructed. The mathematical expression of the objective function is as follows: (12) in, and These represent weighting factors for latency and energy consumption, respectively, and these values can be set according to user preferences. The constraints... Task offloading decision constraints for subtasks ensure that each subtask can only execute on a single processor. (Constraint conditions) This indicates that the computing resources allocated to a task must not exceed the total resource limit; this is a constraint. This indicates that the task is... All prerequisite tasks The task will only begin execution when all other tasks have been completed and there are available computing resources. (Constraints) This ensures that the actual start time of the task satisfies the task dependency relationship, i.e., the subtask. Need to be done in subtasks Execution will begin after completion, including constraints. Guarantee the user's vehicle All subtasks The execution is considered complete only after all conditions have been met; constraints apply. This indicates that the execution time of a subtask must meet the maximum tolerable delay of the task, and the constraint conditions are as follows. This indicates the maximum computing resource limit for user vehicles, ES (Entity Execution System), and opportunity vehicles.
[0029] The algorithm design in this embodiment is as follows: The problem The problem is broken down into two sub-problems. First, in the first stage, an improved quantum genetic algorithm (IQGA) is proposed to solve for the optimal computational offloading decision. Then, in the second stage, the graph optimization problem is modeled as a Markov Decision Process (MDP), and a two-stage task scheduling optimization algorithm combining data and model-driven approaches based on proximal policy optimization (PPO) is proposed, using PPO as the framework for reinforcement learning. The specific flowchart is as follows... Figure 3 As shown.
[0030] The computational unloading optimization problem studies how to select a suitable unloading location (i.e., unloading decision) for each subtask to minimize the system cost of all tasks. This problem can be expressed as: (13) From the above formula, we can see that the problem This is a classic multiprocessor scheduling problem, and metaheuristic algorithms have been widely used. Therefore, this embodiment proposes to solve this subproblem based on an improved quantum genetic algorithm. The quantum genetic algorithm overcomes the limitations of genetic algorithm encoding by introducing quantum state vector expressions to encode genes. It integrates the resource states of the edge computing network into the probability distribution of quantum superposition states and employs a general quantum rotation gate operation, a dynamic rotation angle adjustment mechanism, and a quantum crossover mechanism, effectively improving the algorithm's search range and optimization capability. The specific operation steps of the algorithm are shown in Algorithm 1.
[0031] The coding design process includes: The quantum superposition state is represented as: (14) in, and It is to satisfy The complex number of conditions.
[0032] Set at The quantum population representation of the round-evolution is as follows ,in, Indicates the size of the quantum population. Indicates the first Individual quantum entities, therefore, by A quantum chromosome consisting of qubits is represented as: (15) The construction process of a quantum rotating door includes: The unitary operation of a quantum rotation gate on a qubit is represented as: (16) in, Represents the rotation angle of the quantum gate: (17) in, For the direction of the revolving door, This represents the current quantum chromosome's... Bit, Represents the current optimal quantum chromosome's th... Bit, This indicates the magnitude of the rotation angle.
[0033] To address the issue of standard quantum genetic algorithms easily getting trapped in local optima, this embodiment designs a dynamic adjustment strategy for the quantum rotation gate based on evolutionary states. The rotation angle of the quantum rotation gate is dynamically adjusted according to the fitness change rate of the current iteration. If the fitness change rate is slow, the rotation angle is increased to enhance global search capability; conversely, it is decreased to perform local optimization. Furthermore, this embodiment uses a quantum rotation angle dynamic adjustment strategy table for adjustment, specifying the rotation angle size... and direction Based on the current number of qubits and the value of the current optimal solution, where, .
[0034] The process of constructing the fitness function includes: To avoid congestion in the edge computing network, a correction parameter was added to the fitness function. This parameter primarily adjusts the difference between the maximum and minimum resource utilization of edge nodes to prevent uneven resource allocation in the vehicle-mounted edge computing network. Represented as: (18) in, and These represent the maximum and minimum resource utilization rates of the current edge computing node, respectively. This represents the load balancing coefficient, which is dynamically adjusted based on the current resource utilization of the edge nodes. The variance of the load on each node is used to reflect the degree of load balance in the system.
[0035] Therefore, the fitness function is: (19) Once the decision variables for unloading are determined, the task scheduling problem can be modeled as a DAG scheduling problem, represented as: (20) The Directed Acyclic Graph (DAG) scheduling problem has been proven to be NP-hard. Existing research on DAG scheduling typically employs heuristic algorithms or machine learning algorithms. The core idea of the reinforcement learning-based task scheduling algorithm proposed in this embodiment is to find an optimized graph through reinforcement learning, thereby identifying the optimal task scheduling strategy.
[0036] The process of constructing an MDP includes: The graph optimization problem can be modeled as an MDP. An MDP can be composed of a triplet. It indicates. Among them, Defined as state space, Defined as action space, Defined as a reward function.
[0037] (1) State : Create the DAG graph for the current task The graph is considered as a state, and a Graph Convolutional Network (GCN) is used to encode the state represented by the graph.
[0038] The input feature matrix of GCN Includes the data volume, computational cost, deadline, and in-degree / out-degree information of predecessor / successor nodes for each subtask; the graph topology is represented by an adjacency matrix. This indicates the dependencies between tasks. It is a task The prerequisite task is... Otherwise, it is 0. Meanwhile, to aggregate the feature information of neighboring nodes and capture the topological structure of the DAG, a multi-layer GCN is used for feature extraction. Therefore, the renormalized adjacency matrix is constructed as follows: (twenty one) (twenty two) in, It is the identity matrix. Let be the degree matrix. Then, the th... The interlayer propagation rules of layer GCN are as follows: (twenty three) in, It is the first The node feature matrix of the layer, It is the first The trainable weight matrix of the layer, It is the ReLU activation function.
[0039] By stacking Layer GCN (set in this embodiment) Each node can aggregate its... The neighbor information within the hop range is used to obtain a high-order embedding representation that includes graph topology information and task attributes. .
[0040] To obtain the global state vector for PPO decision-making, this embodiment employs a strategy combining global max pooling and average pooling: (twenty four) Final output These are the state observations that are input into the reinforcement learning policy network and evaluation network.
[0041] (2) Actions This action is defined as being in Adding edges reduces dependencies between tasks, thus narrowing the space of feasible solutions. During optimization, action selection can be divided into two steps: first, selecting the start node, and then selecting the end node. This approach expands the action space from... Shrink to .
[0042] (3) Rewards After the action is completed, the state changes from Change to a new state Image by Transform into a new diagram The reward function can be expressed as: .
[0043] The process of constructing a task scheduling algorithm based on PPO includes: The reinforcement learning algorithm uses PPO as its framework, as shown in Algorithm 2. The PPO algorithm belongs to the policy gradient algorithm family and has a policy network and an evaluation network. The policy network outputs actions based on the state and interacts with the environment; the evaluation network calculates the state value based on the state and estimates the merit of the actions. The objective function of PPO can be expressed as: (25) in, Indicates importance weight, This indicates cumulative discount rewards. This represents the hyperparameter controlling the confidence region. The `clip` function means: if the variable... Less than , then output greater than the upper limit , then output If the value falls between the two, output the variable value.
[0044] In this embodiment, to illustrate the efficiency of the proposed solution, the proposed solution is compared with the four benchmark solutions listed below.
[0045] (1) Local Computing on the Vehicle (LC): requires all on-board computing tasks to be executed locally on the vehicle.
[0046] (2) Only computing on the Edge Server (OCES): All tasks in the request are simultaneously distributed to the roadside edge server.
[0047] (3) Deep Deterministic Policy Gradient (DDPG): A computational offloading method based on DRL that does not consider the resource allocation between different roadside edge servers, relies only on average resource allocation, and ignores the concurrent execution order of task offloading.
[0048] (4) Advantage Actor-Critic (A2C) algorithm: The A2C algorithm is mainly used to realize the computational unloading of dependency tasks.
[0049] The impact of subtask data volume on system cost: Figure 4-5This paper demonstrates the impact of different subtask data sizes on average task execution latency and system energy consumption. Average task execution latency refers to the total time required to complete all subtasks in an onboard service request, while system energy consumption refers to the total energy required for all onboard computing tasks to complete the request. As the subtask data size increases, both average task execution latency and system energy consumption under all four strategies show an upward trend. This is because when each edge computing node executes a task, data transmission latency increases, and the total number of CPU cycles required also increases with the task data size. Compared to the other four strategies, the method proposed in this embodiment can make optimal unloading decisions based on the size of the task input data and optimize task scheduling to minimize system costs under different task distribution conditions. It also utilizes the idle resources of opportunistic vehicles to integrate the network computing resources of Elastic Compute Service (ES), enhancing the computational processing capabilities of the dynamic VEC paradigm. In contrast, the DDPG algorithm, when the task data size increases and the system environment becomes more complex, needs to obtain the optimal action, ignoring the concurrent execution order of task unloading, thus resulting in greater latency and system energy consumption.
[0050] The impact of ES computing power on system cost: Figure 6-7 The impact of different Elasticsearch (ES) processing capabilities on the average execution latency and system energy consumption of vehicle task offloading is demonstrated. Since changes in ES processing capability do not affect the performance of the fully LC strategy, it exhibits a stable trend regardless of changes in edge server processing capability, with consistently high average task execution latency and system energy consumption. In contrast, OCES, DDPG, A2C, and the proposed algorithm all show a decreasing trend in average execution latency and system energy consumption as ES processing capability increases. Furthermore, the trend indicates that when ES computing capability reaches a higher level, stronger computing power can allocate more resources to tasks, thereby reducing average task execution latency and system energy consumption. Notably, compared to DDPG and A2C, the proposed algorithm still maintains lower average task execution latency and system energy consumption. The OCES algorithm tends to offload tasks to ES, which may prolong network transmission time and increase energy consumption. The proposed algorithm reduces the load on ES by employing reasonable task offloading and scheduling strategies to offload onboard computing tasks to nearby idle opportunity vehicles, providing reliable computing support in different environments, reducing vehicle waiting time and task execution time, and thus reducing system energy consumption.
[0051] The impact of the number of opportunity vehicles on system cost: Figure 8The impact of different numbers of opportunity vehicles on the average execution latency of task offloading is shown. It can be seen that, with the increase of the number of opportunity vehicles, the average execution latency of the other four strategies (except for the LC strategy) shows a decreasing trend. Due to the increase in the number of opportunity vehicles, more opportunity vehicles are available near the user vehicle, allowing idle opportunity vehicles to select more suitable resources for the user vehicle, accelerating task processing speed and thus reducing the average execution latency. In contrast, the OCES method, which only uses ES scheduling, results in the longest average execution latency. This is attributed to the fact that all tasks are offloaded to ES, leading to extended pre-execution transmission and waiting times. For the DDPG scheme, because the distributed offloading decisions of each vehicle agent cannot observe the behavior of other agents, there is a lack of further ways to achieve distributed agent cooperation, resulting in a relatively large average execution latency. Figure 9 The impact of different numbers of opportunity vehicles on the system energy consumption for task offloading is demonstrated. As the number of opportunity vehicles increases, the LC method alone consumes significantly more energy than other methods when executing computational tasks, while the system energy consumption of the other strategies gradually decreases after all tasks are completed. When the number of opportunity vehicles reaches approximately 30, the overall trend stabilizes. This is because, with the increase in the number of opportunity vehicles, the available resources in the entire dynamic VEC paradigm system also increase, and the range of choices for user vehicle task offloading gradually expands. Therefore, as the number of opportunity vehicles increases, latency decreases, and the average energy consumption of the system also decreases. Figure 8-9 As can be seen, compared with OCES, DDPG, and A2C algorithms, the proposed algorithm consistently achieves lower target values. A comprehensive analysis of the average task execution latency and system energy consumption clearly shows that optimizing both parameters simultaneously presents numerous challenges.
[0052] Impact of Repetition: Next, the impact of the number of times a subtask is repeated on the average execution latency and system energy consumption is analyzed to verify the advantages and influencing factors of the dynamic VEC network computing power pool. The number of repetitions is defined as the average number of times a subtask is reused. Figure 10-11 The study demonstrates the changing trends of average task execution latency and system energy consumption as the average number of repetitions increases. Regardless of whether subtask merging is used, the average task execution latency and system energy consumption of the proposed method show an upward trend with increasing average repetitions. This is because the increase in the number of user vehicles leads to a corresponding increase in the number of subtasks that need to be unloaded and scheduled, and the computational energy consumption of these subtasks cannot be ignored. After merging identical subtasks, the average task execution latency and system energy consumption are significantly reduced. In summary, the scheme of constructing a temporary computing power pool can effectively solve the problems of subtask dependency and repetition, reduce time and energy consumption, and effectively manage the limited resources in the VEC network.
[0053] The impact of load balancing on task execution latency: Finally, the impact of introducing modified parameters into the quantum genetic algorithm on task execution latency is compared and analyzed, proving its effectiveness in avoiding ES congestion. Figure 12 The impact of the correction factor in the proposed improved quantum genetic algorithm on the average task execution latency is illustrated under different numbers of user vehicles (i.e., system load). In the legend, the improved quantum genetic algorithm is represented by I-QGA, and the standard quantum genetic algorithm is represented by S-QGA. Experimental results show that as the number of vehicles increases from 20 to 100, the computational load gradually increases, and the average task execution latency under both strategies shows an upward trend. Specifically, in the low-load stage, computing resources are relatively abundant, and the difference between the two strategies is small. However, in the high-load stage, the strategy without a correction factor, due to the lack of explicit constraints on global load balancing, is prone to overloading some ES or opportunistic vehicles, leading to a sharp increase in total latency. This indicates that by dynamically sensing the load status of the edge network computing pool through parameter correction and guiding tasks to lightly loaded nodes, local congestion is effectively avoided, ensuring a low average task execution latency even under limited computing resources.
[0054] On the other hand, this embodiment also provides an electronic device, including a memory, a processor, and a computing program stored in the memory and executable on the processor, wherein the processor implements the method when executing the computing program.
[0055] On the other hand, this embodiment also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method.
[0056] The above are merely preferred embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for offloading dependent task computation based on a collaborative vehicle-mounted edge computing network, characterized in that, include: Construct a dynamic vehicular edge computing network paradigm consisting of user vehicles, opportunistic vehicles, and edge servers, wherein opportunistic vehicles are vehicles with idle computing resources and predictable movement trajectories. Identify the in-vehicle computing tasks with dependencies generated by the user vehicle, and represent the tasks as a directed acyclic graph, wherein repeated subtasks are merged in the directed acyclic graph; Based on the resource status of the dynamic vehicle edge computing network paradigm and the directed acyclic graph, the computation offloading decision of the subtask is determined. The offloading decision includes local execution, offloading to an edge server for execution, or offloading to an opportunistic vehicle for execution. Based on the computational unloading decision, the subtasks are scheduled to determine the execution order and start time of each subtask.
2. The method according to claim 1, characterized in that, The in-vehicle computing task with dependencies generated by identifying the user's vehicle includes: Obtain the set of subtasks generated by the user's vehicle, where each subtask is represented by a triplet of data volume, required computing resources, and maximum tolerable latency. Construct an initial directed acyclic graph based on the execution order dependencies between subtasks; Identify and merge identical subtasks in the initial directed acyclic graph to eliminate redundant computations.
3. The method according to claim 1, characterized in that, The determination of the computational unloading decision includes: The computation offloading problem is modeled as a multiprocessor scheduling problem; An improved quantum genetic algorithm is used to solve the problem to obtain an offloading decision that minimizes the system cost function, where the system cost function is a weighted sum of task execution delay and system energy consumption; The process of minimizing the system cost function satisfies the following constraints: each subtask is executed on only one processor; the computing resources allocated to the task do not exceed the total amount of processor resources; the subtask must begin execution only after all its preceding tasks have been completed; and the actual execution time of the subtask does not exceed its maximum tolerable delay.
4. The method according to claim 3, characterized in that, The improved quantum genetic algorithm includes: The offloading decision of the subtask is represented by qubit encoding; The quantum population is updated using a quantum rotation gate, where the rotation angle is dynamically adjusted based on the algorithm's evolutionary state. A load balancing correction coefficient is introduced into the fitness function. This correction coefficient is dynamically calculated based on the variance of resource utilization of edge computing nodes.
5. The method according to claim 1, characterized in that, Scheduling the subtasks includes: The task scheduling problem is modeled as a Markov decision process; The Markov decision process is solved using a reinforcement learning method based on proximal policy optimization to obtain the task scheduling policy.
6. The method according to claim 5, characterized in that, The state of the Markov decision process is the directed acyclic graph of the current task, and the encoding of the state is achieved by extracting the topological features and node attribute features of the graph through a graph convolutional neural network.
7. The method according to claim 6, characterized in that, The graph convolutional neural network aggregates multiple neighbor information of nodes by stacking multiple graph convolutional layers and performs global pooling on all node features to generate a global state vector for reinforcement learning decisions.
8. The method according to claim 5, characterized in that, The action of the Markov decision process is to add edges to the directed acyclic graph to reduce task dependencies. The selection of the action includes selecting the start node and the end node in sequence. The computational model for the opportunity vehicle incorporates a resource availability factor and an estimated waiting time. The estimated waiting time is calculated based on the computational load of existing tasks in the vehicle's task queue and the resource availability factor.
9. An electronic device comprising a memory, a processor, and a computing program stored in the memory and executable on the processor, characterized in that, When the processor executes the computing program, it implements the method of any one of claims 1-8.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1-8.