A method for computing offloading and resource allocation in Internet of Vehicles based on improved Black Kite optimization algorithm

By improving the Black Kite optimization algorithm and combining it with elite reverse learning and Gaussian mutation strategies, the computational offloading and resource allocation of the Internet of Vehicles are optimized, solving the problems of long training time and easy falling into local optimal solutions in existing methods, and achieving efficient and low-energy optimization of computational offloading and resource allocation.

CN119815417BActive Publication Date: 2025-09-26HENAN UNIVERSITY
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510084406.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-20
Publication Date
2025-09-26
Estimated Expiration
2045-01-20

AI Technical Summary

Technical Problem

Existing Internet of Vehicles computing offloading and resource allocation methods have problems such as long training time and easy falling into local optimal solutions. They cannot effectively meet the computing power requirements of vehicles, resulting in excessive computing latency and energy consumption.

Method used

An improved Black Kite optimization algorithm is adopted, combined with the elite reverse learning strategy, Gompertz model and Gaussian mutation strategy to optimize computing offloading and resource allocation. The objective function is minimized by the system utility function to achieve the optimal allocation of computing latency and energy consumption.

Benefits of technology

It accelerates the convergence of the algorithm, avoids local optimal solutions, reduces the computational burden of local mission vehicles, reduces system latency and overall energy consumption, and improves the overall performance and efficiency of the Internet of Vehicles system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119815417B_ABST
    Figure CN119815417B_ABST
Patent Text Reader

Abstract

This invention proposes a method for computing offloading and resource allocation in the Internet of Vehicles (IoV) based on an improved Black Kite optimization algorithm. The method comprises the following steps: obtaining the computational latency and computational energy consumption of tasks in various computing scenarios based on multiple computing scenarios; calculating the total computational latency and total computational energy consumption of the tasks based on the computational latency and computational energy consumption of the tasks in various computing scenarios; defining a system utility function based on the total computational latency and total computational energy consumption of the tasks; constructing a computational latency and energy consumption model for mobile edge computing scenarios with the goal of minimizing the system utility function; designing a Black Kite optimization algorithm based on an elite reverse learning strategy, a Gompertz model, and a Gaussian mutation strategy; and using the designed Black Kite optimization algorithm to solve the computational latency and energy consumption model for mobile edge computing scenarios to obtain a final computation offloading and resource optimization allocation solution. This invention can accelerate the convergence of the algorithm and prevent the algorithm from prematurely falling into a local optimal solution.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of resource optimization and allocation, and in particular to a method for computing offloading and resource allocation in an Internet of Vehicles (IoV). Background Art

[0002] With growing consumer demand and rapid technological advancements, the automotive sector is becoming increasingly digitalized, with intelligent technologies such as multimedia entertainment and assisted driving becoming standard features. As an application of IoT technology in intelligent transportation, the Internet of Vehicles (IoV) is a key component of building intelligent transportation systems. To enable autonomous driving and intelligent functions, modern vehicles are equipped with a vast array of sensors and communication technologies. However, as functional demands increase, vehicle computing power is approaching or even exceeding its capacity limits, failing to meet the massive data processing and low latency requirements of the IoV. Therefore, addressing the challenges of vehicle computation offloading and resource allocation based on edge computing is urgent.

[0003] Mobile cloud computing technology is an effective approach to addressing the limited resources of vehicle equipment. Although cloud computing servers possess powerful computing capabilities, their distance from task terminals results in high data transmission latency and susceptibility to environmental fluctuations. These issues limit their widespread practical application. To address these shortcomings, mobile edge computing (MEC) has emerged. MEC extends cloud computing capabilities to the edge of the network. By deploying edge servers or base stations close to terminal devices, it effectively reduces data transmission latency and energy consumption, providing end users with cloud computing-like services and thus addressing the shortcomings of traditional network infrastructure. Compared to resource-rich cloud computing centers, MEC servers have relatively limited computing resources. When edge computing platforms need to handle multiple offloaded tasks, MEC servers are often unable to handle all of them simultaneously, resulting in significant computational latency. Therefore, studying computation offloading decisions and resource allocation in connected vehicles is particularly important. Typically, computation offloading decisions and resource allocation are NP-hard problems, often solved using swarm intelligence optimization algorithms.

