Self-adaptive video coding and decoding method and device based on transmission rate change

Through the reinforcement learning algorithm dynamically adjusting the video encoding and codec method and code rate, the problem of high performance of encoding and codec equipment under unstable network transmission rate is solved, and stable low-latency transmission and high-quality continuous transmission of video are achieved.

CN119071490APending Publication Date: 2024-12-03IGRS ENG LAB(SHENZHEN) LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411356470.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-27
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

The prior art requires frequent conversion of code rates when the network transmission rate is unstable, resulting in high performance requirements of the encoding and decoding equipment, making it difficult to ensure high-quality continuous transmission of video.

Method used

Through reinforcement learning algorithms, use application layer and transmission layer data to build prediction models, generate control strategies for video encoding and decoding, dynamically adjust the encoding and decoding methods and code rates, and realize adaptive video transmission, especially when the transmission rate is unstable, only Switching the encoding and decoding method can meet high-quality continuous transmission without frequent conversion of code rates.

Benefits of technology

In the case of unstable network transmission rate, stable and low-latency transmission of video is achieved, reducing the requirements for equipment performance and ensuring high-quality continuous transmission of video.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119071490A_ABST
    Figure CN119071490A_ABST
Patent Text Reader

Abstract

The invention discloses an adaptive video coding and decoding method and device based on transmission rate change, and the method comprises the steps: carrying out the reinforcement learning of application layer data, such as a coding and decoding mode, a coding and decoding rate, and transmission layer data, such as transmission time delay, a packet loss rate, and physical layer statistical data, and constructing a prediction model; the control strategy generating module is used for generating a video encoding and decoding control strategy; and acquiring application layer data and transmission layer data of the current stage of the video in real time, acquiring a video coding and decoding control strategy of the current stage by using the prediction model, and dynamically adjusting a coding and decoding mode and a coding and decoding rate of video transmission of the next stage. According to the invention, the coding and decoding mode, the coding and decoding code rate and other parameters of the application layer are associated with the transmission delay, the packet loss rate and other parameters of the transmission layer, and the coding and decoding mode, the coding and decoding parameters and the like are adaptively and dynamically adjusted, so that the equipment with lower performance can perform adaptive dynamic adjustment on the coding and decoding mode and the coding and decoding parameters under the condition that the parameters of the transmission layer fluctuate in a larger range. And stable low-delay video transmission is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of video transmission, and in particular to a device for an adaptive video encoding and decoding method based on transmission rate variation. Background Art

[0002] Video coding and decoding technology is widely used in the field of real-time Internet communications, such as video conferencing, live video and on-demand services, cloud games, etc.

[0003] To ensure the continuity of the video, video coding and decoding technology needs to balance factors such as video quality, file size, and transmission bandwidth in real-time communication to select the appropriate bit rate and effectively control the real-time video traffic. The current method is to use the traffic prediction algorithm to predict the future transmission rate, and then control the video codec bit rate by the transmission rate. However, when the network transmission rate is unstable, the existing traffic prediction algorithm needs to frequently switch the bit rate, which places high requirements on the performance of the codec equipment. Many low-performance devices find it difficult to ensure high-quality continuous transmission of video. Summary of the invention

[0004] In view of the above-mentioned defects, the technical problem to be solved by the present invention is to provide an adaptive video encoding and decoding method and method based on transmission rate changes, so as to solve the problem that when the network transmission rate is unstable, the existing traffic prediction algorithm needs to frequently convert the bit rate and has high performance requirements on the encoding and decoding equipment.

[0005] To this end, a first aspect of an embodiment of the present application provides an adaptive video encoding and decoding method based on transmission rate change, comprising the following steps:

[0006] Using the application layer data and transport layer data of video transmission in a network environment, reinforcement learning is performed to construct a prediction model, and the prediction model is used to generate a control strategy for video encoding and decoding; the application layer data includes the encoding and decoding mode and the encoding and decoding bit rate, and the transport layer data includes transmission delay, packet loss rate and physical layer statistical data; the control strategy is: dynamically adjust the encoding and decoding mode of video transmission according to the real-time network transmission rate; and dynamically adjust the encoding and decoding bit rate of video transmission; the encoding is applied to the sending end, and the decoding is applied to the receiving end;

[0007] The application layer data and transport layer data of the current video stage are obtained in real time, and the control strategy of the video encoding and decoding in the current stage is obtained by using the prediction model, and the encoding and decoding mode and encoding and decoding rate of the video transmission in the next stage are dynamically adjusted to realize flow control.

[0008] Based on the above technical solutions, this application associates the application layer's coding and decoding mode, coding and decoding parameters and other parameters with the transmission layer's transmission delay, packet loss rate and other related parameters, performs reinforcement learning, and obtains the coding and decoding control strategy for video transmission. In actual use, the coding and decoding mode, coding and decoding bit rate and other parameters are adaptively selected. In particular, when the network transmission rate is unstable, it is only necessary to switch the coding and decoding mode to ensure high-quality continuous transmission of the video. There is no need to frequently convert the coding and decoding bit rate, and the requirements for device performance are relatively low.

[0009] In the above technical solution, preferably, the reinforcement learning is carried out using a Markov process mathematical model, and the state space in the Markov process mathematical model is defined as the transmission layer data of the current stage; the action space is defined as the video transmission prediction value of the current stage, and the video transmission prediction value corresponds to the control strategy, which is used to set the encoding and decoding method and encoding and decoding rate of the video transmission in the next stage.

[0010] In the above technical solution, preferably, the reward function R in the Markov process mathematical model is expressed as:

[0011]

[0012] Wherein, N represents the length of a video transmission data packet in one stage, w1, w2 and w3 represent weighting coefficients, w1>0, w2>0, w3>0.

[0013] In the above technical solution, preferably, the value of the weighting coefficient w1 is set to 30, the value of w2 is set to 7, and the value of w3 is set to 2.

[0014] In the above technical solution, preferably, in the reinforcement learning process, the PPO algorithm is used as the update strategy of the Markov process mathematical model.

[0015] In the above technical solution, preferably, the method is applied to a receiving end to adaptively and dynamically decode the received video, and the process is as follows:

[0016] Step 210, obtaining application layer data and transport layer data of video transmission in real time and performing data statistics;

[0017] Step 220, using the prediction model to obtain a control strategy, wherein the control strategy includes: switching a decoding mode and switching a decoding bit rate;

[0018] Step 230, determining whether the control strategy is to switch the decoding mode, if yes, go to step 240; if no, go to step 250;

[0019] Step 240, switching to a corresponding decoding mode;

[0020] Step 250, determining whether the control strategy also includes switching the decoding code rate, if not, returning to step 210; if including switching the decoding code rate, switching to the corresponding decoding code rate; performing the decoding operation, and returning to step 210;

[0021] The above process continues until the video transmission is completed.

[0022] In the above technical solution, preferably, the method is applied to the receiving end and the sending end, the receiving end dynamically decodes the received video, and at the same time feeds back the control strategy to the sending end, so that the sending end performs adaptive dynamic encoding on the video transmission, and the adaptive dynamic encoding process of the sending end is as follows:

[0023] Step 310, receiving the control strategy fed back by the receiving end;

[0024] Step 320, determining whether the control strategy includes switching the encoding mode, if it includes switching the encoding mode, proceeding to step 330; if it does not include switching the encoding mode, proceeding to step 340;

[0025] Step 330, determine whether the current video is an I frame, if not an I frame, go to step 350; if it is an I frame, go to step 360;

[0026] Step 340, determining whether the control strategy further includes switching the encoding bit rate, if it includes switching the encoding bit rate, switching to the corresponding encoding bit rate, performing the encoding operation, and returning to step 310; if it does not include switching the decoding bit rate, returning to step 310;

