An energy-saving task offloading method considering load balancing and latency

By establishing a vehicle network task offloading model in VANET and using the NSGA-II algorithm improved by BP neural network to optimize load balancing and latency, the problem of unoptimized energy consumption and latency in traditional offloading schemes is solved, and more efficient resource utilization and computing task offloading are achieved.

CN116709259BActive Publication Date: 2025-10-17NANJING UNIV OF POSTS & TELECOMM
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310655317.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-05
Publication Date
2025-10-17
Estimated Expiration
2043-06-05

AI Technical Summary

Technical Problem

Traditional Vehicular Ad Hoc Network (VANET) offloading solutions fail to effectively optimize system energy consumption, offloading latency, and load balancing, making it difficult for vehicles with limited computing resources to handle computationally intensive tasks.

Method used

By establishing a vehicle-to-everything (V2X) task offloading model, the NSGA-II algorithm based on a BP neural network is used to optimize load balancing, offloading latency, and energy consumption. LTE-V2X technology is used for vehicle-to-macro base station communication. Combined with spectrum allocation and channel connection in V2I and V2V modes, excellent offloading strategies are selected.

Benefits of technology

It achieves more effective load balancing and delay optimization in VANET, reduces system energy consumption, and improves the efficiency of computing task offloading and resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116709259B_ABST
    Figure CN116709259B_ABST
Patent Text Reader

Abstract

The application discloses an energy-saving task offloading method considering load balancing and time delay, and comprises the following steps: first, a vehicle networking task offloading model containing a macro base station, a MEC server and a vehicle is established; then, the model is solved by using NSGA-Ⅱ improved based on a BP neural network, so that excellent individuals can be screened by using the BP neural network before a real fitness vector is calculated, and a more excellent offspring solution set is obtained.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to an energy-saving task offloading method considering load balancing and latency. BACKGROUND

[0002] With the rapid development of wireless communication technology, connected vehicles can form a vehicle ad hoc network (VANET) through vehicle-to-infrastructure (V2I) and vehicle-to-vehicle (V2V) communication modes. In VANET, vehicles are equipped with on-board units (OBUs) and thus have computing and storage capabilities. However, the limited computing power and storage resources of vehicles are difficult to support computationally intensive vehicle tasks, and therefore, the computing power and storage resource limitations pose new challenges to VANET. Mobile edge computing (MEC) not only meets the requirements of vehicle computing capability expansion, but also compensates for the long latency caused by cloud computing. Vehicle computing tasks can be offloaded to MEC servers for V2I communication or to adjacent vehicles for V2V communication.

[0003] The massive high-resource, low-latency demand tasks and vehicle applications such as autonomous driving, path planning, vehicle self-diagnosis, etc. brought about by the surge in the number of vehicles mean that the contradiction between resource-consuming tasks and IoV node resources (processing, storage) is particularly prominent, and the traditional on-demand offloading model of the Internet of Vehicles cannot continue to be used. Moreover, the traditional offloading algorithm considers more the optimization of offloading latency and system energy consumption, and does not conduct in-depth research on the abstract problems of offloading cost (latency, energy consumption, throughput), load balancing, etc., so it is necessary to jointly optimize system energy consumption, offloading latency and load balancing. SUMMARY

[0004] The present application aims to provide an energy-saving task offloading method considering load balancing and latency to solve the problem that the traditional offloading scheme does not consider the multi-objective joint optimization of system energy consumption, offloading latency and load balancing.

[0005] To achieve the above-mentioned purpose, the present application provides an energy-saving task offloading method considering load balancing and latency, mainly comprising the following steps:

[0006] Step 1: The on-board OBU unit reads the vehicle operation data and publishes a computing task T i,k , wherein T i,k represents the kth computing task of the ith vehicle, and the information of the computing task is uploaded to a macro base station;

[0007] Step 2: The macro base station establishes a vehicle networking task offloading model according to the vehicle information and the vehicle networking device, the vehicle information includes the calculation task information and the latitude and longitude coordinates of the vehicle uploaded by the vehicle driving into the service range of the macro base station within the same timestamp, the vehicle networking device includes a roadside RSU unit with a MEC server and the macro base station, and the vehicle networking task offloading model includes a communication model, a load balancing calculation model, an offloading delay model and an offloading energy consumption model;

[0008] Step 3: The macro base station obtains an optimization function according to load balancing, offloading delay and offloading energy consumption:

[0009] minF,mint all ,mine all

[0010] s.t.

[0011]

[0012] C2:z∈{0,1,2,3}

[0013] Wherein, F represents load balancing, t all represents the total offloading delay of the system, e all represents the total offloading energy consumption of the system, C1 represents the acceptable delay upper limit of different offloading schemes, assuming that the vehicle v i only offloads the task T i,k to the MEC server, only the acceptable delay upper limit of offloading to the MEC server is considered; if the vehicle v i offloads the task T i,k to the MEC server and the macro base station, the acceptable delay upper limits of both are considered; C2 represents that there are four schemes of Z={0,1,2,3} for the offloading strategy;

[0014] Step 4: The macro base station uses the NSGA-II algorithm improved based on the BP neural network to solve the objective function, for optimizing the load balancing, offloading delay and offloading energy consumption of the system;

[0015] Step 5: The macro base station returns the obtained offloading strategy to the vehicle v i , and the vehicle-mounted OBU unit offloads the calculation task to different vehicle networking devices according to the offloading strategy, and the vehicle-mounted OBU unit labels the calculation task with the identity of the vehicle, and the specific form is

[0016] Step 6: After the vehicle networking device processes the calculation task, the identity label is used to find the target vehicle v i , and the calculation result is returned.

[0017] As a further improvement of the application, step 1 specifically comprises the following steps:

[0018] Step 1.1: Real-time operation parameters of each component of the vehicle are detected by the vehicle sensor and recorded as a key-value pair form <timestamp, operation data>, and the vehicle sensor uploads the vehicle operation data to the OBU unit through the CAN bus; the OBU unit integrates the real-time operation parameters of the vehicle and publishes a calculation task, recorded as a four-tuple where T i,k represents the calculation task, D i,k represents the parameters required for the execution of the program code, represents the calculation task T i,k executed,

