Method, device and storage medium for cluster-based vehicle task offloading

By constructing a system model and determining the optimal unloading strategy, the problem of poor task unloading performance in vehicle clusters was solved, stable communication between vehicles was achieved, the task unloading performance of vehicle clusters was optimized, and the system's execution latency and energy consumption were reduced.

CN115883548BActive Publication Date: 2026-03-31CHINA UNIV OF PETROLEUM (BEIJING)
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-18
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Existing vehicle cluster task offloading schemes suffer from poor task offloading performance and are unable to adapt to dynamic changes in vehicles.

Method used

A system model is constructed, vehicle operation data within a preset range is obtained, task vehicles and cluster heads are divided, execution costs are determined through task generation and unloading models, and the optimal unloading strategy is determined based on the system execution cost, including target cluster selection, unloading ratio and transmission power decisions.

Benefits of technology

It improves the performance of vehicle cluster task offloading, enhances cluster stability and stable communication between vehicles, and optimizes system task execution latency and energy consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115883548B_ABST
    Figure CN115883548B_ABST
Patent Text Reader

Abstract

The application discloses a cluster-based vehicle task offloading method and device and a storage medium. The method comprises the following steps: constructing a system model, including a task generation and offloading model and a cluster generation model; obtaining running data of all vehicles within a preset range; dividing all vehicles into multiple task vehicles and multiple cluster heads; determining the corresponding cluster head of each task vehicle according to the cluster generation model; determining the execution cost of each task vehicle according to the running data through the task generation and offloading model to obtain the system execution cost, and then determining the optimal offloading strategy; the optimal offloading strategy is a target cluster selection decision, a target offloading ratio decision and a target transmission power decision for minimizing the system execution cost. The application constructs a cluster in the direction of the task offloading performance of all task vehicles within a preset range, and simultaneously determines the optimal offloading strategy of the system. The task offloading performance of the system is strong, the stability of the cluster is high, and stable communication between vehicles is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of vehicle edge computing technology, and more specifically to a method, apparatus and storage medium for cluster-based vehicle task offloading. Background Technology

[0002] In recent years, new computationally intensive and latency-sensitive in-vehicle applications such as self-driving and auto navigation have emerged. These applications typically require substantial computing resources and real-time responses, posing a significant challenge to vehicles with limited computing power. To address this challenge, vehicular edge computing (VEC) offloads computationally intensive or latency-sensitive in-vehicle tasks to surrounding vehicles with available computing resources, thereby meeting the latency and computing power requirements of numerous new in-vehicle applications and reducing the vehicle's task execution latency. However, achieving task offloading in vehicular network scenarios characterized by high vehicle speeds, uneven distribution, and constantly changing network topologies is a challenging task. Clustering is considered an effective solution to these problems.

[0003] Currently, researchers both domestically and internationally have conducted extensive research on vehicle clustering and cluster-based on-vehicle task offloading. Regarding vehicle clustering, various existing cluster generation standards exist. For example, one vehicle clustering neighbor tracking strategy forms clusters based on the distance between vehicles. Considering the dynamic changes of vehicles, existing technologies have also proposed a vehicle-compatible clustering scheme, which groups vehicles with similar speeds into a cluster to maintain connectivity within the cluster for a longer period. However, clustering based solely on distance or speed may lead to frequent changes in cluster members. Existing technologies utilize the relative speed and link lifetime of vehicles to establish clusters through base stations, proposing a multi-hop mobile area scheme. However, in practice, due to limitations such as transmission congestion and non-line-of-sight, base stations may not be able to communicate with most vehicles. Furthermore, existing technologies have proposed a cluster-based on-vehicle task offloading scheme that considers the task offloading problem during multi-vehicle travel. Vehicles with service needs can offload their generated tasks to serving vehicles within a nearby cluster. This scheme aims to select the optimal computational task offloading strategy by minimizing system energy consumption while satisfying latency constraints. However, this approach relies on an existing cluster for task unloading, and the cluster generation method does not take into account the effect of task unloading.

[0004] In summary, existing vehicle cluster task offloading schemes suffer from poor task offloading performance and an inability to adapt to dynamic changes in vehicles. Summary of the Invention

[0005] The purpose of this application is to provide a method, apparatus, and storage medium for vehicle task offloading based on a cluster, in order to solve the problems of poor task offloading performance and inability to adapt to dynamic changes in vehicles in the existing vehicle cluster task offloading scheme.

[0006] To achieve the above objectives, the first aspect of this application provides a cluster-based method for offloading in-vehicle tasks, comprising:

[0007] Construct a system model, which includes a task generation and unloading model as well as a cluster generation model;

[0008] Obtain operational data for all vehicles within a preset range;

[0009] Based on the operational data, all vehicles within the preset range are divided into multiple task vehicles and multiple cluster leaders;

[0010] The cluster head for each task vehicle is determined based on the operational data and the cluster generation model.

[0011] The execution cost of each task vehicle is determined by the task generation and unloading model based on the running data of each task vehicle and the cluster head corresponding to each task vehicle.

[0012] The system execution cost is determined based on the execution cost of each task vehicle;

[0013] Determine the optimal unloading strategy based on system execution costs;

[0014] Among them, the optimal offloading strategy is the decision of target cluster selection, target offloading ratio, and target transmission power under the condition of minimizing system execution cost.

[0015] In this embodiment of the application, the operational data includes vehicle speed data and location data. The cluster head for each task vehicle is determined based on the operational data and the cluster generation model, including:

[0016] The distances between the mission vehicle and the multiple cluster heads are determined based on the location data of the mission vehicle and the location data of the multiple cluster heads.

[0017] The speed difference between the mission vehicle and the multiple cluster heads is determined based on the speed data of the mission vehicle and the speed data of the multiple cluster heads.

[0018] The cluster head that meets the preset distance condition and the preset speed condition with respect to the mission vehicle is designated as the cluster head corresponding to the mission vehicle.

[0019] In this embodiment of the application, determining the execution cost of each task vehicle through the task generation and unloading model includes:

[0020] Based on the task generation and unloading model, determine the local latency and local energy consumption generated by the task vehicle when executing on-board tasks locally.

[0021] Based on the task generation and unloading model, determine the unloading latency and unloading energy consumption generated by the task vehicle performing on-board tasks at the edge.

