Task unloading method and device based on vehicle cluster

By constructing a task offloading method based on vehicle clusters, filtering and merging task vehicles, decomposing and hierarchically processing tasks to be offloaded, the problem of incomplete task offloading caused by high-speed vehicle movement is solved, and the efficiency and delay of task processing are significantly reduced.

CN119342534AActive Publication Date: 2025-01-21CHANGSHA UNIVERSITY OF SCIENCE AND TECHNOLOGY

Patent Information

Application Number
CN202411468010.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-21
Publication Date
2025-01-21
Estimated Expiration
2044-10-21

AI Technical Summary

Technical Problem

The high-speed movement of the vehicle leads to the problem of incomplete unloading of the task. The vehicle may leave the communication range of the edge server when moving at high speed, resulting in the inability to return the task processing results, and thus the application services cannot be provided.

Method used

By constructing a task offloading method based on vehicle clusters, target task vehicles whose task similarity and expected communication duration meet the threshold are selected to form a cluster head, and a vehicle cluster is constructed based on the cluster head and the selected target computing vehicles. Decompose the task to be offloaded into multiple subtasks, merge and remove duplications to ensure that the topological dependencies between subtasks remain unchanged, perform logical layering processing, and finally offload the subtasks to the target computing vehicle or cloud server in the vehicle cluster.

Benefits of technology

By constructing a vehicle cluster whose estimated communication time between vehicles meets the threshold, repeated subtasks in the vehicle cluster are merged, which greatly reduces the amount of data that needs to be transmitted and the amount of calculation required for task processing, thereby reducing the task processing time and solving the problem of high-speed vehicle movement. An issue resulting in incomplete uninstallation of tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119342534A_ABST
    Figure CN119342534A_ABST
Patent Text Reader

Abstract

The invention provides a task unloading method and device based on a vehicle cluster, and the method comprises the steps: screening out target task vehicles of which the task similarity and predicted communication duration meet a threshold value to form a cluster head, forming a vehicle cluster based on the cluster head and the screened target computing power vehicles, decomposing a to-be-unloaded task in the vehicle cluster into a plurality of sub-tasks, and carrying out the task unloading of the sub-tasks. The method comprises the following steps of: obtaining a directed acyclic graph, removing repeated sub-tasks, combining the remaining sub-tasks to obtain the directed acyclic graph on the premise of ensuring that a topological dependency relationship among the sub-tasks is unchanged, logically layering the directed acyclic graph, and unloading the sub-tasks in each layer to an idle computing power vehicle or a cloud server layer by layer. According to the scheme, different from a traditional unloading scheme, the vehicle cluster with the predicted communication duration between the vehicles meeting the threshold value is constructed, the repeated sub-tasks in the vehicle cluster are combined, the data size needing to be transmitted and the task processing calculation amount are greatly reduced, the task processing duration is further shortened, and the task processing efficiency is improved. Therefore, the problem that tasks are not completely unloaded due to high-speed movement of the vehicle is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of vehicle networking, and in particular to a task offloading method and device based on vehicle clusters. Background Art

[0002] In recent years, novel Internet of Vehicles applications have emerged, such as augmented reality, virtual reality, and autonomous driving. They are usually very sensitive to latency and require a lot of computing resources. At present, on-board computing resources are limited, which restricts vehicles from providing real-time services. Therefore, using cellular Internet of Vehicles technology, edge computing and on-board computing are integrated to form multi-layer vehicle edge computing (VEC), and vehicles offload application-related tasks to edge servers and idle computing vehicles on the road.

[0003] In the prior art, the high-speed movement of the vehicle can lead to incomplete unloading problems. That is, before the application-related tasks are unloaded and processed, the high-speed movement of the vehicle causes it to leave the communication range of the edge server, resulting in the vehicle being unable to obtain the processing results of all application-related tasks, and thus unable to provide application services. Summary of the invention

[0004] In view of this, an embodiment of the present invention provides a task offloading method and device based on vehicle clusters, so as to achieve the purpose of solving the problem of incomplete task offloading caused by high-speed movement of vehicles.

[0005] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions:

[0006] A first aspect of an embodiment of the present invention discloses a vehicle cluster-based task offloading method, which is applied to a roadside unit, wherein the roadside unit is communicatively connected to a cloud server, and the method includes:

[0007] Obtaining basic information sent by each task vehicle within the communication range of the roadside unit;

[0008] Based on the basic information of each task vehicle, the task similarity of the tasks to be unloaded between each two task vehicles is calculated. If the task similarity is greater than or equal to the similarity threshold and the expected communication time between the two task vehicles is greater than or equal to the communication time threshold, the target task vehicle is determined; the task to be unloaded is composed of multiple subtasks, and there is a topological dependency relationship between the subtasks;

[0009] Building a cluster head based on each of the target mission vehicles, and calculating the computing power required by the cluster head;

[0010] Based on the computing power required by the cluster head, a target computing power vehicle is selected from idle computing power vehicles within the communication range of the cluster head, and a vehicle cluster is constructed based on the target computing power vehicle and the cluster head;

[0011] For each of the target task vehicles in the vehicle cluster, the corresponding task to be unloaded is decomposed to obtain a plurality of subtasks, and a first directed acyclic graph is constructed based on the topological dependency relationship between the subtasks; each node in the first directed acyclic graph represents a subtask, and an edge between each two nodes represents the topological dependency relationship between the corresponding two subtasks;

[0012] Under the condition that the topological dependency relationship between the subtasks remains unchanged, each of the first directed acyclic graphs is merged and deduplicated to obtain a second directed acyclic graph;

[0013] Performing logical hierarchical processing on the second directed acyclic graph to obtain a plurality of levels including the corresponding subtasks and the number of levels corresponding to the levels;

[0014] According to the number of levels corresponding to each level, the subtasks corresponding to each level are unloaded in turn, so that the subtasks are unloaded to the target computing vehicle or the cloud server in the vehicle cluster.

[0015] Preferably, the basic information includes: vehicle status information and information of the task to be unloaded; based on the basic information of each task vehicle, the task similarity of the task to be unloaded between every two task vehicles is calculated, and if the task similarity is greater than or equal to a similarity threshold and the expected communication time between the two task vehicles is greater than or equal to a communication time threshold, then the target task vehicle is determined, including:

[0016] For each two of the task vehicles, based on the distance formula, the communication duration threshold and the corresponding vehicle status information, the target distance between the two task vehicles is calculated; if the target distance is less than or equal to the communication distance threshold, it is determined that the expected communication duration between the two task vehicles is greater than or equal to the communication duration threshold;

[0017] For the two task vehicles whose expected communication time is greater than or equal to the communication time threshold, the to-be-unloaded task information corresponding to the two task vehicles is compared to obtain task similarity; if the task similarity is greater than or equal to the similarity threshold, the two task vehicles are determined as target task vehicles.

[0018] Preferably, the step of constructing a cluster head based on each of the target mission vehicles and calculating the computing power required by the cluster head includes:

[0019] Selecting the first target mission vehicle that enters the communication range of the roadside unit as the first mission vehicle, and building a cluster head for the first mission vehicle;

