An offloading method based on task correlation in connected vehicles

By constructing a task offloading model and using the KM matching algorithm in the Internet of Vehicles to optimize the matching relationship between vehicles and service nodes, the problem of task correlation offloading and scheduling in the Internet of Vehicles is solved, and the task completion delay is reduced and the system energy is reduced. Balanced, ensuring vehicle safety.

CN114980029BActive Publication Date: 2024-10-01上饶丫牛软件中心(个人独资)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210548602.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-20
Publication Date
2024-10-01
Estimated Expiration
2042-05-20

AI Technical Summary

Technical Problem

In the Internet of Vehicles, existing technology fails to effectively handle the processing and scheduling sequence of multiple related subtasks on different service nodes, resulting in chaotic task processing and failure of emergency tasks to be processed on time and as required, which poses security risks and neglects It reduces resource competition between different nodes.

Method used

An offloading method based on task correlation is proposed. In a V2X communication scenario with multiple vehicle users and multiple service nodes, a task offloading model is constructed by combining mobile edge computing technology, and the KM matching algorithm and scheduling algorithm are used to determine the relationship between vehicles and service nodes. Matching relationships, optimizing task offloading and scheduling strategies, and reducing the total system delay.

Benefits of technology

Effectively determine offloading decisions, allocate offloading tasks and offloading objects, reduce the total system delay, improve task completion efficiency, balance system energy consumption, and ensure vehicle safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114980029B_ABST
    Figure CN114980029B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of task offloading and resource scheduling in an Internet of Vehicles, and in particular to an offloading method based on task relevance in an Internet of Vehicles. With the assistance of mobile edge computing technology, a partial task offloading and resource scheduling strategy for an Internet of Vehicles that minimizes the task completion time of all vehicles is studied in view of the problem that the Internet of Vehicles needs to process a large number of low-latency subtasks under limited resources and dynamic topology. A mathematical model is established by considering the differences between roadside units and vehicles as service nodes, as well as mode selection, task delay and communication distance constraints. The multi-constrained integer nonlinear programming problem is decomposed into three sub-problems for joint solution. The optimal task calculation sequence and scheduling decision are obtained by defining the priorities of subtasks and vehicles and using a KM algorithm to match offloading objects for vehicles. The present invention can effectively determine offloading decisions, allocate offloading tasks and offloading objects, and reduce the total system delay.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of task offloading and scheduling in a vehicle networking network, and in particular to an offloading method based on task association in a vehicle networking network. Background Art

[0002] With the rapid development of the Internet of Vehicles (IoV), many new applications with strict requirements on computing latency are emerging, and the limited computing power and energy reserves of vehicles may not be able to meet the needs of these application tasks. Therefore, in IoV, vehicles can offload tasks to edge servers through multi-access edge computing (MEC) technology to reduce task processing latency. A large number of technical documents have proved that MEC-based IoV task offloading can reduce the task computing burden of vehicles and thus reduce latency. However, offloading all tasks by MEC may lead to increased transmission delays for task offloading and queuing delays caused by competition for computing resources of roadside units (RSUs).

[0003] At present, the existing technology has studied the partial task offloading scheme in the Internet of Vehicles. With the development of on-board units (OBU) and energy supply systems, vehicles have also become nodes with considerable computing power. Making full use of local computing resources to complete partial task offloading can further reduce computing latency. On the other hand, the vehicle to everything (V2X) communication method can be used to offload tasks to vehicles with spare resources to reduce communication latency.

[0004] However, the current work on partial task offloading mainly considers the offloading of single communication modes such as vehicle-to-vehicle (V2V) or vehicle-to-road infrastructure (V2I). However, in actual situations, some tasks are composed of multiple related subtasks. During the offloading process, the processing of subtasks on different service nodes and their scheduling order will have a great impact on the total task completion time. In addition, the existing research on partial offloading and scheduling considering subtask association in the Internet of Vehicles only focuses on the scenario of single offloading node and multiple servers, ignoring the resource competition between different nodes, resulting in task processing confusion, and even the failure to process emergency tasks on time as required, thus posing a safety hazard to the vehicle itself. Summary of the invention