[0022] The execution cost of the mission vehicle is determined based on local latency, local energy consumption, unloading latency, and unloading energy consumption.

[0023] In this embodiment, the system execution cost satisfies formula (1):

[0024]

[0025] Where U is the system execution cost, η1 is the weighting factor for execution latency, and η2 is the weighting factor for execution energy consumption. For local latency, For local energy consumption, To delay unloading, To offload energy consumption, x n,m For cluster selection decisions, y n For the unloading ratio decision, M is the number of cluster heads, and N is the number of candidate vehicles in the cluster.

[0026] In this embodiment of the application, determining the optimal unloading strategy based on system execution cost includes:

[0027] The cluster selection subproblem, offload ratio subproblem, and transmission power subproblem of the system are determined based on the system execution cost.

[0028] Determine the target cluster selection decision based on the cluster selection sub-problem;

[0029] Determine the target unloading ratio decision based on the unloading ratio sub-problem;

[0030] The target transmission power decision is determined based on the transmission power sub-problem.

[0031] In this embodiment of the application, determining the target cluster selection based on the cluster selection sub-problem includes:

[0032] Given the offloading ratio decision and the transmission power decision, the cluster selection subproblem is iterated to obtain the target cluster selection decision.

[0033] In this embodiment of the application, determining the target unloading ratio based on the unloading ratio sub-problem includes:

[0034] Given cluster selection and transmission power decisions, the offloading ratio subproblem is iterated to obtain the target offloading ratio decision.

[0035] In this embodiment of the application, determining the target transmission power based on the transmission power sub-problem includes:

[0036] Given the offloading ratio decision and the cluster selection decision, the transmission power subproblem is iterated to obtain the target transmission power decision.

[0037] A second aspect of this application provides a cluster-based device for offloading vehicular tasks, comprising:

[0038] The memory is configured to store instructions; and

[0039] The processor is configured to retrieve instructions from memory and, when executing instructions, to implement the aforementioned cluster-based vehicle task offloading method.

[0040] A third aspect of this application provides a machine-readable storage medium storing instructions for causing a machine to execute the aforementioned cluster-based vehicle task offloading method.

[0041] The above technical solution first constructs a system model and acquires the operational data of all vehicles within a preset range. Based on the system model, all vehicles within the preset range are divided into multiple task vehicles and multiple cluster heads. Then, based on the operational data and the system model, the cluster head corresponding to each task vehicle and the execution cost of each task vehicle are determined. This leads to the determination of the execution cost of the entire system within the preset range, thus determining the optimal offloading strategy for the system. The optimal offloading strategy comprises the target cluster selection decision, the target offloading ratio decision, and the target transmission power decision, all while minimizing the system's execution cost. This application constructs clusters guided by the task offloading performance of the task vehicles in a system composed of all vehicles within a preset range, and simultaneously determines the optimal offloading strategy for the system. Therefore, the system has strong task offloading performance, and dividing the clusters based on vehicle operational data enhances cluster stability and ensures stable communication between vehicles.

[0042] Other features and advantages of the embodiments of this application will be described in detail in the following detailed description section. Attached Figure Description

[0043] The accompanying drawings are provided to further illustrate the embodiments of this application and form part of the specification. They are used together with the following detailed description to explain the embodiments of this application, but do not constitute a limitation on the embodiments of this application. In the drawings:

[0044] Figure 1 A flowchart illustrating a cluster-based method for unloading in-vehicle tasks provided in this application embodiment;

[0045] Figure 2This is a schematic diagram of the system model under a VEC network provided in a specific embodiment of this application;

[0046] Figure 3 A schematic diagram illustrating the convergence of a cluster-based vehicle task offloading algorithm with a different number of cluster heads, provided in a specific embodiment of this application.

[0047] Figure 4 This is a structural block diagram of a cluster-based vehicle task unloading device provided in an embodiment of this application. Detailed Implementation

[0048] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only for illustration and explanation of the embodiments of this application and are not intended to limit the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.

[0049] It should be noted that if the embodiments of this application involve directional indicators (such as up, down, left, right, front, back, etc.), the directional indicators are only used to explain the relative positional relationship and movement of the components in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indicators will also change accordingly.

[0050] Furthermore, if the embodiments of this application involve descriptions such as "first" or "second," these descriptions are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, features defined with "first" or "second" may explicitly or implicitly include at least one of those features. Additionally, the technical solutions of various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. If the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed in this application.

[0051] Figure 1 This is a flowchart illustrating a cluster-based method for offloading in-vehicle tasks, as provided in an embodiment of this application. Figure 1 As shown in the figure, this application provides a method for unloading vehicle-mounted tasks based on a cluster. The method may include the following steps.

[0052] Step 101: Construct a system model, which includes a task generation and unloading model as well as a cluster generation model.

[0053] In this embodiment of the application, building a system model means building a VEC system, dividing it into clusters, and calculating the optimal strategy for all vehicles in the system to perform on-board tasks. Figure 2 This is a schematic diagram of the system model under a VEC network provided in a specific embodiment of this application. Figure 2 As shown, the system model includes a task generation and unloading model and a cluster generation model. This means that while dividing the system into clusters, it also enables local execution and unloading of onboard tasks within each cluster. To address the issue of insufficient vehicle computing power, this application proposes a task generation and unloading model. In this model, vehicles with limited computing power can unload their generated tasks to vehicles with higher computing power. Furthermore, to maintain stable communication quality between vehicles and ensure stable task unloading, based on the task generation and unloading model, this application proposes a cluster generation model. Each cluster consists of one vehicle with high computing power and multiple vehicles with limited computing power, where vehicles with limited computing power can unload tasks to the vehicle with high computing power.

[0054] Step 102: Obtain the operating data of all vehicles within the preset range.