[0027] Step 350, performing encoding operation using the current encoding method, and returning to step 330;

[0028] Step 360, switch to the corresponding encoding bit rate and perform encoding operation; return to step 340;

[0029] The above process continues until the video transmission is completed.

[0030] In the above technical solution, preferably, the reward function of the current stage video transmission is calculated to determine the profit of the previous video transmission. If the profit value is large, such a strategy will tend to be generated; if the profit value is small or negative, such a strategy will be avoided.

[0031] A second aspect of the embodiments of the present application provides an adaptive video coding and decoding device based on transmission rate change, including:

[0032] An acquisition unit, used to acquire application layer data and transport layer data of the video, wherein the application layer data includes a coding mode and a coding bit rate, and the transport layer data includes a transmission delay, a packet loss rate, and physical layer statistical data;

[0033] The reinforcement learning unit uses the application layer data and the transport layer data of the video transmission in the network environment to perform reinforcement learning and construct a prediction model, wherein the prediction model is used to generate a control strategy for video encoding and decoding; the control strategy is: dynamically adjusting the encoding and decoding mode of the video transmission according to the real-time network transmission rate; and dynamically adjusting the encoding and decoding bit rate of the video transmission; the encoding is applied to the sending end, and the decoding is applied to the receiving end;

[0034] The dynamic adjustment unit is used to obtain the application layer data and transport layer data of the current stage of the video in real time, and use the prediction model to obtain the control strategy of the video encoding and decoding in the current stage, dynamically adjust the encoding and decoding mode and encoding and decoding rate of the video transmission in the next stage, and realize flow control.

[0035] In the above technical solution, preferably, the reinforcement learning adopts a Markov process mathematical model, and the reward function R in the Markov process mathematical model is expressed as:

[0036]

[0037] Wherein, N represents the length of a video transmission data packet in one stage, w1, w2 and w3 represent weighting coefficients, w1>0, w2>0, w3>0.

[0038] It can be seen from the above technical solutions that the adaptive video encoding and decoding method and device based on transmission rate change provided by the present invention solves the problem that in the case of unstable network transmission rate, the existing traffic prediction algorithm needs to frequently convert the bit rate and has high performance requirements for the encoding and decoding device. Compared with the prior art, the present invention has the following beneficial effects:

[0039] This application scheme, based on the reinforcement learning algorithm, associates the application layer's codec mode, codec parameters and other parameters with the transmission layer's transmission delay, packet loss rate and other related parameters, performs reinforcement learning, and builds a prediction model to generate a control strategy for video codecs. In actual use, the codec mode and codec bitrate of video transmission can be adaptively adjusted according to the real-time network transmission rate to achieve stable and low-latency video transmission. In particular, when the network transmission rate is unstable, only the codec mode needs to be switched to ensure high-quality continuous transmission of the video, and there is no need to frequently switch the codec bitrate, which places low requirements on device performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces and describes the drawings required for use in the embodiments of the present invention or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0041] Figure 1 A flowchart of an adaptive video encoding and decoding method based on transmission rate change provided by an embodiment of the present invention;

[0042] Figure 2 A schematic diagram of state transition in a Markov decision process in an embodiment of the present invention;

[0043] Figure 3 This is a schematic diagram of prediction model training in an embodiment of the present invention;

[0044] Figure 4 Schematic diagram of a dynamic adjustment process of adaptive decoding of video transmission at a receiving end according to an embodiment of the present invention;

[0045] Figure 5 The figure is a schematic diagram of a dynamic adjustment process of adaptive encoding for video transmission at a transmitter in an embodiment of the present invention. DETAILED DESCRIPTION

[0046] The following will be combined with the accompanying drawings of the embodiments of the present invention to clearly and completely describe the technical solutions of the embodiments of the present invention. Obviously, the embodiments described below are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0047] In order to more clearly explain and illustrate the technical solution and implementation of the present invention, several preferred specific embodiments for implementing the technical solution of the present invention are introduced below.

