Vehicle-mounted task merging and scheduling method based on key path optimization
By merging high-communication-overhead task pairs in the Internet of Vehicles environment and utilizing critical path analysis, combined with dynamic offloading strategies, the task scheduling sequence and resource allocation are optimized. This solves the dual optimization problem of task completion time and energy consumption in the Internet of Vehicles, and achieves improved task execution efficiency.
Patent Information
- Application Number
- CN202510724454.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-30
- Publication Date
- 2025-09-12
AI Technical Summary
Existing technologies make it difficult to effectively optimize task completion time and energy consumption in a connected vehicle environment. Especially under the influence of vehicle mobility and wireless channel instability, traditional methods are unable to meet the dual requirements of real-time performance and energy efficiency, and lack an adaptive balancing mechanism.
By preprocessing the task graph structure, merging high communication overhead task pairs, optimizing the task graph using critical path analysis, and combining task subset priority calculation and dynamic offloading strategy, the task scheduling order and resource allocation are optimized.
It significantly reduces task completion time and energy consumption, adapts to the dynamic characteristics of vehicle networks, improves task execution efficiency, and is suitable for intelligent transportation and autonomous driving scenarios.
Smart Images

Figure CN120631533A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of vehicle-to-everything (V2X) communication and distributed computing, and specifically to a method for optimizing computing resource allocation and energy efficiency by task merging in a V2X environment, which is particularly suitable for task scheduling scenarios with dependencies. Background Art
[0002] With the rapid development of vehicle-to-everything (V2X) technology, intelligent connected vehicles are faced with the challenge of handling a large number of computational tasks with complex dependencies in scenarios such as autonomous driving, real-time traffic management, and in-vehicle entertainment. These tasks are typically organized as directed acyclic graphs (DAGs), containing dependencies between multiple subtasks. These tasks must be completed within a limited timeframe while meeting low energy consumption requirements. However, vehicle mobility leads to dynamic changes in inter-node distances, wireless channel instability affects data transmission rates, and the heterogeneity of computing resources further complicates task scheduling. Traditional centralized computing methods struggle to meet the dual requirements of real-time performance and energy efficiency in the V2X environment.
[0003] Task offloading technology provides an effective way to solve the problem of resource constraints by migrating computing tasks from the source vehicle to other idle vehicles or edge nodes for execution, thereby sharing the computing load. In existing technologies, task scheduling methods based on algorithms such as HEFT (Heterogeneous Earliest Finish Time) can allocate tasks based on task priority and node capabilities, but they usually act directly on the original task graph and ignore optimizing the task graph structure through preprocessing to reduce communication overhead. In addition, existing solutions rarely consider the dynamic impact of vehicle mobility and channel fluctuations on transmission rate, making it difficult to adapt to the real-time scenarios of the Internet of Vehicles. When optimizing time and energy consumption, they often tend to focus on a single goal and lack an adaptive balancing mechanism.
[0004] Therefore, a comprehensive solution is urgently needed that combines task consolidation and dynamic offloading in the connected vehicle environment, fully leveraging critical path information, vehicle mobility, and channel characteristics to optimize onboard task completion time and energy consumption. To address these shortcomings, this paper proposes an innovative task processing and scheduling method. Through a critical path-aware task consolidation and offloading strategy, it improves the efficiency of task execution in the connected vehicle system and provides a high-performance, energy-efficient scheduling solution for computing tasks in intelligent connected vehicles. Summary of the Invention
[0005] This paper provides a method for merging and scheduling in-vehicle tasks based on critical path optimization. This method aims to optimize task completion time and system energy consumption in connected vehicle environments through task merging, priority calculation, and dynamic offloading. Based on task dependencies in a directed acyclic graph (DAG), this method utilizes critical path analysis to improve task allocation efficiency. It is suitable for scenarios with high dynamism and wireless communication constraints in vehicle networks. The method includes the following steps:
[0006] Step 1: Task merging
[0007] By precalculating the critical path to identify tasks with the greatest impact on completion time, the system prioritizes merging pairs of tasks with high communication overhead to reduce communication latency and optimize the task graph structure. Merging decisions are based on communication time savings, energy savings, and the weighted priorities of critical path tasks. Task subsets are generated, and topological sorting is used to verify the updated task graph's dependencies, ensuring there are no cyclic dependencies.
[0008] Step 2: Task subset priority calculation
[0009] Assigning comprehensive priorities to task subsets to guide scheduling. Recursively ranking task subsets by time is performed based on their average computation and communication times, combined with topological sorting. Energy consumption is recursively ranked based on their average computation and transmission energy consumption. Dynamically adjusted energy weights are used to weight these priorities, balancing time and energy optimization needs.
[0010] Step 3: Uninstalling a subset of tasks
[0011] Based on the overall priority, a priority queue is maintained and a subset of tasks are dispatched to idle vehicle nodes. Incorporating the real-time characteristics of the vehicle network (such as node location and channel status), the overall cost of each node is evaluated, and the lowest-cost nodes are prioritized. Within the cost tolerance range, a secondary decision-making mechanism is used to optimize the allocation results based on the time or energy priority of the tasks.
[0012] Furthermore, the steps for merging tasks in step 1 are:
[0013] Step 1-1, critical path prediction: During the merge processing phase, the critical path of the task graph is estimated by calculating the average execution time and communication time of each task. The critical path prediction is based on the following steps:
[0014] (1) Calculate each task T i The average computation time is:
[0015]
[0016] The CPU i T i The required CPU calculation cycle demand, MedianFreq is the median of the calculation frequency of all idle nodes.
[0017] (2) Calculate the average communication time between each task:
[0018] AvgCommTime i,j =(Result i *1024*8 / AvgRate)
[0019] Result i For task T i The amount of output data, B is the channel width, AvgPower is the average transmit power, and NoisePower is the noise power.
[0020] (3) Starting from the entry task, the computation and communication time are accumulated along the task graph path, the path with the longest total time is selected as the predicted critical path, and the tasks on the path are marked.
[0021] Step 1-2: Evaluate the combined benefits of all task pairs, specifically including:
[0022] Merge task pair T i →T j Profit score
[0023] Score i,j =(1-w_merge)*TimeSaving i,j +w_merge*EnergySaving i,j +CriticalBonus i,j
[0024] Among them: w_merge is the energy consumption weight of the merging decision,
[0025] TimeSaving i,j =CommTime i,j -MergedCompTime i,j , saving time for tasks after merging subsets
[0026] in:
[0027] Calculate time for the merged subset
[0028] EnergySaving i,j =AvgPower×AvgCommTime i,j , is the energy consumption reduced after the merger
[0029] CriticalBonus i,j =w_crit×(|TimeSavingi,j |+|EnergySaving i,j |)
[0030] When T i or T j Applied on the predicted critical path, giving a bonus factor w_erit. CriticalBonus i,j The role of is to prioritize merging these tasks by increasing the merge scores of critical path task pairs, thereby reducing the overall completion time.
[0031] Steps 1-3, merging constraints, specifically include:
[0032] (1) Only merge tasks whose output data volume is greater than the threshold:
[0033] Result i ≥max(0.5×MedianResult,MIN_RESULT_THRESHOLD)
[0034] Where MedianResult is the median of the output data volume, and MIN_RESULT_THRESHOLD is the minimum data volume threshold.
[0035] (2) The scale of the combined tasks shall not exceed
[0036]
[0037] Where N is the number of tasks.
[0038] (3) The number of mergers shall not exceed
[0039]
[0040] MERGE_SCALE_FACTOR is the merge scale factor.
[0041] Steps 1-4, merging operations, specifically include:
[0042] (1) Update the absorber task T i Attributes:
[0043] CPU i ←CPU i +CPU j
[0044] Result i ←Result j
[0045] MergedIDs i ←(MergedIDs i∪MergedIDs j )
[0046] (2) Inherit T j Precursor: For T j Each predecessor Pred (Pred≠T i ), add Pred as T i The predecessor of , and remove T from the successor of Pred j . Redirect T j The successor T k :T k The predecessor from T j Replace with T i Remove T j As T i The successor of , and remove T from the task list j .
[0047] (3) Cycle check: By deep copying the task graph, simulate the merge operation and try to generate a topological sort. If there are no exceptions, the merge is safe.
[0048] Furthermore, the steps for calculating the priority of the task subset in step 2 are as follows:
[0049] Step 2-1, time ranking calculation:
[0050]
[0051] Step 2-2, energy consumption ranking calculation:
[0052]
[0053] in:
[0054] AvgCompEnergy i =CPU i ×ENERGY_COEFFICIENT, the average energy consumption of task subset i
[0055] AvgTxEnergy i =AvgPower×AvgCommTime i,j , is the average communication energy consumption of task subset i
[0056] Where: ENERGY_COEFFICIENT is the CPU energy consumption coefficient, and AvgPower is the average transmit power of the node.
[0057] Step 2-3, comprehensive priority:
[0058] Priority i =(1-w_prio)×Rankt (T i )+w_prio×Rank e (T i )
[0059] Among them: w_prio is the weight of energy consumption. i Determines the order of tasks in the ready task queue, and tasks with higher priority are scheduled for execution first.
[0060] Furthermore, the specific steps of task scheduling in step 3 are:
[0061] Step 3-1, calculate the comprehensive cost of task subset i on idle node n
[0062] Cost i,n =(1-w_node)×EFT i,n +w_node×TaskEnergy i,n
[0063] in:
[0064] w_node is the energy consumption weight
[0065] The earliest completion time of task subset i node n
[0066] EST i,n =max(NodeWait n , DAT i,n ), is the earliest start time of task subset i on node n
[0067] is the data arrival time of task subset i on node n is the transmission rate from predecessor p to node n
[0068] Where: B is the channel width, NoisePower is the noise power, Power P is the transmission power of the node where the predecessor task subset is located. Connectivity(d) is used to determine whether the transmitting node exceeds the maximum communication range between nodes. If it exceeds, Connectivity(d) = 0, otherwise it is 1;
[0069] TaskEnergy i,n =CompEnergy i +TxEnergy i,n , is the total energy consumption of task subset i on node n
[0070] in:
[0071] CompEnergyi =CPU i × ENERGY_COEFFICIENT,
[0072] ENERGY_COEFFICIENT is the CPU energy consumption coefficient
[0073]
[0074] Step 3-2, node selection:
[0075] Filter nodes with a cost lower than MinCost × NODE_SELECTION_COST_TOLERANCE, where NODE_SELECTION_COST_TOLERANCE is the node selection cost tolerance factor.
[0076] Secondary decision: If the task priority is biased towards time, that is, (1-w_prio)×Rank t >w_prio×Rank e , select the computing node with the smallest EFT; otherwise, select the computing node with the smallest TaskEnergy.
[0077] Step 3-3, scheduling process:
[0078] (1) Use the minimum heap to maintain ready tasks and process them in order of priority.
[0079] (2) Assign a node to each task and update the task's EST, EFT, energy consumption, and node waiting time.
[0080] (3) After the task is completed, check whether the subsequent task is ready and add it to the priority queue.
[0081] This paper proposes a method for merging and scheduling on-vehicle tasks based on critical path optimization. This method combines tasks through critical path prediction to reduce communication overhead, and balances time and energy consumption based on task subset priority calculation and dynamic offloading. This method adapts to the dynamic nature of vehicle networks. Experimental results show that it can significantly reduce task completion time and energy consumption, making it suitable for highly dynamic scheduling scenarios such as intelligent transportation and autonomous driving. BRIEF DESCRIPTION OF THE DRAWINGS
[0082] Figure 1 This is the task offloading flow chart of the present invention
[0083] Figure 2 This is an example diagram of the task merging process in a specific embodiment of the present invention. DETAILED DESCRIPTION
[0084] The following is a detailed description of the task loading and resource allocation method in the connected car scenario of the present invention with reference to the accompanying drawings and examples. This method optimizes the completion time and energy consumption of on-board tasks through task merging, task subset priority calculation and task unloading. Consider a mobile edge computing scenario of the Internet of Vehicles. On a certain road section, there are 1 task vehicle and 7 idle vehicles traveling. The task vehicle carries 12 tasks and can be modeled as a directed acyclic graph (DAG). Task attributes include input data volume, CPU cycles, output data volume, task deadline, and task dependencies. Vehicle attributes include: vehicle ID, computing power, transmission power, speed, position, and direction. System parameters include: wireless transmission range between vehicles 100m, channel bandwidth 1MHz, noise power 10 -9 W, and the CPU energy consumption coefficient is 10-10 J / cycle. Specific information is shown in the following table.
[0085] Table 1 Task set information
[0086]
[0087] Table 2 Vehicle set information
[0088] Vehicle ID Computing power (GHz) Transmission power (W) Speed (km / h) Location direction 0 3.0 0.1 40 80 -1 1 5.19 0.2 50 50 1 2 5.99 0.1 71 20 1 3 4.14 0.2 58 140 -1 4 5.27 0.1 49 60 1 5 5.64 0.2 57 40 1 6 4.10 0.1 34 130 -1 7 5.51 0.2 43 0 1
[0089] Step 1: Task merging:
[0090] Step 1-1, predict the critical path of the task set by estimating the average computing time and communication time of the task:
[0091]
[0092] AvgCommTime i,j =(Result i *1024*8 / AvgRate)
[0093] In the experiment, MedianFreq = 5.19GHz. For example, AvgCompTime0 of task 1 = (2*10^8) / (5.19*10^9)≈0.038, and AvgCommTime from task 0 to 1 0,1 ≈0.3086s. The prediction results identify 6 key tasks with IDs = 0, 1, 4, 7, 10, and 11.
[0094] Step 1-2 Combined income calculation:
[0095] Merge task pair T i →T j Profit score
[0096] Score i,j =(1-w_merge)*TimeSavingi,j +w_merge*EnergySaving i,j +CriticalBonus i,j
[0097] Among them: w_merge is the energy consumption weight of the merging decision,
[0098] TimeSaving i,j =CommTime i,j -MergedCompTime i,j
[0099] in:
[0100]
[0101] EnergySaving i,j =AvgPower×AvgCommTime i,j
[0102] CriticalBonus i,j =w_crit×(|TimeSaving i,j |+|EnergySaving i,j |)
[0103] In the experiment, let w_merge = 0.7 and calculate the scores of tasks 4 to 7. 4,7 =3797152.6728, score of task 0 to 1 0,1 =3451956.9753, etc.
[0104] Steps 1-3 merge constraints:
[0105] Output data volume threshold: Result i >=max(0.5*MedianResult, MIN_RESULT_THRESHOLD). In the experiment, MedianResult=500KB, and the threshold is 250KB.
[0106] Merger size limit:
[0107] Maximum number of merges:
[0108] Where MERGE_SCALE_FACTOR = 0.5, we get
[0109] Steps 1-4 merge operations:
[0110] Based on the score sorting and constraints, 6 merges are performed;
[0111] Task 0 and task 1 are merged to form a new task subset 0': the CPU cycles of task subset 0' are 700 million, and the output data volume is 250KB. Task 2, task 5, and task 6 are merged to form a new task subset 2': the CPU cycles of task subset 2' are 1.566 billion, and the output data volume is 400KB. Task 4, task 7, and task 8 are merged to form a new task subset 4': the CPU cycles of task subset 4' are 1.395 billion, and the output data volume is 180KB. Task 10 and task 11 are merged to form a new task subset 10': the CPU cycles of task subset 10' are 1.632 billion, and the output data volume is 50KB. After the merger, the number of task subsets is reduced from 12 to 6, and the task graph is updated to the new dependency relationship. The merging process is as shown in the attached figure. Figure 2 shown.
[0112] Cycle Check: Before each merge, we deep-copy the task graph and attempt to generate a topological sort to verify that there are no cyclic dependencies after the merge. In the experiment, all merges passed this check.
[0113] Step 2: Task subset priority calculation
[0114] The merged task graph contains 6 task subsets (ID = 0', 2', 3, 4', 9, 10'). The time ranking and energy consumption ranking of the tasks are calculated using the following formula:
[0115] Step 2-1 Time ranking:
[0116]
[0117] For example, the AvgCompTime_0 of task subset 0' is (7*10^8) / (5.19*10^9)≈0.1349s, and the successors are {2', 3, 4'}. The Rank is calculated recursively. t (T0)≈2.504.
[0118] Step 2-2 Energy consumption ranking:
[0119]
[0120] in:
[0121] AvgCompEnergy i =CPU i ×ENERGY_COEFFICIENT
[0122] AvgTxEnergy i =AvgPower×AvgCommTime i,j ,
[0123] For example, AvgCompEnergy0 of task subset 0' is 7*10^8*10^-10=0.07J. Rank is calculated recursively. e (T0)≈0.4553.
[0124] Step 2-3 Comprehensive Priority:
[0125] Priority i =(1-w_prio)×Rank t (T i )+w_prio×Rank e (T i )
[0126] In the experiment, w_prio=0.4, task subset 0' has the highest priority (Priority0=2.504), followed by task subset 3 (2.125), task subset 2' (1.810), and so on.
[0127] Step 3: Task uninstallation
[0128] Dynamic task offloading is based on a priority queue, which assigns tasks to source vehicles or idle vehicles to optimize the overall cost. The implementation is as follows:
[0129] Step 3-1 Initialize the ready task:
[0130] Use the minimum heap to maintain ready tasks (tasks with no unfinished predecessors). The initial ready task is task 0'.
[0131] Step 3-2 Comprehensive cost calculation:
[0132] For each task T i And node n calculates the comprehensive cost:
[0133] Cost i,n =(1-w_node)×EFT i,n +w_node×TaskEnergy i,n
[0134] where w_node = 0.3
[0135]
[0136] EST i,n =max(NodeWait n , DAT i,n )
[0137] Step 3-3 Node selection:
[0138] Nodes with a cost lower than MinCost × NODE_SELECTION_COST_TOLERANCE are selected. In the experiment, NODE_SELECTION_COST_TOLERANCE = 1.10. Among the selected nodes, a secondary selection is performed based on the task characteristics. If the priority is time-biased ((1-w_prio)*Rank_t>w_prio*Rank_e), the idle node with the lowest EFT is selected; otherwise, the idle node with the lowest TaskEnergy is selected.
[0139] The task subset allocation results are as follows:
[0140] Task subset 0' (merged from {0, 1}): Assigned to idle vehicle 2, EST = 0s, EFT = 0.1169s, energy consumption 0.07J, cost 0.1028. Task 3: Assigned to idle vehicle 1, EST = 0.1169s, EFT = 0.2812s, energy consumption 0.0984J, cost 0.2264. Task subset 2' (merged from {2, 5, 6}): Assigned to idle vehicle 3, EST = 0.2812s, EFT = 0.5427s, energy consumption 0.1566J, cost 0.4269. Task 9: Assigned to idle vehicle 6, EST = 0.5427s, EFT = 0.6739s, energy consumption 0.0786J, cost 0.4953. Task subset 4' (merged from {4, 7, 8}): assigned to idle vehicle 5, EST = 0.3429s, EFT = 0.5901s, energy consumption 0.1559J, cost 0.4598. Task subset 10' (merged from {10, 11}): assigned to idle vehicle 2, EST = 0.6739s, EFT = 0.9464s, energy consumption 0.1780J, cost 0.7159.
[0141] Through the aforementioned implementation steps, the method of the present invention achieved significant performance optimization in the vehicle network task offloading scenario. Experimental results showed that after adopting the task merging and dynamic offloading strategy, the task graph was reduced from an initial 12 tasks to a 6-task subset, with a final completion time of 0.9464 seconds and a total energy consumption (including computation and input transmission) of 0.737522J.
[0142] To further validate the effectiveness of this method, we compared it with a method that did not use task merging. In this non-merging approach, the task graph remained unchanged with 12 tasks, and the scheduled task completion time was 1.2169 seconds, with a total energy consumption of 0.741221 joules. The comparison results show that the method of the present invention reduced completion time by approximately 22.26% (from 1.2169 seconds to 0.9464 seconds) and reduced total energy consumption by approximately 0.50% (from 0.74122 J to 0.737522 J).
[0143] This implementation effectively reduces communication overhead through task merging, optimizes task scheduling order through priority calculation, and fully utilizes idle vehicle computing resources through task offloading. Experimental results demonstrate the applicability of this approach in highly mobile and dynamically changing vehicular network environments, significantly reducing task execution time while maintaining low energy consumption. This technical solution provides an efficient and reliable solution for task offloading and scheduling in vehicular networks, suitable for applications with high real-time requirements, such as intelligent transportation and autonomous driving.
Claims
1. A vehicle-mounted task merging and scheduling method based on critical path optimization, applied in a vehicle networking environment, characterized in that: Graph theory is introduced into the offloading of complex vehicle tasks. By analyzing the task dependencies in the form of a directed acyclic graph, task execution and resource allocation are optimized in combination with the critical path to reduce task completion time and energy consumption. The method includes the following steps: (1) Task merging: Based on the communication overhead and critical path analysis between tasks, task pairs with high communication overhead are identified, tasks that meet the preset conditions are merged to form an optimized task subset, and the dependencies of the task graph are adjusted; (2) Task subset priority calculation: Based on the computing time and energy consumption characteristics of the task subset, combined with the topological order of the task graph, computing time ranking and energy consumption ranking, a comprehensive priority is generated through a weighted method to guide the scheduling of the task subset; (3) Task offloading: Based on the comprehensive priority and real-time characteristics of the vehicle network, a subset of tasks is dispatched to idle vehicles, and the allocation nodes are selected based on the comprehensive cost to optimize the overall performance of task allocation.
2. The method according to claim 1, characterized in that In step (1), the task merging includes: First, the critical path of the task graph is pre-calculated, and the critical tasks that have a decisive impact on the completion time are identified based on the computation time and communication time of the tasks. Second, the merging benefit of each task pair is calculated, which is based on the communication time savings and energy savings, and a weighted reward is applied to the task pairs on the critical path. Then, according to the preset merging conditions, including the communication overhead threshold and the task number limit, the tasks with higher benefits are merged to form a task subset. Finally, the dependency relationship of the merged task graph is updated, and the acyclic dependency is verified by topological sorting to ensure the structural integrity of the task graph.
3. The method according to claim 1, characterized in that In step (2), the task subset priority calculation includes: First, based on the topological sorting of the task graph, the average computation time and communication time of the task subset are reversely recursively calculated to generate a time ranking. Then, based on the topological sorting of the task graph, the average computation energy consumption and transmission energy consumption of the task subset are reversely recursively calculated to generate an energy consumption ranking. Finally, the time ranking and energy consumption ranking are combined to calculate the comprehensive priority through a dynamically adjusted weight factor. The weight is adaptively adjusted according to the real-time load and communication status of the vehicle network.
4. The method according to claim 1, wherein In step (3), the task offloading includes: First, the ready task queue is maintained based on the comprehensive priority, and the task subset with the highest priority is scheduled first. Second, the comprehensive cost of each node is calculated based on the execution time and energy consumption of the task subset, combined with the real-time location and communication status of the vehicle network. Then, based on the node with the lowest cost, a cost tolerance threshold is set, and the node with the lowest comprehensive cost or that meets the task optimization goal is selected from the tolerance range for allocation. If the task subset prioritizes time, the node with the lowest earliest completion time is selected. If energy consumption is prioritized, the node with the lowest total energy consumption is selected. Finally, the waiting time and task status of the assigned node are updated, and the task dependencies are adjusted until all task subsets are assigned.
5. The method according to claims 1 to 4, characterized in that The method is applied to the Internet of Vehicles environment, including but not limited to intelligent transportation, autonomous driving, in-vehicle entertainment or real-time data processing scenarios, and reduces task completion time and energy consumption by optimizing task scheduling, thereby adapting to the high dynamics and real-time requirements of vehicle networks.
Citation Information
Cited By
Complex scene-oriented adaptive intelligent decision-making system and method
CN122194875A