[0055] In this embodiment, the preset range refers to a specific road segment in reality, and the selection of the road segment depends on actual needs. In one example, the operation data of all vehicles within the preset range is acquired, that is, the operation data of all vehicles operating on that road segment within a set time period is acquired. Since this embodiment aims to model the task generation of a vehicle within a certain period, this period is divided into multiple equal time slots. Therefore, the set time can also be understood as a set time slot, that is, the vehicle operation data is collected within a set time slot, and then the optimal strategy is selected for the execution of the vehicle's onboard tasks on that road segment within a time slot. Because vehicles travel at high speeds, the duration of a cycle can be set relatively short, such as 1 second. In this embodiment, the vehicle operation data may include, but is not limited to, vehicle speed data, vehicle location data, vehicle task transmission rate, vehicle CPU frequency, vehicle maximum transmission power, and vehicle minimum transmission requirements.

[0056] Step 103: Based on the operational data, divide all vehicles within the preset range into multiple task vehicles and multiple cluster leaders;

[0057] In this embodiment, vehicles within a preset range can be divided into cluster heads and task vehicles based on their operational data. Cluster heads are vehicles with high computing power within the system formed by all vehicles within the preset range, whose onboard tasks can be executed locally without offloading. Task vehicles, on the other hand, have lower task processing capabilities, requiring higher latency and energy consumption for local processing, thus necessitating offloading their onboard tasks to other vehicles with higher task processing capabilities. In a specific embodiment, as shown in... Figure 2 In the VEC system shown, M vehicles with high computing power are defined as Cluster Headers (CHs), and N vehicles with limited computing power are defined as Cluster Member Candidates (CMCs). Each CMC can offload generated tasks to a CH. In the embodiments of this application, it is possible to use... The set representing CHs labels, The set of CMCs represents the numbering of CMCs. Once a CMC joins a cluster, it becomes a cluster member (CM) of that cluster. It can be understood that the aforementioned candidate cluster members and cluster members are the task vehicles in the embodiments of this application. A task vehicle is a vehicle that, due to insufficient computing power of its own, needs to offload all or part of the on-board tasks to a vehicle with strong computing power.

[0058] Step 104: Determine the cluster head for each task vehicle based on the running data and the cluster generation model;

[0059] In this embodiment, considering the influencing factors of actual vehicle-to-everything (V2X) scenarios, such as relative speed between vehicles, communication distance between vehicles, vehicle transmission rate, and path loss, this embodiment can determine the cluster head corresponding to each task vehicle through a cluster generation model. The cluster generation model defines the conditions that must be met for establishing a connection between the task vehicle and the cluster head. In one example, these conditions may include the relative speed and distance between the task vehicle and the cluster head, as well as the latency and energy consumption incurred during task unloading. In other words, the cluster head corresponding to a task vehicle can be determined using multiple indicators such as vehicle speed, distance, task unloading latency, and energy consumption, thereby establishing a stable cluster.

[0060] Step 105: Determine the execution cost of each task vehicle based on the running data of each task vehicle and the cluster head corresponding to each task vehicle through the task generation and unloading model.

[0061] In this embodiment, the task execution cost of each task vehicle is the weighted sum of the latency and energy consumption generated by the onboard task of each task vehicle executing locally and by executing at the edge. In one example, to model the task generation of a task vehicle within a certain period, this embodiment divides it into multiple equal time slots. It is worth noting that the interval between each time slot is very short, so the position of the vehicle within each time slot can be considered almost unchanged. At the beginning of each time slot, each task vehicle generates at most one task, and then a suitable plan is formulated for task offloading. Therefore, the execution cost of each task vehicle can be determined through the task generation and offloading model to determine the optimal offloading strategy. In one example, the task generation and offloading model may include a cluster selection decision X, an offloading ratio decision y, and a transmission power decision P. tr They can be expressed by the following formulas:

[0062]

[0063] Where, x n,m ∈{0,1} represents whether the n-th CMC unloads the task to the m-th CH, x n,m =1 indicates that the n-th CMC unloads the task to the m-th CH, x n,m =0 indicates that the n-th CMC has not unloaded the task to the m-th CH, where the n-th CMC represents a task vehicle and the m-th CH represents a cluster head. n ∈[0,1] represents the proportion of tasks to be unloaded determined by the task vehicle. This represents the transmission power of the task vehicle. If a task vehicle chooses to execute all its generated tasks locally, its task offloading ratio is 0; otherwise, each task vehicle can only offload its tasks to the corresponding cluster head. Therefore, x n,m and y n The relationship satisfies formulas (1) and (2):

[0064]

[0065]

[0066] In addition, the transmission power of each mission vehicle is usually limited, satisfying formula (3):

[0067]

[0068] in, This represents the maximum transmission power of the mission vehicle.

[0069] In this embodiment of the application, the task vehicle is the vehicle that needs to unload the task. Therefore, the selection decision X value of the task vehicle is 1. The execution cost of the task vehicle can be determined by the task generation and unloading module based on the on-board task generated by the task vehicle and the running data of the task vehicle and the cluster head corresponding to the task vehicle.

[0070] Step 106: Determine the system execution cost based on the execution cost of each task vehicle.

[0071] In this embodiment, based on the latency and energy consumption of all task vehicles in the system, the system execution cost of the VEC system can be determined by summing the execution costs of all task vehicles; that is, the weighted sum of the execution latency and energy consumption of all task vehicles. Determining the execution cost of each task vehicle based on its onboard task execution latency and energy consumption, and further determining the system execution cost based on the execution costs of all task vehicles, is beneficial for determining the offloading strategy and building the cluster with the goal of minimizing the system's task execution latency and energy consumption, thereby improving the performance of system task offloading.

[0072] Step 107: Determine the optimal offloading strategy based on the system execution cost; wherein, the optimal offloading strategy is the target cluster selection decision, the target offloading ratio decision, and the target transmission power decision under the condition of minimizing the system execution cost.

[0073] In this embodiment, the optimal unloading strategy refers to the target cluster selection decision, target unloading ratio decision, and target transmission power decision for all task vehicles in a system composed of all vehicles within a preset range, which minimizes the latency and energy consumption of the entire system. Specifically, the target cluster selection decision is the dataset containing the cluster selections of all task vehicles that minimizes the latency and energy consumption of the entire system; the target unloading ratio decision is the dataset containing the unloading ratios of all task vehicles that minimizes the latency and energy consumption of the entire system; and the target transmission power decision is the dataset containing the transmission power of all task vehicles that minimizes the latency and energy consumption of the entire system. In this embodiment, since each task vehicle can minimize the task execution latency and energy consumption of the VEC system by optimizing its cluster selection, task unloading ratio, and transmission power, the system execution cost of the VEC system, i.e., the weighted sum of the execution latency and energy consumption of all task vehicles, can be determined by summing the execution costs of all task vehicles, given the latency and energy consumption of all task vehicles in the system. By determining the execution cost of each task vehicle based on the latency and energy consumption of its onboard tasks, and further determining the system's execution cost based on the execution costs of all task vehicles, it is beneficial to determine the offloading strategy and build a cluster with the goal of minimizing the latency and energy consumption of system task execution, thereby improving the performance of system task offloading.

