A WSO-based optimization method for vehicle network communication resource allocation

By adopting the PC5-Uu dual communication mode and the WSO algorithm in the Internet of Vehicles to optimize vehicle task transmission resources, the communication resource allocation problem in complex multi-vehicle scenarios is solved, low latency and efficient resource utilization are achieved, and the communication performance of the Internet of Vehicles system is improved.

CN119136221BActive Publication Date: 2025-10-03JILIN UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411182360.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-27
Publication Date
2025-10-03
Estimated Expiration
2044-08-27

AI Technical Summary

Technical Problem

In the Internet of Vehicles, how to effectively allocate communication resources in complex scenarios with multiple vehicles and multiple tasks, especially when traditional central cloud server architectures cannot meet real-time and reliability requirements, to achieve efficient resource allocation and management.

Method used

The PC5-Uu dual communication mode is adopted to establish the V2X-MEC model, and combined with the War Strategy Optimization (WSO) algorithm, the channel resource allocation is optimized by optimizing the communication resources during vehicle mission transmission and utilizing the position update mechanism and fitness value calculation method of the WSO algorithm.

Benefits of technology

It significantly reduces the transmission delay of vehicle mission data, improves the system's resource utilization efficiency and communication performance, has strong adaptability and easy implementation, and can show good optimization effects under different communication resource conditions and mission data scales.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119136221B_ABST
    Figure CN119136221B_ABST
Patent Text Reader

Abstract

The present invention is applicable to the field of vehicle network communication technology and provides a vehicle network communication resource allocation optimization method based on the WSO algorithm. First, a scenario model and a communication model are built, an optimization problem is constructed, the fitness of all individuals is calculated, and the king and commander are selected; according to the set ρ r The relationship between the value and the randomly generated ρ value determines each individual's behavioral strategy. The individual executes the strategy to obtain a new position and recalculates its fitness. If the individual's fitness improves after the updated position, its weight and rank are upgraded. After all individuals are updated, the positions of the king and commander are updated, and new kings and commanders are reselected based on their current fitness. Finally, soldiers with poor fitness are relocated to avoid falling into a local optimum, and the iterations are continuously repeated until the maximum number of iterations is reached. The method proposed in this invention can effectively reduce vehicle mission latency, optimize communication resource allocation, and improve system performance and user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of vehicle network communication technology, and in particular to a vehicle network communication resource allocation optimization method based on the WSO algorithm. Background Art

[0002] With the rapid development of wireless communication technology and the Internet of Things (IoT), the Internet of Vehicles (IoV) has gradually become a key component of intelligent transportation. By connecting vehicles to the internet, IoV enables information exchange and data sharing between vehicles and between vehicles and infrastructure, significantly enhancing the intelligence of road transportation. However, IoV requires processing and transmitting large amounts of data, which requires low-latency, high-bandwidth network support to ensure real-time and reliability. Traditional centralized cloud server architectures struggle to meet the real-time and reliability requirements of IoV due to long data transmission distances and high latency. To address this, Mobile Edge Computing (MEC) technology is gaining adoption. MEC deploys computing resources and network services at edge nodes close to vehicles, offloading processing tasks to them. This reduces latency, increases network bandwidth, and improves user experience. However, as the number of vehicles in the IoV increases, MEC equipment resources are limited, making it difficult to meet the needs of all vehicles, leading to the need for efficient resource allocation and management.

[0003] In the communication scenarios of the Internet of Vehicles (IoV), vehicles need to perform a large amount of data transmission and processing tasks simultaneously, which makes the efficient allocation of communication resources particularly important. Currently, IoV generally adopts two communication modes: PC5 (short range communication) mode and 5G-Uu (Universal User Network Interface) mode. PC5 mode allows direct communication between short-range devices, with the advantages of low latency and high efficiency, while 5G-Uu mode provides wider coverage and higher bandwidth support through base stations.

[0004] While the aforementioned communication modes each have their advantages and disadvantages, in practice, due to the limited nature of communication resources, effective allocation of communication resources in complex multi-vehicle, multi-task scenarios remains a significant challenge. Therefore, a communication resource allocation method based on an optimization algorithm is needed to improve the overall performance of the Internet of Vehicles (IoV) system and ensure the efficient transmission of vehicle mission data. To this end, this paper proposes an IoV communication resource allocation optimization method based on the War Strategy Optimization (WSO) algorithm. Summary of the Invention

