Internet of vehicles communication resource allocation optimization method based on WSO algorithm

By using WSO algorithm to optimize the communication resource allocation of vehicle tasks in the Internet of Vehicles, the resource allocation challenges in the Internet of Vehicles are solved, low-latency and efficient communication resource management are achieved, and the overall system performance is improved.

CN119136221AActive Publication Date: 2024-12-13JILIN UNIVERSITY
View PDF 4 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In the Internet of Vehicles, traditional central cloud server architectures are difficult to meet the requirements of real-time and reliability, and as the number of vehicles increases, the resources of MEC equipment are limited, resulting in huge challenges in the allocation of communication resources in multi-vehicle and multi-task scenarios.

Method used

Using the Internet of Vehicle Communication Resource Allocation Method based on War Strategy Optimization (WSO) algorithm, the V2X-MEC model is established through the PC5-Uu dual communication mode, the communication resources during vehicle task transmission are optimized, the WSO algorithm is used to update the soldiers' positions and weights, and the offensive is carried out. Or defensive strategy, optimize resource allocation strategy.

Benefits of technology

It significantly reduces the transmission delay of vehicle task data, improves system resource utilization efficiency, improves the communication performance of the Internet of Vehicles system, and has strong adaptability and ease of realization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119136221A_ABST
    Figure CN119136221A_ABST
Patent Text Reader

Abstract

The invention is suitable for the technical field of Internet of Vehicles communication, and provides an Internet of Vehicles communication resource allocation optimization method based on a WSO algorithm, which comprises the following steps: firstly, building a scene model and a communication model, constructing an optimization problem, calculating the fitness of all individuals, and selecting a Chinese queen and a commander; the behavior strategy of each individual is determined according to the size relation between the set rho r value and the rho value generated randomly, the individual executes the strategy to obtain a new position and recalculates the fitness, and if the fitness of the individual becomes better after the position is updated, the weight and the grade of the individual are upgraded. After all individuals are updated, the positions of the Chinese queen and the commander are updated, and a new Chinese queen and a new commander are selected again according to the current fitness. And finally, rearranging soldiers with poor fitness to avoid falling into local optimum, and continuously iterating and updating until the maximum number of iterations is reached. Through the method provided by the invention, the time delay of the vehicle task can be effectively reduced, the communication resource allocation is optimized, and the system performance and the user experience are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] With the rapid development of wireless communication technology and the Internet of Things, the Internet of Vehicles has gradually become a key part of the intelligent transportation field. The Internet of Vehicles connects vehicles to the Internet, realizes information interaction and data sharing between vehicles and between vehicles and infrastructure, and thus significantly improves the intelligence level of road traffic. However, the Internet of Vehicles needs to process and transmit a large amount of data. The processing and transmission of this data requires low-latency and high-bandwidth network support to ensure real-time and reliability. The traditional central cloud server architecture is difficult to meet the requirements of the Internet of Vehicles for real-time and reliability due to the long data transmission distance and high latency. To this end, Mobile Edge Computing (MEC) technology has been gradually adopted. MEC deploys computing resources and network services at edge nodes close to vehicles, offloading tasks that need to be processed to edge nodes, thereby reducing latency, enhancing network bandwidth and improving user experience. However, with the increase in the number of vehicles in the Internet of Vehicles, the resources of MEC devices are limited and it is difficult to meet the needs of all vehicles, resulting in the need for efficient resource allocation and management.

[0003] In the communication scenarios of the Internet of Vehicles, vehicles need to perform a large amount of data transmission and processing tasks at the same time, which makes the efficient allocation of communication resources particularly important. At present, the Internet of Vehicles generally adopts two communication modes: PC5 (short range communication) mode and 5G-Uu (universal user network interface) mode. The PC5 mode allows direct communication between short-range devices, with the advantages of low latency and high efficiency, while the 5G-Uu mode provides wider coverage and higher bandwidth support through base stations.

[0004] Although the above communication modes have their own advantages and disadvantages, in practical applications, due to the limited communication resources, how to effectively allocate communication resources in complex scenarios with multiple vehicles and multiple tasks still faces huge challenges. Therefore, a communication resource allocation method based on an optimization algorithm is needed to improve the overall performance of the Internet of Vehicles system and ensure the efficient transmission of vehicle mission data. To this end, the present invention proposes an optimization method for Internet of Vehicles communication resource allocation based on the War Strategy Optimization (WSO) algorithm. Summary of the invention

