A vvc inter coding rate control method based on linear model

By transforming the bitrate-distortion relationship into a linear model and performing convex optimization, the problem of bitstream control accuracy in the VVC coding standard was solved, achieving efficient video coding rate and quality control and improving coding performance.

CN121397223BActive Publication Date: 2026-07-03BEIJING INST OF COMP TECH & APPL

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING INST OF COMP TECH & APPL
Filing Date
2025-10-20
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

The existing VVC coding standard is insufficient in terms of bitstream control precision, making it difficult to achieve efficient video coding rate and quality control.

Method used

A VVC inter-frame coding rate control method based on a linear model is adopted. By transforming the bit rate-distortion relationship into a linear model and the nonlinear rate control problem into a convex optimization problem, convex optimization techniques and a global rate distortion optimization scheme are used to calculate quantization parameters to achieve precise control at the frame level and coding tree unit level.

Benefits of technology

It significantly improves the accuracy of bitrate control in VVC encoding, ensuring that video encoding quality and bitrate meet predetermined targets, and enhances encoding performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121397223B_ABST
    Figure CN121397223B_ABST
Patent Text Reader

Abstract

This invention relates to a VVC inter-frame coding rate control method based on a linear model, belonging to the field of video coding technology. This invention combines convex optimization techniques and rate control to achieve a significantly improved and enhanced rate control scheme. It transforms the original bitrate-distortion relationship into a linear model, converting the problem into a convex optimization problem for optimal solution. Using the improved rate control scheme, quantization parameters are calculated at both the frame level and the coding tree unit level, achieving control over both bitrate and quality. This invention achieves bitrate and quality control by performing frame-level and coding tree unit-level bitrate control on each image group of the initial video. Extensive experiments demonstrate that the algorithm provides significantly improved and enhanced rate control coding performance, illustrating the effectiveness of this method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of video coding technology, specifically relating to a VVC inter-frame coding rate control method based on a linear model. Background Technology

[0002] The core objective of video coding technology is to reduce the required bandwidth by efficiently compressing video data while maintaining video quality as much as possible. As video resolution increases and application scenarios diversify, video coding standards continue to evolve to adapt to higher compression efficiency and lower bitrate requirements.

[0003] VVC, as a next-generation video coding standard, is more efficient than its predecessor HEVC, offering better compression performance and broader application support. Bitrate control, a key factor affecting VVC's performance and practical deployment, aims to achieve the best video quality under certain constraints. Its basic idea is to periodically update the target bit rate based on the difference between the actual encoded bits and the set target bit rate during encoding. If the actual encoded bits exceeded the target bit rate in the previous time period, the target bit rate will be appropriately reduced in the next time period to bring the overall bit rate closer to the target bit rate.

[0004] To further improve the accuracy of VVC coding standard bitstream control, this invention transforms the original bitrate-distortion relationship into a linear model, and calculates quantization parameters at both the frame level and the coding tree unit level to achieve precise control over video coding bitrate and quality. Summary of the Invention

[0005] (a) Technical problems to be solved

[0006] The technical problem to be solved by this invention is how to provide a VVC inter-frame coding rate control method based on a linear model to solve the problem of VVC coding standard bitstream control accuracy.

[0007] (II) Technical Solution

[0008] To address the aforementioned technical problems, this invention proposes a VVC inter-frame coding rate control method based on a linear model, which includes the following steps:

[0009] S1. Obtain the original video and extract the image groups from the original video;

[0010] S2. Calculate the total bitrate of the previous image group and predict the bitrate constraint of the current image group based on the target bitrate.

[0011] S3. Improved rate control scheme: The original bit rate-distortion relationship is transformed into a linear model, and the nonlinear rate control problem is transformed into a convex optimization problem. The distortion degree of the model is calculated by solving the convex optimization problem. Then, a global rate distortion optimization scheme is used, and the KTT optimal condition is adopted to solve the optimization problem and obtain the calculation method of quantization parameters.

[0012] S4. For all coding tree units in each frame of the current image group, calculate the quantization parameters at the coding tree unit level of a single frame using the improved bitrate control scheme, and adjust the model parameters at the coding tree unit level.

[0013] S5. For each frame of the current image group, calculate the frame-level quantization parameters using the improved frame-level bitrate control scheme, and adjust the frame-level model parameters.

