A Dynamic Generation Method for Vehicle Clusters Oriented to Task Offloading

By dynamically determining service vehicles and member vehicles in the Internet of Vehicles environment and performing multi-wheel iterative optimization methods, the stability problems of on-board task unloading and cluster generation are solved, and efficient task processing and resource utilization are achieved.

CN115426683BActive Publication Date: 2025-07-01INST OF COMPUTING TECH CHINESE ACAD OF SCI
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211081408.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-06
Publication Date
2025-07-01
Estimated Expiration
2042-09-06

AI Technical Summary

Technical Problem

In the dynamically changing Internet of Vehicles environment, how to achieve stable on-board task offloading and cluster generation to ensure the effective utilization of computing resources and task processing efficiency.

Method used

By obtaining the information of interactive vehicles in each time slot, the service vehicle that can provide computing services and the member vehicle that needs to unload tasks, the unloading scheme is initialized, and through multiple iterative optimization, the total task processing delay is minimized according to the predetermined constraints, and a vehicle cluster is dynamically built.

Benefits of technology

It realizes efficient task offloading and cluster generation in a dynamic environment, improves task processing efficiency, and ensures the rational use of communication quality and computing resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115426683B_ABST
    Figure CN115426683B_ABST
Patent Text Reader

Abstract

An embodiment of the present invention provides a method for dynamically generating a vehicle cluster for task offloading. The method includes performing the following steps in each time slot: S1. Obtain information of multiple vehicles that can interact through wireless communication in the current time slot, and determine multiple service vehicles that can provide computing services externally and multiple member vehicles that offload tasks to these service vehicles from them; S2. Initialize the offloading schemes of all member vehicles; S3. Perform multiple rounds of iterative optimization on the current offloading scheme based on predetermined constraint conditions to minimize the total task processing delay of all member vehicles, so as to obtain a final offloading scheme, where the final offloading scheme indicates the offloading decision, offloading ratio, and transmission power for transmitting the offloaded task of whether each member vehicle offloads tasks to the corresponding service vehicle; S4. Establish one or more clusters according to the final offloading scheme, where each cluster includes one service vehicle and one or more member vehicles that offload tasks to the service vehicle.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of vehicular edge computing, specifically to the field of vehicular task offloading and cluster generation, and more specifically, to a method for dynamically generating a vehicle cluster for task offloading. Background Art

[0002] With the rapid development of the Internet of Vehicles (IoV), a large number of new vehicular applications that are computationally intensive and latency-sensitive have emerged, such as autonomous driving and automatic navigation. These applications usually require a large amount of computing resources and real-time responses, which pose challenges to vehicles with limited computing capabilities. To address these challenges, Vehicular Edge Computing (VEC) has been proposed as a promising technology. In VEC, vehicles with limited computing capabilities can expand their computing capabilities by offloading computing tasks to surrounding vehicles with idle computing resources, thereby meeting the low-latency requirements of new vehicular applications. However, the IoV has characteristics such as high-speed movement, fast-changing network topology, and time-varying wireless channels. Therefore, how to perform stable vehicular task offloading in a dynamically changing IoV environment is a problem worthy of in-depth study. Clustering can be one of the methods to solve this problem. A vehicle cluster is to divide multiple vehicles into different groups according to certain rules, and each group is a cluster.

[0003] In existing research on vehicle clusters, the solution represented by reference [1] is to divide vehicles with similar speeds into a cluster to maintain the connection of vehicles within the cluster for a long time; the solution represented by reference [2] is to form a cluster according to the distance between vehicles; the solution represented by reference [3] is to divide moving vehicles into multiple clusters according to large-scale fading information, and vehicles within the same cluster can achieve the minimum interference. However, in practical applications, using a single constraint condition such as the speed of vehicles, the distance between vehicles, and path loss does not fully consider the factors affecting the formation of stable clusters in the actual IoV scenario. The generated clusters cannot well guarantee the stability of cluster communication quality, and do not consider issues such as task processing and offloading in the cluster.

[0004] Finally, regarding the research on task offloading in the cluster, in the existing solutions, according to the established fixed cluster, each member vehicle with service requirements in the cluster selects to offload all tasks or execute them locally with a fixed transmission power. However, this method is too simple and does not consider the task execution efficiency. Or, the solution represented by reference [4] selects the task offloading strategy by minimizing the energy consumption of the VEC system under the condition of meeting the latency constraint, considering that vehicles with service requirements during the multi-vehicle driving process can offload the generated tasks to the service vehicles in the nearby cluster. However, this solution performs task offloading based on the already fixed cluster, and the generation of the cluster and task offloading do not consider the execution efficiency after task offloading.

[0005] References:

[0006] [1] R.Ahmed and F.H.Kumbhar, “V C3: A novel vehicular compatibility-based cooperative communication in 5g networks,” IEEE Wireless Commun. Lett., vol.10, no.6, pp.1207–1211, Jun. 2021.

[0007] [2] D.Zhang, H.Ge, T.Zhang, Y.-Y.Cui, X.Liu, and G.Mao, “New multi-hop clustering algorithm for vehicular ad hoc networks,” IEEE Trans. Intell. Transp. Syst., vol.20, no.4, pp.1517–1530, Apr. 2019.

[0008] [3] S.Gyawali, Y.Qian, and Q.Hu, R, “Joint resource allocation and trajectory optimization for multi-uav-assisted multi-access mobile edge computing,” IEEE Global Commun. Conf. (GLOBECOM), Dec. 2019.

