A statistical multiplexing method, system, electronic device and storage medium
By using regression model and adjustment of quantitative parameters in video encoding statistical multiplexing technology, the problems of encoder binding and bit rate control delay in the prior art are solved, and a wider scope of application and higher real-time and bandwidth utilization are achieved.
Patent Information
- Application Number
- CN202510067020.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-16
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2045-01-16
AI Technical Summary
The existing video encoding statistical multiplexing technology has problems such as highly binding functions to the encoder, inaccurate coding parameter adjustment and large delay in bit rate control, which limits the usage scenarios and effects of statistical multiplexing.
Through model parameter initialization and regression model determination, the encoder generates precoded feature data and sends it to the statistical multiplexer. The statistical multiplexer uses the regression model to estimate the encoding code rate, and adjusts the quantization parameters and iterative regression model parameters to make the predicted encoding code rate meet the allowable range of the virtual cache area and bandwidth, thereby realizing code stream multiplexing of multiple encoders.
It realizes isolation of different features between different encoders without deep binding of encoder parameters, broadens the scope of application of statistical multiplexing functions, and improves real-time and bandwidth utilization.
Smart Images

Figure CN119544995B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information communication, and particularly to a statistical multiplexing method, system, electronic device, and storage medium. Background Art
[0002] Statistical multiplexing technology is one of the key technologies in modern communication systems. It is mainly applied in fields such as wireless communication, network transmission, and multimedia processing. The core idea of this technology is to overall manage multiple signal sources through statistical methods to achieve efficient data transmission. The statistical multiplexing technology in the field of video encoding and decoding is mainly used to optimize data transmission efficiency and improve system capacity.
[0003] In the current multimedia transmission scenario, it is necessary to cope with the pressure brought by the increasing media quantity and quality requirements with limited transmission bandwidth. In the same scenario, both more media quantity and higher media quality will increase the amount of information during transmission. However, since the cost of upgrading the transmission link is very high and it may cause resource waste due to meeting short-term peak demands, multimedia service providers, such as television stations, radio stations, etc., need to improve the compression efficiency and the effective utilization rate of bandwidth when generating multimedia data streams.
[0004] A higher compression efficiency measurement standard can be defined as that the encoded file is smaller under the premise of the same quality, which is mainly related to encoding protocols, encoder profile parameters, etc. In encoders with the same parameters, if the encoding quality remains unchanged, then the encoding size will be positively correlated with the complexity of the video, that is, the more complex the video, the larger the encoding size. Since the complexity of each video fluctuates in the time domain, the corresponding encoding size also fluctuates. The coping strategy for this fluctuation will directly affect the effective utilization rate of bandwidth.
[0005] In the application scenario of multi-channel video encoding, this fluctuation may be amplified. For example, when three programs need to be transmitted in the same channel with a fixed bandwidth, where the complexity of Program A is continuously high, the complexity of Program B is continuously low, and the complexity of Program C fluctuates. The bitrate control of the encoder can be divided into three categories: CQ (constant quantization parameter), CBR (constant bitrate), and ABR (average bitrate). CQ will cause large fluctuations in the encoding bitrate of Program B and is not recommended for use. And since the target bitrate of CBR and ABR is fixed, it will cause the encoding quality of the high-complexity Channel A and some of Channel B to be lower than the average value to a certain extent, resulting in unreasonable bandwidth allocation.
[0006] Statistical multiplexing technology analyzes the complexity distribution of video data of each program at different times, combines the content of multiple programs for bitrate control, can dynamically allocate more bandwidth to complex programs, make the picture quality closer between each program, thereby improving bandwidth utilization and solving the problem of uneven bandwidth allocation.
[0007] Specifically, the video coding statistical multiplexing technology statistically analyzes the current and future coding complexity of all video program streams in a program group from two dimensions of time and space, with frames as the unit, and predicts the required bitrate for coding based on the analysis data, so as to dynamically adjust the coding parameters of each frame of video of all programs in the group, and control the overall bitrate of all programs in the group within the bandwidth limit.
[0008] Currently, other manufacturers have developed and produced technologies and products related to video coding statistical multiplexing, but there are problems such as high binding of functions to the encoder, inaccurate adjustment of coding parameters, and large bitrate control delay to be solved. These problems limit the usage scenarios and effects of statistical multiplexing. Summary of the Invention
[0009] To solve one of the above technical defects, the embodiments of the present application provide a statistical multiplexing method, system, electronic device and storage medium.
[0010] In the first aspect of the embodiments of the present application, a statistical multiplexing method is provided, and the method includes:
[0011] Initialize model parameters, and determine a regression model according to the initialized model parameters;
[0012] The encoder pre-codes the frames to be encoded starting from the first moment to generate pre-coded feature data, and sends the pre-coded feature data to the statistical multiplexer;
[0013] The statistical multiplexer sequentially substitutes the pre-coded feature data within T time starting from the second moment into the regression model in units of frames, estimates the predicted coding bitrate within T time through quantization parameters and the regression model, and adjusts the quantization parameters and iteratively adjusts the regression model parameters to make the predicted coding bitrate meet the allowable range of the virtual buffer and bandwidth, so that the statistical multiplexer multiplexes the bitstreams of multiple encoders in one transmission channel, and the second moment is later than the first moment.
[0014] In the second aspect of the embodiments of the present application, a statistical multiplexing system is provided, and the system includes:
[0015] At least one encoder, configured to pre-code the frames to be encoded starting from the first moment to generate pre-coded feature data, and send the pre-coded feature data to the statistical multiplexer;
[0016] A statistical multiplexer, configured to sequentially substitute precoded feature data within a time period of T starting from a second moment into a regression model in units of frames, estimate a predictive coding bitrate within the time period of T through quantization parameters and the regression model, and adjust the quantization parameters and iterative regression model parameters to make the predictive coding bitrate meet the allowable range of a virtual buffer and bandwidth, so that the statistical multiplexer multiplexes bitstreams of multiple encoders onto one transmission channel, where the second moment is later than the first moment;
[0017] An online learning module, configured to initialize model parameters and determine a regression model according to the initialized model parameters.
[0018] A third aspect of the embodiments of the present application provides an electronic device, including: a processor and a memory;
[0019] Wherein, one or more computer programs are stored in the memory, and the one or more computer programs include instructions; when the instructions are executed by the processor, the electronic device executes the method as described in the first aspect of the embodiments of the present application.
[0020] A fourth aspect of the embodiments of the present application provides a computer storage medium, including computer instructions, and when the computer instructions run on an electronic device, the electronic device executes the method as described in the first aspect of the embodiments of the present application.
[0021] By adopting the statistical multiplexing method provided in the embodiments of the present application, each encoder will correspondingly generate a regression model for predicting the coding bitrate of each program, so that different features between different encoders can be isolated, and there is no need to deeply bind the parameters of the encoders, thereby broadening the applicable range of the statistical multiplexing function. At the same time, the statistical multiplexing method of the present application can allocate coding sizes and quantization parameters for each program in units of frames, with stronger real-time performance. Description of the Drawings
[0022] The drawings described herein are used to provide a further understanding of the present application, and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application, and do not constitute an improper limitation to the present application. In the drawings:
[0023] Figure 1 Is a flowchart of a statistical multiplexing method described in Embodiment 1 of the present application;
[0024] Figure 2 Is a key node time diagram of an encoder and a statistical multiplexer described in Embodiment 1 of the present application;
[0025] Figure 3 Is the remaining space VBV of the virtual buffer rslt Greater than the maximum limit space VBV maxSchematic diagram;
[0026] Figure 4 For the remaining space VBV of the virtual buffer rslt Less than the minimum limit space VBV min Schematic diagram;
[0027] Figure 5 For the remaining space VBV of the virtual buffer rslt At the maximum limit space VBV max And the minimum limit space VBV min Schematic diagram between;
[0028] Figure 6 Flowchart of another statistical multiplexing method described in Embodiment 1 of the present application;
[0029] Figure 7 Schematic diagram of the principle of a statistical multiplexing system described in Embodiment 2 of the present application. Detailed implementation
[0030] In order to make the technical solutions and advantages in the embodiments of the present application clearer and more understandable, the following further details the exemplary embodiments of the present application with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than an exhaustive list of all embodiments. It should be noted that, without conflict, the embodiments in the present application and the features in the embodiments can be combined with each other. Embodiment 1
[0031] As Figure 1 shown, this embodiment proposes a statistical multiplexing method, which includes:
[0032] S101. Initialize the model parameters and determine the regression model according to the initialized model parameters.
[0033] Specifically, the statistical multiplexing method proposed in this embodiment is implemented based on an online learning network. Before performing statistical multiplexing, it is necessary to determine the online learning model of the online learning network. In this embodiment, a regression model is used to predict the coding bit rate.
[0034] First, initialize the parameters of the regression model. The initialization process of the model parameters depends on the results of training with historical data of statistical multiplexing. Before training, it should be determined what feature data can be provided by the encoders of different protocols for predicting the coding size during the application of statistical multiplexing, and these data are used as the feature vectors input to the model. In this embodiment, the feature data at least includes the complexity of a single-frame picture, such as SAD (Sum of Absolute Difference), SATD (Sum of Absolute Transformed Difference after Hadamard transform), etc. In addition, variables related to the coding compression result, such as the coding protocol, the type of frame being coded, and the prediction mode, may also be required.
[0035] S102. The encoder pre-codes the frame to be coded starting from the first moment to generate pre-coded feature data, and sends the pre-coded feature data to the statistical multiplexer.
[0036] Specifically, the statistical multiplexing method of this embodiment can support encoding protocols including the AVS series and the H26X series. As Figure 2 shown in the key node time diagram of the encoder and the statistical multiplexer. In this Figure 2 diagram, when the encoder sends C_lookahead pre-coded feature data, the corresponding moment of the encoder's pre-coding thread is the T_cur moment. The pre-coding thread of the encoder pre-codes the frame to be coded starting from the first moment T_cur to generate pre-coded feature data, and sends it to the statistical multiplexer. The statistical multiplexer starts processing the frame at the T_0 moment. Among them, the time difference between the T_cur moment and the T_0 moment is C_lookahead / FPS, and FPS is the number of frames pre-coded per second by this encoder.
[0037] S103. The statistical multiplexer sequentially substitutes the pre-coded feature data within T time starting from the second moment into the regression model frame by frame, and estimates the predicted coding bit rate within T time through the quantization parameter and the regression model.
[0038] Specifically, after receiving the pre-coded feature data, the statistical multiplexer sequentially substitutes the pre-coded feature data within T time starting from the second moment T_0 into the regression model determined in S101 frame by frame. The quantization parameter Q is also required to participate in the learning and training in this regression model. The quantization parameter Q can achieve the control of the bit rate size of each frame of each program. The quantization parameter Q is inversely proportional to the bit rate, that is, when the quantization parameter Q increases, the bit rate becomes lower. Correspondingly, when the quantization parameter Q decreases, the bit rate becomes higher. Each program corresponds to its own quantization parameter. To ensure the quality of each channel's coding, during the statistical multiplexing process, the quantization parameter Q needs to be limited to the minimum quantization parameter Qmin and the maximum quantization parameter Q max Within the range. Through the quantization parameter and the regression model, the predicted coding bit rate S within time T can be estimated pred :
[0039]
[0040] Among them, Param_lookahead is the pre-coded feature data, and N is a positive integer.
[0041] In some optional embodiments, after the statistical multiplexer receives the pre-coded feature data sent by the encoder, the statistical multiplexer stores the received pre-coded feature data in the message queue. When the length of the message queue reaches N C_lookahead, the statistical multiplexer sequentially substitutes the pre-coded feature data within time T starting from the second moment T_0 into the regression model in units of frames.
[0042] S104. Adjust the quantization parameter and the iterative regression model parameter so that the predicted coding bit rate meets the allowable range of the virtual buffer and the bandwidth.
[0043] Specifically, the relationship between the quantization parameter Q and the bit rate has been described in S103. If statistical multiplexing of multiple encoders on one statistical multiplexer is to be achieved, the bit rate needs to be controlled within the allowable range of the virtual buffer and the bandwidth. For this purpose, the quantization parameter needs to be adjusted so that the predicted coding bit rate meets the allowable range of the virtual buffer VBV and the bandwidth BW.
[0044] When the statistical multiplexer performs statistical multiplexing of multiple encoders, the virtual buffer is used to record the remaining space VBV of the virtual buffer in the current state rslt . In this virtual buffer, a maximum limit space VBV max and a minimum limit space VBV min are set. Ideally, the remaining space VBV of the virtual buffer rslt should be between the maximum limit space VBV max and the minimum limit space VBV min . However, in actual applications, there are often three situations, that is, the remaining space VBV of the virtual buffer rslt is between the maximum limit space VBV max and the minimum limit space VBV min , the remaining space VBV of the virtual buffer rslt is greater than the maximum limit space VBV max , and the remaining space VBV of the virtual buffer rslt is less than the minimum limit space VBV min .
[0045] In this embodiment, the calculation process of the remaining space in the virtual buffer is as follows: First, obtain the current space VBV of the virtual buffer cur , and then calculate the total bandwidth BW within time T T. Finally, after summing the current space VBV of the virtual buffer cur and the total bandwidth BW T, perform a difference calculation with the predicted coding bit rate S pred to obtain the remaining space VBV of the virtual buffer after time T rslt .
[0046] For the case where the remaining space VBV of the virtual buffer rslt is greater than the maximum limit space VBV max , it can be expressed as:
[0047]
[0048] As Figure 3 shown, encoded according to the current conditions, the remaining space in the virtual buffer after time T (the rightmost cylinder) exceeds the maximum limit space VBV max , and the bandwidth will be wasted. Therefore, it is necessary to increase the output bit rate of the encoder. Correspondingly, it is necessary to decrease the current quantization parameter Q cur . Then the updated quantization parameter Q new is:
[0049]
[0050] Make the encoding size of each frame larger on the premise that other parameters remain unchanged. factor represents a factor variable, and after multiple iterations, make the remaining space VBV of the virtual buffer after encoding for time T rslt satisfy:
[0051]
[0052] For the case where the remaining space VBV of the virtual buffer rslt is less than the minimum limit space VBV min , it can be expressed as:
[0053]
[0054] As Figure 4 shown, this situation is the opposite of Figure 3 . Encoded according to the current conditions, the virtual buffer will be over-consumed after time T. In extreme cases, the space of the virtual buffer will be emptied, resulting in too large transmission delay. It is necessary to reduce the output bit rate of the encoder. Correspondingly, it is necessary to increase the current quantization parameter Q cur . Then the updated quantization parameter Qnew is:
[0055]
[0056] make the remaining space VBV of the virtual buffer rslt meet: .
[0057] For the remaining space VBV of the virtual buffer rslt in the maximum limit space VBV max and the minimum limit space VBV min The situation in between can be expressed as:
[0058]
[0059] As Figure 5 shown, when the remaining space VBV of the virtual buffer rslt meets it can directly let the encoder encode this frame according to the current quantization parameter Q cur .
[0060] In some optional embodiments, to reduce the computational complexity and possible latency in the statistical multiplexing process, the bitrate control for each program in this embodiment is performed in units of mini_gop, that is, every time an I frame (intra frame) or a P frame (predictive frame) appears, the remaining space VBV of the virtual buffer rslt is calculated.
[0061] After the above process, the bitrates of the ES streams output by multiple encoders in a statistical multiplexing group have been controlled within the overall bandwidth operating range, and the TS stream output bitstreams of multiple encoders can be multiplexed and transmitted through a statistical multiplexer.
[0062] Each encoder in this embodiment will correspondingly generate a regression model for predicting the encoding bitrate of each program, so as to isolate different features between different encoders, and there is no need to deeply bind the parameters of the encoders, thereby broadening the applicable range of the statistical multiplexing function. At the same time, the statistical multiplexing method of the present application can allocate the encoding size and quantization parameter for each program in units of frames, with stronger real-time performance.
[0063] In some optional embodiments, as Figure 6 shown, the statistical multiplexing method further includes:
[0064] S105. The statistical multiplexer sends the current quantization parameter to the encoder.
[0065] Specifically, after the statistical multiplexer obtains the coding bit rate that meets the requirements, it feeds back the quantization parameter Q of the frame at the current moment T_0 to the encoder. Corresponding to Figure 2 the feedback moment in. Due to the uncertain transmission delay Δ, the encoder always receives the feedback result of the frame at the moment T_feedback - Δ. When receiving the QP, it encodes the frame image at the same time.
[0066] S106. The encoder encodes the frame to be encoded at the third moment according to the pre-coded feature data and the current quantization parameter to obtain the actual coding bit rate of the frame to be encoded at the third moment and sends it to the statistical multiplexer.
[0067] Specifically, the encoder encodes the frame image at the third moment T_enc (as shown in Figure 2 ) according to the pre-coded feature data and the quantization parameter Q fed back by the statistical multiplexer, and feeds back the actual coding size S of this frame enc to the statistical multiplexer.
[0068] S107. The statistical multiplexer obtains the loss function of the regression model according to the predicted coding bit rate and the actual coding bit rate.
[0069] Specifically, after the encoder sends the actual coding bit rate to the statistical multiplexer, the statistical multiplexer calculates the loss function LOSS of the regression model according to the predicted coding bit rate S pred and the actual coding bit rate S enc :
[0070]
[0071] S108. The statistical multiplexer updates the regression model parameters according to the loss function.
[0072] Specifically, when the loss function LOSS in S107 exceeds the threshold, it indicates that the current model parameters cannot accurately estimate the coding size. It is necessary to substitute the new coding data into the regression model to make the regression model adjust the parameters to make the absolute value of the difference between the predicted coding bit rate and the actual coding bit rate as small as possible. In the selection of the model, a regression model is selected. If the parameters fed back by the encoder include various information such as frame complexity information, frame type, prediction mode, etc., a polynomial regression equation can also be constructed, which has a good fitting effect on the premise that the exponent of the independent variable is not one. The relationship between frame complexity, quantization parameter, and frame coding size is not a relationship with an exponent of one. Of course, during the learning process of the regression model, the model parameters can be updated with one frame as a unit, or can be updated iteratively with a group of data in units of mini_gop or gop, similar to the difference between the Stochastic randomness mode and the mini-batch mode in the gradient descent process. Embodiment 2
[0073] Corresponding to Embodiment 1, as Figure 7 shown, this embodiment proposes a statistical multiplexing system, which includes:
[0074] At least one encoder, configured to perform precoding on the frames to be encoded starting from the first moment to generate precoded feature data, and send the precoded feature data to the statistical multiplexer;
[0075] The statistical multiplexer is configured to sequentially substitute the precoded feature data within T time starting from the second moment into the regression model in units of frames, estimate the predicted coding bit rate within T time through the quantization parameter and the regression model, and make the predicted coding bit rate meet the allowable range of the virtual buffer and bandwidth by adjusting the quantization parameter and iteratively adjusting the regression model parameters, so that the statistical multiplexer multiplexes the bitstreams of multiple encoders on one transmission channel, and the second moment is later than the first moment;
[0076] The online learning module is configured to initialize the model parameters and determine the regression model according to the initialized model parameters.
[0077] Specifically, this embodiment mainly involves three specific objects, namely the statistical multiplexer, the encoder, and the online learning module, and a regression model is embedded in the online learning module. In a statistical multiplexing group with multiple encoders, if there are n encoders, n regression models will be correspondingly generated to predict the coding bit rate of each program, so as to isolate different features between different encoders. Therefore, even if encoders using different coding protocols, such as H264, AVS series, and MPEG-2, are used, bit rate statistics and bitstream multiplexing can be achieved on the same statistical multiplexer. Embodiment 3
[0078] This embodiment proposes an electronic device, including: a processor and a memory;
[0079] Wherein, one or more computer programs are stored in the memory, and the one or more computer programs include instructions; when the instructions are executed by the processor, the electronic device is caused to execute the following method:
[0080] Initialize the model parameters and determine the regression model according to the initialized model parameters;
[0081] The encoder performs precoding on the frames to be encoded starting from the first moment to generate precoded feature data, and sends the precoded feature data to the statistical multiplexer;
[0082] The statistical multiplexer sequentially substitutes the precoded feature data within a time period of T starting from the second moment into the regression model in units of frames, estimates the predicted coding bitrate within the time period of T through the quantization parameter and the regression model, and adjusts the quantization parameter and iteratively adjusts the regression model parameters to make the predicted coding bitrate meet the allowable range of the virtual buffer and the bandwidth, so that the statistical multiplexer multiplexes the bitstreams of multiple encoders onto one transmission channel, and the second moment is later than the first moment.
[0083] Among them, the specific process of this method can refer to the content described in Embodiment 1, and will not be elaborated in this embodiment.
[0084] In this embodiment, each encoder will correspondingly generate a regression model for predicting the coding bitrate of each program, so that different features between different encoders can be isolated, and it is not necessary to deeply bind the parameters of the encoders, thereby broadening the applicable range of the statistical multiplexing function. At the same time, the statistical multiplexing method of the present application can allocate the coding size and quantization parameter for each program in units of frames, and has stronger real-time performance. Embodiment 4
[0085] A computer storage medium includes computer instructions. When the computer instructions run on an electronic device, the electronic device executes the following method:
[0086] Initialize the model parameters, and determine the regression model according to the initialized model parameters;
[0087] The encoder performs precoding on the frames to be encoded starting from the first moment to generate precoded feature data, and sends the precoded feature data to the statistical multiplexer;
[0088] The statistical multiplexer sequentially substitutes the precoded feature data within a time period of T starting from the second moment into the regression model in units of frames, estimates the predicted coding bitrate within the time period of T through the quantization parameter and the regression model, and adjusts the quantization parameter and iteratively adjusts the regression model parameters to make the predicted coding bitrate meet the allowable range of the virtual buffer and the bandwidth, so that the statistical multiplexer multiplexes the bitstreams of multiple encoders onto one transmission channel, and the second moment is later than the first moment.
[0089] Among them, the specific process of this method can refer to the content described in Embodiment 1, and will not be elaborated in this embodiment.
[0090] In this embodiment, each encoder generates a corresponding regression model for predicting the encoding bit rate of each program, so that different features between different encoders can be isolated, and there is no need to deeply bind the parameters of the encoder, thereby broadening the applicable range of the statistical multiplexing function. At the same time, the statistical multiplexing method of the present application can allocate the encoding size and quantization parameters to each program in units of frames, with stronger real-time performance.
[0091] In the present application, unless otherwise clearly specified and limited, terms such as "installation", "connection", "connection", "fixation" and other terms should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or integrated; it can be a mechanical connection, an electrical connection or can communicate with each other; it can be directly connected, or indirectly connected through an intermediate medium, and can be the communication inside two components or the interaction relationship between two components. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood according to specific circumstances.
[0092] Although the preferred embodiments of the present application have been described, those skilled in the art can make additional changes and modifications to these embodiments once they know the basic creative concept. Therefore, the appended claims are intended to be construed as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0093] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application also intends to include these modifications and variations.
Claims
1. A statistical multiplexing method, characterized in that: The method comprises: Initializing model parameters, and determining a regression model according to the initialized model parameters; The encoder pre-encodes the frame to be encoded from the first moment to generate pre-encoding characteristic data, and sends the pre-encoding characteristic data to the statistical multiplexer; The statistical multiplexer sequentially substitutes the pre-encoding feature data within a time T from the second moment into the regression model in units of frames, estimates the predicted encoding rate within the time T by using the quantization parameter and the regression model, and makes the predicted encoding rate meet the allowable range of the virtual buffer area and the bandwidth by adjusting the quantization parameter and the iterative regression model parameter, so that the statistical multiplexer multiplexes the code streams of multiple encoders into one transmission channel, and the second moment is later than the first moment; The process of initializing the model parameters and determining the regression model according to the initialized model parameters includes: Determine the characteristic data used by encoders of different protocols to predict the encoding size; Training the statistically multiplexed historical data according to the feature data; Model parameters are initialized according to the historical data training results of statistical multiplexing, and a regression model is determined according to the initialized model parameters.
2. The method according to claim 1, characterized in that Before the statistical multiplexer sequentially substitutes the pre-coded feature data within the time T from the second moment into the regression model in units of frames, the method further includes: The statistical multiplexer stores the pre-coded characteristic data in a message queue; When the message queue length reaches a preset value, the statistical multiplexer sequentially substitutes the pre-coded feature data within a time period T from the second moment into the regression model in units of frames.
3. The method according to claim 1, characterized in that The process of adjusting the quantization parameter and the iterative regression model parameter so that the predicted coding rate meets the allowable range of the virtual buffer area and the bandwidth includes: Calculate the remaining space in the virtual buffer after T time; When the remaining space in the virtual buffer exceeds the maximum limit after T time, the quantization parameter is reduced; When the remaining space in the virtual buffer is less than the minimum limit space after T time, the quantization parameter is increased; When the remaining space of the virtual buffer area is between the maximum limit space and the minimum limit space after T time, the current quantization parameter is maintained.
4. The method according to claim 3, characterized in that The process of calculating the remaining space of the virtual buffer area after T time includes: Get the current space of the virtual buffer; Calculate the total bandwidth within time T; After the maximum space of the virtual buffer area and the total bandwidth are summed, a difference calculation is performed between the sum and the predicted coding bit rate to obtain the remaining space of the virtual buffer area after the T time.
5. The method according to claim 3, characterized in that: When an I frame or a P frame appears at any time, the remaining space in the virtual buffer after T time from the current time is calculated.
6. The method according to claim 1, characterized in that The method further comprises: The statistical multiplexer sends the current quantization parameter to the encoder; The encoder encodes the frame to be encoded at a third moment according to the pre-encoding characteristic data and the current quantization parameter to obtain a real encoding rate of the frame to be encoded at the third moment, and sends the real encoding rate to the statistical multiplexer, wherein the third moment is later than the second moment; The statistical multiplexer obtains a loss function of the regression model according to the predicted coding rate and the actual coding rate, and updates the regression model parameters according to the loss function.
7. A statistical multiplexing system, characterized in that: The system comprises: At least one encoder, configured to pre-encode a frame to be encoded starting from a first moment to generate pre-encoding characteristic data, and send the pre-encoding characteristic data to a statistical multiplexer; A statistical multiplexer, used to sequentially substitute pre-encoded feature data within a time T from a second moment into a regression model in units of frames, estimate a predicted coding rate within the time T by using a quantization parameter and the regression model, and adjust the quantization parameter and iterative regression model parameters so that the predicted coding rate meets an allowable range of a virtual buffer area and a bandwidth, so that the statistical multiplexer multiplexes code streams of multiple encoders into one transmission channel, and the second moment is later than the first moment; The online learning module is used to initialize the model parameters and determine the regression model according to the initialized model parameters; specifically includes: Determine the characteristic data used by encoders of different protocols to predict the encoding size; Training the statistically multiplexed historical data according to the feature data; Model parameters are initialized according to the historical data training results of statistical multiplexing, and a regression model is determined according to the initialized model parameters.
8. An electronic device, characterized in that: include: Processor and memory; One or more computer programs are stored in the memory, and the one or more computer programs include instructions; when the instructions are executed by the processor, the electronic device executes the method according to any one of claims 1 to 6.
9. A computer storage medium, characterized in that: The method comprises computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Method for a variable bit rate transmission through a transmission channel
CN101080928A
Content classification for multimedia processing
CN101171843A