[0014] S6. Adjust the quantization parameters at the frame level and coding tree unit level for each image group in the original video, and output the quantization parameters at the frame level and coding tree unit level to achieve bitrate and quality control.

[0015] (III) Beneficial Effects

[0016] This invention proposes a VVC inter-frame coding rate control method based on a linear model. Compared with existing technologies, this invention has the following advantages:

[0017] First, image groups are extracted from the original video. Each image group contains several image frames. The target bitrate for the current image group is then determined by calculating the encoding result of the previous image group. Next, after determining the target bitrate, the algorithm transforms the original bitrate-distortion relationship into a linear model, converting the problem into a convex optimization problem. Experimental results show that using a linear model can efficiently and accurately approximate the rate-distortion characteristics in VVC. Furthermore, the Lagrange algorithm is used to solve the convex optimization problem, finding the condition for minimizing distortion during encoding, thus guiding the bitrate control scheme.

[0018] Next, an improved rate control scheme is used to calculate quantization parameters at both the frame and coding tree unit levels. At the coding tree unit level, the quantization parameters of each coding tree unit in the current image group are adjusted by referencing the coding result of the previous frame and the parameters of the previous image group. Experimental results show that the proposed model exhibits high fidelity in capturing rate-distortion characteristics at the coding tree unit level and accurately predicting overall frame-level performance. Then, for the frame-level coding scheme, the frame-level quantization parameters are updated by combining the parameters of the previous frame to adapt to the overall rate control requirements.

[0019] This operation is performed on each group of images in the original video to ensure that the compression quality and bitrate of the entire group of images meet the predetermined targets. Extensive experiments demonstrate that the algorithm provides significantly improved and enhanced bitrate control coding performance, illustrating the effectiveness of this method. Attached Figure Description

[0020] Figure 1 This is a flowchart of the VVC inter-frame coding rate control method based on a linear model according to the present invention. Detailed Implementation

[0021] To make the objectives, contents, and advantages of the present invention clearer, the specific embodiments of the present invention will be described in further detail below with reference to the accompanying drawings and examples.

[0022] In view of this, the present invention designs a VVC inter-frame coding rate control method based on a linear model, which represents the bitrate-distortion relationship as a linear model. By establishing this linear model, the bitrate can be expressed as an optimization problem to determine the optimal quantization parameters for each video frame and coding tree unit.

[0023] This invention relates to the field of video coding technology, specifically providing a VVC inter-frame coding rate control method based on a linear model. The method includes: combining convex optimization techniques and rate control to achieve a significantly improved and enhanced rate control scheme; the algorithm transforms the original bitrate-distortion relationship into a linear model, converting the problem into a convex optimization problem for optimization; and utilizing the improved rate control scheme, quantization parameters are calculated at both the frame level and the coding tree unit level to achieve bitrate and quality control. This method achieves bitrate and quality control by performing frame-level and coding tree unit-level bitrate control on each image group of the initial video. Extensive experiments demonstrate that the algorithm provides significantly improved and enhanced rate control coding performance, illustrating the effectiveness of this method.

[0024] To achieve the above objectives, the present invention adopts the following technical solution:

[0025] A VVC inter-frame coding rate control method based on a linear model includes the following steps:

[0026] S1. Obtain the original video and extract the image groups from the original video;

[0027] S2. Calculate the total bitrate of the previous image group and predict the bitrate constraint of the current image group based on the target bitrate.

[0028] S3. Improved rate control scheme: The original bit rate-distortion relationship is transformed into a linear model, and the nonlinear rate control problem is transformed into a convex optimization problem. The distortion degree of the model is calculated by solving the convex optimization problem. Then, a global rate distortion optimization scheme is used, and the KTT optimal condition is adopted to solve the optimization problem and obtain the calculation method of quantization parameters.

[0029] S4. For all coding tree units in each frame of the current image group, calculate the quantization parameters at the coding tree unit level of a single frame using the improved bitrate control scheme, and adjust the model parameters at the coding tree unit level.

[0030] S5. For each frame of the current image group, calculate the frame-level quantization parameters using the improved frame-level bitrate control scheme, and adjust the frame-level model parameters.