[0019] output size, c i,k represents the number of CPU cycles required to complete the calculation task T i,k , represents the calculation task T i,k that can tolerate the maximum processing delay;

[0020] Step 1.2: When entering the service range of the macro base station, the satellite positioning system determines the latitude and longitude coordinates of the vehicle, recorded as standard latitude and longitude coordinates, and directly sent to the macro base station;

[0021] Step 1.3: The OBU unit uploads the calculation task T i,k to the macro base station, and the macro base station integrates the vehicle calculation task and the vehicle location to obtain a five-tuple where v local represents the latitude and longitude coordinates of the vehicle when entering the macro base station.

[0022] As a further improvement of the present application, step 2 specifically includes the following steps:

[0023] Step 2.1: The V2I mode and the V2V mode are operated in the same frequency band, where V2I represents the vehicle v i communicating with the Internet of Vehicles device, and V2V represents the vehicle v i communicating with another vehicle, the total spectrum of the system is divided into Y orthogonal sub-channels, denoted as Y = {1, 2, 3, …, y}, and the bandwidth of each sub-channel is b Hz, assuming that each vehicle has k calculation tasks to complete in the same time period, and each vehicle is allocated at most one sub-channel, and the signal-to-noise ratio of the vehicle v i on the sub-channel g is defined as where p i is the uplink transmission power of the vehicle v i , is the channel gain between the vehicle v i and the service node sub-channel, where j represents the jth Internet of Vehicles device connected to the vehicle v i , and g represents the vehicle vi N0is the white Gaussian noise power using the gth subchannel, is the interference of other devices to vehicle v i in V2I mode, is the interference of other vehicles to vehicle v i in V2V mode;

[0024] Step 2.2: Establish a load balancing calculation model, the specific method is as follows:

[0025] Consider the average resource utilization W G of vehicles on the Mth MEC server:

[0026]

[0027] Where f M (f M ∈{0,1}) indicates that the offloading task of the vehicle occupies the Mth MEC server, and is 1, otherwise 0; l k,m,n (l k,m,n ∈{0,1}) indicates that l k,m,n is 1 when the M node is occupied, otherwise 0; therefore, the number of occupied MEC servers is:

[0028]

[0029] Further, the average resource utilization W AVG is:

[0030]

[0031] The task load SLB G of a single node is:

[0032]

[0033] The average load balancing rate ASLB of the RSU is:

[0034]

[0035] The total system load balancing rate index considers the ratio of the average load balancing rate of the RSU node to the average resource utilization of the RSU, and further the total load balancing rate F is:

[0036]

[0037] Step 2.3: Establish an offloading delay and system energy consumption calculation model, the offloading strategy has Z={0,1,2,3} four schemes, as follows:

[0038] 1) z=0 indicates that the calculation task T i,kIt is processed directly by the local vehicle and will not be offloaded to other Internet of Vehicles devices;

[0039] 2) z=1 represents the computing task T i,k Offload to the MEC server for processing;

[0040] 3) z = 2 represents the computing task T i,k Offload to the macro base station for processing;

[0041] 4) z = 3 represents the computing task T i,k Unload to a vehicle with sufficient computing power for processing.

[0042] As a further improvement of the present invention, step 4 specifically includes the following steps:

[0043] Step 4.1: Initialize NSGA-II input parameters, including population size NP and maximum number of iterations ITER max , crossover and mutation probability pro∈[0,1], where NP contains vehicle v i Position PO j , vehicle v i The computational task T to be offloaded i,k ;

[0044] Step 4.2: Initialize the population and define the unloading decision Z. Z has four values: 0, 1, 2, and 3. That is, an individual in the population can be represented by Z = {Z1, Z2, ..., Z k |Z k ∈(0,1,2,3)}, k represents the published computing task T i,k According to the NSGAⅡ algorithm, each gene value represents a computing task T i,k Unloading strategy, that is, Z1=1 represents vehicle v i The computational task T i,k is offloaded to the MEC server for processing, assuming t first At this moment, a vehicle A enters the service range of the macro base station, and the computing task T that is connected to the service range of the macro base station is i,k have If the population size NP=30, the initial population is a matrix of NP×SC;

[0045] Step 4.3: Assume the initial sample set S initial ={X1,X2,…,X NP}, and calculate S initial The i-th individual corresponds to X i The fitness vector f i , where f i is a three-dimensional vector f i =(F it all,i ,e all,i ), individual X i is a set of offloading strategies for several computing tasks T i,k ;

[0046] Step 4.4: training the BP neural network and saving the network model W net , constructing a data set S data , wherein the input is y input =S initial , the output is the predicted f' i =(F' i ,t' all,i ,e' all,i ), and the loss function is where NP is the number of data set samples;

[0047] Step 4.5: cross, mutation to generate offspring population, including:

[0048] Step 4.5.1: generate a random value p in the range of (0, 1), if p < pro, randomly select two solutions X1 and X2 from the population, perform cross operation to generate a new solution, and put it into the offspring solution set P'; randomly generate a value μ∈[0, 1], select the first μ×SC gene values of solution X1 and the last (1-μ)×SC gene values of solution X2, and recombine them into a new solution X'1; similarly, generate a new solution X'2; if p > pro, randomly select a solution from the population, perform mutation operation to generate a new solution, and put it into the offspring solution set P', the mutation method is basic bit mutation, that is, randomly change a gene value of solution X i ;

[0049] Step 4.5.2: merge the parent and offspring populations to generate the offspring population P";

[0050] Step 4.6: generate the fitness vector f" of the population P" and the real fitness vector f" real,i ;

[0051] Step 4.7: perform fast non-dominated sorting on the obtained f" real,i ;

[0052] Step 4.8: perform crowding degree calculation;