[0005] The purpose of the present invention is to provide a vehicle network communication resource allocation optimization method based on the WSO algorithm, aiming to solve the problems raised in the above background technology.

[0006] To achieve the above object, the present invention provides the following technical solutions:

[0007] A method for optimizing vehicle network communication resource allocation based on the WSO algorithm includes the following steps:

[0008] Step 1: Use the PC5-Uu dual communication mode to establish a V2X-MEC model, including a scenario model and a communication model.

[0009] Step 2: Based on step 1, optimize the communication resources occupied by vehicle mission transmission, and initialize the scene parameters and algorithm operation related parameters, including the number of loop iterations Max_iter, the army size pop_size, and the strategy judgment value ρ r , weight factor α, upper and lower boundaries of the solution space Ub and Lb, the ranks and weights of all soldiers, and randomly and uniformly distribute the initial soldier individuals;

[0010] Step 3: Calculate the fitness values ​​of all soldiers according to the fitness function, and select the individual with the best fitness and the individual with the second best fitness;

[0011] Step 4: Select individual soldiers to execute offensive or defensive strategies according to the set strategy judgment value, and let the ρ value take a random value between 0 and 1. If ρ < ρ r Then execute the defensive strategy, otherwise execute the offensive strategy, update the soldier's position and fitness value;

[0012] Step 5: If the fitness of the new position is greater than the fitness of the previous position, the soldier takes the new position and upgrades the soldier's level and weight at the same time;

[0013] Step 6: Relocate soldiers who are less well-adjusted;

[0014] Step 7: Determine whether the number of iterations reaches the maximum number of iterations. If not, return to step 3. If the iteration is completed, the optimal resource allocation strategy is obtained.