[0004] Computational offloading refers to offloading on-board computing tasks, such as autonomous driving, environmental perception, and data processing, from the vehicle's local computing unit to an edge computing platform or cloud computing platform. This reduces the vehicle's computing burden, improves computing efficiency, and reduces energy consumption. Resource allocation refers to how to rationally allocate limited computing resources, such as bandwidth, storage, and computing power, to ensure that each node in the Internet of Vehicles, including vehicles, road test units, and edge servers, can operate efficiently and stably.

[0005] However, existing IoV computation offloading and resource allocation methods, such as the invention patent with publication number CN 117062025 B, disclose an energy-saving joint computation offloading and resource allocation method for IoV. This method proposes a collaborative sensing data fusion architecture that fuses sensory data from RSUs and vehicles. For data fusion computation tasks, an improved K-means task classification algorithm is proposed to pre-classify tasks. Then, for vehicles that need to offload tasks to an offloading node, a queuing delay minimization problem with long-term delay and long-term energy consumption constraints is proposed. The Lyapunov optimization method is used to transform these long-term delay and energy consumption constraints into a queue stability problem. Finally, the offloading process is modeled as a Markov decision process, and the DDQN algorithm is used to find the optimal computation offloading and computation resource allocation decisions. However, this method suffers from long training time and a tendency to fall into local optimal solutions. Therefore, it is necessary to rationally improve the algorithm to effectively achieve computation offloading and resource allocation. Summary of the Invention

[0006] In response to the above technical problems, the present invention proposes a method for vehicle network computing offloading and resource allocation based on an improved Black Kite optimization algorithm, which can accelerate the convergence speed of the algorithm, prevent 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 computing offloading and resource allocation in an Internet of Vehicles (IoV) based on an improved Black Kite optimization algorithm includes 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 the 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 latency and total computing energy consumption of the task. With the goal of minimizing the system utility function, and subject to allocation rationality constraints, the upper limit of edge server computing resources, and the upper limit of available computing resources of idle vehicles, construct a computing latency and energy consumption model for the mobile edge computing scenario.

[0011] S3: Design a Black Kite optimization algorithm based on the elite reverse learning strategy, Gompertz model, and Gaussian mutation strategy. Use the designed Black Kite optimization algorithm to solve the computing latency and energy consumption model in the mobile edge computing scenario, and obtain the final computing offloading and resource optimization allocation solution.

[0012] Furthermore, the various computing scenarios include scenarios of computing on a local task vehicle, computing offloaded to an edge server, and computing offloaded to surrounding idle vehicles; the method for obtaining computing delays and computing energy consumption of tasks under various computing scenarios is: obtaining local computing delays and local computing energy consumption in computing on a local task vehicle, obtaining the total computing delay and total energy consumption in the computing process of unloading to the edge server when computing offloaded to the edge server, and obtaining the total computing delay and total energy consumption in the computing process of unloading to surrounding idle vehicles when computing offloaded 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 in 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 process 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 delay of the task and the total computational energy consumption of the task;

[0021] The objective function of the computational 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 proportion of tasks calculated on 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] Furthermore, the method for solving the computing delay and energy consumption model in the mobile edge computing scenario using the designed Black Kite optimization algorithm 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 kites in the population, perform global search based on the Gaussian mutation strategy and update the position of black 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. The position of the black kite individual with better fitness is selected as the optimal solution for this iteration. Determine whether the maximum number of iterations has been reached. If so, output the global optimal solution. Otherwise, repeat steps S3.2 to S3.3.