[0053] Step 4.9: improve the elitist retention strategy to obtain a new solution set;

[0054] Step 4.10: store the new solution set as a new data set S data ;

[0055] Step 4.11: judging whether the current iteration number reaches the set running round, if yes, jumping to step 4.12, if no, inputting the new training set into the network model W net , further training, updating the network model W net , and jumping to step 4.5;

[0056] Step 4.12: calculating the fitness function of each individual in the current parent solution set, and outputting the optimal offloading strategy X best ={Z1,Z2,…,Z k}.

[0057] As a further improvement of the present application, step 4.6 specifically comprises:

[0058] Step 4.6.1: using the BP neural network model to predict the fitness vector f i ” of the individual X” i ” in the population P”, setting the threshold values of F i ”, t” all,i , and e” all,i in f i ”; i all,i al,i

[0059] Step 4.6.2: if F i ”, t” all,i , and e” al,i exceed any one of the threshold values, discarding the individual X” i , otherwise, calculating the real fitness vector f” real,i .

[0060] As a further improvement of the present application, step 4.7 specifically comprises:

[0061] Step 4.7.1: performing fast non-dominated sorting according to the Pareto dominance definition of NSGA-II, obtaining the Pareto level to which each individual belongs;

[0062] Step 4.7.2: if the fast non-dominated sorting cannot be performed in the running of the algorithm, directly jumping to step 4.5.

[0063] As a further improvement of the present application, step 4.8 specifically comprises:

[0064] Step 4.8.1: sorting the individuals in a Pareto level, obtaining the maximum and minimum values of the objective function and and making the crowding degree of the two boundaries ∞;

[0065] ​​​Step 4.8.2: Calculate the crowding distance of each individual:

[0066]

[0067] As a further improvement of the present application, step 4.9 specifically comprises:

[0068] Step 4.9.1: Set the parameter α∈(0,1), put the α×P" individuals at the front of the Pareto solution set into the new solution set for the next round of iteration, if α×P" < NP, jump to step 4.9.2, otherwise, jump to step 4.10; wherein, if the ranks of two individuals in the Pareto solution set are the same, compare their crowding distance values, and put the individual with the larger crowding distance value into the new solution set;

[0069] Step 4.9.2: Perform crossover and mutation operations on the remaining (1-α)×P" individuals, and reselect (1-α)×P" individuals to put into the next generation solution set.

[0070] As a further improvement of the present application, step 6 comprises two cases:

[0071] Case one: the vehicle v i does not drive out of the service range of the Internet of Vehicles device, at this time the vehicle and the Internet of Vehicles device are still in a connected state, and the Internet of Vehicles device directly returns the calculation task execution result to the vehicle;

[0072] Case two: the vehicle v i drives out of the service range of the Internet of Vehicles device, at this time the vehicle drives out of the service range of the Internet of Vehicles device, the vehicle v i is disconnected with the Internet of Vehicles device, and the Internet of Vehicles device uploads the unloading result to the macro base station, and then the macro base station returns the unloading result to the vehicle v i according to the vehicle identity tag.

[0073] Compared with the prior art, the technical effects of the present application are: the present application first establishes an Internet of Vehicles task unloading model comprising a macro base station, a MEC server and a vehicle, and then solves the model based on the NSGA-Ⅱ improved by the BP neural network, so that excellent individuals can be screened by the BP neural network before calculating the real fitness vector, to obtain a better offspring solution set. BRIEF DESCRIPTION OF DRAWINGS

[0074] Figure 1 is the step flowchart of the present application.

[0075] Figure 2 is the flowchart of the NSGA-Ⅱ algorithm improved based on the BP neural network. DETAILED DESCRIPTION

[0076] ​In order to make the purpose, technical scheme and advantages of the present application clearer, the present application will be described in detail below with reference to the drawings and specific embodiments.

[0077] Here, it should be noted that, in order to avoid obscuring the present application due to unnecessary details, only structures and / or processing steps closely related to the scheme of the present application are shown in the drawings, and other details not closely related to the present application are omitted.

[0078] The present application proposes an energy-saving task offloading method considering load balancing and latency, which first establishes a vehicle networking task offloading model containing macro base stations, MEC servers and vehicles, and then solves the model through NSGA-II improved based on BP neural network. The purpose is: before calculating the real fitness vector f i =(F i ,t all,i ,e all,i ), the excellent individuals are screened through the BP neural network to obtain a better offspring solution set.

[0079] As shown in Figure 1 and Figure 2 , the energy-saving task offloading method considering load balancing and latency of the present application mainly includes the following steps:

[0080] Step 1: The vehicle-mounted OBU unit reads the vehicle operation data and publishes the calculation task T i,k , wherein T i,k represents the kth calculation task of the ith vehicle, and the information of the calculation task is uploaded to the macro base station; in the present application, the vehicle networking communication technology is selected as LTE-V2X technology, and the vehicle and the macro base station communicate in the cellular communication (Uu) mode.

[0081] Step 2: The macro base station establishes a vehicle networking task offloading model according to the vehicle information and vehicle networking equipment, wherein the vehicle information includes the calculation task information uploaded by the vehicle driving into the service range of the macro base station within the same timestamp and the latitude and longitude coordinates of the vehicle, and the vehicle networking equipment includes the roadside RSU unit (MEC server) with the MEC server and the macro base station, wherein the roadside RSU unit includes but is not limited to roadside perception equipment, traffic signal lights, electronic signs and other roadside infrastructure, and the vehicle networking task offloading model includes a communication model, a load balancing calculation model, an offloading latency model and an offloading energy consumption model.

[0082] Step 3: The macro base station obtains an optimization function according to load balancing, offloading latency, offloading energy consumption and related constraints:

[0083] min F,min t all ,min e all

[0084] s.t.

[0085]

[0086] C2:z∈{0,1,2,3}