[0005] In order to solve the above problems of the prior art, the present invention takes into account that under the constraints of the V2X communication scenario with multiple vehicle users and multiple service nodes, customizing a good unloading strategy and combining it with reasonable resource scheduling can reduce the delay in task completion and balance the energy consumption of each node in the system. Based on this, the present invention proposes an unloading method based on task association in the Internet of Vehicles. With the assistance of mobile edge computing technology, this method aims to solve the problem that the Internet of Vehicles needs to process a large number of low-latency subtasks under limited resources and dynamic topology. Based on the principle of minimizing system overhead, it determines the unloading and scheduling strategy of some tasks in the Internet of Vehicles, thereby completing the task unloading and resource optimization problems in the vehicle edge computing system. The task unloading strategy is determined by calculating the total delay in completing all vehicle tasks in the Internet of Vehicles system, and the tasks are scheduled according to the task unloading strategy. The method specifically includes:

[0006] With the goal of minimizing the total delay of task completion in the Internet of Vehicles, an offloading model based on task relevance is constructed with the differences between roadside units and service vehicles as service nodes, V2X communication mode selection, task delay and communication distance as constraints.

[0007] The KM matching algorithm based on the priority of task vehicles is used to solve the unloading model and match the unloading service nodes for the task vehicles.

[0008] In the V2V communication mode, a scheduling algorithm based on subtask weight and subtask priority is used to solve the offloading model, and a scheduling decision is generated for the subtask according to the matched service node, and the subtask offloading under V2V is completed according to the scheduling decision;

[0009] In the V2I communication mode, a scheduling algorithm based on task vehicle priority and subtask priority is used to solve the offloading model. A scheduling decision is generated for the subtask according to the matched service node, and the subtask offloading under V2I is completed according to the scheduling decision.

[0010] The beneficial effects of the present invention are:

[0011] The present invention aims at the problem of task unloading and scheduling based on task relevance calculation in a vehicle network system, establishes a mathematical model by considering the differences between roadside units and vehicles as service nodes, as well as mode selection, task delay and communication distance constraints; decomposes the multi-constrained integer nonlinear programming problem into three sub-problems for joint solution; obtains the optimal task calculation sequence and scheduling decision by defining the priorities of sub-tasks and task vehicles and using the KM algorithm to match the unloading objects for the vehicles; the present invention can effectively determine the unloading decision, allocate the unloading tasks and unloading objects, and reduce the total system delay. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 A system model diagram of an unloading method based on task association in a connected vehicle network according to an embodiment of the present invention;

[0013] Figure 2 It is a flowchart of an implementation of an unloading method based on task association in a connected vehicle network according to an embodiment of the present invention;

[0014] Figure 3 It is a bipartite graph of V2V communication nodes to be matched in the offloading method based on task association in the Internet of Vehicles according to an embodiment of the present invention. DETAILED DESCRIPTION

[0015] 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.

[0016] Figure 1 : is a system model diagram of an unloading method based on task association in a vehicle networking according to an embodiment of the present invention, such as Figure 1 As shown, the system model is constructed based on a partial offloading and scheduling framework of task relevance. The system model mainly includes a task vehicle, a service vehicle, an RSU, a MEC server and a base station. The task vehicle can communicate with the service vehicle through a V2V link, and can also communicate with the RSU through a V2I link. The MEC server establishes a communication connection with the base station through a wired link. In this embodiment, in a multi-vehicle straight communication scenario under a single roadside unit RSU, the vehicles are divided into task vehicles TV and service vehicles SV according to vehicle information; each TV has a task to be calculated, and each task can be divided into multiple related subtasks. Both SV and RSU can serve as service nodes SN to assist TV in task calculation; the transmission rate unloaded to the service vehicle SV is calculated. The specific process is:

[0017] Considering the multi-vehicle straight communication scenario under a single RSU, the vehicle set in the system is represented as N represents the total number of vehicles in the system; vehicles still have two properties, respectively represents the set of TV and SV, and N T Represents the total number of mission vehicles, N T Represents the total number of service vehicles. Each TV has a task to be calculated, and each task can be divided into multiple related subtasks. Both SV and RSU can serve as SN to assist TV in task calculation. Therefore, a service node set is established 0 represents RSU. When j=0, it means the unloading object is RSU. , it indicates that the uninstallation target is SV.

[0018] Figure 2 FIG. 1 is a flowchart of an implementation of an unloading method based on task association in a connected vehicle network according to an embodiment of the present invention. Figure 2 As shown, the method includes:

[0019] 101. With the minimum total delay in completing tasks in the Internet of Vehicles as the goal, and with the differences between roadside units and service vehicles as service nodes, V2X communication mode selection, task delay and communication distance as constraints, an offloading model based on task relevance is constructed;

