A resource allocation method based on meta-heuristic optimization strategy
By introducing the Hierarchical Enhanced Whale Optimization Algorithm (LEWOA), resource allocation is optimized in the Internet of Vehicles environment, solving the problems of insufficient global search capability and high computational complexity, and achieving efficient resource allocation and improved semantic service quality.
Patent Information
- Application Number
- CN202411814389.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2044-12-11
AI Technical Summary
Existing resource allocation methods in the Internet of Vehicles environment have limited global search capabilities and high computational complexity, resulting in inefficient resource allocation and difficulty in meeting the real-time and dynamic change requirements in multi-vehicle and multi-task scenarios.
The Hierarchical Enhanced Whale Optimization Algorithm (LEWOA) is adopted to optimize the resource allocation process and improve the global search capability and local development capability by introducing nonlinear shrinkage factors and hierarchical optimization mechanism, combined with semantic QoS indicators.
It improves the efficiency and stability of resource allocation, enhances the semantic service quality of the system, and meets the resource scheduling needs under multi-user and high concurrency conditions.
Smart Images

Figure CN119743798B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of wireless communication, and particularly relates to a resource allocation method based on a meta-heuristic optimization strategy. BACKGROUND
[0002] With the development of Internet of Vehicles (IoV) and the popularity of intelligent driving and automatic driving, the demand for inter-vehicle data communication and computation has greatly increased. Vehicles in IoV collect surrounding environment information through vehicle-mounted sensors and perform task processing such as target detection and semantic segmentation. These tasks require high computing power and communication bandwidth. However, due to the limited computing resources of vehicle-mounted devices, complex computing tasks cannot be processed independently. Therefore, computation offloading technology has been widely applied to transfer part of the computing tasks to edge computing servers or cloud for processing, so as to reduce the burden of vehicle-mounted devices and improve system response speed. The introduction of mobile edge computing (MEC) enables the computing resources to be sunk to the network edge close to the user, further enhancing the processing capability of computing tasks and reducing the delay and energy consumption.
[0003] Under this background, how to allocate resources under the limited communication and computing resources to ensure the communication stability and quality of service (QoS) in a multi-vehicle environment has become a key challenge. Traditional resource allocation methods usually use mixed integer nonlinear programming (MINLP) model for modeling. Such problems belong to NP-hard problems, which are difficult to solve in complex environments. Existing researches have explored resource allocation methods based on global optimization algorithms and heuristic algorithms. Among them, global optimization algorithms can find global optimal solutions in a large solution space, but the computational complexity is high, which is difficult to meet the real-time requirements of IoV. Heuristic algorithms such as local search and iterative optimization reduce the computational complexity to a certain extent, but may fall into local optimum.
[0004] Among metaheuristic algorithms, the Whale Optimization Algorithm (WOA) is based on the hunting behavior of whales. Its simplicity and adaptability have shown it to excel in solving complex optimization problems. When using WOA for communication resource allocation, it mimics the behavior of whales encircling their prey, implementing three primary search mechanisms: shrinking surrounds, spiraling, and random search. However, WOA is prone to falling into local optima in multimodal optimization problems and has weak global search capabilities, particularly in resource allocation problems with complex nonlinear constraints. Previous studies have attempted to apply WOA to MEC and the Internet of Vehicles (IoV), such as optimizing resource scheduling in cloud computing or 5G communication environments. However, these approaches fail to fully consider semantic QoS metrics in the resource allocation process. Furthermore, WOA's local search capabilities and convergence speed remain insufficient in complex multi-vehicle scenarios, limiting its practical application in IoV environments.
[0005] In summary, in the Internet of Vehicles environment, existing resource allocation methods have the following technical shortcomings:
[0006] 1. Limited global search capabilities: Existing metaheuristic algorithms, such as the Whale Optimizer (WOA), have limited capabilities in global search and local exploitation. Especially when dealing with multimodal optimization problems and complex nonlinear constraints, WOA is prone to falling into local optima, resulting in resource allocation results that fail to achieve the global optimal solution, thereby reducing overall system performance.
[0007] 2. High computational complexity: While resource allocation methods based on global optimization algorithms can provide globally optimal solutions, their high computational complexity makes them unsuitable for the real-time response required by the connected vehicle environment. Since connected vehicle tasks typically require high latency, high computational complexity increases computation time, resulting in slower system response. Summary of the Invention
[0008] The purpose of the present application is how to efficiently allocate communication resources and dynamically offload tasks in a vehicle networking environment with limited bandwidth and computing resources to maximize the semantic quality of service (QoS) in a multi-vehicle, multi-task scenario. In the current vehicle networking, when multiple vehicle nodes simultaneously request edge computing server services, there is a resource competition problem, resulting in low efficiency of computing and communication resource allocation, and the system is prone to high delay and poor stability. Traditional optimization methods have deficiencies in global search and local development capabilities, and are prone to local optimization, making it difficult to meet the real-time and dynamic changing needs in complex scenarios. Therefore, the present application proposes a vehicle networking resource allocation method based on a layer enhanced whale optimization algorithm (LEWOA) to improve resource allocation efficiency, enhance system stability, and optimize semantic service quality during transmission to meet the resource scheduling needs of multiple users and high concurrency in vehicle networking.
[0009] The technical solution adopted by the present application to solve the technical problems is as follows:
[0010] The resource allocation method based on the meta-heuristic optimization strategy provided by the present application mainly includes the following steps:
[0011] Step one, build a resource allocation optimization model suitable for a wireless network environment. The resource allocation optimization model considers resource constraints including network bandwidth, device power, and device task priority in a multi-device, multi-task communication and computing offload scenario, and takes optimizing network performance indicators as the goal;
[0012] Step two, in the resource allocation optimization model, set the objective function to maximize network utility; the objective function combines the semantic information of device tasks in the network and can perform semantic-driven priority allocation of resources;
[0013] Step three, design an improved meta-heuristic optimization strategy, i.e., a layer enhanced whale optimization algorithm, for the optimization problem; the meta-heuristic optimization strategy combines a hierarchical optimization mechanism of global search and local search, refines the problem space through a hierarchical structure, and gradually optimizes the quality of the solution;
[0014] Step four, introduce a nonlinear contraction factor to adjust the search range and search direction; the nonlinear contraction factor adjusts the search intensity according to a dynamic nonlinear adjustment mechanism, so that the layer enhanced whale optimization algorithm focuses on global search in the initial stage and focuses on local precise search in the later stage;
[0015] Step five, the optimization problem is decomposed into multiple sub-problems, the local optimal solution is obtained by solving the multiple sub-problems respectively, and the global optimal solution is obtained by global integration of the local optimal solution based on the hierarchical optimization mechanism;
[0016] Step six, in the actual application of wireless resource allocation, the meta-heuristic optimization strategy is used to dynamically adjust the network resources, so as to ensure the comprehensive improvement of resource utilization efficiency and service quality in a multi-device high-competition environment.
[0017] Further, in step three, the improved meta-heuristic optimization strategy adopts a hierarchical optimization mechanism to improve the exploration ability of global solution and the resource allocation efficiency of multi-objective task, and the specific implementation process is as follows:
[0018] S3.1: The search space of the optimization problem is divided into multiple subspaces, and the population of the hierarchical enhanced whale optimization algorithm is divided into multiple subpopulations, each subpopulation independently performs optimization tasks in its subspace;
[0019] S3.2: Each subpopulation obtains its local optimal solution in the corresponding subspace through local search, and the local optimal solution is integrated according to the set fusion rule to gradually approach the global optimal solution;
[0020] S3.3: The hierarchical optimization mechanism enhances the diversity of the hierarchical enhanced whale optimization algorithm through hierarchical population structure, avoids solution degradation caused by premature convergence, and realizes efficient coordination between different resource constraint conditions in multi-objective optimization scenarios.
[0021] Further, in step four, during the search process, the nonlinear contraction factor is dynamically adjusted according to the optimization iteration process, and the adjustment strategy follows the trend of nonlinear decrease or increase to control the balance between global search and local search.
[0022] Further, for resource allocation of Internet of Vehicles, each vehicle collects photographic image data of the surrounding environment through its vehicle-mounted camera, performs semantic analysis and semantic compression, and then unloads the data to an edge computing server for semantic segmentation task through a wireless channel, and returns the result to the vehicle; every certain time, the vehicle performs semantic segmentation task on the original data, and evaluates the returned result of the edge computing server, which is used as the optimization target of adjusting resource intelligent allocation;
[0023] The communication and computing offloading scene of multiple vehicles and multiple tasks is represented as the following optimization problem:
[0024] P1:maxQoS avg
[0025] s.t.C1:
[0026] C2:
[0027] C3:0.4≤C i ≤1
[0028] C4:B i >0
[0029] Optimization variables are B i , B T , and C i ; B i represents the channel bandwidth allocated to vehicle i, B T represents the total bandwidth that can be allocated; represents the maximum bandwidth allowed to be allocated by each vehicle; C i represents the compression rate of the photographic image taken by the vehicle i on-board camera;
[0030] The optimization goal is to maximize the average utility QoS of vehicles in the network avg ;
[0031] The constraint conditions are C1, C2, C3 and C4: C1 represents that under the condition of limited total bandwidth, the channel capacity will be allocated according to the semantic content of each vehicle to maximize the target; the channel bandwidth B i allocated by each vehicle cannot be greater than the total bandwidth B T that can be allocated; C2 represents the limitation of the transmission power p i of a single vehicle, the transmission power p i of a single vehicle is not greater than the maximum bandwidth allowed to be allocated by each vehicle; C3 represents the limitation range of semantic compression rate, for the extracted data, the semantic fidelity is 0 without compression, and the minimum limit is 0.4; C4 represents that the bandwidth allocated by the vehicle at a certain moment is greater than 0, that is, the vehicle always has a certain available bandwidth for data transmission;
[0032] The above optimization problem is solved by using a hierarchical enhanced whale optimization algorithm, which introduces a nonlinear contraction factor and a hierarchical optimization mechanism; the calculation formula of the nonlinear contraction factor is:
[0033]
[0034] Wherein, a(t) represents the nonlinear contraction factor, t represents the current iteration number, and T represents the total iteration number; the size of the search range is controlled by the nonlinear contraction factor a(t);
[0035] In the hierarchical optimization mechanism, if a whale group P contains n whale individuals, the whale group P is divided into m subgroups, and the number of each subgroup is n k =n / m; each subgroup P kLocal optimal solution The calculation formula is:
[0036]
[0037] Wherein, P k represents the kth sub-population, f(X) represents the objective function, and X represents the candidate solution; after the sub-population finds the local optimal solution, it is compared with the global optimal solution, and the position is updated, and the calculation formula is as follows:
[0038]
[0039] Wherein, represents the global optimal solution.
[0040] Further, the size of the photographic image captured by the vehicle-mounted camera at a certain moment is d 0,i , then the size of the photographic image after semantic compression is:
[0041] D i =f(η i ,d 0,i )
[0042] Wherein, f(η i ,d 0,i ) is a nonlinear attenuation function, which represents that the photographic image information decreases with the increase of compression rate; η i represents the compression rate; thus the transmission delay is:
[0043]
[0044] Wherein, d i represents the transmission data size, and R i represents the transmission data rate;
[0045] The data transmission rate of the channel bandwidth allocated to the vehicle i is represented as:
[0046]
[0047] Wherein, S i represents the data transmission rate of vehicle i, P represents the transmission power, and N0 represents the noise power spectral density.
[0048] Further, the calculation formula of the average utility QoS avg of the vehicle in the network is:
[0049]
[0050] Wherein, QoS avgrepresents the average utility of vehicles in the network; N represents the number of vehicles; QoS represents the total utility of the system, i.e., the sum of semantic service quality, which represents the proportion of correctly classified points in the semantic segmentation task compared with the original data;
[0051] The formula for calculating the total utility QoS of the system is:
[0052]
[0053] wherein, for each vehicle allocated resource, the utility quality of offloading tasks is represented by QoS i , the formula for calculating which is:
[0054] QoS i = F η (p i ,B i ,c i )-F2(S i )-F3(S i )
[0055] wherein, p i represents the transmission power of a single vehicle, c i represents the data compression rate of vehicle i, F2(S i ) represents a transmission delay penalty term related to data size, F3(S i ) represents a data computation task amount penalty term related to data size, and F η (p i ,B i ,c i ) represents the utility quality score of offloading tasks under the current communication task, i.e., the semantic segmentation task, wherein the accuracy of compressed data and original data is used as the score.
[0056] Further, if the dimension of a photographic image is m and n, the formula for calculating the semantic service quality score, i.e., the accuracy F, is:
[0057]
[0058] wherein, 1(S comp (i,j),S ori (i,j)) represents that, compared with the original image, if the classification result of a certain pixel of the processed image is consistent with the classification result of the pixel of the original image before processing, 1 is added, and finally the proportion of all correct classifications to the total number of pixels of the image is calculated.
[0059] Further, the specific implementation process of the hierarchical enhanced whale optimization algorithm is as follows:
[0060] Initialize the whale population, randomly generate n positions; set the maximum number of iterations T; divide the whale population P into m sub-populations, start iteration; when the maximum number of iterations is reached, output the final global optimal solution; when the maximum number of iterations is not reached, calculate the nonlinear contraction factor a(t), and calculate the fitness of each whale individual in the sub-population; find the local optimal solution of the sub-population; judge whether the random number p is less than 0.5, if yes, use the hunting behavior to update the position, calculate the new position, pass the boundary check, ensure that the new position is within the search space, update the global optimal solution, and perform the next iteration; if not, use the spiral predation behavior to update the position, calculate the distance from the local optimal solution, calculate the new position based on the distance, pass the boundary check, ensure that the new position is within the search space, update the global optimal solution, and perform the next iteration.
[0061] Further, after updating the position, the new position calculation formula is the hunting behavior calculation formula:
[0062]
[0063] wherein, X represents the current position of whale i; X i represents the position of whale i; a(t) represents a nonlinear contraction factor; represents the current local optimal solution; C1 and C2 are two random numbers for adjusting the size of the whale and the target;
[0064] Further, after updating the position, the new position calculation formula is the spiral predation behavior calculation formula:
[0065]
[0066] wherein, X represents the current position of whale i, and D represents the distance between the whale individual and the local optimal solution, b represents a constant for controlling the spiral contraction; l represents a random number that determines the amplitude of the spiral motion; represents the current local optimal solution.
[0067] The beneficial effects of the present application are:
[0068] The resource allocation method based on meta-heuristic optimization strategy provided by the present application introduces the layer enhanced whale optimization algorithm (Layer Enhanced Whale Optimization Algorithm, LEWOA), increases the nonlinear contraction factor and the hierarchical optimization mechanism on the basis of WOA, improves the global search ability and local development ability of the algorithm, and combines the semantic QoS index to optimize resource allocation, solves the problems of low resource allocation efficiency and poor stability of the existing scheme in the Internet of Vehicles.
[0069] The present application shows significant advantages in optimizing algorithm performance by introducing two innovations: "nonlinear contraction factor" and "hierarchical optimization mechanism".
[0070] 1. Improve the global search ability and convergence speed of the algorithm;
[0071] The introduction of the nonlinear contraction factor significantly enhances the balance between global search and local development of LEWOA. In the early stage of the algorithm, the larger contraction factor enables the whale individuals to explore the search space in a larger range, avoiding the initial search blind area; in the later stage, the contraction factor rapidly decreases, enabling the whale population to focus on fine development near the optimal solution, accelerating the convergence speed. Compared with the traditional linear contraction factor, the nonlinear mechanism of the present application effectively improves the convergence efficiency and can find a better solution in a shorter time.
[0072] 2. Avoid falling into local optimum, improve the diversity and accuracy of the solution;
[0073] The hierarchical optimization mechanism divides the whale population into multiple sub-populations, each of which finds the optimal solution in its local area. This mechanism enhances the diversity of the algorithm and avoids the premature convergence of individuals to a single solution. In addition, the hierarchical optimization mechanism enables the algorithm to combine the local optimal solutions of multiple sub-populations to update the global optimal solution in each iteration, thereby improving the quality and accuracy of the solution. Compared with the traditional global search method, the hierarchical optimization mechanism used in the present application significantly improves the solution performance and stability of the algorithm in complex problems.
[0074] The above two innovations constitute the core of the technical solution of LEWOA. Through the nonlinear contraction factor and the hierarchical optimization mechanism, the algorithm achieves a better balance between global exploration and local development, thereby improving the accuracy and stability of resource allocation and task scheduling. It provides an effective technical solution for solving large-scale multi-dimensional optimization problems, with high practical value and application prospect. BRIEF DESCRIPTION OF DRAWINGS
[0075] Figure 1 For a typical multi-vehicle, multi-task edge computing offloading scenario.
[0076] Figure 2 For a hierarchical enhanced whale optimization flowchart. DETAILED DESCRIPTION
[0077] The present application will be further described in detail below in conjunction with the drawings.
[0078] The resource allocation method based on meta-heuristic optimization strategy provided by the present application mainly includes the following steps:
[0079] Step one, a resource allocation optimization model suitable for a wireless network environment is constructed, which considers resource constraints including network bandwidth, device power and device task priority in a multi-device, multi-task communication and computing offloading scenario, and aims to optimize network performance indicators;
[0080] Step two, in the resource allocation optimization model, a target function is set to maximize network utility; the target function combines the semantic information of device tasks in the network, and can perform semantic-driven priority allocation of resources;
[0081] Step three, an improved meta-heuristic optimization strategy, i.e., a hierarchical enhanced whale optimization algorithm, is designed for the optimization problem; the meta-heuristic optimization strategy combines a hierarchical optimization mechanism of global search and local search, refines the problem space through a hierarchical structure, and gradually optimizes the quality of the solution;
[0082] Step four, a nonlinear contraction factor is introduced to adjust the search range and search direction, and the nonlinear contraction factor adjusts the search intensity according to a dynamic nonlinear adjustment mechanism, so that the hierarchical enhanced whale optimization algorithm focuses on global search in the initial stage and focuses on local precise search in the later stage;
[0083] In the search process, the nonlinear contraction factor is dynamically adjusted according to the optimization iteration process, and the adjustment strategy follows a nonlinear decreasing or increasing trend to control the balance between global search and local search;
[0084] The nonlinear contraction factor introduced in the application has the following characteristics:
[0085] 1. In the search process of the hierarchical enhanced whale optimization algorithm, the nonlinear contraction factor is dynamically adjusted according to the optimization iteration process, and the adjustment of the nonlinear contraction factor follows a nonlinear decreasing or increasing trend, thereby effectively controlling the balance between global search and local search;
[0086] 2. The dynamic nonlinear adjustment mechanism increases the initial search range to improve the exploration ability, and gradually shrinks the range in the later stage to focus on the precise optimization of the solution;
[0087] 3. The dynamic nonlinear adjustment mechanism can adapt to the semantic needs of different tasks, improve optimization efficiency through dynamic adjustment of optimization iterations, and avoid falling into local optimum.
[0088] Step five, the optimization problem is decomposed into multiple sub-problems, the local optimal solutions are obtained by solving the multiple sub-problems respectively, and the local optimal solutions are globally integrated based on the hierarchical optimization mechanism to finally obtain the global optimal solution;
[0089] Step 6: In the actual application of wireless resource allocation, the meta-heuristic optimization strategy is used to dynamically adjust network resources to ensure comprehensive improvement of resource utilization efficiency and service quality in a multi-device high-competition environment.
[0090] Furthermore, in step 3, the improved meta-heuristic optimization strategy adopts a hierarchical optimization mechanism to enhance the global solution exploration capability and resource allocation efficiency of multi-objective tasks. The specific implementation process is as follows:
[0091] S3.1: Divide the search space of the optimization problem into multiple subspaces, and divide the population of the hierarchical enhanced whale optimization algorithm into multiple subpopulations, each of which performs the optimization task independently in its subspace;
[0092] S3.2: Each subpopulation obtains the local optimal solution of its corresponding subspace through local search. The local optimal solutions are integrated according to the set fusion rules to gradually approach the global optimal solution;
[0093] S3.3: The hierarchical optimization mechanism enhances the diversity of the whale optimization algorithm through a hierarchical group structure, avoids solution degradation due to premature convergence, and achieves efficient coordination between different resource constraints in multi-objective optimization scenarios.
[0094] See also Figure 1 and Figure 2 To illustrate, the present invention provides a resource allocation method based on a meta-heuristic optimization strategy, and its specific implementation process is as follows:
[0095] 1. Determine the optimization goal of intelligent resource allocation;
[0096] Consider a typical multi-vehicle, multi-task edge computing offloading scenario, such as Figure 1 As shown, each vehicle collects data about its surroundings through its onboard camera and offloads this data to an edge computing server (MEC Server) via a wireless channel for processing. In this scenario, the vehicle's computing power is limited. The vehicle performs object detection on the collected photographic image data, detecting important road semantic components, including pedestrians, cars, trucks, and other elements. After semantic analysis and semantic compression, the photographic image data is sent to the edge computing server for semantic segmentation, and the results are returned to the vehicle. At regular intervals, the vehicle performs semantic segmentation on the original data and evaluates the results returned by the edge computing server. This return result can be used as an optimization target for adjusting intelligent resource allocation.
[0097] 2. Data transmission between vehicles and edge computing servers;
[0098] On the road area where the certain edge computing server is loaded, the data collected by the vehicle-mounted camera is transmitted to the edge computing server via a channel with limited total bandwidth. In the road environment, the total bandwidth of the channel used by the edge computing server is B total If there are N vehicles that need to upload the collected photographic image data via the channel, the total bandwidth of the channel satisfies:
[0099]
[0100] Wherein, B i represents the channel bandwidth allocated to vehicle i, B T represents the total bandwidth that can be allocated.
[0101] For the allocated channel bandwidth, the data transmission rate can be represented as:
[0102]
[0103] Wherein, S i represents the data transmission rate of vehicle i, P represents the transmission power, and N0 represents the noise power spectral density.
[0104] 3. Semantic analysis and semantic compression;
[0105] In the actual scene, the size of the photographic image captured by the vehicle-mounted camera at a certain moment is d 0,i After semantic compression, the compression rate is η i , and the size of the photographic image after semantic compression is:
[0106] D i =f(η i ,d 0,i )
[0107] Wherein, f(η i ,d 0,i ) is a nonlinear decay function, which represents that the photographic image information decreases with the increase of the compression rate. Thus, the transmission delay is:
[0108]
[0109] Wherein, d i represents the transmission data size, and R i represents the transmission data rate.
[0110] 4. Calculate the semantic quality of service score and the average utility of vehicles in the network;
[0111] At a certain moment, the total utility of the system is represented by QoS, and the mathematical expression is as follows:
[0112]
[0113] where for each vehicle assigned resource, the utility quality of offloading task is denoted by QoS i , whose specific calculation formula is as follows:
[0114] QoS i = F η (p i ,B i ,c i )-F2(S i )-F3(S i )
[0115] where p i denotes the single vehicle transmission power, c i denotes the data compression rate of vehicle i, F2(S i ) denotes the transmission delay penalty term related to data size, F3(S i ) denotes the data computation task quantity penalty term related to data size, and F η (p i ,B i ,c i ) denotes the utility quality score of offloading task under the current communication task, i.e., semantic segmentation task, where the accuracy of compressed data and original data is used as the score. If the dimension of a photographic image is m and n, the specific calculation formula of semantic service quality score (classification consistency), i.e., accuracy F, is as follows:
[0116]
[0117] The formula of the above accuracy F represents the correctness of the semantic segmentation task.
[0118] where 1(S comp (i,j),S ori (i,j)) denotes that if the classification result of a certain pixel of the processed image is consistent with the classification result of the pixel of the original image before processing, 1 is added, and finally the proportion of all correct classifications to the total number of image pixels is calculated.
[0119] Finally, the total utility of the system is the average utility of all vehicle semantic segmentation tasks. Since the system contains multiple vehicles, the optimization goal is to maximize the average utility of the vehicles in the network, and the specific calculation formula is as follows:
[0120]
[0121] where QoS avg denotes the average utility of the vehicles in the network; and N denotes the number of vehicles.
[0122] 5. Determine the optimization problem;
[0123] The overall system bandwidth is limited, and a trade-off needs to be made between the bandwidth, the transmission power of each vehicle, and the compression rate of the photographic images captured by the vehicle's onboard camera. Therefore, the above scenario can be expressed as the following optimization problem:
[0124] P1:maxQoS avg
[0125] stC1:
[0126] C2:
[0127] C3:0.4≤C i ≤1
[0128] C4:B i >0
[0129] (1) The optimization variable is B i 、B T 、 and C i Among them, B i represents the channel bandwidth allocated to vehicle i, B T Indicates the total bandwidth that can be allocated; represents the maximum bandwidth allowed to be allocated to each vehicle; C i Indicates the compression rate of the photographic image captured by the onboard camera of vehicle i.
[0130] (2) The optimization goal is to maximize the average utility QoS of vehicles in the network avg ; Among them, QoS represents the total utility of the system, that is, the sum of semantic service quality, which represents the proportion of correctly classified points in the semantic segmentation task compared with the original data.
[0131] (3) The constraints are C1, C2, C3, and C4: C1 means that under the condition of limited total bandwidth, the channel capacity will be allocated according to the semantic content of each vehicle to maximize the goal; among them, the channel bandwidth B allocated to each vehicle is i Cannot be greater than the total allocatable bandwidth B T ; C2 represents the transmission power p of a single vehicle i The limit of a single vehicle is the transmission power p i Not greater than the maximum bandwidth allowed to be allocated to each vehicle; C3 represents the limit range of the semantic compression rate. For the extracted data, if no compression is performed, the semantic fidelity is 0, and the minimum limit is 0.4; C4 indicates that the bandwidth allocated to the vehicle at a certain moment is greater than 0, that is, the vehicle always has a certain amount of available bandwidth for data transmission.
[0132] 6. Analysis and improvement of the original Whale Optimization Algorithm (WOA);
[0133] (1) Analyze the original whale optimization algorithm;
[0134] The whale optimization algorithm is a meta-heuristic swarm optimization algorithm. The whale optimization algorithm simulates the behavior of whales in capturing prey by generating bubble nets. In the algorithm design, the behavior of whales in capturing prey is modeled as three main mechanisms: surrounding the prey, spiral predation, and random search for prey. The bubble net attack mechanism of the whale optimization algorithm gives it a strong local search capability, so it exhibits a faster convergence speed when processing simple benchmark functions. However, the global search capability of the whale optimization algorithm is weak, and its performance in multi-peak test functions is poor. It is easy to fall into local optimality and cannot solve complex nonlinear constrained optimization problems well. Therefore, the present invention introduces the Layer Enhanced Whale Optimization Algorithm (LEWOA), which improves the global and local exploration capabilities of the algorithm at different stages by improving the nonlinear shrinkage factor and the hierarchical optimization mechanism.
[0135] Specifically, in the original whale optimization algorithm, the herding behavior is expressed by the following formula:
[0136]
[0137] in, represents the current position of whale i, X best Represents the global optimal solution under the current whale position state; represents the position of whale individual i at the tth iteration; C represents a random vector with all components in [0,2]; A represents a coefficient vector that controls the whale's search range. Its specific calculation formula is as follows:
[0138] A=2a·ra
[0139] Among them, a is a variable that decreases with the number of iterations t (usually large at the beginning and gradually decreases to 0), which is used to control the search range. a decays linearly with the number of iterations, and r is a random number between 0 and 1.
[0140] The spiral predation behavior is expressed by the following formula:
[0141]
[0142] Where D = |X best -X i |, D represents the distance between the individual whale and the local optimal solution, X iwhere X denotes the position of whale i, b denotes a constant, and l denotes a random number, b and l are used to control the shape and distance of the spiral trajectory.
[0143] To increase the exploration breadth, a certain probability of whale group will perform a random search process, which can be expressed by the following formula:
[0144]
[0145] where X rand denotes the position of the whale. By randomly selecting a whale position X rand to update the whale position in the next round of iteration, ensuring that the algorithm can jump out of the local optimal solution in the global search stage.
[0146] Through the above analysis, it can be seen that the original whale optimization algorithm often has the defect of premature convergence to local optimal solution in practice, which increases the complexity of finding the global optimal solution. The linear contraction factor makes the algorithm have limited global exploration ability in the early stage, and the global unified position update strategy ignores individual diversity, making it difficult to adjust the search intensity according to different regions of the problem, so it is necessary to improve the original whale optimization algorithm.
[0147] (2) Improving the original whale optimization algorithm;
[0148] 1) Nonlinear contraction factor;
[0149] The linear contraction factor a of the original whale optimization algorithm controls the speed of the whale individual approaching the global optimal solution, which decreases with the number of iterations. In the improved LEWOA, a nonlinear contraction factor is introduced to enhance the global search and local development ability of the algorithm. Unlike the linearly decreasing contraction factor in the original whale optimization algorithm, the nonlinear contraction factor in LEWOA is dynamically adjusted during the iteration process, showing nonlinear change. In the early stage of search, the value of the nonlinear contraction factor is larger, so that the whale individual can search widely in the solution space, which helps to explore more regions and increase the chance of finding the global optimal solution. In the later stage of iteration, the nonlinear contraction factor decreases at a faster rate, so that the whale group gradually shrinks to the region near the global optimal solution, thereby focusing on local fine development. This nonlinear contraction mechanism effectively balances exploration and development, making LEWOA have stronger global convergence ability and local search precision when solving complex optimization problems.
[0150] Specifically, in the improved LEWOA, the linear contraction factor a is updated as follows:
[0151]
[0152] where a(t) represents a nonlinear shrinkage factor, t represents the current iteration number, and T represents the total iteration number. In the early stage of the search, i.e., when the current iteration number t is small, the value of the nonlinear shrinkage factor a(t) is close to 2, and the whale group can perform a larger range of search, which is beneficial to explore more areas of the solution space; in the later stage of the search, the nonlinear shrinkage factor a(t) rapidly decreases in an exponential manner, and the whale group focuses on the local development near the global optimal solution.
[0153] 2) Hierarchical optimization mechanism;
[0154] In order to avoid falling into a local optimum too early, the hierarchical optimization mechanism divides the whale group into multiple subgroups, in each subgroup, the whale individuals can perform more detailed search in a local range, and the local optimum is compared with the global optimum and updated, thereby improving the overall search efficiency of the algorithm and avoiding falling into a local optimum in the early stage of group search. The principle of the hierarchical optimization mechanism is as follows:
[0155] If a whale group P contains n whale individuals, the algorithm divides the whale group P into m subgroups, and the number of individuals in each subgroup is n k = n / m. The local optimal solution k of each subgroup P is expressed by the following formula:
[0156]
[0157] where P k represents the kth subgroup, f(X) represents the objective function, and X represents the candidate solution. After the subgroup finds the local optimal solution, the local optimal solution is compared with the global optimal solution, and the position is updated, and the specific calculation formula is as follows:
[0158]
[0159] where represents the global optimal solution.
[0160] After the position is updated, the new position calculation formula is as follows:
[0161] 1. Herding behavior:
[0162]
[0163] where X i represents the position of the whale i, represents the current local optimal solution, C1 and C2 are two random numbers for adjusting the size of the whale and the target; and the nonlinear shrinkage factor a(t) is used to control the size of the search range.
[0164] 2. Spiral predation behavior:
[0165]
[0166] wherein, b represents a constant that controls the spiral contraction, and l represents a random number that determines the amplitude of the spiral movement. The spiral predation behavior further improves the accuracy of local development by causing the individuals to perform a spiral movement of contraction around the local optimal solution.
[0167] As Figure 2 shown in the figure, the specific implementation process of the hierarchical enhanced whale optimization algorithm is as follows:
[0168] Initialize the whale population, randomly generate n positions; set the maximum number of iterations T; divide the whale population P into m sub-populations, and start iteration; when the maximum number of iterations is reached, output the final global optimal solution; when the maximum number of iterations is not reached, calculate the nonlinear contraction factor a(t), and calculate the fitness of each whale individual in the sub-population; find the local optimal solution of the sub-population; judge whether the random number p is less than 0.5, if yes, use the herding behavior to update the position, calculate the new position, pass the boundary check to ensure that the new position is within the search space, update the global optimal solution, and perform the next iteration; if not, use the spiral predation behavior to update the position, calculate the distance from the local optimal solution, calculate the new position based on the distance, pass the boundary check to ensure that the new position is within the search space, update the global optimal solution, and perform the next iteration.
[0169] In the traditional whale optimization algorithm, the contraction factor is linearly decreasing, which limits the global search ability in the early stage and the local development accuracy in the later stage. The present application adopts a nonlinear contraction factor, which makes the contraction factor change with the number of iterations in an exponential decay manner. In the early stage of iteration, the contraction factor remains at a high value, ensuring that the whale individuals can explore in a larger search space, thereby improving the global search ability; while in the later stage of iteration, the contraction factor rapidly decreases, allowing the whale individuals to focus on the area near the current optimal solution for fine development, thereby improving the accuracy of local search. The introduction of the nonlinear contraction factor effectively enhances the search efficiency of LEWOA at different stages, significantly improving the global convergence ability of the algorithm.
[0170] The present application introduces a hierarchical optimization mechanism, which divides the whale population into multiple sub-populations, each of which performs independent optimization in its own local area to find a local optimal solution. The local optimal solution of each sub-population is then used to update the global optimal solution. The hierarchical optimization mechanism ensures the global optimal solution while increasing the diversity of the algorithm, effectively avoiding premature convergence to a local optimum. Through this multi-level optimization structure, LEWOA can more evenly allocate search resources between the global and local areas, achieving more efficient resource scheduling and faster convergence speed.
[0171] The above merely describes the preferred embodiments of the present application, and it should be pointed out that, for those skilled in the art, several improvements and refinements can be made without departing from the principles of the present application, and these improvements and refinements should also be considered as falling within the protection scope of the present application.
Claims
1. A resource allocation method based on meta-heuristic optimization strategy, characterized in that: The following steps are involved: Step 1: Build a resource allocation optimization model suitable for wireless network environments. This resource allocation optimization model targets multi-device, multi-task communication and computation offload scenarios, comprehensively considers resource constraints including network bandwidth, device power, and device task priority, and aims to optimize network performance indicators. Step 2: In the resource allocation optimization model, an objective function is set to maximize network utility; The objective function combines the semantic information of device tasks in the network and can perform semantically driven priority allocation of resources; Step 3: Design an improved meta-inspired optimization strategy, namely the hierarchical enhanced whale optimization algorithm, for the optimization problem. The meta-inspired optimization strategy combines a hierarchical optimization mechanism of global search and local search, refines the problem space through a hierarchical structure, and gradually optimizes the quality of the solution. Step 4: Introduce a nonlinear shrinkage factor to adjust the search range and search direction. The nonlinear shrinkage factor adjusts the search intensity according to the dynamic nonlinear adjustment mechanism, so that the hierarchical enhanced whale optimization algorithm focuses on global search in the initial stage and focuses on local precise search in the later stage. Step 5: Decompose the optimization problem into multiple sub-problems, solve each of the sub-problems separately to obtain the local optimal solution, and then globally integrate the local optimal solutions based on the hierarchical optimization mechanism to finally obtain the global optimal solution. Step 6: In the actual application of wireless resource allocation, the meta-heuristic optimization strategy is used to dynamically adjust network resources to ensure that resource utilization efficiency and service quality are fully improved in a multi-device high-competition environment.
2. The resource allocation method based on meta-heuristic optimization strategy according to claim 1, characterized in that: The specific implementation process of step three is as follows: S3.1: The search space of the optimization problem is divided into multiple subspaces, and the population of the hierarchical enhanced whale optimization algorithm is divided into multiple subpopulations, each of which performs the optimization task independently in its subspace; S3.2: Each subpopulation obtains the local optimal solution of its corresponding subspace through local search. The local optimal solutions are integrated according to the set fusion rules to gradually approach the global optimal solution; S3.3: The hierarchical optimization mechanism enhances the diversity of the whale optimization algorithm through a hierarchical group structure, avoids solution degradation due to premature convergence, and achieves efficient coordination between different resource constraints in multi-objective optimization scenarios.
3. The resource allocation method based on meta-heuristic optimization strategy according to claim 1, characterized in that: In step 4, during the search process, the nonlinear shrinkage factor is dynamically adjusted according to the optimization iteration process, and its adjustment strategy follows a nonlinear decreasing or increasing trend to control the balance between global search and local search.
4. The resource allocation method based on meta-heuristic optimization strategy according to claim 1, characterized in that: For IoV resource allocation, each vehicle uses its onboard camera to collect photographic image data of its surroundings. After semantic analysis and compression, the data is offloaded via a wireless channel to an edge computing server for semantic segmentation, with the results returned to the vehicle. At regular intervals, the vehicle performs semantic segmentation on the original data and evaluates the results returned by the edge computing server. This result serves as the optimization target for adjusting intelligent resource allocation. The multi-vehicle, multi-task communication and computation offloading scenario is formulated as the following optimization problem: The optimization variable is B i 、B T 、 and C i ; B i represents the channel bandwidth allocated to vehicle i, B T Indicates the total bandwidth that can be allocated; represents the maximum bandwidth allowed to be allocated to each vehicle; C i Indicates the compression rate of the photographic image captured by the onboard camera of vehicle i; The optimization goal is to maximize the average utility QoS of vehicles in the network avg ; The constraints are C1, C2, C3 and C4: C1 means that under the condition of limited total bandwidth, the channel capacity will be allocated according to the semantic content of each vehicle to maximize the goal; the channel bandwidth B allocated to each vehicle i Cannot be greater than the total allocatable bandwidth B T ; C2 represents the transmission power p of a single vehicle i The limit of a single vehicle is the transmission power p i Not greater than the maximum bandwidth allowed to be allocated to each vehicle; C3 represents the limit range of semantic compression rate. For the extracted data, if no compression is performed, the semantic fidelity is 0, and the minimum limit is 0.
4. C4 indicates that the bandwidth allocated to the vehicle at a certain moment is greater than 0, that is, the vehicle always has a certain amount of available bandwidth for data transmission. The above optimization problem is solved using the hierarchical enhancement whale optimization algorithm, which introduces a nonlinear shrinkage factor and a hierarchical optimization mechanism. The calculation formula of the nonlinear shrinkage factor is: Where a(t) represents the nonlinear shrinkage factor, t represents the current number of iterations, and T represents the total number of iterations. The size of the search range is controlled by the nonlinear shrinkage factor a(t). In the hierarchical optimization mechanism, if a whale group P contains n whale individuals, the whale group P is divided into m sub-groups, and the number of each sub-group is n k =n / m; each subgroup P k The local optimal solution of The calculation formula is: Among them, P k represents the kth subpopulation, f(X) represents the objective function, and X represents the candidate solution. After the subpopulation finds the local optimal solution, it compares it with the global optimal solution and updates its position. The calculation formula is as follows: in, represents the global optimal solution.
5. The resource allocation method based on meta-heuristic optimization strategy according to claim 4, characterized in that: The size of the photographic image taken by the vehicle-mounted camera at a certain moment is d 0,i , then the size of the photographic image after semantic compression is: D i =f(η i ,d 0,i ) Among them, f(η i ,d 0,i ) is a nonlinear attenuation function, indicating that the photographic image information decreases as the compression rate increases; η i represents the compression ratio; the transmission delay is obtained as follows: Among them, d i Indicates the size of the transmitted data, R i Indicates the transmission data rate; For the channel bandwidth allocated to vehicle i, its data transmission rate is expressed as: Among them, S i represents the data transmission rate of vehicle i, P represents the transmission power, and N0 represents the noise power spectral density.
6. The resource allocation method based on meta-heuristic optimization strategy according to claim 5, characterized in that: The average utility QoS of vehicles in the network avg The calculation formula is: Among them, QoS avg represents the average utility of vehicles in the network; N represents the number of vehicles; QoS represents the total utility of the system, that is, the sum of the semantic service quality, which represents the proportion of correctly classified points compared with the original data in the semantic segmentation task; The calculation formula of the total utility QoS of the system is: Among them, for each vehicle's allocated resources, the utility quality of the offloading task is determined by QoS i It is expressed as follows: QoS i =F η (p i ,B i ,c i )-F2(S i )-F3(S i ) Among them, p i represents the transmission power of a single vehicle, c i represents the data compression rate of vehicle i, F2(S i ) represents the transmission delay penalty term related to the data size, F3(S i ) represents the penalty term for data computation task related to data size, F η (p i ,B i ,c i ) represents the utility quality score of the offloaded task under the current communication task, i.e., the semantic segmentation task. Here, the accuracy of the compressed data and the original data are used as the score.
7. The resource allocation method based on meta-heuristic optimization strategy according to claim 6, characterized in that: If the dimensions of a photographic image are m and n, the formula for calculating the semantic service quality score, i.e., the accuracy rate F, is: Among them, 1(S comp (i,j),S ori (i, j)) indicates that when the processed image is compared with the original image, if the classification result of a certain pixel in the processed image is consistent with the classification result of the pixel in the original image before processing, then 1 is added. Finally, the proportion of all correct classifications to the total number of pixels in the image is calculated.
8. The resource allocation method based on meta-heuristic optimization strategy according to claim 1, characterized in that: The specific implementation process of the hierarchical enhancement whale optimization algorithm is as follows: Initialize the whale population and randomly generate n positions; set the maximum number of iterations T; divide the whale population P into m sub-populations and start iteration; when the maximum number of iterations is reached, output the final global optimal solution; when the maximum number of iterations is not reached, calculate the nonlinear shrinkage factor a(t) and calculate the fitness of each whale individual in the sub-population; find the local optimal solution of the sub-population; determine whether the random number p is less than 0.
5. If so, use the encirclement behavior to update the position and calculate the new position. Through boundary checking, ensure that the new position is within the search space, update the global optimal solution, and proceed to the next iteration; if not, use the spiral predation behavior to update the position, calculate the distance to the local optimal solution, calculate the new position based on the distance, through boundary checking, ensure that the new position is within the search space, update the global optimal solution, and proceed to the next iteration.
9. The resource allocation method based on meta-heuristic optimization strategy according to claim 8, characterized in that: After the position is updated, the new position calculation formula is the roundup behavior calculation formula: in, Indicates the current position of whale i; X i represents the position of whale i; a(t) represents the nonlinear shrinkage factor; represents the current local optimal solution; C1 and C2 are two random numbers used to adjust the size of the whale and the target.
10. The resource allocation method based on meta-heuristic optimization strategy according to claim 8, characterized in that: After the position is updated, the new position calculation formula is the spiral predation behavior calculation formula: in, represents the current position of whale i, D represents the distance between the individual whale and the local optimal solution, b represents a constant that controls the contraction of the spiral; l represents a random number that determines the amplitude of the spiral movement; Represents the current local optimal solution.