Resource allocation method based on meta-heuristic optimization strategy
By introducing nonlinear shrinkage factor and hierarchical optimization mechanism into the whale optimization algorithm, the global search and local development capabilities of the resource allocation method are improved, and the problems of low resource allocation efficiency and poor stability in the Internet of Vehicles environment are solved, and more efficient and stable resource allocation is achieved.
Patent Information
- Application Number
- CN202411814389.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-04-01
- Estimated Expiration
- 2044-12-11
AI Technical Summary
In the Internet of Vehicles environment, the existing resource allocation methods have problems such as limited global search capabilities, high computing complexity and insufficient local search capabilities, resulting in low resource allocation efficiency and poor stability, making it difficult to meet the real-time and dynamic changes in complex scenarios.
A resource allocation method based on hierarchical enhancement whale optimization algorithm (LEWOA) is proposed. By introducing nonlinear shrinkage factors and hierarchical optimization mechanisms, the algorithm's global search ability and local development ability are improved, and resource allocation is optimized in combination with semantic QoS indicators.
It improves the efficiency and stability of resource allocation, avoids the risk of falling into local optimality, significantly improves the algorithm's solution performance and stability in complex problems, and can find better resource allocation solutions faster.
Smart Images

Figure CN119743798A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of wireless communications, and in particular relates to a resource allocation method based on a meta-heuristic optimization strategy. Background Art
[0002] With the development of the Internet of Vehicles (IoV) and the popularization of applications such as intelligent driving and autonomous driving, the demand for data communication and computing between vehicles has increased significantly. Vehicles in the IoV collect information about the surrounding environment through on-board sensors and perform task processing, such as target detection and semantic segmentation. These tasks place high demands on computing power and communication bandwidth. However, due to the limited computing resources of on-board equipment, it is impossible to independently process complex computing tasks. Therefore, computational offloading technology has been widely used to transfer some computing tasks to edge computing servers or the cloud for processing, so as to reduce the burden on on-board equipment and improve system response speed. The introduction of mobile edge computing (MEC) allows computing resources to be sunk to the edge of the network close to users, further enhancing the processing power of computing tasks and reducing latency and energy consumption.
[0003] In this context, how to allocate resources with limited communication and computing resources to ensure 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) models for modeling. This type of problem is NP-hard and difficult to solve in a complex environment. Existing studies have explored resource allocation methods based on global optimization algorithms and heuristic algorithms. Among them, the global optimization algorithm can find the global optimal solution in a large solution space, but the computational complexity is high and it is difficult to meet the real-time requirements of the Internet of Vehicles. Heuristic algorithms such as local search and iterative optimization reduce the computational complexity to a certain extent, but may fall into local optimality.
[0004] Among metaheuristic algorithms, the Whale Optimization Algorithm (WOA) is an algorithm based on the predation behavior of whales. It performs well in solving complex optimization problems with its simplicity and adaptability. When using WOA for communication resource allocation, WOA implements three main search mechanisms by simulating the behavior of whales encircling their prey, namely, shrinking encirclement, spiral predation, and random search. However, WOA is prone to fall into local optimality in multi-peak optimization problems, and its global search ability is weak, especially in resource allocation problems with complex nonlinear constraints. Some studies have attempted to apply WOA to MEC and Internet of Vehicles, such as optimizing resource scheduling in cloud computing or 5G communication environments. However, these methods fail to fully consider the semantic QoS indicators in the resource allocation process, and in complex multi-vehicle scenarios, the local search ability and convergence speed of WOA are still insufficient, which limits its practical application in Internet of Vehicles environments.
[0005] In summary, in the Internet of Vehicles environment, the existing resource allocation methods have the following technical disadvantages:
[0006] 1. Limited global search capabilities: Existing metaheuristic algorithms, such as the Whale Optimization Algorithm (WOA), have limited capabilities in global search and local development. Especially when dealing with multi-modal optimization problems and complex nonlinear constraints, WOA is prone to fall into local optimality, resulting in resource allocation results that cannot reach the global optimal solution, thereby reducing the overall performance of the system.
[0007] 2. High computational complexity: Although the resource allocation method based on the global optimization algorithm can provide a global optimal solution, its computational complexity is high and it is not suitable for the Internet of Vehicles environment that requires real-time response. Since the tasks in the Internet of Vehicles usually have high latency requirements, high computational complexity will increase the calculation time and slow down the system response speed. Summary of the invention
[0008] The purpose of the present invention is to perform efficient communication resource allocation and dynamic task offloading in a vehicle networking environment with limited bandwidth and computing resources to maximize the semantic service quality (Quality of Service, QoS) in multi-vehicle and multi-task scenarios. 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 in computing and communication resource allocation, and the system is prone to problems such as high latency and poor stability. Traditional optimization methods are insufficient in global search and local development capabilities, and are prone to falling into local optimality, making it difficult to meet the real-time and dynamic change requirements in complex scenarios. Therefore, the present invention proposes a vehicle networking resource allocation method based on a layered enhanced whale optimization algorithm (LEWOA), which aims to improve resource allocation efficiency, enhance system stability, and optimize the semantic service quality during transmission to meet the resource scheduling requirements under multi-user and high concurrency conditions in the vehicle networking.
[0009] The technical solution adopted by the present invention to solve the technical problem is as follows:
[0010] The present invention provides a resource allocation method based on a meta-heuristic optimization strategy, which mainly includes the following steps:
[0011] Step 1: Build a resource allocation optimization model suitable for wireless network environments. This resource allocation optimization model targets multi-device and multi-task communication and computing offloading scenarios, comprehensively considers resource constraints including network bandwidth, device power, and device task priority, and aims to optimize network performance indicators.
[0012] 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;
[0013] Step 3: Design an improved meta-inspired optimization strategy, namely, hierarchical enhanced whale optimization algorithm, for the optimization problem; the meta-inspired optimization strategy combines the 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 4: Introduce a nonlinear shrinkage factor to adjust the search range and search direction. The nonlinear shrinkage 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.
[0015] Step 5: Decompose the optimization problem into multiple sub-problems, solve the multiple sub-problems separately to obtain the local optimal solution, and globally integrate the local optimal solutions based on the hierarchical optimization mechanism to finally obtain the global optimal solution;
[0016] 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.
[0017] Furthermore, in step 3, the improved meta-heuristic optimization strategy adopts a hierarchical optimization mechanism to improve the exploration capability of the global solution and the resource allocation efficiency of the multi-objective tasks. The specific implementation process is as follows:
[0018] S3.1: The search space of the optimization problem is divided into multiple subspaces, and the group of the hierarchical enhanced whale optimization algorithm is divided into multiple subgroups, each subgroup independently performs the optimization task in its subspace;
[0019] S3.2: Each subgroup obtains the local optimal solution of its 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 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.
[0021] Furthermore, 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.
[0022] Furthermore, for the allocation of Internet of Vehicles resources, each vehicle collects photographic image data of the surrounding environment through its on-board camera, and after semantic analysis and semantic compression, it is unloaded to the edge computing server through a wireless channel for semantic segmentation tasks, and the results are returned to the vehicle; at regular intervals, the vehicle performs semantic segmentation tasks on the original data and evaluates the return results of the edge computing server, which are used as the optimization target for adjusting the intelligent allocation of resources;
[0023] The multi-vehicle, multi-task communication and computation offloading scenario is formulated as the following optimization problem:
[0024] P1:maxQoS avg
[0025] stC1:
[0026] C2:
[0027] C3:0.4≤C i ≤1
[0028] C4:B i >0
[0029] 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 taken by the onboard camera of vehicle i;
[0030] The optimization goal is to maximize the average utility QoS of vehicles in the network avg ;
[0031] 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 to transmit 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 represents 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;
[0032] The above optimization problem is solved by 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:
[0033]
[0034] 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).
[0035] 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 kThe local optimal solution The calculation formula is:
[0036]
[0037] Among them, 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, it compares it with the global optimal solution and updates the position. The calculation formula is as follows:
[0038]
[0039] in, represents the global optimal solution.
[0040] Furthermore, 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] 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:
[0043]
[0044] Among them, d i Indicates the size of the transmitted data, R i Indicates the transmission data rate;
[0045] For the channel bandwidth allocated to vehicle i, its data transmission rate is expressed as:
[0046]
[0047] 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.
[0048] Furthermore, the average utility QoS of the vehicles in the network avg The calculation formula is:
[0049]
[0050] Among them, QoS avgrepresents 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;
[0051] The calculation formula of the total utility QoS of the system is:
[0052]
[0053] Among them, for each vehicle’s allocated resources, the utility quality of the offloading task is determined by QoS i It means that the calculation formula is:
[0054] QoS i =F η (p i ,B i ,c i )-F2(S i )-F3(S i )
[0055] 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 data computing task penalty related to the 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 is used as the score.
[0056] Furthermore, if the dimensions of a photographic image are m and n, the calculation formula for the semantic service quality score, i.e., the accuracy rate F, is:
[0057]
[0058] 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, and finally the proportion of all correct classifications to the total number of pixels in the image is calculated.
[0059] Furthermore, the specific implementation process of the hierarchical enhancement whale optimization algorithm is as follows:
[0060] 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.
[0061] Furthermore, after the position is updated, the new position calculation formula is the roundup behavior calculation formula:
[0062]
[0063] 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;
[0064] Furthermore, after the position is updated, the new position calculation formula is the spiral predation behavior calculation formula:
[0065]
[0066] 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.
[0067] The beneficial effects of the present invention are:
[0068] The present invention provides a resource allocation method based on meta-heuristic optimization strategy, which introduces a layer enhanced whale optimization algorithm (LEWOA), adds a nonlinear shrinkage factor and a hierarchical optimization mechanism on the basis of WOA, improves the global search ability and local development ability of the algorithm, and optimizes resource allocation in combination with semantic QoS indicators, thereby solving the problems of low resource allocation efficiency and poor stability of existing solutions in the Internet of Vehicles.
[0069] The present invention shows significant advantages in optimizing algorithm performance by introducing two innovative points: "nonlinear shrinkage factor" and "layered optimization mechanism":
[0070] 1. Improve the algorithm's global search capability and convergence speed;
[0071] The introduction of nonlinear shrinkage factors significantly enhances the balance between global search and local development in LEWOA. In the early stages of the algorithm, a larger shrinkage factor enables individual whales to explore the search space in a larger range, avoiding the initial search blind spot; in the later stages, the shrinkage factor decreases rapidly, allowing the whale group to focus on the fine development near the optimal solution, accelerating the convergence speed. Compared with the traditional linear shrinkage factor, the nonlinear mechanism of the present invention effectively improves the convergence efficiency and can find a better solution in a shorter time.
[0072] 2. Avoid falling into local optimality and improve the diversity and accuracy of solutions;
[0073] The hierarchical optimization mechanism divides the whale population into multiple subgroups, each of which searches for the optimal solution in its local area. This mechanism enhances the diversity of the algorithm and prevents individuals from focusing on a single solution and falling into local optimality too early. In addition, the hierarchical optimization mechanism enables the algorithm to update the global optimal solution by combining the local optimal solutions of multiple subgroups in each iteration, thereby improving the quality and accuracy of the solution. Compared with the traditional global search method, the hierarchical optimization mechanism adopted by the present invention significantly improves the algorithm's solution performance and stability in complex problems.
[0074] The above two innovations together constitute the core of LEWOA's technical solution. Through nonlinear shrinkage factors and hierarchical optimization mechanisms, the algorithm achieves a better balance between global exploration and local development, thereby improving the accuracy and stability of resource allocation and task scheduling, and providing an effective technical solution for solving large-scale multi-dimensional optimization problems. It has high practical value and application prospects. BRIEF DESCRIPTION OF THE DRAWINGS
[0075] Figure 1 This is a typical multi-vehicle, multi-task edge computing offloading scenario.
[0076] Figure 2 Flowchart for hierarchical enhancement of whale optimization. DETAILED DESCRIPTION
[0077] The present invention is further described in detail below in conjunction with the accompanying drawings.
[0078] The present invention provides a resource allocation method based on a meta-heuristic optimization strategy, which mainly includes the following steps:
[0079] Step 1: Build a resource allocation optimization model suitable for wireless network environments. This resource allocation optimization model targets multi-device and multi-task communication and computing offloading scenarios, comprehensively considers resource constraints including network bandwidth, device power, and device task priority, and aims to optimize network performance indicators.
[0080] 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;
[0081] Step 3: Design an improved meta-inspired optimization strategy, namely, hierarchical enhanced whale optimization algorithm, for the optimization problem; the meta-inspired optimization strategy combines the 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 4: Introduce a nonlinear shrinkage factor to adjust the search range and search direction. The nonlinear shrinkage 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] During the search process, the nonlinear shrinkage factor is dynamically adjusted according to the optimization iteration process. Its adjustment strategy follows the trend of nonlinear decreasing or increasing to control the balance between global search and local search.
[0084] The nonlinear shrinkage factor introduced in the present invention has the following characteristics:
[0085] 1. In the search process of the hierarchical enhanced whale optimization algorithm, the nonlinear shrinkage factor is dynamically adjusted according to the optimization iteration process. The adjustment of the nonlinear shrinkage factor follows the trend of nonlinear decrease or increase, thereby effectively controlling the balance between global search and local search;
[0086] 2. Dynamic nonlinear adjustment mechanism improves exploration capability by increasing the initial search range, and gradually shrinks the range in the later stages to focus on the precise optimization of the solution;
[0087] 3. The dynamic nonlinear adjustment mechanism can adapt to the semantic requirements of different tasks, improve the optimization efficiency through dynamic adjustment of optimization iterations, and avoid the algorithm falling into local optimality.
[0088] Step 5: Decompose the optimization problem into multiple sub-problems, solve the multiple sub-problems separately to obtain the local optimal solution, and globally integrate the local optimal solutions 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 that resource utilization efficiency and service quality are fully improved in a multi-device high-competition environment.
[0090] Furthermore, in step 3, the improved meta-heuristic optimization strategy adopts a hierarchical optimization mechanism to improve the exploration capability of the global solution and the resource allocation efficiency of the multi-objective tasks. The specific implementation process is as follows:
[0091] S3.1: The search space of the optimization problem is divided into multiple subspaces, and the group of the hierarchical enhanced whale optimization algorithm is divided into multiple subgroups, each subgroup independently performs the optimization task in its subspace;
[0092] S3.2: Each subgroup obtains the local optimal solution of its 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;
[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 in the figure, each vehicle collects data about the surrounding environment through its on-board camera and unloads the data to the edge computing server (MECServer) through a wireless channel for processing. In this scenario, the computing power of the vehicle is limited. The vehicle performs target detection on the collected photographic image data and can detect 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 return results of the edge computing server, which can be used as an optimization target for adjusting intelligent resource allocation.
[0097] 2. Data transmission between vehicles and edge computing servers;
[0098] On a road in a certain area where an edge computing server is loaded, the data collected by the vehicle 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 , there are N vehicles that need to upload the collected photographic image data through the channel, then the total channel bandwidth satisfies:
[0099]
[0100] Among them, B i represents the channel bandwidth allocated to vehicle i, B T Indicates the total allocatable bandwidth.
[0101] For the allocated channel bandwidth, the data transmission rate can be expressed as:
[0102]
[0103] 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.
[0104] 3. Semantic analysis and semantic compression;
[0105] In the actual scene, the size of the photographic image taken by the vehicle camera at a certain moment is d 0,i , after semantic compression, where the compression rate is η i , then the size of the photographic image after semantic compression is:
[0106] D i =f(η i ,d 0,i )
[0107] Among them, f(η i ,d 0,i ) is a nonlinear attenuation function, indicating that the information of the photographic image decreases as the compression rate increases. From this, the transmission delay can be obtained as:
[0108]
[0109] Among them, d i Indicates the size of the transmitted data, R i Indicates the transmission data rate.
[0110] 4. Calculate the semantic service quality 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 its mathematical expression is as follows:
[0112]
[0113] Among them, for each vehicle’s allocated resources, the utility quality of the offloading task is determined by QoS i The specific calculation formula is as follows:
[0114] QoS i =F η (p i ,B i ,c i )-F2(S i )-F3(S i )
[0115] 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 data computing task penalty related to the data size, F η (p i ,B i ,c i ) represents the utility quality score of the unloading task under the current communication task, i.e., the semantic segmentation task. Here, the accuracy of the compressed data and the original data is used as the score. If the dimensions of a photographic image are m and n, the specific calculation formula of the semantic service quality score (classification consistency), i.e., the accuracy F, is as follows:
[0116]
[0117] The above formula for accuracy F represents the accuracy of the semantic segmentation task.
[0118] 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, and finally the proportion of all correct classifications to the total number of pixels in the image 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. The specific calculation formula is as follows:
[0120]
[0121] Among them, QoS avg represents the average utility of vehicles in the network; N represents 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 a single vehicle, and the compression rate of the photographic images taken by the onboard camera of a single vehicle. 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 taken by the on-board 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 the 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 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 to transmit 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 means 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 to capture prey by generating bubble nets. In the algorithm design, the behavior of whales to capture 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 hunting 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 whose components are in [0,2]; A represents a coefficient vector that controls the whale's search range, and its specific calculation formula is as follows:
[0138] A=2a·ra
[0139] Among them, a represents 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 represents 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 irepresents the position of whale i, b represents a constant, and l represents a random number. b and l are used to control the shape and distance of the spiral trajectory.
[0143] In order to increase the breadth of exploration, the whale group will conduct a random search process with a certain probability. The process can be expressed by the following formula:
[0144]
[0145] Among them, X rand represents the whale position. By randomly selecting a whale position X rand To update the whale position for the next iteration, ensure that the algorithm can jump out of the local optimal solution in the global search phase.
[0146] From the above analysis, we can see that the original whale optimization algorithm often has the defect of converging to the local optimal solution too early in practice, which increases the complexity of finding the global optimal solution; the linear shrinkage factor makes the algorithm's early global exploration ability limited, and the globally unified position update strategy ignores individual diversity, making it difficult to adjust the search intensity according to different areas of the problem. Therefore, the original whale optimization algorithm needs to be improved.
[0147] (2) Improve the original whale optimization algorithm;
[0148] 1) Nonlinear shrinkage factor;
[0149] The linear shrinkage factor a of the original whale optimization algorithm controls the speed at which individual whales approach the global optimal solution, and decreases with the number of iterations. In the improved LEWOA, a nonlinear shrinkage factor is introduced to enhance the algorithm's global search and local development capabilities. Unlike the linearly decreasing shrinkage factor in the original whale optimization algorithm, the nonlinear shrinkage factor in LEWOA is dynamically adjusted with the iteration process and presents a nonlinear change. In the early stages of the search, the value of the nonlinear shrinkage factor is large, which enables individual whales to conduct extensive searches in the solution space, helping to explore more areas and increase the chance of finding the global optimal solution. In the later stages of the iteration, the nonlinear shrinkage factor decreases at a faster rate, causing the whale group to gradually shrink to the area near the global optimal solution, thereby focusing on local fine development. This nonlinear shrinkage mechanism effectively balances exploration and development, giving LEWOA stronger global convergence ability and local search accuracy when solving complex optimization problems.
[0150] Specifically, in the improved LEWOA, the linear shrinkage factor a is updated as follows:
[0151]
[0152] Among them, a(t) represents the nonlinear shrinkage factor, t represents the current number of iterations, and T represents the total number of iterations. In the early stage of the search, when the current number of iterations t is small, the value of the nonlinear shrinkage factor a(t) is close to 2, and the whale group can search a wider range, which is conducive to exploring more areas in the solution space; in the later stage of exploration, the nonlinear shrinkage factor a(t) decreases rapidly at an exponential level, and the whale group focuses on the local area near the global optimal solution for development.
[0153] 2) Layered optimization mechanism;
[0154] In order to avoid falling into the local optimum too early, the hierarchical optimization mechanism divides the whale group into multiple sub-groups. Within each sub-group, individual whales can perform more detailed searches in the local range and compare and update the local optimum with the global optimum, thereby improving the overall search efficiency of the algorithm and avoiding falling into the 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, each with n individuals. k =n / m. Each subgroup P k The local optimal solution It is expressed by the following formula:
[0156]
[0157] Among them, 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, it compares it with the global optimal solution and updates the position. The specific calculation formula is as follows:
[0158]
[0159] in, represents the global optimal solution.
[0160] After updating the position, the new position calculation formula is:
[0161] 1. Encirclement and capture behavior:
[0162]
[0163] Among them, X i represents the position of whale i, represents the current local optimal solution, C1 and C2 are two random numbers used to adjust the size of the whale and the target; the nonlinear shrinkage factor a(t) is used to control the size of the search range.
[0164] 2. Spiral predation behavior:
[0165]
[0166] in, b represents a constant that controls the spiral contraction, and l represents a random number that determines the amplitude of the spiral motion. The spiral predation behavior further improves the accuracy of local development by making individuals perform contraction-type spiral motion around the local optimal solution.
[0167] like Figure 2 As shown in the figure, the specific implementation process of the hierarchical enhancement whale optimization algorithm is as follows:
[0168] 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.
[0169] In the traditional whale optimization algorithm, the shrinkage factor decreases linearly, which limits the global search capability of the algorithm in the early stage and the local development accuracy in the later stage. The present invention adopts a nonlinear shrinkage factor so that the shrinkage factor changes with the number of iterations in an exponential decay manner. In the early stage of iteration, the shrinkage factor maintains a high value to ensure that individual whales can explore in a larger search space, thereby improving the global search capability; in the later stage of iteration, the shrinkage factor decreases rapidly, allowing individual whales to focus on the area near the current optimal solution for refined development, thereby improving the accuracy of local search. The introduction of nonlinear shrinkage factors effectively enhances the search efficiency of LEWOA at different stages and significantly improves the global convergence ability of the algorithm.
[0170] The present invention introduces a hierarchical optimization mechanism, which divides the whale population into multiple subgroups. Each subgroup performs independent optimization in its own local area to find the local optimal solution. The local optimal solution of each subgroup is then used to update the global optimal solution. While ensuring the global optimal solution, the hierarchical optimization mechanism increases the diversity of the algorithm and effectively avoids the algorithm from falling into the local optimum too early. Through this multi-level optimization structure, LEWOA can allocate search resources more evenly between the global and local, achieving more efficient resource scheduling and faster convergence speed.
[0171] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
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 and multi-task communication and computing offloading 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 the device tasks in the network and can perform semantically driven priority allocation of resources; Step 3: Design an improved meta-inspired optimization strategy, namely, hierarchical enhanced whale optimization algorithm, for the optimization problem; the meta-inspired optimization strategy combines the 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 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. Step 5: Decompose the optimization problem into multiple sub-problems, solve the multiple sub-problems separately to obtain the local optimal solution, and 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. A 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 group of the hierarchical enhanced whale optimization algorithm is divided into multiple subgroups, each subgroup independently performs the optimization task in its subspace; S3.2: Each subgroup obtains the local optimal solution of its 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; 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 is 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 the trend of nonlinear decreasing or increasing 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 is characterized in that: For the allocation of Internet of Vehicles resources, each vehicle collects photographic image data of the surrounding environment through its on-board camera. After semantic analysis and semantic compression, it is unloaded to the edge computing server through a wireless channel 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 return results of the edge computing server. The returned results are used as the optimization target for adjusting the intelligent allocation of resources. 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 taken 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 to transmit 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 represents 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 by 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 The calculation formula is: Among them, 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, it compares it with the global optimal solution and updates the 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 is characterized in that: The size of the photographic image taken by the on-board 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 is characterized in that: The average utility QoS of the 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 means that the calculation formula is: 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 data computing task penalty related to the 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 is used as the score.
7. The resource allocation method based on meta-heuristic optimization strategy according to claim 6 is characterized in that: If the dimensions of a photographic image are m and n, the calculation formula for 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, and 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.
Citation Information
Patent Citations
Internet-of-vehicles communication resource allocation method based on network slice under constraint of information transmission rate
CN118042468A
Edge calculation optimization method based on cooperative game and multi-target whale algorithm
CN118200878A
NOMA-assisted task unloading and resource allocation joint optimization method under vehicle networking system
CN118695300A
Task offloading and resource allocation method in uncertain network environment
WO2022257348A1
Cited By
Efficient edge computing and cloud collaborative data scheduling system
CN121070565A