[0020] In this embodiment of the present invention, in order to simplify the problem, it is assumed that the channel resources are sufficient and the bandwidth of each channel is B. When only the signal-to-noise ratio is considered, the transmission rate r when the task vehicle i is unloaded to the service node j is i,j It is expressed as:

[0021]

[0022] Among them, p i is the transmission power of mission vehicle i, σ 2 is the channel interference, h i,j is the channel gain when task vehicle i communicates with service node j, where h i,j It can be written as:

[0023]

[0024] Among them, d i,j represents the initial distance between node mission vehicle i and service node j. The parameter of mission vehicle i is represented by V i = {P i ,v i ,i∈N T}, P i Represents the vehicle position P i =(x i ,y i ), the parameter of service vehicle j is expressed as V j = {P j ,v j ,j∈N S}, P j Represents the vehicle position P j =(x j ,y j ). The position of RSU is denoted as P rsu =(0,0),d i,j It can be written as:

[0025]

[0026] v iDenotes the speed of the vehicle. The maximum communication distances of V2I and V2V are respectively denoted as D V2I and D V2V .

[0027] When TVi chooses to offload the task to SVj, the two vehicle nodes will be After leaving the communication range, it should be noted that when the vehicle is driving in a straight line, it is restricted by the lane and the lateral distance y between vehicles is i remains unchanged, and the y of different vehicles n The difference is small, so the vehicle and RSU are considered to be traveling in a straight line. It can be expressed as

[0028]

[0029] Therefore, in During the time, the task vehicle can choose to perform local calculations or offload calculations. After that, if there are still unfinished tasks, they can only be calculated locally.

[0030] When a subtask is offloaded, the main delays include: the computation delay on the local and service nodes, the uplink transmission delay from the task to the service node, the waiting delay of the unfinished preceding subtask, and the queuing delay in the task queue.

[0031] In the embodiment of the present invention, in order to simplify the problem, the delay of task return and task relay transmission time are ignored, that is, when a previous subtask is completed, when the node CPU is idle, the next subtask can start calculation immediately. In addition, all nodes are set to calculate tasks in a non-preemptive CPU type, that is, in the same node, only one task is calculated at a certain time. In order to show the execution status of subtasks in the node, a virtual timeline of continuous time slots is set up, and tasks are dynamically processed according to the priority of tasks in different virtual time slots, and the time factor is set. To represent the subtask q at time point t i,m Whether to calculate locally, when When represents subtask q i,m At time t, when the local When represents subtask q i,m Not calculated locally at time t. Time factor Represents subtask q at time point t i,m Whether to perform calculation on service node j, when When represents subtask q i,m At time t, the calculation is performed on the service node j. When represents subtask q i,m No computation is performed on service node j at time t.

[0032] Therefore, subtask q i,m Completion time calculated locally Can be expressed as a local start time Compute time locally The sum of is written as:

[0033]

[0034] Among them, when calculating locally, subtask q i,m The starting condition of q is that all previous subtasks have completed the calculation and there is no task being calculated locally. i,m The local start time is:

[0035]

[0036] in, The time when all predecessor tasks of the subtask are completed is:

[0037]

[0038] Indicates the time to wait in the local queue:

[0039]

[0040] in, Represents subtask q i,l The completion time of the local calculation, a i,l Represents the subtask q i,l A binary variable that performs the uninstallation decision, Represents subtask q i,l At the local start time, Represents subtask q i,l Compute time locally; Q i Represents the set of all subtasks in task vehicle i.

[0041] In addition, the mth subtask in task vehicle i is calculated locally in time It can be expressed as:

[0042]

[0043] in, represents the computing power of mission vehicle i; c i,m Represents the computing resources required for the calculation of the mth subtask of TVi.

[0044] When a subtask needs to be offloaded to a service node for computation, the computation completion time after the subtask is offloaded It can be expressed as q i,m The time when service node j starts and the time calculated on service node j The sum of is written as:

[0045]

[0046] When offloading computation, subtask q i,m The starting conditions are: all previous subtasks have completed the calculation, the service node has received the offloaded task, and the computing resources of the service node are idle. i,m The start time when offloading calculations is:

[0047]

[0048] in, Represents subtask q i,m The time when all predecessor tasks are completed, Indicates that task vehicle i is unloading subtask q i,m The transmission time during the process, Represents the queuing time on the service node, written as:

[0049]

[0050] When the task is offloaded to the service node, the computing time on the service vehicle and the roadside unit is expressed as:

[0051]

[0052] f rsu Indicates the computing power of RSU, is the computing power of SVj. The transmission time during the offloading process is:

[0053]

[0054] According to the above description, subtask q i,m The completion time can be summarized into a formula, which can be expressed as:

[0055]

[0056] Therefore, subtask q i,m The time to complete all the previous tasks is:

[0057]

[0058] Furthermore, in order to make full use of system resources and meet the requirements of low latency in the Internet of Vehicles, a partial subtask offloading and scheduling strategy is proposed in the multi-vehicle multi-task scenario, with the optimization goal of minimizing the total latency of all vehicle tasks and considering the maximum latency tolerance. The constraint optimization goal of the communication distance is:

[0059]

[0060] stC1:a i,m ∈{0,1},

[0061] C2:

[0062] C3:

[0063] C4:

[0064] C5:

[0065] C6:

[0066] C7:

[0067] in, Represents the time it takes to complete the calculation of all subtasks in TVi. Constraints C1 and C2 represent binary variable constraints on offloading decisions and offloading object selection, indicating that subtasks in a TV can choose local calculation or offloading calculation, and each TV performs offloading but can only select one SN as the offloading object. C3 indicates that the time required to process a subtask cannot exceed the maximum tolerable delay of the subtask. C4, C5, and C6 represent non-preemptive CPU calculation constraints for offloading to SV and offloading to RSU locally, that is, on each node, only one task is calculated at a time point. C7 indicates that during the time of processing subtasks, TV cannot leave the communication distance of SN.

[0068] Since the problem of the offloading model in the embodiment of the present invention is a mixed integer nonlinear programming problem that is difficult to solve directly, and the completion time of the subtasks affects each other. Therefore, the embodiment of the present invention can be solved by a heuristic algorithm; the multi-constrained integer nonlinear programming problem can be decomposed into three sub-problems for joint solution; first, the matching problem of the offloading object needs to be solved, secondly, the problem of scheduling offloading decision in the V2V communication mode needs to be solved, and finally, the problem of scheduling offloading decision in the V2I communication mode needs to be solved; of course, different scheduling offloading decisions in the V2V communication mode and the V2I communication mode can be solved simultaneously or successively, depending on the communication mode actually adopted by the network.

[0069] 102. A KM matching algorithm based on the priority of the task vehicle is used to solve the unloading model, and a service node for unloading is matched for the task vehicle;

[0070] In the embodiment of the present invention, the present invention adopts the KM algorithm based on the task vehicle priority to solve the unloading object matching problem.

[0071] In an embodiment of the present invention, the method for calculating the priority of a task vehicle includes calculating the average priority of all subtasks of all task vehicles, and calculating the number of subtasks in each task vehicle whose priority is higher than the average priority according to a counting function; the priority of each task vehicle is calculated based on the average distance between the task vehicle and the service node, the maximum computing time of the task vehicle, and the number of subtasks of the task vehicle whose priority is higher than the average priority.

[0072] In the embodiment of the present invention, the calculation method of the subtask priority includes defining the importance of the subtask according to the out-degree and weight of the subtask, and calculating the priority of each subtask according to the weight, importance and completion time of the subtask.

[0073] In order to determine the priority of the outgoing vehicle, it is necessary to first determine the priority of the subtask. The subtask priority first needs to define the importance of the subtask according to the out-degree and weight of the subtask, which is recorded as:

[0074]

[0075] In addition, the maximum completion time and delay tolerance of each subtask and weight w i,m The urgency of processing the subtask can be mapped out. The smaller the delay tolerance and weight of the subtask, the more urgent the subtask is to be solved. i,m The priorities are:

[0076]

[0077] in, Represents subtask q at time point t i,m Priority, imp i,m Represents subtask q i,m The importance of max{imp i,n}、min{imp i,n} respectively represent the maximum and minimum importance values ​​in the subtask set, Represents subtask q i,m The maximum computation time, Respectively represent the maximum and minimum values ​​of the computation time in the subtask set, w i,m Represents subtask q i,m The weight of max{w i,n}、min{w i,n} respectively represent the maximum and minimum values ​​of the weight in the subtask set.

[0078] After obtaining the priority of the subtask, the priority of unloading the task vehicle is defined by analyzing the subtask of each task vehicle i and the distance between the task vehicle i and the service node. First, the average priority of all subtasks of all task vehicles is obtained. Then define the counting function f(x,a), and finally get the priority of the subtask in task vehicle i higher than The number u i :