[0074] The above technical solution first constructs a system model and acquires the operational data of all vehicles within a preset range. Based on the system model, all vehicles within the preset range are divided into multiple task vehicles and multiple cluster heads. Then, based on the operational data and the system model, the cluster head corresponding to each task vehicle and the execution cost of each task vehicle are determined. This leads to the determination of the execution cost of the entire system within the preset range, thus determining the optimal offloading strategy for the system. The optimal offloading strategy comprises the target cluster selection decision, the target offloading ratio decision, and the target transmission power decision, all while minimizing the system's execution cost. This application constructs clusters guided by the task offloading performance of the task vehicles in a system composed of all vehicles within a preset range, and simultaneously determines the optimal offloading strategy for the system. Therefore, the system has strong task offloading performance, and dividing the clusters based on vehicle operational data enhances cluster stability and ensures stable communication between vehicles.

[0075] In this embodiment of the application, the operational data includes vehicle speed data and location data. The cluster head for each task vehicle is determined based on the operational data and the cluster generation model, including:

[0076] The distances between the mission vehicle and the multiple cluster heads are determined based on the location data of the mission vehicle and the location data of the multiple cluster heads.

[0077] The speed difference between the mission vehicle and the multiple cluster heads is determined based on the speed data of the mission vehicle and the speed data of the multiple cluster heads.

[0078] The cluster head that meets the preset distance condition and the preset speed condition with respect to the mission vehicle is designated as the cluster head corresponding to the mission vehicle.

[0079] In this embodiment, the cluster head corresponding to a task vehicle can be determined based on the position and speed data in the operational data of the task vehicle and all cluster heads, thereby determining the cluster heads corresponding to each task vehicle in the entire system, and thus dividing the system into clusters. In one instance, the generation of a cluster should meet the following conditions:

[0080] First, since the cluster generation scheme is task offloading oriented, the resulting cluster should be able to achieve the minimum weighted sum of execution latency and energy consumption of the VEC system.

[0081] Second, since a shorter distance between the cluster head and the task workshop means a higher transmission rate and better communication quality, cluster generation is based on the distance between the cluster head and the task workshop. Therefore, the distance between the task vehicle and its corresponding cluster head needs to satisfy formula (4):

[0082]

[0083] Among them, L n,mL represents the transmission distance between the mission vehicle and its corresponding cluster head. max This represents the maximum communication distance between the mission vehicle and the cluster head corresponding to that mission vehicle.

[0084] Third, since the speed difference between the task vehicle and the cluster head can affect the stability of the network connection, task vehicles in the same cluster should have similar speeds, that is, the speed of the task vehicle and the cluster head corresponding to the task vehicle should satisfy formula (5):

[0085]

[0086] in, Represents the speed of the mission vehicle. V represents the speed of the cluster head CH corresponding to this task vehicle. max This represents the maximum speed difference between the mission vehicle and the corresponding cluster head.

[0087] This application takes into account many influencing factors in actual vehicle networking scenarios, such as relative speed between vehicles, communication distance between vehicles, transmission rate of vehicles, path loss, etc. By using multiple indicators such as speed, distance between vehicles, latency of task offloading, and energy consumption to establish a stable cluster, it is beneficial to ensure stable communication between vehicles, thereby improving the performance of system task offloading.

[0088] In this embodiment of the application, determining the execution cost of each task vehicle through the task generation and unloading model includes:

[0089] Based on the task generation and unloading model, determine the local latency and local energy consumption generated by the task vehicle when executing on-board tasks locally.

[0090] Based on the task generation and unloading model, determine the unloading latency and unloading energy consumption generated by the task vehicle performing on-board tasks at the edge.

[0091] The execution cost of the mission vehicle is determined based on local latency, local energy consumption, unloading latency, and unloading energy consumption.

[0092] In this embodiment, the task execution cost of each task vehicle is the weighted sum of the latency and energy consumption incurred by the on-board tasks of each task vehicle when executed locally and when executed at the edge. Local latency refers to the latency incurred by the on-board tasks of the task vehicle when executed locally, and local energy consumption refers to the energy consumption of the on-board tasks when executed locally. Local execution means that the on-board tasks generated by the task vehicle are executed by the vehicle's own system. Offloading latency refers to the latency incurred by the on-board tasks of the task vehicle when executed at the edge, and offloading energy consumption refers to the energy consumption incurred by the on-board tasks of the task vehicle when executed at the edge. Offloading at the edge means that the latency and energy consumption incurred by the on-board tasks of the task vehicle being offloaded to the cluster head at the edge and processed by the cluster head.

[0093] In one example, if the task vehicle executes the generated task locally, the local latency of executing the task satisfies formula (6):

[0094]

[0095] in, For local latency, c n The computational cost required to execute the task locally. This refers to the CPU frequency of the mission vehicle.

[0096] Based on the execution latency, the local energy consumption generated by the vehicle's onboard task during local execution satisfies formula (7):

[0097]

[0098] in, For local energy consumption, It is the computing power of the mission vehicle, and ρ is an energy conversion coefficient whose value is related to the chip architecture.

[0099] In another example, if a task generated by the task vehicle is unloaded to the corresponding cluster head for execution, the execution latency of the task includes: 1) the uplink transmission latency of the task from the task vehicle to the corresponding cluster head; 2) the task processing latency of the corresponding cluster head; and 3) the downlink transmission latency of the task result from the corresponding cluster head back to the task vehicle. This patent considers that the data volume of the task result is usually very small, so the latency of the task result being returned to the task vehicle can be ignored. Therefore, the unloading latency of the task can satisfy formula (8):

[0100]