[0020] For each of the target task vehicles within the communication range of the cluster head, if the number of hops between the target task vehicle and the first task vehicle is less than or equal to the hop number setting value, and the task similarity between the target task vehicle and the first task vehicle is greater than or equal to the similarity threshold, and the expected communication duration between the target task vehicle and the first task vehicle is greater than or equal to the communication duration threshold, then the target task vehicle is added to the cluster head;

[0021] The computing capacity required by the cluster head is obtained by calculation.

[0022] Preferably, the computing capacity required by the cluster head is used to select a target computing vehicle from idle computing vehicles within the communication range of the cluster head, and a vehicle cluster is constructed based on the target computing vehicle and the cluster head, including:

[0023] Traversing each idle computing vehicle within the communication range of the cluster head, if the estimated communication duration between the idle computing vehicle and any target task vehicle in the cluster head is greater than or equal to the communication duration threshold, then determining the idle computing vehicle as the target computing vehicle, until the sum of the computing capabilities of each target computing vehicle is greater than or equal to the computing capability required by the cluster head;

[0024] A vehicle cluster is constructed based on the target computing power vehicle and each of the target task vehicles in the cluster head.

[0025] Preferably, under the condition that the topological dependency relationship between the subtasks remains unchanged, each of the first directed acyclic graphs is merged and deduplicated to obtain a second directed acyclic graph, including:

[0026] Each edge in each of the first directed acyclic graphs is traversed, and when any two identical edges exist, the two identical edges are merged to obtain a second directed acyclic graph.

[0027] Preferably, the second directed acyclic graph is subjected to logical hierarchical processing to obtain a plurality of hierarchies containing the corresponding subtasks and the number of hierarchies corresponding to the hierarchies, including:

[0028] Divide each of the nodes with an in-degree of 0 in the second directed acyclic graph into the same level, and mark the level number of the level;

[0029] Excluding the nodes that have been divided into the levels, returning to the step of dividing each of the nodes with an in-degree of 0 in the second directed acyclic graph into the same level and marking the level number of the level, until all nodes in the second directed acyclic graph are divided into the corresponding levels, and obtaining multiple levels containing the subtasks corresponding to the nodes.

[0030] Preferably, the unloading process is performed on the subtasks corresponding to each level in turn according to the number of levels corresponding to each level, so that the subtasks are unloaded to the target computing vehicle or the cloud server in the vehicle cluster, including:

[0031] According to the number of levels corresponding to each level, solve the 0-1 knapsack problem for each level in turn, obtain the first subtask of the target computing vehicle to be unloaded to the vehicle cluster in the level, and obtain the second subtask of the target computing vehicle to be unloaded to the cloud server in the level;

[0032] For each of the levels, based on each of the first subtasks corresponding to the level and a greedy strategy, an unloading matrix is ​​obtained, and each of the first subtasks corresponding to the level is unloaded to the target computing vehicle in the vehicle cluster based on the unloading matrix;

[0033] For each of the levels, each of the second subtasks corresponding to the level is offloaded to the cloud server.

[0034] Preferably, for each of the levels, solving the 0-1 knapsack problem to obtain the first subtask of the target computing vehicle to be unloaded to the vehicle cluster in the level, and obtaining the second subtask to be unloaded to the cloud server in the level, include:

[0035] For each of the levels, the computing capacity of the vehicle cluster is used as the capacity of the backpack;

[0036] For each of the subtasks in the hierarchy, the subtask is regarded as an object to be put into the backpack, the computing power required to execute the subtask is regarded as the volume of the object, and the amount of data contained in the subtask is regarded as the value of the object, and the 0-1 backpack problem is solved;

[0037] The subtask corresponding to the object placed in the backpack is determined as a first subtask, and the subtask corresponding to the object not placed in the backpack is determined as a second subtask.

[0038] Preferably, for each of the levels, based on each of the first subtasks corresponding to the level and the greedy strategy, obtaining an unloading matrix includes:

[0039] For each of the levels, the first subtasks corresponding to the level are sorted from large to small according to the data volume, so as to obtain an uninstallation order of the first subtasks;

[0040] Based on the unloading order, for each of the first subtasks in turn, within the communication range of the target task vehicle corresponding to the first subtask, determine the target computing vehicle with the least number of hops to the target task vehicle and whose remaining computing power is greater than or equal to the computing power required to process the first subtask as the target unloading vehicle;

[0041] An unloading matrix is ​​constructed based on the target unloading vehicles corresponding to each of the subtasks.

[0042] A second aspect of an embodiment of the present invention discloses a task offloading device based on a vehicle cluster, which is applied to a roadside unit, wherein the roadside unit is communicatively connected to a cloud server, and the device comprises:

[0043] An acquisition unit, used to acquire basic information sent by each task vehicle within the communication range of the roadside unit;

[0044] A screening unit is used to calculate the task similarity of the tasks to be unloaded between each two of the task vehicles based on the basic information of each task vehicle, and if the task similarity is greater than or equal to a similarity threshold and the expected communication time between the two task vehicles is greater than or equal to a communication time threshold, then the target task vehicle is determined; the task to be unloaded is composed of a plurality of subtasks, and there is a topological dependency relationship between the subtasks;

[0045] A cluster head construction unit, used to construct a cluster head based on each of the target task vehicles and calculate the computing power required by the cluster head;

[0046] A cluster construction unit, configured to select a target computing power vehicle from idle computing power vehicles within the communication range of the cluster head based on the computing power required by the cluster head, and construct a vehicle cluster based on the target computing power vehicle and the cluster head;

[0047] A decomposition unit is used to decompose the corresponding to-be-unloaded task into a plurality of subtasks for each target task vehicle in the vehicle cluster, and construct a first directed acyclic graph based on the topological dependency relationship between each subtask; each node in the first directed acyclic graph represents one subtask, and an edge between each two nodes represents the topological dependency relationship between the corresponding two subtasks;

[0048] A merging and deduplication unit, used to merge and deduplication each of the first directed acyclic graphs under the condition that the topological dependency relationship between each of the subtasks remains unchanged, so as to obtain a second directed acyclic graph;

[0049] A hierarchical unit, configured to perform logical hierarchical processing on the second directed acyclic graph to obtain a plurality of hierarchies containing the corresponding subtasks and hierarchical numbers corresponding to the hierarchies;

[0050] The unloading unit is used to unload the subtasks corresponding to each level in turn according to the number of levels corresponding to each level, so that the subtasks are unloaded to the target computing vehicle or the cloud server in the vehicle cluster.

[0051] Based on the above-mentioned embodiment of the present invention, a task unloading method and device based on vehicle clusters are provided. Target task vehicles whose task similarity and expected communication duration meet the threshold are screened out to form a cluster head. A vehicle cluster is formed based on the cluster head and the screened target computing power vehicles. The tasks to be unloaded in the vehicle cluster are decomposed into multiple subtasks, and repeated subtasks are removed. Under the premise of ensuring that the topological dependencies between subtasks remain unchanged, the remaining subtasks are merged to obtain a directed acyclic graph. The directed acyclic graph is logically layered, and the subtasks in each layer are unloaded layer by layer to idle computing power vehicles or cloud servers. In this scheme, unlike the traditional unloading scheme, a vehicle cluster whose expected communication duration between vehicles meets the threshold is constructed, and repeated subtasks in the vehicle cluster are merged, which greatly reduces the amount of data that needs to be transmitted and the amount of computational effort for task processing, thereby reducing the duration of task processing, thereby solving the problem of incomplete task unloading caused by high-speed movement of vehicles. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0053] Figure 1 An architecture diagram of a multi-layer vehicle-mounted edge computing system model disclosed in an embodiment of the present invention;