[0079]

[0080]

[0081]

[0082] When the task vehicle i can only calculate locally, define T i represents the maximum computation time of task vehicle i, It represents the average distance between task vehicle i and the service node. When these two values ​​are smaller, the priority of task vehicle i is greater, which can be calculated as:

[0083]

[0084]

[0085] Therefore, the unloading priority of task vehicle i is:

[0086]

[0087] In addition, the priority of service node j is given by express, The higher the value, the higher the priority of service node j, and the easier it is to receive TV's unloading request. Generally, when SV acts as a service node, it can obtain corresponding benefits. In order to encourage more vehicles with spare resources to participate in the unloading service, the system first assigns service objects to SV. The present invention uses the KM algorithm to match TV and SV, thereby maximizing the transmission rate and reducing the delay. The SVs in the system and the corresponding number of TVs are modeled as a bipartite graph to be matched. like Figure 3 As shown, the TV to be matched is the top N in priority S TV, add this part of TV to the collection Other TV Add to collection These vehicles are shown in Figure The nodes in the i,j To express and The weight of the edge when the midpoint is linked.

[0088] Based on the above analysis, the KM algorithm is used in the embodiment of the present invention to find a suitable service object, that is, an unloading object, for the service vehicle SV, including:

[0089] Model the service vehicles and the corresponding number of task vehicles in the Internet of Vehicles as a bipartite graph to be matched Each node in the bipartite graph is a system vehicle, and the system vehicles include service vehicles and task vehicles;

[0090] According to the number of service vehicles, the task vehicles to be matched are divided according to the priority of the task vehicles;

[0091] Among them, the vehicle set in the system is represented as The sets of task vehicles and service vehicles are represented as The task vehicles to be matched are the top N priority vehicles. S mission vehicles, N represents the total number of system vehicles, N T Represents the total number of mission vehicles, N S Indicates the total number of service vehicles;

[0092] Set the task vehicle set N T Mission vehicles in the mission vehicle priority Sort the service vehicle set N in positive order S Service vehicles in the capacity calculation by service vehicle Arrange in positive order;

[0093] Add the task vehicle to be matched to the V2V vehicle collection Other mission vehicles are directly added to the V2I vehicle collection middle;

[0094] Setting up V2V vehicle collection The top mark of the midpoint lt(v i )=max{r i,j}, where the service vehicle collection is set The node top label ls(v j )=0,v i represents the task vehicle node, r i,j Denotes the V2V vehicle set V V2V Middle node v i and service vehicle set N s Middle node v j The weight of the edge when linking, v j represents the service vehicle node; the task vehicle node v i Equivalent to task vehicle i, service vehicle node vj Equivalent to mission vehicle j.

[0095] From V2V vehicle collection The task vehicle node with the highest priority starts to expand and search for a complete match; if no complete match is found, the V2V vehicle set is modified and service vehicle collection The top mark value of the middle node is increased again starting from the unmatched node until it is fully matched.

[0096] 103. In the V2V communication mode, a scheduling algorithm based on subtask weights and subtask priorities is used to solve the offloading model, a scheduling decision is generated for the subtask according to the matched service node, and the subtask offloading under V2V is completed according to the scheduling decision;

[0097] In the embodiment of the present invention, it is considered whether to unload the subtask when there is no other TV competing for computing resources in V2V and the TV matches the SV one-to-one: Therefore, the present invention adopts a weight and priority-based V2V unloading and scheduling algorithm to unload and schedule the subtasks of the TV in V2V communication, including:

[0098] S1: Sort the subtasks in ascending order of weight. If the weights are the same, sort the subtasks with the same weights in descending order of subtask priority to obtain the task execution order;

[0099] S2: Add the sorted subtasks to the set of unloading decisions to be assigned

[0100] S3: Calculate the completion time of the subtask locally and offloaded, and when and q i,m Offload to SV calculation, let a i,m =1; when or When i,m Perform local calculations and let a i,m =0;

[0101] S4: The local node and the offloading node calculate according to the decision order of the subtask and update the time factor and Indicates the execution status of the task. After unloading and scheduling, remove the subtask from the collection Until After being empty.

[0102] 104. In the V2I communication mode, a scheduling algorithm based on task vehicle priority and subtask priority is used to solve the unloading model, a scheduling decision is generated for the subtask according to the matched service node, and the subtask unloading under V2I is completed according to the scheduling decision.