[0087] where F represents load balancing, t all represents the total system offloading latency, e all represents the total system offloading energy consumption, C1 represents the acceptable latency upper limit of different offloading schemes, and the relationship between latencies is represented by "or". Assuming that the vehicle v i only offloads the task T i,k to the MEC server, only the acceptable latency upper limit of offloading to the MEC server is considered; if the vehicle v i offloads the task T i,k to the MEC server and the macro base station, the acceptable latency upper limits of both are considered; C2 represents that there are four schemes of Z = {0, 1, 2, 3} for the offloading strategy.

[0088] Step 4: The macro base station uses the NSGA-II algorithm improved based on the BP neural network to solve the objective function, which is used to optimize the load balancing, offloading latency and offloading energy consumption of the system.

[0089] Step 5: The macro base station returns the obtained offloading strategy to the vehicle v i , and the vehicle-mounted OBU unit offloads the computing task to different Internet of Vehicles devices according to the offloading strategy. The vehicle-mounted OBU unit labels the computing task with the vehicle identity, and the specific form is When the macro base station obtains the optimal offloading strategy, it returns the specific offloading strategy according to the information of the accessed vehicle v i , that is, the vehicle v i does not need to reselect the strategy written in X best .

[0090] Step 6: After the Internet of Vehicles devices process the computing task, the identity label is used to find the target vehicle v i , and the computing result is returned.

[0091] The step 1 specifically includes the following steps:

[0092] Step 1.1: The real-time running parameters of each component of the vehicle are detected by the vehicle sensor and recorded in the form of key-value pair <timestamp, running data>, and the vehicle sensor uploads the vehicle running data to the vehicle-mounted OBU unit through the CAN bus; the vehicle-mounted OBU unit integrates the real-time running parameters of the vehicle and publishes the computing task, which is recorded as a four-tuple where T i,k represents the computing task, D i,k represents the parameters required for inputting the program code for execution, represents the computing task T i,k the output size of the execution, c i,k represents the completion of the computing task T i,k the number of CPU cycles required, represents the computing task T i,k the maximum processing delay that can be tolerated.

[0093] Step 1.2: When driving into the service range of the macro base station, the satellite positioning system determines the vehicle's latitude and longitude coordinates, records them as standard latitude and longitude coordinates, and directly sends them to the macro base station. The satellite positioning system includes the Beidou satellite positioning system, the American Global Positioning System (GPS), the Galileo satellite positioning system, and the Glonass satellite positioning system, etc. Among them, the satellite positioning system should be able to actively identify the vehicle and the vehicle's access to the macro base station information, so as to ensure that the vehicle's latitude and longitude coordinates are accurately sent to the accessed macro base station.

[0094] Step 1.3: The vehicle-mounted OBU unit uploads the computing task T i,k to the macro base station, and the macro base station integrates the vehicle's computing task and the vehicle's position to obtain a five-tuple wherein v loca l represents the latitude and longitude coordinates of the vehicle when driving into the macro base station.

[0095] In step 1.1, "running data" refers to a series of parameters of the vehicle when it is running, including engine temperature, engine speed, throttle opening degree, voltage level, gearbox gear information, vehicle speed, vehicle real-time position, etc. For example: in some embodiments, the vehicle-mounted OBU unit can accept the mailbox oil level information obtained by the vehicle oil level sensor, and the data stream is in the form of the above key-value pair, specifically <timestamp, oil volume (L)>.

[0096] In some other embodiments, the vehicle-mounted OBU unit can accept the voltage signal obtained by the throttle position sensor, and the data stream is in the form of the above key-value pair, specifically <timestamp, voltage signal>.

[0097] In some other embodiments, the vehicle-mounted OBU unit can accept the output shaft speed obtained by the output shaft speed sensor, that is, the vehicle speed information, and the data stream is in the form of the above key-value pair, specifically <timestamp, vehicle speed (km / h)>.

[0098] In some other embodiments, the vehicle-mounted OBU unit can accept the vehicle body height information obtained by the shock absorber sensor, that is, the vertical height of the vehicle chassis from the road surface, and the data stream is in the form of the above key-value pair, specifically <timestamp, vehicle body height (cm)>.

[0099] In other embodiments, the vehicle-mounted OBU unit can accept the tire pressure information obtained by the tire pressure sensor, where the data stream is in the form of the above-mentioned key-value pair, and the specific form is <timestamp, tire pressure (Pa)>.

[0100] In other embodiments, the vehicle-mounted OBU unit can accept the steering wheel angle information obtained by the steering wheel angle sensor (with the steering wheel shaft as 0°), where the data stream is in the form of the above-mentioned key-value pair, and the specific form is <timestamp, steering wheel angle (°)>.

[0101] The above-mentioned vehicle-mounted OBU unit is any vehicle-mounted OBU unit, which can accept and store any vehicle sensor information except the above-mentioned vehicle sensor.

[0102] It should be emphasized that the vehicle networking task offloading model established in step 2 is determined according to the actual situation, including V2I and V2V offloading modes, which specifically includes the following steps:

[0103] Step 2.1: In order to effectively reuse the spectrum, it is stipulated that the V2I mode and the V2V mode work in the same frequency band, where V2I represents that the vehicle v i communicates with the vehicle networking device, and V2V represents that the vehicle v i communicates with another vehicle, and the total spectrum of the system is divided into Y orthogonal subchannels, denoted as Y={1, 2, 3, …, y}, and the bandwidth of each subchannel is b Hz, so that the vehicle v i can simultaneously communicate with multiple vehicle networking devices at the same time. The present application assumes that each vehicle has k computing tasks to be completed in the same time period, and each vehicle is allocated at most one subchannel.

[0104] The present application stipulates that the vehicle v i can offload the computing task to the macro base station for processing, or offload the computing task T i,k to the MEC server for processing, or offload to the nearby vehicle for processing, or process locally. The signal-to-noise ratio of the vehicle v i on the subchannel g is defined as where p i is the uplink transmission power of the vehicle v i , is the channel gain between the vehicle v i and the serving node subchannel, where j represents the jth vehicle networking device (MEC server and macro base station) connected to the vehicle v i , g represents that the vehicle v i uses the gth subchannel, and N0 is the white Gaussian noise power, is the interference of other devices to the vehicle v i in the V2I mode, is the interference of other vehicles to vehicle v i in V2V mode.