[0054] Figure 2 A flowchart of a vehicle cluster-based task offloading method disclosed in an embodiment of the present invention;

[0055] Figure 3 A schematic diagram of a merging and deduplication process disclosed in an embodiment of the present invention;

[0056] Figure 4This is a structural diagram of a task offloading device for a vehicle cluster disclosed in an embodiment of the present invention. DETAILED DESCRIPTION

[0057] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0058] In this application, the terms "comprises", "comprising" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element.

[0059] First, the technical terms appearing in this application are explained as follows:

[0060] 1. Edge computing: It is a distributed computing architecture. In this architecture, data processing, storage, and analysis occur on edge devices or nodes close to the data source, rather than relying on remote centralized data centers or the cloud. This computing model is designed to reduce latency, save bandwidth, and improve real-time data processing capabilities.

[0061] 2. Task dependency: refers to the order in which other related tasks need to be completed before a certain task is completed. In other words, the execution of one task may depend on the completion of another task. For example, when Task A is executed, it needs the result data of Task B and Task C as input, then Task A depends on Task B and Task C.

[0062] 3. Delay sensitivity: In the Internet of Vehicles, some tasks are very sensitive to delay and must be completed in a very short time, otherwise it will affect the performance and even safety of the system. This sensitivity stems from the real-time and high reliability requirements of Internet of Vehicles tasks.

[0063] 4. Vehicle clustering: Multiple vehicles on the road are logically grouped together. The groups help each other share resources, such as computing power (computing capacity), cache content, etc. However, the rapid movement of vehicles on the road will change the relative positions between vehicles, which can easily cause the cluster to dissolve.

[0064] 5. Task offloading: refers to the process of transferring tasks originally performed by a device or node to another device or node in a computing system. Task offloading is usually used to optimize performance, save energy, improve computing efficiency or reduce load.

[0065] 6. Roadside Unit: refers to the communication equipment deployed on the roadside in the Internet of Vehicles, such as base stations, which are used to exchange data and communicate with vehicles. Roadside units are an important part of the Internet of Vehicles infrastructure. They are usually installed on roads, intersections, traffic lights or highways to provide communication support between vehicles and infrastructure.

[0066] 7. Cloud server: A virtual server based on cloud computing that provides computing resources, storage, and network services through the Internet. Unlike traditional physical servers, cloud servers do not rely on specific physical hardware, but are created and managed by cloud service providers on virtualization technology in their data centers.

[0067] 8. Mission vehicle: refers to a vehicle that generates a mission while driving on the road. When the vehicle itself cannot provide sufficient computing power to process the mission, it requests assistance from the outside world.

[0068] 9. Idle computing power vehicles: Vehicles with idle computing power, such as buses and taxis, or private cars, can provide computing power for mission vehicles.

[0069] 10. Computing power: usually refers to computing power, which measures the speed and efficiency of a computer system in processing data and performing tasks. Floating-point operations per second (FLOPS) measures how many floating-point operations a computer can perform per second and is often used to evaluate computing power. Computing power is mainly determined by the following computing resources:

[0070] CPU and GPU performance: The computing power of the central processing unit (CPU) and graphics processing unit (GPU) directly affects the processing speed of the task.

[0071] Memory and storage: Ample memory and fast storage devices (such as SSDs) can increase the speed at which data is read and written, thereby improving overall performance.

[0072] Parallel processing capability: The ability to process multiple tasks or data streams simultaneously.

[0073] like Figure 1 The figure shows an architecture diagram of a multi-layer vehicle-mounted edge computing system model disclosed in an embodiment of the present invention. The model uses cellular vehicle networking technology to integrate edge computing and vehicle-mounted computing to form multi-layer vehicle-mounted edge computing. The model is established in the vehicle networking environment to optimize the problem of related task offloading, including: vehicle layer, edge layer and cloud layer.

[0074] The vehicle layer includes: mission vehicles and idle computing vehicles.

[0075] Among them, the task vehicle generates tasks while driving on the road. When the local area cannot provide sufficient computing power to process the task, it reports information to the base station and other roadside units to request assistance; idle computing power vehicles have idle computing power in the current time slot, such as buses and taxis, or private cars, to provide computing power for the task vehicle.

[0076] The edge layer includes roadside units, of which base stations are the most common. If the task vehicle cannot obtain sufficient computing power support from nearby idle computing vehicles, part of the task will be offloaded to the roadside unit.

[0077] The cloud layer includes cloud servers, which have powerful computing power. Roadside units communicate with cloud servers via optical fiber links.

[0078] According to the IEEE 1609.4 standard, each vehicle needs to broadcast basic information at a certain time interval. After receiving the basic information broadcast by the vehicle, the roadside unit will build a vehicle cluster and formulate a task offloading strategy so that the idle computing vehicles in the vehicle cluster can provide computing power for the task vehicle.

[0079] Based on the multi-layer vehicle-mounted edge computing system model disclosed in the above embodiment of the present invention, Figure 2 As shown, it is a flowchart of a task offloading method based on vehicle clusters disclosed in an embodiment of the present invention, which is applied to a roadside unit in a multi-layer vehicle-mounted edge computing system model, including the following steps:

[0080] S201: Obtain basic information sent by each mission vehicle within the communication range of the roadside unit.

[0081] It should be noted that, in actual roads, according to the IEEE 1609.4 standard, each vehicle needs to broadcast basic information within a certain time interval. In a time cycle, each vehicle broadcasts this basic information at the beginning of a time slot.

[0082] Basic information includes vehicle status information, such as location, speed, direction, acceleration, etc.

[0083] The IEEE 1609.4 standard payload is 39 bytes, and the basic information can be further expanded to include information related to available computing resources (such as CPU frequency) and information about tasks to be offloaded.

[0084] It can be understood that if the basic information contains information about tasks to be unloaded, the vehicle can be determined to be a task vehicle.

[0085] S202: Based on the basic information of each task vehicle, the task similarity of the tasks to be unloaded between every two task vehicles is calculated. If the task similarity is greater than or equal to the similarity threshold and the estimated communication time between the two task vehicles is greater than or equal to the communication time threshold, then the target task vehicle is determined.

[0086] The task to be offloaded is composed of multiple subtasks, and there are topological dependencies between the subtasks.

[0087] In S202 , the task similarity threshold may be adjusted according to the road conditions.

[0088] Among them, task similarity is an indicator that measures how many identical subtasks there are in the unloading tasks generated by two task vehicles in a time period.

[0089] It should be noted that since the subsequent merging and deduplication processing requires merging the tasks of two vehicles whose task similarity reaches the task similarity threshold, in order to reduce the system workload, it is necessary to screen out task vehicles whose task similarity meets the similarity threshold. For example, map resources and processed road information requested at the same time and place do not need to waste resources to repeatedly execute these subtasks. Gathering vehicles with repeated subtasks and sharing the results of repeated subtasks will significantly reduce task processing delays and system energy consumption. On the contrary, the topological dependencies in the total task after the merger will be very complex, which is not conducive to subsequent unloading.