[0101] in, For unloading delay, s n To determine the amount of data to upload, The CPU frequency of the mission vehicle. This is the uplink transmission rate, which satisfies formula (9):

[0102]

[0103] Among them, W n,m It is the wireless channel bandwidth between the mission vehicle and the corresponding cluster head, h n,m It is the small-scale attenuation gain (following a Rayleigh distribution), N0 is the noise power, and α is the noise power. n,m It is a large-scale attenuation gain that follows the 3GPP path loss model, α n,m It can satisfy formula (10):

[0104] αn,m =128.1+37.6log 10 (L n,m (10)

[0105] It is worth noting that, due to r n,m This affects the communication quality between the mission vehicle and the cluster head; therefore, the transmission rate of each mission vehicle should satisfy formula (11):

[0106]

[0107] in, This represents the minimum transmission rate requirement of the mission vehicle.

[0108] Based on the task unloading delay, the unloading energy consumption of the task can satisfy formula (12):

[0109]

[0110] in, To offload energy consumption, This is the computing power of the cluster head.

[0111] After obtaining the latency and energy consumption of the task vehicle executing onboard tasks locally and at the edge, a weighted sum is performed based on local latency, local energy consumption, offload latency, and offload energy consumption to obtain the execution cost of the task vehicle. Determining the execution cost of the task vehicle by focusing on the latency and energy consumption of its onboard task execution lays the foundation for further determining the system's execution cost. This facilitates determining offload strategies and building clusters with the goal of minimizing the system's task execution latency and energy consumption.

[0112] In this embodiment of the application, the system execution cost satisfies formula (13):

[0113]

[0114] Where U is the system execution cost, η1 is the weighting factor for execution latency, and η2 is the weighting factor for execution energy consumption. For local latency, For local energy consumption, To delay unloading, To offload energy consumption, x n,m For cluster selection decisions, y n For the unloading ratio decision, M is the number of cluster heads, and N is the number of candidate vehicles in the cluster.

[0115] In this embodiment, based on the latency and energy consumption of all task vehicles in the system, the system execution cost of the VEC system can be determined by summing the execution costs of all task vehicles, i.e., the weighted sum of the execution latency and energy consumption of all task vehicles. As shown in formula (13), where η1 and η2 are the weighting factors of execution latency and energy consumption, respectively, and η1 + η2 = 1. Different weighting factors can be set according to different task requirements to adjust the impact of latency and energy consumption on execution cost. For example, when the task is a latency-sensitive task, a large η1 can be set, and when the task is an energy-sensitive task, a large η2 can be set. Determining the execution cost of each task vehicle based on the latency and energy consumption of the onboard task execution of the task vehicle, and further determining the system execution cost based on the execution cost of all task vehicles, is beneficial for determining the offloading strategy and building the cluster based on minimizing the latency and energy consumption of the system's task execution, thereby improving the performance of system task offloading.

[0116] In this embodiment of the application, determining the optimal unloading strategy based on system execution cost includes:

[0117] The cluster selection subproblem, offload ratio subproblem, and transmission power subproblem of the system are determined based on the system execution cost.

[0118] Determine the target cluster selection decision based on the cluster selection sub-problem;

[0119] Determine the target unloading ratio decision based on the unloading ratio sub-problem;

[0120] The target transmission power decision is determined based on the transmission power sub-problem.

[0121] In this embodiment, each task vehicle can minimize the task execution latency and energy consumption of the VEC system by optimizing its cluster selection, task unloading ratio, and transmission power. The cluster selection, task unloading ratio, and transmission power of all task vehicles in the system that minimize the task execution latency and energy consumption of the VEC system are called optimization problems. It should be noted that since the interval of each time slot for collecting vehicle operation data is finite, the amount of data that each cluster head can execute for unloading tasks is finite. Therefore, the amount of data that each cluster head can process in one time slot should satisfy formula (14):

[0122]

[0123] in, This represents the maximum amount of data that the cluster head can process within a time slot. Therefore, the optimization problem can satisfy formula (15):

[0124]

[0125] It is understandable that Formula (15) means that, under the constraints of Formulas (2) to (6) as well as Formulas (11) and (13), the target cluster selection, target task unloading ratio and target transmission power of all task vehicles in the system are determined when the system's time delay and energy consumption are minimized, i.e., the optimal unloading strategy.

[0126] In this embodiment of the application, due to the unknown variables X, y and P in the optimization problem (15) tr Each has its own characteristics (e.g., when y n and When x is a continuous variable, n,m It is a binary variable), and each variable cannot be represented by the other two variables, so it is difficult to obtain the optimal X, y, P by solving problem (15). tr Therefore, in this embodiment, the optimization problem (15) can be decomposed into three independent subproblems: cluster selection, offloading ratio, and transmission power. X, y, and P can then be jointly optimized using an alternating iterative algorithm. tr Three variables are used to obtain the optimal solution to the optimization problem (15). By jointly optimizing the three variables of cluster selection, offloading ratio and transmission power, the task execution latency and energy consumption of the VEC system are minimized to determine the optimization problem. The optimization problem is decomposed into three independent sub-problems. The optimal solution of the original problem is obtained by iteratively solving the problem using an alternating iterative algorithm. This makes the original complex problem easier to solve, thereby improving the system processing efficiency.

[0127] In this embodiment of the application, determining the target cluster selection based on the cluster selection sub-problem includes:

[0128] Given the offloading ratio decision and the transmission power decision, the cluster selection subproblem is iterated to obtain the target cluster selection decision.

[0129] In this embodiment of the application, due to the unknown variables X, y and P in the optimization problem (15) tr Each has its own characteristics (e.g., when y n and When x is a continuous variable, n,m It is a binary variable), and each variable cannot be represented by the other two variables, so it is difficult to obtain the optimal X, y, P by solving problem (15). tr Therefore, after decomposing the optimization problem (15) into three independent subproblems—cluster selection, offloading ratio, and transmission power—X, y, and P can be jointly optimized using an alternating iterative algorithm. tr Three variables are used to obtain the optimal solution to the optimization problem (15).

[0130] In one example, the offloading ratio decision y and the transmission power decision P can be given. tr To determine the cluster selection decision X, the cluster selection subproblem satisfies formula (16):

[0131]

[0132] Because x n,m Since the problem involves two variables, it is a standard 0-1 linear programming problem, which can be solved using the Matlab optimization toolbox (intlinprog function).

[0133] It is understandable that formula (16) means, under the constraints of formulas (2) to (6) and formulas (11) and (13), the unloading ratio decision y and transmission power decision P of each task vehicle in the system are given. tr The goal is to determine the cluster selection decision X for each task vehicle in the system that minimizes the system's execution cost. An alternating iterative algorithm is used to obtain the optimal solution to the original problem through iterative solving, which helps to make the originally complex problem easier to solve, thereby improving the system's processing efficiency.

[0134] In this embodiment of the application, determining the target unloading ratio based on the unloading ratio sub-problem includes:

[0135] Given cluster selection and transmission power decisions, the offloading ratio subproblem is iterated to obtain the target offloading ratio decision.

[0136] In this embodiment of the application, due to the unknown variables X, y and P in the optimization problem (15) tr Each has its own characteristics (e.g., when y n and When x is a continuous variable, n,m It is a binary variable), and each variable cannot be represented by the other two variables, so it is difficult to obtain the optimal X, y, P by solving problem (15). tr Therefore, after decomposing the optimization problem (15) into three independent subproblems—cluster selection, offloading ratio, and transmission power—X, y, and P can be jointly optimized using an alternating iterative algorithm. tr Three variables are used to obtain the optimal solution to the optimization problem (15).

[0137] In one example, given a cluster selection decision X and a transmission power decision P tr To determine the unloading ratio decision y, the unloading ratio subproblem satisfies formula (17):

[0138]

[0139] This problem is a standard linear programming problem, therefore, it can be solved using the Matlab optimization toolbox (linprog function).

[0140] It is understandable that formula (16) means, under the constraints of formulas (2), (3) and (13), the cluster selection decision X and transmission power decision P of each task vehicle in the system. tr The unloading ratio decision y of each task vehicle in the system is determined to minimize the system's execution cost. An alternating iterative algorithm is used to obtain the optimal solution to the original problem through iterative solving, which helps to make the originally complex problem easier to solve, thereby improving the system's processing efficiency.

[0141] In this embodiment of the application, determining the target transmission power based on the transmission power sub-problem includes:

[0142] Given the offloading ratio decision and the cluster selection decision, the transmission power subproblem is iterated to obtain the target transmission power decision.

[0143] In this embodiment of the application, due to the unknown variables X, y and P in the optimization problem (15) tr Each has its own characteristics (e.g., when y n and When x is a continuous variable, n,m It is a binary variable), and each variable cannot be represented by the other two variables, so it is difficult to obtain the optimal X, y, P by solving problem (15). tr Therefore, after decomposing the optimization problem (15) into three independent subproblems—cluster selection, offloading ratio, and transmission power—X, y, and P can be jointly optimized using an alternating iterative algorithm. tr Three variables are used to obtain the optimal solution to the optimization problem (15).

[0144] In one example, given a cluster selection decision X and an offloading ratio decision y, the transmission power decision P can be determined. tr At this point, the transmission power subproblem satisfies formula (18):

[0145]

[0146] It is understandable that formula (18) means, under the constraints of formulas (4) and (11), given the cluster selection decision X and unloading ratio decision y of each task vehicle in the system, determining the transmission power decision P of each task vehicle in the system that minimizes the execution cost of the system. tr .

[0147] In a specific embodiment of this application, experimental analysis has shown that the objective function and constraints of the transmission power subproblem (18) are both convex functions, meaning that the second derivatives of the objective function and constraints are greater than or equal to 0. Therefore, this problem is a problem concerning P. tr This is a convex optimization problem. The specific proof is as follows:

[0148]

[0149]

[0150]

[0151] This problem can be effectively solved using convex optimization methods. First, we write out the dual problem of problem (18), since the solution to the dual problem is the same as the solution to problem (18), and the solution to the dual problem can be easily obtained through the KKT conditions. The specific steps are as follows:

[0152] Step 1: Obtain the dual problem using the Lagrange function.

[0153] The Lagrangian function of formula (18) is as shown in formula (22):

[0154]

[0155] Where λ=[λ1,…,λ N ], β=[β1,…,β N ] represent the Lagrange multipliers of constraints (4) and (11), respectively. According to formula (22), the dual problem of optimization problem (18) can be expressed as:

[0156]

[0157] Step 2: Introduce the optimal solution (P) tr* ,λ * ,β * KKT conditions.

[0158] λ * ,β * ≥0; (24)

[0159]

[0160]

[0161]

[0162] in Indicates about P tr The set of subgradients.

[0163] Step 3: Based on formulas (25)-(27), the optimal solution (P) of the optimization problem can be obtained through the following steps. tr* ,λ * ,β * ).