[0031] S6. Adjust the quantization parameters at the frame level and coding tree unit level for each group of images in the original video, and output the quantization parameters at the frame level and coding tree unit level to achieve bitrate and quality control.

[0032] Further, step S2 includes:

[0033] The total bitrate of the previous image group is calculated by taking into account the total number of bits and the duration of the previous image group. Based on the pre-set target bitrate and the complexity difference between the previous and current image groups, the bitrate constraint of the current image group is predicted.

[0034] Further, step S3 includes:

[0035] Using the bitrate constraints obtained in step S2, the original bitrate control model in VVC is improved. The bitrate-distortion relationship is represented as a linear model. The distortion degree of the model is calculated by solving a convex optimization problem to guide the bitrate control scheme.

[0036] Further, step S4 includes:

[0037] For each frame of the current image group, all coding tree units are used to calculate the quantization parameters at the coding tree unit level for each frame using an improved bitrate control scheme.

[0038] Calculate frame-level quantization parameters and use them to constrain quantization parameters at the coding tree unit level to ensure consistent quality.

[0039] In rate control at the coding tree unit level, the coding tree units of the previous frame and the corresponding coding tree units in the previous image group are used to estimate the model parameters of the coding tree units in this frame, and the parameters are updated at the coding tree unit level.

[0040] Further, step S5 includes:

[0041] After implementing bitrate control at the coding tree unit level in step S4, bitrate control is performed at the frame level. The model parameters are estimated using the previous frame and its corresponding frame in the previous image group, and the frame-level parameters are updated.

[0042] Further, step S6 includes:

[0043] For each frame of the current image group, the operations described in S4 and S5 are performed to achieve bitrate control at the image group level. The same operation is performed for each image group of the original video to adjust the quantization parameters at the frame level and coding tree unit level, and output the quantization parameters at the frame level and coding tree unit level to achieve bitrate and quality control.

[0044] Example 1:

[0045] like Figure 1 The diagram illustrates a flowchart of the VVC inter-frame coding rate control method based on a linear model provided by an embodiment of the present invention. In step S1, the original video is first acquired, and the image groups from the original video are extracted.

[0046] In step S2, the total bitrate of the previous image group is calculated based on the total number of bits and the duration of the previous image group. Then, based on the preset target bitrate and the complexity difference between the previous image group and the current image group, the bitrate constraint of the current image group is predicted as the bitrate constraint condition in step S4.

[0047] In step S3, the original rate control model is improved using the rate constraints obtained in step S2. Achieving efficient rate control requires a precise bit rate-distortion relationship. Based on analysis and experiments, the method of this invention constructs a linear model between the logarithmic measure of bit rate and the quantization parameter QP. The corresponding bit rate-distortion relationship is expressed as follows:

[0048]

[0049] in, It can be expressed as the number of bits per pixel (bpp); and These are the predefined target bitrate and frame rate; c and d are the slope and intercept of the constructed linear model. and These represent the width and height of the image (in pixels), respectively.

[0050] We then transform the relationship between the bitrate constraints as follows.

[0051] First, we know that:

[0052]

[0053] in, Indicates the number of coding units in an image group; This represents the code rate (i.e., bit rate) of each coding unit. This indicates the bit rate (i.e., the current image group).

[0054] And according to the inequality, we have:

[0055]

[0056] Therefore, we can deduce that:

[0057]

[0058] Formula (3) can then be derived as follows:

[0059]

[0060] Then formula (5) can be rewritten as:

[0061]

[0062] It can be further rewritten as:

[0063]

[0064] We use a linear model to represent the relationship between bitrate (bpp) and QP, transforming the nonlinear bitrate control problem into a convex optimization problem. This problem can then be represented as follows:

[0065]

[0066]

[0067] Where α, β, a, and b are learning parameters, and the mean squared error (MSE) loss measures the degree of encoding distortion. Then, the Lagrange multiplier method is used to transform it into an unconstrained optimization problem, and the resulting Lagrange function is as follows:

[0068]

[0069] Wherein, formula (8) is the objective function (i.e., loss function) of the convex optimization problem after transformation; formula (9) is the constraint condition; The optimal solution is the one that minimizes the right side of the equation. Formula (10) Z is an unconstrained optimized Lagrange function transformed by the Lagrange multiplier method. For the introduced Lagrange multipliers.