[0105] To better describe the channel allocation state, channel connection matrices Φ and Φ' are introduced according to V2I mode and V2V mode, and the forms of the channel connection matrices Φ and Φ' are binary variable matrices N C ×J and N D ×J, respectively, N C and N D are the number of vehicles for task offloading in V2I and V2V modes, respectively, φ x,g and φ y,g represent whether sub-channel g is allocated to vehicle v x or vehicle v y . In V2I mode, if vehicle v i accesses the channel, then φ x,g = 1; otherwise, φ x,g = 0. V2V mode is the same as V2I mode.

[0106] The present application considers the signal interference problem of Internet of Vehicles, and defines and and respectively: if the selected service node of vehicle v i is a MEC server (i.e. V2I mode), then and are represented as and respectively; if the selected service node of vehicle v i is a vehicle (i.e. V2V mode), then and are represented as and

[0107] The bandwidth of the transmission of the computing task to the MEC server is B M , the bandwidth of the transmission to the macro base station is B I , and the bandwidth of V2V is B V , according to the Shannon formula, the rate of the computing task of the vehicle uploaded to the MEC server is represented as the rate of the computing task of the vehicle uploaded to the macro base station is represented as the transmission rate between V2V is represented as where M represents the MEC server, I represents the macro base station, and V represents the offloaded vehicle.

[0108] Step 2.2: Establish a load balancing calculation model, and the specific method is as follows:

[0109] Consider the average resource utilization W G:

[0110]

[0111] Among them, f M (f M ∈{0,1}) indicates that the vehicle's unloading task occupies the Mth MEC server, which is 1, otherwise it is 0; l k,m,n (l k,m,n ∈{0,1}) indicates that when M nodes are occupied, l k,m,n is 1, otherwise it is 0; therefore, the number of occupied MEC servers is:

[0112]

[0113] Then we can get the average resource utilization W AVG for:

[0114]

[0115] Single node task load SLB G for:

[0116]

[0117] The above formula indicates that when the vehicle's computing task is offloaded to the M-th MEC server, the load balancing SLB M =(W M -W AVG ) 2 Otherwise, SLB M =0.

[0118] The average load balancing rate ALSB of RSU is obtained as follows:

[0119]

[0120] The total system load balancing rate index considers the ratio of the average load balancing rate of RSU nodes to the average resource utilization of RSU, and then the total load balancing rate F is obtained as:

[0121]

[0122] Step 2.3: Establish a calculation model for offloading delay and system energy consumption. The offloading strategy has four options: Z = {0, 1, 2, 3}, as follows:

[0123] 1) z=0 represents the computing task T i,k It is processed directly by the local vehicle and will not be offloaded to other Internet of Vehicles devices;

[0124] 2) z=1 represents the computing task T i,k Offload to the MEC server for processing;

[0125] 3) z = 2 means the computing task T i,k is offloaded to the macro base station for processing;

[0126] 4) z = 3 means the computing task T i,k is offloaded to the vehicle with sufficient computing power for processing.

[0127] The present application uses the M / M / 1 queuing model to simulate the vehicle v i offloading task data flow, and T i,k is obtained. The local offloading time

[0128]

[0129] where C i is the computing power of the on-board OBU. Because the M / M / 1 queuing model is used to simulate the offloading task data flow, the data flow load accepted by the Internet of Vehicles device complies with the Poisson process, and the service time is exponentially distributed. However, in the actual scenario, the data flow is determined according to the real arrival of the task, and the same applies below. According to the communication model, the time delay of uploading the computing task to the MEC server i is:

[0130]

[0131] The M / M / 1 queuing model is used to simulate the data flow of the MEC server task, and the offloading time of the task T i,k on the MEC server M is obtained. The offloading time of the task T on the MEC server M is obtained.

[0132]

[0133] where C M represents the computing power of the MEC server. Because the coverage range Round of the RSU is limited, the distance d between the vehicle and the server node needs to satisfy |d G,i (v i , H M )|≤|Round|, where the position (Px i , Py i ) of the vehicle v i and the position (Px M , Py M ) of the MEC server M are given by the satellite positioning system, and then the time when the vehicle leaves the MEC service range is obtained.

[0134]

[0135] in, Represents vehicle v i The speed of the vehicle, and its symbol represents the direction of travel of the vehicle. It is the location where the vehicle enters the MEC service area. It is the location where the vehicle leaves the MEC service area.

[0136] From the communication model, we can get vehicle v i Latency in uploading computing tasks to the macro base station for:

[0137]

[0138] The data flow on the macro base station server also considers the M / M / 1 queuing model, and the task T on the macro base station server is obtained. i,k Uninstall time for:

[0139]

[0140] Among them, C I Indicates the computing power of the macro base station. When the local computing power of the vehicle and the computing power of the macro base station cannot meet the vehicle v i The computational requirements of the vehicle v i When the vehicle is not within the coverage of the RSU, the vehicle v i Task T i,k Unload to a vehicle with sufficient computing power v V Let C V For vehicle v V The computing power of the OBU, vehicle v V OBU on T i,k Uninstall time for:

[0141]

[0142] From the communication model, we can get vehicle v i The computation task T i,k Transmission delay from upload to unloading vehicle V for:

[0143]

[0144] By finding the vehicle v i The time it takes to transmit data to each processing device can be used to calculate the energy consumed in the data transmission process. The energy consumption of local unloading is e i,k is the power consumption coefficient of task offloading, vehicle v i The energy consumption of transmitting data to MEC is Similarly, the vehicle v i The energy consumption of data transmission to the macro base station is The vehicle v i The energy consumption when performing V2V communication is And the energy consumption unloaded to other vehicles is The total energy consumption unloaded to other vehicles is