[0164] Step 1: Let t = 0, initialize λ (t) ,β (t) >0;

[0165] Step 2: Obtain the optimal P based on (25) tr(t) ;

[0166] Step 3: Let t = t + 1, and calculate λ using the gradient descent method. (t) ,β (t) ;

[0167] Step 4: If conditions (26) and (27) in the KKT framework are met, output (P). tr(t) ,λ (t) ,β (t) If the solution is the optimal one, then return to step 2; otherwise, return to step 3.

[0168] To further illustrate this specific embodiment, the gradient descent method is used to obtain λ according to formulas (26) and (27). (t) ,β (t) Formulas (26) and (27) can be further written as:

[0169]

[0170]

[0171] Optimization problems (28) and (29) can be solved using the following gradient descent methods:

[0172]

[0173]

[0174] Where t is the number of iterations, and η1,η2>0 is the step size.

[0175] In another specific embodiment of this application, a cluster-based algorithm for unloading in-vehicle tasks is provided. The pseudocode of this algorithm can be represented as follows:

[0176] Input: CPU frequency of CHs CMCs CPU frequency The set of CHs labels The set of CMCs labels Maximum transmission power of CMCs Minimum transmission rate requirements for CMCs Maximum number of iterations k max Tolerance ε, energy conversion coefficient ρ.

[0177] Output: Cluster selection decision X, offload ratio decision y, transmit power decision P tr .

[0178] 1. Let k = 0, initialize feasible solution X (k) y (k) P tr (k) .

[0179] 2. Calculate the value of the objective function.