[0009] [4]X. Wang, Z. Ning, and L. Guo, S. Wang, “Imitation learning enabled task scheduling for online vehicular edge computing,” IEEE Trans. Mobile Comput., vol. 21, no. 2, pp. 598–611, Feb. 2022. Summary of the Invention

[0010] Therefore, an object of the present invention is to overcome the defects of the above-mentioned prior art and provide a method for dynamically generating a vehicle cluster for task offloading.

[0011] The object of the present invention is achieved by the following technical solutions:

[0012] According to a first aspect of the present invention, there is provided a method for dynamically generating a vehicle cluster for task offloading. The method includes performing the following steps in each time slot: S1, obtaining information of a plurality of vehicles that can interact through wireless communication in the current time slot, and determining therefrom a plurality of service vehicles that can provide computing services externally and a plurality of member vehicles that offload tasks to these service vehicles; S2, initializing the offloading schemes of all member vehicles; S3, performing multiple rounds of iterative optimization on the current offloading scheme based on predetermined constraint conditions to minimize the total task processing delay of all member vehicles, so as to obtain a final offloading scheme, wherein the final offloading scheme indicates the offloading decision, offloading ratio, and transmission power for transmitting the offloaded task of each member vehicle to the corresponding service vehicle; S4, establishing one or more clusters according to the final offloading scheme, where each cluster includes a service vehicle and one or more member vehicles that offload tasks to the service vehicle.

[0013] In some embodiments of the present invention, the predetermined constraint conditions are: the distance between a member vehicle that offloads a task to a corresponding service vehicle and the service vehicle needs to be less than or equal to a predetermined distance threshold; the speed difference between a member vehicle that offloads a task to a corresponding service vehicle and the service vehicle needs to be less than or equal to a predetermined speed difference threshold; the transmission power of each member vehicle is less than or equal to a predetermined transmission power threshold; the total data volume of offloaded tasks received by each service vehicle in each time slot is less than or equal to a predetermined data volume threshold; and the transmission rate of each member vehicle for transmitting a task to a service vehicle is greater than or equal to a predetermined lower limit value of the transmission rate.

[0014] In some embodiments of the present invention, step S3 includes: S31. Determining the total task processing delay based on the current offloading scheme; S32. Performing multiple rounds of iterative optimization on the offloading scheme based on the current offloading scheme and predetermined constraints to obtain the final offloading scheme, where each round of optimization alternately optimizes each of the offloading decision, offloading ratio, and transmission power in the offloading scheme in a predetermined order to solve for the value in each corresponding item that minimizes the total task processing delay of all member vehicles.

[0015] In some embodiments of the present invention, each round of optimization in S32 includes: S321. Locking the current offloading ratio and transmission power, and optimizing the current offloading decision based on the constraints to update the offloading decision; S322. On the basis of step S321, locking the current transmission power and offloading decision, and optimizing the current offloading ratio based on the constraints to update the offloading ratio; S323. On the basis of step S322, locking the current offloading decision and offloading ratio, and optimizing the current transmission power based on the constraints to update the transmission power.

[0016] In some embodiments of the present invention, the total task processing delay is: the sum of the local processing delay required for each member vehicle to execute its unoffloaded tasks obtained based on the offloading ratio, the transmission delay required for each member vehicle to transmit the offloaded tasks to the service vehicle according to its transmission power obtained based on the offloading ratio and offloading decision, and the remote processing delay required for each service vehicle to execute the offloaded tasks of each member vehicle.

[0017] In some embodiments of the present invention, the transmission delay of each member vehicle is determined as follows: obtaining the transmission rate based on the transmission power of the member vehicle, the transmission distance between the member vehicle and the corresponding service vehicle receiving the offloaded task, path loss, wireless channel bandwidth, and noise power; determining the transmission delay based on the data volume of the offloaded task of the member vehicle and the transmission rate.

[0018] In some embodiments of the present invention, the calculation method of the total task processing delay is as follows:

[0019]

[0020] where D represents the total task processing delay, N represents the total number of member vehicles, represents the delay for the nth member vehicle to process all its tasks, y n ∈[0,1] represents the offloading ratio of the nth member vehicle, M represents the total number of service vehicles, represents the sum of the delay for the nth member vehicle to transmit all its tasks to the mth service vehicle and the delay for the mth service vehicle to process all the tasks of the nth member vehicle, x n,m ∈{0,1} represents the offloading decision, where xn,m = 1 indicates that the nth member vehicle needs to offload tasks to the mth service vehicle, x n,m = 0 indicates that the nth member vehicle does not need to offload tasks to the mth service vehicle.

[0021] According to a second aspect of the present invention, there is provided a method for processing tasks in a vehicle networking based on a cluster, including: generating a final offloading plan based on the cluster dynamic generation method described in the first aspect of the present invention and establishing one or more clusters; each member vehicle in each cluster processes its unoffloaded tasks according to the final offloading plan and uses the service vehicle in the cluster to process its offloaded tasks.

[0022] According to a third aspect of the present invention, there is provided an electronic device, including: one or more processors; and a memory, where the memory is used to store executable instructions; the one or more processors are configured to implement the steps of the method described in any one of the first aspect and the second aspect of the present invention by executing the executable instructions.

[0023] Compared with the prior art, the advantages of the present invention are as follows:

[0024] In each time slot of the present invention, a task offloading plan (the offloading plan indicates the offloading decision, offloading ratio, and transmission power for transmitting offloaded tasks for each member vehicle to the corresponding service vehicle) is obtained with the goal of minimizing the total delay of task processing, and vehicle clusters are dynamically constructed based on the task offloading plan. While dynamically adjusting the clusters, the offloading ratio and transmission power of the member vehicles in the clusters are also dynamically adjusted, greatly improving the task processing efficiency, so that the tasks of each member vehicle can be processed more timely and efficiently.

[0025] The predetermined constraints of the present invention include the transmission rate of each member vehicle and the maximum amount of data that each service vehicle can receive, further ensuring the task processing efficiency, and restricting the distance and speed difference between the member vehicle offloading tasks to the corresponding service vehicle and the service vehicle, which can ensure problems such as the network communication quality between the member vehicle and the service vehicle in the cluster.

[0026] Each round of optimization of the present invention alternately optimizes each item of the offloading decision, offloading ratio, and transmission power in the offloading plan in a predetermined order, and different optimization methods are selected according to the characteristics of each item, which can improve the efficiency and accuracy. Description of the Drawings

[0027] The following further describes embodiments of the present invention with reference to the drawings, where:

[0028] Figure 1 It is a flowchart of a method for dynamically generating a vehicle cluster for task offloading according to an embodiment of the present invention;

[0029] Figure 2 Figure a shows the schematic diagram of the vehicle cluster generation result in the first time slot t1 according to an embodiment of the present invention;

[0030] Figure 2 Figure b shows the schematic diagram of the vehicle cluster generation result in the second time slot t2 according to an embodiment of the present invention;

[0031] Figure 3 Figure shows the schematic diagram of the experimental results of multiple rounds of iterative optimization under different numbers of service vehicles according to an embodiment of the present invention. Detailed implementation manners

[0032] In order to make the objectives, technical solutions and advantages of the present invention clearer and more understandable, the present invention will be further described in detail below through specific embodiments with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0033] As mentioned in the background art section, in the existing research on cluster establishment and task offloading, a fixed cluster selection task offloading strategy is adopted, without considering the actual task execution efficiency. However, the vehicles are in high-speed dynamic change with each other, and the task volume is also changing at all times. The fixed offloading scheme may lead to a longer processing delay for some offloading tasks, losing the meaning of task offloading.

[0034] In order to obtain a better offloading strategy and establish a more optimized cluster, the present invention proposes a dynamic vehicle cluster generation scheme based on task offloading, obtaining a task offloading scheme (the offloading scheme indicates the offloading decision on whether each member vehicle offloads tasks to the corresponding service vehicle, the offloading ratio, and the transmission power for transmitting the offloading tasks) with the goal of minimizing the total task processing delay in each time slot, and dynamically constructing a vehicle cluster based on the task offloading scheme, while dynamically adjusting the cluster, also realizing the dynamic adjustment of the offloading ratio and transmission power of the member vehicles in the cluster, greatly improving the task processing efficiency, so that the tasks of each member vehicle can be processed more timely and efficiently.

[0035] The present invention will be described in detail below with reference to the accompanying drawings and embodiments.

[0036] According to an embodiment of the present invention, a dynamic vehicle cluster generation method for task offloading is provided. Refer to Figure 1 , the method includes performing steps S1, S2, S3, and S4 in each time slot. For a better understanding of the present invention, each step will be described in detail below with reference to specific embodiments.

[0037] In step S1, obtain the information of multiple vehicles that can interact through wireless communication in the current time slot, and determine multiple service vehicles that can provide computing services externally and multiple member vehicles that offload tasks to these service vehicles from them.

[0038] According to an embodiment of the present invention, it is assumed that in a VEC system, a certain number of vehicles are defined as service vehicles (Cluster Headers, CH), and a certain number of vehicles are defined as member vehicles (Cluster Member Candidates, CM). Each CM in the same cluster can offload the generated tasks to one CH. There are various ways to determine the service vehicles and member vehicles, and the implementer can determine them according to the actual situation, and the present invention does not impose any restrictions on this. Schematically, for example, when obtaining the information of a vehicle, it can be specified whether the vehicle is a service vehicle or a member vehicle. Another example is that the vehicle information can include the CPU frequency of the vehicle. By obtaining the CPU frequencies of multiple vehicles that can communicate wirelessly in the current time slot, a predetermined number (such as a certain number of) vehicles are selected as service vehicles in the order of decreasing CPU frequency, and the unselected vehicles are used as member vehicles. Still another example is that the vehicle information can include the current idle computing resource amount of the vehicle. A predetermined number (such as a certain number of) vehicles are selected as service vehicles in the order of decreasing idle computing resource amount, and the unselected vehicles are used as member vehicles.

[0039] In step S2, the offloading schemes of all member vehicles are initialized.

[0040] Due to factors such as too large a distance and too large a speed difference between CH and CM affecting the transmission rate and communication quality in the cluster, the formulation of the offloading scheme needs to meet predetermined constraint conditions to ensure the transmission rate of member vehicles in the cluster and the stability of the network connection. Therefore, according to an embodiment of the present invention, the formulation of the offloading scheme needs to meet the following five predetermined constraint conditions:

[0041] Constraint condition 1: The distance between the member vehicle offloading tasks to the corresponding service vehicle and the service vehicle needs to be less than or equal to a predetermined distance threshold, expressed as:

[0042]

[0043] where x n,m ∈{0, 1} represents the offloading decision. Among them, x n,m = 1 means that the nth member vehicle needs to offload tasks to the mth service vehicle, and x n,m = 0 means that the nth member vehicle does not need to offload tasks to the mth service vehicle. L n,m represents the distance between the nth member vehicle and the mth service vehicle, and L max represents the predetermined distance threshold. This constraint condition can improve the transmission rate and communication quality between the two vehicles.

[0044] Constraint 2: The speed difference between the member vehicle unloading tasks to the corresponding service vehicle and that service vehicle needs to be less than or equal to a predetermined speed difference threshold value, which is expressed by the formula:

[0045]

[0046] where, represents the speed of the nth member vehicle, represents the speed of the mth service vehicle, V max represents the predetermined speed difference threshold value. Wherein, the superscript CM of each symbol indicates that this data is data of the member vehicle, and the superscript CH of each symbol indicates that this data is data of the service vehicle. The superscripts CM and CH appearing in the following formula have the same meaning and will not be elaborated later. This constraint condition can improve the stability of the network connection between the two vehicles.

[0047] Constraint 3: The transmission power of each member vehicle is less than or equal to a predetermined transmission power threshold value, which is expressed by the formula:

[0048]

[0049] where, represents the transmission power of the nth member vehicle, represents the predetermined transmission power threshold value of the nth member vehicle.

[0050] Constraint 4: The total amount of data of the unloading tasks received by each service vehicle in each time slot is less than or equal to a predetermined data amount threshold value, which is expressed by the formula:

[0051]

[0052] where, N represents the total number of member vehicles, s n represents the amount of data of the unloading task of the nth member vehicle, y n represents the unloading ratio of the unloading task of the nth member vehicle, y n ∈[0, 1], and x n,m and y n have the following relationship: if y n = 0, then there is if y n ∈(0, 1], then there is represents the predetermined data amount threshold value of the mth service vehicle. This constraint condition can avoid problems such as excessive load and too long processing delay caused by too much task data that the service vehicle needs to process in the current time slot.

[0053] Constraint 5: The transmission rate of each member vehicle transmitting tasks to the service vehicle is greater than or equal to a predetermined lower limit value of the transmission rate, which is expressed by the formula:

[0054]

[0055] Where M represents the total number of service vehicles, r n,m represents the transmission rate of the nth member car, Represents the lower limit of the transmission rate predetermined by the nth member vehicle. The technical solution of this embodiment can at least achieve the following beneficial technical effects: based on the above five constraints, the communication quality is ensured by constraining the speed difference and the distance. At the same time, since the transmission power usually has an upper limit, the transmission power should not be too high, but too low transmission power and transmission rate will lead to too long transmission delay. In addition, too much total amount of data of the unloading tasks received by the service vehicle will also lead to a long delay in the processing of the unloading tasks. Therefore, by jointly constraining the three variables of transmission power, transmission rate and the total amount of task data received by the service vehicle, the task processing timeliness can be better guaranteed when determining the unloading plan, avoiding the processing delay of task unloading being too long and losing the meaning of task unloading, and maximizing the task processing efficiency under reasonable conditions.

[0056] According to an embodiment of the present invention, the initialized unloading solution also needs to satisfy the above five constraints.

[0057] In step S3, the current unloading plan is iteratively optimized for multiple rounds based on predetermined constraints to minimize the total task processing delay of all member vehicles, so as to obtain a final unloading plan, wherein the final unloading plan indicates the unloading decision of each member vehicle whether to unload the task to the corresponding service vehicle, the unloading ratio, and the transmission power of the unloading task.

[0058] According to one embodiment of the present invention, step S3 includes:

[0059] In step S31 , the total delay of current task processing is determined based on the current offloading scheme.

[0060] According to one embodiment of the present invention, the uninstall decision in the uninstall scheme is recorded as The unloading ratio is denoted as y (k) =[y1,…,y N ], the transmission power is recorded as Among them, k represents the number of optimization rounds, X (0) ,y (0) , P tr (0) Indicates the initial uninstallation scheme, X (1) ,y (1) , P tr (1) represents the unloading solution obtained by optimizing the initialized unloading solution based on the above constraints (1) to (5), X (2) ,y(2) , P tr (2) It represents the offloading scheme obtained by optimizing the initialized offloading scheme for two rounds, etc.

[0061] Since the amount of data of the result after task processing is usually very small, the time delay for the service vehicle to transmit the task result back to the member vehicle can be ignored, and only the task processing time delay and the transmission time delay for offloading the task to the service vehicle are calculated. Therefore, according to an embodiment of the present invention, the total task processing time delay is: the local processing time delay required for each member vehicle to execute its unoffloaded tasks obtained based on the offloading ratio, the transmission time delay required for each member vehicle to transmit the offloaded tasks to the service vehicle according to its transmission power obtained based on the offloading ratio and the offloading decision, and the sum of the remote processing time delays required for each service vehicle to execute the offloaded tasks of each member vehicle. The initial total task processing time delay is then based on the offloading decision X in the initialized offloading scheme (0) , offloading ratio y (0) , transmission power P tr (0) Calculated. Among them, the calculation method of the current total task processing time delay is expressed as follows:

[0062]