[0145] Assume that t first vehicles enter the service range of the macro base station, then the total offloading time delay t i,k and the total offloading energy consumption e all of the system can be obtained respectively by the offloading time delay and the offloading energy consumption of the computing task T all :

[0146]

[0147]

[0148] Wherein, t all and e all respectively simulate five common situations that may occur in computing task offloading, however, the real situation may have kinds, and the specific offloading combination mode is determined according to the actual situation.

[0149] Step 4 specifically includes the following steps:

[0150] Step 4.1: initialize the input parameters of NSGA-II, including population size NP, maximum iteration number ITER max , crossover and mutation probability pro∈[0,1], wherein NP contains the position PO i of the vehicle v j , and the computing task T i to be offloaded by the vehicle v i,k .

[0151] Step 4.2: initialize the population, define the offloading decision Z, Z has four values, which are 0, 1, 2, 3, that is, one individual in the population can be expressed as Z={Z1,Z2,…,Z k |Z k ∈(0,1,2,3)},k represents the number of computing tasks T i,k published, according to the NSGA-II algorithm, each gene value represents the offloading strategy of a computing task T i,k , that is, Z1=1 represents that the computing task T i of the vehicle v i,k is offloaded to the MEC server for processing, assuming that t first vehicles enter the service range of the macro base station, then the computing task Ti,k There are Set the population size NP = 30, the initial population is a NP x SC matrix.

[0152] Step 4.3: Set the initial sample set S initial = {X1, X2, …, X NP}, and calculate the fitness vector f initial corresponding to the i-th individual in S i X i , where f i is a three-dimensional vector f i = (F i , t all,i , e all,i ), and individual X i is a set of offloading strategies for a number of computing tasks T i,k .

[0153] Step 4.4: Train the BP neural network and save the network model W net , build the data set S data , where the input is y input = S initial , the output is the predicted f i '= (F i ', t' all,i , e' all,i ), and the loss function is where NP is the number of data set samples;

[0154] Step 4.5: Generate offspring population by crossover and mutation, including:

[0155] Step 4.5.1: Generate a random value p in the range (0, 1), if p < pro, randomly select two solutions X1 and X2 from the population, perform crossover operation to generate a new solution, and put it into the offspring solution set P'; randomly generate a value μ ∈ [0, 1], select the first μ x SC gene values of solution X1 and the last (1-μ) x SC gene values of solution X2, and recombine them into a new solution X'1; similarly, generate a new solution X'2; if p > pro, randomly select a solution from the population, perform mutation operation to generate a new solution, and put it into the offspring solution set P', the mutation method is basic bit mutation, that is, randomly change a gene value of solution X i .

[0156] Step 4.5.2: Merge the parent and offspring populations to generate the offspring population P''.

[0157] Step 4.6: Generate the fitness vector f'' of the population P'' and the real fitness vector f'' real,i ; including:

[0158] Step 4.6.1: Predict the fitness vector f of individual X in population P" i i ” = (F i ”, t all,i , e all,i ), set the threshold of F i ”, t i , and e all,i in f al,i ;

[0159] Step 4.6.2: If F i ”, t all,i , and e al,i exceed any of the thresholds, discard individual X i , otherwise, calculate its real fitness vector f real,i .

[0160] Step 4.7: Perform fast non-dominated sorting on the obtained f real,i , including:

[0161] Step 4.7.1: Perform fast non-dominated sorting according to the Pareto dominance definition of NSGA-II, to get the Pareto rank of each individual;

[0162] Step 4.7.2: If fast non-dominated sorting cannot be performed in the running of the algorithm, directly jump to Step 4.5.

[0163] Step 4.8: Perform crowding distance calculation, including:

[0164] Step 4.8.1: Sort the individuals in a Pareto rank to get the maximum and minimum values of the objective functions and , and make the crowding distance of the two boundaries ∞;

[0165] Step 4.8.2: Calculate the crowding distance of each individual:

[0166]

[0167] Step 4.9: Improve the elitist strategy to get a new solution set;

[0168] Step 4.9.1: Set the parameter α∈(0,1), put the α×P” individuals at the front of the Pareto solution set into the new solution set, which is used for the next round of iteration, if α×P”<NP, jump to Step 4.9.2, otherwise, jump to Step 4.10; if the two individuals have the same rank in the Pareto solution set, compare their crowding distance values, and put the individual with the larger crowding distance value into the new solution set;​

[0169] Step 4.9.2: Cross and mutate the rest of (1-a) x P" individuals, and reselect (1-a) x P" individuals into the next generation solution set.

[0170] Step 4.10: Store the new solution set as a new data set in the data set S data .

[0171] Step 4.11: Determine whether the current iteration number reaches the set running round, if yes, jump to step 4.12, if not, input the new training set into the network model W net , further train, update the network model W net , and jump to step 4.5.

[0172] Step 4.12: Calculate the fitness function of each individual in the current parent solution set, and output the optimal offloading strategy X best ={Z1, Z2, …, Z k}.

[0173] Step 6 includes two cases:

[0174] Case one: the vehicle v i does not drive out of the service range of the Internet of Vehicles device, at this time the vehicle and the Internet of Vehicles device are still in a connected state, and the Internet of Vehicles device returns the calculation task execution result directly to the vehicle. Assuming that the vehicle v i loads the calculation task T i,k to the MEC server, and the vehicle still communicates with the MEC after the calculation task T i,k is processed, then the calculation task execution result is directly returned to the vehicle v i .

[0175] Case two: the vehicle v i drives out of the service range of the Internet of Vehicles device, at this time the vehicle drives out of the service range of the Internet of Vehicles device, the vehicle v i is disconnected from the Internet of Vehicles device, and the Internet of Vehicles device uploads the offloading result to the macro base station, which then returns the offloading result to the vehicle v i according to the vehicle identity tag . Assuming that the vehicle v i loads the calculation task T i,k to the MEC server, and the vehicle has been disconnected from the MEC server after the calculation task T i,k is processed, then the MEC server uploads the calculation task execution result to the macro base station first, and then the macro base station returns the execution result to the vehicle v i according to the vehicle identity tag carried in the execution result.

