Resource allocation method and device, equipment, storage medium and program product
Through the deep reinforcement learning model, the resource allocation information in the Internet of Vehicles network is predicted, and the connection between vehicles and base stations is optimized, which solves the resource occupation problem caused by high-speed movement in the Internet of Vehicles, and improves network throughput and user experience.
Patent Information
- Application Number
- CN202411025198.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-29
- Publication Date
- 2024-11-15
AI Technical Summary
The high-speed mobile characteristics of vehicles in the Internet of Vehicles lead to frequent handover of base stations, resulting in excessive wireless resources, and reducing network throughput and user network perception experience.
Adopting a deep reinforcement learning model, combining channel measurement information, base station connection information and resource block allocation information in the Internet of Vehicles network, predicting the base station connection information and resource block allocation information of the vehicle, optimizing resource allocation, reducing frequent switching of wireless resources, and improving the network Throughput.
Through the optimization resource allocation of deep reinforcement learning model, the excessive use of wireless resources is reduced, the overall network throughput and user network perception experience of the Internet of Vehicles network are improved, and the real-time and security of communications are enhanced.
Smart Images

Figure CN118972952A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of wireless communication technology, and in particular to a resource allocation method, device, equipment, storage medium and program product. Background Art
[0002] In related technologies, the wireless resource allocation method of the Internet of Vehicles is to use dynamic spectrum access technology to dynamically allocate wireless resources according to the communication needs and channel measurement information of different vehicles. However, due to the high-speed mobility of vehicles, the connected base stations are frequently switched, which will cause excessive occupation of wireless resources, resulting in low overall network throughput, thus affecting the user's network perception experience. Summary of the invention
[0003] The main purpose of this application is to provide a resource allocation method, device, equipment, storage medium and program product, aiming to solve the technical problem of low overall network throughput caused by the high-speed mobility characteristics of vehicles in the Internet of Vehicles.
[0004] To achieve the above objectives, the present application proposes a resource allocation method, comprising:
[0005] Obtain the current base station connection information, current resource block allocation information, current data rate and current channel gain of the vehicle in the Internet of Vehicles network;
[0006] Inputting current base station connection information, current resource block allocation information, current data rate and current channel gain into a deep reinforcement learning model to obtain predicted base station connection information and predicted resource block allocation information of the vehicle; wherein the state space of the deep reinforcement learning model includes historical base station connection information, historical resource block allocation information, historical data rate and historical channel gain of the vehicle, and the action space of the deep reinforcement learning model includes historical base station connection information and historical resource block allocation information;
[0007] Based on the predicted base station connection information and the predicted resource block allocation information, resources are allocated to the Internet of Vehicles network.
[0008] In one embodiment, the state space includes a state matrix for a plurality of time slots;
[0009] Before the step of inputting the current base station connection information, the current resource block allocation information, the current data rate and the current channel gain into the deep reinforcement learning model to obtain the predicted base station connection information and the predicted resource block allocation information of the vehicle, the method further includes:
[0010] Construct the current deep reinforcement learning model based on the state space, action space and preset reward function;
[0011] Determine the current state matrix from the state space;
[0012] Using the current deep reinforcement learning model, determine the predicted action based on the current state matrix;
[0013] Determine at least one predicted reward value based on the predicted action and a preset reward function;
[0014] Determine whether each predicted reward value is stored in a preset storage stack table;
[0015] If any predicted reward value is not stored in the preset storage stack table, each predicted reward value is stored in the preset storage stack table, and the action value is determined based on all preset reward values;
[0016] If the action value does not meet the preset value condition, the model parameters of the current deep reinforcement learning model are updated to obtain an updated deep reinforcement learning model;
[0017] The updated deep reinforcement learning model is used as the current deep reinforcement learning model, and the step of determining the current state matrix from the state space is returned.
[0018] Until the action value meets the preset value condition, the current deep reinforcement learning model is used as the deep reinforcement learning model.
[0019] In one embodiment, before the step of determining at least one predicted reward value according to the predicted action and the preset reward function, the resource allocation method further comprises:
[0020] A preset reward function is constructed based on the vehicle's data rate and the number of base station switching times.
[0021] In one embodiment, the step of determining at least one predicted reward value according to the predicted action and the preset reward function includes:
[0022] determining at least one predicted data rate based on the predicted action;
[0023] If the predicted data rate is greater than a preset rate threshold, determining a predicted reward value based on the predicted data rate and a preset reward function;
[0024] If the predicted data rate is less than or equal to the preset rate threshold, the preset penalty value is used as the predicted reward value.
[0025] In one embodiment, after the step of determining whether each predicted reward value is stored in the preset storage stack table, the method further includes:
[0026] If all predicted reward values have been stored in the preset storage stack table, the process returns to the step of determining the current state matrix from the state space.
[0027] In one embodiment, before the step of determining a preset reward function according to the data rate of the vehicle and the number of base station switching times, the method further includes:
[0028] determining an initial data rate based on base station connection information of the vehicle, a channel gain between the vehicle and the connected base station, and a data transmission power of the base station;
[0029] The vehicle data rate is determined based on the initial data rate and the resource block allocation information of the vehicle.
[0030] In addition, to achieve the above purpose, the present application also proposes a resource allocation device, the resource allocation device comprising:
[0031] An acquisition module is used to obtain the current base station connection information, current resource block allocation information, current data rate and current channel gain of the vehicle in the Internet of Vehicles network;
[0032] A prediction module is used to input current base station connection information, current resource block allocation information, current data rate and current channel gain into a deep reinforcement learning model to obtain predicted base station connection information and predicted resource block allocation information of the vehicle; wherein the state space of the deep reinforcement learning model includes historical base station connection information, historical resource block allocation information, historical data rate and historical channel gain of the vehicle, and the action space of the deep reinforcement learning model includes historical base station connection information and historical resource block allocation information;
[0033] The allocation module is used to allocate network resources in the Internet of Vehicles network according to the predicted base station connection information and the predicted resource block allocation information.
[0034] In addition, to achieve the above objectives, the present application also proposes a resource allocation device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the resource allocation method as described above.
[0035] In addition, to achieve the above objectives, the present application also proposes a storage medium, which is a computer-readable storage medium. A computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the resource allocation method as described above are implemented.
[0036] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps of the resource allocation method as described above are implemented.
[0037] One or more technical solutions proposed in this application have at least the following technical effects:
[0038] The present application provides a resource allocation method, apparatus, device, storage medium and program product. Through a deep reinforcement learning model, the channel measurement information, base station connection information and resource block allocation information of the vehicle in the Internet of Vehicles network at the current moment are combined to predict the base station connection information and resource block allocation information of the vehicle at the next moment, and allocate network resources in the Internet of Vehicles network. When determining the resource allocation action, the influence of the connection between the vehicle and the base station is taken into account, and resource allocation actions can be generated without frequently switching the vehicle to connect to the base station, thereby reducing the excessive occupation of wireless resources, improving the overall network throughput of the Internet of Vehicles network, and thereby improving the user network perception experience of the Internet of Vehicles network. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0041] Figure 1 This is a flow chart of the first embodiment of the resource allocation method of the present application;
[0042] Figure 2 This is a schematic diagram of the module structure of the resource allocation device according to an embodiment of the present application;
[0043] Figure 3 A schematic diagram of the device structure of the hardware operating environment involved in the resource allocation method in the embodiment of the present application.
[0044] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0045] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0046] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0047] The main solution of the embodiment of the present application is: obtaining the current base station connection information, current resource block allocation information, current data rate and current channel gain of the vehicle in the Internet of Vehicles network; inputting the current base station connection information, current resource block allocation information, current data rate and current channel gain into the deep reinforcement learning model to obtain the vehicle's predicted base station connection information and predicted resource block allocation information; wherein the state space of the deep reinforcement learning model includes the vehicle's historical base station connection information, historical resource block allocation information, historical data rate and historical channel gain, and the action space of the deep reinforcement learning model includes historical base station connection information and historical resource block allocation information; and performing resource allocation for network resources in the Internet of Vehicles network based on the predicted base station connection information and the predicted resource block allocation information.
[0048] With the continuous development and growth of the new energy vehicle market, the implementation of the Internet of Vehicles and autonomous driving technology has brought endless imagination. The Internet of Vehicles connects smart car terminals, pedestrian terminals and networked base stations. Through centralized-distributed management methods, it not only greatly improves the efficiency and safety of intelligent transportation, but also saves transportation energy. In the Internet of Vehicles network, smart car terminals have high mobility and frequent channel switching, so the allocation of wireless resources is also more complicated. For example, in areas with dense traffic such as intersections and viaducts, channel congestion, early switching, switching hysteresis, and frequent switching are more serious, and the demand for high-quality and low-latency perception of the communication network is more urgent. It can be seen that the frequent channel switching caused by the high mobility of vehicles will not only occupy a large amount of wireless network resources, but also seriously affect the performance of the Internet of Vehicles network. Therefore, how to formulate an effective resource allocation strategy under limited wireless resource conditions to avoid network channel congestion and frequent user switching in the Internet of Vehicles, resulting in low overall network throughput of the Internet of Vehicles and poor user network perception experience, is an important research topic in the field of wireless communication technology.
[0049] In related technologies, a common method for allocating wireless resources in Internet of Vehicles is to use dynamic spectrum access technology to dynamically allocate wireless resources according to the communication needs of different vehicles, or to use cooperative communication technology to achieve effective resource utilization through collaboration between vehicles. Among them, the resource allocation method mainly adopts a heuristic algorithm-based, traditional reinforcement learning-based or rule-based resource allocation method to set the transmission power and channel allocation.
[0050] First, the resource allocation method based on heuristic algorithms, currently the most commonly used methods are particle swarm optimization and convex optimization. According to the user's business needs and the current status of cellular network resources, the past scheduling experience is used to allocate and adjust the network's spectrum resources and transmission power. However, this method has high computational complexity. In the face of the frequent switching of user networks caused by the high-speed mobility characteristics of users in the Internet of Vehicles, it has poor adaptability and is difficult to converge or the performance after convergence cannot be guaranteed.
[0051] Secondly, the resource allocation method based on traditional reinforcement learning is to maximize the value of the reward function set by the system according to the interactive learning with the network environment. Although reinforcement learning can solve the defects of the resource allocation method of the heuristic algorithm and has the advantages of strong adaptability and low computational overhead, the traditional reinforcement learning method is prone to uncontrollable exploration during the learning process, resulting in repeated learning of the same wireless network environment information, which greatly reduces the learning efficiency and convergence speed of reinforcement learning. This poses a severe test to the low latency and high standards required for the safety of the Internet of Vehicles.
[0052] Finally, the rule-based resource allocation method is mainly based on the resource allocation method based on the busyness of the cellular channel. When the channel busy time is higher than the expected threshold, channel allocation and transmission power are lowered according to rules such as service level or resource application order. When it is lower than the expected threshold, the transmission power is increased and the corresponding channel allocation is performed according to specific rules. At the same time, feedback information can be added to each information exchange process to determine whether the current transmission power is the optimal transmission power, whether the information is accurate, and whether the channel quality meets the requirements, and the results are fed back to the sender to adjust the power and channel resources. This method generally only considers the communication quality, and does not consider the problem of resource occupation caused by frequent switching of vehicle channels affecting the maximization of wireless resource utilization. It is highly dependent on the model and sensitive to parameter uncertainty. Because there are many parameter settings, the calculation is complex and the system expansion is poor. In addition, most of the methods use feedback information to adjust parameters and allocate channel resources. Although this method can allocate resources more specifically according to the information fed back by the receiving end, the channel state changes rapidly as the vehicle moves at high speed, and channel measurement is more difficult. The channel measurement information fed back to the base station is very likely to be delayed, resulting in a possible deviation in the description of the channel state at the next moment, affecting the accuracy of resource allocation and the timeliness of channel switching.
[0053] In summary, compared with general mobile phone wireless communication networks, the Internet of Vehicles in intelligent transportation has the characteristics of distributed nature and frequent changes. Due to the high-speed movement of vehicles, channel state information changes very quickly, and channel measurement is more difficult, resulting in inaccurate and untimely allocation of wireless resources. At the same time, the base stations connected to the vehicles are frequently switched, which will cause excessive occupation of wireless resources, resulting in a decline in user network perception experience, and then causing traffic accidents and traffic congestion.
[0054] Therefore, the present application provides a solution, which uses a deep reinforcement learning model to combine the channel measurement information, base station connection information and resource block allocation information of the vehicle in the Internet of Vehicles network at the current moment, predict the base station connection information and resource block allocation information of the vehicle at the next moment, and allocate network resources in the Internet of Vehicles network. When determining the resource allocation action, the influence of the connection between the vehicle and the base station is taken into account, and resource allocation actions can be generated without frequent switching of the vehicle connection base station, thereby reducing the excessive occupation of wireless resources, improving the overall network throughput of the Internet of Vehicles network, and thus improving the user network perception experience of the Internet of Vehicles network. Correspondingly, when training the model, the present application establishes a preset reward function for the number of base station switches associated with the vehicle connection, so that the deep reinforcement learning model can generate resource allocation actions that do not require frequent switching of the vehicle connection base station as much as possible to avoid excessive occupation of wireless resources.
[0055] In addition, when training the deep reinforcement learning model, the present application uses a preset storage stack table to store the predicted reward value. When the predicted reward value is not stored in the preset storage stack table, the model parameters of the deep reinforcement learning model are updated. When the predicted reward value is already stored in the preset storage stack table, the model parameters of the deep reinforcement learning model are not updated. This prevents the deep reinforcement learning model from repeatedly learning the same network information, circumvents the shortcomings of uncontrollable exploration of traditional reinforcement learning, improves the learning efficiency and convergence speed of the deep reinforcement learning model, and better ensures the real-time communication of the Internet of Vehicles and the safety of the vehicle.
[0056] It should be noted that the execution subject of this embodiment may be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, a resource allocation device, etc. The following takes the resource allocation device as an example to illustrate this embodiment and the following embodiments.
[0057] Based on this, the embodiment of the present application provides a resource allocation method, referring to Figure 1 , Figure 1 This is a flowchart of the first embodiment of the resource allocation method of the present application.
[0058] In this embodiment, the resource allocation method may include steps S100 to S400:
[0059] Step S100, obtaining the current base station connection information, current resource block allocation information, current data rate and current channel gain of the vehicle in the Internet of Vehicles network.
[0060] Step S200, input the current base station connection information, current resource block allocation information, current data rate and current channel gain into the deep reinforcement learning model to obtain the predicted base station connection information and predicted resource block allocation information of the vehicle.
[0061] Among them, the state space of the deep reinforcement learning model includes the vehicle's historical base station connection information, historical resource block allocation information, historical data rate and historical channel gain, and the action space of the deep reinforcement learning model includes historical base station connection information and historical resource block allocation information.
[0062] Step S300: Allocate resources to the Internet of Vehicles network according to the predicted base station connection information and the predicted resource block allocation information.
[0063] It should be noted that the number of base stations in the Internet of Vehicles network is fixed, and the wireless resources of the Internet of Vehicles network are divided into time slots of the same length in the time domain and into resource blocks of the same length in the frequency domain. The current base station connection information may include the connection information between all vehicles and base stations in the Internet of Vehicles network in the current time slot, the current resource block allocation information may include the resource block information allocated to all vehicles in the Internet of Vehicles network in the current time slot, the current data rate may include the data rate of all vehicles in the Internet of Vehicles network in the current time slot, and the current channel gain may include the channel gain between all vehicles and the corresponding base stations in the Internet of Vehicles network in the current time slot. Therefore, the current base station connection information, the current resource block allocation information, the current data rate, and the current channel gain may represent the current status of all vehicles in the Internet of Vehicles network in the current time slot.
[0064] Among them, the number of vehicles in the Internet of Vehicles network is not fixed at different time slots. The predicted base station connection information may include the connection information between all vehicles and base stations in the Internet of Vehicles network at the next time slot after the current time slot. The predicted resource block allocation information may include the resource block information allocated to all vehicles in the Internet of Vehicles network at the next time slot after the current time slot. The resource allocation device may dynamically adjust and set the spectrum and power of the Internet of Vehicles network at the next time slot after the current time slot based on the predicted base station connection information and the predicted resource block allocation information to realize resource allocation for the Internet of Vehicles network.
[0065] In this embodiment, if there are B base stations in the Internet of Vehicles network, B = {b1, b2, ..., b B}, each base station can connect U vehicles U = {u1,u2,…,u U}, K resource blocks can be allocated to T time slots in the time domain, where T = {t1, t2, …, t T}, K={k1,k2,…,k K}, then the resource block allocation information is represented as r u,k (t), the base station connection information is represented as a u,b (t). In which, if the kth resource block is allocated to vehicle u at time slot t, then r u,k (t)=1, otherwise r u,k(t) = 0, if vehicle u is connected to base station b at time slot t, then a u,b (t)=1, otherwise it is a u,b (t) = 0,
[0066] Taking into account the high-speed mobility characteristics of vehicles in the Internet of Vehicles network, this embodiment sets the mobility of the vehicle to follow the Gauss-Markov model, constructs a deep reinforcement learning model, connects the base station and wireless resources with the vehicle through the deep reinforcement learning model, and generates resource allocation actions, so as to avoid unnecessary channel switching events as much as possible, thereby improving the user's network perception experience.
[0067] Among them, the state space S of the deep reinforcement learning model can include the state matrix of T time slots, and the state matrix can be expressed as:
[0068]
[0069] S(t) is the state matrix at time slot t, g u,b (t-1) is the channel gain between vehicle u and base station b at time slot t-1, is the data rate of vehicle U at time slot t-1, is the initial data rate at time slot t-1.
[0070] Correspondingly, the action in the action space Act can be expressed as:
[0071] Act(t)={a 1,1 (t),…,a U,B (t),r 1,1 (t),…,r U,K (t)}
[0072] Act(t) is the action at time slot t.
[0073] In one example, if U = 1, 2; B = 1, 2; K = 1, 2, if in time slot t-1, vehicle 1 is connected to base station 1, the allocated resource block is 2; vehicle 2 is connected to base station 2, the allocated resource block is 2; then a 1,1 (t-1),…,a U,B (t-1) = {1, 0, 0, 1}; r 1,1 (t-1),…,r U,K (t-1) = {0, 1, 0, 1};
[0074] Therefore, using the state space S and the action space Act, the deep reinforcement learning model constructed and trained can predict the resource allocation actions of each vehicle in the next time slot of the Internet of Vehicles network based on the current state matrix of each vehicle in the current time slot of the Internet of Vehicles network.
[0075] Therefore, this embodiment provides a resource allocation method, which uses a deep reinforcement learning model to combine the channel measurement information, base station connection information and resource block allocation information of the vehicle in the Internet of Vehicles network at the current moment, predicts the base station connection information and resource block allocation information of the vehicle at the next moment, and allocates network resources in the Internet of Vehicles network. When determining the resource allocation action, the influence of the connection between the vehicle and the base station is taken into account, and a resource allocation action can be generated without frequently switching the vehicle to connect to the base station, thereby reducing the excessive occupation of wireless resources, improving the overall network throughput of the Internet of Vehicles network, and thus improving the user network perception experience of the Internet of Vehicles network. Among them, the construction and training method of the deep reinforcement learning model is as follows.
[0076] In a feasible implementation manner, the state space includes a state matrix of multiple time slots. Before step S200, the resource allocation method may further include steps A10 to A90:
[0077] Step A10, constructing the current deep reinforcement learning model according to the state space, action space and preset reward function.
[0078] Step A20, determining the current state matrix from the state space.
[0079] Step A30, using the current deep reinforcement learning model, according to the current state matrix, determines the predicted action.
[0080] Step A40: determining at least one predicted reward value according to the predicted action and the preset reward function.
[0081] Step A50, determining whether each predicted reward value is stored in a preset storage stack table.
[0082] Step A60: If any predicted reward value is not stored in the preset storage stack table, each predicted reward value is stored in the preset storage stack table, and the action value is determined according to all preset reward values.
[0083] Step A70: If the action value does not meet the preset value condition, the model parameters of the current deep reinforcement learning model are updated to obtain an updated deep reinforcement learning model.
[0084] Step A80, using the updated deep reinforcement learning model as the current deep reinforcement learning model, and returning to execute step A20.
[0085] Step A30, until the action value meets the preset value condition, the current deep reinforcement learning model is used as the deep reinforcement learning model.
[0086] In this embodiment, after step A50, the resource allocation method may further include: if all predicted reward values have been stored in the preset storage stack table, returning to execute step A20.
[0087] It should be noted that the vehicle selects the predicted action Act(t) and the predicted reward value R(t) based on the current state matrix S(t), and its state will change after executing the predicted action Act(t). In order to record the current state and predicted action, the Q value table Q(S(t), Act(t)) is referenced, and the reinforcement learning model is trained based on the Q-learning algorithm. In addition, during the model training process, multi-stack is used to record the wireless network state and vehicle state in the state matrix.
[0088] Among them, the preset storage stack table can be defined as:
[0089]
[0090] L and s represent the length and number of stacks in the preset storage stack table. s Each unit in will record at least one predicted reward value R(t) of the current state matrix S(t) selected for the predicted action Act(t). The length and number of stacks in the preset storage stack table are determined by the number of base stations in the entire network, the maximum number of users that can be accommodated, and other related factors.
[0091] It is understandable that during the model training process, after each model iteration obtains the predicted reward value, each predicted reward value R(t) is compared with the records of multiple stacks in the preset storage stack table to determine whether the corresponding stack needs to be updated. If it is determined that the corresponding stack in the preset storage stack table needs to be updated, the current predicted reward values R(t) are recorded in the corresponding stack. If it is determined that the current predicted reward values R(t) have been recorded in the corresponding stack, the model does not need to learn the current network environment, the model is not updated, and the next iteration is entered.
[0092] In this embodiment, before step A10, the resource allocation method may further include: constructing a preset reward function according to the data rate of the vehicle and the number of base station switching times.
[0093] It should be noted that, using Formula 1, a preset reward function can be constructed according to the vehicle's data rate and the number of base station switching times. Formula 1 is:
[0094]
[0095] R u,b(t) is the data rate of vehicle u at time slot t. In order to reduce the frequent base station switching problem caused by high-speed user movement, a penalty factor is introduced in the preset reward function. is a constant less than 0, n is the number of base station switches from time slot t-1 to time slot t, P is a preset penalty value, and the preset rate threshold is the minimum data rate threshold to ensure the communication quality of the vehicle.
[0096] In this embodiment, before step A10, the resource allocation method may also include: determining the initial data rate based on the base station connection information of the vehicle, the channel gain between the vehicle and the connected base station, and the data transmission power of the base station; determining the data rate based on the initial data rate and the resource block allocation information of the vehicle.
[0097] It should be noted that, using Formula 2, according to the base station connection information a of the vehicle u,b (t), the channel gain g between the vehicle and the connected base station u,b (t-1) and the data transmission power p of the base station t , determine the initial data rate Formula 2 is:
[0098]
[0099]
[0100] γ u,b (t) is the signal-to-noise ratio of vehicle u connected to base station b at time slot t, σ 2 is the Gaussian white noise power, and W is the bandwidth of a resource block.
[0101] Formula 3 is used to determine the data rate based on the initial data rate and the resource block allocation information of the vehicle. Formula 3 is:
[0102]
[0103] In this embodiment, step A40 may include: determining at least one predicted data rate based on the predicted action; if the predicted data rate is greater than a preset rate threshold, determining a predicted reward value based on the predicted data rate and a preset reward function; if the predicted data rate is less than or equal to the preset rate threshold, using a preset penalty value as the predicted reward value.
[0104] It should be noted that the prediction action may include the predicted base station connection information and predicted resource block allocation information of at least one vehicle in one iteration. Using formulas 2 and 3, the data rate of each vehicle can be determined based on at least one predicted base station connection information and at least one predicted resource block allocation information. If the base station to which the vehicle is connected switches from time slot t-1 to time slot t, the data rate of the vehicle can be reduced by a penalty factor to reflect that the base station switching will have a certain impact on the user's network perception experience, and thus using formula 4, the predicted data rate RUP of the vehicle can be obtained. u,b (t) is:
[0105]
[0106] Then, the predicted reward value of each vehicle can be determined according to each predicted data rate using Formula 1. That is, in one iteration, the predicted reward value corresponding to at least one vehicle can be obtained using Formula 1.
[0107] In a specific implementation, each predicted reward value R(t) can be compared with the records in the multi-stack according to the following formula 5 to determine whether to update the corresponding stack. Formula 5 is:
[0108]
[0109] Among them, R(S(t), Act(t)) can include all predicted reward values R(t) for executing action Act(t) in state S(t). (t mod s) = i represents the predicted reward value R(t) at time slot t that should be consistent with the stack v i The units in are compared. is a binary conditional function. X=0 represents is true, that is, stack v i The record unit in is different from at least one predicted reward value R(t), and all predicted reward values R(t) have not been stored in stack v i No predicted reward values are stored in the stack v. X = 1 means that all predicted reward values R(t) are already in the stack v i So τ∈{0,1}. If τ=0, it means that the predicted reward value R(t) has not been stored in any stack. If τ=1, it means that the predicted reward value R(t) has been stored in the stack.
[0110] When the predicted reward value is not stored in all the stacks, each predicted reward value can be stored in the preset storage stack table according to the following formula 6. Formula 6 is:
[0111]
[0112] Represents stack v iThe 1+(t-1) / sth unit in is used to store the predicted reward value R(t).
[0113] After updating the preset storage stack table, the action value Q can be updated based on the reward value R(S(t), Act(t)) and the state matrix S(t) recorded in the preset storage stack table using Formula 7. Formula 7 is:
[0114]
[0115] Among them, S(t+1) and Act(t+1) are the state matrix and action after executing the predicted action Act(t) under the state matrix S(t), α is the learning step size, α∈[0,1), and β is the discount factor, β∈[0,1). In each iteration, the allocation action of each resource block will learn the network environment from the stack. Since the network state in the stack is not repeated, it can better avoid the disadvantages of uncontrollable exploration that is prone to occur in traditional reinforcement learning, avoid the model from repeatedly learning the same network state, and improve the learning efficiency and convergence speed of the model.
[0116] After the action value is updated, the selection of the predicted action adopts a greedy strategy, and the predicted action Act(t) corresponding to the maximum action value Q(S(t), A(t)) is selected under the state matrix S(t). When the action value Q does not meet the preset value condition, the current deep learning model is updated according to the action value and the set threshold, and the new state matrix and action are obtained again by returning to step A20, and the predicted reward value is calculated. When the action value Q meets the preset value condition or the number of model iterations reaches the maximum number of iterations, the iteration is terminated, the action is returned, and the deep reinforcement learning model is obtained. The preset value condition can be that the action value is greater than or equal to the set threshold.
[0117] Therefore, the objective function of the deep reinforcement learning model training of this embodiment is as follows: Formula 8. While pursuing the goal of maximizing the overall user data rate during training, a penalty factor for base station switching is introduced, so that the deep reinforcement learning model can generate resource allocation actions that do not require frequent switching of vehicle connection base stations as much as possible, thereby reducing frequent base station switching caused by high-speed movement. Formula 8 is:
[0118]
[0119]
[0120]
[0121]
[0122]
[0123]
[0124] R th is the preset rate threshold.
[0125] Therefore, this embodiment provides a resource allocation method. During model training, a preset reward function for the number of base station switching times associated with vehicle connections is established, so that the deep reinforcement learning model can generate resource allocation actions that do not require frequent switching of vehicle connection base stations as much as possible, to avoid excessive occupation of wireless resources.
[0126] In addition, when training the deep reinforcement learning model, a preset storage stack table is used to store the predicted reward value. The model parameters of the deep reinforcement learning model are updated only when the predicted reward value is not stored in the preset storage stack table. When the predicted reward value is already stored in the preset storage stack table, the model parameters of the deep reinforcement learning model are not updated. This prevents the deep reinforcement learning model from repeatedly learning the same network information, circumvents the shortcomings of uncontrollable exploration of traditional reinforcement learning, improves the learning efficiency and convergence speed of the deep reinforcement learning model, and better ensures the real-time communication of the Internet of Vehicles and the safety of the vehicle.
[0127] This application also provides a resource allocation device, please refer to Figure 2 , the resource allocation device may include:
[0128] An acquisition module 10 is used to acquire current base station connection information, current resource block allocation information, current data rate and current channel gain of a vehicle in the Internet of Vehicles network;
[0129] The prediction module 20 is used to input the current base station connection information, the current resource block allocation information, the current data rate and the current channel gain into the deep reinforcement learning model to obtain the predicted base station connection information and predicted resource block allocation information of the vehicle; wherein the state space of the deep reinforcement learning model includes the historical base station connection information, the historical resource block allocation information, the historical data rate and the historical channel gain of the vehicle, and the action space of the deep reinforcement learning model includes the historical base station connection information and the historical resource block allocation information;
[0130] The allocation module 30 is used to allocate resources to the Internet of Vehicles network according to the predicted base station connection information and the predicted resource block allocation information.
[0131] The resource allocation device provided by the present application adopts the resource allocation method in the above embodiment, which can solve the technical problem that the high-speed mobility characteristics of vehicles in the Internet of Vehicles lead to low overall network throughput. Compared with the relevant technology, the beneficial effects of the resource allocation device provided by the present application are the same as the beneficial effects of the resource allocation method provided by the above embodiment, and other technical features in the resource allocation device are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0132] The present application provides a resource allocation device, which includes: at least one processor; and a memory that is communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the resource allocation method in the above-mentioned embodiment 1.
[0133] Reference below Figure 3 , which shows a schematic diagram of the structure of a resource allocation device suitable for implementing the embodiment of the present application. The resource allocation device in the embodiment of the present application may include but is not limited to mobile terminals such as laptop computers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), etc., and fixed terminals such as desktop computers, etc. Figure 3 The resource allocation device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0134] like Figure 3 As shown, the resource allocation device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the resource allocation device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 may allow the resource allocation device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a resource allocation device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems may be implemented or have alternatively.
[0135] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0136] The resource allocation device provided by the present application adopts the resource allocation method in the above embodiment, which can solve the technical problem that the high-speed mobility characteristics of vehicles in the Internet of Vehicles lead to low overall network throughput. Compared with the relevant technology, the beneficial effects of the resource allocation device provided by the present application are the same as the beneficial effects of the resource allocation method provided by the above embodiment, and the other technical features in the resource allocation device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0137] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0138] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0139] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the resource allocation method in the above-mentioned embodiment.
[0140] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.
[0141] The computer-readable storage medium may be included in the resource allocation device; or may exist independently without being assembled into the resource allocation device.
[0142] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the resource allocation device, the resource allocation device: obtains the current base station connection information, current resource block allocation information, current data rate and current channel gain of the vehicle in the Internet of Vehicles network; inputs the current base station connection information, current resource block allocation information, current data rate and current channel gain into the deep reinforcement learning model to obtain the predicted base station connection information and predicted resource block allocation information of the vehicle; wherein the state space of the deep reinforcement learning model includes the historical base station connection information, historical resource block allocation information, historical data rate and historical channel gain of the vehicle, and the action space of the deep reinforcement learning model includes the historical base station connection information and historical resource block allocation information; and allocates resources to the Internet of Vehicles network according to the predicted base station connection information and the predicted resource block allocation information.
[0143] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0144] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0145] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0146] The readable storage medium provided in this application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned resource allocation method, and can solve the technical problem of low overall network throughput caused by the high-speed mobility characteristics of vehicles in the Internet of Vehicles. Compared with the related art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the resource allocation method provided in the above-mentioned embodiment, and will not be repeated here.
[0147] The present application also provides a computer program product, including a computer program, which implements the steps of the resource allocation method as described above when executed by a processor.
[0148] The computer program product provided by this application can solve the technical problem that the high-speed mobility characteristics of vehicles in the Internet of Vehicles lead to low overall network throughput. Compared with the relevant technology, the beneficial effects of the computer program product provided by this application are the same as the beneficial effects of the resource allocation method provided by the above embodiment, which will not be repeated here.
[0149] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A resource allocation method, It is characterized in that The resource allocation method comprises: Obtain the current base station connection information, current resource block allocation information, current data rate and current channel gain of the vehicle in the Internet of Vehicles network; Inputting the current base station connection information, the current resource block allocation information, the current data rate and the current channel gain into a deep reinforcement learning model to obtain predicted base station connection information and predicted resource block allocation information of the vehicle; wherein the state space of the deep reinforcement learning model includes historical base station connection information, historical resource block allocation information, historical data rate and historical channel gain of the vehicle, and the action space of the deep reinforcement learning model includes the historical base station connection information and the historical resource block allocation information; Resources are allocated to the Internet of Vehicles network according to the predicted base station connection information and the predicted resource block allocation information.
2. The resource allocation method according to claim 1, It is characterized in that The state space includes a state matrix of a plurality of time slots; Before the step of inputting the current base station connection information, the current resource block allocation information, the current data rate and the current channel gain into a deep reinforcement learning model to obtain the predicted base station connection information and predicted resource block allocation information of the vehicle, the method further includes: Constructing a current deep reinforcement learning model according to the state space, the action space and a preset reward function; determining a current state matrix from the state space; Determining a predicted action based on the current state matrix using the current deep reinforcement learning model; Determining at least one predicted reward value according to the predicted action and a preset reward function; Determining whether each of the predicted reward values is stored in a preset storage stack table; If any predicted reward value is not stored in the preset storage stack table, each predicted reward value is stored in the preset storage stack table, and the action value is determined according to all the preset reward values; If the action value does not meet the preset value condition, updating the model parameters of the current deep reinforcement learning model to obtain an updated deep reinforcement learning model; Using the updated deep reinforcement learning model as the current deep reinforcement learning model, and returning to the step of determining a current state matrix from the state space; Until the action value satisfies the preset value condition, the current deep reinforcement learning model is used as the deep reinforcement learning model.
3. The resource allocation method according to claim 2, It is characterized in that Before the step of determining at least one predicted reward value according to the predicted action and the preset reward function, the resource allocation method further includes: The preset reward function is constructed according to the data rate of the vehicle and the number of base station switching times.
4. The resource allocation method according to claim 2, It is characterized in that The step of determining at least one predicted reward value according to the predicted action and the preset reward function comprises: determining at least one predicted data rate based on the predicted action; If the predicted data rate is greater than a preset rate threshold, determining the predicted reward value according to the predicted data rate and the preset reward function; If the predicted data rate is less than or equal to the preset rate threshold, a preset penalty value is used as the predicted reward value.
5. The resource allocation method according to claim 2, It is characterized in that After the step of determining whether each predicted reward value is stored in a preset storage stack table, the method further includes: If all the predicted reward values have been stored in the preset storage stack table, the process returns to the step of determining the current state matrix from the state space.
6. The resource allocation method according to claim 3, It is characterized in that Before the step of determining the preset reward function according to the data rate of the vehicle and the number of base station switching times, the method further includes: determining an initial data rate according to base station connection information of the vehicle, a channel gain between the vehicle and the connected base station, and a data transmission power of the base station; The data rate is determined according to the initial data rate and resource block allocation information of the vehicle.
7. A resource allocation device, It is characterized in that The resource allocation device comprises: An acquisition module is used to obtain the current base station connection information, current resource block allocation information, current data rate and current channel gain of the vehicle in the Internet of Vehicles network; A prediction module, used to input the current base station connection information, the current resource block allocation information, the current data rate and the current channel gain into a deep reinforcement learning model to obtain the predicted base station connection information and predicted resource block allocation information of the vehicle; wherein the state space of the deep reinforcement learning model includes the historical base station connection information, the historical resource block allocation information, the historical data rate and the historical channel gain of the vehicle, and the action space of the deep reinforcement learning model includes the historical base station connection information and the historical resource block allocation information; An allocation module is used to allocate resources to the Internet of Vehicles network according to the predicted base station connection information and the predicted resource block allocation information.
8. A resource allocation device, It is characterized in that The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the resource allocation method according to any one of claims 1 to 6.
9. A storage medium, It is characterized in that The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the resource allocation method according to any one of claims 1 to 6 are implemented.
10. A computer program product, It is characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the resource allocation method according to any one of claims 1 to 6 are implemented.