[0090] In S202 , it is also necessary to ensure that the task result can be returned before the link is disconnected, so it is necessary to predict the expected communication duration between task vehicles, that is, the expected duration for which communication can be maintained between task vehicles.

[0091] The mission vehicle that enters the coverage area of ​​the base station and other roadside units is considered to be stable in a short period of time, so its position in the next few seconds can be predicted. By judging whether the mission vehicles are still within the communication distance threshold at the communication time threshold, it is judged whether the mission result can be successfully returned.

[0092] The communication duration threshold is the shortest duration required to ensure that the task result can be returned.

[0093] In the specific implementation process of S202, for every two task vehicles, the target distance between the two task vehicles is calculated based on the distance formula, the communication time threshold and the corresponding vehicle status information. If the target distance is less than or equal to the communication distance threshold, it is determined that the expected communication time between the two task vehicles is greater than or equal to the communication time threshold.

[0094] More specifically, the basic information of the i-th task vehicle is obtained, where i∈[1,M], and M is the total number of task vehicles on the road. The task vehicle is denoted as V={x,y,v,a}, where x and y represent the horizontal and vertical coordinates of V, and v and a represent the velocity and acceleration, which are both vectors.

[0095] The position of the mission vehicle at time t can be expressed as:

[0096]

[0097] The target distance between the two mission vehicles is expressed by the distance formula:

[0098]

[0099] Where X(t) 1 and Y(t) 1 represents the horizontal and vertical coordinates of the first mission vehicle, X(t) 2 and Y(t) 2 are the horizontal and vertical coordinates of the second mission vehicle.

[0100] Let the communication duration threshold be t min , the communication distance threshold of the mission vehicle is d max Therefore, the conditions that need to be met for the estimated communication duration to be greater than or equal to the communication duration threshold are:

[0101] d(t min )≤d max

[0102] It should be noted that for the current time period, after the roadside unit obtains the basic information of each vehicle, it will select two vehicles within the communication range of each other, and determine whether their expected communication time meets the communication time threshold through vehicle status information such as position, speed, acceleration, etc., thereby ensuring the stability of the communication link during task unloading, processing and result transmission.

[0103] For two task vehicles whose expected communication time is greater than or equal to the communication time threshold, the task information to be unloaded corresponding to the two task vehicles is compared to obtain the task similarity. If the task similarity is greater than or equal to the similarity threshold, the two task vehicles are determined as target task vehicles.

[0104] More specifically, the task to be offloaded is decomposed into smaller subtasks, and the task similarity is calculated by whether the subtasks are the same. K is the unloading task of the Kth vehicle, which can be decomposed into n subtasks, where n∈[1,N], N is M K The total number of decomposable subtasks.

[0105] The task similarity is denoted as η, and its value is equal to the two unloading tasks corresponding to the two vehicles (for example, M 1 and M 2 ), the number of similar subtasks divided by the total number of subtasks. From η, we can see the benefits of merging two applications. The higher the similarity, the greater the benefit of merging.

[0106] Let the task similarity threshold be η min , if η is greater than or equal to η min , then the corresponding two mission vehicles are determined as target mission vehicles.

[0107] S203: Building a cluster head based on each target mission vehicle, and calculating the computing power required by the cluster head.

[0108] In S203, the generated cluster head is recorded as CH = {ch_1, ch_2, ..., ch_i}, where ch_i represents a target task vehicle in the cluster head. The target task vehicles in the cluster head have the same subtasks and can be de-duplicated and merged.

[0109] In the specific implementation process of S203, firstly, the first target mission vehicle entering the communication range of the roadside unit is selected as the first mission vehicle, and a cluster head is constructed for the first mission vehicle.

[0110] Then, for each target mission vehicle within the communication range of the cluster head, if the number of hops between it and the first mission vehicle is less than or equal to the hop setting value, and the mission similarity between it and the first mission vehicle is greater than or equal to the similarity threshold, and the expected communication time between it and the first mission vehicle is greater than or equal to the communication time threshold, then the target mission vehicle is added to the cluster head.

[0111] Finally, the computing power required by the cluster head is calculated.

[0112] For example, vehicle A->vehicle B->vehicle C, the number of hops between vehicle A and vehicle C is 2.

[0113] It should be noted that, based on the basic information of the vehicles in the cluster head, the roadside unit can clearly know the computing power required by each target mission vehicle, and thus calculate the computing power required by the cluster head.

[0114] In the embodiment of the present invention, the size of the cluster head is controlled by limiting the number of hops between the first task vehicle joining the cluster head and the subsequent target task vehicles. Since the communication delay within the cluster head is related to the communication distance and the number of vehicles in the cluster head, the hop number setting value can be set higher if the communication distance between the target task vehicles is short in the congested road section, and vice versa, the hop number setting value should be set smaller.

[0115] The target task vehicle within the CH communication range is selected through a loop. If the number of hops between the current target task vehicle and the first task vehicle is less than the set value of the hop number, and the expected communication duration and task similarity both reach the corresponding threshold, the cluster head can be added and the subsequent nodes can continue to be expanded.

[0116] Preferably, it is first determined whether the current target mission vehicle is added to an existing cluster head. If so, the current target mission vehicle is no longer added to the cluster head currently being constructed.

[0117] S204: Based on the computing power required by the cluster head, a target computing power vehicle is selected from idle computing power vehicles within the communication range of the cluster head, and a vehicle cluster is constructed based on the target computing power vehicle and the cluster head.

[0118] In S204, the idle computing vehicles within the communication range of the cluster head are traversed to determine whether the idle computing vehicles meet the expected communication duration requirements. If they meet the requirements, the idle computing vehicles are marked as target computing vehicles. The communication range of the cluster head is the combined communication range of all vehicles in the cluster head.

[0119] In the specific implementation process of S204, each idle computing power vehicle within the communication range of the cluster head is traversed. If the expected communication time between the idle computing power vehicle and any target task vehicle in the cluster head is greater than or equal to the communication time threshold, the idle computing power vehicle is determined to be the target computing power vehicle until the sum of the computing power of each target computing power vehicle is greater than or equal to the computing power required by the cluster head; a vehicle cluster is constructed based on the target computing power vehicle and each target task vehicle in the cluster head.

[0120] It should be noted that since an idle computing vehicle may be within the communication range of multiple cluster heads, this will lead to competition among cluster heads. Therefore, in order to ensure the smooth generation of vehicle clusters, a greedy strategy is adopted to search for idle computing vehicles for cluster heads in turn along the direction of road travel. Only when the previous vehicle cluster has been successfully generated, the next cluster is considered, thus avoiding multiple vehicle clusters competing for the same idle computing vehicle.

[0121] S205: For each target task vehicle in the vehicle cluster, decompose the corresponding task to be unloaded to obtain multiple subtasks, and construct a first directed acyclic graph based on the topological dependency relationship between the subtasks.

[0122] Each node in the first directed acyclic graph represents a subtask, and the edge between each two nodes represents the topological dependency relationship between the corresponding two subtasks.

