Resource allocation algorithm based on edge-end collaborative video transcoding
By proposing a resource allocation algorithm based on edge-end collaborative video transcoding in the Internet of Vehicles environment, the problems of low latency and high quality of video streaming services in the Internet of Vehicles are solved, and efficient resource allocation and video acquisition delay are achieved.
Patent Information
- Application Number
- CN202411839365.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-13
- Publication Date
- 2025-04-25
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In a networked vehicle environment, there are challenges in how to coordinate resources at the edge and vehicle side to provide low latency and high-quality video streaming services, especially when wireless link conditions change dynamically.
A resource allocation algorithm based on edge-end collaborative video transcoding is proposed, and the transcoding strategy is determined by evaluating link quality in real time. When the link quality is good, the RSU cooperates with the vehicle to transcoding; when the link quality is average, the vehicle uses local computing power to transcoding. This algorithm combines a deep deterministic reinforcement learning algorithm to reasonably allocate system resources to minimize video acquisition delay.
Through the resource allocation algorithm of edge-end collaborative transcoding, it can ensure video quality while reducing video acquisition delay, improving system throughput, and improving user experience.
Smart Images

Figure CN119893474A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of mobile communications, and in particular to a resource allocation algorithm for video stream services in an Internet of Vehicles. Background Art
[0002] With the rapid development of intelligent transportation technology, smart vehicles are gradually transforming from a simple means of transportation to a high-tech mobile living space. Modern smart vehicles have made video the core form of in-vehicle entertainment by integrating various smart screens, on-board computers and high-speed communication technologies. However, due to different vehicle equipment, network conditions and passenger preferences, video streams need to be converted into different formats and quality versions, which consumes a lot of computing resources. The computing power of the vehicle itself is limited and it is difficult to complete these tasks alone. Therefore, edge computing (MEC) has become a solution, which assists vehicles in video processing by offloading computing tasks to neighboring edge servers. However, the requirements of stable bandwidth and low latency for video transmission, as well as the dynamic changes in wireless link conditions in the Internet of Vehicles, make it an urgent problem to coordinate edge and vehicle resources to provide users with low-latency and high-quality video streaming services.
[0003] At present, many research papers at home and abroad have focused on the resource allocation problem in the edge, and have achieved certain results. In the paper [Fu F, Kang Y, Zhang Z, et al. Soft actor-critic DRL for live transcoding and streaming in vehicular fog-computing-enabled IoV[J]. IEEE Internet of Things Journal, 2020, 8(3): 1308-1321.], the authors proposed a resource allocation algorithm based on vehicle fog computing. The algorithm comprehensively considers vehicle scheduling, video bitrate selection and resource allocation, aiming to provide vehicles with high-quality, low-latency live video streaming services. At the same time, a penalty function is designed to reduce the fluctuation of video bitrate between adjacent time slots and improve the viewing experience of live broadcasts. In the literature [Liu C, Zhang H, Ji H, et al. MEC-assisted flexible transcoding strategy for adaptive bitrate video streaming in smallcell networks [J]. China Communications, 2021, 18 (2): 200-214.], the authors proposed a MEC-assisted flexible resource allocation and transcoding strategy to achieve adaptive bitrate video streaming. The strategy selects the appropriate video bitrate version for transcoding under the joint access control, resource allocation and user preference. When caching higher quality videos at the edge, the strategy not only considers video transcoding, but also comprehensively evaluates the latency of obtaining videos from the cloud video center to achieve a better user experience. In the literature [Kuo TY, Lee MC, Kim JH, et al. Quality-aware joint caching, computing and communication optimization for video delivery invehicular networks [J]. IEEE Transactions on Vehicular Technology, 2022, 72 (4): 5240-5256.], the authors proposed a video caching strategy that combines video quality awareness with caching, computing and communication resources. This method not only focuses on video quality, but also comprehensively considers storage capacity, computing power and network bandwidth, thereby effectively improving video transmission efficiency and user experience. In addition, the use of full-duplex connection channels enables vehicles to not only request video content, but also provide video services to other vehicles, further improving the efficiency and quality of video services.The authors in the literature [Yang T, Tan Z, Xu Y, et al. Collaborative edge caching and transcoding for 360° video streaming based on deep reinforcement learning [J]. IEEE Internet of Things Journal, 2022, 9 (24): 25551-25564.] also adopted the above caching method and took into account that due to system resource limitations, users may receive video content with quality that does not match expectations. To this end, a quality mismatch penalty function is designed to speed up the solution process.
[0004] Although the above-mentioned literature optimizes resource allocation to meet user needs when introducing MEC, they only focus on transcoding and resource allocation at the edge, and fail to fully utilize the local computing power of the vehicle. Although transcoding can obtain the quality version required by users, transcoding a large number of videos at the same time will quickly exhaust the available computing resources at the edge and increase the transcoding delay of all users. In the current IoV environment, the vehicle side already has considerable computing power, which can be used for video transcoding services. However, the priority of in-vehicle entertainment services is far lower than that of autonomous driving and safety-related services, so the vehicle side does not have a large amount of computing resources dedicated to video transcoding, and transcoding by the vehicle side alone may cause a large transcoding delay. Therefore, resource allocation algorithms that only consider transcoding at the edge or at the vehicle side have certain shortcomings. To this end, resource allocation algorithms for collaborative transcoding between the vehicle side and the edge side can be explored. In addition, video transcoding will change the size of the video, and larger video files will consume more network resources when transmitted. Good link quality means better transmission conditions, which not only enables the system to transmit higher quality video streams, but also increases the amount of data transmitted per unit time. Therefore, this paper proposes a resource allocation algorithm for edge collaborative transcoding while evaluating the link quality to minimize the video acquisition delay and increase the system throughput. Summary of the invention
[0005] The present invention aims to solve the above problems of the prior art. A resource allocation algorithm based on edge collaborative video transcoding is proposed. The technical solution of the present invention is as follows:
[0006] A resource allocation algorithm based on edge collaborative video transcoding includes the following steps:
[0007] First, the RSU collects vehicle request information and network conditions to evaluate the link quality with the vehicle in real time. Secondly, the transcoding strategy is determined based on the link quality. When the link quality is average, the RSU directly transmits a low-quality video stream to the vehicle, and the vehicle uses local computing power to transcode it into a high-quality video. When the link quality is good, the video stream is divided into two parts: one part is transmitted after transcoding by the RSU, and the other part is directly transmitted to the vehicle and transcoded locally. Thirdly, a deep deterministic reinforcement learning algorithm is used to reasonably allocate system resources to minimize the video acquisition delay; finally, the RSU allocates system resources through a resource allocation plan, and sends the video to the vehicle according to the collaborative transcoding strategy, so that the vehicle obtains a video that meets the requested quality.
[0008] Furthermore, the construction of the link quality evaluation model includes the following steps: First, the vehicle sends a video request to the RSU, and the RSU collects the bandwidth, signal-to-noise ratio, and jitter information with the vehicle and transmits it to the MEC. Subsequently, a link quality model is constructed based on type-II fuzzy logic, and the link quality is scored by calculating these three parameters. Finally, a threshold is set, and when the score is higher than the threshold, the link quality is judged to be good, otherwise it is fair.
[0009] Furthermore, the vehicle request information includes the local computing power size p at this time. u,loc and requested quality video It indicates that vehicle u requests video f with quality format l within the coverage of RSU r, otherwise it means that the vehicle does not request the video. At the same time, it is assumed that the vehicle can only request video content with one quality format within the coverage of RSU, so it satisfies:
[0010]
[0011] Furthermore, the three key parameters of the RSU collection and vehicle are:
[0012] Transmission bandwidth refers to the amount of data that can pass through a link per unit time, and represents the transmission capacity of a wireless channel. High-definition video streaming requires high bandwidth support to improve the user's viewing experience.
[0013] The signal-to-noise ratio refers to the ratio of the received useful signal strength to the received interference signal strength, which reflects the quality of the wireless link to a certain extent. A high signal-to-noise ratio is the basis for ensuring accurate transmission.
[0014] Jitter is the short-term deviation of a signal at a specific moment from its ideal time position, representing the volatility and discontinuity of data transmission. Reducing the impact of jitter on the transmission process can improve the continuity and smoothness of user video viewing.
[0015] Furthermore, in order to better cope with the dynamic changes of V2I links, this paper introduces fuzzy logic to deal with this uncertainty. Fuzzy logic allows dealing with fuzzy problems in the real world and better understanding and simulating the human decision-making process. However, type-I fuzzy sets cannot model the uncertainty between individuals because the membership of each element is a certain value, and different users may have different opinions. Therefore, this paper uses an interval type-II fuzzy logic system to evaluate link quality. It mainly includes the following four steps:
[0016] 1) Fuzzification. Bandwidth, signal-to-noise ratio and jitter are selected as the three input parameters of the type-2 fuzzy logic system. In interval type-2 fuzzy sets, the membership of each parameter is converted into an interval rather than a definite value. In order to intuitively represent the membership of the fuzzy set and make it easy to calculate, this paper selects the commonly used Gaussian membership function. Generally, the upper limit function and lower limit function of the Gaussian membership function are expressed as
[0017]
[0018]
[0019] in, Indicates the range of variation of the mean. When , the type II membership function can be reduced to a type I membership function, and the membership degree is an exact value. Since the bandwidth allocated by the RSU to each vehicle is unknown when judging the link quality, the average bandwidth is used to approximately judge the V2I link quality.
[0020] 2) Fuzzy reasoning. Based on the established fuzzy rule set, fuzzy logic operations are performed on the fuzzified input, and a comprehensive fuzzy output is finally obtained. The relationship between fuzzy input and fuzzy output is usually expressed in the form of "if-then". At the same time, in order to ensure accurate evaluation of link quality, in the design of fuzzy rules, bandwidth is of the highest importance, followed by signal-to-noise ratio, and jitter is the lowest. If the bandwidth is good, the signal-to-noise ratio is good, and the jitter is good, the link quality is the best; if the bandwidth is poor, the signal-to-noise ratio is poor, and the jitter is poor, the link quality is the worst, and it cannot support high-quality video transmission tasks.
[0021] 3) Fuzzy reduction. In order to reduce the computational complexity, this paper uses the average method to obtain the reduction result, that is,
[0022]
[0023] 4) Defuzzification. This paper uses the centroid method to defuzzify, converting the fuzzy output into a specific score value, and normalizing the score value between 0 and 1. The threshold θ = 0.55. When the score is greater than θ, it means that the link quality is good, then the link quality zu,r =1. On the contrary, the link quality is average, z u,r =0.
[0024] Furthermore, the link quality is used to determine whether to perform collaborative transcoding. u,r =1, RSU further splits the video stream into two parts, with a split ratio of h u,r ∈[0,1], which is the ratio of RSU cooperative transcoding. Only when the link quality is good, RSU will cooperate with the vehicle to transcode, so it satisfies
[0025]
[0026] In addition, use Represents the collaborative transcoding strategy of RSU r.
[0027] Furthermore, the resource allocation process includes allocation of communication resources and computing resources.
[0028] Furthermore, the allocation of communication resources is mainly a bandwidth allocation process. In the long-term evolving Internet of Vehicles, the entire radio resource is divided into resource blocks (RBs) in the time domain and frequency domain. Considering the dynamic characteristics of the Internet of Vehicles, such as the fast speed of vehicles and the fast change of network topology, B r (t) represents the number of RBs contained in RSU r in the tth time slot. Considering B r (t) is discrete and finite, and is modeled as a finite state Markov chain (FSMC). At the same time, the available spectrum resources of RSU are divided into M states, namely Use b u,r It indicates the number of RBs allocated by RSU r to vehicle u, and the number of allocated RBs cannot be greater than the number of RBs contained at this time, so it satisfies
[0029]
[0030] use Indicates the allocation strategy of RSU r bandwidth resources.
[0031] Furthermore, the allocation of computing resources is mainly the allocation of RSU computing power. Only when the link quality is good, RSU will cooperate with the vehicle to transcode. u,r =1, the RSU should allocate computing resources to the vehicle to complete the corresponding transcoding work. When the vehicle requests a video, the RSU may have other computing tasks, and the vehicle randomly occupies and releases computing resources. Although the computing resources of the RSU are continuous and limited, they can be discretized. So similar to bandwidth resources, P r (t) represents the computing resources of RSU r at time slot t. And the computing resources are discretized into N states on average, namely Let p u,r is the computing resource allocated to vehicle u by RSU r. The allocated computing resource cannot be greater than the computing resource contained at this time, so it satisfies
[0032]
[0033] When z u,r = 0, RSU r does not need to allocate computing resources for vehicle u, so it satisfies
[0034]
[0035] In addition, use Represents the computing resource allocation strategy of RSU r.
[0036] Furthermore, according to the current collaborative transcoding strategy H, the total delay D for vehicle u to obtain a video stream f with quality l′ is u,r Divided into vehicle-side processing delay T u and RSU processing delay T r .
[0037] Furthermore, the vehicle-side processing delay includes the transmission delay of the low-quality l=1 video stream and the transcoding delay to transcode it to quality l′ Therefore, the processing delay on the vehicle side is:
[0038]
[0039] Furthermore, the The size is
[0040]
[0041] where d f,l is the number of bits contained in a video stream f with quality l. And G u,r is the transmission rate of the V2I link. According to Shannon’s formula, the V2I link communication rate from RSU r to vehicle u is
[0042]
[0043] Where B0 is the bandwidth contained in a single RBs, u,r is the signal-to-noise ratio (SNR) between the vehicle u and RSU r link. Since SNR is a continuous random variable that is difficult to analyze, SNR is modeled as FSMC for ease of calculation. In this model, Υ u,r is discretized and quantized into K states: if Then u,r =σ0; if Then u,r =σ1; ...; if Then u,r =σ K-1 Each level represents a state of FSMC, and the corresponding state space is written as λ = {σ0, σ1, ..., σ K-1}.
[0044] Furthermore, the The size is
[0045]
[0046] Among them, Y(l,l') represents the number of CPU cycles consumed to convert a video with quality l to l'. u,loc Indicates the local computing power of vehicle u.
[0047] Furthermore, the processing delay at the RSU end includes the transcoding delay of transcoding the low-quality l=1 video stream to the quality l′ and transmission delay of quality l′ video stream Therefore, the processing delay at the RSU end is
[0048]
[0049] Furthermore, the The size is
[0050]
[0051] where h u,r It is the ratio of RSU collaborative transcoding.
[0052] Furthermore, the The size is
[0053]
[0054] Furthermore, considering that RSU r can transcode the remaining segments at the same time when transmitting low-quality video streams, the total delay for vehicle u to obtain video f with quality version l′ is the maximum value of the RSU processing delay and the vehicle processing delay, that is, D u,r =max(T r ,T u ).
[0055] Furthermore, in order to achieve efficient resource allocation and provide users with low-latency video streaming services, the resource allocation of collaborative transcoding is designed as a joint optimization problem. This problem comprehensively considers bandwidth resource allocation, computing resource allocation, and collaborative transcoding strategies to minimize latency. Since the mutual cooperation between RSUs is not considered, the minimum latency can be obtained by executing the above resource allocation scheme separately in each RSU. Therefore, when solving this problem, only the latency minimization problem of a single RSU is considered, which can be described as
[0056]
[0057] Among them, c1 indicates that each vehicle can only request video content of one quality format; c2 ensures that the number of RBs allocated to the vehicle cannot exceed the number of RBs contained in the RSU; c3 indicates that the RSU will cooperate with the vehicle for transcoding only when the quality of the V2I link is good; c4 indicates that if the RSU does not cooperate with the vehicle for transcoding, the RSU will not allocate computing resources to the vehicle; c5 ensures that the computing resources allocated to each vehicle are less than the total computing power of the RSU; c6 and c7 indicate the request variables and link quality z u,r All are binary variables; c8 ensures the synergy ratio h u,r is a continuous variable ranging from 0 to 1.
[0058] Furthermore, since the V2I channel status and available resources are dynamically changing, equation (16) is a dynamic optimization problem. At the same time, computing resource allocation and collaborative transcoding ratio are both continuous variables. Traditional optimization methods are often difficult to apply when faced with such complex problems with dynamic resource changes and continuous variables. The Deep Deterministic Policy Gradient (DDPG) method combines the advantages of deep learning and deterministic policy gradients, and can handle optimization problems in dynamic environments and continuous action spaces and make optimal decisions.
[0059] Furthermore, Markov decision process (MDP) can be used to model reinforcement learning problems. Therefore, equation (16) is modeled as MDP, and then the resource allocation algorithm based on DDPG is described in detail. The elements of MDP, namely, state space S, action space A, reward R t The definitions are as follows.
[0060] The state space S is determined by the RSU r and the vehicle u and their environment. It includes the basic resource information of the RSU and the vehicle, the request information of the vehicle, and the current V2I link quality information, which is
[0061] (1)B r (t);
[0062] (2)P r (t);
[0063] (3)
[0064] (4)
[0065] (5)
[0066] (6) where z u,r is quickly obtained through the link quality model, and this information is the key decision basis for collaborative transcoding. Therefore, in the state s of the tth time slot t ∈S is defined as
[0067]
[0068] The action space A is the set of possible actions that the agent RSU r can take in each state. It includes the number of RBs b assigned by r to each vehicle u,r And the computing power size p u,r , and the size of the collaborative transcoding ratio of each vehicle h u,r , that is
[0069] (1)
[0070] (2)
[0071] (3) Therefore, action a performed at time slot t t ∈A is defined as
[0072] a t = {b 1,r (t),...,b u,r (t); p 1,r (t),...,p u,r (t);h 1,r (t),...,h u,r (t)}. (18)
[0073] Return R t It is the reward of the environment feedback after the intelligent agent RSU interacts with the environment, combined with the optimization goal. t In the case of t , so that the return R tMaximize. Taking the opposite of the delay as the reward directly can intuitively achieve the goal of maximizing the reward. This design not only simplifies the optimization process, but also shows significant performance improvement in experiments and theoretical analysis. Therefore, the reward R in the tth time slot is t Defined as
[0074]
[0075] Furthermore, the basic idea of the DDPG algorithm is to integrate the Deep Neural Network (DNN) into the deterministic policy gradient algorithm to improve learning efficiency. In DDPG, the core concept is to use two different DNN networks to approximate the policy function and the Q-value function respectively, namely the actor network and the critic network.
[0076] An actor network is a neural network used to represent and learn policy functions. Its main function is to map the state of the environment to a specific action and optimize the policy function during training. The expression of an actor network is usually π(s|θ π ), where s is the state of the environment, π is the actor network (policy function), and θ π is the weight parameter of the actor network. The critic network is a neural network used to estimate the value function of an action. Unlike the actor network, the critic network does not directly output actions, but evaluates the value (or Q value) of the state and action pair. The expression of the critic network is usually Q(s,a|θ Q ), where a is the action output by the actor network, θ Q is the weight parameter of the critic network.
[0077] For the actor network, the output of the critic network is used to calculate the policy gradient. The policy gradient is usually expressed as
[0078]
[0079] Among them, J(θ π ) is the expected return of the policy function, π(s|θ π ) is the output of the actor network. Using the calculated policy gradient information, the parameters θ of the actor network are adjusted. π Perform gradient ascent updates to improve the expected return of the policy function
[0080]
[0081] Here, α π is the learning rate, which controls the step size of parameter updates.
[0082] For the critic network, calculate the target Q value
[0083]
[0084] Among them, R t is the current return, s t+1 is the next state, π′ and Q′ are the outputs of the target actor network and the target critic network, and γ is the discount factor. Use a regression loss function (such as mean squared error) to update the parameters θ of the critic network Q
[0085]
[0086] Where W is the batch size sampled from the playback buffer, α Q is the learning rate of the critic network.
[0087] Furthermore, the RSU allocates corresponding resources to the vehicle according to the solved resource allocation plan, and then transmits high-quality video according to the collaborative transcoding strategy, so that the vehicle finally obtains the video file of the specified quality.
[0088] The advantages and beneficial effects of the present invention are as follows:
[0089] 1. A wireless link quality assessment model based on interval type-2 fuzzy logic is studied and designed to evaluate the wireless link quality in real time and use it as the decision basis for collaborative transcoding.
[0090] 2. A link quality-based edge collaborative resource allocation algorithm is proposed. When the link quality is average, the RSU directly transmits the lowest quality video stream to the vehicle, and the vehicle uses local computing power to transcode it to high quality. When the link quality is good, the video stream is divided into two parts: one part is transcoded by the RSU and then transmitted to the vehicle, and the other part is directly transmitted and transcoded locally by the vehicle. The algorithm takes into account both the network resource status and the edge computing power, maximizing the allocation efficiency of system resources to minimize the video acquisition delay. BRIEF DESCRIPTION OF THE DRAWINGS
[0091] Figure 1 is the system scenario graph;
[0092] Figure 2 It is the interval type-2 fuzzy inference system diagram;
[0093] Figure 3 is the membership function graph of bandwidth;
[0094] Figure 4 is the relationship between the average collaborative transcoding ratio and the number of vehicles;
[0095] Figure 5 It is the relationship diagram between time delay and number of vehicles;
[0096] Figure 6 is the relationship between the average throughput and the number of vehicles;
[0097] Figure 7 This is a diagram showing the impact of different computing powers on system performance;
[0098] Figure 8 This is a diagram showing the impact of different bandwidths on the system;
[0099] Fig. 9 A diagram for the abstract; DETAILED DESCRIPTION
[0100] The following will describe the technical solutions in the embodiments of the present invention in detail in conjunction with the accompanying drawings in the embodiments of the present invention. The described embodiments are only part of the embodiments of the present invention.
[0101] The technical solution of the present invention is as follows:
[0102] In the Internet of Vehicles that integrates mobile edge computing, a link quality model is designed from the perspective of maximizing the resource allocation efficiency of the edge and vehicle ends. Based on this, a resource allocation algorithm for edge collaborative video transcoding is proposed to maximize the collaborative transcoding ratio of the edge, reduce the video acquisition delay, and increase the system throughput.
[0103] The resource allocation algorithm for edge collaborative video transcoding proposed in the present invention includes the following steps:
[0104] Step 1: The vehicle sends a video request to the corresponding RSU. After receiving the request, the RSU collects the bandwidth, signal-to-noise ratio, and jitter information of the current vehicle link, and obtains the current link quality information through type-II fuzzy logic reasoning, which is used as the decision information for collaborative transcoding.
[0105] Step 2: RSU determines whether to cooperate with the vehicle for transcoding based on the current link information. When the link quality is average, RSU directly transmits the lowest quality video stream to the vehicle, and the vehicle uses local computing power to transcode it to high quality. When the link quality is good, the video stream is divided into two parts: one part is transcoded by RSU and then transmitted to the vehicle, and the other part is directly transmitted and transcoded locally by the vehicle. The corresponding communication and computing resources are allocated to the vehicle to cooperate with the vehicle to complete the video request task.
[0106] In order to evaluate the performance of the algorithm proposed in this invention, the system scenario is simulated through the PyCharm simulation platform. Assume that an RSU is located in the center of the road with a coverage area of 500×15, which is equivalent to an ordinary straight two-lane road, where vehicles are randomly distributed on the road.
[0107] In the simulation experiment, in order to verify the effectiveness of the proposed resource allocation algorithm, three typical algorithms were selected for comparison. (1) Resource allocation algorithm that only considers transcoding on the RSU side: RSU transcodes the entire lowest quality video stream and then transmits the high-quality version of the video to the vehicle, denoted as "Edge". (2) Resource allocation algorithm that only considers transcoding on the vehicle side: RSU transmits the entire low-quality video stream to the vehicle, and the vehicle uses local computing power to transcode it to high quality, denoted as "Local". (3) Resource allocation algorithm based on reinforcement learning: RSU obtains the highest quality video stream from the cloud video center, transcodes it to a lower target quality, and then transmits it to the vehicle side, which is the algorithm proposed in the literature [Fu F, Kang Y, Zhang Z, et al. Soft actor–critic DRL for live transcoding and streaming in vehicular fog-computing-enabled IoV[J]. IEEE Internet of Things Journal, 2020, 8(3): 1308-1321.], denoted as "AC". At the same time, the resource allocation algorithm proposed in this paper is denoted as "ATT".
[0108] Figure 4 The figure shows the relationship between the average collaborative transcoding ratio at the RSU and the number of vehicles. Both the Edge and AC algorithms transcode the entire video at the RSU, so the collaborative transcoding ratio is 1 and remains unchanged. The Local algorithm always transcodes the entire video locally in the vehicle, so the collaborative transcoding ratio is 0 and remains unchanged. For the ATT algorithm, as the number of vehicles increases, the average collaborative transcoding ratio of the RSU gradually decreases. Because as the number of vehicles increases, the bandwidth and computing resources allocated to each vehicle decrease, and the link quality of the vehicles gradually deteriorates, the collaborative transcoding ratio gradually decreases. When the number of vehicles is less than 5, the bandwidth and computing resources are sufficient, most of the video transcoding tasks are handled by the RSU, and the collaborative transcoding ratio is above 0.8. After the number of vehicles continues to increase to 50, the link quality of some vehicles has been judged to be poor, and the RSU does not assist them in transcoding, so the collaborative transcoding ratio drops sharply. When the number of vehicles increases to 60, the bandwidth allocated to each vehicle is less than 1M, the link quality of all vehicles is poor, and the RSU does not assist the vehicle in transcoding, so the transcoding ratio is 0. It is also noted that when the number of vehicles is less than 50, the link quality of most vehicles is good, the collaborative transcoding ratio is above 0.3, and the RSU can greatly assist vehicles in transcoding.
[0109] Book Figure 5The figure shows the relationship between the video acquisition delay and the number of vehicles, where sub-figure (a) shows the total delay for all vehicles to acquire videos, and figure (b) shows the average delay for vehicles to acquire videos. The purple dotted line with a triangle is the baseline, which is a straight line with a slope of 0.5 and an intercept of 0 in sub-figure (a), and a horizontal straight line with an intercept of 0.5 on the vertical axis in sub-figure (b). Because the playback time of the video stream is 0.5s, when the video acquisition delay is greater than the playback time, it may affect the smooth playback of the video and reduce the user experience. It is not difficult to see that the delay of all algorithms increases with the increase in the number of vehicles. Because as the number of vehicles increases, the total delay for all vehicles to acquire videos must increase. Since the bandwidth and computing resources are limited, the resources allocated to all vehicles are reduced, so the average acquisition delay also increases. When the number of vehicles is about 45, the delay of the Edge algorithm exceeds the baseline, and the video playback may be stuck at this time. It is not difficult to find that the Edge and AC algorithms are greatly affected by the number of vehicles and grow faster. Because both algorithms need to transmit a large amount of high-quality video at the RSU end, and as the number of vehicles increases, the bandwidth and computing power obtained by each vehicle decrease, so the latency increases rapidly. The Local algorithm and ATT algorithm grow more slowly. Because the Local algorithm only transmits low-quality video at the RSU end, the amount of data transmitted is small, and the transcoding latency at the vehicle end remains unchanged, so the video latency increases slowly. When the number of vehicles is small, the ATT algorithm will hand over most of the transcoding tasks to the RSU end, and the latency is almost the same as the Edge and AC algorithms. Figure 4 It can be seen that the proportion of videos transcoded at the RSU end gradually decreases as the number of vehicles increases, so the latency increases slowly. After the number of vehicles increases to 50, the link quality of some vehicles is poor. For these vehicles, the RSU does not assist in transcoding, so the latency of the ATT algorithm quickly approaches that of the Local algorithm. When the number of vehicles increases to 60, the link quality of all vehicles is poor, and the ATT algorithm degenerates into the Local algorithm to reduce the consumption of network resources. At the same time, when the link quality is good, the ATT algorithm can reduce the latency by about half compared to the Local algorithm.
[0110] Figure 6The relationship between the average throughput of each vehicle and the number of vehicles is shown. As the number of vehicles increases, the average throughput of all algorithms decreases. For the Local algorithm, the amount of data transmitted by the RSU remains unchanged, while the delay increases slowly, so the throughput decreases slowly. The other three algorithms have high throughput when the number of vehicles is about 5, and the ATT algorithm has the highest throughput. Because when there are fewer vehicles, network resources are sufficient, RSU can transmit most of the high-quality videos, and the video acquisition delay is very short, so the throughput is very high. In addition, the ATT algorithm has the shortest average delay, so the throughput is the highest. When the number of vehicles increases, the data transmitted by the RSU of the ATT algorithm decreases, while the amount of data transmitted by the Edge and AC algorithms remains basically unchanged, and the video acquisition delay increases, so the throughput decreases sharply. When the number of vehicles is about 50, the ATT algorithm determines that the link quality of some vehicles is poor at this time, and the RSU directly transmits the lowest quality video to these vehicles, so the throughput quickly approaches the Local algorithm. When the number of vehicles is less than 55, the throughput of the proposed algorithm is better than all algorithms.
[0111] Figure 7 The figure shows the impact of different RSU computing power on system performance when the number of vehicles is 30 and the RSU bandwidth is 50M. Sub-figure (a) shows the relationship between the total delay of vehicle video acquisition and computing power, and sub-figure (b) shows the relationship between the system average throughput and computing power. The Local algorithm only performs transcoding on the vehicle side and is independent of the RSU computing power, so the delay remains unchanged. In addition, RSUs all transmit low-quality videos, so the throughput also remains unchanged. As the RSU computing power increases, the delays of the other three algorithms all decrease and the throughputs all increase. Among them, the Edge and AC algorithms change faster because all video transcoding tasks are performed on the RSU side and are greatly affected by the RSU computing power. When the computing power increases, the transcoding delay decreases significantly, so the average acquisition delay decreases. The amount of data transmitted by the RSU side remains basically unchanged, so the average throughput increases. The ATT algorithm determines that the link quality of most vehicles is good at present, and the RSU side assists in transcoding, so the video acquisition delay decreases with the increase of computing power. In addition, the amount of data transmitted by the RSU side increases, the delay decreases, and the throughput increases significantly. As computing power increases, the transcoding ratio of RSU collaboration has stabilized. Even if computing power is increased, the transcoding ratio will not increase significantly, so the changes in latency and throughput tend to be stable. It is not difficult to find that no matter what the computing power is, the latency and throughput of the ATT algorithm are significantly better than the other three algorithms.
[0112] and Figure 7 similar, Figure 8It shows the impact of different RSU bandwidths on the system when there are 30 vehicles and the RSU computing power is 100GHz. Sub-figure (a) shows the relationship between the total delay of the video and the RSU bandwidth, and figure (b) shows the relationship between the average system throughput and the bandwidth at the RSU end. As the bandwidth increases, the delay of all algorithms is significantly reduced and the throughput increases. Because increasing the bandwidth can reduce the transmission delay of the video, and because the local algorithm only transmits a small low-quality video, it is less affected by the bandwidth than the other three algorithms and the decline is smaller. At the same time, the amount of data transmitted remains unchanged, so the change in throughput is also small. When the bandwidth is small, the delay of the Edge and AC algorithms is much greater than that of the other algorithms. However, since they need to transmit a large amount of high-quality videos, their throughput is higher than that of the ATT algorithm when the bandwidth is small. As the bandwidth increases, the link quality of a large number of vehicles improves, the delay of the ATT algorithm decreases rapidly, and the throughput also increases rapidly, exceeding the Edge and AC algorithms. It can be found that when the bandwidth is greater than 30MHz, the delay and throughput of the ATT algorithm are better than the other three algorithms. And as above Figure 7 By comparison, it can be found that the impact of bandwidth on the system is far greater than that of computing power.
[0113] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0114] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0115] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0116] The above embodiments should be understood to be only used to illustrate the present invention and not to limit the protection scope of the present invention. After reading the contents of the present invention, technicians can make various changes or modifications to the present invention, and these equivalent changes and modifications also fall within the scope defined by the claims of the present invention.
Claims
1. A resource allocation algorithm based on edge collaborative video transcoding, characterized in that: The following steps are involved:
101. The RSU end collects vehicle request information and network conditions to evaluate the link quality with the vehicle in real time; 102. Determine the collaborative transcoding strategy based on the link quality obtained in step 101. When the link quality is average, the RSU directly transmits the low-quality video stream to the vehicle, and the vehicle uses local computing power to transcode it into high-quality video. When the link quality is good, the video stream is divided into two parts: one part is transmitted after the RSU completes transcoding, and the other part is directly transmitted to the vehicle and transcoded locally; 103. According to the collaborative transcoding decision obtained in step 102, a deep deterministic reinforcement learning algorithm is used to reasonably allocate system resources to minimize video acquisition delay; 104. The RSU allocates system resources through the resource allocation scheme of step 103, and sends the video to the vehicle according to the collaborative transcoding strategy of step 102, and the vehicle obtains the video that meets the requested quality.
2. A resource allocation algorithm based on edge collaborative video transcoding according to claim 1, characterized in that: The construction of the link quality assessment model specifically includes:
201. The RSU collects bandwidth, signal-to-noise ratio, and jitter information about the vehicle and transmits it to the MEC; 202. According to the link information collected in step 201, dynamically evaluate the link quality based on interval type-2 fuzzy logic; 203. A threshold is set again according to the link quality score obtained in step 202. When the score is higher than the threshold, the link quality is judged to be good, otherwise it is fair.
3. A resource allocation algorithm based on edge collaborative video transcoding according to claim 2, characterized in that: The three parameters described based on the data collected by RSU include: Transmission bandwidth refers to the amount of data that can pass through a link per unit time, and represents the transmission capacity of a wireless channel. High-definition video streaming requires high bandwidth support to improve the user's viewing experience. The signal-to-noise ratio refers to the ratio of the received useful signal strength to the received interference signal strength, which reflects the quality of the wireless link to a certain extent. A high signal-to-noise ratio is the basis for ensuring accurate transmission. Jitter is the short-term deviation of a signal at a specific moment from its ideal time position, representing the volatility and discontinuity of data transmission. Reducing the impact of jitter on the transmission process can improve the continuity and smoothness of user video viewing.
4. A resource allocation algorithm based on edge collaborative video transcoding according to claim 2, characterized in that: In order to better cope with the dynamic changes of V2I links, this paper introduces fuzzy logic to deal with this uncertainty. Fuzzy logic allows dealing with ambiguous problems in the real world and better understanding and simulating the human decision-making process. However, type-I fuzzy sets cannot model uncertainty between individuals, because the membership of each element is a certain value, while different users may have different opinions. Therefore, this paper uses an interval type-II fuzzy logic system to evaluate link quality. It mainly includes the following four steps: 1) Fuzzification. Bandwidth, signal-to-noise ratio and jitter are selected as the three input parameters of the type-2 fuzzy logic system. In interval type-2 fuzzy sets, the membership of each parameter is converted into an interval rather than a definite value. In order to intuitively represent the membership of the fuzzy set and make it easy to calculate, this paper selects the commonly used Gaussian membership function. Generally, the upper limit function and lower limit function of the Gaussian membership function are expressed as in, Indicates the range of variation of the mean. When , the type II membership function can be reduced to a type I membership function, and the membership degree is an exact value. Since the bandwidth allocated by the RSU to each vehicle is unknown when judging the link quality, the average bandwidth is used to approximately judge the V2I link quality. 2) Fuzzy reasoning. Based on the established fuzzy rule set, fuzzy logic operations are performed on the fuzzified input, and a comprehensive fuzzy output is finally obtained. The relationship between fuzzy input and fuzzy output is usually expressed in the form of "if-then". At the same time, in order to ensure accurate evaluation of link quality, in the design of fuzzy rules, bandwidth is of the highest importance, followed by signal-to-noise ratio, and jitter is the lowest. If the bandwidth is good, the signal-to-noise ratio is good, and the jitter is good, the link quality is the best; if the bandwidth is poor, the signal-to-noise ratio is poor, and the jitter is poor, the link quality is the worst, and it cannot support high-quality video transmission tasks. 3) Fuzzy reduction. In order to reduce the computational complexity, this paper uses the average method to obtain the reduction result, that is, 4) Defuzzification. This paper uses the centroid method to defuzzify, converting the fuzzy output into a specific score value, and normalizing the score value between 0 and 1. The threshold θ = 0.55, when the score is greater than, it means that the link quality is good, then the link quality z u,r =1. On the contrary, the link quality is average, z u,r =0.
5. A resource allocation algorithm based on edge collaborative video transcoding according to claim 4, characterized in that: The collaborative transcoding strategy specifically includes: When z u,r= When 1, RSU further splits the video stream into two parts, with a split ratio of h u,r∈ [0,1], which is the ratio of RSU cooperative transcoding. Only when the link quality is good, RSU will cooperate with the vehicle to transcode, so In addition, use Represents the collaborative transcoding strategy of RSU r.
6. A resource allocation algorithm based on edge collaborative video transcoding according to claim 5, characterized in that: The resource allocation process includes the allocation of communication resources and computing resources. Specifically, it includes: The allocation of communication resources is mainly the process of allocating bandwidth. In the long-term evolving Internet of Vehicles, the entire radio resource is divided into resource blocks (RBs) in the time domain and frequency domain. Considering the dynamic characteristics of the Internet of Vehicles, such as the fast speed of vehicles and the fast change of network topology, B r (t) represents the number of RBs contained in RSU r in the tth time slot. Considering B r (t) is discrete and finite, and is modeled as a finite state Markov chain (FSMC). At the same time, the available spectrum resources of RSU are divided into M states, namely Use b u,r It indicates the number of RBs allocated by RSU r to vehicle u, and the number of allocated RBs cannot be greater than the number of RBs contained at this time, so it satisfies use Indicates the allocation strategy of RSU r bandwidth resources. The allocation of computing resources is mainly the allocation of RSU computing power. Only when the link quality is good, RSU will cooperate with the vehicle to transcode. u,r= 1, the RSU should allocate computing resources to the vehicle to complete the corresponding transcoding work. When the vehicle requests a video, the RSU may have other computing tasks, and the vehicle randomly occupies and releases computing resources. Although the computing resources of the RSU are continuous and limited, they can be discretized. So similar to bandwidth resources, P r (t) represents the computing resources of RSU r at time slot t. And the computing resources are discretized into N states on average, namely Let p u,r is the computing resource allocated to vehicle u by RSU r. The allocated computing resource cannot be greater than the computing resource contained at this time, so it satisfies When z u,r= 0, RSU r does not need to allocate computing resources for vehicle u, so it satisfies In addition, use Represents the computing resource allocation strategy of RSU r.
7. A resource allocation algorithm based on edge collaborative video transcoding according to claim 6, characterized in that: The total delay D of vehicle u to obtain a video stream f with quality l′ u,r Divided into vehicle-side processing delay T u and RSU processing delay T r . Specifically include: Vehicle-side processing delay includes low-quality = 1. Video stream transmission delay and the transcoding delay to transcode it to quality l′ Therefore, the processing delay on the vehicle side is: in The size is where d f,l is the number of bits contained in a video stream f with quality l. And G u,r is the transmission rate of the V2I link. According to Shannon’s formula, the V2I link communication rate from RSU r to vehicle u is Where B0 is the bandwidth contained in a single RBs, u,r is the signal-to-noise ratio (SNR) between the vehicle u and RSU r link. Since SNR is a continuous random variable that is difficult to analyze, SNR is modeled as FSMC for ease of calculation. In this model, Υ u,r is discretized and quantized into K states: if Then u,r =0; if Then u,r =σ1; ...; if Then u,r =σ K-1 Each level represents a state of FSMC, and the corresponding state space is written as λ={σ0, σ1 ,...,σ K-1 }. The size is Among them, Y(l,l') represents the number of CPU cycles consumed to convert a video with quality l to l'. u,loc Indicates the local computing power of vehicle u. The processing delay at the RSU end includes the transcoding delay of transcoding the low-quality l=1 video stream to the quality l′ and quality l' video stream transmission delay Therefore, the processing delay at the RSU end is in The size is where h u,r It is the ratio of RSU collaborative transcoding. The size is Considering that RSU r can transcode the remaining segments while transmitting low-quality video streams, the total delay for vehicle u to obtain video f with quality version l′ is the maximum of the RSU processing delay and the vehicle processing delay, that is, D u,r =max(T r ,T u ).
8. A resource allocation algorithm based on edge collaborative video transcoding according to claim 1, characterized in that: In order to achieve efficient resource allocation and provide users with low-latency video streaming services, the resource allocation of collaborative transcoding is designed as a joint optimization problem. This problem comprehensively considers bandwidth resource allocation, computing resource allocation, and collaborative transcoding strategies to minimize latency. Since the mutual cooperation between RSUs is not considered, the minimum latency can be obtained by executing the above resource allocation scheme separately in each RSU. Therefore, when solving this problem, only the latency minimization problem of a single RSU is considered, which can be described as Among them, c1 indicates that each vehicle can only request video content of one quality format; c2 ensures that the number of RBs allocated to the vehicle cannot exceed the number of RBs contained in the RSU; c3 indicates that the RSU will cooperate with the vehicle for transcoding only when the quality of the V2I link is good; c4 indicates that if the RSU does not cooperate with the vehicle for transcoding, the RSU will not allocate computing resources to the vehicle; c5 ensures that the computing resources allocated to each vehicle are less than the total computing power of the RSU; c6 and c7 indicate the request variables and link quality z u,r All are binary variables; c8 ensures the synergy ratio h u,r is a continuous variable ranging from 0 to 1.
9. A resource allocation algorithm based on edge collaborative video transcoding according to claim 8, characterized in that: Since the V2I channel status and available resources are dynamically changing, equation (16) is a dynamic optimization problem. At the same time, computing resource allocation and collaborative transcoding ratio are both continuous variables. Traditional optimization methods are often difficult to apply to complex problems with dynamic resource changes and continuous variables. The deep deterministic policy gradient method combines the advantages of deep learning and deterministic policy gradients, and can handle optimization problems in dynamic environments and continuous action spaces and make optimal decisions. Specifically, it includes:
901. Markov Decision Process (MDP) can be used to model reinforcement learning problems. Therefore, equation (15) is modeled as an MDP, and then the resource allocation algorithm based on DDPG is described in detail. The elements of MDP, namely, state space S, action space A, reward R t The definitions are as follows. The state space S is jointly determined by the RSU r and the vehicle u and their environment. It includes the basic resource information of the RSU and the vehicle, the request information of the vehicle, and the current V2I link quality information, which is (1)B r (t); (2)P r (t); (3) (4) (5) (6) where z u,r is quickly obtained through the link quality model, and this information is the key decision basis for collaborative transcoding. Therefore, in the state s of the tth time slot t ∈S is defined as The action space A is the set of possible actions that the agent RSU r can take in each state. It includes the number of RBs b assigned by r to each vehicle u,r And the computing power size p u,r , and the size of the collaborative transcoding ratio of each vehicle h u,r , that is (1) (2) (3) Therefore, action a executed at time slot t t ∈A is defined as a t ={b 1,r (t),...,b u,r (t);p 1,r (t),...,p u,r (t);h 1,r (t),...,h u,r (t)}。 (17) Return R t It is the reward of the environment feedback after the intelligent agent RSU interacts with the environment, combined with the optimization goal. t In the case of t , so that the return R t Maximize. Taking the opposite of the delay as the reward directly can intuitively achieve the goal of maximizing the reward. This design not only simplifies the optimization process, but also shows significant performance improvement in experiments and theoretical analysis. Therefore, the reward R in the tth time slot is t Defined as 902. The basic idea of the DDPG algorithm is to integrate the deep neural network (DNN) into the deterministic policy gradient algorithm to improve learning efficiency. In DDPG, the core concept is to use two different DNN networks to approximate the policy function and the Q-value function respectively, namely the actor network and the critic network. An actor network is a neural network used to represent and learn policy functions. Its main function is to map the state of the environment to a specific action and optimize the policy function during training. The expression of an actor network is usually π(s|θ π ),in, s is the state of the environment, π is the actor network (policy function), θ π is the weight parameter of the actor network. The critic network is a neural network used to estimate the value function of an action. Unlike the actor network, the critic network does not directly output actions, but evaluates the value (or Q value) of the state and action pair. The expression of the critic network is usually Q(s,a|θ Q ), where a is the action output by the actor network, θ Q is the weight parameter of the critic network. For the actor network, the output of the critic network is used to calculate the policy gradient. The policy gradient is usually expressed as Among them, J(θ π ) is the expected return of the policy function, π(s|θ π ) is the output of the actor network. Using the calculated policy gradient information, the parameters θ of the actor network are adjusted. π Perform gradient ascent updates to improve the expected return of the policy function Here, α π is the learning rate, which controls the step size of parameter updates. For the critic network, calculate the target Q value r t =R t +γQ′(s t+1 ,π'(s t+1 |θ π′ )|θ Q' )。 (21) Among them, R t is the current return, s t+1 is the next state, π′ and Q′ are the outputs of the target actor network and the target critic network, and γ is the discount factor. Use a regression loss function (such as mean squared error) to update the parameters θ of the critic network Q Where W is the batch size sampled from the playback buffer, α Q is the learning rate of the critic network.
10. A resource allocation algorithm based on edge collaborative video transcoding according to claim 9, characterized in that: The RSU allocates corresponding resources to the vehicle based on the solved resource allocation plan, and then transmits high-quality video according to the collaborative transcoding strategy. Finally, the vehicle obtains the video file of the specified quality.
Citation Information
Patent Citations
Vertical switching algorithm based on interval type-2 fuzzy neural network
CN112118602A
Business processing method and device based on edge node, node and storage medium
CN112672227A
Video streaming apparatus with quantization and method thereof
US20100074325A1
Cited By
Layered perceptual quantization and distributed deployment method for large language model under cloud edge collaboration
CN121887798A