A video semantic driven resource allocation method in internet of vehicles
By constructing a resource allocation method driven by video semantics in the Internet of Vehicles (IoV), and combining reinforcement learning theory and the Faster R-CNN algorithm to optimize spectrum allocation, the resource allocation problem of video semantic understanding tasks in IoV is solved, achieving high target detection accuracy and adaptability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-11
- Publication Date
- 2026-04-07
AI Technical Summary
Existing vehicle-to-everything (V2X) resource allocation methods fail to effectively consider the semantic information of video transmission, resulting in resource allocation no longer being optimal when video is used for semantic understanding tasks such as object detection, and failing to adapt to the non-steady-state channel conditions of V2X.
Combining reinforcement learning theory, a video semantic-driven resource allocation method is constructed. By building a video semantic communication system model between the vehicle end and the edge server end, spectrum allocation is optimized, the Faster R-CNN algorithm is used for target detection, a relationship model between QP value, compression rate, detection accuracy and video bitrate is established, and the resource allocation optimization model is trained using the reinforcement Q-learning algorithm.
It achieves spectrum allocation optimization from vehicle end to edge server end, maximizes average target detection accuracy, adapts to the non-steady-state channel conditions of vehicle network, provides low-complexity resource allocation algorithm, and improves the accuracy of video semantic understanding.
Smart Images