[0123] In S205, at the beginning of each time slot t, each task vehicle can only generate one unloading task. KGenerated by the kth task vehicle, it consists of N interdependent subtasks, each of which is composed of t n ={C n ,D n}. Among them, C n Indicates the number of CPU cycles required to complete the subtask, that is, the computing power required to complete the subtask, D n Represents the data size of the subtask, and both obey uniform distribution.

[0124] In the specific implementation process of S205, the unloading tasks of each target task vehicle in the vehicle cluster are decomposed based on the topological dependency, and the decomposed subtasks are represented by a directed acyclic graph to obtain a first directed acyclic graph corresponding to each target task vehicle in the vehicle cluster.

[0125] It should be noted that each subtask can only be started after the previous subtask is completed. The topological dependency between two subtasks is express.

[0126] The subtasks and topological dependencies are modeled as a directed acyclic graph, represented as

[0127] in, is the set of nodes in a directed acyclic graph, t n ∈M K Indicates the task to be uninstalled M K The nth subtask in . The is an edge in the directed acyclic graph, representing subtask t b Requires the previous subtask t a The output of t b Must be in t a It can be started only after completion.

[0128] S206: Under the condition that the topological dependency relationship between the subtasks remains unchanged, each of the first directed acyclic graphs is merged and deduplicated to obtain a second directed acyclic graph.

[0129] In S206, the total task is obtained by merging and deduplicating the tasks to be unloaded of the target task vehicles in the vehicle cluster, wherein the tasks to be unloaded of each target task vehicle are represented by each first directed acyclic graph, and the total task is represented by a second directed acyclic graph.

[0130] It is understandable that the target task vehicle is a task vehicle that has been screened by the above task similarity, and there will be some repeated subtasks in its tasks to be unloaded. In order to reduce the workload of the system, each first directed acyclic graph needs to be merged and deduplicated.

[0131] It should be noted that due to the requirements of task dependencies, each subtask needs to comply with strict execution time constraints. The input of each subtask must be the output of its predecessor subtask, and the total task is completed only when all dependent tasks are completed. Therefore, the total task after merging and deduplication needs to ensure that the topological dependency relationship between its internal subtasks remains unchanged, so that the subtasks can be executed in the dependency order during unloading.

[0132] In the specific implementation process of S206, each edge in each first directed acyclic graph is traversed, and when any two identical edges exist, the two identical edges are merged to obtain a second directed acyclic graph.

[0133] It should be noted that when there are two identical edges (Ta, Tb), it means that subtask Ta and subtask Tb exist in both target task vehicles, and the topological dependency between Ta and Tb is the same. This indicates that subtask Tb in the two vehicles receives data from the same preceding subtask Ta, and the calculations performed by subtask Tb in the two vehicles are the same, so the two edges can be merged into one. The second directed acyclic graph represents the total task after merging and deduplication. The process of merging and deduplication is expressed as:

[0134] like Figure 3 As shown, it is a schematic diagram of a merging and deduplication processing disclosed in an embodiment of the present invention.

[0135] For example, Figure 3 The first directed acyclic graphs corresponding to the two tasks to be offloaded are merged and deduplicated, wherein: Figure 3 The tasks to be uninstalled on the left include subtasks: T1 to T7. Figure 3 The tasks to be uninstalled on the right include subtasks T1 to T6, and T8 to T10.

[0136] Figure 3 In the first directed acyclic graph corresponding to the two tasks to be offloaded shown, the edges between T1 and T5 are the same, and they are merged to obtain the second directed acyclic graph corresponding to the total task. The subtasks contained in the second directed acyclic graph include: T1 to T10, among which there are two T6.

[0137] S207: Performing logical hierarchical processing on the second directed acyclic graph to obtain a plurality of hierarchies containing corresponding subtasks and hierarchical numbers corresponding to the hierarchies.

[0138] The specific implementation process of S207 includes:

[0139] S2071: Divide each node with an in-degree of 0 in the second directed acyclic graph into the same level, and mark the level number of the level.

[0140] In a directed acyclic graph, in-degree refers to the number of incoming edges of a node. In other words, in-degree indicates how many edges point to the node.

[0141] S2072: Exclude the nodes that have been divided into levels, and return to execute S2071 until all nodes in the second directed acyclic graph are divided into corresponding levels, and obtain multiple levels containing subtasks corresponding to the nodes.

[0142] It should be noted that each data input is regarded as an in-degree of the node, so that the in-degree of each node can be obtained. Obviously, there will be a node with an in-degree of 0, which is the first layer of the second directed acyclic graph. After removing the nodes of the first layer, new nodes with an in-degree of 0 will appear, and these nodes are regarded as the second layer. Repeat the above operation, removing the previous layer each time, and treating the new nodes with an in-degree of 0 as a new layer. In this way, the layering of the second directed acyclic graph is obtained in a logical hierarchical manner, that is, multiple levels containing subtasks corresponding to the nodes are obtained.

[0143] S208: According to the number of levels corresponding to each level, the subtasks corresponding to each level are unloaded in turn, so that the subtasks are unloaded to the target computing vehicle or cloud server in the vehicle cluster.

[0144] In S208, by solving a 0-1 knapsack problem at each level, the subtasks remaining in the vehicle cluster to be processed by the target computing vehicle are determined, and the subtasks to be offloaded to the cloud server for processing are determined. For the subtasks remaining in the vehicle cluster, an offloading matrix is ​​obtained based on a greedy strategy, and the subtasks are offloaded to the target computing vehicle based on the offloading matrix.

[0145] It should be noted that layer-by-layer processing can significantly reduce the time complexity of the algorithm. Assume that after merging and deduplication, the number of subtasks is n. As the task to be unloaded becomes larger, the more subtasks can be decomposed, and the topological dependencies between its subtasks become more complex accordingly, and can be decomposed into more levels. Assuming that the number of subtasks in one layer is m, the time complexity of solving the 0-1 knapsack problem is O(mP), where P is the number of target task vehicles in the vehicle cluster, and P is less than or equal to m, so the time complexity of this part is approximately O(m^2). Then, using the greedy idea, the subtasks remaining in the vehicle cluster are traversed twice, and the time complexity of this part is approximately O(2m). L is used to represent the number of layers of the second directed acyclic graph corresponding to the task to be unloaded, so the time complexity is O(L*m^2). L*m is approximately equal to n. When the number of subtasks is small, the time complexity is approximately O(N^2). When the number of subtasks is large, O(L*m^2) will be significantly less than O(N^2).

[0146] The specific implementation process of S208 includes:

[0147] S2081: According to the level number corresponding to each level, solve the 0-1 knapsack problem for each level in turn, obtain the first subtask of the target computing vehicle to be unloaded to the vehicle cluster in the level, and obtain the second subtask to be unloaded to the cloud server in the level.

[0148] In the specific implementation process of S2081, for each level, the computing power of the vehicle cluster is used as the capacity of the backpack; for each subtask in the level, the subtask is used as the object to be put into the backpack, the computing power required to execute the subtask is used as the volume of the object, and the amount of data contained in the subtask is used as the value of the object to solve the 0-1 backpack problem; the subtask corresponding to the object put into the backpack is determined as the first subtask, and the subtask corresponding to the object not put into the backpack is determined as the second subtask.