[0015] Furthermore, in step 1, the scene model is a two-way road with M RSUs distributed at a certain distance on the roadside, namely, roadside units S = {S1, S2, ..., S m Each RSU is connected to a roadside MEC server in a wired manner and adjacent RSUs are connected in a wired manner. The total computing resources of a single roadside MEC server are F r ; The set of N intelligent vehicles equipped with OBU and vehicle Ethernet on the road is set as V = {V1, V2, ..., V n}, the vehicle and the RSU within its communication range communicate in PC5 mode and offload the task to the roadside MEC server matching the RSU for calculation. All vehicles in the scene generate a task to be processed at the same time in each time slot. The task generated by vehicle n is set to Among them D n is the task data size, C n is the amount of computing resources required for task data per task unit, The maximum acceptable delay for completing the task, B n The number of channel resource blocks / subchannels occupied when uploading a task; there is a 5G base station in the scene, the 5G base station communicates with the surrounding RSUs in a wired connection, the 5G base station communicates with the vehicles within the communication range in uu mode, the 5G base station is connected to the 5GMEC server in a wired manner, and the computing resources of the 5GMEC server are F b ,5GMEC server communicates with remote cloud server in a long-distance wired manner;

[0016] Communication model: When the vehicle communicates with the RSU in PC5 mode, the total bandwidth of a single RSU is W r , the total bandwidth is divided into multiple resource blocks in the frequency domain, and the bandwidth of a resource block is W rb , the size of the transmitted data is approximately equal to the task data size; when the vehicle communicates with the 5G base station in uu mode, the total bandwidth is W b , the channel is divided into multiple sub-channels in the frequency domain, and the sub-channel bandwidth is W bb ;

[0017] The connection decision variable is an = {0, 1}, indicating that the vehicle chooses to communicate with the RSU or the 5G base station, a n =0 means vehicle n chooses to communicate with RSU, a n =1 means vehicle n chooses to communicate with the 5G base station; calculate the decision variable b n ={b n1 ,b n2 ,…,b nM ,b nb ,b nc}, indicating that the vehicle chooses to offload the task to one of the m roadside MEC servers, the 5G MEC server, or the cloud server for calculation. Each item in the formula takes a value of 0 or 1 and satisfies where b ni For vehicle n, there are two states: one is to unload or the other is not to unload to a roadside MEC server. nb For vehicle n, the task is either offloaded or not offloaded to the 5G MEC server. nc For vehicle n, the task only exists in two states: offloading or not offloading to the cloud server.

[0018] The transmission delay formula when the vehicle chooses to communicate with the RSU is:

[0019] Formula 1:

[0020] where R r is the transmission rate between the vehicle and the RSU;

[0021] The transmission delay formula when the vehicle chooses to communicate with the 5G base station is:

[0022] Formula 2:

[0023] where R b is the transmission rate between the vehicle and the 5G base station;

[0024] When the sum of the number of resource blocks required for the task to communicate with a certain RSU exceeds the total number of resource blocks provided by the RSU, the tasks are transmitted in batches, k n is the batch sequence assigned to task n, t in is the time interval between adjacent batches, then the total delay formula of the transmission phase is:

[0025] Formula 3:

[0026] Furthermore, in step 2, the specific process of optimizing the communication resources occupied by vehicle task transmission is as follows:

[0027] The vector Β represents the number of occupied resource blocks corresponding to the task of the vehicle that selects RSU for communication, N m represents the total number of vehicles that choose to communicate with the RSU, N b represents the total number of vehicles that choose to communicate with the 5G base station, and the optimization problem is expressed as:

[0028] Formula 4:

[0029] Among them, λ n is the weight of vehicle n, T n is the total mission delay of vehicle n, B i The number of resource blocks occupied by the vehicle task transmission for selecting communication with RSU, represents an integer; constraint C1 represents the communication resource limit of each RSU; constraint C2 represents the communication resource limit of the 5G base station; constraint C3 represents the range of the number of resource blocks occupied by the vehicle task transmission selected to communicate with the RSU, and is an integer; constraint C4 indicates that all vehicles can only choose to communicate with a certain RSU or 5G base station;

[0030] Formula 4 is a discrete problem. The discrete problem is continuous, that is:

[0031] Formula 5:

[0032] Among them, x is a continuous variable parameter;

[0033] Substituting Equation 5 into the optimization problem yields:

[0034] Formula 6:

[0035] Equation 6 is a non-convex nonlinear problem, and the WSO algorithm is used as the solution method. In each iteration, the soldier's position and weight are updated according to the WSO algorithm; the constraints are checked to ensure that all solutions satisfy C1, C2, C3, and C4; the objective function value is calculated, and the soldier's level and weight are adjusted according to the result.

[0036] Furthermore, the fitness function in step 3 aims to reduce the weighted delay of the vehicle mission, calculates the fitness value of each soldier, and selects the individual with the best fitness as the king and the individual with the second best fitness as the commander; the calculation formula of the fitness function is:

[0037] Formula 7:

[0038] Furthermore, in step 4, the position update formula of the individual soldier executing the attack strategy is:

[0039] Formula 8: X i (t+1)=X i (t)+2×ρ×(CK)+rand×(W i ×KX i (t));

[0040] Among them, X i (t+1) is the new position of the soldier, X i (t) is the current position of the soldier, C is the commander's position, K is the king's position, W i is the weight, rand is a random value from 0 to 1;

[0041] The position update formula for soldiers executing the defense strategy is:

[0042] Formula 9: X i (t+1)=X i (t)+2×ρ×(KX rand (t))+rand×W i ×(CX i (t));

[0043] Among them, X rand(t) represents the random update direction; the level and weight of the soldier executing the defensive strategy remain unchanged. Furthermore, in step 5, the formulas for updating the soldier's position, level, and weight are:

[0044] Formula 10:

[0045] Formula 11:

[0046] Formula 12:

[0047] Among them, Fn is the fitness of the soldier's new position, Fp is the fitness of the soldier's previous position, R i is the soldier's current level, R i +1 is the new level of the soldier.

[0048] Furthermore, in step 6, the formula for placing soldiers with poor suitability is:

[0049] Formula 13: X W (t+1)=-rand×(X W (t)-C)+K;

[0050] Among them, X W (t+1) is the new position of the soldier with poor fitness, X W (t) is the current position of the soldier with poor fitness;

[0051] In each iteration, the soldier with the worst adaptability is found and placed in a new position according to Equation 13. After reaching the maximum number of iterations, the optimal position is output, which is the solution required for the problem.

[0052] Compared with the prior art, the present invention has the following beneficial effects:

[0053] This paper proposes a method for optimizing vehicle network communication resource allocation based on the WSO algorithm. This method, through the PC5 and 5G-Uu dual communication modes and combined with the advantages of the WSO algorithm, can optimize channel resource allocation in complex scenarios with multiple vehicles and multiple RSUs. By improving the location update mechanism and fitness value calculation method in the WSO algorithm, the system's resource utilization efficiency is effectively improved and the transmission delay of vehicle mission data is significantly reduced. In addition, this method has strong adaptability and ease of implementation, and can demonstrate good optimization effects under different communication resource conditions and mission data sizes, thereby improving the communication performance of the entire vehicle network system. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Figure 1 The present invention is a specific flow chart for implementing the method of the present invention.

[0055] Figure 2This is a model diagram of the Internet of Vehicles communication system.

[0056] Figure 3 Figure 2 is a graph showing the relationship between weighted delay and vehicle mission data size.

[0057] Figure 4 Figure 2 is a graph showing the relationship between total delay and vehicle mission data size.

[0058] Figure 5 This is a graph showing the relationship between weighted delay and RSU total bandwidth.

[0059] Figure 6 This is the relationship diagram between total delay and RSU total bandwidth. DETAILED DESCRIPTION

[0060] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0061] The specific implementation of the present invention is described in detail below with reference to specific embodiments.