[0034] Furthermore, 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 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 for controlling the speed of the initial step size decay and the starting point, F is the decay 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 ∈ [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 jth black-winged kite individual in the tth iteration, is the updated position of the jth black-winged kite individual in the tth iteration;

[0052] A3. When p ≥ 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 The fitness of the two is compared, and the position with better fitness is selected as the position of the black 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 individual is The fitness value of a random black kite individual in the population is

[0057] B2. If the current fitness value of the jth black-winged kite individual Less than the fitness value of a random black 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 Cauchy variation;

[0060] B3. If the current fitness value of the jth black kite individual is Greater than or equal to the fitness value of a random black kite individual The leader continues to guide the population to the destination, and the position update formula is as follows:

[0061]

[0062] Where m is a parameter with periodic changes;

[0063] B4. Updated location of black kite individuals Introduce Gaussian mutation strategy; update position according to Gaussian mutation strategy;

[0064] B5. After the position update of the global search phase is completed, each black kite individual before the position update Black kite individual with updated position The fitness value of the black kite is compared and the position with better fitness is selected as the black 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 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-internet 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 delay and overall energy consumption can be decreased, and the overall performance and efficiency of the vehicle-to-internet 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 local optimal solutions 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 dynamically adjusting the step size. By adaptively adjusting the step size, this model effectively balances the exploration and exploitation processes. 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. [[ID=2,7]]

[0074] 4. The present invention introduces a Gaussian mutation strategy in the global search stage of the algorithm, which can effectively enhance 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 local optimal solutions 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. 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 following briefly introduces the drawings required for use in the embodiments or the description of the prior art. 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 any creative work.

[0076] Figure 1 This is a flow chart of the vehicle network 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 This is a flow chart of the black kite optimization algorithm based on the elite reverse learning strategy, Gompertz model and Gaussian mutation strategy of the present invention. DETAILED DESCRIPTION

[0079] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention 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 improved Black Kite optimization algorithm, such as Figure 1 As shown, the following steps are included:

[0081] S1: Obtain computing delays and computing energy consumption of tasks in multiple computing scenarios based on multiple 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 multiple computing scenarios.

[0082] S1.1: If Figure 2 As shown in the figure, the mobile edge computing scenario studied in this paper includes multiple mobile vehicles and MEC servers. The computing tasks that need to be offloaded are initiated by the corresponding local task vehicle. There are three computing scenarios, namely, computing on the local task vehicle, offloading to the edge server, and offloading to the surrounding idle vehicles. After the calculation of the latter two scenarios, 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} to indicate that each local task vehicle has its own task, which is defined as T i , there are x idle vehicles with idle computing resources around them, and 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}. Among them D i Indicates 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 local task vehicles, offloaded to edge servers, and offloaded to 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 calculation, and the local calculation delay is t local,i Expressed as:

[0087]

[0088] Local computing energy consumption e local,i 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 computation offloading to the edge server, the amount of data allocated is expressed as During the task data transmission phase from the local task vehicle to the edge server and idle vehicle, the transmission rate of the offload task transmitted to the edge server and idle vehicle through the wireless communication link is calculated using Shannon's theorem. The transmission rate R i 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 Expressed as:

[0095]

[0096] Transmission energy consumption Expressed as:

[0097]

[0098] The latency of edge servers performing offload tasks Expressed as:

[0099]

[0100] Where, f edge,i Assign the edge server to the local task vehicle v 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 return delay for:

[0105]

[0106] Where λ is the output data volume coefficient, which represents the ratio between the output volume and the input volume of the transmitted data.

[0107] Energy consumption generated by data transmission for:

[0108]

[0109] During the computation process of offloading 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 the idle vehicle, the amount of calculation task data of the i-th task on the idle vehicle is

[0111] Transmission delay during the idle vehicle calculation phase Expressed as:

[0112]

[0113] Where, t r is the average transmission delay between vehicles.

[0114] Transmission energy consumption Expressed as:

[0115]

[0116] Delay in performing unloading tasks for idle vehicles Expressed as:

[0117]

[0118] Where, f idle Computing resources provided to idle vehicles in the surrounding area.

[0119] Energy consumption generated by 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 return delay for:

[0123]

[0124] Energy consumption generated by data transmission for:

[0125]

[0126] During 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 latency 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 latency and total computing energy consumption of the task. With the goal of minimizing the system utility function, and with the allocation rationality constraints, the upper limit constraints on edge server computing resources, and the upper limit constraints on the available computing resources of idle vehicles as constraints, construct a computing latency and energy consumption model for the mobile edge computing scenario.

[0133] In order to achieve the joint optimization of computing latency and computing energy consumption in the collaborative offloading 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 computational delay of the task and the total computational energy consumption of the task. It reflects the weight of the task delay utility in the entire system utility and is set to 0.9. Therefore, the optimization goal is to minimize the system utility function Y. The objective function of the computational 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 general class of algorithms that solve optimization problems by simulating group behavior. They are independent of the specific structure of the problem and are applicable to a variety of 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 solution is obtained, such as Figure 3 shown.

[0148] The method for solving the computing delay and energy consumption model in the mobile edge computing scenario using the designed Black Kite optimization algorithm 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 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 j-th black-winged kite individual.

[0155] S3.13: Select the elite population E_P from population P0: Use the system utility function Y as the fitness evaluation indicator. Calculate the fitness of the black kites in population P0 based on the system utility function Y. Sort the individuals by fitness from small to large, and select the top N / 2 black 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 position 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 j-th 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 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 position of the sorted individuals in the merged population.

[0164] During the encoding and population initialization phase of the Black Kite optimization algorithm, each Black Kite individual represents a potential solution. Each potential solution includes the task offloading ratios of local task vehicles, edge servers, and idle vehicles, as well as the computing resource ratios of edge servers. The task offloading ratios of local task vehicles, edge servers, and idle vehicles are: Edge server computing resources f 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 guidance of the leader, and updates the position of the leader.

[0167] S3.22: In the local search stage, construct a position update strategy for the attack behavior of the black-winged kite population based on 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. The position update formula for simulating attack strategy one is as follows:

[0175]

[0176] Where, is the position of the jth black kite individual in the tth iteration, is the updated position of the j-th black 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 kite individual before the position update Black kite individual with updated position The fitness of the two is compared, and the position with better fitness is selected as the position of the black 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 position updates are performed.

[0182] Migration: Birds migrate to adapt to seasonal changes. Many migrate from north to south in winter to access better living conditions and resources. Migration is often led by a leader, whose ability to guide the flock is crucial to its success. The Black Kite optimization algorithm proposes a hypothesis based on bird migration: if the current flock's fitness is lower than that of a random flock, indicating that the leader is no longer fit to lead the flock forward, the leader relinquishes leadership and joins the migrating flock. Conversely, if the current flock's fitness is higher than that of a random flock, the leader continues to guide the flock until it reaches its destination. This strategy dynamically selects excellent leaders to ensure successful 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 individual is The fitness value of a random black kite individual in the population is