[0149] It should be noted that in this 0-1 knapsack problem, the computing power of the vehicle cluster is regarded as the capacity of the knapsack, each subtask is regarded as an object to be placed in the knapsack, and the required computing power is regarded as the volume of the object. The communication distance is the main cause of communication delay. The communication delay within the vehicle cluster is significantly smaller than the communication delay between the vehicle and the base station. At the same time, the communication delay is mainly related to the task size. Therefore, the subtask with a large amount of data is left in the cluster for processing to reduce the communication delay. Therefore, the size of the subtask is regarded as the value of the object.

[0150] S2082: For each level, based on each first subtask corresponding to the level and the greedy strategy, an unloading matrix is ​​obtained, and each first subtask corresponding to the level is unloaded to the target computing vehicle in the vehicle cluster based on the unloading matrix.

[0151] In the specific implementation process of S2082, based on the unloading order, for each first subtask in turn, within the communication range of the target task vehicle corresponding to the first subtask, the target computing power vehicle with the least number of hops to the target task vehicle and whose remaining computing power is greater than or equal to the computing power required to process the first subtask is determined as the target unloading vehicle; based on the target unloading vehicles corresponding to each subtask, an unloading matrix is ​​constructed.

[0152] For example, the first subtask remaining in the cluster is denoted as t cluster .

[0153] The first step is sorting: Because the amount of data in the subtask is the main factor affecting the transmission delay, we hope that the larger the task, the shorter the transmission distance. cluster The unloading order is obtained by sorting the tasks in reverse order according to their size (in MB), so that the first subtask with a large amount of data is placed in front and is processed first. Then, the tasks are unloaded one by one according to the unloading order.

[0154] The second step is to offload the nearest hop: If the current first subtask t i In vehicle j And there is a target computing vehicle p k In d j If the task is within the communication range, then it is unloaded. α[i][k]=1, indicating that task t i Uninstall to p k .

[0155] The third step is multi-hop uninstallation: the remaining first subtasks that have not been uninstalled are uninstalled in multi-hop order.

[0156] Through the above steps, the offloading matrix can be obtained. Each time, only the first subtask is considered for offloading, without considering its impact on the whole task, which is a greedy strategy.

[0157] S2083: For each level, offload each second subtask corresponding to the level to the cloud server.

[0158] In an embodiment of the present invention, the subtasks placed in the backpack remain in the vehicle cluster and are processed by idle computing power vehicles. The rest will be unloaded to the roadside unit and then transmitted to the cloud server via optical fiber. Then, an unloading decision is made for the subtasks in the vehicle cluster. The present application takes into account multi-hop communication, which makes the scale and scope of the cluster larger, and can better cope with various road conditions compared to traditional single-hop communication. However, when a large amount of data is transmitted over multiple hops, it will result in higher communication delays. Therefore, subtasks with large amounts of data should be unloaded nearby. First, sort the tasks in reverse order by data size. Then, according to the sorting results, larger tasks are unloaded first, and vehicles with idle resources within the one-hop communication range are selected for unloading to reduce transmission delays. Finally, since the target computing power vehicle that is within the one-hop communication range and idle no longer exists. Therefore, through multi-hop transmission, the remaining subtasks are greedily unloaded to the nearest target computing power vehicle.

[0159] Based on the above-mentioned embodiment of the present invention, a task unloading method based on vehicle clusters is disclosed. Target task vehicles whose task similarity and expected communication duration meet the threshold are screened out to form a cluster head. A vehicle cluster is formed based on the cluster head and the screened target computing power vehicles. The tasks to be unloaded in the vehicle cluster are decomposed into multiple subtasks, and repeated subtasks are removed. Under the premise of ensuring that the topological dependencies between subtasks remain unchanged, the remaining subtasks are merged to obtain a directed acyclic graph. The directed acyclic graph is logically layered, and the subtasks in each layer are unloaded layer by layer to idle computing power vehicles or cloud servers. In this scheme, unlike the traditional unloading scheme, a vehicle cluster whose expected communication duration between vehicles meets the threshold is constructed, and repeated subtasks in the vehicle cluster are merged, which greatly reduces the amount of data that needs to be transmitted and the amount of computational effort for task processing, thereby reducing the duration of task processing, thereby solving the problem of incomplete task unloading caused by high-speed movement of vehicles.

[0160] Corresponding to the vehicle cluster-based task offloading method disclosed in the above embodiment of the present invention, Figure 4 , which is a structural diagram of a task unloading device for a vehicle cluster disclosed in an embodiment of the present invention, the device is applied to a roadside unit, the roadside unit is connected to a cloud server for communication, and the device includes:

[0161] The acquisition unit 401 is used to acquire basic information sent by each task vehicle within the communication range of the roadside unit.

[0162] The screening unit 402 is used to calculate the task similarity of the tasks to be unloaded between every two task vehicles based on the basic information of each task vehicle. If the task similarity is greater than or equal to the similarity threshold and the expected communication time between the two task vehicles is greater than or equal to the communication time threshold, then the target task vehicle is determined; the task to be unloaded is composed of multiple subtasks, and there is a topological dependency relationship between the subtasks.

[0163] In one embodiment, the basic information includes: vehicle status information and to-be-unloaded task information, and the corresponding screening unit 402 is specifically used to:

[0164] For each two task vehicles, the target distance between the two task vehicles is calculated based on the distance formula, the communication time threshold and the corresponding vehicle status information. If the target distance is less than or equal to the communication distance threshold, it is determined that the expected communication time between the two task vehicles is greater than or equal to the communication time threshold.

[0165] For two task vehicles whose expected communication time is greater than or equal to the communication time threshold, the task information to be unloaded corresponding to the two task vehicles is compared to obtain the task similarity. If the task similarity is greater than or equal to the similarity threshold, the two task vehicles are determined as target task vehicles.

[0166] The cluster head construction unit 403 is used to construct a cluster head based on each target mission vehicle and calculate the computing power required by the cluster head.

[0167] In one embodiment, the cluster head construction unit 403 is specifically used for:

[0168] The first target mission vehicle that enters the communication range of the roadside unit is selected as the first mission vehicle, and a cluster head is constructed for the first mission vehicle;

[0169] For each target mission vehicle within the communication range of the cluster head, if the number of hops between it and the first mission vehicle is less than or equal to the hop number setting value, and the mission similarity between it and the first mission vehicle is greater than or equal to the similarity threshold, and the expected communication time between it and the first mission vehicle is greater than or equal to the communication time threshold, then the target mission vehicle is added to the cluster head;

[0170] Calculate the computing power required by the cluster head.

[0171] The cluster construction unit 404 is used to select target computing power vehicles from idle computing power vehicles within the communication range of the cluster head based on the computing power required by the cluster head, and construct a vehicle cluster based on the target computing power vehicles and the cluster head.

[0172] In one embodiment, the cluster building unit 404 is specifically configured to:

[0173] Traverse each idle computing vehicle within the communication range of the cluster head. If the estimated communication time between the idle computing vehicle and any target task vehicle in the cluster head is greater than or equal to the communication time threshold, then determine the idle computing vehicle as the target computing vehicle, until the sum of the computing power of each target computing vehicle is greater than or equal to the computing power required by the cluster head;

[0174] A vehicle cluster is constructed based on the target computing power vehicle and each target task vehicle in the cluster head.