[0103] In the embodiment of the present invention, unlike V2V unloading, RSU has strong computing power and can accept unloading requests from multiple TVs, resulting in competition between TVs. Priorities are defined for subtasks and vehicles in the weight and priority-based V2V unloading and scheduling algorithm. However, if the task requirements of high-priority TVs are met in sequence according to vehicle priorities, high-priority subtasks in low-priority TVs cannot be properly processed. Therefore, the V2I unloading and dynamic scheduling algorithm based on subtask priority classification in this section includes:

[0104] S1: Define a high-priority subtask set denoted as A set of medium priority subtasks is denoted as Add all subtasks that have no predecessor tasks or whose predecessor tasks are all completed to All subtasks that are being transferred or calculated by the direct predecessor task are added to

[0105] S2: For The subtasks in the collection are sorted by Sorting, determine whether the tasks should be uninstalled in turn;

[0106] S3: Calculate the completion time of the subtask locally and offloaded, and when and q i,m Offload to SV calculation, let a i,m =1; when or When i,m Perform local calculations and let a i,m =0;

[0107] S4: Put the subtasks that are initially determined to be offloaded to the RSU into the initial scheduling strategy set according to the subtask priority order.

[0108] S5: The TV locally calculates these tasks in sequence, and the RSU may The subtask with the highest priority and assigned to offload calculation has a relatively long transmission time and does not arrive after the previous subtask is processed, making the RSU idle, that is, q a,b With q c,d Both The subtasks in , and they are different subtasks, satisfying as well as Therefore, in order to make full use of the computing resources of RSU and the competition among TVs, RSU will dynamically adjust the received subtask scheduling and try to schedule subtask q c,d Put it on q a,b Calculate before, if q a,b Still able to satisfy and renew If not, the order is not changed. The above rules are used to execute the subtask scheduling update of RSU, thereby further updating the time factor and S6: In the collection After the initial unloading and scheduling of the subtasks in the The estimated time to complete all subtasks in the collection The subtasks in the task are unloaded and scheduled based on the estimated completion time and the calculation of the direct predecessor tasks;

[0109] S7: RSU according to vehicle priority pr i v , poll in descending order whether the subtasks of each TV in M ​​are uninstalled;

[0110] S8: When the following conditions are met at the same time, and Execute the uninstallation and change q x,m Add to And update the set according to the update method rule in step S5 above

[0111] in For subtask q x,m The priority of For subtask q z,n The priority of For subtask q z,n The completion time, Subtask q x,m Transfer time during offloading, For subtask q x,m Computation time after unloading, For subtask q x,y The completion time, For subtask q x,m The local computation time, is the time limit factor when unloading to the roadside unit, i.e., the service node j=0; where subtask q x,m ,q z,n ,q x,y Both The subtasks in the task are different subtasks.

[0112] S9: In the collection After all subtasks in the calculation are completed, update the collection and collection Until all tasks have completed calculation.

[0113] The present invention aims at the partial unloading and scheduling problem based on task relevance in the vehicle network system, and studies a vehicle network partial task unloading and resource scheduling strategy that minimizes the task completion time of all vehicles; a mathematical model is established by considering the differences between roadside units and vehicles as service nodes, as well as mode selection, task delay and communication distance constraints; the multi-constrained integer nonlinear programming problem is decomposed into three sub-problems for joint solution; by defining the priorities of sub-tasks and vehicles and using the KM algorithm to match unloading objects for vehicles, the optimal task calculation sequence and scheduling decision are obtained; the present invention can effectively determine unloading decisions, allocate unloading tasks and unloading objects, and reduce the total system delay.

[0114] In the description of the present invention, it is necessary to understand that the terms "coaxial", "bottom", "one end", "top", "middle", "the other end", "upper", "one side", "top", "inside", "outside", "front", "center", "both ends" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.

[0115] In the present invention, unless otherwise clearly stipulated and limited, the terms such as "installation", "setting", "connection", "fixation" and "rotation" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral one; it can be a mechanical connection or an electrical connection; it can be directly connected or indirectly connected through an intermediate medium; it can be the internal connection of two elements or the interaction relationship between two elements. Unless otherwise clearly defined, ordinary technicians in this field can understand the specific meanings of the above terms in the present invention according to the specific circumstances.