[0176] To sum up, the application firstly perfects a task offloading model of Internet of Vehicles, constructs a system energy consumption, offloading delay and load balancing model, and then solves the model through an NSGA-II algorithm based on a BP neural network, so that excellent individuals can be screened out and a better offspring solution set can be obtained.

[0177] The above examples are only used to illustrate the technical solutions of the present application and are not limiting. Although the present application has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present application can be modified or replaced equivalently without departing from the spirit and scope of the technical solutions of the present application.

Claims

1. An energy-saving task offloading method considering load balancing and latency, characterized in that: The main steps include: Step 1: The onboard OBU unit reads the vehicle operation data and issues the calculation task T i,k , where T i,k represents the kth computing task of the i-th vehicle, and then uploads the computing task information to the macro base station; Step 2: The macro base station establishes an IoV task offloading model based on the connected vehicle information and IoV devices. The vehicle information includes the computing task information uploaded by vehicles entering the macro base station service range within the same timestamp and the vehicle's latitude and longitude coordinates. The IoV devices include roadside RSU units with MEC servers and macro base stations. The IoV task offloading model includes a communication model, a load balancing calculation model, an offloading delay model, and an offloading energy consumption model. The model specifically includes the following steps: Step 2.1: It is stipulated that the V2I mode and the V2V mode operate in the same frequency band, where V2I means vehicle v i Communicate with Internet of Vehicles devices, V2V means vehicle v i To communicate with another vehicle, the total spectrum of the system is divided into Y orthogonal sub-channels, denoted as Y = {1, 2, 3, L, y}, and the bandwidth of each sub-channel is bHz. Assume that each vehicle has k computing tasks to complete in the same time period, and each vehicle is allocated at most one sub-channel. Vehicle v on sub-channel g i The signal-to-noise ratio is defined as where p i Is the vehicle v i The uplink transmission power, Is the vehicle v i and the channel gain of the serving node subchannel, where j represents vehicle v i The jth connected vehicle networking device, g represents vehicle v i Using the g-th subchannel, N0 is the white Gaussian noise power, It is the other devices in the V2I mode that are connected to the vehicle v i interference, Is the other vehicle to vehicle v in V2V mode i interference; Step 2.2: Establish a load balancing calculation model. The specific method is as follows: Consider the average resource utilization W of the vehicle on the Mth MEC server M : Among them, f M (f M ∈{0,1}) indicates that the vehicle's unloading task occupies the Mth MEC server, which is 1, otherwise it is 0; l k,m,n (l k,m,n ∈{0,1}) indicates that when M nodes are occupied, l k,m,n is 1, otherwise it is 0; therefore, the number of occupied MEC servers is: Then we can get the average resource utilization W AVG for: Single node task load SLB G for: The average load balancing rate ASLB of RSU is obtained as follows: The total system load balancing rate considers the ratio of the average load balancing rate of the RSU nodes to the average resource utilization of the RSU, and the total load balancing rate F is obtained as follows: Step 2.3: Establish a calculation model for offloading delay and system energy consumption. The offloading strategy has four options: Z = {0, 1, 2, 3}, as follows: 1) z=0 represents the computing task T i,k It is processed directly by the local vehicle and will not be offloaded to other Internet of Vehicles devices; 2) z=1 represents the computing task T i,k Offload to the MEC server for processing; 3) z = 2 represents the computing task T i,k Offload to the macro base station for processing; 4) z = 3 represents the computing task T i,k Unload to a vehicle with sufficient computing power for processing; Step 3: The macro base station obtains the optimization function based on load balancing, offloading delay, and offloading energy consumption: minF,mint all ,mine all st C2:z∈{0,1,2,3} Among them, F represents load balancing, t all Indicates the total unloading delay of the system, e all represents the total unloading energy consumption of the system, C1 represents the upper limit of the acceptable delay of different unloading schemes, assuming that vehicle v i Only task T i,k If the vehicle v i Task T i,k If offloading to MEC servers and macro base stations, the acceptable latency limit of both should be considered. Represents task T i,k Local uninstall time, Represents vehicle v i The latency of uploading computing tasks to the MEC server, Represents task T on the MEC server i,k Uninstall time, Indicates vehicle v i The latency of uploading computing tasks to the macro base station, Indicates the task T on the macro base station i,k Uninstall time, Represents vehicle v V OBU on T i,k Uninstall time, Represents vehicle v i The computation task T i,k The transmission delay from uploading to the unloading vehicle V; C2 indicates that there are four unloading strategies: Z = {0, 1, 2, 3}; Step 4: The macro base station uses the NSGA-II algorithm improved by the BP neural network to solve the objective function to optimize the system's offload delay, offload energy consumption, and load balancing. The specific steps include: Step 4.1: Initialize NSGA-II input parameters, including population size NP and maximum number of iterations ITER max , crossover and mutation probability pro∈[0,1], where NP contains vehicle v i Location Offloaded computing tasks T i,k ; Step 4.2: Initialize the population and define the unloading decision Z. Z has four values: 0, 1, 2, and 3. That is, an individual in the population is represented by Z = {Z1, Z2, L, Z k |Z k ∈(0,1,2,3)}, k represents the published computing task T i,k According to the NSGAⅡ algorithm, each gene value represents a computing task T i,k Unloading strategy, that is, Z1=1 represents vehicle v i The computational task T i,k is offloaded to the MEC server for processing, assuming t first At this moment, a vehicle A enters the service range of the macro base station, and the computing task T that is connected to the service range of the macro base station is i,k have If the population size NP=30, the initial population is a matrix of NP×SC; Step 4.3: Assume the initial sample set S initial ={X1,X2,L,X NP }, and calculate S initial The i-th individual corresponds to X i The fitness vector f i , where f i is a three-dimensional vector f i =(F i ,t all,i ,e all,i ), individual X i There are several computing tasks T i,k The set of uninstallation policies; Step 4.4: Train the BP neural network and save the network model W net , construct the dataset S data , where the input is y input =S initial , the output is the predicted f i '=(F i ',t' all,i ,e' all,i ), the loss function is Where NP is the number of samples in the dataset; Step 4.5: Crossover and mutation generate the offspring population, including: Step 4.5.1: Generate a random value p in the range (0,1). If p < pro, randomly select two solutions X1 and X2 from the population, perform a crossover operation to generate a new solution, and put it into the offspring solution set P'; randomly generate a value μ∈[0,1], select the first μ×SC gene values ​​of solution X1 and the last (1-μ)×SC gene values ​​of solution X2, and recombine them into a new solution X1'; similarly, generate a new solution X'2; if p > pro, randomly select a solution from the population, perform a mutation operation to generate a new solution, and put it into the offspring solution set P'. The mutation method is basic bit mutation, that is, randomly changing the solution X i A gene value of Step 4.5.2: Merge the parent and child populations to generate the offspring population P'; Step 4.6: Generate the fitness vector f" and true fitness vector f" of the population P" real,i ; Step 4.7: For the obtained f″ real,i Perform fast non-dominated sort; Step 4.8: Calculate the congestion degree; Step 4.9: Improve the elite retention strategy and obtain a new solution set; Step 4.10: Store the new solution set as a new data set in the data set S data ; Step 4.11: Determine whether the current number of iterations has reached the set running round. If so, jump to step 4.

12. If not, input the new training set into the network model W. net In the process, further training and updating the network model W net , and jump to step 4.5; Step 4.12: Calculate the fitness function of each individual in the current parent solution set and output the optimal unloading strategy X best ={Z1,Z2,L,Z k }; Step 5: The macro base station returns the obtained offloading strategy to the vehicle v i The onboard OBU unit offloads the computing tasks to different Internet of Vehicles devices according to the offloading strategy. The onboard OBU unit adds a vehicle identity tag to the computing tasks. The specific form is Step 6: After the IoV device completes the computing task, it will Find the target vehicle v i , returns the calculation result.

2. The energy-saving task offloading method considering load balancing and delay according to claim 1 is characterized in that: Step 1 specifically includes the following steps: Step 1.1: The vehicle sensors detect the real-time operating parameters of each vehicle component and record them as key-value pairs <timestamp, operating data>. The vehicle sensors upload the vehicle operating data to the on-board OBU unit via the CAN bus; the on-board OBU unit integrates the vehicle's real-time operating parameters and publishes computing tasks, which are recorded as four-tuples. Where T i,k represents the computing task, D i,k Indicates the parameters required to execute the program code. Represents the computing task T i,k The output size after execution, c i,k Indicates the completion of the computation task T i,k The number of CPU cycles required, Represents the computing task T i,k The maximum tolerable processing delay; Step 1.2: When entering the service area of ​​the macro base station, the satellite positioning system determines the vehicle's longitude and latitude coordinates, records them as standard longitude and latitude coordinates, and sends them directly to the macro base station; Step 1.3: The vehicle OBU unit will calculate the task T i,k Upload to the macro base station, the macro base station integrates the vehicle calculation task and vehicle location, and recovers the five-tuple Among them, v local Indicates the latitude and longitude coordinates when the vehicle enters the macro base station.

3. The energy-saving task offloading method considering load balancing and delay according to claim 1 is characterized in that: The step 4.6 specifically includes: Step 4.6.1: Use the BP neural network model to predict the individual X in the population P' i The fitness vector f i ”=(F i ”,t″ all,i ,e″ all,i ), set f i "F i ”、t″ all,i and e″ al,i threshold value; Step 4.6.2: If F i ”、t″ all,i and e″ al,i If any of the thresholds is exceeded, individual X″ is discarded. i Otherwise, calculate its true fitness vector f″ real,i .

4. The energy-saving task offloading method considering load balancing and delay according to claim 1 is characterized in that: The step 4.7 specifically includes: Step 4.7.1: Perform a fast non-dominated sort according to the Pareto dominance definition of NSGA-II to obtain the Pareto rank of each individual. Step 4.7.2: If fast non-dominated sorting cannot be performed during the algorithm run, skip directly to step 4.

5.

5. The energy-saving task offloading method considering load balancing and delay according to claim 4 is characterized in that: The step 4.8 specifically includes: Step 4.8.1: Sort the individuals in a Pareto level and get the maximum and minimum values ​​of the objective function and And make the congestion degree of the two boundaries ∞; Step 4.8.2: Calculate the crowding degree of each individual:

6. The energy-saving task offloading method considering load balancing and delay according to claim 5 is characterized in that: The step 4.9 specifically includes: Step 4.9.1: Set the parameter α∈(0,1) and place the α×P″ individuals at the front of the Pareto solution set into the new solution set for the next iteration. If α×P″ < NP, jump to step 4.9.2; otherwise, jump to step 4.

10. If two individuals have the same rank in the Pareto solution set, compare their crowding values ​​and place the individual with the larger crowding value into the new solution set. Step 4.9.2: Perform crossover and mutation operations on the remaining (1-α)×P” individuals, and reselect (1-α)×P” individuals to be placed in the next generation solution set.

7. The energy-saving task offloading method considering load balancing and delay according to claim 1 is characterized in that: The step 6 includes two cases: Case 1: Vehicle v i The vehicle has not left the service range of the connected vehicle device. At this time, the vehicle and the connected vehicle device are still connected, and the connected vehicle device will directly return the calculation task execution results to the vehicle. Case 2: Vehicle v i Drive out of the service range of the connected vehicle networking equipment. At this time, the vehicle drives out of the service range of the vehicle networking equipment. i The vehicle network device is disconnected and the vehicle network device uploads the uninstallation result to the macro base station, which then receives the uninstallation result based on the vehicle identity tag. Return the uninstall result to the vehicle v i .

Citation Information

Patent Citations

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

    CN112995289A

  • Internet of vehicles service unloading migration and load balancing method and system using same

    CN116017578A