Internet-of-vehicles computing unloading and resource allocation method based on improved black-wing plinary optimization algorithm
By improving the Black-winged Kitchen optimization algorithm, combining elite reverse learning strategies, Gompertz model and Gaussian mutation strategy, the local optimal and high-latency problems of computing offloading and resource allocation in the Internet of Vehicles are solved, and more efficient computing offloading and resource allocation are achieved, improving the performance and efficiency of the Internet of Vehicles system.
Patent Information
- Application Number
- CN202510084406.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-20
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2045-01-20
AI Technical Summary
The existing Internet of Vehicle computing offloading and resource allocation methods have the problems of long training time and easy to fall into local optimal solutions, and cannot effectively meet the needs of Internet of Vehicles systems for low-latency and efficient computing.
The method based on the improved Black-winged Kitchen optimization algorithm is adopted, and the Black-winged Kitchen optimization algorithm is designed through elite reverse learning strategies, Gompertz model and Gaussian mutation strategy, which is used to make calculations and unload and resource allocation decisions in the Internet of Vehicles.
This method can speed up the convergence speed of the algorithm, avoid falling into local optimal solutions, reduce the computing burden of local task vehicles, reduce system delay and overall energy consumption, and improve the overall performance and efficiency of the Internet of Vehicles system.
Smart Images