[0005] The purpose of the present invention is to provide a method for optimizing vehicle network communication resource allocation 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 the allocation of vehicle network communication resources based on the WSO algorithm comprises the following steps:

[0008] Step 1: Use 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 scenario 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 levels 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 ρ take a random value between 0 and 1. If ρ < ρ r If the error is not found, the defensive strategy is executed, otherwise the offensive strategy is executed, and the soldier position and fitness value are updated;

[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 level and weight of the soldier 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, end to obtain the optimal resource allocation strategy.

[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 individually by wire and the adjacent RSUs are connected by wire. 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 to V = {V1, V2, ..., V n}, the vehicle communicates with the RSU within its communication range in PC5 mode and offloads 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 Where D n is the task data size, C n is the amount of computing resources required for the task data of the task unit, The maximum acceptable delay for completing the task, B n is the number of channel resource blocks / subchannels occupied when uploading tasks; there is a 5G base station in the scene, the 5G base station communicates with the surrounding RSUs in a wired manner, 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 transmitted data size 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 ;

[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, where each item takes a value of 0 or 1 and satisfies where b ni For vehicle n, there are two states: unloading or not unloading to a roadside MEC server. nb For vehicle n, the task only exists in two states: offloading or not offloading to the 5G MEC server. nc For vehicle n, the task only exists in two states: offloading or not offloading to the cloud server for calculation;

[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 resource blocks required for the task selected 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 during 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 selected to communicate with the 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 value range of the number of resource blocks occupied by the vehicle task transmission selected to communicate with the RSU, and it is an integer; constraint C4 means 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, we get:

[0034] Formula 6:

[0035] Equation 6 is a non-convex nonlinear problem. 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 task, 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 offensive 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 soldier’s new position, 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 to execute 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. Further, in step 5, the formulas for updating the position, level, and weight of the soldier 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, and 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 Formula 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] The present invention proposes a method for optimizing the allocation of communication resources in the Internet of Vehicles based on the WSO algorithm. This method uses the PC5 and 5G-Uu dual communication modes and combines the advantages of the WSO algorithm to optimize channel resource allocation in complex scenarios with multiple vehicles and multiple RSUs. By improving the location update mechanism and the fitness value calculation method in the WSO algorithm, the resource utilization efficiency of the system is effectively improved, and the transmission delay of vehicle mission data is significantly reduced. In addition, this method has strong adaptability and easy implementation, and can show good optimization effects under different communication resource conditions and mission data scales, thereby improving the communication performance of the entire Internet of Vehicles 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 This is a graph showing the relationship between total latency and vehicle mission data size.

[0058] Figure 5 It is the relationship diagram between weighted delay and total bandwidth of RSU.

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

[0060] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with 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 used to limit the present invention.

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

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

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

[0064] The scenario model is a two-way road with M roadside units (RSUs) S={S1,S2,…,S m}, each RSU is connected to a roadside MEC server individually by wire and the adjacent RSUs are connected by wire. 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 to V = {V1, V2, ..., V n}, the vehicle communicates with the RSU within its communication range in PC5 mode and offloads 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 Where D n is the task data size, C n is the amount of computing resources required for the task data of the task unit, The maximum acceptable delay for completing the task, B nis the number of channel resource blocks / subchannels occupied when uploading tasks; there is a 5G base station in the scene, the 5G base station communicates with the surrounding RSUs in a wired manner, the 5G base station communicates with 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 F of the 5G MEC server are b , the 5G MEC server communicates with the 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 perform task offloading, the number of resource blocks occupied by task data is also different. When each task is transmitted, the sidelink 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, where each item takes a value of 0 or 1 and satisfies where b ni For vehicle n, there are two states: unloading or not unloading to a roadside MEC server. nb For vehicle n, the task only exists in two states: offloading or not offloading to the 5G MEC server. nc For vehicle n, the task only exists in two states: offloading or not offloading to the cloud server for calculation;

[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 resource blocks required for the task selected 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 scenario 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 levels 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 selected to communicate with the 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 value range of the number of resource blocks occupied by the vehicle task transmission that chooses to communicate with the RSU, and it takes an integer; constraint C4 means that all vehicles can only choose to communicate with a certain RSU or 5G base station; Formula 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. 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, 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:

[0085] Formula 7:

[0086] Step 4: Select individual soldiers to execute offensive or defensive strategies according to the set strategy judgment value, and let ρ take a random value between 0 and 1. If ρ < ρ r If the error is not found, the defensive strategy is executed, otherwise the offensive strategy is executed, and the soldier position and fitness value are updated;

[0087] The position update formula for individual soldiers to execute 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 soldier’s new position, 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 to execute 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 soldier takes small steps when updating the position. The rank and weight of the soldier 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 level and weight of the soldier;

[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, and R i is the soldier's current level, R i +1 is the new level of the soldier.

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

[0100] The formula for placing soldiers with poor fitness (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 Formula 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, end to obtain the optimal resource allocation strategy.

[0105] In the embodiment of the present invention, Figure 1 As shown, 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 decision 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 the value of ρ according to ρ 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 each soldier's position based on the fitness of its current and previous positions;

[0121] Updated soldier ranks and weights;

[0122] end for

[0123] The least fit soldiers were selected and relocated;

[0124] Updated King and Commander positions;

[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 algorithm iterations in this invention is 1000, the army size is 100, and the benchmark parameter ρ r Set to 0.2, and the weight factor α is 0.6. The scene 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 was as follows Figure 3-Figure 6 As shown, Figure 3 , Figure 4 They respectively represent the relationship between weighted delay and total delay and the size of vehicle task data. When the size of vehicle task data gradually increases, the burden of channel resources and computing resources will increase, and the delay will increase accordingly. However, the delay after WSO optimization is significantly lower than that of ACO communication resource allocation algorithm, SA communication resource allocation algorithm and random allocation algorithm. Figure 5 , Figure 6They represent the relationship between weighted delay and total delay and the size of RSU bandwidth resources. When the size of RSU bandwidth resources gradually increases, the communication resources that can be allocated to the vehicle become more, the communication delay decreases, and the weighted delay also decreases. The delay after WSO optimization is significantly lower than that of ACO communication resource allocation algorithm, SA communication resource allocation algorithm and random allocation algorithm. It can be seen that the WSO algorithm has a great advantage in the communication resource optimization problem with the goal of reducing delay.

[0132] In summary, the vehicle network communication resource allocation optimization method based on the WSO algorithm proposed in the present invention can effectively reduce the processing delay of vehicle tasks, realize the rational use 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 modifications and improvements can be made without departing from the concept of the present invention. These should also be regarded as the protection scope 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 method for optimizing the allocation of communication resources in an Internet of Vehicles based on the WSO algorithm, characterized in that: The following steps are involved: Step 1: Use 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 scenario 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 levels 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 ρ take a random value between 0 and 1. If ρ < ρ r If the error is not found, the defensive strategy is executed, otherwise the offensive strategy is executed, and the soldier position and fitness value are updated; 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 level and weight of the soldier 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, end to obtain the optimal resource allocation strategy.

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 individually by wire and the adjacent RSUs are connected by wire. 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 to V = {V1, V2, ..., V n }, the vehicle communicates with the RSU within its communication range in PC5 mode and offloads 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 Where D n is the task data size, C n is the amount of computing resources required for the task data of the task unit, The maximum acceptable delay for completing the task, B n is the number of channel resource blocks / subchannels occupied when uploading tasks; there is a 5G base station in the scene, the 5G base station communicates with the surrounding RSUs in a wired manner, 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 , the 5G MEC server communicates with the 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 transmitted data size 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 ; 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, where each item takes a value of 0 or 1 and satisfies where b ni For vehicle n, there are two states: unloading or not unloading to a roadside MEC server. nb For vehicle n, the task only exists in two states: offloading or not offloading to the 5G MEC server. nc For vehicle n, the task only exists in two states: offloading or not offloading to the cloud server for calculation; 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 resource blocks required for the task selected 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 selected to communicate with the 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 value range of the number of resource blocks occupied by the vehicle task transmission selected to communicate with the RSU, and it is an integer; constraint C4 means 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, n ≤ x < n + 1, Among them, x is a continuous variable parameter; Substituting equation 5 into the optimization problem, we get: Formula 6: Equation 6 is a non-convex nonlinear problem. 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 soldier individual executing the offensive strategy is: Equation 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 soldier’s new position, 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 to execute 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 implementing 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, and 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 Formula 13. After reaching the maximum number of iterations, the best 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

  • Reactive power optimization method and system for power distribution network, and electronic equipment

    CN116914765A

  • Cognitive amplification for contextual game-theoretic analysis of courses of action addressing physical engagements

    US20100015579A1