[0175] The decomposition unit 405 is used to decompose the corresponding to-be-unloaded task into multiple subtasks for each target task vehicle in the vehicle cluster, and construct a first directed acyclic graph based on the topological dependency relationship between each subtask; each node in the first directed acyclic graph represents a subtask, and the edge between each two nodes represents the topological dependency relationship between the corresponding two subtasks.

[0176] The merging and deduplication unit 406 is used to merge and deduplication each first directed acyclic graph under the condition that the topological dependency relationship between each subtask remains unchanged, so as to obtain a second directed acyclic graph.

[0177] In one embodiment, the combined deduplication unit 406 is specifically used to:

[0178] Each edge in each first directed acyclic graph is traversed, and when any two identical edges exist, the two identical edges are merged to obtain a second directed acyclic graph.

[0179] The layering unit 407 is used to perform logical layering processing on the second directed acyclic graph to obtain a plurality of layers including corresponding subtasks and the number of layers corresponding to the layers.

[0180] In one embodiment, the stratification unit 407 is specifically configured to:

[0181] Divide each node with in-degree 0 in the second directed acyclic graph into the same level and mark the level number of the level;

[0182] Excluding the nodes that have been divided into levels, returning to execute the step of dividing each node with in-degree 0 in the second directed acyclic graph into the same level and marking the level number of the level, until all nodes in the second directed acyclic graph are divided into corresponding levels, and multiple levels containing subtasks corresponding to the nodes are obtained.

[0183] The unloading unit 408 is used to unload the subtasks corresponding to each level in turn according to the level number corresponding to each level, so that the subtasks are unloaded to the target computing vehicle or cloud server in the vehicle cluster.

[0184] In one embodiment, the unloading unit 408 includes:

[0185] The solving subunit is used to solve the 0-1 knapsack problem for each level in turn according to the level number corresponding to each level, to obtain the first subtask of the target computing vehicle to be unloaded to the vehicle cluster in the level, and to obtain the second subtask to be unloaded to the cloud server in the level.

[0186] The first unloading subunit is used to obtain an unloading matrix for each level based on each first subtask corresponding to the level and a greedy strategy, and unload each first subtask corresponding to the level to a target computing vehicle in the vehicle cluster based on the unloading matrix.

[0187] In one embodiment, the first unloading subunit is specifically configured to:

[0188] For each level, the computing power of the vehicle cluster is used as the capacity of the backpack;

[0189] For each subtask in the hierarchy, consider the subtask as an object that should be put into the backpack, the computing power required to execute the subtask as the volume of the object, and the amount of data contained in the subtask as the value of the object, and solve the 0-1 backpack problem;

[0190] The subtask corresponding to the object put into the backpack is determined as the first subtask, and the subtask corresponding to the object not put into the backpack is determined as the second subtask.

[0191] The second unloading sub-unit is used to unload each second subtask corresponding to each level to the cloud server.

[0192] In one embodiment, the second unloading subunit is specifically configured to:

[0193] For each level, the first subtasks corresponding to the level are sorted from large to small according to the data volume, and the unloading order of the first subtasks is obtained;

[0194] Based on the unloading order, for each first subtask in turn, within the communication range of the target task vehicle corresponding to the first subtask, determine the target computing vehicle with the least number of hops to the target task vehicle and whose remaining computing power is greater than or equal to the computing power required to process the first subtask as the target unloading vehicle;

[0195] Based on the target unloading vehicles corresponding to each subtask, an unloading matrix is ​​constructed.

[0196] Based on the above-mentioned embodiment of the present invention, a task unloading device based on vehicle clusters is disclosed. Target task vehicles whose task similarity and expected communication duration meet the threshold are screened out to form a cluster head. A vehicle cluster is formed based on the cluster head and the screened target computing power vehicles. The tasks to be unloaded in the vehicle cluster are decomposed into multiple subtasks, and repeated subtasks are removed. Under the premise of ensuring that the topological dependencies between subtasks remain unchanged, the remaining subtasks are merged to obtain a directed acyclic graph. The directed acyclic graph is logically layered, and the subtasks in each layer are unloaded layer by layer to idle computing power vehicles or cloud servers. In this scheme, unlike the traditional unloading scheme, a vehicle cluster whose expected communication duration between vehicles meets the threshold is constructed, and repeated subtasks in the vehicle cluster are merged, which greatly reduces the amount of data that needs to be transmitted and the amount of computational effort for task processing, thereby reducing the duration of task processing, thereby solving the problem of incomplete task unloading caused by high-speed movement of vehicles.

[0197] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without creative work.

[0198] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0199] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A task offloading method based on vehicle clusters, characterized in that: Applied to a roadside unit, the roadside unit is communicatively connected to a cloud server, the method comprising: Obtaining basic information sent by each mission vehicle within the communication range of the roadside unit; Based on the basic information of each task vehicle, the task similarity of the tasks to be unloaded between each two task vehicles is calculated. If the task similarity is greater than or equal to the similarity threshold and the expected communication time between the two task vehicles is greater than or equal to the communication time threshold, the target task vehicle is determined; the task to be unloaded is composed of multiple subtasks, and there is a topological dependency relationship between the subtasks; Building a cluster head based on each of the target mission vehicles, and calculating the computing power required by the cluster head; Based on the computing power required by the cluster head, a target computing power vehicle is selected from idle computing power vehicles within the communication range of the cluster head, and a vehicle cluster is constructed based on the target computing power vehicle and the cluster head; For each of the target task vehicles in the vehicle cluster, the corresponding task to be unloaded is decomposed to obtain a plurality of subtasks, and a first directed acyclic graph is constructed based on the topological dependency relationship between the subtasks; each node in the first directed acyclic graph represents a subtask, and an edge between each two nodes represents the topological dependency relationship between the corresponding two subtasks; Under the condition that the topological dependency relationship between the subtasks remains unchanged, each of the first directed acyclic graphs is merged and deduplicated to obtain a second directed acyclic graph; Performing logical hierarchical processing on the second directed acyclic graph to obtain a plurality of levels including the corresponding subtasks and the number of levels corresponding to the levels; According to the number of levels corresponding to each level, the subtasks corresponding to each level are unloaded in turn, so that the subtasks are unloaded to the target computing vehicle or the cloud server in the vehicle cluster.

2. The method according to claim 1, characterized in that The basic information includes: vehicle status information and information about the task to be unloaded; based on the basic information of each task vehicle, the task similarity of the tasks to be unloaded between each two task vehicles is calculated, and if the task similarity is greater than or equal to a similarity threshold and the expected communication time between the two task vehicles is greater than or equal to a communication time threshold, the target task vehicle is determined, including: For each two of the task vehicles, based on the distance formula, the communication duration threshold and the corresponding vehicle status information, the target distance between the two task vehicles is calculated; if the target distance is less than or equal to the communication distance threshold, it is determined that the expected communication duration between the two task vehicles is greater than or equal to the communication duration threshold; For the two task vehicles whose expected communication time is greater than or equal to the communication time threshold, the to-be-unloaded task information corresponding to the two task vehicles is compared to obtain task similarity; if the task similarity is greater than or equal to the similarity threshold, the two task vehicles are determined as target task vehicles.