[0048] It should be noted that the directional words such as "inside, outside", "front, back" and "left, right" in this article are expressed based on the product usage status. Obviously, the use of the corresponding directional words does not constitute a limitation on the protection scope of this scheme.

[0049] In this application, the encoding and decoding mode, encoding and decoding parameters and other parameters of the application layer are associated with the transmission delay, packet loss rate and other related parameters of the transport layer, and reinforcement learning is performed to obtain the encoding and decoding control strategy of video transmission. When the network transmission rate of video transmission is unstable, the encoding and decoding mode, encoding and decoding parameters, etc. are adaptively and dynamically adjusted. Therefore, low-performance devices can also achieve stable and low-latency video transmission when the parameters of the transport layer fluctuate over a large range.

[0050] The following first introduces an adaptive video encoding and decoding method based on transmission rate change provided by an embodiment of the present application in conjunction with a flow chart.

[0051] like Figure 1 As shown, an adaptive video encoding and decoding method based on transmission rate change provided in an embodiment of the present application includes the following steps:

[0052] Step 110, using the application layer data and transport layer data of video transmission in the network environment, reinforcement learning is performed to build a prediction model, and the prediction model is used to generate a codec control strategy for video transmission to achieve the purpose of flow control.

[0053] The application layer data includes the codec mode and codec bit rate, for example, the codec modes include H264, H265, etc.

[0054] Transport layer data includes transmission delay, packet loss rate and physical layer statistics. Physical layer statistics include, for example, the maximum number of retransmissions.

[0055] The control strategy is: dynamically adjust the encoding and decoding mode of video transmission according to the real-time network transmission rate; and dynamically adjust the encoding and decoding bit rate of video transmission. The control strategy may be one of the following: (1) switch the encoding and decoding mode; (2) switch the encoding and decoding bit rate; (3) switch the encoding and decoding mode and switch the encoding and decoding bit rate. Among them, encoding is applied to the sending end, and decoding is applied to the receiving end.

[0056] Step 120, obtain the application layer data and transport layer data of the current stage of the video in real time, and use the above-mentioned prediction model to obtain the codec control strategy of the current stage of the video, dynamically adjust the codec method and codec rate of the next stage of video transmission, and realize flow control.

[0057] Among them, step 110 is the learning and training stage, and step 120 is the specific application stage. In the specific application stage, reinforcement learning is still ongoing. That is to say, after the solution is deployed on the user client, the prediction model will be continuously strengthened and trained according to the actual network conditions of the user client, so as to adapt to the actual network conditions of the user.

[0058] The present application method is implemented based on the reinforcement learning algorithm in machine learning, and in the specific implementation, a Markov process mathematical model is adopted.

[0059] Markov Decision Process (MDP) is a mathematical framework used to simulate the process by which a decision maker takes actions to maximize a certain cumulative reward in a given state. MDP is usually composed of the following four basic elements to form a quadruple:

[0060] State (S): The set of all possible states that may be encountered during the decision-making process.

[0061] Action (A): The set of all possible actions that can be taken in each state. Actions are operations that a decision maker can perform to change the state of the system.

[0062] Transition probability (P): describes the probability of the system transitioning to the next state given the current state and taking a certain action.

[0063] Reward function (R): defines the immediate reward obtained after taking an action in each state.

[0064] The goal of an MDP is to find a policy, that is, a rule for choosing actions in each state that maximizes the long-term accumulated reward.

[0065] In this application, the state transition diagram of the Markov decision process is as follows Figure 2 As shown in the figure, environment refers to the specific usage environment (conditions). The reinforcement learning agent is the algorithm module of the prediction model. The state space S t It is defined as the transport layer data of the current stage, including packet loss rate l, transmission delay d, transmission delay variance j, and actual transmission rate v. All data indicators are first normalized and then used as the input of the prediction model to avoid the interference of outliers, which will affect the normal training and gradient update of the neural network. t represents the time series.