Figure CN119815417A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of resource optimization allocation, and in particular to a method for vehicle networking computing offloading and resource allocation. Background Art
[0002] With the continuous growth of consumer demand and the rapid development of science and technology, the degree of digitization in the automotive field has gradually increased, and intelligent technologies such as multimedia entertainment and assisted driving have become standard configurations of automobiles. As the application of IoT technology in intelligent transportation, the Internet of Vehicles is a key component in building an intelligent transportation system. In order to achieve autonomous driving and intelligent functions, modern cars are equipped with a large number of sensors and communication technologies. However, with the increase in functional requirements, the computing power of vehicles has approached or even exceeded the carrying limit, and cannot meet the requirements of the Internet of Vehicles for large-scale data processing and low latency. Therefore, the problem of vehicle computing offloading and resource allocation based on edge computing needs to be solved urgently.
[0003] Mobile cloud computing technology is an effective way to solve the problem of limited vehicle equipment resources. Although cloud computing servers have powerful computing capabilities, they are far away from the task terminal, have high latency in data transmission, and are susceptible to environmental fluctuations. These problems limit the widespread application of cloud computing in practice. In order to solve these shortcomings, Mobile Edge Computing (MEC) came into being. MEC extends cloud computing capabilities to the edge of the network. By deploying edge servers or base stations close to terminal devices, it can effectively reduce the latency and energy consumption in the data transmission process, provide terminal users with cloud computing-like service functions, and thus make up for the shortcomings of traditional network infrastructure. Compared with resource-rich cloud computing centers, MEC servers have relatively limited computing resources. When the edge computing platform needs to process multiple offload tasks, the MEC server often cannot undertake all tasks at the same time, which may lead to large computing delays. Therefore, it is particularly important to study computing offload decisions and resource allocation in the Internet of Vehicles. Generally, computing offload decisions and resource allocation are NP-hard problems, which are solved by swarm intelligence optimization algorithms.
[0004] Computation offloading refers to offloading the computing tasks on the vehicle, such as autonomous driving, environmental perception, data processing, etc., from the vehicle's local computing unit to the edge computing platform or cloud computing platform to reduce the vehicle's computing burden, improve computing efficiency and reduce energy consumption. Resource allocation refers to how to reasonably allocate limited computing resources, such as bandwidth, storage, computing power, etc., to ensure that each node in the Internet of Vehicles, including vehicles, road test units, edge servers, etc., can work efficiently and stably.
[0005] However, the existing Internet of Vehicles computing offloading and resource allocation methods, such as the invention patent with announcement number CN 117062025 B, discloses an Internet of Vehicles energy-saving joint computing offloading and resource allocation method, and proposes a collaborative perception data fusion architecture to perform data fusion processing on the perception data from RSU and vehicles. Aiming at the data fusion computing task, an improved K-means task classification algorithm is proposed to pre-classify the task. Then, for the vehicle that needs to offload the task to the offloading node, a queuing delay minimization problem with long-term delay constraints and long-term energy consumption constraints is proposed, and the long-term delay constraints and long-term energy consumption constraints are converted into queue stability problems using the Lyapunov optimization method. Finally, the offloading process is modeled as a Markov decision process model, and the DDQN algorithm is used to find the optimal computing offloading and computing resource allocation decision. However, this method has the defects of long training time and easy to fall into the local optimal solution. Therefore, it is necessary to reasonably improve the algorithm to effectively complete the computing offloading and resource allocation. Summary of the invention
[0006] In response to the above technical problems, the present invention proposes a vehicle network computing offloading and resource allocation method based on an improved Black Kite optimization algorithm, which can accelerate the convergence speed of the algorithm, avoid the algorithm from falling into a local optimal solution too early, reduce the computing burden of local task vehicles, and reduce system latency and overall energy consumption.
[0007] In order to achieve the above object, the technical solution of the present invention is achieved as follows:
[0008] A method for vehicle network computing offloading and resource allocation based on an improved black kite optimization algorithm comprises the following steps:
[0009] S1: Obtain the computing delay and computing energy consumption of tasks in various computing scenarios based on various computing scenarios, and calculate the total computing delay and total computing energy consumption of tasks based on the computing delay and computing energy consumption of tasks in various computing scenarios;
[0010] S2: Define the system utility function based on the total computing delay and total computing energy consumption of the task, take the minimum system utility function as the goal, and build the computing delay and energy consumption model in the mobile edge computing scenario with the allocation rationality constraint, the upper limit constraint of edge server computing resources and the upper limit constraint of available computing resources of idle vehicles as constraints;
[0011] S3: Based on the elite reverse learning strategy, Gompertz model and Gaussian mutation strategy, a Black Kite optimization algorithm is designed. The designed Black Kite optimization algorithm is used to solve the computing delay and energy consumption model in the mobile edge computing scenario to obtain the final computing offloading and resource optimization allocation plan.
[0012] Furthermore, the multiple computing scenarios include scenarios of local task vehicle computing, scenarios of offloading computing to edge servers, and scenarios of offloading computing to surrounding idle vehicles; the method for obtaining computing delays and computing energy consumption of tasks under multiple computing scenarios is: obtaining local computing delays and local computing energy consumption in local task vehicle computing, obtaining total computing delays and total energy consumption in the computing process of offloading computing to edge servers, and obtaining total computing delays and total energy consumption in the computing process of offloading computing to surrounding idle vehicles.
[0013] Furthermore, the total computational delay T of the task described in step S1 is sum for:
[0014]
[0015] The total computing energy consumption of the task E sum for:
[0016]
[0017] Among them, num is the number of local mission vehicles, t local,i is the local calculation delay, t edge,i is the total delay of the computation process offloaded to the edge server, t idle,i The total delay in the process of unloading to the surrounding idle vehicles; e local,i is the local computing energy consumption, e edge,i is the total energy consumption during the computation offloaded to the edge server, e idle,i The total energy consumption during the calculation is for unloading to the surrounding idle vehicles.
[0018] Furthermore, the system utility function is:
[0019] Y=α×T sum +(1-α)×E sum
[0020] Among them, α represents the trade-off parameter between the total computational latency of the task and the total computational energy consumption of the task;
[0021] The objective function of the computing delay and energy consumption model in the mobile edge computing scenario described in step S2 is:
[0022] min(Y)
[0023] The rationality constraint of task allocation is:
[0024]
[0025] The upper limit constraint of edge server computing resources is:
[0026]
[0027] The upper limit of available computing resources for idle vehicles is:
[0028]
[0029] in, are the proportions of tasks calculated in the local task vehicle, offloaded to the edge server, and offloaded to the surrounding idle vehicles, respectively. edge,i The computing resources allocated by the edge server to the local task vehicle, f idle,i The computing resources provided to the idle vehicles around, f edge Calculate resource limits for edge servers, f idle The upper limit of computing resources available to idle vehicles.
[0030] Further, the method for solving the computing delay and energy consumption model in the mobile edge computing scenario using the designed black kite optimization algorithm described in step S3 is:
[0031] S3.1: Define the initial parameter set of the improved black kite optimization algorithm and initialize the black kite population based on the elite reverse learning strategy;
[0032] S3.2: Update the leader, perform local search based on the Gompertz model and update the position of black-winged kites in the population, perform global search based on the Gaussian mutation strategy and update the position of black-winged kites in the population;
[0033] S3.3: Select the black kite individual with the best fitness in this iteration, and compare its fitness with that of the leader. Select the position of the black kite individual with better fitness as the optimal solution for this iteration, and determine whether the maximum number of iterations has been reached; if yes, output the global optimal solution, otherwise, repeat steps S3.2 to S3.3.
[0034] Further, the method for defining the initial parameter set of the improved black kite optimization algorithm is:
[0035] S3.11: Define the initial population size as N, the maximum number of iterations of the population as T, the dimension of the problem to be solved as dim, the upper bound of the solution space as ub, and the lower bound as lb;
[0036] The method for initializing the black-winged kite population based on the elite reverse learning strategy is:
[0037] S3.12: Randomly initialize the population P0;
[0038] S3.13: Select the elite population E_P based on the population P0;
[0039] S3.14: Obtain the reverse population \(O_E\) of the elite population \(E_P\);
[0040] S3.15: Merge the population \(P0\) and the reverse population \(O_E\) to obtain a new population \(M_P\), and select \(N\) black-winged kite individuals with better fitness from the new population \(M_P\) to form the initial population \(P\).
[0041] Furthermore, the specific steps of step S3.2 are as follows:
[0042] S3.21: Update the leader: Select the black-winged kite individual with the optimal fitness in the previous iteration as the leader, and update the position of the leader;
[0043] S3.22: In the local search stage, construct a position update strategy for the attack behavior of the black-winged kite population according to the Gompertz model and perform position update;
[0044] S3.23: In the global search stage, construct a position update strategy for the migration behavior according to the Gaussian mutation strategy and perform position update.
[0045] Furthermore, the position update strategy for the attack behavior described in step S3.22 is as follows:
[0046] A1. Define the step size adjustment formula according to the Gompertz model:
[0047]
[0048] where \(n\) is the step size of the current iteration, \(A\) is the initial maximum step size, \(B\) is the parameter used to control the attenuation speed of the initial step size and the starting point, \(F\) is the attenuation rate of the step size, and \(t\) is the current iteration number;
[0049] A2. Set a fixed constant value \(p\), generate a random number \(r\), \(r\in[0, 1]\), when \(p < r\), execute attack strategy one, and the position update formula of attack strategy one is as follows:
[0050]
[0051] In the formula, is the position of the \(j\)-th black-winged kite individual in the \(t\)-th iteration, is the updated position of the \(j\)-th black-winged kite individual in the \(t\)-th iteration;
[0052] A3. When \(p\geq r\), execute attack strategy two, and the position update formula of attack strategy two is as follows:
[0053]
[0054] A4. After the position update in the local search stage is completed, each black-winged kite individual before the position update Black kite individual with updated position Compared with the fitness of , the position with better fitness is selected as the position of the black-winged kite individual in this iteration.
[0055] Furthermore, the location update strategy of the migration behavior described in step S3.23 is:
[0056] B1. Set the leader of the black kite population in the tth iteration to be L t , the current fitness value of the jth black-winged kite is The fitness value of a random black-winged kite individual in the population is
[0057] B2. If the fitness value of the current j-th black-winged kite individual is Less than the fitness value of a random black-winged kite individual The leader gives up the leadership of the population and joins the migrating population. The position update formula is as follows:
[0058]
[0059] Where, Cauthy(0,1) represents the Cauchy mutation;
[0060] B3. If the fitness value of the current j-th black-winged kite individual is Greater than or equal to the fitness value of a random black-winged kite individual The leader continues to guide the population to the destination, and the position update formula is as follows:
[0061]
[0062] In the formula, m is a parameter with periodic changes;
[0063] B4. Updated location of black-winged kite individuals Introduce Gaussian mutation strategy; update position according to Gaussian mutation strategy;
[0064] B5. After the position update in the global search phase is completed, each black-winged kite individual before the position update Black kite individual with updated position The fitness value of is compared with that of the individual black-winged kite in this iteration t, and the position with better fitness is selected as the black-winged kite individual in this iteration t. location.
[0065] Furthermore, the fitness calculation method is as follows: taking the system utility function Y as the fitness evaluation index, and calculating the individual fitness of the black-winged kite according to the system utility function Y;
[0066] The Gaussian mutation strategy is as follows: set a fixed constant value q, generate a random number r, where r ∈ [0, 1]. When q < r, the position of the black-winged kite individual The update formula is:
[0067]
[0068] where μ is the mean of the Gaussian distribution, σ is the standard deviation of the Gaussian distribution, and normrnd(μ, σ) is used to generate a random number that conforms to the Gaussian distribution with a mean of μ and a standard deviation of σ;
[0069] When q ≥ r, the position of the black-winged kite individual remains unchanged.
[0070] The beneficial effects of the present invention are as follows:
[0071] 1. The present invention proposes a vehicle-to-everything (V2X) computing offloading and resource allocation method based on an improved black-winged kite optimization algorithm. Through this method, the computing burden of local task vehicles can be effectively reduced, the system latency and overall energy consumption can be decreased, and the overall performance and efficiency of the V2X system can be improved.
[0072] 2. The present invention introduces an elite opposition-based learning strategy in the initialization stage. By generating the opposition population of elite individuals, the diversity of the initial population is increased, and the algorithm is prevented from falling into a local optimal solution during subsequent iterative processes. By combining elite individuals and opposition individuals, a wider search space can be provided, thereby improving the global search ability, accelerating the convergence speed, and optimizing the quality of the population and the overall performance of the algorithm.
[0073] 3. The present invention introduces the Gompertz model in the local search stage of the algorithm as a mechanism for dynamic step-size adjustment. This model effectively balances the exploration and exploitation processes by adaptively adjusting the step size. The introduction of the Gompertz model can gradually reduce the search step size according to the iterative process, thereby reducing the risk of over-exploration and improving the accuracy and convergence speed of the algorithm when approaching the global optimal solution.
[0074] 4. The present invention introduces the Gaussian mutation strategy in the global search stage of the algorithm, which can effectively improve the exploration ability in the global search stage. Compared with traditional random perturbations, the Gaussian mutation strategy can more accurately find potential excellent solutions in the solution space and prevent the algorithm from falling into a local optimal solution prematurely. Guided by the Gaussian distribution, the algorithm can more efficiently cover the solution space during the global search process, thereby improving the optimization performance and convergence speed of the algorithm. BRIEF DESCRIPTION OF THE DRAWINGS
[0075] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0076] Figure 1 The present invention is a flow chart of the vehicle networking computing offloading and resource allocation method based on the Enhanced Black-winged Kite Algorithm (EBKA) of the present invention.
[0077] Figure 2 Deployment scenario diagram for mobile edge computing system.
[0078] Figure 3 The present invention is a flow chart of the black kite optimization algorithm based on the elite reverse learning strategy, the Gompertz model and the Gaussian mutation strategy. DETAILED DESCRIPTION
[0079] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0080] A method for computing offloading and resource allocation in Internet of Vehicles based on an improved black kite optimization algorithm. Figure 1 As shown, the following steps are included:
[0081] S1: Obtain computing delays and computing energy consumption of tasks in various computing scenarios based on various computing scenarios, and calculate the total computing delay and total computing energy consumption of the tasks based on the computing delays and computing energy consumption of the tasks in various computing scenarios.
[0082] S1.1: If Figure 2 As shown, the mobile edge computing scenario studied in the present invention includes multiple mobile vehicles and MEC servers. The computing tasks that need to be offloaded are initiated by the corresponding local task vehicles, including three computing scenarios, namely, computing on the local task vehicle, offloading to the edge server, and offloading to the surrounding idle vehicles. After the latter two calculations are completed, the calculation results are returned to the local task vehicle.
[0083] Assume that there are num local task vehicles with offloaded computing tasks under the coverage of the base station equipped with edge servers, and use the set V = {v1,v2,…,v num}, each local task vehicle has its own task, and the task is defined as T i , there are x idle vehicles with idle computing resources around them, using the set D = {d1, d2, ..., d x} to indicate.
[0084] The unloading calculation task set of the local task vehicle is defined as Task = {T1, T2, ..., T i ,…,T num},Each task contains four attributes: T i ={D i ,C i ,f i ,τ i}. i represents the data size of the i-th task, C i represents the processing density of the i-th task, that is, the number of CPU cycles required to calculate 1 bit of data, f i represents the computing power of the vehicle, τ i represents the maximum tolerable delay of the i-th task.
[0085] Set each task to be divisible, using They represent the proportion of tasks calculated in the local task vehicle, offloaded to the edge server, and offloaded to the surrounding idle vehicles. All belong to [0,1], The delay and energy consumption issues of task allocation to local task vehicles, edge servers and surrounding idle vehicles are modeled separately.
[0086] S1.2: During the calculation process of the local task vehicle, there are The amount of data is allocated to the local task vehicle for calculation, and the local calculation delay is t local,i It is expressed as:
[0087]
[0088] Local computing energy consumption local,i It is expressed as:
[0089] e local,i =P i ×t local,i
[0090] Where P i Represents the local mission vehicle v i device power.
[0091] S1.3: During the offloading to edge server computing process, the amount of data allocated is expressed as In the transmission stage of task data from local task vehicles to edge servers and idle vehicles, the transmission rate of offloaded tasks transmitted to edge servers and idle vehicles through wireless communication links is calculated using Shannon's theorem, and the transmission rate R i It is expressed as:
[0092]
[0093] Where P i up Represents the local mission vehicle v i The transmission power, h i represents the channel gain between the local task vehicle and the edge server or idle vehicle, B represents the channel bandwidth, and N0 represents the background channel noise power.
[0094] Transmission delay It is expressed as:
[0095]
[0096] Transmission energy consumption It is expressed as:
[0097]
[0098] The latency of edge servers performing offload tasks It is expressed as:
[0099]
[0100] In the formula, f edge,i Assign local task vehicles v to edge servers i computing resources.
[0101] Energy consumption of edge servers performing offload tasks for:
[0102]
[0103] Where P egde is the device power of the edge server.
[0104] After the task is processed, the result is sent back to the local task vehicle v i , data transmission delay for:
[0105]
[0106] Where λ is the output data volume coefficient, which indicates the ratio between the output volume and the input volume of the transmitted data.
[0107] Energy consumption of data transmission for:
[0108]
[0109] In the process of offloading computing to the edge server, the total task processing delay is expressed as The total energy consumption is expressed as
[0110] S1.4: During the calculation process of unloading to an idle vehicle, the amount of calculation task data for the i-th task on the idle vehicle is
[0111] Transmission delay during idle vehicle calculation phase It is expressed as:
[0112]
[0113] Where, t r is the average transmission delay between vehicles.
[0114] Transmission energy consumption It is expressed as:
[0115]
[0116] Delay in unloading tasks performed by idle vehicles It is expressed as:
[0117]
[0118] In the formula, f idle Computing resources provided to idle vehicles in the surrounding area.
[0119] Energy consumption of idle vehicles performing unloading tasks for:
[0120]
[0121] Where P idle Indicates the equipment power of the idle vehicle.
[0122] After the task is processed, the result is sent back to the local task vehicle v i , data transmission delay for:
[0123]
[0124] Energy consumption of data transmission for:
[0125]
[0126] In the calculation process of unloading to the idle vehicle, the total task processing delay is expressed as The total energy consumption is expressed as
[0127] S1.5: Combining S1.2 to S1.4, the total computing delay of tasks in the edge computing system is:
[0128]
[0129] The total computing energy consumption of the task is:
[0130]
[0131] Among them, T sum and E sum They are the total computing delay and total computing energy consumption of tasks in the edge computing system, respectively.
[0132] S2: Define the system utility function based on the total computing delay and total computing energy consumption of the task. Take the minimum system utility function as the goal, and construct the computing delay and energy consumption model in the mobile edge computing scenario with the allocation rationality constraint, the upper limit constraint of the edge server computing resources, and the upper limit constraint of the available computing resources of idle vehicles as constraints.
[0133] In order to achieve the joint optimization of computing latency and computing energy consumption in the collaborative unloading mode of local task vehicles, edge servers and idle vehicles, a system utility function Y is designed. It is defined as follows:
[0134] Y=α×T sum +(1-α)×E sum
[0135] In the formula, α represents the trade-off parameter between the total computing delay of the task and the total computing energy consumption of the task. It reflects the weight of the task delay utility in the entire system utility and takes a value of 0.9. Therefore, the optimization goal is to minimize the system utility function Y. The objective function of the computing delay and energy consumption model in the mobile edge computing scenario is:
[0136] min(Y)
[0137] The constraints include the rationality of task allocation, the upper limit of edge server computing resources, and the upper limit of available computing resources for idle vehicles.
[0138] The rationality constraint of task allocation is:
[0139]
[0140] The upper limit constraint of edge server computing resources is:
[0141]
[0142] The upper limit of available computing resources for idle vehicles is:
[0143]
[0144] Among them, f edge Calculate resource limits for edge servers, f idle The upper limit of computing resources available to idle vehicles.
[0145] Among them, constraints (1) and (2) indicate that the sum of the proportions of the i-th task calculated in the local task vehicle, edge server and idle vehicle is equal to the total task volume of the task vehicle; constraints (3) and (4) indicate that the edge server computing resources allocated to each local task vehicle do not exceed the upper limit of the edge server computing resources, and the sum of the computing resources allocated to all local task vehicles does not exceed the upper limit of the edge server computing resources; constraint (5) indicates that the idle vehicle computing resources allocated to each local task vehicle do not exceed the upper limit of the idle vehicle available computing resources.
[0146] Swarm intelligence optimization algorithms are a class of general optimization algorithms that solve optimization problems by simulating group behavior. They do not depend on the specific structure of the problem and are applicable to various NP-Hard problems, such as the Black Kite optimization algorithm.
[0147] S3: Based on the elite reverse learning strategy, Gompertz model and Gaussian mutation strategy, a black kite optimization algorithm is designed. The designed black kite optimization algorithm is used to solve the computing delay and energy consumption model in the mobile edge computing scenario, and the final computing offloading and resource optimization allocation scheme is obtained, such as Figure 3 shown.
[0148] The method of using the designed black kite optimization algorithm to solve the computing delay and energy consumption model in the mobile edge computing scenario is as follows:
[0149] S3.1: Define the initial parameter set of the improved black kite optimization algorithm and initialize the black kite population based on the elite reverse learning strategy.
[0150] Specifically:
[0151] S3.11: Define the initial population size as N, the maximum number of iterations of the population as T, the dimension of the problem to be solved as dim, the upper bound of the solution space as ub, and the lower bound as lb.
[0152] S3.12: Randomly initialize the population P0: Randomly generate black-winged kite individuals P0 according to uniform distribution j , we get the population P0:
[0153] P0 j=r×(ub-lb)+lb, 1≤j≤N
[0154] Among them, r is a random vector uniformly distributed in the interval [0,1], P0 j represents the jth black-winged kite individual.
[0155] S3.13: Select the elite population E_P based on the population P0: Take the system utility function Y as the fitness evaluation index, calculate the fitness of the black-winged kites in the population P0 according to the system utility function Y, sort them from small to large according to the fitness, and select the first N / 2 black-winged kites to form the elite population E_P:
[0156] E_P=P0(sorted_indexes(1:N / 2))
[0157] Among them, sorted_indexes is used to store the index positions of the sorted individuals in the original population.
[0158] S3.14: Find the reverse population O_E of the elite population E_P:
[0159] O_E j =(ub+lb)-E_P j
[0160] Among them, E_P j is the jth black-winged kite individual in the elite population E_P, O_E j is the jth black-winged kite individual in the reverse population O_E.
[0161] S3.15: Merge population P0 and reverse population O_E to obtain a new population M_P. Select N black-winged kite individuals with better fitness from the new population M_P to form the initial population P:
[0162] P=M_P(sorted_indexes_merged(1:N))
[0163] Among them, sorted_indexes_merged is used to store the index positions of sorted individuals in the merged population.
[0164] In the encoding and population initialization phase of the Black Kite optimization algorithm, each Black Kite individual represents a potential solution, and each potential solution includes the task offloading ratio of local task vehicles, edge servers, and idle vehicles, as well as the computing resource ratio of edge servers. Task offloading ratio of local task vehicles, edge servers, and idle vehicles: Edge server computing resources edge,i and the computing resources provided by the idle vehicles around idle .
[0165] S3.2: Update the leader, perform local search based on the Gompertz model and update the positions of the black-winged kite individuals in the population, and perform global search based on the Gaussian mutation strategy and update the positions of the black-winged kite individuals in the population.
[0166] S3.21: Update the leader: The black-winged kite optimization algorithm selects the black-winged kite individual with the optimal fitness in the previous iteration as the leader by simulating the characteristic that the black-winged kite population follows the leader's guidance, and updates the leader's position.
[0167] S3.22: In the local search stage, construct a position update strategy for the attack behavior of the black-winged kite population according to the Gompertz model and perform position update.
[0168] Attack behavior: As a predator of small grassland mammals and insects, the black-winged kite adjusts the angles of its wings and tail according to the wind speed during flight, hovers quietly to observe prey, and then dives and attacks quickly. The black-winged kite optimization algorithm uses this attack behavior as a local search method.
[0169] The implementation process of the position update strategy for the attack behavior is as follows:
[0170] A1. To help the algorithm flexibly adjust the search intensity, the present invention introduces the Gompertz model in the local search stage of the black-winged kite optimization algorithm to dynamically adjust the step size. The step size adjustment formula of the Gompertz model is defined as:
[0171]
[0172] In the formula, n is the step size of the current iteration, which represents the update amplitude of each step of the optimization algorithm during the iteration. The size of the step size directly affects the size of the search area. A is the initial maximum step size, which determines the upper limit of the step size during the initial search, and the value is 0.05. B is used to control the speed and starting point of the initial step size decay. A larger B value will make the step size larger in the initial stage and enter the rapid decline stage faster, and the value is 0.3. F is the decay rate of the step size, which determines the degree of reduction of the step size with the decrease of the iteration times, and the value is 0.5. t is the current iteration number. This formula dynamically adjusts the step size through time, making the step size larger in the early stage of optimization and gradually decreasing in the later stage.
[0173] There are two attack behaviors of the black-winged kite. Strategy one: hover in the air and wait for an attack; Strategy two: hover in the air and search for prey.
[0174] A2. Set p as a fixed constant value, generate a random number r, r ∈ [0, 1]. When p < r, execute attack strategy one, and the position update formula for simulating attack strategy one is as follows:
[0175]
[0176] In the formula, is the position of the jth black-winged kite individual in the tth iteration, is the updated position of the j-th black-winged kite individual in the th iteration.
[0177] A3. When p ≥ r, execute attack strategy 2. The position update formula of simulated attack strategy 2 is as follows:
[0178]
[0179] Where r is a uniformly distributed random number and r∈[0,1].
[0180] A4. After the position update in the local search phase is completed, each black-winged kite individual before the position update Black kite individual with updated position Compared with the fitness of , the position with better fitness is selected as the position of the black-winged kite individual in this iteration.
[0181] S3.23: In the global search phase, a position update strategy for migration behavior is constructed based on the Gaussian mutation strategy and the position is updated.
[0182] Migration behavior: Birds migrate to adapt to seasonal changes. Many birds migrate from the north to the south in winter to obtain better living conditions and resources. Migration is usually led by leaders, and their guiding ability is crucial to the success of population migration. The black kite optimization algorithm proposes a hypothesis based on bird migration: if the fitness value of the current population is less than the fitness value of the random population, it means that the leader is no longer suitable to lead the population forward, and the leader will give up leadership and join the migrating population. On the contrary, if the fitness value of the current population is greater than the fitness value of the random population, the leader continues to guide the population until it reaches the destination. This strategy can dynamically select excellent leaders to ensure the success of migration.
[0183] The implementation process of the location update strategy of migration behavior is as follows:
[0184] B1. Set the leader of the black kite population in the tth iteration to be L t , the current fitness value of the jth black-winged kite is The fitness value of a random black-winged kite individual in the population is
[0185] B2. If the fitness value of the current j-th black-winged kite individual is Less than the fitness value of a random black-winged kite individual The leader gives up the leadership of the population, joins the migrating population, and implements migration strategy 1. The position update formula is as follows:
[0186]
[0187] In the formula, Cauthy(0, 1) represents Cauchy mutation.
[0188] B3. If the fitness value of the current j-th black-winged kite individual is greater than or equal to the fitness value of a randomly selected black-winged kite individual the leader continues to guide the population to the destination and executes Migration Strategy 2. The position update formula is as follows:
[0189]
[0190] In the formula, has the characteristic of periodic change and m ∈ [-2, 2].
[0191] B4. For the positions of the updated black-winged kite individuals introduce the Gaussian mutation strategy; perform position update according to the Gaussian mutation strategy; the Gaussian mutation strategy enhances the global search ability of the algorithm by introducing random changes that conform to the Gaussian distribution, avoiding premature convergence to local optimal solutions. It helps the algorithm refine the search near local solutions through a smooth and reasonable mutation process, while ensuring effective exploration within the global scope, thereby improving the stability and flexibility of the algorithm.
[0192] Set q as a fixed constant value, generate a random number r, r ∈ [0, 1]. When q < r, the position of the black-winged kite individual is updated to:
[0193]
[0194] In the formula, μ is the mean of the Gaussian distribution, which is taken as the midpoint of the upper and lower bounds of the variable, that is, the center of the search space. This parameter controls the central position of the generated mutation value and determines the offset of the newly generated solution relative to the current solution; σ is the standard deviation of the Gaussian distribution, which is set to one-sixth of the variable range. This parameter controls the fluctuation range of the generated mutation values. A larger σ value will result in larger mutations; normrnd(μ, σ) is used to generate a random number that conforms to the Gaussian distribution with a mean of μ and a standard deviation of σ. This value is used as the mutation value and determines the new position of the search agent.
[0195] When q ≥ r, the position of the black-winged kite individual remains unchanged.
[0196] B5. After the position update in the global search stage is completed, each black-winged kite individual before the position update Black kite individual with updated position Compared with the fitness of , the position with better fitness is selected as the position of the black-winged kite individual in this iteration t.
[0197] S3.3: Select the black kite individual with the best fitness in this iteration, and compare its fitness with that of the leader, and select the position of the black kite individual with better fitness as the optimal solution for this iteration; determine whether the maximum number of iterations has been reached; if yes, output the global optimal solution, otherwise, repeat steps S3.2 to S3.3.
[0198] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. 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 vehicle network computing offloading and resource allocation based on an improved black kite optimization algorithm, characterized in that: The following steps are involved: S1: Obtain the computing delay and computing energy consumption of tasks in various computing scenarios based on various computing scenarios, and calculate the total computing delay and total computing energy consumption of tasks based on the computing delay and computing energy consumption of tasks in various computing scenarios; S2: Define the system utility function based on the total computing delay and total computing energy consumption of the task, take the minimum system utility function as the goal, and build the computing delay and energy consumption model in the mobile edge computing scenario with the allocation rationality constraint, the upper limit constraint of edge server computing resources and the upper limit constraint of available computing resources of idle vehicles as constraints; S3: Based on the elite reverse learning strategy, Gompertz model and Gaussian mutation strategy, a Black Kite optimization algorithm is designed. The designed Black Kite optimization algorithm is used to solve the computing delay and energy consumption model in the mobile edge computing scenario to obtain the final computing offloading and resource optimization allocation plan.
2. The method for vehicle networking computing offloading and resource allocation based on the improved black kite optimization algorithm according to claim 1 is characterized in that: The various computing scenarios include scenarios of local task vehicle computing, scenarios of offloading computing to edge servers, and scenarios of offloading computing to surrounding idle vehicles; the method for obtaining computing delays and computing energy consumption of tasks under various computing scenarios is as follows: obtaining local computing delays and local computing energy consumption in local task vehicle computing, obtaining total computing delays and total energy consumption in the computing process of offloading computing to edge servers, and obtaining total computing delays and total energy consumption in the computing process of offloading computing to surrounding idle vehicles.
3. The method for vehicle networking computing offloading and resource allocation based on the improved black kite optimization algorithm according to claim 2 is characterized in that: The total computational delay T of the task described in step S1 sum for: The total computing energy consumption of the task E sum for: Among them, num is the number of local mission vehicles, t local,i is the local calculation delay, t edge,i is the total delay of the computation process offloaded to the edge server, t idle,i The total delay in the process of unloading to the surrounding idle vehicles; e local,i is the local computing energy consumption, e edge,i is the total energy consumption during the computation offloaded to the edge server, e idle,i The total energy consumption during the calculation is for unloading to the surrounding idle vehicles.
4. The method for vehicle networking computing offloading and resource allocation based on the improved black kite optimization algorithm according to any one of claims 1 to 3, characterized in that: The system utility function is: Y=α×T sum +(1-a)×E sum Among them, α represents the trade-off parameter between the total computational latency of the task and the total computational energy consumption of the task; The objective function of the computing delay and energy consumption model in the mobile edge computing scenario described in step S2 is: min(Y) The rationality constraint of task allocation is: The upper limit constraint of edge server computing resources is: The upper limit of available computing resources for idle vehicles is: in, are the proportions of tasks calculated in the local task vehicle, offloaded to the edge server, and offloaded to the surrounding idle vehicles, respectively. edge,i The computing resources allocated by the edge server to the local task vehicle, f idle,i The computing resources provided to the idle vehicles around, f edge Calculate resource limits for edge servers, f idle The upper limit of computing resources available to idle vehicles.
5. The method for vehicle networking computing offloading and resource allocation based on the improved black kite optimization algorithm according to claim 4 is characterized in that: The method for solving the computing delay and energy consumption model in the mobile edge computing scenario using the designed black kite optimization algorithm described in step S3 is: S3.1: Define the initial parameter set of the improved black kite optimization algorithm and initialize the black kite population based on the elite reverse learning strategy; S3.2: Update the leader, perform local search based on the Gompertz model and update the position of black-winged kites in the population, perform global search based on the Gaussian mutation strategy and update the position of black-winged kites in the population; S3.3: Select the black kite individual with the best fitness in this iteration, compare its fitness with that of the leader, select the position of the black kite individual with better fitness as the optimal solution for this iteration, and determine whether the maximum number of iterations has been reached; If yes, output the global optimal solution, otherwise, repeat steps S3.2 to S3.
3.
6. The method for vehicle networking computing offloading and resource allocation based on the improved black kite optimization algorithm according to claim 5 is characterized in that: The method for defining the initial parameter set of the improved black kite optimization algorithm is: S3.11: Define the initial population size as N, the maximum number of iterations of the population as T, the dimension of the problem to be solved as dim, the upper bound of the solution space as ub, and the lower bound as lb; The method for initializing the black-winged kite population based on the elite reverse learning strategy is: S3.12: Randomly initialize the population P0; S3.13: Select the elite population E_P according to the population P0; S3.14: Obtain the opposite population O_E of the elite population E_P; S3.15: Combine the population P0 and the opposite population O_E to obtain a new population M_P, and select N black-winged kite individuals with better fitness from the new population M_P to form the initial population P.
7. The method for vehicle networking computing offloading and resource allocation based on the improved black kite optimization algorithm according to claim 6 is characterized in that: The specific steps of S3.2 are as follows: S3.21: Update the leader: Select the black-winged kite individual with the optimal fitness in the previous iteration as the leader and update the leader's position; S3.22: In the local search stage, construct a position update strategy for the attack behavior of the black-winged kite population according to the Gompertz model and perform position update; S3.23: In the global search stage, construct a position update strategy for the migration behavior according to the Gaussian mutation strategy and perform position update.
8. The method for vehicle networking computing offloading and resource allocation based on the improved black kite optimization algorithm according to claim 7 is characterized in that: The position update strategy for the attack behavior described in step S3.22 is: A1. Define the step size adjustment formula according to the Gompertz model: where n is the step size of the current iteration, A is the initial maximum step size, B is the parameter used to control the decay speed and starting point of the initial step size, F is the decay rate of the step size, and t is the current iteration number; A2. Set a fixed constant value p, generate a random number r, r ∈ [0, 1]. When p < r, execute attack strategy one, and the position update formula of attack strategy one is as follows: In the formula, is the position of the jth black-winged kite individual in the tth iteration, is the updated position of the j-th black-winged kite individual in the t-th iteration; A3. When p ≥ r, execute attack strategy two, and the position update formula of attack strategy two is as follows: A4. After the position update in the local search phase is completed, each black-winged kite individual before the position update Black kite individual with updated position Compared with the fitness of , the position with better fitness is selected as the position of the black-winged kite individual in this iteration.
9. The method for vehicle networking computing offloading and resource allocation based on the improved black kite optimization algorithm according to claim 8 is characterized in that: The position update strategy for the migration behavior described in step S3.23 is: B1. Set the leader of the black kite population in the tth iteration to be L t , the current fitness value of the jth black-winged kite is The fitness value of a random black-winged kite individual in the population is B2. If the fitness value of the current j-th black-winged kite individual is Less than the fitness value of a random black-winged kite individual The leader gives up the leadership of the population and joins the migrating population. The position update formula is as follows: In the formula, Cauthy(0, 1) represents Cauchy mutation; B3. If the fitness value of the current j-th black-winged kite individual is F t i Greater than or equal to the fitness value of a random black-winged kite individual The leader continues to guide the population to the destination, and the position update formula is as follows: In the formula, m is a parameter with periodic changes; B4. Updated location of black-winged kite individuals Introduce Gaussian mutation strategy; update position according to Gaussian mutation strategy; B5. After the position update in the global search phase is completed, each black-winged kite individual before the position update Black kite individual with updated position The fitness value of is compared with that of the individual black-winged kite in this iteration t, and the position with better fitness is selected as the black-winged kite individual in this iteration t. location.
10. The method for vehicle networking computing offloading and resource allocation based on the improved black kite optimization algorithm according to claim 9 is characterized in that: The calculation method of the fitness is: Use the system utility function Y as the fitness evaluation index, and calculate the fitness of the black-winged kite individual according to the system utility function Y; The Gaussian mutation strategy is as follows: Set a fixed constant value q, generate a random number r, where r ∈ [0, 1]. When q < r, the position of the black-winged kite individual The update formula is: where μ is the mean of the Gaussian distribution, σ is the standard deviation of the Gaussian distribution, and normrnd(μ, σ) is used to generate a Gaussian distribution random number that conforms to the mean of μ and the standard deviation of σ; When q≥r, the position of the black-winged kite individual N_P t i Remain unchanged.
Citation Information
Patent Citations
A joint computing offloading and resource allocation method for energy-saving Internet of Vehicles
CN117062025B
Edge cloud cooperation task unloading method based on crowd evolution in Internet of Vehicles
CN115022322A
Security task offloading method and system for low earth orbit satellites
CN118317368A
Mobile robot path planning method based on improved black wing plinary optimization algorithm
CN118672267A
Unmanned aerial vehicle task allocation method based on improved black wing plinary optimization algorithm
CN118938948A
Cited By
Unloading method in ultra-dense millimeter wave MEC network
CN121037916A