[0062] An embodiment of the present invention provides a method for optimizing vehicle network communication resource allocation based on the WSO algorithm, comprising the following steps:

[0063] Step 1: Use PC5-Uu dual communication mode to establish V2X-MEC model, including scenario model and communication model. The model diagram is as follows: Figure 2 As shown;

[0064] The scene model is a two-way road with M roadside units (RSU) S={S1, S2, ..., S m Each RSU is connected to a roadside MEC server in a wired manner and adjacent RSUs are connected in a wired manner. The total computing resources of a single roadside MEC server are F r ; The set of N intelligent vehicles equipped with OBU and vehicle Ethernet on the road is set as V = {V1, V2, ..., V n}, the vehicle and the RSU within its communication range communicate in PC5 mode and offload the task to the roadside MEC server matching the RSU for calculation. All vehicles in the scene generate a task to be processed at the same time in each time slot. The task generated by vehicle n is set to Among them D n is the task data size, C n is the amount of computing resources required for task data per task unit, The maximum acceptable delay for completing the task, B nThe number of channel resource blocks / subchannels occupied when uploading a task; there is a 5G base station in the scene, the 5G base station communicates with the surrounding RSUs in a wired connection, the 5G base station communicates with the vehicles within the communication range in uu mode, the 5G base station is connected to the 5G MEC server in a wired manner, and the computing resources of the 5G MEC server are F b ,5G MEC server communicates with remote cloud server in a long-distance wired manner;

[0065] Communication model: When the vehicle communicates with the RSU in PC5 mode, the total bandwidth of a single RSU is W r , the total bandwidth is divided into multiple resource blocks in the frequency domain, and the bandwidth of a resource block is W rb When different vehicles are performing task offloading, the number of resource blocks occupied by task data is also different. When each task is transmitted, the side chain control information (SCI) that occupies two resource blocks is also transmitted at the same time. However, since the amount of this information is too small compared to the task data, its size is ignored and the size of the transmitted data is approximated as the task data size. When the vehicle communicates with the 5G base station in uu mode, the total bandwidth is W b , the channel is divided into multiple sub-channels in the frequency domain, and the sub-channel bandwidth is W bb ,Different vehicles will occupy different numbers of sub-channels when transmitting data.

[0066] The connection decision variable is an = {0, 1}, indicating that the vehicle chooses to communicate with the RSU or the 5G base station, a n =0 means vehicle n chooses to communicate with RSU, a n =1 means vehicle n chooses to communicate with the 5G base station; calculate the decision variable b n ={b n1 ,b n2 ,…,b nM ,b nb ,b nc}, indicating that the vehicle chooses to offload the task to one of the m roadside MEC servers, the 5G MEC server, or the cloud server for calculation. Each item in the formula takes a value of 0 or 1 and satisfies where b ni For vehicle n, there are two states: one is to unload or the other is not to unload to a roadside MEC server. nb For vehicle n, the task is either offloaded or not offloaded to the 5G MEC server. nc For vehicle n, the task only exists in two states: offloading or not offloading to the cloud server.

[0067] The transmission delay formula when the vehicle chooses to communicate with the RSU is:

[0068] Formula 1:

[0069] where R r is the transmission rate between the vehicle and the RSU;

[0070] The transmission delay formula when the vehicle chooses to communicate with the 5G base station is:

[0071] Formula 2:

[0072] where R b is the transmission rate between the vehicle and the 5G base station;

[0073] When the sum of the number of resource blocks required for the task to communicate with a certain RSU exceeds the total number of resource blocks provided by the RSU, the tasks are transmitted in batches, k n is the batch sequence assigned to task n, t in is the time interval between adjacent batches, then the total delay formula of the transmission phase is:

[0074] Formula 3:

[0075] Step 2: Based on step 1, optimize the communication resources occupied by vehicle mission transmission, and initialize the scene parameters and algorithm operation related parameters, including the number of loop iterations Max_iter, the army size pop_size, and the strategy judgment value ρ r , weight factor α, upper and lower boundaries of the solution space Ub and Lb, the ranks and weights of all soldiers, and randomly and uniformly distribute the initial soldier individuals;

[0076] The vector Β represents the number of occupied resource blocks corresponding to the task of the vehicle that selects RSU for communication, N m represents the total number of vehicles that choose to communicate with the RSU, N b Indicates the total number of vehicles that choose to communicate with the 5G base station. Figure 2 Based on the model, the optimization problem is expressed as:

[0077] Formula 4:

[0078] Among them, λ n is the weight of vehicle n, T n is the total mission delay of vehicle n, B i The number of resource blocks occupied by the vehicle task transmission for selecting communication with RSU, represents an integer; constraint C1 represents the communication resource limit of each RSU; constraint C2 represents the communication resource limit of the 5G base station; constraint C3 represents the range of the number of resource blocks occupied by the vehicle task transmission selected to communicate with the RSU, and is an integer; constraint C4 indicates that all vehicles can only choose to communicate with a certain RSU or 5G base station; Equation 4 is a discrete problem, which is continuous, that is:

[0079] Formula 5:

[0080] Where x is a continuous variable parameter; substituting Equation 5 into the optimization problem yields:

[0081] Formula 6:

[0082] Equation 6 is a non-convex nonlinear problem, and the WSO algorithm is used as the solution method. In each iteration, the soldier's position and weight are updated according to the WSO algorithm; the constraints are checked to ensure that all solutions satisfy C1, C2, C3, and C4; the objective function value is calculated, and the soldier's level and weight are adjusted according to the result.

[0083] Step 3: Calculate the fitness values ​​of all soldiers according to the fitness function, and select the individual with the best fitness (the king) and the individual with the second best fitness (the commander);

[0084] The fitness function aims to reduce the weighted delay of vehicle tasks. It calculates the fitness value of each soldier and selects the individual with the best fitness as the king and the individual with the second best fitness as the commander. The fitness function calculation formula is:

[0085] Formula 7:

[0086] Step 4: Select individual soldiers to execute offensive or defensive strategies according to the set strategy judgment value, and let the ρ value take a random value between 0 and 1. If ρ < ρ r Then execute the defensive strategy, otherwise execute the offensive strategy, update the soldier's position and fitness value;

[0087] The position update formula for individual soldiers executing the offensive strategy is:

[0088] Formula 8: X i (t+1)=X i (t)+2×ρ×(CK)+rand×(W i ×KX i (t));

[0089] Among them, X i (t+1) is the new position of the soldier, X i(t) is the current position of the soldier, C is the commander's position, K is the king's position, rand is a random value between 0 and 1, and W i is the weight; when W i >1, (W i ×KX i (t)) will surpass the king's position, so the soldier's updated position will surpass the commander's position; on the contrary, if W i <1, (W i ×KX i (t)) is between the king's position and the soldier's current position. i When it approaches zero, the updated position of soldier i is very close to the commander's position.

[0090] The position update formula for soldiers executing the defense strategy is:

[0091] Formula 9: X i (t+1)=X i (t)+2×ρ×(KX rand (t))+rand×W i ×(CX i (t));

[0092] Among them, X rand (t) represents the random update direction; the defensive strategy explores more solution space than the offensive strategy, W i When the value is large, the soldier takes a larger step when updating the position; on the contrary, W i When the value is small, the soldiers take small steps when updating their positions. The ranks and weights of soldiers executing the defensive strategy remain unchanged.

[0093] Step 5: If the fitness of the new position (Fn) is greater than the fitness of the previous position (Fp), the soldier takes the new position and upgrades the soldier's level and weight at the same time;

[0094] The formulas for updating the soldier's position, level, and weight are:

[0095] Formula 10:

[0096] Formula 11:

[0097] Formula 12:

[0098] Among them, Fn is the fitness of the soldier's new position, Fp is the fitness of the soldier's previous position, R i is the soldier's current level, R i +1 is the new level of the soldier.

[0099] Step 6: Avoid falling into local optimality by relocating soldiers with poor fitness;

[0100] The formula for placing soldiers with poor suitability (weak soldiers) is:

[0101] Formula 13: X W (t+1)=-rand×(X W (t)-C)+K;

[0102] Among them, X W (t+1) is the new position of the soldier with poor fitness, X W (t) is the current position of the soldier with poor fitness;

[0103] In each iteration, the soldier with the worst adaptability is found and placed in a new position according to Equation 13, which improves the convergence of the algorithm. After reaching the maximum number of iterations, the optimal position is output, which is the solution required by the problem.

[0104] Step 7: Determine whether the number of iterations reaches the maximum number of iterations. If not, return to step 3. If the iteration is completed, the optimal resource allocation strategy is obtained.

[0105] In the embodiment of the present invention, Figure 1 The specific steps are as follows:

[0106] Initialize scenario parameters: initialize army size, upper and lower boundaries of solution space, king position, commander position and strategy judgment value ρ r , number of loop iterations, weight factor;

[0107] Initialize the weights and levels of all soldiers;

[0108] Distribute soldiers randomly and evenly in the war space;

[0109] For Army Size do:

[0110] Get each soldier's fitness;

[0111] end for

[0112] Calculate fitness and sort soldiers by fitness;

[0113] The soldier with the best fitness is selected as the king, and the individual with the second best fitness is selected as the commander;

[0114] While t<maximum number of iterations T max :

[0115] For Army Size do:

[0116] Get a random ρ and calculate it based on ρ and ρ rThe size relationship determines whether to adopt a defensive strategy or an offensive strategy;

[0117] Update the formula execution strategy based on the two positions;

[0118] Calculate soldier fitness;

[0119] Sort the soldiers by fitness;

[0120] Update the position of each soldier based on the fitness of the current and previous positions;

[0121] Updated soldier levels and weights;

[0122] end for

[0123] Select the least fit soldiers and relocate them;

[0124] Updated the positions of the king and commander;

[0125] t=t+1;

[0126] When the maximum number of iterations is reached, the process ends and the result is output.

[0127] In addition, the ant colony algorithm (ACO), simulated annealing algorithm (SA) and random assignment scheme (RA) were selected as comparison algorithms.

[0128] The number of iterations of the algorithm in this invention is 1000, the army size is 100, and the benchmark parameter ρ r Set to 0.2, and the weight factor α to 0.6. The specific scenario simulation parameters are shown in Table 1:

[0129] Table 1 Simulation parameters

[0130]

[0131] After 200 experiments, the average results were obtained, and the comparison results are as follows: Figure 3-Figure 6 As shown, Figure 3 、 Figure 4 The graphs represent the relationship between weighted delay and total delay and the size of vehicle mission data. As the size of vehicle mission data gradually increases, the burden on channel resources and computing resources increases, and the delay increases accordingly. However, the delay after WSO optimization is significantly lower than that of the ACO communication resource allocation algorithm, SA communication resource allocation algorithm, and random allocation algorithm. Figure 5 、 Figure 6The graphs represent the relationship between weighted and total delays and the size of RSU bandwidth resources. As RSU bandwidth increases, more communication resources are allocated to vehicles, communication latency decreases, and weighted delay also decreases. The optimized WSO algorithm achieves significantly lower latency than the ACO, SA, and random allocation algorithms. This demonstrates the WSO algorithm's significant advantages in optimizing communication resources with the goal of reducing latency.

[0132] In summary, the vehicle network communication resource allocation optimization method based on the WSO algorithm proposed in this invention can effectively reduce the processing delay of vehicle tasks, realize the rational utilization of system resources, and improve the overall performance of the system. It has superior performance and is easy to implement.

[0133] The above are only preferred embodiments of the present invention. It should be pointed out that for those skilled in the art, several variations and improvements can be made without departing from the concept of the present invention. These should also be regarded as the scope of protection of the present invention. These will not affect the effect of the implementation of the present invention and the practicality of the patent.

Claims

1. A vehicle network communication resource allocation optimization method based on the WSO algorithm, characterized in that: The following steps are involved: Step 1: Use the PC5-Uu dual communication mode to establish a V2X-MEC model, including a scenario model and a communication model. Step 2: Based on step 1, optimize the communication resources occupied by vehicle mission transmission, and initialize the scene parameters and algorithm operation related parameters, including the number of loop iterations Max_iter, the army size pop_size, and the strategy judgment value ρ r , weight factor α, upper and lower boundaries of the solution space Ub and Lb, the ranks and weights of all soldiers, and randomly and uniformly distribute the initial soldier individuals; Step 3: Calculate the fitness values ​​of all soldiers according to the fitness function, and select the individual with the best fitness and the individual with the second best fitness; Step 4: Select individual soldiers to execute offensive or defensive strategies according to the set strategy judgment value, and let the ρ value take a random value between 0 and 1. If ρ < ρ r Then execute the defensive strategy, otherwise execute the offensive strategy, update the soldier's position and fitness value; Step 5: If the fitness of the new position is greater than the fitness of the previous position, the soldier takes the new position and upgrades the soldier's level and weight at the same time; Step 6: Relocate soldiers who are less well-adjusted; Step 7: Determine whether the number of iterations reaches the maximum number of iterations. If not, return to step 3. If the iteration is completed, the optimal resource allocation strategy is obtained.

2. The vehicle network communication resource allocation optimization method based on the WSO algorithm according to claim 1 is characterized in that: In step 1, the scene model is a two-way road with M RSUs distributed at a certain distance on the roadside, namely, roadside units S = {S1, S2, ..., S m Each RSU is connected to a roadside MEC server in a wired manner and adjacent RSUs are connected in a wired manner. The total computing resources of a single roadside MEC server are F r ; The set of N intelligent vehicles equipped with OBU and vehicle Ethernet on the road is set as V = {V1, V2, ..., V n }, the vehicle and the RSU within its communication range communicate in PC5 mode and offload the task to the roadside MEC server matching the RSU for calculation. All vehicles in the scene generate a task to be processed at the same time in each time slot. The task generated by vehicle n is set to Among them D n is the task data size, C n is the amount of computing resources required for task data per task unit, The maximum acceptable delay for completing the task, B n The number of channel resource blocks / subchannels occupied when uploading a task; there is a 5G base station in the scene, the 5G base station communicates with the surrounding RSUs in a wired connection, the 5G base station communicates with the vehicles within the communication range in uu mode, the 5G base station is connected to the 5GMEC server in a wired manner, and the computing resources of the 5GMEC server are F b ,5G MEC server communicates with remote cloud server in a long-distance wired manner; Communication model: When the vehicle communicates with the RSU in PC5 mode, the total bandwidth of a single RSU is W r , the total bandwidth is divided into multiple resource blocks in the frequency domain, and the bandwidth of a resource block is W rb , the size of the transmitted data is approximately equal to the task data size; when the vehicle communicates with the 5G base station in uu mode, the total bandwidth is W b , the channel is divided into multiple sub-channels in the frequency domain, and the sub-channel bandwidth is W bb ; The connection decision variable is an = {0, 1}, indicating that the vehicle chooses to communicate with the RSU or the 5G base station, a n =0 means vehicle n chooses to communicate with RSU, a n =1 means vehicle n chooses to communicate with the 5G base station; Calculate the decision variable b n ={b n1 ,b n2 ,…,b nM ,b nb ,b nc }, indicating that the vehicle chooses to offload the task to one of the m roadside MEC servers, the 5G MEC server, or the cloud server for calculation. Each item in the formula takes a value of 0 or 1 and satisfies where b ni For vehicle n, there are two states: one is to unload or the other is not to unload to a roadside MEC server. nb For vehicle n, the task is either offloaded or not offloaded to the 5G MEC server. nc For vehicle n, the task only exists in two states: offloading or not offloading to the cloud server. The transmission delay formula when the vehicle chooses to communicate with the RSU is: Formula 1: where R r is the transmission rate between the vehicle and the RSU; The transmission delay formula when the vehicle chooses to communicate with the 5G base station is: Formula 2: where R b is the transmission rate between the vehicle and the 5G base station; When the sum of the number of resource blocks required for the task to communicate with a certain RSU exceeds the total number of resource blocks provided by the RSU, the tasks are transmitted in batches, k n is the batch sequence assigned to task n, t in is the time interval between adjacent batches, then the total delay formula of the transmission phase is: Formula 3:

3. The vehicle network communication resource allocation optimization method based on the WSO algorithm according to claim 1 is characterized in that: In step 2, the specific process of optimizing the communication resources occupied by vehicle task transmission is as follows: The vector Β represents the number of occupied resource blocks corresponding to the task of the vehicle that selects RSU for communication, N m represents the total number of vehicles that choose to communicate with the RSU, N b represents the total number of vehicles that choose to communicate with the 5G base station, and the optimization problem is expressed as: Formula 4: Among them, λ n is the weight of vehicle n, T n is the total mission delay of vehicle n, B i The number of resource blocks occupied by the vehicle task transmission for selecting communication with RSU, represents an integer; constraint C1 represents the communication resource limit of each RSU; constraint C2 represents the communication resource limit of the 5G base station; constraint C3 represents the range of the number of resource blocks occupied by the vehicle task transmission selected to communicate with the RSU, and is an integer; constraint C4 indicates that all vehicles can only choose to communicate with a certain RSU or 5G base station; Formula 4 is a discrete problem. The discrete problem is continuous, that is: Formula 5: Β i (x) = n, where n ≤ x < n + 1 Among them, x is a continuous variable parameter; Substituting Equation 5 into the optimization problem yields: Formula 6: Equation 6 is a non-convex nonlinear problem, and the WSO algorithm is used as the solution method. In each iteration, the soldier's position and weight are updated according to the WSO algorithm; the constraints are checked to ensure that all solutions satisfy C1, C2, C3, and C4; the objective function value is calculated, and the soldier's level and weight are adjusted according to the result.

4. The vehicle network communication resource allocation optimization method based on the WSO algorithm according to claim 1 is characterized in that: The fitness function in step 3 aims to reduce the weighted delay of the vehicle mission, calculates the fitness value of each soldier, and selects the individual with the best fitness as the king and the individual with the second best fitness as the commander. The calculation formula of the fitness function is: Formula 7:

5. The vehicle network communication resource allocation optimization method based on the WSO algorithm according to claim 1 is characterized in that: In step 4, the position update formula of the individual soldier executing the attack strategy is: Formula 8: X i (t + 1)= X i (t)+2×ρ×(C - K)+rand×(W i ×K - X i (t)); Among them, X i (t+1) is the new position of the soldier, X i (t) is the current position of the soldier, C is the commander's position, K is the king's position, W i is the weight, rand is a random value from 0 to 1; The position update formula for soldiers executing the defense strategy is: Equation 9: X i (t + 1)=X i (t)+2 × ρ × (K - X rand (t))+rand × W i ×(C - X i (t)); Among them, X rand (t) represents the random update direction; the ranks and weights of soldiers executing the defensive strategy remain unchanged.

6. The vehicle network communication resource allocation optimization method based on the WSO algorithm according to claim 1 is characterized in that: In step 5, the formulas for updating the soldier's position, level, and weight are: Formula 10: Formula 11: Formula 12: Among them, Fn is the fitness of the soldier's new position, Fp is the fitness of the soldier's previous position, R i is the soldier's current level, R i +1 is the new level of the soldier.

7. The vehicle network communication resource allocation optimization method based on the WSO algorithm according to claim 1 is characterized in that: In step 6, the formula for placing soldiers with poor suitability is: Formula 13: X W (t+1)=-rand×(X W (t)-C)+K; Among them, X W (t+1) is the new position of the soldier with poor fitness, X W (t) is the current position of the soldier with poor fitness; In each iteration, the soldier with the worst adaptability is found and placed in a new position according to Equation 13. After reaching the maximum number of iterations, the optimal position is output, which is the solution to the problem.

Citation Information

Patent Citations

  • Cloud edge-end collaborative resource optimization method and device, electronic equipment and storage medium

    CN115965205A

  • Solar cell parameter identification method based on genetic chaos war strategy optimization algorithm

    CN116451559A