[0180] 3. Given y (k) and P tr (k) X is obtained by solving subproblem (15). (k+1) .

[0181] 4. Given X (k+1) and P tr (k) y is obtained by solving subproblem (16). (k+1) .

[0182] 5. Given X (k+1) and y (k+1) P is obtained by solving subproblem (17). tr (k+1) .

[0183] 6. Calculate U (k+1) .

[0184] 7. if|U (k+1) -U (k) |<εor k>k max then

[0185] 8. Output X (k+1) ,y (k+1) ,P tr (k+1) As the optimal solution.

[0186] 9. else

[0187] 10. Let k = k + 1, then return to step 3.

[0188] To verify the effectiveness of the cluster-based vehicle task offloading algorithm, MATLAB programming simulations were performed using the methods provided in the embodiments of this application. The simulation parameters were set as follows:

[0189] The simulation considers M lead vehicles (CHs) and N candidate CMCs (company members) traveling on a 2-kilometer bidirectional road. Assume the data volume s for different tasks... n and the required computational amount c n They are different, but the computational intensity Keeping them unchanged, η1 = 0.5 / s, η2 = 0.5 / J. Other parameter settings are shown in Table 1, which is the simulation parameter setting table, where n-th CMC represents the mission vehicle and m-th CH represents the cluster head.

[0190] Table 1

[0191]

[0192]

[0193] The optimal solution was determined iteratively using the parameter configuration shown in Table 1 to verify the convergence of the above cluster-based vehicle task unloading algorithm. Figure 3 This diagram illustrates the convergence of a cluster-based on-board task offloading algorithm with different numbers of cluster heads, provided in a specific embodiment of this application. Figure 3 As shown, Figure 3 The paper presents the convergence of cluster-based vehicle task offloading algorithms with different numbers of cluster heads, from... Figure 3 As can be seen from the data, although the convergence speed of the cluster-based vehicle task unloading algorithm decreases with the increase of M, the algorithm can still converge quickly within 10 iterations, proving that the cluster-based vehicle task unloading algorithm has fast convergence. Therefore, the alternating iterative algorithm obtains the optimal solution to the original problem through iterative solution, which helps to make the originally complex problem easier to solve, thereby improving the system processing efficiency.

[0194] Figure 4 This is a structural block diagram of a cluster-based vehicle task offloading device provided in an embodiment of this application. Figure 4 As shown in the figure, this application provides a cluster-based vehicle task offloading device, which may include:

[0195] Memory 410 is configured to store instructions; and

[0196] Processor 420 is configured to retrieve instructions from memory 410 and, when executing instructions, to implement the aforementioned cluster-based vehicle task offloading method.

[0197] Specifically, in this embodiment of the application, the processor 420 can be configured to:

[0198] Construct a system model, which includes a task generation and unloading model as well as a cluster generation model;

[0199] Obtain operational data for all vehicles within a preset range;

[0200] Based on the operational data, all vehicles within the preset range are divided into multiple task vehicles and multiple cluster leaders;

[0201] The cluster head for each task vehicle is determined based on the operational data and the cluster generation model.

[0202] The execution cost of each task vehicle is determined by the task generation and unloading model based on the running data of each task vehicle and the cluster head corresponding to each task vehicle.

[0203] The system execution cost is determined based on the execution cost of each task vehicle;

[0204] Determine the optimal unloading strategy based on system execution costs;

[0205] Among them, the optimal offloading strategy is the decision of target cluster selection, target offloading ratio, and target transmission power under the condition of minimizing system execution cost.

[0206] Furthermore, the processor 420 can also be configured as follows:

[0207] Operational data includes vehicle speed and location data. Based on the operational data and the cluster generation model, the cluster head corresponding to each task vehicle is determined, including:

[0208] The distances between the mission vehicle and the multiple cluster heads are determined based on the location data of the mission vehicle and the location data of the multiple cluster heads.

[0209] The speed difference between the mission vehicle and the multiple cluster heads is determined based on the speed data of the mission vehicle and the speed data of the multiple cluster heads.

[0210] The cluster head that meets the preset distance condition and the preset speed condition with respect to the mission vehicle is designated as the cluster head corresponding to the mission vehicle.

[0211] Furthermore, the processor 420 can also be configured as follows:

[0212] The execution cost of each task vehicle is determined through the task generation and unloading model, including:

[0213] Based on the task generation and unloading model, determine the local latency and local energy consumption generated by the task vehicle when executing on-board tasks locally.

[0214] Based on the task generation and unloading model, determine the unloading latency and unloading energy consumption generated by the task vehicle performing on-board tasks at the edge.

[0215] The execution cost of the mission vehicle is determined based on local latency, local energy consumption, unloading latency, and unloading energy consumption.

[0216] In this embodiment of the application, the system execution cost satisfies formula (13):

[0217]

[0218] Where U is the system execution cost, η1 is the weighting factor for execution latency, and η2 is the weighting factor for execution energy consumption. For local latency, For local energy consumption, To delay unloading, To offload energy consumption, x n,m For cluster selection decisions, y n For the unloading ratio decision, M is the number of cluster heads, and N is the number of candidate vehicles in the cluster.

[0219] Furthermore, the processor 420 can also be configured as follows:

[0220] Determining the optimal unloading strategy based on system execution cost includes:

[0221] The cluster selection subproblem, offload ratio subproblem, and transmission power subproblem of the system are determined based on the system execution cost.

[0222] Determine the target cluster selection decision based on the cluster selection sub-problem;

[0223] Determine the target unloading ratio decision based on the unloading ratio sub-problem;

[0224] The target transmission power decision is determined based on the transmission power sub-problem.

[0225] Furthermore, the processor 420 can also be configured as follows:

[0226] Determining the target cluster selection based on the cluster selection sub-problem includes:

[0227] Given the offloading ratio decision and the transmission power decision, the cluster selection subproblem is iterated to obtain the target cluster selection decision.

[0228] Furthermore, the processor 420 can also be configured as follows:

[0229] Determining the target uninstallation ratio based on the uninstallation ratio sub-problem includes:

[0230] Given cluster selection and transmission power decisions, the offloading ratio subproblem is iterated to obtain the target offloading ratio decision.