[0070] To address the aforementioned optimization problem, we employ a global rate distortion optimization scheme, using the Karush–Kuhn–Tucker (KTT) optimality condition. The KTT optimality condition for this optimization problem is as follows:

[0071]

[0072] It is Z. The differential of u.

[0073] In formula (11(vi)) This can be expressed as:

[0074]

[0075] but:

[0076]

[0077] Then, from formula (11(vii)), we can obtain:

[0078]

[0079] Therefore, we can conclude that:

[0080]

[0081] Therefore, it is ordered that:

[0082]

[0083] From this, we can obtain The expression:

[0084]

[0085] Finally, substituting formula (17) into formula (13) yields... expression

[0086]

[0087] The quantization parameters can be calculated using formula (18). .

[0088] In step S4, for all coding tree units of each frame in the current image group, the quantization parameters at the coding tree unit level of a single frame are calculated using the rate control scheme (i.e., the convex optimization method proposed in step S3).

[0089] Specifically, we first use the global rate distortion optimization scheme described in step S3, through the bit rate constraint calculated in step S2, and in combination with formula (18) to calculate the quantization parameter QP at the frame level (i.e., each frame in the current image group). i Then, based on the calculated quantization parameters, the bitrate of each frame is calculated using formula (1).

[0090] Next, using the bitrate of each frame calculated above as a constraint, the quantization parameters of the coding tree units in each frame are also calculated using formula (18) to achieve bitrate control at the coding tree unit level. To maintain quality consistency, we adjust the quantization parameters of the coding tree units... Restrictions will be imposed: ;in This represents the quantization parameters of the m-th frame in the current image group; This represents the quantization parameter of the nth coding tree unit in the mth frame. Finally, the model parameters are updated at the coding tree unit level, as shown in formula (1) at the coding tree unit level.

[0091] In step S5, after implementing rate control at the coding tree unit level in step S4, rate control is performed at the frame level. The model parameters, i.e., the frame-level quantization parameters, are estimated using the previous frame and its corresponding frame in the previous image group. This is used to update the model parameters at the frame level, and the model parameters in the frame-level formula (1) are updated.

[0092] In step S6, the operations described in S4 and S5 are repeated for each frame of the current image group to achieve bitrate control at the image group level. The same operation is performed for each image group of the original video to adjust the quantization parameters at the frame level and coding tree unit level, and output the quantization parameters at the frame level and coding tree unit level to achieve bitrate and quality control.

[0093] Example 2:

[0094] A VVC inter-frame coding rate control method based on a linear model includes the following steps:

[0095] S1. Obtain the original video and extract the image groups from the original video;

[0096] S2. Calculate the total bitrate of the previous image group, calculate the bitrate of the current image group based on the target bitrate, and update the target bitrate value.

[0097] S3. Using an improved bitrate control model, the original bitrate-distortion relationship is transformed into a linear model, and the degree of model distortion is calculated.

[0098] S4. For all coding tree units in each frame of the current image group, calculate the quantization parameters at the coding tree unit level of a single frame using the improved bitrate control scheme, and adjust the model parameters at the coding tree unit level.

[0099] S5. For each frame of the current image group, calculate the frame-level quantization parameters using the improved bitrate control scheme and adjust the frame-level model parameters.

[0100] S6. Adjust the quantization parameters at the frame level and coding tree unit level for each group of images in the original video, and output the quantization parameters at the frame level and coding tree unit level to achieve bitrate and quality control.

[0101] Further, step S2 includes:

[0102] The average bitrate of the previous image group is calculated by taking into account the total number of bits and the duration of the previous image group. Based on the pre-set target bitrate and the complexity difference between the previous and current image groups, the bitrate constraint of the current image group is predicted.

[0103] Further, step S3 includes:

[0104] Using the bitrate constraints obtained in step S2, the original bitrate control model is improved, and the bitrate-distortion relationship is expressed as a linear model. The distortion degree of the model is calculated by solving optimization problems to guide the bitrate control scheme.

[0105] Further, step S4 includes:

[0106] For each frame of the current image group, all coding tree units are used to calculate the quantization parameters at the coding tree unit level for each frame using an improved bitrate control scheme.