3. The method according to claim 1, characterized in that The step of constructing a cluster head based on each of the target task vehicles and calculating the computing power required by the cluster head includes: Selecting the first target mission vehicle that enters the communication range of the roadside unit as the first mission vehicle, and building a cluster head for the first mission vehicle; For each of the target task vehicles within the communication range of the cluster head, if the number of hops between the target task vehicle and the first task vehicle is less than or equal to the hop number setting value, and the task similarity between the target task vehicle and the first task vehicle is greater than or equal to the similarity threshold, and the expected communication duration between the target task vehicle and the first task vehicle is greater than or equal to the communication duration threshold, then the target task vehicle is added to the cluster head; The computing capacity required by the cluster head is calculated.

4. The method according to claim 1, characterized in that: The computing capacity required by the cluster head is based on the target computing power vehicle being selected from the idle computing power vehicles within the communication range of the cluster head, and a vehicle cluster is constructed based on the target computing power vehicle and the cluster head, including: Traversing each idle computing vehicle within the communication range of the cluster head, if the estimated communication duration between the idle computing vehicle and any target task vehicle in the cluster head is greater than or equal to the communication duration threshold, then determining the idle computing vehicle as the target computing vehicle, until the sum of the computing capabilities of each target computing vehicle is greater than or equal to the computing capability required by the cluster head; A vehicle cluster is constructed based on the target computing power vehicle and each of the target task vehicles in the cluster head.

5. The method according to claim 1, characterized in that Under the condition that the topological dependency relationship between the subtasks remains unchanged, each of the first directed acyclic graphs is merged and deduplicated to obtain a second directed acyclic graph, including: Each edge in each of the first directed acyclic graphs is traversed, and when any two identical edges exist, the two identical edges are merged to obtain a second directed acyclic graph.

6. The method according to claim 1, characterized in that The second directed acyclic graph is subjected to logical layering processing to obtain a plurality of layers including the corresponding subtasks and the number of layers corresponding to the layers, including: Divide each of the nodes with an in-degree of 0 in the second directed acyclic graph into the same level, and mark the level number of the level; Excluding the nodes that have been divided into the levels, returning to the step of dividing each of the nodes with an in-degree of 0 in the second directed acyclic graph into the same level and marking the level number of the level, until all nodes in the second directed acyclic graph are divided into the corresponding levels, and obtaining multiple levels containing the subtasks corresponding to the nodes.

7. The method according to claim 1, characterized in that The method of performing unloading processing on the subtasks corresponding to each level in turn according to the number of levels corresponding to each level, so that the subtasks are unloaded to the target computing vehicle or the cloud server in the vehicle cluster, includes: According to the number of levels corresponding to each level, solve the 0-1 knapsack problem for each level in turn, obtain the first subtask of the target computing vehicle to be unloaded to the vehicle cluster in the level, and obtain the second subtask of the target computing vehicle to be unloaded to the cloud server in the level; For each of the levels, based on each of the first subtasks corresponding to the level and a greedy strategy, an unloading matrix is ​​obtained, and each of the first subtasks corresponding to the level is unloaded to the target computing vehicle in the vehicle cluster based on the unloading matrix; For each of the levels, each of the second subtasks corresponding to the level is offloaded to the cloud server.

8. The method according to claim 7, characterized in that For each of the levels, solving the 0-1 knapsack problem, obtaining the first subtask of the target computing vehicle to be unloaded to the vehicle cluster in the level, and obtaining the second subtask of the level to be unloaded to the cloud server, include: For each of the levels, the computing capacity of the vehicle cluster is used as the capacity of the backpack; For each of the subtasks in the hierarchy, the subtask is regarded as an object to be put into the backpack, the computing power required to execute the subtask is regarded as the volume of the object, and the amount of data contained in the subtask is regarded as the value of the object, and the 0-1 backpack problem is solved; The subtask corresponding to the object placed in the backpack is determined as a first subtask, and the subtask corresponding to the object not placed in the backpack is determined as a second subtask.

9. The method according to claim 7, characterized in that: For each of the levels, based on each of the first subtasks corresponding to the level and the greedy strategy, an unloading matrix is ​​obtained, including: For each of the levels, the first subtasks corresponding to the level are sorted from large to small according to the data volume, so as to obtain an uninstallation order of the first subtasks; Based on the unloading order, for each of the first subtasks in turn, within the communication range of the target task vehicle corresponding to the first subtask, determine the target computing vehicle with the least number of hops to the target task vehicle and whose remaining computing power is greater than or equal to the computing power required to process the first subtask as the target unloading vehicle; An unloading matrix is ​​constructed based on the target unloading vehicles corresponding to each of the subtasks.

10. A task offloading device based on vehicle clusters, characterized in that: Applied to a roadside unit, the roadside unit is communicatively connected to a cloud server, and the device comprises: An acquisition unit, used to acquire basic information sent by each task vehicle within the communication range of the roadside unit; A screening unit is used to calculate the task similarity of the tasks to be unloaded between each two of the task vehicles based on the basic information of each task vehicle, and if the task similarity is greater than or equal to a similarity threshold and the expected communication time between the two task vehicles is greater than or equal to a communication time threshold, then the target task vehicle is determined; the task to be unloaded is composed of a plurality of subtasks, and there is a topological dependency relationship between the subtasks; A cluster head construction unit, used to construct a cluster head based on each of the target task vehicles and calculate the computing power required by the cluster head; A cluster construction unit, configured to select a target computing power vehicle from idle computing power vehicles within the communication range of the cluster head based on the computing power required by the cluster head, and construct a vehicle cluster based on the target computing power vehicle and the cluster head; A decomposition unit is used to decompose the corresponding to-be-unloaded task into a plurality of subtasks for each target task vehicle in the vehicle cluster, and construct a first directed acyclic graph based on the topological dependency relationship between each subtask; each node in the first directed acyclic graph represents one subtask, and an edge between each two nodes represents the topological dependency relationship between the corresponding two subtasks; A merging and deduplication unit, used to merge and deduplication each of the first directed acyclic graphs under the condition that the topological dependency relationship between each of the subtasks remains unchanged, so as to obtain a second directed acyclic graph; A hierarchical unit, configured to perform logical hierarchical processing on the second directed acyclic graph to obtain a plurality of hierarchies containing the corresponding subtasks and hierarchical numbers corresponding to the hierarchies; The unloading unit is used to unload the subtasks corresponding to each level in turn according to the number of levels corresponding to each level, so that the subtasks are unloaded to the target computing vehicle or the cloud server in the vehicle cluster.

Citation Information

Patent Citations

  • Task dependency-based clustering method applied to Internet of Vehicles

    CN111626354A

  • Internet of vehicles edge computing task unloading method based on vehicle clustering

    CN114995917A

  • Task unloading-oriented vehicle cluster dynamic generation method

    CN115426683A

  • Cluster-based vehicle-mounted task unloading method and device and storage medium

    CN115883548A

  • Content delivery method and content update method for internet of vehicles

    US20190327588A1

Cited By

  • Method for determining target server in mobile Internet of Vehicles and target request equipment

    CN119854875A

  • Method for determining a target server and a target request device in a mobile vehicle network

    CN119854875B

  • Remote cluster control method and system for intelligent network connection equipment based on vehicle-infrastructure cooperation

    CN121148157A

  • Intelligent network connection device remote cluster control method and system based on vehicle-road cooperation

    CN121148157B