Contextual reinforcement learning based method for rate adaptation and controller construction method
By constructing a bitrate adaptive controller based on contextual reinforcement learning, the problem of poor performance of deep neural networks in heterogeneous user network environments is solved, achieving a more efficient user viewing experience and bandwidth utilization, and improving the model's generalization ability and robustness.
Patent Information
- Application Number
- CN202211030945.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-26
- Publication Date
- 2026-11-20
- Estimated Expiration
- 2042-08-26
AI Technical Summary
Existing deep neural network bitrate adaptation methods perform poorly in heterogeneous user network environments, failing to obtain the optimal solution in polynomial time and exhibiting insufficient generalization ability, resulting in inconsistent user viewing experience quality.
A bitrate adaptive controller based on contextual reinforcement learning is constructed. By combining a network dynamic encoder and a bitrate adaptive meta-policy network with a proximal policy optimization method of behavior cloning and mutual information regularization, the neural network parameters are optimized to adapt to the network environment of heterogeneous users.
It improves the quality of the user viewing experience, enhances the bandwidth utilization and robustness of network video streaming, reduces training computational overhead, and improves model training speed and generalization ability.
Smart Images

Figure CN117692644B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of video communication technology, and in particular to a bitrate adaptation method and controller construction method based on context reinforcement learning. Background Technology
[0002] Currently, with the ever-increasing demand for online video viewing, video streaming transmission has become an indispensable part of traffic in the entire communication network. When users watch streaming videos online, different users' network environments can lead to varying overall viewing experiences, including different picture quality, buffering, and latency.
[0003] Dynamic streaming bitrate adaptation is a network service optimization scheme proposed to maximize the user's online video viewing experience. Specifically, on the video server side, the video service provider divides a given video into a sequence of video slices of fixed playback length, with each slice encoded with multiple versions at different bitrates. On the user side, the streaming media player observes the user's network environment and the player's video buffer status, and uses a bitrate adaptation allocation method to select the optimal bitrate version for each video slice for download and playback, aiming to maximize the overall experience quality when watching the video. Because network throughput is dynamically changing and difficult to predict, and the optimization variables are highly dimensional and complex, the bitrate adaptation allocation problem is an NP-hard problem, unable to obtain an optimal solution in polynomial time. Furthermore, while existing deep neural network bitrate adaptation methods can perform optimal inference in polynomial time with relatively low computational overhead, these methods only achieve good results with environmental data similar to the training sample data distribution, and cannot use heterogeneous user network conditions. Therefore, solving the generalization problem of bitrate adaptation methods is a major challenge. Summary of the Invention
[0004] To address the shortcomings of existing technologies, the purpose of this invention is to provide a bitrate adaptation method and a controller construction method based on contextual reinforcement learning.
[0005] According to one aspect of the present invention, a method for constructing a bitrate adaptive controller based on contextual reinforcement learning is provided, comprising:
[0006] Construct a network dynamic encoder that takes network throughput context information as input and the current network dynamic latent variable representation as output;
[0007] Construct a bitrate adaptive meta-policy network that takes user terminal information and the current network dynamic latent variable representation as input and the optimal bitrate version of the current video slice as output;
[0008] The global model consisting of the network dynamic encoder and the rate-adaptive meta-policy network is pre-trained using the behavior cloning method and then retrained using a proximal policy optimization method based on mutual information regularization to obtain the optimal neural network parameters of the network dynamic encoder and meta-policy network. Based on heterogeneous user terminals, the neural network parameters are fine-tuned to obtain the rate-adaptive controller.
[0009] Preferably, when a user requests to download the k-th video slice, the user information is represented as follows:
[0010]
[0011] Where: C k-1 The average network throughput recorded during the download of the (k-1)th video slice; d k-1 This refers to the average download time recorded during the download of the (k-1)th video slice; B provides the stream file size information for all bitrate versions of the k-th video slice; k-1 r is the current buffer size of the player on the user's device. k-1 For the bitrate version of the (k-1)th video slice downloaded; in addition, define the network context information c = {(C}, where c is the bitrate version of the (k-1)th video slice downloaded; and ... k-p d k-p ), ..., (C k-1 d k-1 )}.
[0012] Preferably, the network dynamic encoder consists of three neural network layers—an input layer, an intermediate layer, and an output layer—connected in series, wherein:
[0013] The input layer is a one-dimensional convolutional neural network with the LeakyReLU activation function, the intermediate layer is a fully connected neural network with the LeakyReLU activation function, and the output layer consists of two fully connected neural networks without activation functions, each with an output dimension of N. z The parameters of the neural network are uniformly represented as φ;
[0014] The output layer has two outputs, each representing the mean μ of the probability distribution of the latent variables. k and variance σ k ,in The current network dynamic hidden variable representation z k From μ k σ k A single sampling is performed within the constructed Gaussian distribution, i.e. c represents context information, z and z k Consistency indicates the current dynamic hidden variables of the network.
[0015] Preferably, the meta-policy network π θ (r|s, z) is a neural network consisting of three layers: an input layer, an intermediate layer, and an output layer, connected in series.
[0016] The input layer comprises six parallel neural network units: one activated by the LeakyReLU function, used to process the user terminal information. A one-dimensional convolutional neural network, with the LeakyReLU activation function, is used to process the user terminal information. k-1 d k-1 B k-1 r k-1 , z k Five fully connected neural networks are constructed. The outputs of these networks are concatenated to form a tensor, which serves as the input to an intermediate layer. The intermediate layer is a fully connected neural network with the LeakyReLU activation function. The output layer is a fully connected neural network with the softmax activation function, an output dimension of M, and neural network parameters uniformly represented as θ.
[0017] The output of the output layer is {π} θ (r1|s,z), …,π θ (r M |s, z)}, where π θ (r i |s,z) represents the probability that the i-th bitrate version is the optimal bitrate version, and M is the number of available bitrate versions for download. The optimal bitrate version is selected using a greedy strategy. Here, s and S k Consistency indicates client information.
[0018] Preferably, the pre-training via the behavior cloning method includes:
[0019] Define the behavioral cloning loss function:
[0020]
[0021] Given user state information s, let λ be the conditional mutual information of random variables z and r, where λ is the weighting coefficient and π is the weighting coefficient. e (r|s) represents the bitrate adaptive expert strategy. The bitrate version selected for the expert strategy;
[0022] Define the KL divergence loss function
[0023]
[0024] Where D KL (·||·) is the KL divergence calculation function between two probability distributions, β is the weighting coefficient, and p(z) is the latent variable representing the prior probability distribution of z;
[0025] Optimize the neural network parameter set (φ, θ):
[0026]
[0027] Where α3 and α1 are the network dynamic encoder q φ (z|c) and the meta-policy network π θ The learning rate parameter (r|s,z) is denoted by ▽, which represents the gradient operator.
[0028] Preferably, the retraining using a near-end policy optimization method based on mutual information regularization includes:
[0029] An additional parameter θ is constructed. v Policy Evaluation Neural Network The output is represented as follows in policy π θ Given (r|s, z), the current state S and the latent variable z represent the expected reward that can be obtained. Except for the output layer, which is a single neuron without an activation function, the rest of the neural network architecture is the same as the meta-policy network π. θ (r|s, z) are the same;
[0030] The retraining includes optimizing the loss function based on the near-end policy using mutual information regularization. Value function loss function and KL divergence loss function Among them, the loss function and for:
[0031]
[0032]
[0033] ρ(θ)=π θ (r|s,z) / π θ′ (r|s,z), z~q φ (z|c),
[0034]
[0035]
[0036]
[0037] G k=qoe k +γqoe k+1 +γ 2 qoe k+2 +…
[0038] Here, clip[ρ(θ), 1-∈, 1+∈] performs numerical clipping on ρ(θ) to ensure that the value of ρ(θ) is always between (1-∈, 1+∈), ε∈(0, 1), γ∈(0, 1), θ′ is the old parameter value before the previous round of parameter iteration optimization, and qoe k Download the k-th video slice for the user The viewing experience quality value obtained after playing each bitrate version. For the meta-policy network π θ The optimal bitrate version of (r|s, z) inference;
[0039] For the neural network parameter set (φ, θ, θ) v Optimization is performed where the parameter updates of the network dynamic encoder only use the loss function. and gradient:
[0040]
[0041] α3, α1, and α2 are the network dynamic encoder q φ (z|c), Meta-policy network π θ (r|s, z) and policy evaluation neural network The learning rate parameter, This represents the gradient operator.
[0042] Preferably, the mutual information regularization term The mathematical expression is:
[0043]
[0044]
[0045] Where, N sa Let p(z) be the number of samples, and p(z) be a latent variable representing the prior probability distribution of z.
[0046] Preferably, the trained global model is deployed to distributed, heterogeneous user terminals to make optimal bitrate decisions;
[0047] On the user end, the parameters of the global model are fine-tuned based on the local network status, i.e., the historical bandwidth dataset recorded locally on the user end, to become the local model; the fine-tuning process can quickly adapt to the local network status by a small number of parameter iterations.
[0048] Preferably, the parameter fine-tuning employs the same deep reinforcement learning method based on mutual information regularization as the global model.
[0049] According to a second aspect of the present invention, a code rate adaptive method based on context reinforcement learning is provided, comprising:
[0050] On the video server side, the video stream is divided into K video slice sequences of fixed playback length in time, and each video slice is encoded into M versions with different bitrates and cached.
[0051] The user terminal information and the request information for the kth video slice are fed back to the bitrate adaptive controller; the bitrate adaptive controller is constructed using any of the methods described above.
[0052] The bitrate adaptive controller infers the optimal bitrate version of the k-th video slice based on the user terminal information and the k-th video slice request information, and sends the version information and the k-th video slice request information to the video server.
[0053] The video server sends the corresponding bitrate video slice to the user terminal based on the optimal bitrate version information.
[0054] Compared with the prior art, the present invention has the following beneficial effects:
[0055] The bitrate adaptation method and controller construction method based on context reinforcement learning in this embodiment of the invention construct a method that takes network throughput context information c as input and the current network dynamic latent variable representation z. k The output network dynamic encoder and user state information S k And the current network dynamic hidden variable representation z k The optimal bitrate version of the current video slice as input. The output bitrate adaptive meta-policy network π θ (r|s,z) The network parameters of the model are optimized by using a near-end policy optimization method based on mutual information regularization. Finally, the optimal network dynamic encoder and meta-policy network neural network parameters are obtained, which can quickly adapt to the local network bandwidth environment of heterogeneous users, thereby maximizing the overall viewing experience quality of users and improving the bandwidth utilization and robustness of network video stream transmission.
[0056] The bitrate adaptation method based on contextual reinforcement learning in this embodiment of the invention can be designed to be a bitrate adaptation expert policy derived from any existing bitrate adaptation method or artificial labeling method, and can quickly learn better neural network parameters through behavior cloning. This allows for a better parameter initialization with lower training cost, thereby greatly improving the sample sampling efficiency of parameter training, increasing model training speed, and reducing model training computational overhead. Attached Figure Description
[0057] Other features, objects, and advantages of the present invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings:
[0058] Figure 1 This is a flowchart illustrating the composition of the rate-adaptive controller and the training of model parameters in one embodiment of the present invention.
[0059] Figure 2 This is a flowchart illustrating the application of a bitrate adaptive method based on contextual reinforcement learning in another embodiment of the present invention. Detailed Implementation
[0060] The present invention will now be described in detail with reference to specific embodiments. These embodiments will help those skilled in the art to further understand the present invention, but do not limit the invention in any way. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention. These all fall within the scope of protection of the present invention.
[0061] To facilitate understanding of this invention, a brief introduction to the video server and client information is provided first.
[0062] This paper presents a case study on the segmentation and encoding of network video streams on the server side. Assume that the video file stored on the server is segmented into K video slices U, each with a playback duration of L. k (K is any positive integer greater than 2), denoted as the set of video slices. For each video slice, dynamic adaptive streaming media encoding is used to encode it into M versions with different bitrates (M is any positive integer greater than 2), denoted as the video slice version set. Furthermore, the set is arranged in descending order of coding rate, i.e., r1 < ... <r M .
[0063] When a user requests to download the k-th video slice, the client information includes: 1) the average download time recorded from downloading the kp-th video slice to downloading the (k-1)-th video slice {d}. k-p ,…,d k-1} and average network throughput {C k-p ,…,C k-1}, and uniformly use context information c = {(C k-p d k-1 ), ..., (C k-1 d k-1 ) indicates that 2) the stream file size information for all bitrate versions of the k-th video slice. in 3) The current player buffer size B represents the size of the k-th video slice stream file with bitrate version r1. k-1 4) The bitrate version r of the downloaded (k-1)th video slice k-1 In addition, the client will also send video slice request information, that is, the index information of the k-th video slice currently being requested for download in the video server. The client information is represented as follows: For ease of representation, unless otherwise specified, the subscript k in the symbols can be omitted, for example, the symbols s and S k Equivalent, z and z k equivalence.
[0064] Based on the above background, the present invention provides an embodiment, see [link to embodiment]. Figure 1 A method for constructing a bitrate adaptive controller based on contextual reinforcement learning, comprising:
[0065] S100, Construct a network dynamic encoder that takes network throughput context information as input and the current network dynamic hidden variable representation as output;
[0066] S200 constructs a bitrate adaptive meta-policy network with user terminal information and the current network dynamic latent variable representation of the output of the network dynamic encoder in S100 as inputs and the optimal bitrate version of the current video slice as output.
[0067] S300, the training process of the global model (bitrate adaptive controller) composed of the network dynamic encoder and the bitrate adaptive meta-policy network is divided into two stages; the first stage is the parameter initialization process based on the behavior cloning method; the second stage is the retraining process based on the deep reinforcement learning method of mutual information regularization; the trained global model is fine-tuned on the neural network parameters based on heterogeneous user terminals to obtain the bitrate adaptive controller.
[0068] The bitrate adaptive controller obtained in this embodiment can quickly adapt to the local network bandwidth environment of heterogeneous users, thereby maximizing the overall viewing experience quality of users and improving the bandwidth utilization and robustness of network video stream transmission.
[0069] In a preferred embodiment of the present invention, the network dynamic encoder q in S100 φ (z|c) Input network throughput context information c, output the current network dynamic hidden variable representation z k ; Rate-adaptive meta-policy network π in S200 θ (r|s, z) Input user status information S k And the current network dynamic hidden variable representation z k Output the optimal bitrate version of the current video slice.
[0070] In a preferred embodiment, the network dynamic encoder q φ (z|c) is composed of three interconnected neural networks: the input layer is a one-dimensional convolutional neural network with the Leaky ReLU activation function; the middle layer is a fully connected neural network with the Leaky ReLU activation function; and the output layer consists of two fully connected neural networks without activation functions. The output dimension is N. z The parameters of the neural network are uniformly represented as φ;
[0071] Furthermore, the output layer has two outputs, labeled μ. k ,σ k ,in Latent variables represent from μ k ,σ k A single sampling is performed within the constructed Gaussian distribution, i.e.
[0072] In a preferred embodiment, the meta-policy network π θ (r|s, z) is composed of three layers of neural networks connected in series, where the output layer includes six parallel neural network units: 1) A one-dimensional convolutional neural network with the Leaky ReLU activation function processes information. 2) Five fully connected neural networks with the LeakyReLU activation function process information {C} respectively. k-1 d k-1 B k-1 r k-1 , z k Meanwhile, the outputs of the above networks are concatenated to form a tensor, which serves as the input to the intermediate layer. The intermediate layer is a fully connected neural network with the LeakyReLU activation function, and the output layer is a fully connected neural network with the softmax activation function. The output dimension is M, and the neural network parameters are uniformly represented as θ.
[0073] Furthermore, the meta-policy network π θ The output (r|s, z) can be represented as the probability set that each downloadable bitrate version is the optimal bitrate version, denoted as {π θ (r1|s,z), …,π θ (r M The optimal bitrate version is selected using a greedy strategy, as shown in the following formula: |s,z)}.
[0074]
[0075] In a preferred embodiment of the present invention, step S300 is implemented. Both the network dynamic encoder network and the bitrate adaptive meta-policy network can undergo centralized offline global model parameter training. Centralized offline training includes two stages: Stage 1, a pre-training process based on the behavior cloning method; and Stage 2, a retraining process based on a deep reinforcement learning method with mutual information regularization. The trained global model is directly deployed to distributed, heterogeneous user terminals for optimal bitrate decision-making. Subsequently, at the user terminal, the global model parameters are fine-tuned according to the local network state, becoming a local model. After a small number of parameter iterations, the local model can quickly adapt to the local network state of the user terminal.
[0076] In a preferred embodiment, centralized offline global model parameter training and local model parameter fine-tuning are performed, including:
[0077] S1: Network dynamic encoder q φ (z|c) and the meta-policy network π θ The set of neural network parameters (φ, θ) of (r|s, z) can be optimized end-to-end using deep learning parameter optimization methods such as stochastic gradient descent;
[0078] S2: The centralized offline global model parameter training process includes a pre-training process based on the behavior cloning method and a re-training process based on the deep reinforcement learning method with mutual information regularization. At the same time, offline training uses a virtual video playback simulator to simulate the real heterogeneous user terminal video download and playback process through network bandwidth datasets and video datasets.
[0079] S3: The local model parameter fine-tuning process includes a fine-tuning process using a deep reinforcement learning method based on mutual information regularization. At the same time, the fine-tuning process uses a virtual video playback simulator to simulate the local video download and playback process using historical bandwidth datasets and video datasets recorded locally on the user's end.
[0080] In a preferred embodiment, the first stage, the parameter initialization process based on the behavior cloning method, aims to improve the sampling complexity and training efficiency of parameter training, and mainly includes the following steps:
[0081] 1. Randomly initialize the neural network parameters (φ, θ), and let the prior distribution p(z) of the latent variable representing z be a standard Gaussian distribution;
[0082] 2. Use a bitrate adaptive simulator to simulate user downloading and playing video streams. When a user requests a video stream slice U... k At that time, the adaptive bitrate controller collects user state information S k And network throughput context information c, z is obtained by sampling through network dynamic encoder. k ~q φ(z|c) is obtained through a rate-adaptive meta-policy network. Optimal bitrate version The information is sent to the server, and the corresponding video stream slice will be downloaded and played by the user.
[0083] 3. Obtain expert strategy tags and data Store in storage pool
[0084] 4. Repeat steps 2 and 3, pending storage pool Once the data meets a certain quantity requirement, begin training the neural network parameters;
[0085] 5. Calculate the behavioral cloning loss function and the KL divergence loss function:
[0086]
[0087]
[0088] Where λ and β are weighting coefficients, and D KL (·||·) is the KL divergence calculation function between two probability distributions. The conditional mutual information between random variables z and r, given user state information s, is calculated using the following formula:
[0089]
[0090]
[0091] Where N sa Number of samples;
[0092] 6. Update the parameters of the neural network parameter set (φ, θ):
[0093]
[0094] Where α3 and α1 are the learning rate parameters.
[0095] 7. Repeat steps 2-6.
[0096] In a preferred embodiment, the second stage, the retraining process of the deep reinforcement learning method based on mutual information regularization, aims to improve policy performance based on parameter initialization, and mainly includes the following steps:
[0097] 1. Using the neural network parameters (φ, θ) obtained in stage one as initial parameters, let the prior distribution p(z) representing the latent variable z be a standard Gaussian distribution.
[0098] 2. Initialize the storage pool Let θ′=θ;
[0099] 3. Use a bitrate adaptive simulator to simulate user video stream downloading and playback. When a user requests a video stream slice U... k At that time, the adaptive bitrate controller collects user state information S k And network throughput context information c, z is obtained by sampling through network dynamic encoder. k ~q φ (z|c) is obtained through a rate-adaptive meta-policy network. Optimal bitrate version The information is sent to the server, and the corresponding video stream slice will be downloaded and played by the user.
[0100] 4. Calculate U for each video stream slice k The corresponding viewing experience quality score (qoe) after playback k , will data (s k ,c,r k ,qoe k Store in storage pool
[0101] 5. Repeat steps 3 and 4 until the data in the storage pool meets a certain quantity requirement, then begin training the neural network parameters;
[0102] 6. Calculate the loss function for near-end policy optimization based on mutual information regularization. Value function loss function and KL divergence loss function Where the loss function and The mathematical formula is:
[0103]
[0104]
[0105] ρ(θ)=π θ (r|s,z) / π θ′ (r|s,z), z~q φ (z|c),
[0106]
[0107]
[0108]
[0109] G k =qoe k +γqoe k+1 +γ2 qoe k+2 +…
[0110] Here, clip[ρ(θ), 1-∈, 1+∈] performs numerical clipping on ρ(θ) to ensure that the value of ρ(θ) is always between (1-∈, 1+∈), ∈(0,1), γ∈(0,1);
[0111] 7. For the neural network parameter set (φ, θ, θ...) v Perform parameter iterative updates:
[0112]
[0113] Where α3, α1, and α2 are learning rate parameters;
[0114] 8. Repeat steps 2-7.
[0115] The bitrate adaptive simulator used in Phase 1 and Phase 2 simulates network bandwidth data and requested video stream file sets from all heterogeneous users to perform centralized offline training on the network dynamic encoder and meta-policy neural network. After training, the obtained set of neural network parameters (φ, θ) is denoted as the global parameter model.
[0116] In a preferred embodiment, for any heterogeneous user, a global parameter model (φ, θ) is downloaded to the user's terminal for model deployment. This model can be used directly on the user's local machine. Simultaneously, due to the heterogeneous nature of the user's local network, the model parameters need to be trained locally at specific times to obtain the optimal local model parameters.
[0117] Furthermore, the fine-tuning training process for the network dynamic encoder and the local parameter set (φ, θ) of the meta-policy neural network can include the following steps:
[0118] 1. Using the global neural network parameters (φ, θ) as initial parameters, let the prior distribution p(z) representing the latent variable z be a standard Gaussian distribution.
[0119] 2. Initialize the storage pool Let θ′=θ;
[0120] 3. Use a bitrate adaptive simulator to simulate user video stream downloading and playback. When a user requests a video stream slice U... k At that time, the adaptive bitrate controller collects user state information S k And network throughput context information c, a is obtained by sampling through network dynamic encoder. k ~q φ (z|c) is obtained through a rate-adaptive meta-policy network. Optimal bitrate version The information is sent to the server, and the corresponding video stream slice will be downloaded and played by the user.
[0121] 4. Calculate U for each video stream slice k The corresponding viewing experience quality score (qoe) after playback k , will data (s k ,c,r k ,qoe k Store in storage pool
[0122] 5. Repeat steps 3 and 4 until the data in the storage pool meets a certain quantity requirement, then begin training the neural network parameters;
[0123] 6. Calculate the loss function for near-end policy optimization based on mutual information regularization. Value function loss function and KL divergence loss function Where the loss function and The mathematical formula is:
[0124]
[0125]
[0126] ρ(θ)=π θ (r|s,z) / π θ′ (r|s,z), z~q φ (z|c),
[0127]
[0128]
[0129]
[0130] G k =qoe k +γqoe k+1 +γ 2 qoe k+2 +…
[0131] Here, clip[ρ(θ), 1-∈, 1+∈] performs numerical clipping on ρ(θ) to ensure that the value of ρ(θ) is always between (1-∈, 1+∈), ε∈(0,1), and γ∈(0,1);
[0132] 7. For the neural network parameter set (φ, θ, θ...) v Perform parameter iterative updates:
[0133]
[0134] Where α3, α1, and α2 are learning rate parameters;
[0135] 8. Repeat steps 2-7.
[0136] The local neural network parameters (φ, θ) obtained through fine-tuning training can be directly used as the S100 network dynamic encoder parameters and the S200 meta-policy network parameters of the bitrate adaptive controller. After the bitrate adaptive controller receives user information and the k-th video slice request information, it obtains the network throughput context information c and user state information S based on this information. k Among them, the network dynamic encoder q φ (z|c) takes context information c as input and outputs the current network dynamic hidden variable representation z. k Meta-policy network π θ (r|s, z) represents the user state information S k And the current network dynamic hidden variable representation z k As input, output the optimal bitrate version of the current video slice. This completes the bitrate adaptive control process for the k-th video slice.
[0137] To adapt to the needs of dynamic adaptive video streaming transmission, the above embodiments of the present invention provide a context-based reinforcement learning bitrate adaptive method that can generalize to heterogeneous user local time-varying network bandwidth environments. This improves the bandwidth utilization of adaptive network streaming transmission, as well as the generalization, robustness, and consistency of the method, thus providing users with better video service quality.
[0138] Based on the same inventive concept, other embodiments of the present invention also provide a bitrate adaptation method based on context reinforcement learning, see [link to relevant documentation]. Figure 2 ,include:
[0139] S11, on the video server side, the video stream is divided into K video slice sequences of fixed playback length in time, and each video slice is encoded into M versions with different bitrates and cached;
[0140] S12, the user terminal information and the k-th video slice request information are fed back to the bitrate adaptive controller; the bitrate adaptive controller in this embodiment adopts the above-described... Figure 1 The method shown is used to construct and utilize a local model formed after parameter fine-tuning;
[0141] S13, the bitrate adaptive controller infers the optimal bitrate version of the k-th video slice based on the user terminal information and the k-th video slice request information, and sends the version information and the k-th video slice request information to the video server.
[0142] S14, the video server sends the corresponding bitrate video slice to the user terminal based on the optimal bitrate version information.
[0143] This embodiment maximizes the overall viewing experience quality for users and improves the bandwidth utilization and robustness of network video streaming transmission.
[0144] Specific embodiments of the present invention have been described above. It should be understood that the present invention is not limited to the specific embodiments described above, and those skilled in the art can make various modifications or variations within the scope of the claims, which do not affect the essence of the present invention. The preferred features described above can be used in any combination without conflict.
Claims
1. A method for constructing a bitrate adaptive controller based on contextual reinforcement learning, characterized in that, include: Construct a network dynamic encoder that takes network throughput context information as input and the current network dynamic latent variable representation as output; Construct a bitrate adaptive meta-policy network that takes user terminal information and the current network dynamic latent variable representation as input and the optimal bitrate version of the current video slice as output; The global model consisting of the network dynamic encoder and the rate-adaptive meta-policy network is pre-trained using the behavior cloning method and then retrained using the proximal policy optimization method based on mutual information regularization to obtain the optimal neural network parameters of the network dynamic encoder and meta-policy network. Based on heterogeneous user terminals, the parameters of the neural network are fine-tuned to obtain a bitrate adaptive controller. The network dynamic encoder consists of three neural network layers—an input layer, an intermediate layer, and an output layer—connected in series. The input layer is a one-dimensional convolutional neural network with the LeakyReLU activation function, the intermediate layer is a fully connected neural network with the LeakyReLU activation function, and the output layer consists of two fully connected neural networks without activation functions, each with an output dimension of 1. Neural network parameters are uniformly represented as ; The output layer has two outputs, which represent the mean of the probability distribution of the latent variables. and variance ,in The current network dynamic hidden variable representation from A single sampling is performed within the constructed Gaussian distribution, i.e. , For contextual information, and Consistency indicates the current dynamic hidden variables of the network; The meta-policy network The neural network consists of three layers: an input layer, an intermediate layer, and an output layer, connected in series. The input layer comprises six parallel neural network units: one activated by the LeakyReLU function, used to process the user terminal information. A one-dimensional convolutional neural network, with LeakyReLU activation function, is used to process the user terminal information respectively. Five fully connected neural networks are used. The outputs of these networks are concatenated to form a tensor, which serves as the input to an intermediate layer. The intermediate layer is a fully connected neural network with the LeakyReLU activation function. The output layer is a fully connected neural network with the softmax activation function and an output dimension of... Neural network parameters are uniformly represented as ; The output of the output layer is ,in Represented as the first The probability that a certain bitrate version is the optimal bitrate version is given by M, where M is the number of available bitrate versions for download. A greedy strategy is used to select the optimal bitrate version. , Here, s and Consistency indicates client information.
2. The method for constructing a bitrate adaptive controller based on contextual reinforcement learning according to claim 1, characterized in that, The user requests to download the [file name]. When a video slice is used, the user terminal information is represented as follows: ; in: To download the first Average network throughput recorded during each video slice; To download the first The average download time recorded during each video slice; For the first Information on the stream file size of all bitrate versions of each video slice; This represents the current buffer size of the player on the user's device. For the downloaded number The bitrate version of the video slice; in addition, it will be downloaded from the first video slice. The video slice was downloaded. The average download time and average network throughput recorded during each video slice define network context information. .
3. The method for constructing a bitrate adaptive controller based on contextual reinforcement learning according to claim 1, characterized in that, The pre-training via the behavior cloning method includes: Define the behavioral cloning loss function: ; Given user status information random variables under certain conditions and random variables Conditional mutual information, These are the weighting coefficients. For bitrate adaptive expert strategy, The bitrate version selected for expert strategies; Define the KL divergence loss function : ; in The KL divergence calculation function is used to calculate the KL divergence between two probability distributions. These are the weighting coefficients. Representation of latent variables The prior probability distribution; For neural network parameter set Optimize: ; in, These are network dynamic encoders. Heyuan Strategy Network The learning rate parameter is denoted by ▽, which represents the gradient operator.
4. The method for constructing a bitrate adaptive controller based on contextual reinforcement learning according to claim 1, characterized in that, The retraining using a near-end policy optimization method based on mutual information regularization includes: An additional parameter is constructed. Policy evaluation neural network The output result is represented as the policy Current state and latent variable representation The expected return that can be obtained, except that the output layer is a single neuron without an activation function, is the same as the meta-policy network in terms of the network architecture. same; The retraining includes optimizing the loss function based on the near-end policy using mutual information regularization. Value function loss function and KL divergence loss function Among them, the loss function and for: ; ; ; ; ; ; ; in, right Perform numerical clipping to ensure The value is always in between, , The old parameter values were used before the previous round of parameter iteration optimization. Download the first for users The first video slice The viewing experience quality value obtained after playing each bitrate version. Meta-policy network The inferred optimal bitrate version; For neural network parameter set Optimization is performed where the parameter updates of the network dynamic encoder only use the loss function. and gradient: ; These are network dynamic encoders. Meta-policy network And policy evaluation neural network The learning rate parameter is denoted by ▽, which represents the gradient operator.
5. A method for constructing a bitrate adaptive controller based on contextual reinforcement learning according to claim 3 or 4, characterized in that, The mutual information regularization term The mathematical expression is: ; ; in, For the number of samples, Representation of latent variables The prior probability distribution, Indicates the first Latent variable representation of subsamples.
6. The method for constructing a bitrate adaptive controller based on contextual reinforcement learning according to claim 5, characterized in that, The trained global model is deployed to distributed, heterogeneous user terminals to make optimal bitrate decisions; On the user end, the parameters of the global model are fine-tuned based on the local network status, i.e., the historical bandwidth dataset recorded locally on the user end, to become the local model; the fine-tuning process can quickly adapt to the local network status by a small number of parameter iterations.
7. The method for constructing a bitrate adaptive controller based on contextual reinforcement learning according to claim 6, characterized in that, The parameter fine-tuning employs the same deep reinforcement learning method based on mutual information regularization as the global model.
8. A bitrate adaptive method based on contextual reinforcement learning, characterized in that, include: On the video server side, the video stream is divided into time segments. A sequence of video slices of fixed playback length, each video slice being encoded as follows: Versions with different bitrates are cached; User information and the Each video slice request information is fed back to the bitrate adaptive controller; the bitrate adaptive controller is constructed using the method described in any one of claims 1-7; The adaptive bitrate controller is based on the user terminal information and the first... Based on the video slice request information, the first... The optimal bitrate version of the video slice and the version information are then used together with the... A video slice request message is sent to the video server. The video server sends the corresponding bitrate video slice to the user terminal based on the optimal bitrate version information.