[0107] Calculate frame-level quantization parameters and use them to constrain quantization parameters at the coding tree unit level to ensure consistent quality.

[0108] In rate control at the coding tree unit level, the coding tree units of the previous frame and the corresponding coding tree units in the previous image group are used to estimate the model parameters of the coding tree units in this frame, and the parameters are updated at the coding tree unit level.

[0109] Further, step S5 includes:

[0110] After implementing bitrate control at the coding tree unit level in step S4, bitrate control is performed at the frame level. The model parameters are estimated using the previous frame and its corresponding frame in the previous image group, and the frame-level parameters are updated.

[0111] Further, step S6 includes:

[0112] For each frame of the current image group, the operations described in S4 and S5 are performed to achieve bitrate control at the image group level. The same operation is performed for each image group of the original video to adjust the quantization parameters at the frame level and coding tree unit level, and output the quantization parameters at the frame level and coding tree unit level to achieve bitrate and quality control.

[0113] Compared with the prior art, the present invention has the following beneficial effects:

[0114] First, image groups are extracted from the original video. Each image group contains several image frames. The target bitrate for the current image group is then determined by calculating the encoding result of the previous image group. Next, after determining the target bitrate, the algorithm transforms the original bitrate-distortion relationship into a linear model, converting the problem into a convex optimization problem. Experimental results show that using a linear model can efficiently and accurately approximate the rate-distortion characteristics in VVC. Furthermore, the Lagrange algorithm is used to solve the convex optimization problem, finding the condition for minimizing distortion during encoding, thus guiding the bitrate control scheme.

[0115] Next, an improved rate control scheme is used to calculate quantization parameters at both the frame and coding tree unit levels. At the coding tree unit level, the quantization parameters of each coding tree unit in the current image group are adjusted by referencing the coding result of the previous frame and the parameters of the previous image group. Experimental results show that the proposed model exhibits high fidelity in capturing rate-distortion characteristics at the coding tree unit level and accurately predicting overall frame-level performance. Then, for the frame-level coding scheme, the frame-level quantization parameters are updated by combining the parameters of the previous frame to adapt to the overall rate control requirements.

[0116] This operation is performed on each group of images in the original video to ensure that the compression quality and bitrate of the entire group of images meet the predetermined targets. Extensive experiments demonstrate that the algorithm provides significantly improved and enhanced bitrate control coding performance, illustrating the effectiveness of this method.

[0117] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A VVC inter-frame coding rate control method based on a linear model, characterized in that, The method includes the following steps: S1. Obtain the original video and extract the image groups from the original video; S2. Calculate the total bitrate of the previous image group and predict the bitrate constraint of the current image group based on the target bitrate. S3. Improved rate control scheme: The original bit rate-distortion relationship is transformed into a linear model, and the nonlinear rate control problem is transformed into a convex optimization problem. The distortion degree of the model is calculated by solving the convex optimization problem. Then, a global rate distortion optimization scheme is used, and the KTT optimal condition is adopted to solve the optimization problem and obtain the calculation method of quantization parameters. S4. For all coding tree units in each frame of the current image group, use the improved bitrate control scheme to calculate the quantization parameters at the coding tree unit level of a single frame, and adjust the model parameters at the coding tree unit level. S5. For each frame of the current image group, calculate the frame-level quantization parameters using the improved frame-level bitrate control scheme, and adjust the frame-level model parameters. S6. Adjust the quantization parameters at the frame level and coding tree unit level for each group of images in the original video, and output the quantization parameters at the frame level and coding tree unit level to achieve bitrate and quality control. in, In step S3, the original bit rate-distortion relationship is transformed into a linear model, and the nonlinear bit rate control problem is transformed into a convex optimization problem. The degree of model distortion is calculated by solving the convex optimization problem, including: A linear model is constructed between the logarithmic measure of bit rate and the quantization parameter QP, and the corresponding bit rate-distortion relationship is expressed as follows: (2) in, This is expressed as the number of bits per pixel, in bpp. and It is not a predefined target bitrate or frame rate; c and d These are the slope and intercept of the constructed linear model; and These represent the width and height of the image, respectively. The bitrate constraint is: (3) in, Indicates the number of coding units in an image group; This represents the code rate of each coding unit; Indicates the bitrate of the current image group; After conversion, we get: (4) A linear model is used to represent the relationship between bitrate (bpp) and QP, and the nonlinear bitrate control problem is transformed into a convex optimization problem, as follows: (5) (6) Where α, β, a, and b are learning parameters, and the mean squared error loss (MSE) measures the degree of distortion in the encoding. The problem is then transformed into an unconstrained optimization problem using the Lagrange multiplier method, and the resulting Lagrange function is as follows: (7) Wherein, formula (8) is the objective function of the convex optimization problem after transformation; formula (9) is the constraint condition; The optimal solution is the one that minimizes the right side of the equation. Formula (10) Z is an unconstrained optimized Lagrange function transformed by the Lagrange multiplier method. For the introduction of Lagrange multipliers; S6 includes: performing S4 and S5 operations cyclically for each frame of the current image group to achieve bitrate control at the image group level; performing the same operation for each image group of the original video to adjust the quantization parameters at the frame level and coding tree unit level, and outputting the quantization parameters at the frame level and coding tree unit level to achieve bitrate and quality control.