[0231] Furthermore, the processor 420 can also be configured as follows:

[0232] Determining the target transmission power based on the transmission power sub-problem includes:

[0233] Given the offloading ratio decision and the cluster selection decision, the transmission power subproblem is iterated to obtain the target transmission power decision.

[0234] The above technical solution first constructs a system model and acquires the operational data of all vehicles within a preset range. Based on the system model, all vehicles within the preset range are divided into multiple task vehicles and multiple cluster heads. Then, based on the operational data and the system model, the cluster head corresponding to each task vehicle and the execution cost of each task vehicle are determined. This leads to the determination of the execution cost of the entire system within the preset range, thus determining the optimal offloading strategy for the system. The optimal offloading strategy comprises the target cluster selection decision, the target offloading ratio decision, and the target transmission power decision, all while minimizing the system's execution cost. This application constructs clusters guided by the task offloading performance of the task vehicles in a system composed of all vehicles within a preset range, and simultaneously determines the optimal offloading strategy for the system. Therefore, the system has strong task offloading performance, and dividing the clusters based on vehicle operational data enhances cluster stability and ensures stable communication between vehicles.

[0235] This application also provides a machine-readable storage medium storing instructions that cause a machine to execute the above-described cluster-based vehicle task offloading method.

[0236] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0237] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0238] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0239] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0240] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0241] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0242] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0243] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0244] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A method for cluster-based offloading of vehicular tasks, the method comprising: The method comprises the following steps: constructing a system model, the system model comprising a task generation and offloading model and a cluster generation model, wherein in the task generation and offloading model, a vehicle with limited computing capability offloads a task generated by the vehicle to a vehicle with strong computing capability, and each cluster is composed of one vehicle with strong computing capability and multiple vehicles with limited computing capability; obtaining running data of all vehicles within a preset range; dividing all vehicles within the preset range into multiple task vehicles and multiple cluster heads according to the running data, wherein the cluster head is a vehicle with strong computing capability in the system formed by all vehicles within the preset range, and the vehicle can execute a local task without offloading execution; the task vehicle is a vehicle with poor task processing capability, and the vehicle needs to offload a vehicle-mounted task to another vehicle with strong task processing capability for execution due to high local processing time delay and energy consumption; determining a cluster head corresponding to each task vehicle according to the running data and the cluster generation model, wherein the cluster generation model comprises a limited condition that should be met when establishing a connection between the task vehicle and the cluster head; Based on the operational data of each task vehicle and the cluster head corresponding to each task vehicle, the execution cost of each task vehicle is determined through the task generation and unloading model, wherein the task generation and unloading model includes cluster selection decisions. and transmission power decisions; determining a system execution cost according to the execution cost of each task vehicle; determining an optimal offloading strategy according to the system execution cost, wherein the optimal offloading strategy is a target cluster selection decision, a target offloading ratio decision and a target transmission power decision under the condition that the system execution cost is minimum, the target cluster selection decision is a data set comprising a cluster selection of all task vehicles to minimize the time delay and energy consumption of the entire system, the target offloading ratio decision is a data set comprising an offloading ratio of all task vehicles to minimize the time delay and energy consumption of the entire system, and the target transmission power decision is a data set comprising a transmission power of all task vehicles to minimize the time delay and energy consumption of the entire system; wherein the determination of the cluster head corresponding to each task vehicle according to the running data and the cluster generation model comprises: determining distances between the task vehicle and the multiple cluster heads according to position data of the task vehicle and position data of the multiple cluster heads; determining speed differences between the task vehicle and the multiple cluster heads according to speed data of the task vehicle and speed data of the multiple cluster heads; determining the cluster head as the cluster head corresponding to the task vehicle when the distance between the task vehicle and the cluster head meets a preset distance condition and the speed difference meets a preset speed condition; the determination of the execution cost of each task vehicle through the task generation and offloading model comprises: determining a local time delay and a local energy consumption of the task vehicle in local execution of a vehicle-mounted task according to the task generation and offloading model; determining an offloading time delay and an offloading energy consumption of the task vehicle in edge execution of the vehicle-mounted task according to the task generation and offloading model; determining the execution cost of the task vehicle according to the local time delay, the local energy consumption, the offloading time delay and the offloading energy consumption; the system execution cost satisfies formula (1): ;(1) wherein, a cost for the system, a weight factor for execution latency, a weight factor for execution energy consumption, the local latency, the local energy consumption, the offloading latency, the offloading energy consumption, a cluster selection decision, an offloading ratio decision, M is the number of cluster heads, and N is the number of cluster member candidate vehicles.

2. The method of claim 1, wherein, the determination of the optimal offloading strategy according to the system execution cost comprises: determining a cluster selection sub-problem, an offloading ratio sub-problem and a transmission power sub-problem of the system according to the system execution cost; determining the target cluster selection decision according to the cluster selection sub-problem; determining the target offloading ratio decision according to the offloading ratio sub-problem; determining the target transmission power decision according to the transmission power sub-problem.

3. The method of claim 2, wherein, The determining the target cluster selection according to the cluster selection sub-problem comprises: iterating the cluster selection sub-problem to obtain the target cluster selection decision given an offloading ratio decision and a transmission power decision.

4. The method of claim 2, wherein, The determining the target offloading ratio according to the offloading ratio sub-problem comprises: iterating the offloading ratio sub-problem to obtain the target offloading ratio decision given a cluster selection decision and a transmission power decision.

5. The method of claim 2, wherein, The determining the target transmission power according to the transmission power sub-problem comprises: iterating the transmission power sub-problem to obtain the target transmission power decision given an offloading ratio decision and a cluster selection decision.

6. An apparatus for cluster-based offloading of vehicular tasks, the apparatus comprising: comprises: a memory configured to store instructions; and a processor configured to invoke the instructions from the memory and implement the cluster-based vehicle-mounted task offloading method according to any one of claims 1 to 5 when executing the instructions.

7. A machine-readable storage medium, characterized in that, The machine readable storage medium has stored instructions for causing a machine to perform the cluster-based vehicle-mounted task offloading method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Internet of vehicles multi-target computing task unloading scheduling method based on non-dominated sorting genetic strategy

    CN112995289A

  • Vehicle-mounted task dynamic unloading method

    CN115103407A