[0116] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A method for unloading based on task relevance in a vehicle network, characterized in that: Specifically include: In the scenario of multiple vehicles traveling directly under a single roadside unit, vehicles are divided into task vehicles and service vehicles according to vehicle information; Each task vehicle has a task to be calculated, and each task is divided into multiple related subtasks. The service vehicle and the roadside unit both serve as service nodes to assist the task vehicle in task calculation; and calculate the transmission rate unloaded to the service vehicle; With the goal of minimizing the total delay of task completion in the Internet of Vehicles, an offloading model based on task relevance is constructed with the differences between roadside units and service vehicles as service nodes, V2X communication mode selection, task delay and communication distance as constraints. The formula of the task-association-based offloading model is: s.t.C1:a i,m ∈{0,1}, in, It means that each task vehicle i has a task formed by multiple subtasks. represents the unloading object selection set of task vehicle i, Represents subtask q at time point t i,m Whether to calculate the time factor locally, when When represents subtask q i,m At time t, when the local When represents subtask q i,m Not calculated locally at time t; Represents subtask q at time point t i,m The time factor for whether to perform calculations on service node j. When represents subtask q i,m At time t, the calculation is performed on the service node j; when When represents subtask q i,m No computation is performed on service node j at time t; N T represents the total number of mission vehicles; t i It represents the time to complete the calculation of all subtasks in task vehicle i. Represents subtask q i,m The completion time, Q i represents the set of all subtasks in task vehicle i; a i,m Represents the subtask q i,m Binary variable for making the offloading decision, b i,j A binary variable indicating that task vehicle i selects service node j as the unloading object; N S represents the total number of service nodes; the constraints C1 and C2 indicate that the subtask in a task vehicle chooses local computing or offloading computing, and each task vehicle is offloaded but can only choose one service node as the offloading object; t i,m Represents subtask q i,m The time required for uninstallation, Represents subtask q i,m The maximum tolerable delay of a subtask; C3 means that the time required to process a subtask cannot exceed the maximum tolerable delay of the subtask; M i Indicates each The number of subtasks is included in C4, C5 and C6, which represent the non-preemptive CPU computing constraints of offloading to the service vehicle and the roadside unit locally, that is, at each node, only one task is calculated at a time point; C7 represents that during the processing time of the subtask, the task vehicle cannot leave the communication distance of the service node; The KM matching algorithm based on the priority of task vehicles is used to solve the unloading model and match the unloading service nodes for the task vehicles. Model the service vehicles and the corresponding number of task vehicles in the Internet of Vehicles as a bipartite graph to be matched Each node in the bipartite graph is a system vehicle, and the system vehicles include service vehicles and task vehicles; According to the number of service vehicles, the task vehicles to be matched are divided according to the priority of the task vehicles; Among them, the vehicle set in the system is represented as The sets of task vehicles and service vehicles are represented as The task vehicles to be matched are the top N priority vehicles. S mission vehicles, N represents the total number of system vehicles; Assemble the mission vehicles The task vehicles in the task vehicle priority are sorted in positive order, and the service vehicle set The service vehicles in are arranged in positive order according to the service vehicle computing capacity; Add the task vehicle to be matched to the V2V vehicle collection Other mission vehicles are directly added to the V2I vehicle collection middle; Setting up V2V vehicle collection The top mark of the midpoint lt(v i )=max{r i,j }, where the service vehicle collection is set The node top label ls(v j )=0,v i represents the task vehicle node, r i,j Denotes the V2V vehicle set V V2V Medium i and service vehicle collection Middle node v j The weight of the edge when linking, v j represents a service vehicle node; From V2V vehicle collection The task vehicle node with the highest priority starts to expand and search for a complete match; If no complete match is found, modify the V2V vehicle set and service vehicle collection The top mark value of the middle node is increased again from the unmatched nodes until it is fully matched; In the V2V communication mode, a scheduling algorithm based on subtask weight and subtask priority is used to solve the offloading model, and a scheduling decision is generated for the subtask according to the matched service node, and the subtask offloading under V2V is completed according to the scheduling decision; Using a scheduling algorithm based on subtask weights and subtask priorities, the process of subtask offloading under V2V includes: S1: Sort the subtasks in ascending order according to their weights. If the weights are the same, sort the subtasks with the same weights in descending order according to their subtask priorities to obtain the subtask decision order; S2: Add the sorted subtasks to the set of unloading decisions to be assigned according to the subtask decision order. middle; S3: Calculate subtask q i,m Local completion time and the completion time of the uninstallation when and Subtask q i,m Offload to service node j for calculation; when or When subtask q i,m Perform local calculations; It represents the time when task vehicle i chooses to unload the task to service node j and leaves the communication range; S4: The task vehicle and service node calculate according to the decision order of the subtask, and update the time factor to represent the execution status of the subtask; after the subtask is unloaded and scheduled, the subtask is removed from the unloading decision set to be allocated. Until is empty; In the V2I communication mode, a scheduling algorithm based on task vehicle priority and subtask priority is used to solve the unloading model, and a scheduling decision is generated for the subtask according to the matched service node, and the subtask unloading under V2I is completed according to the scheduling decision; The scheduling algorithm based on task vehicle priority and subtask priority is used to solve the unloading model. The process of completing subtask unloading under V2I includes: S1: Divide all subtasks into high-priority subtask sets according to their subtask priorities and a set of medium priority subtasks In the process, subtasks with no predecessor tasks or completed predecessor tasks are added to , add the subtasks that are being transferred or calculated by the direct predecessor task to middle; S2: For the The subtasks in the list are sorted according to their priorities, and it is determined in turn whether the subtasks should be uninstalled; S3: Calculate subtask q i,m Local completion time and the completion time of the uninstallation when and Subtask q i,m Offload to service node j for calculation; when or When subtask q i,m Perform local calculations; S4: Put the subtasks unloaded to the roadside unit, i.e., the service node j=0, into the initial scheduling strategy set according to the subtask priority order. S5: The roadside unit dynamically adjusts the scheduling order of the received subtasks and updates the time factor to indicate the execution status of the subtasks; S6: In the collection After the initial unloading and scheduling of the subtasks in the local and roadside units, the The estimated time to complete all subtasks in the collection The subtasks in the task are unloaded and scheduled based on the estimated completion time and the calculation of the direct predecessor task; S7: The roadside unit polls each task vehicle in the collection in descending order according to the vehicle priority. Whether the subtask in is uninstalled; S8: When the following conditions are met at the same time during uninstallation, and Execute uninstallation and set subtask q x,m Add to Collection And update the collection according to the above S5 update method rules in, For subtask q x,m The priority of For subtask q z,n The priority of For subtask q z,n The completion time, Subtask q x,m Transfer time during offloading, For subtask q x,m Computation time after unloading, For subtask q x,y The completion time, For subtask q x,m The local computation time, is the time limit factor when unloading to the roadside unit, i.e., the service node j=0; S9: In the collection After all subtasks in the calculation are completed, update the collection and collection Until all subtasks have completed calculation.

