Internet of vehicles task unloading decision-making method based on cloud and mist cooperative computing
By introducing the V2V auxiliary task forwarding mechanism and multi-strategy improved genetic algorithm into the Internet of Vehicles environment, the problems of task offloading delay and energy consumption in the Internet of Vehicles scenario are solved, and lower system cost and higher resource utilization efficiency are achieved.
Patent Information
- Application Number
- CN202410532976.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-29
- Publication Date
- 2024-10-11
AI Technical Summary
Existing technologies are difficult to effectively solve the task offloading problem of mobile vehicles in the Internet of Vehicles scenario. Especially for delay-sensitive tasks, it is difficult to ensure the stability of the task forwarding link and the adequacy of resources under the dynamic changes of vehicle mobility and V2V communication links. use.
This paper proposes a decision-making method for offloading tasks in the Internet of Vehicles based on cloud-fog collaborative computing. It introduces a V2V auxiliary task forwarding mechanism, improves the genetic algorithm through environmental information prediction forwarding vehicle algorithm and multi-strategy, and builds a task offloading cost model to minimize system delay and energy consumption. .
It implements a task offloading strategy with lower latency and energy consumption in the Internet of Vehicles environment, uses cooperative vehicles to forward tasks, reduces the forwarding load of fog nodes, and improves system performance and resource utilization efficiency.
Smart Images