[0063] Among them, D represents the total task processing time delay, represents the time delay for the nth member vehicle to process all its tasks. The superscript lo represents the time delay for the member vehicle to process all its local tasks, c n represents the amount of computation required for all the tasks of the nth member vehicle, represents the CPU frequency of the nth member vehicle to process tasks, y n ∈ [0, 1] represents the offloading ratio of the nth member vehicle, represents the transmission time delay required for the nth member vehicle to transmit all its tasks to the mth service vehicle and the time delay for the mth service vehicle to process all the tasks of the nth member vehicle The sum, the superscript of represents the time delay for the service vehicle to process all offloaded tasks, s n represents the amount of data required to be transmitted for all the tasks of the nth member vehicle to be offloaded to the corresponding service vehicle, r n,m represents the transmission rate for the nth member vehicle to transmit the offloaded tasks to the mth service vehicle, It represents the CPU frequency at which the m-th service vehicle processes tasks. The technical solution of this embodiment can at least achieve the following beneficial technical effects: Unload the tasks of each member vehicle to the corresponding service vehicle according to an appropriate offloading ratio, and within the computing resource capacity of the service vehicle, enable each task to be processed simultaneously by the member vehicle and the service vehicle according to the offloading ratio, improve the task processing efficiency, and rationally utilize the limited idle computing resources of the member vehicle and the service vehicle.

[0064] According to an embodiment of the present invention, the transmission delay of each member vehicle is determined in the following manner:

[0065] Obtain the transmission rate based on the transmission power of the member vehicle, the transmission distance between the member vehicle and the corresponding service vehicle that receives the offloaded task, the path loss, the wireless channel bandwidth, and the noise power; determine the transmission delay based on the data volume of the offloaded task of the member vehicle and the transmission rate. Among them, the transmission rate r n,m The calculation method is as follows:

[0066]

[0067] Among them, W n,m represents the wireless channel bandwidth between the m-th service vehicle and the n-th member vehicle, represents the transmission power of the n-th member vehicle, α n,m represents the large-scale attenuation gain following the 3GPP path loss model, α n,m = 128.1 + 37.6log 10 (L n,m ), L n,m represents the transmission distance between the member vehicle and the service vehicle, h n,m represents the small-scale attenuation gain following the Rayleigh distribution, and N0 represents the noise power. The technical solution of this embodiment can at least achieve the following beneficial technical effects: Since the transmission power of each member vehicle is limited, when calculating the transmission rate, variables such as the transmission power of the member vehicle, the distance between the member vehicle and the service vehicle, and the path loss are combined, so that the present invention ensures the communication stability and communication delay efficiency during the data transmission process after task offloading under reasonable transmission power and distance.

[0068] In step S32, based on the current offloading scheme and predetermined constraint conditions, the offloading scheme is optimized through multiple rounds of iteration to obtain the final offloading scheme. In each round of optimization, each item among the offloading decision, offloading ratio, and transmission power in the offloading scheme is optimized alternately in a predetermined order to solve for the value in the corresponding item that minimizes the total task processing delay of all member vehicles. Since the offloading scheme to be optimized and solved includes three unknown variables: offloading decision, offloading ratio, and transmission power, and the three variables are independent of each other, it is difficult to find the optimal solution by optimizing the three variables simultaneously at one time, and the solution efficiency is low. Therefore, in each round of optimization of the present invention, each item among the offloading decision, offloading ratio, and transmission power in the offloading scheme is optimized alternately in a predetermined order, which can improve the efficiency.

[0069] According to an embodiment of the present invention, each round of optimization in S32 includes:

[0070] In step S321, lock the current offloading ratio and transmission power, and optimize the current offloading decision based on constraint conditions (1) to (5) to update the offloading decision.

[0071] According to an embodiment of the present invention, if it is the first round of optimization process currently, use the initialized offloading ratio y (0) and transmission power P tr (0) as the current offloading ratio and transmission power respectively. If k is the second round or above, use the offloading ratio y (k-1) and transmission power P tr (k-1) obtained from the k - 1 optimization in the previous round as the current offloading ratio and transmission power. By optimizing the offloading decision, solve for the value of the current k - th round corresponding offloading decision X (k) that minimizes the total task processing delay D of all member vehicles. The solution method is as shown in the following optimization function:

[0072]

[0073] where X (k) represents the updated offloading decision obtained from the k - th round of optimization. The solved X (k) is a 0 - 1 integer linear programming problem, and the intlinprog function in the matlab optimization tool can be used to solve it.

[0074] In step S322, based on step S321, lock the current transmission power and offloading decision, and optimize the current offloading ratio based on the above - mentioned constraint conditions (1), (2), and (4) to update the offloading ratio.

[0075] According to an embodiment of the present invention, if it is the first round of optimization process currently, use the initialized transmission power P tr(0) is the current locked transmission power. If k is the second round or above, the updated transmission power P is obtained by optimizing the previous round of k - 1. tr (k-1) As the current transmission power, the offloading decision X optimized and updated in step S321 (k) As the current offloading decision, the offloading ratio is optimized to solve the corresponding offloading decision y in the current k-th round (k) The value that minimizes the total task processing delay D of all member vehicles is solved as shown in the following optimization function:

[0076]

[0077] where y (k) represents the updated offloading ratio obtained by optimizing in the k-th round, and the solved y (k) is a linear programming problem and can be solved using the linprog function in the matlab optimization tool.