Figure CN112637816B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of vehicle networking and relates to a video transmission system in the edge computing scenario of vehicle networking, specifically a video semantic-driven resource allocation method in vehicle networking. Background Technology
[0002] With the development of artificial intelligence and vehicle-to-everything (V2X) technologies, the integration of intelligent computing and vehicle communication has become an inevitable trend. Currently, in V2X scenarios, the demand for offloading a large number of computing tasks from the vehicle end to the edge server end puts enormous pressure on V2X communication resources. Therefore, it is urgent to study efficient resource allocation methods to improve resource utilization in V2X.
[0003] Existing resource allocation methods in vehicle-to-everything (V2X) networks can be divided into two categories: Quality of Service (QoS)-driven resource allocation methods and Quality of Experience (QoE)-driven resource allocation methods. QoS-based resource allocation methods primarily optimize network efficiency metrics such as throughput, transmission rate, latency, and jitter by rationally allocating communication resources such as bandwidth, power, and latency, focusing on the physical or network layer of the communication system. QoE-based resource allocation methods, on the other hand, primarily improve the smoothness, clarity, and user satisfaction of transmitted video by allocating communication resources to meet the various subjective needs of receiving users.
[0004] The two traditional resource allocation methods described above are geared towards the transmission network or human users, without considering the transmitted video content or semantic information. However, when the receiving end of the video transmission is an intelligent machine agent, and the transmitted video is used for semantic understanding tasks such as object detection, the goal of resource allocation is no longer network efficiency or user experience, but rather the accuracy of video understanding or analysis. In this case, traditional QoS or QoE resource allocation methods are no longer optimal.
[0005] Existing research has proposed the concept of Quality of Content (QoC) to maximize average object detection accuracy and has proposed video coding resource allocation schemes. However, it has not provided a specific quantitative model for video content quality, has not considered the semantic differences between different videos from a video semantic perspective, and has not taken into account resource allocation under non-steady-state channel conditions in vehicular networks. Therefore, it is necessary to study more efficient resource allocation guidance methods based on video semantics. Summary of the Invention
[0006] To address the aforementioned problems, this invention, combining reinforcement learning theory, provides a video semantic-driven resource allocation method for vehicle-to-everything (V2X) networks. This method optimizes spectrum allocation from the vehicle end to the edge server end, thereby maximizing the average target detection accuracy.
[0007] The specific steps include:
[0008] Step 1: Construct a vehicle-to-everything (V2X) system model for video semantic communication between the vehicle and the edge server.
[0009] The system model includes cellular base stations (BS) and M intelligent connected vehicles equipped with cameras.
[0010] The communication and computation process of the entire system is as follows: 1) The vehicle initiates a video transmission request, preprocesses the acquired video, obtains video information, and uploads it to the edge server. At the same time, the edge server obtains Channel State Information (CSI); 2) The edge server obtains the video information and CSI, and obtains the optimal resource allocation result based on the video semantic-driven resource allocation method; 3) The vehicle completes the video encoding and compression according to the resource allocation result, and transmits it to the edge server through the wireless channel; 4) The edge server decodes the received video, performs semantic understanding on the video, and feeds back the results to each vehicle.
[0011] Step 2: Construct a video semantic-driven resource allocation guidance model;
[0012] Taking object detection, a fundamental task in video semantic understanding, as an example, the semantics of a video are the categories and number of objects to be detected, and the accuracy of video semantic understanding is the accuracy of object detection.
[0013] The detailed resource allocation guidance modeling steps are as follows:
[0014] Step 201: Construct the relationship between video quantization parameters (QP) values and compression rate;
[0015] The H.265 video encoding and compression standard is used to encode and compress video data, ensuring that the video transmission bitrate is less than or equal to the transmission rate limited by bandwidth. Different QP values correspond to different compression step sizes during the compression encoding process; the smaller the QP value, the smaller the compression step size, the closer the video bitrate is to the original video bitrate, and the greater the bandwidth required for transmission.
[0016] Step 202: Establish the relationship between compression ratio and detection accuracy;
[0017] We employed a Faster Region-based Convolutional Neural Network (Faster R-CNN) algorithm to perform object detection on videos with varying degrees of compression from the Caltech and Waymo datasets. The target types primarily included pedestrians, vehicles, and traffic lights. In both datasets, 20% of the video data was used for testing, and 80% was used for training.
[0018] Step 203: Establish the relationship between QP value and detection accuracy;
[0019] The experimental data of QP values and corresponding detection accuracies for different compression ratios in step 202 were statistically analyzed, and the following exponential relationship model was fitted based on the data results:
[0020]
[0021] q represents the video quantization parameter QP value, P represents the detection accuracy, and α1, α2, and α3 are the model parameters. Mean Square Error (MSE) is introduced as the loss function, and regression methods are used to solve for the model parameters.
[0022] Step 204: Establish the relationship between QP value and video bitrate;
[0023] The following exponential relationship model was fitted based on the experiment:
[0024] q=β1exp(β2R m )
[0025] R m Let β1 and β2 be the bitrate of the video captured by the m-th vehicle, exp(·) represent the exponential function with the natural constant e as the base. We still use MSE as the loss function and solve for the model parameters using regression methods.
[0026] Step 205: Establish the relationship between detection accuracy and video bitrate.
[0027] Combining the relationship models obtained from the above two steps, the relationship model between detection accuracy and bitrate can be obtained as follows:
[0028]
[0029] The bitrate is related to bandwidth resources during transmission, thus yielding a bandwidth resource allocation guidance model for improving video semantic understanding accuracy (i.e., detection accuracy in object detection tasks). The aforementioned model of the relationship between object detection accuracy and bitrate theoretically provides an optimization direction for semantic-driven resource allocation algorithms.
[0030] Step 3: Calculate the detection accuracy per unit vehicle using the video bitrate, and construct a video semantic-driven resource allocation optimization model in the Internet of Vehicles by maximizing the detection accuracy per unit vehicle as the optimization objective.
[0031] The optimized model is shown below:
[0032]
[0033] M represents the total number of vehicles, and N represents the total number of target categories. δ n This represents the weight of different detection categories, meaning that different categories of detection targets (such as people, vehicles, and traffic lights) may have different importance in semantic analysis tasks. m,n I represents the number (density) of targets to be detected in the original video. m,n P n This indicates the number of targets that can be correctly detected. B m This is the bandwidth allocated to each vehicle.
[0034] Constraint C1 indicates that the bitrate of the transmitted video is limited by the transmission rate of the vehicles, where the transmission rate of each vehicle in time slot t is as follows:
[0035]
[0036] B m Bandwidth allocated to each vehicle, S m h m (t) and These represent transmit power, channel gain, and noise power, respectively. Channel gain h m (t) includes path loss h pl Shadow decay h sd and small-scale fading Among them, h pl =148.1+37.6log 10 (d m (dB)(d) m (km) represents the distance between the m-th vehicle and the edge server; h sd It follows a log-normal distribution model with a standard deviation of 8 and a mean of 0; (t e It is the time interval during which the channel remains in a stable state, e h It is by The processing noise derived from the distribution, where ρ m (t e )=J0(2πv m t e / λ c ) denotes the channel autocorrelation function, J0(·) is the zeroth-order Bessel function of the first kind, and λ cIt is the center carrier wavelength, v m (where m is the speed of the m-th vehicle);
[0037] Constraint C2 means that the sum of the bandwidth allocated to all vehicles does not exceed the total bandwidth B. total ;
[0038] Constraint C3 indicates that the bandwidth allocated to each vehicle is not less than limit B. min ;
[0039] Constraint C4 indicates that the detection accuracy for each target is not less than the threshold P. min ;
[0040] Constraint C5 represents the video transmission time period. Δt = t1 (time spent by the vehicle preprocessing the video and the edge server obtaining the CSI) + t2 (time spent by the edge server obtaining the resource allocation result by the resource allocation method), where T is the total time for the system to complete one video transmission.
[0041] Step 4: Simplification of the video semantic-driven resource allocation optimization model;
[0042] Since the model parameters obtained in step two are α1 < 0, α2 > 1, and β2 < 0, and because... ( (It is the differentiation operator), so the function P(q(R) m It monotonically increases in the domain, when The maximum value is taken at the specified time. Therefore, the resource allocation problem P1 can be transformed into:
[0043]
[0044] Step 5: Based on the video semantic-driven resource allocation optimization model, construct and train the reinforcement Q-learning algorithm model;
[0045] Step 501: Set hyperparameters;
[0046] The training effect of the enhanced Q-learning algorithm is strongly correlated with its main parameters. The main parameters of this model are set as follows: 1) The learning rate α is set to 0.1, so that the algorithm retains 90% of the historical training results and pays more attention to past experience; 2) The discount factor γ is set to 0.9, so that the algorithm considers 90% of the benefits of the next step and pays more attention to long-term benefits; 3) ε in the ε-greedy strategy is set to 0.8, so that the algorithm has 20% trial space and avoids getting trapped in local optima.
[0047] Step 502: Construct the state space;
[0048] The state space is the bandwidth S = {s | s = (B1, B2, ..., B} allocated to M vehicles. m ,…B M),B m ∈[B min B total )}.
[0049] Step 503: Construct the motion space;
[0050] The action space represents the bandwidth allocation changes for M vehicles. To simplify the Q-value table in the model, it is assumed that the minimum step size ΔB of the bandwidth change is 1% of the total bandwidth. When M=3, each action corresponds to only two vehicles with bandwidth increases or decreases, therefore the entire action space has a total of six action combinations, which can be represented as A={a|a∈{(1,2),(1,3),(2,1),(2,3),(3,1),(3,2)}}, where (i,j) represents (B i +ΔB,B j -ΔB), i,j=1,2,3.
[0051] Step 504: Build environmental feedback;
[0052] set up The reward value of the environmental feedback is the difference between F in the next state and the current state, ΔF = F' - F. Since the goal of training is to obtain the optimal value of F, we hope that F will be optimized in the direction of continuous increase. When F decreases, the feedback function is negative and a negative reward is obtained; when F increases, the feedback function is positive and a positive reward is obtained.
[0053] When choosing the end point of a round, the specific characteristics of this model must be considered. Unlike the typical scenarios where reinforcement Q-learning algorithms are applicable, training F to obtain the optimal value does not have a clear endpoint like in game problems. Instead, the optimal value of F is unknown. Therefore, the boundary condition B... m <B min As the end point of a round, the maximum step value can also be set to end the round.
[0054] Step 505: Train the reinforcement Q-learning algorithm model to obtain a model for solving the resource allocation optimization problem driven by video semantics in the Internet of Vehicles.
[0055] The resource allocation scheme allocates appropriate bandwidth resources to each vehicle on the edge server to maximize the detection accuracy per vehicle.
[0056] The advantages of this invention are:
[0057] (1) A video semantic-driven resource allocation method in the Internet of Vehicles optimizes the spectrum allocation from the vehicle end to the edge server end and maximizes the average target detection accuracy;
[0058] (2) A video semantic-driven resource allocation method in the Internet of Vehicles, which constructs a semantic-driven resource allocation guidance model, takes into account the semantic differences of different videos from the perspective of video semantics, and theoretically gives the optimization direction of the semantic-driven resource allocation algorithm.
[0059] (3) A video semantic-driven resource allocation method in the Internet of Vehicles introduces a reinforcement Q-learning algorithm model, considers the non-steady-state channel conditions of the Internet of Vehicles, solves the resource allocation problem for video semantic tasks in the Internet of Vehicles, achieves good training convergence performance, and provides a low-complexity resource allocation algorithm. Attached Figure Description
[0060] Figure 1 This is a schematic diagram of a vehicle-to-everything (V2X) system model for video semantic communication between the vehicle and the edge server, constructed according to the present invention.
[0061] Figure 2 This is a schematic diagram of the semantic understanding accuracy modeling process of the present invention;
[0062] Figure 3 This is a schematic diagram illustrating the relationship between target detection accuracy and QP used in this invention.
[0063] Figure 4 The flowchart of the enhanced Q-learning algorithm model of this invention is shown below;
[0064] Figure 5 The reward function and iteration convergence performance of the enhanced Q-learning algorithm of this invention are shown in the graph.
[0065] Figure 6 This is a performance comparison chart of the present invention with the maximum number of correctly detected targets based on QoC, QoE, and QoS resource allocation schemes;
[0066] Figure 7 This is a comparison chart of bandwidth resource allocation results between the present invention and QoC-based, QoE-based, and QoS-based resource allocation schemes;
[0067] Figure 8 This is a performance comparison chart of the correct detection probability of the present invention with those of QoC-based, QoE-based, and QoS-based resource allocation schemes;
[0068] Figure 9 This is a performance comparison chart of the false detection or missed detection probabilities of the present invention with different resource allocation schemes based on QoC, QoE and QoS.
[0069] Figure 10 This is a comparison graph showing the relationship between the number of vehicles and the performance of resource allocation schemes based on QoC, QoE, and QoS.
[0070] Figure 11 This is a comparison graph showing the relationship between vehicle speed and resource allocation scheme performance of the present invention and those based on QoC, QoE, and QoS resource allocation schemes. Detailed Implementation
[0071] To better understand the technical principles of this invention, the embodiments of this invention will be described in detail below with reference to the accompanying drawings.
[0072] A video semantic-driven resource allocation algorithm in vehicular networks is applied to a vehicular network system for video semantic communication between vehicles and edge servers. First, a bandwidth resource allocation guidance model oriented towards video semantic understanding accuracy is constructed, establishing a relationship expression between detection accuracy and video bitrate. The optimization objective is to maximize the detection accuracy per vehicle, with constraints including the sum of allocated bandwidth for all vehicles not exceeding the total bandwidth limit, the allocated bandwidth of each vehicle not being less than the minimum bandwidth threshold, and the target detection accuracy not being less than the accuracy threshold. This forms the basis for the video semantic-driven resource allocation optimization model in vehicular networks.
[0073] Based on the optimization model, the state space, action space, and environmental feedback of the reinforcement Q-learning algorithm model for video semantic-driven resource allocation in the Internet of Vehicles are constructed.
[0074] Based on the instantaneous CSI of the vehicle to the edge server, the bandwidth allocation result of the vehicle in the previous time slot, the bandwidth increase / decrease scheme of the corresponding vehicle selected in the previous time slot, and the detection accuracy per unit vehicle calculated in the previous time slot, the reinforcement Q-learning algorithm model is trained to obtain a model for solving the resource allocation optimization problem driven by video semantics in the Internet of Vehicles.
[0075] The overall process includes five steps: establishing a system model, establishing a guiding model, proposing optimization problems and establishing an optimization model, simplifying the optimization model, establishing a reinforcement Q-learning algorithm model, and performing training. Specifically, establishing the video semantic-driven resource allocation guiding model includes constructing the relationships between QP value and compression rate, compression rate and detection accuracy, QP value and detection accuracy, QP value and video bitrate, and detection accuracy and video bitrate. Establishing the reinforcement Q-learning algorithm model and performing training includes setting hyperparameters, constructing the state space, constructing the action space, and constructing environmental feedback.
[0076] The specific steps are as follows:
[0077] Step 1: Construct a vehicle-to-everything (V2X) system model for video semantic communication between the vehicle and the edge server.
[0078] like Figure 1 As shown, the system model includes a BS and M intelligent connected vehicles equipped with cameras.
[0079] The communication and computation process of the entire system is as follows: 1) The vehicle initiates a video transmission request to the BS, preprocesses the acquired video to obtain video information, and uploads it to the edge server. At the same time, the edge server obtains CSI; 2) The edge server obtains the video information and CSI, and obtains the optimal resource allocation result according to the video semantic-driven resource allocation method; 3) The vehicle completes the video encoding and compression according to the resource allocation result, and transmits it to the edge server through the wireless channel. This process follows the wireless video transmission protocol; 4) The edge server decodes the received video, performs semantic understanding on the video, and feeds back the results to each vehicle. At the same time, the edge server can store the video or use it for other tasks, such as road traffic condition analysis.
[0080] Step 2: Construct a video semantic-driven resource allocation guidance model;
[0081] Taking object detection, a fundamental task in video semantic understanding, as an example, the semantics of a video are the categories and number of objects to be detected, and the accuracy of video semantic understanding is the accuracy of object detection.
[0082] Detailed resource allocation guidance modeling process, such as Figure 2 As shown, the specific modeling steps are as follows:
[0083] Step 201: Establish the relationship between QP value and compression ratio;
[0084] First, considering the limitations of communication resources in video transmission, the input video needs to be processed. The H.265 video encoding and compression standard is used to encode and compress the video data, ensuring that the video transmission bitrate is less than or equal to the transmission rate limited by bandwidth. Different QP values correspond to different compression step sizes during the compression encoding process; the smaller the QP value, the smaller the compression step size, the closer the video bitrate is to the original video bitrate, and the greater the bandwidth required for transmission.
[0085] Step 202: Establish the relationship between compression ratio and detection accuracy;
[0086] To investigate the impact of different compression methods on the accuracy of video semantic understanding under bandwidth constraints, this invention employs the representative Faster R-CNN algorithm to perform object detection on videos from the Caltech and Waymo datasets, which are widely used for traffic scene object detection, at different compression rates. The object types mainly include pedestrians, vehicles, and traffic lights. In both datasets, 20% of the video data was used for testing, and 80% was used for training. The trend of object detection accuracy under different compression rates was observed.
[0087] Step 203: Establish the relationship between QP value and detection accuracy;
[0088] like Figure 2 As shown, the detection accuracy decreases as the QP value increases from 15, 30 to 45. The target detection accuracy was statistically analyzed for compressed videos with different QP values, as shown below. Figure 3 The graph shown.
[0089] according to Figure 3 The curve trend was fitted to derive the following exponential relationship model:
[0090]
[0091] q represents the video quantization parameter QP value, P represents the detection accuracy, and α1, α2, and α3 are the model parameters. MSE is introduced as the loss function, and regression methods are used to solve for the model parameters.
[0092] The algorithm for solving the model parameters is as follows:
[0093] (1) Initialize model parameters: α = (α1, α2, α3);
[0094] (2) Input N real value data samples: (q (n) ,P (n) );
[0095] (3) Calculate the loss function:
[0096] (4) Let Find the optimal α;
[0097] (5) Optimal parameter solution process: use gradient descent method to iteratively solve until convergence.
[0098] Step 204: Establish the relationship between QP value and video bitrate;
[0099] The following exponential relationship model was fitted based on the experiment:
[0100] q=β1exp(β2R m )
[0101] R m Let β1 and β2 be the bitrate of the video captured by the m-th vehicle, and let MSE be the model parameters. We still use MSE as the loss function and solve for the model parameters using a regression method, repeating the model parameter solution algorithm in step 203 to obtain the model parameter values.
[0102] Step 205: Establish the relationship between detection accuracy and video bitrate.
[0103] Combining the relationship models obtained from the above two steps, the relationship model between detection accuracy and bitrate can be obtained as follows:
[0104]
[0105] The bitrate is related to bandwidth resources during transmission, thus yielding a bandwidth resource allocation guidance model for improving video semantic understanding accuracy (i.e., detection accuracy in object detection tasks). The aforementioned model of the relationship between object detection accuracy and bitrate theoretically provides an optimization direction for semantic-driven resource allocation algorithms.
[0106] Step 3: Calculate the detection accuracy per unit vehicle using the video bitrate, and construct a video semantic-driven resource allocation optimization model in the Internet of Vehicles by maximizing the detection accuracy per unit vehicle as the optimization objective.
[0107] The optimized model is shown below:
[0108]
[0109] M represents the total number of vehicles, and N represents the total number of target categories. δ n This represents the weight of different detection categories, meaning that different categories of detection targets (such as people, vehicles, and traffic lights) may have different importance in semantic analysis tasks. m,n I represents the number (density) of targets to be detected in the original video. m,n P n This indicates the number of targets that can be correctly detected, i.e., the video semantics that can be correctly understood. B m This is the bandwidth allocated to each vehicle.
[0110] Constraint C1, based on information transmission theory, indicates that the bitrate of transmitted video is limited by the transmission rate of the vehicles. The transmission rate of each vehicle in time slot t is as follows:
[0111]
[0112] B m Bandwidth allocated to each vehicle, S m h m (t) and These represent transmit power, channel gain, and noise power, respectively. Channel gain h m (t) includes path loss h pl Shadow decay h sd and small-scale fading The three loss or fading models are: 1) Path loss h pl =148.1+37.6log 10 (d m (dB)(d) m (km) is the distance between the m-th vehicle and the edge server); 2) Shadow fading h sd 3) The small-scale fading coefficients are represented as a Rayleigh distribution with unit variance and zero mean. Considering the time-varying characteristics of small-scale fading, the time-varying Rayleigh coefficients are modeled as an independent first-order autoregressive process. (t e It is the time interval during which the channel remains in a stable state, e h It is by The processing noise derived from the distribution, where ρ m (t e )=J0(2πv m t e / λ c ) denotes the channel autocorrelation function, J0(·) is the zeroth-order Bessel function of the first kind, and λ c It is the center carrier wavelength, v m (where m is the speed of the m-th vehicle);
[0113] In constraint C2, B total The total bandwidth indicates that the sum of the bandwidth allocated to all vehicles does not exceed the total bandwidth limit;
[0114] Constraint C3 indicates that the bandwidth allocated to each vehicle is not less than limit B. min ;
[0115] Constraint C4 indicates that the detection accuracy for each target is not less than the threshold P. min ;
[0116] Constraint C5 represents the video transmission time period. Δt = t1 (time spent by the vehicle preprocessing the video and the edge server obtaining the CSI) + t2 (time spent by the edge server obtaining the resource allocation result by the resource allocation method), where T is the total time taken for the system to complete one video transmission.
[0117] Step 4: Simplification of the video semantic-driven resource allocation optimization model;
[0118] Since the model parameters obtained in step two are α1 < 0, α2 > 1, and β2 < 0, and because... ( (It is the differentiation operator), so the function P(q(R) m It monotonically increases in the domain, when The maximum value is taken at the specified time. Therefore, the resource allocation problem P1 can be transformed into:
[0119]
[0120] Step 5: Based on the video semantic-driven resource allocation optimization model, construct and train the reinforcement Q-learning algorithm model;
[0121] Step 501: Set hyperparameters;
[0122] The training effect of the enhanced Q-learning algorithm is strongly correlated with its main parameters. The main parameters of this model are set as follows: 1) The learning rate α is set to 0.1, so that the algorithm retains 90% of the historical training results and pays more attention to past experience; 2) The discount factor γ is set to 0.9, so that the algorithm considers 90% of the benefits of the next step and pays more attention to long-term benefits; 3) ε in the ε-greedy strategy is set to 0.8, so that the algorithm has 20% trial space and avoids getting trapped in local optima.
[0123] Step 502: Construct the state space;
[0124] The state space is the bandwidth S = {s | s = (B1, B2, ..., B} allocated to M vehicles. m ,…B M ),B m ∈[B min B total )}.
[0125] Step 503: Construct the motion space;
[0126] The action space represents the bandwidth allocation changes for M vehicles. To simplify the Q-value table in the model, it is assumed that the minimum step size ΔB of the bandwidth change is 1% of the total bandwidth. When M=3, each action corresponds to only two vehicles with bandwidth increases or decreases, therefore the entire action space has a total of six action combinations, which can be represented as A={a|a∈{(1,2),(1,3),(2,1),(2,3),(3,1),(3,2)}}, where (i,j) represents (B i +ΔB,B j -ΔB), i,j=1,2,3.
[0127] Step 504: Build environmental feedback;
[0128] set up The reward value of the environmental feedback is the difference between F in the next state and the current state, ΔF = F' - F. Since the training objective is to obtain the optimal value of F, we hope that F will be optimized in the direction of continuous increase. When F decreases, the feedback function is negative and a negative reward is obtained; when F increases, the feedback function is positive and a positive reward is obtained.
[0129] When choosing the end point of a round, the specific characteristics of this model must be considered. Unlike the typical scenarios where reinforcement Q-learning algorithms are applicable, training F to obtain the optimal value does not have a clear endpoint like in game problems. Instead, the optimal value of F is unknown. Therefore, the boundary condition B... m <B min As the end point of a round, the maximum step value can also be set to end the round.
[0130] Step 505: Train the reinforcement Q-learning algorithm model to obtain a model for solving the resource allocation optimization problem driven by video semantics in the Internet of Vehicles.
[0131] The resource allocation scheme allocates appropriate bandwidth resources to each vehicle on the edge server to maximize the detection accuracy per vehicle.
[0132] The training process of the reinforcement Q-learning algorithm model is as follows: Figure 4 As shown, the specific steps for each training round are as follows:
[0133] (1) Set the initial state s;
[0134] (2) Select action a based on greedy decision: If the random number random is less than ε, then select action a with the largest Q value among the six actions according to the Q value table; if the random number random is greater than ε, then randomly select action a.
[0135] (3) Execute the selected action a, observe the next bandwidth allocation state s' and the F' value of the environmental feedback, and calculate the change ΔF;
[0136] (4) Update the Q-value table: Q(s,a)←Q(s,a)+α[ΔF+γmax] a' Q(s',a')-Q(s,a)];
[0137] (5) Update the current state: s←s';
[0138] (6) Return to step (2) until B m <B min The round ends.
[0139] Figure 5The convergence process of the reward function of the reinforcement Q-learning algorithm with the number of iterations is shown. As can be seen from the figure, the solution of the reinforcement Q-learning algorithm tends to stabilize after about 1300 iterations. This proves the convergence of the reinforcement Q-learning-based resource allocation algorithm proposed in this invention, and that a stable Q-value table can be obtained through a finite number of iterations in offline training.
[0140] The present invention compares the video semantic-driven resource allocation method with resource allocation methods based on QoC, QoE, and QoS.
[0141] like Figure 6 As shown in the figure, the QoS-based resource allocation scheme performs the worst. This is because the QoS-based scheme does not consider the semantic information of the video, but only network efficiency. Therefore, it allocates more bandwidth to videos with a very small number of targets. The scheme proposed in this invention, however, considers the semantic information of the video and tends to allocate more bandwidth resources to videos with a larger number of targets. The specific bandwidth allocation results for each vehicle are as follows: Figure 7 As shown;
[0142] Figure 8 and Figure 9 The performance curves of correct detection probability and incorrect detection probability under different schemes are shown. As can be seen from the figure, the performance of all schemes improves with the increase of bandwidth resources, but the performance of correct detection probability and incorrect detection probability of the present invention is optimal. This is because the present invention considers the correct detection probability as a product term of the objective function, so in the process of resource allocation, the resource allocation will iteratively move in the direction of improving the correct detection probability. This comparison reveals that the semantic-driven resource allocation scheme is more suitable for video semantic understanding tasks, and the high correct detection probability and low incorrect detection probability of the objective are of great significance for assisted driving or autonomous driving services.
[0143] Figure 10 The graphs show the relationship between the maximum number of correctly detected targets and the number of vehicles under different schemes. As can be seen from the graphs, the overall performance decreases as the number of vehicles accessing the edge server increases. This is because the increased number of vehicles leads to more intense competition for resources, reducing the average bandwidth resources available to each vehicle. Among these, the video semantic-driven resource allocation method of this invention exhibits the best performance, verifying the performance advantage of this invention under resource-scarce conditions.
[0144] Figure 11The graphs show the relationship between the maximum number of correctly detected targets and vehicle speed under different schemes. As vehicle speed increases, Doppler shift interference reduces the transmission rate, resulting in performance degradation for all schemes. However, as shown in the graphs, this invention maintains the maximum number of correctly detected targets even under varying speed conditions. This is because this invention considers the characteristics of channel conditions changing with speed and employs a reinforced Q-learning algorithm to address this dynamic characteristic and solve the optimization problem. Therefore, the resource allocation scheme proposed in this invention can adapt to the rapidly changing channel characteristics in vehicular networks.
[0145] In summary, by implementing the video semantic-driven resource allocation method in the Internet of Vehicles (IoV) of this invention, the spectrum allocation from the vehicle end to the edge server end can be optimized, maximizing the average target detection accuracy. Compared with resource allocation algorithms based on QoE and QoS, the video semantic-based resource allocation algorithm designed in this invention considers the transmitted video content or semantic information and proposes a resource allocation scheme for the accuracy of video understanding or analysis. Compared with resource allocation algorithms based on QoC, the algorithm designed in this invention constructs a video content quality quantification model, considering the semantic differences of different videos and the non-steady-state channel conditions of the IoV.
[0146] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A video semantic-driven resource allocation method in the Internet of Vehicles, characterized in that, The specific steps include: Construct a vehicle-to-everything (V2X) system model for video semantic communication between the vehicle and the edge server; The system model includes edge servers and A smart connected car equipped with cameras; The communication and computation process of the entire system is as follows: 1) The vehicle initiates a video transmission request, preprocesses the acquired video, obtains the video information, and uploads it to the edge server. At the same time, the edge server obtains Channel State Information (CSI); 2) The edge server obtains the video information and CSI, and obtains the optimal resource allocation result based on the simplified and trained video semantic-driven resource allocation optimization model; 3) The vehicle completes the video encoding and compression according to the resource allocation result, and transmits it to the edge server through the wireless channel; 4) The edge server decodes the received video, performs semantic understanding on the video, and feeds back the results to each vehicle. The simplified and trained video semantic-driven resource allocation optimization model is generated as follows: Step 1: Construct a video semantic-driven resource allocation guidance model; Step 101: Construct the relationship between the video quantization parameter QP value and the compression rate; The H.265 video encoding and compression standard is used to encode and compress video data so that the video transmission bitrate is less than or equal to the transmission rate under bandwidth limitations. Different QP values correspond to different compression step sizes during the compression encoding process. The smaller the QP value, the smaller the compression step size, the closer the video bitrate is to the original video bitrate, and the greater the bandwidth required for transmission. Step 102: Establish the relationship between compression ratio and detection accuracy; We used the region-based Faster R-CNN algorithm to detect objects in videos with different compression levels from the Caltech and Waymo datasets. The object types mainly included pedestrians, vehicles, and traffic lights. In both datasets, 20% of the video data was used for testing and 80% of the video data was used for training. Step 103: Establish the relationship between QP value and detection accuracy; By statistically analyzing the QP values and corresponding detection accuracy data for different compression ratios in step 102, the following exponential relationship model is fitted: This represents the video quantization parameter QP value. Indicates the detection accuracy. These are model parameters; Step 104: Establish the relationship between QP value and video bitrate; The following exponential relationship model was fitted: For the first The bitrate of the video captured by the vehicle. For model parameters, Represented by natural constant An exponential function with base 0; Step 105: Establish the relationship between detection accuracy and video bitrate; Combining the relationship models obtained in steps 104 and 105, the relationship model between detection accuracy and bitrate is as follows: The bit rate is related to the bandwidth resources during transmission, thus obtaining a bandwidth resource allocation guidance model for improving the accuracy of video semantic understanding; Step 2: Calculate the detection accuracy per unit vehicle using the video bitrate, and construct a video semantic-driven resource allocation optimization model in the Internet of Vehicles by maximizing the detection accuracy per unit vehicle as the optimization objective. The optimized model is shown below: The total number of vehicles. Total number of target types; This indicates the importance of the detection targets for different detection types in semantic analysis tasks; This indicates the number of targets to be detected in the original video. Indicates the number of targets that can be correctly detected; This refers to the bandwidth allocated to each vehicle. Constraint C1 indicates that the bitrate of the transmitted video is limited by the transmission rate of the vehicles, where each vehicle in a time slot... The transmission rates are as follows: Bandwidth allocated to each vehicle, , and These represent transmit power, channel gain, and noise power, respectively. Constraint C2 states that the sum of the bandwidth allocated to all vehicles does not exceed the total bandwidth. ; Constraint C3 indicates that the bandwidth allocated to each vehicle is not less than the limit. ; Constraint C4 indicates that the detection accuracy for each target must be no less than a threshold. ; Constraint C5 represents the video transmission time period. ; , The time required for vehicle video preprocessing and CSI acquisition by the edge server. Time taken to obtain resource allocation results for the edge server; The total duration for the system to complete one video transmission; Step 3: Simplification of the video semantic-driven resource allocation optimization model; Because the model parameters obtained in step one , and And because , It is the differentiation operator, so the function Monotonically increasing in the domain, when The maximum value is taken at the specified time; therefore, the resource allocation problem P1 can be transformed into: Step 4: Based on the video semantic-driven resource allocation optimization model, construct and train the reinforcement Q-learning algorithm model; Step 401: Set hyperparameters; The parameters are set as follows: 1) Learning rate Setting it to 0.1 allows the algorithm to retain 90% of its historical training results, placing greater emphasis on past experience; 2) Discount factor Taking 0.9 allows the algorithm to consider 90% of the benefits in the next step, placing greater emphasis on long-term interests; 3) In strategy Setting it to 0.8 allows the algorithm 20% of the trial space, preventing it from getting trapped in local optima; Step 402: Construct the state space; The state space is Bandwidth allocated to each vehicle ; Step 403: Construct the action space; Action space is The bandwidth allocation changes for each vehicle; to simplify the Q-value table in the model, the minimum step size of the bandwidth change is set. 1% of the total bandwidth; when At this time, each action corresponds to only two vehicles' bandwidth increases or decreases, therefore the entire action space has a total of six action combinations, which can be represented as follows: ,in express ; Step 404: Construct the environmental feedback reward function; reward function Then the reward value from the environmental feedback is equal to the sum of the rewards from the next state and the current state. The difference Since the training objective is the reward function To obtain the optimal value, therefore we hope Optimize in the direction of continuous increase, when When the value decreases, the reward function becomes negative, resulting in a negative reward; when... When the value increases, the reward function becomes positive, resulting in a positive reward. Boundary conditions As the end point of the round; Step 405: Train the reinforcement Q-learning algorithm model to obtain a simplified and trained video semantic-driven resource allocation optimization model.
2. The resource allocation method driven by video semantics in a vehicle-to-everything (V2X) network as described in claim 1, characterized in that, In constructing a video semantic-driven resource allocation guidance model, the mean squared error (MSE) is introduced as a loss function, and regression methods are used to solve for the model parameters.
3. The resource allocation method for video semantic-driven vehicle networking as described in claim 1, characterized in that, The aforementioned channel gain Including path loss Shadow decay and small-scale fading ; in, , For the first The distance between the vehicle and the edge server; It follows a log-normal distribution model with a standard deviation of 8 and a mean of 0; , It is the time interval during which the channel remains in a stable state. It is by The processing noise derived from the distribution, where Represents the channel autocorrelation function. It is a zeroth-order Bessel function of the first kind. It is the center carrier wavelength. For the first The model considers the time-varying characteristics of small-scale fading in vehicle networks, including the speed of individual vehicles.
Citation Information
Patent Citations
Content caching decision and resource allocation combined optimization method based on mobile edge computing in Internet of Vehicles
CN110312231A
Task unloading and resource allocation method based on mobile edge computing in Internet of Vehicles
CN111314889A