Figure CN118764482A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of Internet of Vehicles task offloading, and specifically relates to an Internet of Vehicles task offloading decision method based on cloud-fog collaborative computing. Background Art
[0002] 5G vehicle networking technology has been widely used in the fields of autonomous driving, automatic navigation, and on-board natural language processing. However, on-board resources are difficult to meet the requirements of computing-intensive and delay-sensitive tasks. Cloud servers can assist vehicles in processing on-board application tasks, but due to the long distance between the vehicle and the cloud and the centralized management of cloud servers, vehicle upload tasks will have a long delay. Fog computing, as a supplement to cloud computing, can effectively solve the problems of insufficient on-board equipment resources and large latency of existing networks. It can also interact with cloud computing, that is, using cloud and fog to collaboratively process tasks with high computing requirements and store data for a long time.
[0003] At present, in the research of offloading strategies in fog environment, in order to meet the QoS requirements of IoT users, some reports propose to design the task offloading problem as a Markov decision process and use deep reinforcement learning to obtain the offloading strategy; some have proposed a partial offloading method based on evolutionary game theory to obtain a lower overhead offloading solution; for the low latency requirements of delay-sensitive applications, some studies have proposed a task offloading solution based on intelligent ant colony algorithm to obtain a low latency offloading strategy. However, due to the high latency sensitivity of tasks in the Internet of Vehicles scenario, the algorithms and models proposed in the above articles are difficult to apply to the Internet of Vehicles environment.
[0004] In the Internet of Vehicles scenario, some studies have designed a vehicle computing network architecture based on cloud-edge collaboration, modeled the delay and energy consumption of the unloading decision problem, used a multi-objective immune algorithm to obtain an unloading solution, and verified the effectiveness of the proposed algorithm through comparative experiments. There are also some studies that use an improved hybrid genetic algorithm and an improved artificial fish swarm algorithm to obtain the optimal allocation solution in two stages for task unloading and resource allocation problems in the Internet of Vehicles environment. However, the above public solutions all assume that the vehicle is stationary and do not take into account the mobility of the vehicle and the problem of cross-regional transmission of tasks.
[0005] For task offloading strategies in mobile vehicle networks, existing research mainly adopts centralized control of resource allocation or virtual machine migration between fog nodes to ensure the integrity of task computing. For example, there is a literature that studies the task offloading and resource allocation problems considering mobility in vehicle fog computing, and establishes a joint optimization problem of minimum and maximum angles. The solution to the optimization problem is obtained through problem decomposition and mobility prediction, but this study does not take into account the situation of task migration. There are also studies that screen out resources that match the on-board tasks based on information such as the vehicle's speed, location, and the usage status of surrounding resources, so as to minimize the completion time of the task flow.
[0006] However, it can be seen from the above public reports that current research pays little attention to the mobility issues of V2V communication, resulting in the inability to fully utilize the resources in the vehicle's surrounding environment, and the vehicle's inability to determine the unloading location within the task transmission time, making it difficult to ensure the stability of the task forwarding link.
[0007] Based on the above problems, the present invention proposes a vehicle network task offloading decision method based on cloud-fog collaborative computing, introduces a V2V assisted task forwarding mechanism, aims to minimize system latency and energy consumption, and constructs a task offloading cost model based on environmental information prediction and forwarding vehicles. Summary of the invention
[0008] Aiming at the defects and problems that the vehicle terminals in the existing mobile vehicle networking system are difficult to meet the requirements of computationally intensive and delay-sensitive tasks, and the dynamic changes of V2V communication links caused by vehicle mobility reduce the quality of task offloading, the present invention provides a vehicle networking task offloading decision method based on cloud-fog collaborative computing.
[0009] The solution adopted by the present invention to solve the technical problem is: a method for decision-making on task offloading of Internet of Vehicles based on cloud-fog collaborative computing, comprising the following steps:
[0010] Step 1: Establishment of system architecture and communication model
[0011] (1) Create an overall architecture model of the vehicle task offloading system based on fog computing; evenly arrange multiple fog servers equipped with road test perception units on the roadside; define the vehicle with task offloading requirements as the source vehicle, and the remaining vehicles as collaborative vehicles;
[0012] (2) Task division: Divide the task into n independent subtasks and define the data volume and computing requirements of each subtask. The source vehicle can choose to offload the task to the local, current fog server, and cloud server, or to the adjacent fog server through the current fog server or cooperative vehicles.
[0013] (3) Construct communication models, including the vehicle-to-fog server V2F communication model, the vehicle-to-vehicle V2V communication model, the fog server-to-fog server F2F communication model, and the fog server-to-cloud server F2C communication model;
[0014] (4) Design of a vehicle forwarding algorithm based on environmental information prediction: Based on known environmental information including vehicle speed and vehicle location, the vehicle that forwards the task to the fog server is defined as a fog-transferring vehicle. A vehicle forwarding prediction algorithm is designed to predict the communication link status between vehicles and the communication status between the vehicle and the fog server. The algorithm is iteratively run until there are no vehicles that meet the conditions around the fog-transferring vehicle or the fog-transferring vehicle has reached the target fog node, and the algorithm is terminated. Finally, the forwarding vehicle and forwarding hop count of the task are obtained.
[0015] Step 2: Construction of task offloading cost optimization model
[0016] (1) Delay model: The computational delay of the task on the local server, fog server, and cloud server, as well as the transmission delay through V2V, V2F, and F2F links are calculated respectively;
[0017] (2) Parallel computing model: Establish a parallel computing model for tasks to optimize the task completion time, including: when the task starts to be uploaded, set the global clock GC to record the time when each task starts and ends forwarding, record the last completion time LT of its task queue on each computing node, set the initial value of the global clock to 0, and the calculation and forwarding of the task do not affect each other. Then the global clock of the task forwarding process can be represented by the forwarding delay of each task:
[0018]
[0019] a. When the task is executed locally, no forwarding delay is generated and GC remains unchanged;
[0020] b. When tasks are executed on fog servers and cloud servers, GC needs to add the transmission delay of the tasks. After obtaining the task offloading decision, the tasks that need to be executed locally are calculated one by one, and the calculation delay of the local execution task set is accumulated to obtain the final task offloading completion time.
[0021] c. When a task is unloaded at a fog node or cloud server, the task needs to be transferred to the target node to determine the start calculation time of the task. Since there is a parallel relationship between task transfer and calculation, the start calculation time of the task is the larger value between the global clock of the task transfer to the target node and the final task unloading completion time at the target node. The start calculation time of the fog node and the start calculation time of the cloud server task are represented as BT k =max(GC,LT k ), BT C =max(GC,LT C ), the final completion time of each node is obtained by adding the start calculation time of the current task to the calculation delay of the task, and the value is:
[0022]
[0023]
[0024] In the formula, LT k Indicates the final completion time of a fog node, LT C Indicates the last completion time of the cloud server.
[0025] According to the above task parallel computing model, the final completion delay of the task is the maximum value of the final completion time of all nodes:
[0026]
[0027] (3) Energy consumption model: The energy consumption of the task on the local, fog server, and cloud server is calculated respectively. When the offloading is completed, the total energy consumption of the system is the sum of the energy consumption generated at the above different offloading locations;
[0028] Based on the above model, we transform the task offloading problem into a system cost optimization problem, and establish a task offloading system cost optimization model with the goal of minimizing latency and energy consumption:
[0029]
[0030]
[0031]
[0032] α+β=1,0≤α,β≤1
[0033] Step 3: Design a multi-strategy improved genetic algorithm to solve the above system cost optimization problem
[0034] (1) Decision encoding: Integer encoding is used to represent task offloading decisions, where each number represents an offloading location;
[0035] (2) Population initialization: using chaotic sequences to generate the initial population to ensure population diversity;
[0036] (3) Selection operator: The individual fitness TSC is determined by the delay and energy consumption, and the fitness function is defined as:
[0037] Where m is a constant; the population is screened by combining delay and energy consumption and using the Metropolis criterion;
[0038] (4) Adaptive operator design: Design an adaptive crossover operator and mutation operator to adjust the mutation probability according to the evolutionary generation and population similarity; the adaptive degree function of the crossover probability of the crossover operator is:
[0039]
[0040] Among them, P cmax , P cmin are the maximum and minimum values of the crossover probability, r is a constant, F is the fitness of each individual, and t represents the number of iterations;
[0041] The variation adjustment probability P m for:
[0042]
[0043] (5) Perturbation operator: A Gaussian perturbation operator is introduced to help the algorithm escape from the local optimum. The Gaussian perturbation operator is expressed as:
[0044] X' best (t) = X best (t)+G(s)
[0045] Among them, X best (t), X' best (t) represents the optimal individuals before and after the tth generation disturbance, respectively, and G(s) represents the random distribution obeying the Gaussian distribution.
[0046] Through the iterative optimization of the multi-strategy improved genetic algorithm, it is finally possible to find the optimal solution in a given offloading strategy within a limited time, that is, output the final task offloading solution.
[0047] Furthermore, the V2F communication model in step 1 can be used to describe the change in the state of the communication link between the mobile vehicle and the fog server; the communication between vehicles adopts a dedicated short-range communication technology; within the maximum communicable distance R2 of the vehicle, the vehicles can communicate directly with each other. When the transmission distance exceeds R2 and there are relay vehicles around, the task can be transmitted through multiple hops, otherwise it cannot be transmitted.
[0048] Furthermore, the delay model in step 2 includes the following contents:
[0049] a. When the task is offloaded to the local machine, the delay is only generated during the task calculation. i The computation delay of local offloading is only related to the CPU speed of the source vehicle, so the local computation delay can be expressed as
[0050] b. When the task is offloaded to the fog server, the task can be offloaded to the local fog server or to a nearby fog server across regions. The cross-region offloaded task will be forwarded through the fog node or V2V assisted forwarding task. The forwarding method is determined by the PFV algorithm result: when the PFV algorithm determines that there is a cooperative vehicle that can forward the task near the source vehicle task, V2V forwarding is preferred; if there is no cooperative vehicle that can forward the task nearby, it is forwarded through the fog node;
[0051] c. Task offloading to fog node F k The calculation delay is:
[0052]
[0053] d. When the task is offloaded to the cloud server, the transmission link of the task is from the source vehicle to the local fog server, and then forwarded from the local fog server to the cloud server; Task M i The delay from the local fog node to the cloud is Mission M i The total transmission delay offloaded to the cloud server is:
[0054]
[0055] Mission M i The computational latency on the cloud server is
[0056] Furthermore, when the task is offloaded to the fog server, there are three types of transmission sub-links between the source vehicle and the target fog server: the transmission link between the vehicle and the fog server, the transmission link between vehicles, and the transmission link between fog servers. The final transmission link of the task is composed of three sub-links. The transmission delays corresponding to the above three links are:
[0057] (1) Transmission link between the vehicle and the fog server: When task M i From vehicle V j When forwarding to the fog node, the transmission rate of the link is known from formula (3), and the transmission delay of the V2F link is
[0058] (2) Transmission link between vehicles: When task M i From vehicle V j When forwarding to nearby vehicles, the transmission rate of the link is known from formula (6), so the transmission delay of the V2V link is
[0059] (3) Transmission link between fog servers: When task M i When forwarding from a fog node to an adjacent fog node, the transmission rate of the link can be known from equation (9), so the transmission delay of the F2F link is
[0060] Assume h VV is the number of hops of the vehicle forwarding task, h FF is the number of hops of the fog node forwarding task, then the task M can be calculated i Offload to fog server F k The total transmission delay.
[0061] Furthermore, the energy consumption model in step 2 includes the following contents:
[0062] a. When the task is offloaded locally, the energy consumption generated by the computing process is only related to the computing power of the on-board service unit. i The energy consumption of unloading at the source vehicle is Where P V is the calculated power of the vehicle. The total energy consumption of local unloading is:
[0063] E V =LT V ′P V
[0064] b. When the task is offloaded to the fog server, the energy consumption generated during the transmission process is determined by the transmission link, and the energy consumption of the transmission and computing process is only related to the power. k Uninstalled Task Set The total energy consumption is:
[0065]
[0066] The total energy consumption of unloading at the fog node is:
[0067]
[0068] c. When the task is offloaded to the cloud server, task M i The energy consumption offloaded to the cloud server is expressed as:
[0069]
[0070] The total energy consumption is:
[0071]
[0072] Based on the above calculation results, when the unloading is completed, the total energy consumption of the system is:
[0073] E=E V +E F +E C .
[0074] Furthermore, the decision coding in step 3 adopts integer coding, and the number of each gene bit represents the unloading location of the task. When the value of the gene bit is 0, it means that the task is unloaded locally; when the value of the gene bit is greater than 0 and less than or equal to the number of fog servers, it means that the task is unloaded on the fog server with the corresponding serial number; when the value of the gene bit is greater than the number of fog servers, it means that the task is unloaded to the cloud server.
[0075] Compared with the prior art, the present invention has the following beneficial effects:
[0076] The present invention proposes a decision method for task offloading in the Internet of Vehicles based on cloud-fog collaborative computing. First, an algorithm is proposed to determine the task forwarding vehicle based on the vehicle's surrounding environment information, namely the predicted forwarding vehicle algorithm (PFV algorithm). The algorithm selects vehicles around the vehicle that are closer to the target fog node and can completely transmit the task to the next fog node as fog-transfer vehicles, and iterates the algorithm until there are no vehicles that meet the conditions around the fog-transfer vehicle or the fog-transfer vehicle has reached the target fog node, and finally the forwarding vehicle and forwarding hop number of the task are obtained.
[0077] Then, a task offloading model based on cloud-fog collaborative computing in the Internet of Vehicles environment is designed. In this model, a V2V-assisted task forwarding mechanism is introduced, and the PFV algorithm is used to obtain the task forwarding link. The parallel computing relationship of tasks between computing nodes is considered, and a delay and energy consumption model based on parallel computing is designed. A task offloading scheme based on a genetic algorithm improved by multiple strategies is also designed. The algorithm improves the initialization and selection operators of the genetic algorithm, adaptively adjusts the crossover and mutation operators, and introduces a Gaussian perturbation operator to improve the local optimization ability of the algorithm.
[0078] Simulation experiments also show that compared with other schemes, the unloading method of the present invention can obtain an unloading strategy with lower latency and energy consumption at the same number of iterations, and can also obtain an unloading strategy with lower system cost when the number of tasks and fog nodes are different. The introduced V2V auxiliary task forwarding mechanism can utilize cooperative vehicles to forward tasks and reduce the forwarding load of fog nodes. BRIEF DESCRIPTION OF THE DRAWINGS
[0079] Figure 1 It is a schematic diagram of the process of the present invention;
[0080] Figure 2 It is a schematic diagram of the overall system architecture of the present invention;
[0081] Figure 3 It is a schematic diagram of the V2F communication model;
[0082] Figure 4 It is a schematic diagram of the V2V communication model;
[0083] Figure 5 This is an example diagram of a parallel computing model;
[0084] Figure 6 Encode example graphs for decision making;
[0085] Figure 7 Comparison of the costs of different solutions when considering latency and energy consumption for balance;
[0086] Figure 8 This is a cost comparison chart of different solutions when only delay is considered;
[0087] Fig. 9 This is a cost comparison chart of different solutions when only energy consumption is considered;
[0088] Fig.10 This is a comparison chart of system costs for different numbers of tasks;
[0089] Fig.11 This is a comparison chart of system costs for different fog nodes;
[0090] Fig.12 This is the impact of the number of cooperative vehicles on the forwarding probability of fog nodes. DETAILED DESCRIPTION
[0091] The following is combined with Figure 1-12 The present invention is further illustrated by the following embodiments.
[0092] Embodiment 1:
[0093] This embodiment proposes a method for decision-making on task offloading in Internet of Vehicles based on cloud-fog collaborative computing. Figure 1 As shown in the figure, based on cloud-fog collaborative computing, a V2V-assisted task forwarding mechanism is first introduced, and an algorithm for predicting and forwarding vehicles based on environmental information is designed; then, with the goal of minimizing latency and energy consumption, the parallel computing relationship of tasks on each computing node is considered, and a task offloading cost model based on environmental information prediction and forwarding vehicles is constructed; finally, a multi-strategy improved genetic algorithm is proposed to solve the above task offloading optimization problem, which specifically includes the following steps:
[0094] 1. Establish the system architecture and communication model, and design an algorithm to determine the task forwarding vehicle based on the vehicle's surrounding environment information
[0095] (1) Create an overall architecture model of the vehicle task offloading system based on fog computing; Considering the one-way straight road scenario, multiple fog servers equipped with road test sensing units are evenly arranged on the roadside, such as Figure 2 As shown in Figure 1, the vehicle with task offloading requirements is defined as the source vehicle, and the remaining vehicles are defined as cooperative vehicles.
[0096] The vehicle communicates with the fog server in the current area using V2F, and vehicles can communicate directly with each other through V2V links. Adjacent fog servers and fog services and cloud servers are connected by wired optical fiber links, so that vehicles can obtain information from fog servers and collaborate with other vehicles. In this model, the source vehicle can choose to offload tasks to the local, current fog server, and cloud server, or to an adjacent fog server through the current fog server or a collaborative vehicle.
[0097] (2) Task division: Assume that a task can be divided into n subtasks, each subtask is indivisible and independent of each other, and the subtask set is represented by M = {M1, M2, L, M n}, each subtask is recorded as M i ={w i ,c i}, where w i and c i They represent the amount of data transmitted and the amount of computation required for the task respectively.
[0098] Assume that the vehicle set is V = {V0, V1, L, V m}, where V0 represents the source vehicle, {V1,L,V m} are cooperative vehicles, and each vehicle can be represented as where v j is the vehicle speed, For vehicle computing power, The location of the vehicle.
[0099] The fog server set is represented as F = {F1, F2, L, F q}, each fog server is denoted as is the CPU speed of the fog server, is the deployment location of the fog server. The computing power of the cloud server is denoted as f C .
[0100] At a certain time slot when a vehicle uploads a task, the fog server can obtain the vehicle information of the current area through the built-in positioning service. The fog servers communicate with each other through optical fibers to obtain the information of adjacent fog servers. The source vehicle sends the task information to the fog server, and the fog server runs the algorithm to obtain the unloading strategy based on the current environmental information. The construction of this system model aims to improve the efficiency and quality of task processing, reduce the task completion time, and optimize the system performance by rationally utilizing the computing resources of the local, fog layer, and cloud layer; at the same time, the reliability and flexibility of the system can be further improved through the collaboration between vehicles and the information sharing between fog servers.
[0101] (3) Constructing the communication model: In the above one-way linear highway vehicle networking scenario, four communication models are adopted: V2F, V2V, F2F, and F2C. F2F is the communication between fog servers, and F2C is the communication between fog servers and cloud servers. The vehicles in the scenario are all in motion, and the V2V and V2F link states will change with the movement of the vehicles. Further:
[0102] 1) The V2F communication model can be used to describe the changes in the communication link status between mobile vehicles and fog servers, such as Figure 3 As shown, let dj For vehicle V j Distance to RSU, B VF is the bandwidth of communication between the vehicle and the RSU, the channel between the vehicle and the RSU is Rayleigh flat fading, d represents the path loss factor, and e represents the link fading factor. The transmission rate of V2F communication can be expressed as:
[0103]
[0104] Assume that the vehicle V j At time t0, the vehicle enters the edge of the RSU coverage area (fog area), and the vehicle speed is v j , ignoring the road width, the vertical distance between RSU and the road is l, and the RSU coverage radius is R1, then at time t, vehicle V j Distance d from RSU j It can be expressed as:
[0105]
[0106] Due to the mobility of vehicles, the communication transmission rate between vehicles and RSU varies with the speed of the vehicle. Generally, the average transmission rate within the coverage area is taken as the actual transmission rate. The fog node is described as a combination of fog server and RSU. Then the vehicle V j The average transmission rate within the coverage area of the fog node is:
[0107]
[0108]
[0109] In the above formula, The transmission rate obtained by combining formula (1) and formula (2) is a function of time. For vehicle V j Total driving time within the RSU coverage area;
[0110] Vehicle V j The remaining communication time with the RSU in this area is:
[0111]
[0112] The numerator of this formula is the distance from the vehicle to the edge of the current fog area.
[0113] 2) The communication between vehicles in the present invention adopts a dedicated short-range communication technology, such as Figure 4 As shown in the figure, d ABIndicates the distance between vehicles A and B, and the distances between other vehicles are expressed in the same form. Within the maximum communicable distance R2 of the vehicle, vehicles can communicate directly. When the transmission distance exceeds R2 and there are relay vehicles around, the task can be transmitted through multiple hops, otherwise it cannot be transmitted. Figure 4 In the example, when car A transmits data to car C, it can first send the data to car B through a multi-hop approach, and then car B transmits the data to car C.
[0114] Assume that the communication bandwidth between vehicles is B VV , then the transmission rate of communication between vehicles can be expressed as:
[0115]
[0116] In addition, during the driving process, the communication link status between vehicles will continue to change. The vehicle needs to determine the communication time of vehicles within the communication range to ensure the reliability of task transmission. Figure 4 For example, if car A and car B are represented as Car B is represented by Consider the following three situations of the speeds of the two vehicles:
[0117] If v A =v B , then the distance between the two cars remains unchanged, and cars A and B can always communicate.
[0118] If v A >v B , then the communication time between A and B is:
[0119]
[0120] If v A <v B , then the communication time between A and B is:
[0121]
[0122] 3) The communication between fog servers F2F and the communication between fog servers and cloud servers F2C both use wired links. Adjacent fog servers can communicate directly and obtain each other’s status information. Tasks can be transmitted across regions through fog servers. FF is the communication bandwidth between fog servers, B FC is the communication bandwidth between the fog server and the cloud server. Then the communication transmission rates of F2F and F2C can be expressed as:
[0123]
[0124]
[0125] 4) After the introduction of the above V2V auxiliary forwarding mechanism, vehicles can communicate directly, but the link between vehicles will change as the vehicles move. In order to ensure the reliability of task transmission, a new algorithm for predicting forwarding vehicles based on environmental information is proposed. The specific contents are as follows:
[0126] Since the vehicles are in a mobile state, the communication links between vehicles and between vehicles and fog nodes are constantly changing, and the reliability of task forwarding between different nodes is difficult to guarantee. If the environmental information such as vehicle speed and vehicle location is known, the vehicle that forwards the task to the fog server can be defined as a fog-transfer vehicle, and the final fog-transfer vehicle is determined by predicting the existence time of the link between vehicles and the vehicle location. The algorithm for predicting and forwarding vehicles based on environmental information is as follows:
[0127] Table 1 PFV algorithm
[0128]
[0129]
[0130] The first judgment of rows 6 to 11 in the above table is to screen out the set of vehicles that can transfer the task to the next vehicle. The second judgment is to determine whether the next-hop vehicle can forward the task to the fog node before leaving the fog area where it is located, so as to ensure that the task is not lost, and the set of vehicles that meet the conditions is used as the final set of forwardable vehicles. Rows 19 to 20 of Table 1 determine whether the next-hop vehicle brings the task to an area closer to the target fog node. If it is closer, the vehicle is set as a new fog-transferring vehicle, otherwise the fog-transferring vehicle remains the original vehicle. Rows 23 to 25 of Table 1 iterate the algorithm until the fog-transferring vehicle can reach the target fog node or there is no forwardable vehicle, and finally the forwarding vehicle and forwarding hop number of the task are obtained.
[0131] 2. Construction of task offloading cost optimization model, including:
[0132] 1) Delay model:
[0133] a. When the task is offloaded to the local machine, the delay is only generated during the task calculation. i The computation delay of local offloading is only related to the CPU speed of the source vehicle, so the local computation delay can be expressed as
[0134] b. When the task is offloaded to the fog server, the task can be chosen to be offloaded to the local fog server or to a nearby fog server across regions. The cross-regional offloaded tasks will be forwarded through fog nodes or V2V assisted forwarding tasks. The forwarding method is determined by the result of the PFV algorithm: when the PFV algorithm determines that there is a cooperative vehicle that can forward the task near the source vehicle task, it will be forwarded through V2V first; if there is no cooperative vehicle that can forward the task nearby, it will be forwarded through the fog node. Therefore, there will be three types of transmission sub-links between the source vehicle and the target fog server: the transmission link between the vehicle and the fog server, the transmission link between vehicles, and the transmission link between fog servers. The final transmission link of the task is composed of a combination of the three sub-links. The transmission delays corresponding to the above three links are:
[0135] (1) Transmission link between the vehicle and the fog server: When task M i From vehicle V j When forwarding to the fog node, the transmission rate of the link is known from formula (3), and the transmission delay of the V2F link is
[0136] (2) Transmission link between vehicles: When task M i From vehicle V j When forwarding to nearby vehicles, the transmission rate of the link is known from formula (6), so the transmission delay of the V2V link is
[0137] (3) Transmission link between fog servers: When task M i When forwarding from a fog node to an adjacent fog node, the transmission rate of the link can be known from equation (9), so the transmission delay of the F2F link is
[0138] Assume h VV is the number of hops of the vehicle forwarding task, h FF is the number of hops of the fog node forwarding task, then task M i Offload to fog server F k The total transmission delay is:
[0139]
[0140] c. Task offloading to fog node F k The calculation delay is:
[0141]
[0142] d. When the task is offloaded to the cloud server, the transmission link of the task is from the source vehicle to the local fog server, and then forwarded from the local fog server to the cloud server. Then the task M i The delay from the local fog node to the cloud is Mission Mi The total transmission delay offloaded to the cloud server is:
[0143]
[0144] Mission M i The computational latency on the cloud server is
[0145] 2) Parallel computing model:
[0146] After determining the task offloading strategy, the source vehicle starts uploading the task to each computing node. When the task is uploaded, each task occupies the entire bandwidth of the current link. When the task is uploaded to the target computing node and the node is in an idle state, the task begins to be processed.
[0147] Assuming that the computing tasks and forwarding tasks of each node can be performed simultaneously and each computing node can only process one task at a time, since there is parallelism in the calculations between different computing nodes and whether the node is idle needs to be considered when the task is offloaded to the computing node, the delay caused by offloading the task to different nodes is not a simple accumulation of each part.
[0148] Based on the above assumptions, a parallel computing model for tasks is established. When the task starts to be uploaded, the global clock GC is set to record the time when each task starts and ends forwarding, and the last completion time LT of its task queue is recorded on each computing node. Assuming the initial value of the global clock is 0, the calculation and forwarding of the task do not affect each other, then the global clock of the task forwarding process can be represented by the forwarding delay of each task:
[0149]
[0150] When the task is executed locally, no forwarding delay is generated and GC remains unchanged. When the task is executed on the fog server and cloud server, GC needs to add the transmission delay of the task.
[0151] After obtaining the task offloading decision, first calculate the tasks that need to be executed locally one by one, and add up the calculation delay of the local execution task set to get the final task offloading completion time:
[0152]
[0153] When a task is unloaded at a fog node or cloud server, the task needs to be transferred to the target node to determine the start calculation time of the task. Since there is a parallel relationship between task transfer and calculation, the start calculation time of the task is the larger value between the global clock of the task transfer to the target node and the final task unloading completion time at the target node. The start calculation time of the fog node and the start calculation time of the cloud server task are represented as BT k =max(GC,LT k), BT C =max(GC,LT C ). The final completion time of each node is obtained by adding the start calculation time of the current task to the calculation delay of the task, and its value can be expressed as:
[0154]
[0156] In the above formula, LT k Indicates the final completion time of a fog node, LT C Indicates the last completion time of the cloud server.
[0157] Therefore, according to the above task parallel computing model, the final completion delay of the task is the maximum value of the final completion time of all nodes, that is:
[0158]
[0159] Further, the parallel computing model is illustrated by example. Figure 5 As shown, it is assumed that there are 3 fog servers that can provide unloading services in the current environment, and the pending tasks of the source vehicle are divided into 12 subtasks. The unloading decision generated by the fog server is {2,0,3,1,0,0,1,4,2,0,2,4}. After the decision encoding of the task unloading position, the task unloading delay can be obtained. The decision encoding process is detailed in Section 3.2. Take the unloading process of M7 as an example: Since M5 and M6 before M7 are unloaded at the source vehicle, M7 starts transmission directly after the transmission of M4 is completed, and the start transmission time of M7 is GC3. M7 is transmitted to FS1 at time GC4. At this time, the final completion time of FS1 is Since LT1>GC4, M7 needs to wait for M4 to complete its calculation on FS1. The start calculation time of M7 on FS1 is BT1=max(GC4,LT1)=LT1. Therefore, the final completion time of M7, i.e. the final completion time of FS1 after M7 is unloaded, becomes
[0160] According to the above calculation method, the final completion time of the source vehicle, the final completion time of FS2, the final completion time of FS3 and the final completion time of the cloud server are:
[0161]
[0162]
[0163]
[0164]
[0165] Therefore, the final completion delay of the task offloading corresponding to this decision is the maximum completion time of each computing node, that is, T = LT C .
[0166] 3) Energy consumption model:
[0167] a. When the task is offloaded locally, the energy consumption generated by the computing process is only related to the computing power of the on-board service unit. i The energy consumption of unloading at the source vehicle is Where P V is the calculated power of the vehicle. The total energy consumption of local unloading is:
[0168] E V =LT V ′P V (18)
[0169] b. When the task is offloaded to the fog server, the energy consumption generated during the transmission process is determined by the transmission link, and the energy consumption of the transmission and computing process is only related to the power. k Uninstalled Task Set The total energy consumption is:
[0170]
[0171] The total energy consumption of unloading at the fog node is:
[0172]
[0173] c. When the task is offloaded to the cloud server, task M i The energy consumption offloaded to the cloud server is expressed as:
[0174]
[0175] The total energy consumption is:
[0176]
[0177] Based on the above calculation results, when the unloading is completed, the total energy consumption of the system is:
[0178] E=E V +E F +E C (twenty three)
[0179] 4) Cost Model
[0180] In order to effectively balance the delay and energy consumption generated during task offloading, the present invention transforms the task offloading problem to be solved into a system cost optimization problem. With the goal of minimizing delay and energy consumption, a system cost optimization model is established:
[0181]
[0182] st
[0183]
[0184] α+β=1,0≤α,β≤1 (26)
[0185] 3. Design a multi-strategy improved genetic algorithm to solve the above system cost optimization problem
[0186] Based on the algorithm for predicting forwarding vehicles based on environmental information proposed in step 1 above, a multi-strategy improved genetic algorithm is proposed for the optimization problem in the system cost optimization model in step 2 above. The optimal task offloading solution is obtained by solving the offloading decision problem that minimizes the system cost of the above formula (24). The specific steps are as follows:
[0187] Step 1: Decision coding: The decision coding uses integer coding. The number of each gene bit indicates the unloading location of the task. When the value of the gene bit is 0, it means that the task is unloaded locally; when the value of the gene bit is greater than 0 and less than or equal to the number of fog servers, it means that the task is unloaded to the fog server with the corresponding serial number; when the value of the gene bit is greater than the number of fog servers, it means that the task is unloaded to the cloud server. Figure 6 In the coding example shown, assume that there are 3 available fog servers in the environment as fog nodes, and divide the task into 8 subtasks. When the chromosome is encoded as {2, 0, 3, 1, 0, 4, 2, 3}, it means that tasks M2 and M5 are unloaded at the source vehicle, task M6 is unloaded at the cloud server, and the remaining tasks are unloaded at the corresponding numbered fog servers according to the numbers of the gene bits.
[0188] Step 2: Population initialization: The classical genetic algorithm uses a pseudo-random number generator to generate the initialized population. The initial population is blind and prone to premature maturity. In the improved multi-strategy genetic algorithm, because the chaotic sequence has disorder, aperiodicity, and ergodicity, when generating the initial population, it can ensure the diversity of the population while providing a better initial solution for the population. The present invention uses the Tent mapping in the chaotic sequence to generate the initial population:
[0189]
[0190] Step 3, select operator; The fitness function in the genetic algorithm is an indicator used to measure the individual's adaptability to the environment. In the present invention, the individual fitness TSC is determined by the delay and energy consumption, as shown in formula (24), but the fitness expressed by this formula is not obvious enough for excellent individuals, especially when the population similarity is extremely high in the later stage of the algorithm, it is difficult to highlight the better solution. The new fitness function is defined as:
[0191]
[0192] In the above formula, m is a constant.
[0193] The Metropolis criterion in the simulated annealing algorithm is used in the selection operator to screen the population, which can retain better individuals during selection and accept suboptimal individuals with a certain probability. The retention probability of the suboptimal solution is:
[0194]
[0195] Among them, F bad Represents the fitness of the suboptimal solution. TC represents the annealing parameter. The larger its value, the smaller the probability of retaining the suboptimal solution. Conversely, the greater the probability of retaining the suboptimal solution. After the selection operation, an elite retention strategy is added to enable the population's better solutions to be retained in iterations, thus enhancing the algorithm's convergence ability.
[0196] Step 4: Crossover operator: Considering the influence of evolutionary generations and individual fitness on algorithm performance, the present invention proposes a new adaptive crossover operator. During the operation of the algorithm, the global search requirement gradually decreases. The crossover probability in the operator gradually decreases, which can accelerate the convergence of the algorithm. Moreover, the crossover probability of individuals with higher fitness is smaller, and excellent individuals can be retained. The adaptive function for calculating the crossover probability is:
[0197]
[0198] Among them, P cmax , P cmin are the maximum and minimum values of the crossover probability, r is a constant, F is the fitness of each individual, and t represents the number of iterations.
[0199] Step 5: Mutation operator: With the iterative optimization of the genetic algorithm, the similarity between individuals gradually increases, and the fixed mutation probability is difficult to jump out of the local optimum during the operation of the algorithm. The present invention adopts a method of adaptively adjusting the mutation probability according to the population similarity to solve this problem, and defines the population similarity as Among them, EX and SD represent the expectation and standard deviation of population fitness respectively. Then the mutation probability P m Can be adjusted adaptively according to population similarity:
[0200]
[0201] Step 6, perturbation operator: The present invention introduces the Gaussian perturbation operator to improve the problems of premature maturity and easy to fall into local optimum in the classical genetic algorithm. In order to reduce the complexity of the algorithm, the perturbation operator is only run when the algorithm falls into the local optimum. When the optimal solution of the population has not changed for r consecutive generations, it is determined that the population has fallen into the local optimum. At this time, the Gaussian perturbation operator is called to help the algorithm jump out of the local optimum. The Gaussian perturbation operator can be expressed as:
[0202] X' best (t) = X best (t)+G(s) (32)
[0203] Among them, X best (t), X' best (t) represents the optimal individuals before and after the tth generation disturbance, respectively, and G(s) represents the random distribution obeying the Gaussian distribution.
[0204] Through the iterative optimization of the multi-strategy improved genetic algorithm, it is finally possible to find the optimal solution in a given offloading strategy within a limited time, that is, output the optimal task offloading strategy, including the task offloading location and the expected delay and energy consumption.
[0205] 4. Simulation Experiment and Performance Evaluation
[0206] In order to verify the performance of the algorithm in this embodiment, MATLAB R2021a was also used to complete the simulation experiment. The environmental simulation parameters are shown in Table 2 below, and the algorithm parameters are shown in Table 3 below. In the experiment, the MSI-GA scheme proposed in the present invention is compared and analyzed with the random unloading scheme, the partial coordination scheme, the GA scheme and the CGA scheme:
[0207] (1) Random offloading scheme: In this scheme, tasks can be offloaded to local vehicles, local fog servers, adjacent fog servers, and cloud servers. The vehicle selects the task offloading location in a random manner.
[0208] (2) Partial collaboration scheme: The tasks can be offloaded to local vehicles, local fog servers, and cloud servers. The MSI-GA algorithm is used to solve the offloading strategy.
[0209] (3) GA scheme: The tasks can be offloaded to the local vehicle, local fog server, adjacent fog server and cloud server, and the genetic algorithm is used to solve the offloading strategy.
[0210] (4) CGA scheme: The tasks can be offloaded to the local vehicle, local fog server, adjacent fog server and cloud server, and the chaotic genetic algorithm is used to solve the offloading strategy.
[0211] Table 2 Environmental simulation parameters
[0212]
[0213] Table 3 Algorithm simulation parameters
[0214]
[0215] (1) Performance analysis that balances latency and energy consumption
[0216] Figure 7The cost of each unloading scheme is shown when the weight of delay and energy consumption is 0.5. The number of experimental tasks is 100 and the number of fog nodes is 5. As can be seen from the figure, compared with the partial collaborative scheme, the other four schemes can obtain lower system costs, indicating that the cloud-fog collaborative scheme using adjacent fog nodes can obtain lower system costs than partial collaborative unloading, and is more suitable for application in the Internet of Vehicles environment. The system costs of the GA scheme, CGA scheme and the MSI-GA scheme proposed in the present invention gradually decrease with the increase of the number of iterations, and the final system costs are all less than the random unloading scheme. Among the GA scheme, CGA scheme and MSI-GA scheme, the GA scheme completes convergence the earliest and obtains the highest system cost; the CGA scheme completes convergence last, and the system cost is lower than that of the GA scheme; the MSI-GA scheme proposed in the present invention can obtain a lower system cost in the genetic algebra when the GA scheme and the CGA scheme converge, and there is still a trend of reduction in the future. In addition, compared with these four schemes, the proposed MSI-GA scheme has the lowest system cost when it converges. Therefore, it can be considered that the MSI-GA unloading scheme proposed in the present invention can have good latency and energy consumption at the same time.
[0217] (2) Performance analysis considering a single target
[0218] Figure 8 , Fig. 9 The latency and energy consumption of the task offloading scheme considering a single target are shown respectively. The number of tasks in this experiment is 100 and the number of fog nodes is 5. Figure 8 It can be seen that most of the system costs of the random offloading scheme are lower than the system costs of the partial collaborative scheme. The system costs of the GA scheme, CGA scheme, and MSI-GA scheme are all lower than those of the random offloading scheme and the partial collaborative scheme, and all complete convergence in the early stages of the iteration. Among them, MSI-GA can provide a lower system cost when converging.
[0219] Depend on Fig. 9 It can be seen that most of the system costs obtained by the random unloading scheme are lower than those of the partial unloading scheme; among the three schemes of GA, CGA and MSI-GA, GA completes convergence the earliest, but its system cost is the highest among the three schemes; the CGA scheme and the MSI-GA scheme converge at similar algebraic levels, but the system cost obtained by MSI-GA is lower. Therefore, the MSI-GA unloading scheme proposed in the present invention is superior to the random unloading scheme, the partial coordination scheme, the GA scheme and the CGA scheme when only considering delay or energy consumption.
[0220] (3) Impact of the number of tasks on algorithm performance
[0221] Fig.10The influence of different numbers of tasks on the task offloading scheme when the number of fog nodes is 5 is shown, considering the delay and energy consumption in a balanced way. As can be seen from the figure, the system cost changes relatively smoothly with the increase of the number of tasks. From formula (24), it can be seen that when the number of tasks increases, all tasks are calculated locally or the above five schemes are adopted, and their delay and energy consumption increase at the same time. Therefore, the system cost shown in formula (24) changes smoothly. Among the five schemes, the partial coordination scheme has the highest system cost at different numbers of tasks, and the MSI-GA scheme has the lowest system cost; when the number of tasks is 200, the MSI-GA scheme reduces the system cost generated by the random offloading scheme, partial coordination scheme, GA scheme and CGA scheme by about 20.3%, 43.67%, 2.75% and 2.34% respectively. This shows that the performance of the MSI-GA scheme is better than other schemes when dealing with different numbers of tasks.
[0222] (4) Impact of the number of fog nodes on algorithm performance
[0223] Fig.11 The influence of different numbers of fog nodes on each scheme when the task is 100 is shown, considering the delay and energy consumption in a balanced way. In order to reduce the contingency, the random offloading scheme randomly selects 100 offloading schemes each time and calculates the average value of their system cost. As can be seen from the figure, as the number of fog nodes increases, the system cost of some collaborative schemes fluctuates within a certain range. This is because some collaborative schemes only offload tasks to the local fog server, and the increase in the number of surrounding fog nodes has no effect on their system cost. The system costs of the random offloading scheme, GA scheme, CGA scheme and MSI-GA scheme can all decrease with the increase in the number of fog nodes. When the number of fog nodes increases to 5, the downward trend of the system cost tends to be flat. This is because as the number of fog nodes increases, more fog nodes will participate in the calculation, and the tasks will be calculated in parallel between the nodes, which reduces the calculation delay of the task and thus reduces the system cost. When there are more fog nodes, if the task is offloaded to a farther fog node, more transmission delay will be generated. Therefore, when the number of fog nodes reaches a certain number, the system cost will no longer decrease. As the number of fog nodes changes, MSI-GA can obtain the lowest system cost, but the performance of GA and CGA is basically the same.
[0224] (5) Impact of the number of cooperative vehicles on the forwarding load of fog nodes
[0225] Fig.12The effect of the change in the number of cooperative vehicles on the forwarding probability of fog nodes is shown. From the fitting curve, it can be seen that as the number of cooperative vehicles increases, the forwarding probability of fog nodes gradually decreases, and the decreasing trend gradually becomes flat. After the introduction of V2V-assisted forwarding, the more vehicles there are near the source vehicle, the lower the probability of forwarding tasks through the fog node, and its forwarding load will also decrease accordingly. Before the introduction of V2V, the increase in vehicles means that the fog node needs to provide services to more vehicles, and it is difficult to ensure the quality of service; after the introduction of V2V-assisted forwarding, all vehicles can become relay nodes, using the mutual services between vehicles to reduce the forwarding load for the fog node, and making full use of the surrounding resources.
[0226] Therefore, according to the above simulation experiment results, compared with the existing scheme, the method of the present invention can obtain a lower system cost in a fewer number of iterations when considering different optimization objectives, and can have better performance under different numbers of tasks and different numbers of fog nodes. Therefore, the MSI-GA scheme proposed in the present invention can allocate tasks more efficiently and effectively reduce unloading delay and energy consumption. In addition, after introducing the V2V forwarding mechanism, the forwarding probability of the fog node can be reduced as the number of vehicles increases, reducing the forwarding load of the fog node, and the vehicle can make better use of environmental resources.
[0227] The above description is only a preferred embodiment of the present invention and does not limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for decision-making on task offloading in Internet of Vehicles based on cloud-fog collaborative computing, characterized by: The following steps are involved: Step 1: Establishment of system architecture and communication model (1) Create an overall architecture model of the vehicle task offloading system based on fog computing; evenly arrange multiple fog servers equipped with road test perception units on the roadside; define the vehicle with task offloading requirements as the source vehicle, and the remaining vehicles as collaborative vehicles; (2) Task division: Divide the task into n independent subtasks and define the data volume and computing requirements of each subtask. The source vehicle can choose to offload the task to the local, current fog server, and cloud server, or to the adjacent fog server through the current fog server or cooperative vehicles. (3) Construct communication models, including the vehicle-to-fog server V2F communication model, the vehicle-to-vehicle V2V communication model, the fog server-to-fog server F2F communication model, and the fog server-to-cloud server F2C communication model; (4) Design of a vehicle forwarding algorithm based on environmental information prediction: Based on known environmental information including vehicle speed and vehicle location, the vehicle that forwards the task to the fog server is defined as a fog-transferring vehicle. A vehicle forwarding prediction algorithm is designed to predict the communication link status between vehicles and the communication status between the vehicle and the fog server. The algorithm is iteratively run until there are no vehicles that meet the conditions around the fog-transferring vehicle or the fog-transferring vehicle has reached the target fog node, and the algorithm is terminated. Finally, the forwarding vehicle and forwarding hop count of the task are obtained. Step 2: Construction of task offloading cost optimization model (1) Delay model: The computational delay of the task on the local server, fog server, and cloud server, as well as the transmission delay through V2V, V2F, and F2F links are calculated respectively; (2) Parallel computing model: Establish a parallel computing model for tasks to optimize the task completion time, including: when the task starts to be uploaded, set the global clock GC to record the time when each task starts and ends forwarding, record the last completion time LT of its task queue on each computing node, set the initial value of the global clock to 0, and the calculation and forwarding of the task do not affect each other. Then the global clock of the task forwarding process can be represented by the forwarding delay of each task: a. When the task is executed locally, no forwarding delay is generated and GC remains unchanged; b. When tasks are executed on fog servers and cloud servers, GC needs to add the transmission delay of the tasks. After obtaining the task offloading decision, the tasks that need to be executed locally are calculated one by one, and the calculation delay of the local execution task set is accumulated to obtain the final task offloading completion time. c. When a task is unloaded at a fog node or cloud server, the task needs to be transferred to the target node to determine the start calculation time of the task. Since there is a parallel relationship between task transfer and calculation, the start calculation time of the task is the larger value between the global clock of the task transfer to the target node and the final task unloading completion time at the target node. The start calculation time of the fog node and the start calculation time of the cloud server task are represented as BT k =max(GC,LT k ), BT C =max(GC,LT C ), the final completion time of each node is obtained by adding the start calculation time of the current task to the calculation delay of the task, and the value is: In the formula, LT k Indicates the final completion time of a fog node, LT C Indicates the last completion time of the cloud server. According to the above task parallel computing model, the final completion delay of the task is the maximum value of the final completion time of all nodes: (3) Energy consumption model: The energy consumption of the task on the local, fog server, and cloud server is calculated respectively. When the offloading is completed, the total energy consumption of the system is the sum of the energy consumption generated at the above different offloading locations; Based on the above model, we transform the task offloading problem into a system cost optimization problem, and establish a task offloading system cost optimization model with the goal of minimizing latency and energy consumption: st α+β=1,0≤α,β≤1 Step 3: Design a multi-strategy improved genetic algorithm to solve the above system cost optimization problem, including the following steps: (1) Decision encoding: Integer encoding is used to represent task offloading decisions, where each number represents an offloading location; (2) Population initialization: using chaotic sequences to generate the initial population to ensure population diversity; (3) Selection operator: The individual fitness TSC is determined by the delay and energy consumption, and the fitness function is defined as: Where m is a constant; the population is screened by combining delay and energy consumption and using the Metropolis criterion; (4) Adaptive operator design: Design an adaptive crossover operator and mutation operator to adjust the mutation probability according to the evolutionary generation and population similarity; the adaptive degree function of the crossover probability of the crossover operator is: Among them, P cmax , P cmin are the maximum and minimum values of the crossover probability, r is a constant, F is the fitness of each individual, and t represents the number of iterations; The variation adjustment probability P m for: (5) Perturbation operator: A Gaussian perturbation operator is introduced to help the algorithm escape from the local optimum. The Gaussian perturbation operator is expressed as: X′ best (t)=X best (t)+G(s) Among them, X best (t), X' best (t) represents the optimal individuals before and after the tth generation disturbance, respectively, and G(s) represents the random distribution obeying the Gaussian distribution. Through the iterative optimization of the multi-strategy improved genetic algorithm, it is finally possible to find the optimal solution in a given offloading strategy within a limited time, that is, output the final task offloading solution.
2. The method for decision-making on task offloading of Internet of Vehicles based on cloud-fog collaborative computing according to claim 1 is characterized by: The V2F communication model in step 1 can be used to describe the change in the state of the communication link between the mobile vehicle and the fog server; the communication between vehicles adopts a dedicated short-range communication technology; within the maximum communicable distance R2 of the vehicle, the vehicles can communicate directly. When the transmission distance exceeds R2 and there are relay vehicles around, the task can be transmitted through multiple hops, otherwise it cannot be transmitted.
3. The method for decision-making on task offloading of Internet of Vehicles based on cloud-fog collaborative computing according to claim 1 is characterized by: The delay model in step 2 includes the following contents: a. When the task is offloaded to the local machine, the delay is only generated during the task calculation. i The computation delay of local offloading is only related to the CPU speed of the source vehicle, so the local computation delay can be expressed as b. When the task is offloaded to the fog server, the task can be offloaded to the local fog server or to a nearby fog server across regions. The cross-region offloaded task will be forwarded through the fog node or V2V assisted forwarding task. The forwarding method is determined by the PFV algorithm result: when the PFV algorithm determines that there is a cooperative vehicle that can forward the task near the source vehicle task, V2V forwarding is preferred; if there is no cooperative vehicle that can forward the task nearby, it is forwarded through the fog node; c. Task offloading to fog node F k The calculation delay is: d. When the task is offloaded to the cloud server, the transmission link of the task is from the source vehicle to the local fog server, and then forwarded from the local fog server to the cloud server; Mission M i The delay from the local fog node to the cloud is Mission M i The total transmission delay offloaded to the cloud server is: Mission M i The computational latency on the cloud server is 4. The method for decision-making on task offloading of Internet of Vehicles based on cloud-fog collaborative computing according to claim 3 is characterized by: When the task is offloaded to the fog server, there are three types of transmission sub-links between the source vehicle and the target fog server: the transmission link between the vehicle and the fog server, the transmission link between vehicles, and the transmission link between fog servers. The final transmission link of the task is composed of the three sub-links. The transmission delays corresponding to the above three links are: (1) Transmission link between the vehicle and the fog server: When task M i From vehicle V j When forwarding to the fog node, the transmission rate of the link is known from formula (3), and the transmission delay of the V2F link is (2) Transmission link between vehicles: When task M i From vehicle V j When forwarding to nearby vehicles, the transmission rate of the link is known from formula (6), so the transmission delay of the V2V link is (3) Transmission link between fog servers: When task M i When forwarding from a fog node to an adjacent fog node, the transmission rate of the link can be known from equation (9), so the transmission delay of the F2F link is Assume h VV is the hop count of the vehicle forwarding task, h FF is the number of hops of the fog node forwarding task, then the task M can be calculated i Offload to fog server F k The total transmission delay.
5. The method for decision-making on task offloading of Internet of Vehicles based on cloud-fog collaborative computing according to claim 1 is characterized by: The energy consumption model in step 2 includes the following contents: a. When the task is offloaded locally, the energy consumption generated by the computing process is only related to the computing power of the on-board service unit. i The energy consumption of unloading at the source vehicle is Where P V is the calculated power of the vehicle; the total energy consumption of local unloading is: E V =LT V ′P V b. When the task is offloaded to the fog server, the energy consumption generated during the transmission process is determined by the transmission link, and the energy consumption of the transmission and computing process is only related to the power; then in the fog server F k Uninstalled Task Set The total energy consumption is: The total energy consumption unloading at the fog node is: c. When the task is offloaded to the cloud server, task M i The energy consumption offloaded to the cloud server is expressed as: The total energy consumption is: Based on the above calculation results, when the unloading is completed, the total energy consumption of the system is: E=E V +E F +E C 。 6. The method for decision-making on task offloading of Internet of Vehicles based on cloud-fog collaborative computing according to claim 1 is characterized by: The decision coding in step 3 adopts integer coding, and the number of each gene bit represents the unloading location of the task. When the value of the gene bit is 0, it means that the task is unloaded locally; when the value of the gene bit is greater than 0 and less than or equal to the number of fog servers, it means that the task is unloaded on the fog server with the corresponding serial number; when the value of the gene bit is greater than the number of fog servers, it means that the task is unloaded to the cloud server.
Citation Information
Cited By
Self-adaptive multi-hop task unloading method for autonomous vehicle based on time delay prediction
CN122317640A