2. The VVC inter-frame coding rate control method based on a linear model as described in claim 1, characterized in that, S2 includes: calculating the total bit rate of the previous image group based on the total number of bits and the time length, and predicting the bit rate constraint of the current image group based on the pre-set target bit rate and the complexity difference between the previous image group and the current image group.

3. The VVC inter-frame coding rate control method based on a linear model as described in claim 1, characterized in that, S4 includes: For each frame of the current image group, all coding tree units are used to calculate the quantization parameters at the coding tree unit level for each frame using an improved rate control scheme. Calculate frame-level quantization parameters and use them to constrain quantization parameters at the coding tree unit level to ensure consistent quality. In rate control at the coding tree unit level, the coding tree units of the previous frame and the corresponding coding tree units in the previous image group are used to estimate the model parameters of the coding tree units in this frame, and the parameters are updated at the coding tree unit level.

4. The VVC inter-frame coding rate control method based on a linear model as described in claim 3, characterized in that, S5 includes: after implementing bitrate control at the coding tree unit level in S4, performing bitrate control at the frame level, using the previous frame and its corresponding frame in the previous image group to estimate model parameters, and performing frame-level parameter updates.

5. The VVC inter-frame coding rate control method based on a linear model as described in claim 1, characterized in that, In S3, a global rate distortion optimization scheme is used, and the KTT optimality condition is employed to solve the optimization problem. The calculation method for obtaining the quantization parameters includes: The global rate distortion optimization scheme is used, and the KTT optimality condition is adopted to solve this optimization problem; the KTT optimality condition corresponding to this optimization problem is: (8) It is Z. The differential of u; In formula (11(vi)) The expression is as follows: (9) but: (10) Then, from formula (11(vii)), we get: (11) Therefore, we can conclude that: (12) Therefore, it is ordered that: (13) Therefore, we obtain The expression: (14) Finally, substituting formula (17) into formula (13) yields... expression (14) Calculate the quantization parameters using formula (18) .

6. The VVC inter-frame coding rate control method based on a linear model as described in claim 1, characterized in that, S4 includes: Using the global rate distortion optimization scheme described in S3, the bit rate constraint calculated in S2, and formula (18), are used to calculate the quantization parameter QP for each frame in the current image group. i Then, based on the calculated quantization parameters, the bitrate of each frame is calculated using formula (1). Next, using the bitrate of each frame calculated above as a constraint, the quantization parameters of the coding tree unit in each frame are calculated using formula (18) to achieve bitrate control at the coding tree unit level; finally, the model parameters at the coding tree unit level are updated.

7. The VVC inter-frame coding rate control method based on a linear model as described in claim 6, characterized in that, To maintain consistent quality, the quantization parameters of the coding tree units are... Restrictions will be imposed: ;in This represents the quantization parameters of the m-th frame in the current image group; This represents the quantization parameter of the nth coding tree unit in the mth frame.

8. The VVC inter-frame coding rate control method based on a linear model as described in claim 1, characterized in that, S5 includes: after implementing bitrate control at the coding tree unit level in S4, performing bitrate control at the frame level; using the previous frame and its corresponding frame in the previous image group to estimate model parameters, i.e., the obtained frame-level quantization parameters. This is used to update model parameters at the frame level.