[0078] In step S323, based on steps S321 and S322, the current offloading decision and offloading ratio are locked, and the current transmission power is optimized to update the transmission power based on the above constraints (3) and (5).

[0079] According to an embodiment of the present invention, the offloading decision X optimized and updated in step S321 (k) is used as the current offloading decision, and the offloading ratio y optimized and updated in step S322 (k) is used as the current offloading ratio, and the corresponding transmission power P in the current k-th round is solved by optimizing the transmission power tr (k) The value that minimizes the total task processing delay D of all member vehicles is solved as shown in the following optimization function:

[0080]

[0081] where P tr (k) represents the updated transmission power obtained by optimizing in the k-th round. Since the optimization function and the constraint conditions (3) and (5) are both convex functions, the convex optimization method can be used to solve P tr (k) . The convex optimization solution method includes the following steps a1, a2, and a3:

[0082] In step a1, the Lagrangian function of the optimization function is generated, and the dual function of the optimization function is obtained through the Lagrangian function. The solution of the dual function is the same as the solution of the optimization function (10), so solving the solution of the dual function is sufficient. Among them, the optimization function The Lagrangian function is as follows:

[0083]

[0084] where λ = [λ1, …, λ N , β = [β1, …, β N represent the Lagrange multipliers of the constraint conditions (3) and (5) respectively. The dual function of optimizing formula (10) according to formula (11) can be expressed as follows:

[0085]

[0086] where λ ≥ 0, β ≥ 0.

[0087] In step a2, the KKT conditions (Karush - Kuhn - Tucker Conditions) of the optimal solution (P tr* , λ * , β * ) are introduced. The KKT conditions are as follows:

[0088] KKT condition 1: λ * ≥ 0, β * ≥ 0, (13)

[0089] KKT condition 2: where represents the sub - gradient set with respect to P tr ;

[0090] KKT condition 3:

[0091] KKT condition 4:

[0092] In step a3, based on equations (14), (15), and (16), the optimal solution (P tr* , λ * , β * ) of the optimization problem can be obtained through the following steps A31 and A32:

[0093] In step a31, initialize to get λ (t) , β (t) , t = 0, where t is the iteration number for solving the optimal solution (P tr* , λ * , β * ).

[0094] In step a32, obtain the optimal P tr(t); Let \(t = t + 1\), and calculate \(\lambda\) according to the gradient descent method (t) , \(\beta\) (t) ; If the conditions 3 and 4 in the KKT conditions are satisfied, output \((P\) tr(t) , \(\lambda\) (t) , \(\beta\) (t) ) as the optimal solution \((P\) tr* , \(\lambda\) * , \(\beta\) * ), otherwise execute step A32 again.

[0095] According to an embodiment of the present invention, the calculation using the gradient descent method is as follows: The method is as follows:

[0096] The formula (15) is further expressed as:

[0097]

[0098] Based on the formula (17), it can be solved by the following gradient descent method:

[0099]

[0100] where \(\eta_1>0\) and it is the step size.

[0101] The formula (16) is further expressed as:

[0102]

[0103] Based on the formula (19), it can be solved by the following gradient descent method:

[0104]

[0105] where \(\eta_2>0\) and it is the step size.

[0106] The previous offloading decision and the optimization of the offloading ratio are both linear optimizations, and the corresponding optimization process must be feasible. However, the transmission power optimization adopts the method of convex optimization. In order to prove that it is feasible to optimize the transmission power in the offloading scheme in the above manner to minimize the total task processing delay of all member vehicles, the inventor makes the following proof based on formula derivation:

[0107] It is necessary to prove that the way to prove that the optimization function for transmission power optimization is a convex function can be by taking the second derivative of the optimization function. When the second derivative is greater than or equal to 0, it is a convex function. The derivative process is as follows:

[0108]

[0109] where

[0110] The way to prove that the constraint condition (3) is a convex function can be to take the second derivative of this constraint condition (3). When the second derivative is greater than or equal to 0, it is a convex function. Among them, the derivation process is as follows:

[0111]

[0112] The way to prove that the constraint condition (5) is a convex function can be to take the second derivative of this constraint condition (3). When the second derivative is greater than or equal to 0, it is a convex function. Among them, the derivation process is as follows:

[0113]

[0114] Since the optimization function for transmission power optimization, and the constraint conditions (3) and (5) are all convex functions, therefore, the convex optimization method in the above embodiments can be used for optimization. According to an embodiment of the present invention, after multiple rounds of iterative optimization are performed in the above implementation manner, when the preset number of iterative optimization times is reached or the difference in the total task processing delay calculated for each of the (k + 1)-th round of iterative optimization and the k-th round of iterative optimization is less than the predetermined total delay difference, the iteration is stopped, and the offloading scheme X (k+1) , y (k+1) , P tr (k+1) obtained through the (k + 1)-th round of iterative optimization is used as the final offloading scheme.

[0115] According to an embodiment of the present invention, according to the preset constraint conditions, the CPU frequency of each member vehicle CM the CPU frequency of each service vehicle CH the set of labels of all service vehicles CH the set of labels of all member vehicles CM the predetermined number of iterative optimization times k max , and the predetermined total delay difference ε. The pseudo-code for the entire multi-round iterative optimization process is given as follows:

[0116] Line 1: Let k = 0, and initialize the feasible solution X (k) , y (k) , P tr (k) ;

[0117] Line 2: Calculate the total task processing delay

[0118] Line 3: Fix y (k) and P tr (k) , and obtain X by solving the optimization function (8) (k+1) ;

[0119] Line 4: Lock X (k+1) and P tr (k) , obtain y by solving the optimization function (9) (k+1) ;

[0120] Line 5: Lock X (k+1) and y (k+1) , obtain P by solving the optimization function (10) tr (k+1) ;

[0121] Line 6: Calculate the total task processing delay D (k+1) = D(X (k+1) , y (k+1) , P tr (k+1) );

[0122] Line 7: if |D (k+1) - D (k) | < ε or k > k max ;

[0123] Line 8: then output X (k+1) , y (k+1) , P tr (k+1) as the final offloading solution;

[0124] Line 9: else

[0125] Line 10: Let k = k + 1, and return to Line 3 for a new round of optimization.

[0126] In step S4, one or more clusters are established according to the final offloading solution, where each cluster contains a service vehicle and one or more member vehicles that offload tasks to the service vehicle.

[0127] According to an example of the present invention, assuming there are 8 service vehicles CM, labeled 1, 2, 3, 4, 5, 6, 7, 8 respectively, and 3 service vehicles CH, labeled 9, 10, 11 respectively, the results of dynamically constructing clusters for these vehicles using the method of the present invention are as shown in Figure 2 a and Figure 2 b, where, referring to Figure 2 a, in the three clusters established in the first time slot t1, the first cluster consists of the service vehicle labeled 10 and the member vehicles labeled 1 and 4, and the arrow within the cluster indicates that the member vehicle labeled 1 offloads tasks to the service vehicle labeled 10 in this cluster, the second cluster consists of the service vehicle labeled 9 and the member vehicles labeled 2, 3, 7, and 8, and the third cluster consists of the service vehicle labeled 11 and the member vehicles labeled 5 and 6; referring to Figure 2b. Among the three clusters established in the second time slot t2, the first cluster consists of the service vehicle numbered 10 and the member vehicle numbered 7, the second cluster consists of the service vehicle numbered 9 and the member vehicles numbered 1, 3, 4, and 5, and the third cluster consists of the service vehicle numbered 11 and the member vehicles numbered 2, 6, and 8. It can be seen that the vehicle clusters dynamically constructed according to the method of the present invention are not fixed, and all construct clusters and generate offloading decisions with the total task processing delay minimized.

[0128] According to another embodiment of the present invention, since the interval of each time slot is very short, it can be considered that the relative positions and speed differences of each vehicle within each time slot are almost unchanged. When not exceeding the predetermined distance threshold or the predetermined speed difference threshold between the member vehicle and the service vehicle, the cluster established in the previous time slot can be continued to be used in the next time slot, and the task is offloaded to the service vehicle in the corresponding cluster to execute the offloading task. If the predetermined distance threshold or the predetermined speed difference threshold is exceeded, one or more clusters need to be re-established according to the current actual situation in the manner of the above embodiment to perform task offloading. This can not only realize the dynamic establishment of clusters but also avoid the problem of large computational complexity caused by re-establishing clusters in each time slot.

[0129] According to an embodiment of the present invention, a method for processing tasks in a vehicle-to-everything network based on clusters is provided, including steps B1 and B2:

[0130] In step B1, based on the cluster dynamic generation method described in the above embodiment of the present invention, a final offloading scheme is generated and one or more clusters are established.

[0131] In step B2, based on the final offloading scheme, the member vehicles in each cluster process their unoffloaded tasks and use the service vehicles in the cluster to process their offloading tasks.

[0132] To verify the effectiveness of the present invention, the inventor programmed and simulated on MATLAB using the method of the above embodiment, and the simulation parameters are set as follows:

[0133] M service vehicles CH and N member vehicles CM are driving on a 2-kilometer two-way road, and different amounts of data s of tasks are set n and different amounts of computation c required for different tasks n , and the computing intensity remains unchanged. Other parameters are set as shown in Table 1 below:

[0134] Table 1 Simulation parameter settings

[0135]

[0136] The final experimental results are shown in Figure 3 , Figure 3It presents the convergence situation of multiple rounds of iterative optimization of the unloading scheme under different numbers of service vehicles CH. The vertical coordinate is the total task processing delay D of the cluster established by the VEC system according to the generated unloading scheme, with seconds as the time unit, and the horizontal coordinate is the number of iterations for optimizing the initialized unloading scheme. Starting from Figure 3 It can be observed that although the convergence speed of multiple rounds of iterative optimization of the unloading scheme decreases with the increase in the number of service vehicles, this optimization method can quickly converge within 6 times, verifying the fast convergence of this optimization method. Thus, it can be seen that the process of iterating the unloading scheme in the method of the present invention can quickly converge to efficiently obtain the unloading scheme that minimizes the total task processing delay, so as to obtain the unloading scheme faster for constructing a vehicle cluster and ensure the efficiency of task processing.

[0137] It should be noted that although the above steps are described in a specific order, it does not mean that the steps must be executed in the above specific order. In fact, some of these steps can be executed concurrently or even the order can be changed as long as the required functions can be achieved.

[0138] The present invention can be a system, a method, and / or a computer program product. The computer program product may include a computer-readable storage medium having computer-readable program instructions thereon for causing a processor to implement various aspects of the present invention.

[0139] The computer-readable storage medium can be a tangible device that holds and stores instructions for use by an instruction execution device. The computer-readable storage medium may include, for example, but is not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disc (DVD), a memory stick, a floppy disk, a mechanically encoded device, such as a punched card or raised structures in grooves having instructions stored thereon, and any suitable combination of the foregoing.

[0140] The above has described the embodiments of the present invention. The above description is exemplary and not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations are obvious to those of ordinary skill in the art in the technical field without departing from the scope and spirit of the described embodiments. The selection of the terms used herein is intended to best explain the principles of the embodiments, the practical application, or the improvement of the technology in the market, or to enable other ordinary skill in the art in the technical field to understand the embodiments disclosed herein.

Claims

1. A method for dynamically generating a vehicle cluster for task offloading, characterized in that, The method includes performing the following steps in each time slot: S1. Obtain information of multiple vehicles that can interact through wireless communication in the current time slot, and determine multiple service vehicles that can provide computing services externally and multiple member vehicles that offload tasks to these service vehicles from them; S2. Initialize the offloading schemes of all member vehicles based on predetermined constraint conditions, where the predetermined constraint conditions are: the distance between a member vehicle offloading a task to a corresponding service vehicle and the service vehicle needs to be less than or equal to a predetermined distance threshold; the speed difference between a member vehicle offloading a task to a corresponding service vehicle and the service vehicle needs to be less than or equal to a predetermined speed difference threshold; the transmission power of each member vehicle is less than or equal to a predetermined transmission power threshold; the total data volume of offloading tasks received by each service vehicle in each time slot is less than or equal to a predetermined data volume threshold; and the transmission rate of each member vehicle transmitting a task to a service vehicle is greater than or equal to a predetermined lower limit value of the transmission rate; S3. Perform multiple rounds of iterative optimization on the current offloading scheme based on the predetermined constraint conditions to minimize the total task processing delay of all member vehicles, so as to obtain a final offloading scheme, where the final offloading scheme indicates the offloading decision on whether each member vehicle offloads a task to the corresponding service vehicle, the offloading ratio, and the transmission power for transmitting the offloading task; The S3 includes: S31. Determine the current total task processing delay based on the current offloading scheme; S32. Perform multiple rounds of iterative optimization on the offloading scheme based on the current offloading scheme and the predetermined constraint conditions to obtain a final offloading scheme, where each round of optimization alternately optimizes each of the offloading decision, the offloading ratio, and the transmission power in the offloading scheme in a predetermined order to solve for the value in the corresponding item that minimizes the total task processing delay of all member vehicles; Each round of optimization in the S32 includes: S321. Lock the current offloading ratio and transmission power, and optimize the current offloading decision based on the constraint conditions to update the offloading decision; S322. On the basis of step S321, lock the current transmission power and offloading decision, and optimize the current offloading ratio based on the constraint conditions to update the offloading ratio; S323. On the basis of step S322, lock the current offloading decision and offloading ratio, and optimize the current transmission power based on the constraint conditions to update the transmission power; S4. Establish one or more clusters according to the final offloading scheme, where each cluster includes a service vehicle and one or more member vehicles that offload tasks to the service vehicle.

2. The method according to claim 1, wherein The total task processing delay is: The sum of the local processing delay required for each member vehicle to execute its unoffloaded tasks obtained based on the offloading ratio, the transmission delay required for each member vehicle to transmit the offloading task to the service vehicle according to its transmission power based on the offloading ratio and the offloading decision, and the remote processing delay required for each service vehicle to execute the offloading tasks of each member vehicle.

3. The method according to claim 2, wherein The transmission delay of each member vehicle is determined in the following manner: Obtain the transmission rate according to the transmission power of the member vehicle, the transmission distance between the member vehicle and the corresponding service vehicle receiving the offloading task, the path loss, the wireless channel bandwidth, and the noise power; Determine the transmission delay according to the data volume and transmission rate of the unloading tasks of the member vehicles.

4. The method according to claim 2, wherein The calculation method of the total task processing delay is as follows: , Among them, represents the total task processing delay, represents the total number of member vehicles, represents the th member vehicle's delay in processing all its tasks, represents the th member vehicle's offloading ratio, represents the total number of service vehicles, represents the th member vehicle's delay in transmitting all its tasks to the th service vehicle and the sum of the delays of the th service vehicle in processing all the tasks of the th member vehicle, represents the offloading decision, among which, represents the th member vehicle needs to offload tasks to the th service vehicle, represents the th member vehicle does not need to offload tasks to the th service vehicle.

5. A cluster-based method for processing tasks in a vehicle networking, characterized in that, Including: Generate a final unloading plan based on the cluster dynamic generation method described in any one of claims 1-4 and establish one or more clusters; Based on the final unloading plan, the member vehicles in each cluster process their unloaded tasks and use the service vehicles in the cluster to process their unloading tasks.

6. A computer-readable storage medium, characterized in that, A computer program is stored thereon, and the computer program can be executed by a processor to implement the steps of the method described in any one of claims 1-5.

7. An electronic device, characterized in that, Including: One or more processors; And A memory, wherein the memory is used to store executable instructions; The one or more processors are configured to implement the steps of the method described in any one of claims 1-5 by executing the executable instructions.

Citation Information

Patent Citations

  • Internet of vehicles joint optimization calculation task unloading ratio and resource allocation method

    CN113783959A

  • Edge computing task unloading method and system in Internet of Vehicles environment

    CN113965961A