[0066] Taking the packet loss rate as an example, assuming that its sequence is l = {l1, l2, l3, lmax, ..., ln}, the normalization method is ln = {l1 / lmax, l2 / lmax, l3 / lmax, ..., ln / lmax}. The same is true for other indicators. Therefore, the input Sn of all data indicators after data normalization is expressed as Sn = {ln, dn, jn, vn, in}.

[0067] The action space A in the Markov decision process in this application tDefined as the video transmission prediction value of the current stage, the output range is A = [a_min, a_max], and the specific value is any discrete value in this space. The video transmission prediction value corresponds to the control strategy, which is used to set the encoding and decoding method and encoding and decoding rate of the next stage of video transmission.

[0068] The state space is input to the neural network model. The algorithm module will generate an action value a for the optimal amount of data D to be sent by the sender according to the current strategy. This action value will be transmitted to the sender as the video sending rate for the next stage. Then the prediction model will generate the reward function value R for this feedback. i , is used to judge the benefit of the last action. If the benefit value is large, the prediction model will tend to generate such a better strategy; if the benefit value is small or negative, the parameter training of the prediction model will avoid generating similar actions. The above stages are repeated repeatedly. After training a certain scale of data sets and having more experience, it will evolve into a prediction model that can reasonably predict the amount of data D to be sent by the sender. Figure 3 shown.

[0069] In this application, the reward function R combines the reward function mechanism design of the Pensieve algorithm and the OnRL algorithm.

[0070] The reward function of the Pensieve algorithm usually includes video quality, buffer size, and possible entropy regularization terms. The reward function is too complex and difficult to adjust and optimize. In addition, it is too sensitive to specific network conditions or video content, which limits the performance of the algorithm in diverse environments.

[0071] The reward function of the OnRL algorithm is designed to maximize the long-term expected QoE, including factors such as video quality, freeze rate, and bitrate fluctuation. In practical applications, users' video viewing behavior and network conditions may change constantly, and the reward function of the OnRL algorithm may need to be dynamically adjusted to adapt to these changes, which increases the complexity of algorithm design. In addition, QoE is a multi-dimensional concept that includes multiple conflicting goals, such as video quality, buffer delay, and data usage. The reward function of the OnRL algorithm is difficult to optimize these goals at the same time.

[0072] In this application, the reward function mechanism of the Pensieve algorithm and the OnRL algorithm is combined to design a reward function based on real-time video optimization. The reward function R of this application is obtained mainly by weighting the following indicators:

[0073] The actual transmission rate V is a positive factor (reward factor). For data transmission, the faster the transmission rate, the better.

[0074] Transmission delay d is a negative factor (penalty factor). For data transmission, the longer the delay, the worse the transmission quality. Therefore, the smaller the delay, the better.

[0075] The actual transmission rate continuous variance (v i -v i-1 ), which is a positive factor (reward factor). The more stable the speed, the better. Therefore, the smaller the absolute value, the better.

[0076] The reward function R is:

[0077]

[0078] N represents the length of a video transmission data packet in one stage, w1, w2 and w3 represent weight coefficient constants, w1>0, w2>0, w3>0.

[0079] The reward function algorithm in this application is simple and closer to the actual situation of the network, and has very good results.

[0080] This application scheme, after combining and comparing multiple parameters at the physical layer, sets a set of optimal combinations for practical use, which are:

[0081] The value of w1 is set to 30, the value of w2 is set to 7, and the value of w3 is set to 2.

[0082] The goal of the control strategy is to minimize the difference between the absolute value of the amount of data to be sent by the transmission sender and the actual bandwidth. The objective function T of the model can be expressed as:

[0083] T = Min(bA(argmax(L(p)))D.

[0085] Among them, b represents the network bandwidth, L(P) represents the probability matrix predicted by the last layer of the neural network of the algorithm model, and A is the action space of the prediction model. The PPO (Proximal Policy Optimization) algorithm is used as the update strategy of the prediction model to ensure that the model will not be difficult to converge due to the large step size causing the difference between the new and old strategies.

[0086] In video coding, I-frames, P-frames, and B-frames are key frame types used in video compression technology. They play different roles in the video stream to optimize storage space and improve coding efficiency.

[0087] An I frame (Intra-coded Frame) is a key frame that does not rely on other frames for decoding and contains complete image information, so it can be decoded independently.

[0088] A P frame (Predictive-coded Frame) is a non-key frame that depends on the previous I frame or P frame for decoding.

[0089] B frame (Bi-directionally Predictive-coded Frame) is also a non-key frame, which depends on the previous and next I frames or P frames for decoding.

[0090] In specific applications, the receiving end obtains the application layer data and transport layer data of the current stage of the video in real time, uses the prediction model to obtain the control strategy of the video encoding and decoding in the current stage, and feeds back the control strategy to the sending end, and dynamically adjusts the encoding and decoding method and encoding and decoding rate of the next stage of video transmission, including dynamic adjustment of the sending end and the receiving end. At the same time, the reward function is calculated to optimize the prediction model.

[0091] This application solution can be applied alone to the receiving end to dynamically decode the received video. For the specific process, please refer to Figure 4 .

[0092] The dynamic adjustment process of adaptive video decoding at the receiving end is as follows:

[0093] Step 210, obtaining application layer data and transport layer data of video transmission in real time and performing data statistics;

[0094] Step 220, using the prediction model to obtain a control strategy, wherein the control strategy includes: switching a decoding mode and switching a decoding bit rate;

[0095] Step 230, determining whether the control strategy is to switch the decoding mode, if yes, go to step 240; if no, go to step 250;

[0096] Step 240, switching to a corresponding decoding mode;

[0097] Step 250, determining whether the control strategy also includes switching the decoding code rate, if not, returning to step 210; if including switching the decoding code rate, switching to the corresponding decoding code rate; performing the decoding operation, and returning to step 210;

[0098] The above process continues until the video transmission is completed.

[0099] The present application scheme can also be applied to both the transmitter and the receiver. The receiver dynamically decodes the received video and feeds back the control strategy to the transmitter for the transmitter to adaptively and dynamically encode the video. For the specific process, please refer to Figure 5 .

[0100] like Figure 5As shown, the adaptive dynamic encoding process at the sending end is as follows:

[0101] Step 310, receiving the control strategy fed back by the receiving end;

[0102] Step 320, determining whether the control strategy includes switching the encoding mode, if it includes switching the encoding mode, proceeding to step 330; if it does not include switching the encoding mode, proceeding to step 340;

[0103] Step 330, determine whether the current video is an I frame, if not an I frame, go to step 350; if it is an I frame, go to step 360;

[0104] Step 340, determining whether the control strategy further includes switching the encoding bit rate, if it includes switching the encoding bit rate, switching to the corresponding encoding bit rate, performing the encoding operation, and returning to step 310; if it does not include switching the decoding bit rate, returning to step 310;

[0105] Step 350, performing encoding operation using the current encoding method, and returning to step 330;

[0106] Step 360, switch to the corresponding encoding bit rate and perform encoding operation; return to step 340;

[0107] The above process continues until the video transmission is completed.

[0108] Based on the above method, the present application also provides an adaptive video encoding and decoding device based on transmission rate change, including:

[0109] An acquisition unit, used to acquire application layer data and transport layer data of the video, wherein the application layer data includes a coding mode and a coding bit rate, and the transport layer data includes a transmission delay, a packet loss rate, and physical layer statistical data;

[0110] The reinforcement learning unit uses the application layer data and the transport layer data of the video transmission in the network environment to perform reinforcement learning and construct a prediction model, wherein the prediction model is used to generate a control strategy for video encoding and decoding; the control strategy is: dynamically adjusting the encoding and decoding mode of the video transmission according to the real-time network transmission rate; and dynamically adjusting the encoding and decoding bit rate of the video transmission; the encoding is applied to the sending end, and the decoding is applied to the receiving end;

[0111] The dynamic adjustment unit is used to obtain the application layer data and transport layer data of the current stage of the video in real time, and use the prediction model to obtain the control strategy of the video encoding and decoding in the current stage, dynamically adjust the encoding and decoding mode and encoding and decoding rate of the video transmission in the next stage, and realize flow control.

[0112] Based on the description of the above specific embodiments, the adaptive video encoding and decoding method and device based on transmission rate change provided by the present invention have the following advantages compared with the prior art:

[0113] First, the encoding and decoding mode, encoding and decoding parameters and other parameters of the application layer are associated with the transmission delay, packet loss rate and other related parameters of the transport layer, and reinforcement learning is performed to obtain the encoding and decoding control strategy of video transmission. In actual use, the encoding and decoding mode, encoding and decoding bit rate and other parameters are adaptively selected to ensure stable and low-latency video transmission when the parameters of the transport layer fluctuate over a large range.

[0114] Second, when the network transmission rate is unstable, you only need to switch the codec mode to ensure high-quality continuous transmission of the video. There is no need to frequently convert the codec bit rate, and the requirements for device performance are relatively low.

[0115] Third, reinforcement learning is carried out using the Markov process mathematical model. The reward function R combines the reward function mechanism design of the Pensieve algorithm and the OnRL algorithm. The algorithm is simple and closer to the actual situation of the network, and has very good results.

[0116] Finally, it should be noted that the terms "comprises", "includes" or any other variants thereof as used herein are intended to cover non-exclusive inclusion, so that a process, method, article 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, article or device. In the absence of further restrictions, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.

[0117] The present invention is not limited to the above-mentioned optimal implementation mode. Anyone should be aware that any structural changes made under the inspiration of the present invention, and any technical solutions that are the same or similar to the present invention, fall within the protection scope of the present invention.

Claims

1. An adaptive video encoding and decoding method based on transmission rate change, characterized in that: The following steps are involved: Using the application layer data and transport layer data of video transmission in a network environment, reinforcement learning is performed to construct a prediction model, and the prediction model is used to generate a control strategy for video encoding and decoding; the application layer data includes the encoding and decoding mode and the encoding and decoding bit rate, and the transport layer data includes transmission delay, packet loss rate and physical layer statistical data; the control strategy is: dynamically adjust the encoding and decoding mode of video transmission according to the real-time network transmission rate; And dynamically adjust the encoding and decoding bit rate of video transmission; the encoding is applied to the sending end, and the decoding is applied to the receiving end; The application layer data and transport layer data of the current video stage are obtained in real time, and the control strategy of the video encoding and decoding in the current stage is obtained by using the prediction model, and the encoding and decoding mode and encoding and decoding rate of the video transmission in the next stage are dynamically adjusted to realize flow control.

2. The method according to claim 1, characterized in that The reinforcement learning is performed using a Markov process mathematical model, where the state space in the Markov process mathematical model is defined as the transmission layer data of the current stage; The action space is defined as the video transmission prediction value of the current stage, and the video transmission prediction value corresponds to the control strategy and is used to set the encoding and decoding mode and encoding and decoding rate of the video transmission in the next stage.

3. The method according to claim 2, characterized in that The reward function R in the Markov process mathematical model is expressed as: Wherein, N represents the length of a video transmission data packet in one stage, w1, w2 and w3 represent weighting coefficients, w1>0, w2>0, w3>0.

4. The method according to claim 3, characterized in that The value of the weighting coefficient w1 is set to 30, the value of w2 is set to 7, and the value of w3 is set to 2.

5. The method according to claim 2, characterized in that: In the reinforcement learning process, the PPO algorithm is used as the update strategy of the Markov process mathematical model.

6. The method according to claim 2, characterized in that The method is applied to the receiving end to perform adaptive dynamic decoding on the received video, and the process is as follows: Step 210, obtaining application layer data and transport layer data of video transmission of the video in real time, and performing data statistics; Step 220, using the prediction model to obtain a control strategy, wherein the control strategy includes: switching a decoding mode and switching a decoding bit rate; Step 230, determining whether the control strategy is to switch the decoding mode, if yes, go to step 240; if no, go to step 250; Step 240, switching to a corresponding decoding mode; Step 250, determining whether the control strategy also includes switching the decoding code rate, if not, returning to step 210; if including switching the decoding code rate, switching to the corresponding decoding code rate; performing the decoding operation, and returning to step 210; The above process continues until the video transmission is completed.

7. The method according to claim 6, characterized in that The method is applied to the receiving end and the sending end. The receiving end dynamically decodes the received video and feeds back the control strategy to the sending end so that the sending end can adaptively and dynamically encode the video. The adaptive dynamic encoding process of the sending end is as follows: Step 310, receiving the control strategy fed back by the receiving end; Step 320, determining whether the control strategy includes switching the encoding mode, if it includes switching the encoding mode, proceeding to step 330; if it does not include switching the encoding mode, proceeding to step 340; Step 330, determine whether the current video is an I frame, if not an I frame, go to step 350; If it is an I frame, go to step 360; Step 340, determining whether the control strategy further includes switching the encoding bit rate, if it includes switching the encoding bit rate, switching to the corresponding encoding bit rate, performing the encoding operation, and returning to step 310; if it does not include switching the decoding bit rate, returning to step 310; Step 350, performing encoding operation using the current encoding method, and returning to step 330; Step 360, switch to the corresponding encoding bit rate and perform encoding operation; return to step 340; The above process continues until the video transmission is completed.

8. The method according to claim 2, characterized in that: Calculate the reward function of the current video transmission to determine the revenue of the previous video transmission. If the revenue value is large, it will tend to generate such a strategy; if the revenue value is small or negative, it will avoid generating such a strategy.

9. An adaptive video encoding and decoding device based on transmission rate change, characterized in that: include: An acquisition unit, used to acquire application layer data and transport layer data of the video, wherein the application layer data includes a coding mode and a coding bit rate, and the transport layer data includes a transmission delay, a packet loss rate, and physical layer statistical data; The reinforcement learning unit uses the application layer data and the transport layer data of the video transmission in the network environment to perform reinforcement learning and build a prediction model, wherein the prediction model is used to generate a control strategy for video encoding and decoding; the control strategy is: dynamically adjusting the encoding and decoding mode of the video transmission according to the real-time network transmission rate; And dynamically adjust the encoding and decoding bit rate of video transmission; the encoding is applied to the sending end, and the decoding is applied to the receiving end; The dynamic adjustment unit is used to obtain the application layer data and transport layer data of the current stage of the video in real time, and use the prediction model to obtain the control strategy of the video encoding and decoding in the current stage, dynamically adjust the encoding and decoding mode and encoding and decoding rate of the video transmission in the next stage, and realize flow control.

10. The method according to claim 9, characterized in that The reinforcement learning adopts the Markov process mathematical model, and the reward function R in the Markov process mathematical model is expressed as: Wherein, N represents the length of a video transmission data packet in one stage, w1, w2 and w3 represent weighting coefficients, w1>0, w2>0, w3>0.

Citation Information

Cited By

  • Unmanned aerial vehicle video stream code rate selection and time-frequency resource allocation method and system

    CN119854948A

  • Power and bit rate combined scheduling method for minimizing convergence rate and energy consumption

    CN119902594A

  • A power and bit rate joint scheduling method to minimize convergence rate and energy consumption

    CN119902594B