[0185] B2. If the current fitness value of the jth black-winged kite individual Less than the fitness value of a random black 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 position of the updated black-winged kite individual 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 the local optimal solution. It helps the algorithm refine the search near the local solution 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 here takes 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 here to one-sixth of the variable range. This parameter controls the fluctuation range of the generated mutation value. A larger σ value will result in a larger mutation; normrnd(μ, σ) is used to generate a random number that conforms to the Gaussian distribution with a mean of μ and a standard deviation of σ, and this value is used as the mutation value, determining 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, 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 so, 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 principles of the present invention should be included in the scope of protection 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 latency and computing energy consumption of tasks in various computing scenarios based on various computing scenarios. Calculate the total computing latency and total computing energy consumption of tasks based on the computing latency and computing energy consumption of tasks in various computing scenarios: S2: Define the system utility function based on the total computing latency and total computing energy consumption of the task. With the goal of minimizing the system utility function, and subject to allocation rationality constraints, the upper limit of edge server computing resources, and the upper limit of available computing resources of idle vehicles, construct a computing latency and energy consumption model for the mobile edge computing scenario. S3: Design a Black Kite optimization algorithm based on the elite reverse learning strategy, the Gompertz model, and the Gaussian mutation strategy. Use the designed Black Kite optimization algorithm to solve the computational latency and energy consumption model in mobile edge computing scenarios, and obtain the final computational offloading and resource optimization allocation solution. The method for solving the computing delay and energy consumption model in the mobile edge computing scenario using the designed Black Kite optimization algorithm 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 kites in the population, perform global search based on the Gaussian mutation strategy and update the position of black kites in the population; S3.3: Select the black kite individual with the best fitness in this iteration and compare its fitness with that of the leader. The position of the black kite individual with better fitness is selected 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; if no, repeat steps S3.2 to S3.3; 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 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 based on the population P0; S3.14: Find the reverse population O_E of the elite population E_P; S3.15: Merge population P0 and reverse population O_E to obtain a new population M_P. Select N black kite individuals with better fitness from the new population M_P to form the initial population P. The step S3.2 is specifically as follows: S3.21: Update leader: Select the black kite individual with the best fitness in the previous iteration as the leader and update the leader's position; S3.22: In the local search phase, a location update strategy for the attack behavior of the black kite population is constructed based on the Gompertz model and the location update is performed; S3.23: In the global search phase, a location update strategy for migration behavior is constructed based on the Gaussian mutation strategy and the location update is performed. The location update strategy for the attack behavior described in step S3.22 is: A1. Define the step size adjustment formula based on the Gompertz model: where n is the step size of the current iteration, A is the initial maximum step size, B is the parameter for controlling the speed of the initial step size decay and the starting point, F is the decay rate of the step size, and t is the current number of iterations; A2. Set a fixed constant value p, generate a random number r, r ∈ [0, 1]. When p < r, execute Attack Strategy 1. The position update formula of Attack Strategy 1 is as follows: Where, is the position of the jth black kite individual in the tth iteration, is the updated position of the j-th black kite individual in the t-th iteration; A3. When p ≥ r, execute Attack Strategy 2. The position update formula of Attack Strategy 2 is as follows: A4. After the position update in the local search phase is completed, each black kite individual before the position update Black kite individual with updated position Compare the fitness of the individual and select the position with better fitness as the position of the black-winged kite in this iteration; The position update strategy of 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 individual is The fitness value of a random black kite individual in the population is B2. If the current fitness value of the jth black-winged kite individual Less than the fitness value of a random black 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 current fitness value of the jth black kite individual is Greater than or equal to the fitness value of a random black 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 kite individuals Introduce Gaussian mutation strategy; update position according to Gaussian mutation strategy; B5. After the position update of the global search phase is completed, each black kite individual before the position update Black kite individual with updated position The fitness value of the black kite is compared and the position with better fitness is selected as the black kite individual in this iteration t. location.

2. The method for vehicle network computing offloading and resource allocation based on the improved Black Kite optimization algorithm according to claim 1 is characterized in that: The described multiple computing scenarios include the scenario of local task vehicle computing, the scenario of offloading to the edge server for computing, and the scenario of offloading to surrounding idle vehicles for computing; the method for obtaining the computing delay and computing energy consumption of tasks under multiple computing scenarios is: obtaining the local computing delay and local computing energy consumption in local task vehicle computing, obtaining the total delay and total energy consumption during the process of offloading to the edge server for computing when offloading to the edge server for computing, and obtaining the total delay and total energy consumption during the process of offloading to surrounding idle vehicles for computing when offloading to surrounding idle vehicles for computing.

3. The method for vehicle network 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 in 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 process 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 network 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 described system utility function is: Y=α×T sum +(1-a)×E sum where α represents the trade-off parameter between the total computing delay of the task and the total computing 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 the computing resources of the edge server is: The upper limit constraint of the available computing resources of idle vehicles is: in, are the proportion of tasks calculated on 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 network computing offloading and resource allocation based on the improved Black Kite optimization algorithm according to claim 4 is characterized in that: The described method for calculating the fitness is: using 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; 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 as follows: 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 kite individual 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