2. The unloading method based on task relevance in the Internet of Vehicles according to claim 1 is characterized in that: The calculation method of the task vehicle priority includes calculating the average priority of all subtasks of all task vehicles, and calculating the number of subtasks in each task vehicle whose priority is higher than the average priority according to the counting function; The priority of each task vehicle is calculated based on the average distance between the task vehicle and the service node, the maximum computing time of the task vehicle, and the number of subtasks of the task vehicle whose priority is higher than the average priority.

3. The unloading method based on task relevance in a connected vehicle network according to claim 2, characterized in that: The calculation formula of the mission vehicle priority is expressed as: Among them, pr i v represents the priority of task vehicle i, u i represents the number of subtasks with a priority higher than the average priority of task vehicle i, max{u v }、min{u v } respectively represent the maximum and minimum number of subtask priorities higher than the average priority in the task vehicle set, T i represents the maximum computation time of task vehicle i, max{T v }、min{T v } respectively represent the maximum and minimum values ​​of the calculation time in the task vehicle set, represents the average distance between task vehicle i and the service node, They represent the maximum and minimum values ​​of the average distance between the task vehicle set and the service node respectively.

4. The unloading method based on task relevance in a vehicle network according to claim 1 or 2, characterized in that: The calculation method of subtask priority includes defining the importance of the subtask according to the out-degree and weight of the subtask, and calculating the priority of each subtask according to the weight, importance and completion time of the subtask.

5. The unloading method based on task relevance in a connected vehicle network according to claim 4, characterized in that: The calculation formula of subtask priority is expressed as: in, Represents subtask q at time point t i,m Priority, imp i,m Represents subtask q i,m The importance of max{imp i,n }、min{imp i,n } respectively represent the maximum and minimum importance values ​​in the subtask set, Represents subtask q i,m The maximum computation time, Respectively represent the maximum and minimum values ​​of the computation time in the subtask set, w i,m Represents subtask q i,m The weight of max{w i,n }、min{w i,n } respectively represent the maximum and minimum values ​​of the weight in the subtask set.