Video code rate control method and device, equipment and storage medium

By using CMAF analysis and combining ARIMA and GRU models for bandwidth prediction, the bandwidth measurement error and network fluctuation issues of the ABR algorithm in low-latency live streaming scenarios are resolved, thus achieving stability and smoothness in low-latency video transmission.

CN121078281APending Publication Date: 2025-12-05CHINA MOBILE COMM CORP GUANGXI CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511327085.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-17
Publication Date
2025-12-05

AI Technical Summary

Technical Problem

Existing ABR algorithms suffer from problems such as large bandwidth measurement errors, difficulty in capturing instantaneous network fluctuations, and buffer-limited response time in low-latency live streaming scenarios, resulting in video latency and unstable playback.

Method used

The video segments are parsed using the Common Media Application Format (CMAF) to determine the sequence of bandwidth measurements. The ARIMA model and the GRU-based deep learning model are used for prediction, and the bitrate and playback speed are adjusted by combining adaptive thresholds and latency information.

Benefits of technology

While ensuring low latency, it improves video quality and playback smoothness, and reduces the impact of latency fluctuations on video transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121078281A_ABST
    Figure CN121078281A_ABST
Patent Text Reader

Abstract

The invention discloses a video code rate control method and device, equipment and a storage medium. Comprising the following steps: analyzing a received video segment by adopting a general media application format CMAF to determine a bandwidth measurement value sequence; respectively inputting the bandwidth measurement value sequence into a first prediction model and a second prediction model to obtain a first bandwidth prediction value and a second bandwidth prediction value; determining a target bandwidth prediction value based on the first bandwidth prediction value and the second bandwidth prediction value; and adjusting the code rate based on the target bandwidth predicted value, and adjusting the playing speed of the video based on the delay information. According to the video code rate control method provided by the embodiment of the invention, the video quality and the playing fluency are ensured while the low delay is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of video processing technology, and in particular to a method, apparatus, device and storage medium for controlling video bitrate. Background Technology

[0002] With the rapid popularization of 5G technology and the widespread use of smart terminal devices, real-time audio and video applications such as e-commerce live streaming and interactive live streaming have become important growth points for internet traffic. Statistics show that live streaming traffic is increasing by 30% annually as a percentage of total internet traffic. Upgrades to network infrastructure provide technical support for emerging applications such as 4K / 8K ultra-high-definition live streaming and VR panoramic live streaming, but also place higher demands on the transmission quality of real-time streaming media. In live streaming scenarios, video quality and end-to-end latency are the two most critical indicators affecting the Quality of Experience (QoE), with latency being particularly sensitive. Excessive latency can lead to a "spoiler effect," severely impacting the real-time interactive experience of the live stream.

[0003] Currently, mainstream Content Delivery Networks (CDNs) generally employ HTTP-based Adaptive Bitrate (ABR) technology to optimize streaming media transmission. However, traditional ABR algorithms are primarily designed for Video-on-Demand (VoD) scenarios and face three major technical bottlenecks in Low Latency Live (LLL) scenarios: First, due to the transcoding idle time between video blocks when transmitting using common media application formats, traditional bandwidth measurement methods systematically underestimate the actual available bandwidth, with errors reaching 30%-50%; second, existing prediction models mostly employ single statistical time-series analysis methods, making it difficult to accurately capture the instantaneous fluctuation characteristics of the network, resulting in significant errors in short-term prediction scenarios at the 1-second level; third, the extremely short buffer of less than 3 seconds in LLL scenarios limits the algorithm's response time, requiring both rapid bitrate reduction to avoid stuttering during sudden bandwidth drops and cautious bitrate increase to maintain stability during sudden bandwidth increases. Summary of the Invention

[0004] This invention provides a method, apparatus, device, and storage medium for controlling video bitrate, ensuring low latency while maintaining video quality and smooth playback.

[0005] In a first aspect, embodiments of the present invention provide a method for controlling video bitrate, comprising:

[0006] The received video segments are parsed using the Common Media Application Format (CMAF) to determine the sequence of bandwidth measurements.

[0007] The bandwidth measurement value sequence is input into the first prediction model and the second prediction model respectively to obtain the first bandwidth prediction value and the second bandwidth prediction value;

[0008] The target bandwidth prediction value is determined based on the first bandwidth prediction value and the second bandwidth prediction value;

[0009] The bitrate is adjusted based on the target bandwidth prediction value, and the video playback speed is adjusted based on the latency information.

[0010] Secondly, embodiments of the present invention also provide a video bitrate control device, comprising:

[0011] The bandwidth measurement value sequence determination module is used to parse the received video segments using the Common Media Application Format (CMAF) to determine the bandwidth measurement value sequence.

[0012] A bandwidth prediction module is used to input the bandwidth measurement value sequence into a first prediction model and a second prediction model respectively to obtain a first bandwidth prediction value and a second bandwidth prediction value.

[0013] A target bandwidth prediction value determination module is used to determine a target bandwidth prediction value based on the first bandwidth prediction value and the second bandwidth prediction value;

[0014] The bitrate and playback speed adjustment module is used to adjust the bitrate based on the target bandwidth prediction value and adjust the video playback speed based on latency information.

[0015] Thirdly, embodiments of the present invention also provide an electronic device, characterized in that the electronic device comprises:

[0016] At least one processor; and

[0017] A memory communicatively connected to the at least one processor; wherein,

[0018] The memory stores a computer program that can be executed by the at least one processor, which enables the at least one processor to perform the video bitrate control method described in the embodiments of the present invention.

[0019] Fourthly, embodiments of the present invention also provide a computer-readable storage medium, characterized in that the computer-readable storage medium stores computer instructions, which are used to cause a processor to execute and implement the video bitrate control method described in the embodiments of the present invention.

[0020] This invention discloses a video bitrate control method, apparatus, device, and storage medium. The method involves parsing a received video segment using the Common Media Application Format (CMAF) to determine a sequence of bandwidth measurements. This sequence is then input into a first prediction model and a second prediction model to obtain a first bandwidth prediction value and a second bandwidth prediction value. A target bandwidth prediction value is determined based on these two values. The bitrate is adjusted based on the target bandwidth prediction value, and the video playback speed is adjusted based on latency information. The video bitrate control method provided by this invention ensures low latency while maintaining video quality and smooth playback. Attached Figure Description

[0021] Figure 1 This is a flowchart of a video bitrate control method according to Embodiment 1 of the present invention;

[0022] Figure 2 This is a schematic diagram of the structure of a video bitrate control device according to Embodiment 2 of the present invention;

[0023] Figure 3 This is a schematic diagram of the structure of an electronic device according to Embodiment 3 of the present invention. Detailed Implementation

[0024] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present invention, and not all of the structures.

[0025] Common Media Application Format (CMAF) is a fundamental encapsulation format in the streaming media transmission field. Its core lies in the segmented organization and transmission of media data based on the ISOBMFF standard. This technology uses the structured coordination of the Movie Fragment Box (MFB) header and the Media Data Box (MDB) content to accurately record the timing information of video blocks in the Track Fragment Header Box (TFHB) and locate the data block offset using the Track Fragment Run Box (TFRB), providing a standardized encapsulation solution for low-latency live streaming scenarios. A key challenge of this technology lies in the timing alignment accuracy during the parsing process. Failure to accurately identify video block boundaries will cause systematic interference to bandwidth measurements due to idle time between fragments.

[0026] Time series forecasting is a crucial method for processing time-series data analysis, primarily used in video transmission for predicting network throughput. Traditional forecasting methods employ statistical models such as autoregressive integral moving averages and exponential smoothing, suitable for time-series data with stationary characteristics. With advancements in deep learning, novel models like Long Short-Term Memory (LSTM) networks and temporal convolutional networks exhibit stronger feature extraction capabilities, effectively capturing long-term dependencies and nonlinear features in the data. In practical video transmission applications, this technology requires careful attention to the balance between prediction accuracy and computational resource consumption to ensure the timeliness requirements of real-time transmission are met.

[0027] Example 1

[0028] Figure 1 This is a flowchart of a video bitrate control method provided in Embodiment 1 of the present invention. This embodiment is applicable to situations involving video bitrate control. The method can be executed by a video bitrate control device, which can be implemented in software and / or hardware, optionally through an electronic device, such as a mobile terminal, PC, or server. Specifically, it includes the following steps:

[0029] S110 uses the Common Media Application Format (CMAF) to parse the received video segments in order to determine the sequence of bandwidth measurements.

[0030] The bandwidth measurement sequence is obtained by parsing multiple received video segments using CMAF, and the bandwidth measurement values ​​and video segments can have a one-to-one correspondence.

[0031] Specifically, the method of using the Common Media Application Format (CMAF) to parse the received video segments to determine the bandwidth measurement sequence can be as follows: use CMAF to parse the received video segments to obtain multiple HTTP blocks; filter out the valid HTTP blocks from the multiple HTTP blocks based on the MFB header and MDB content; and determine the bandwidth measurement value based on the valid HTTP blocks.

[0032] The HTTP block comprises a Video Segment Box (MFB) header and a Media Data Box (MDB) content. The MFB header contains metadata such as timestamp, sequence number, sample count field, video block duration field, and single video block size field, used to determine the start position and duration of the video block within the MDB. The MDB content stores the actual video frame data; each video block contains a complete media sampling unit, its boundaries precisely defined by the sample_count and sample_size fields. The actual byte size of each video block can be obtained through parsing. HTTP block and video block alignment detection: Since an HTTP block may contain multiple video blocks or be segmented across video blocks, the inclusion relationship between the HTTP block's reception time window and the video block's timing range needs to be identified. If the transmission time of an HTTP block completely covers the decoding time range of a certain video block, then the HTTP block is determined to contain the complete video block.

[0033] Optionally, the method for filtering valid HTTP blocks from multiple HTTP blocks based on the MFB header and MDB content can be as follows: an HTTP block is a valid HTTP block if it meets the following conditions: it is not the first HTTP block, it only includes a single video block, and the current video block ID is consecutive to the video block ID of the previous TTTP block; wherein, it only includes a single video block and meets the following conditions: the sample count field in the MFB header is 1, the data size in the MDB content is consistent with the size of a single video block recorded in the MFB header, and there is no fragmentation flag.

[0034] The first HTTP block typically contains an initialization segment or some metadata; its transmission time is affected by server response latency and does not reflect actual bandwidth. Analyzing from the second HTTP block onwards avoids noise during the initialization phase. In this embodiment, by maintaining a video block ID sequence, it checks whether the current video block ID is consecutive to the last video block ID of the previous HTTP block. If they are consecutive, it indicates that there is no idle time for content generation.

[0035] Optionally, the bandwidth measurement based on valid HTTP blocks can be determined as follows: for each valid HTTP block, an initial bandwidth measurement is determined based on the byte size of the valid HTTP block and the transmission duration of the HTTP block; the average of the initial bandwidth measurements of all valid HTTP blocks is then used as the final bandwidth measurement.

[0036] The transmission duration of an HTTP block is determined by subtracting the end time of the previous HTTP transmission from the end time of the HTTP block transmission. The formula for calculating the initial bandwidth measurement can be expressed as: Where Q is the size of the HTTP block in bytes, e is the end time of the HTTP block transmission, and pre(e) is the end time of the previous HTTP transmission. After obtaining the initial bandwidth measurement value corresponding to each valid HTTP block, the average bandwidth of all valid HTTP blocks in the video segment is used as the final bandwidth measurement value.

[0037] S120, input the bandwidth measurement value sequence into the first prediction model and the second prediction model respectively to obtain the first bandwidth prediction value and the second bandwidth prediction value.

[0038] The first prediction model is an autoregressive integral moving average (ARIMA) model; the second prediction model is a deep learning model based on gated recurrent units (GRUs). The parameters in the ARIMA model are obtained by searching based on a preset optimization algorithm. The deep learning model based on GRUs includes a convolutional feature extraction layer, a GRU temporal processing layer, and an attention mechanism layer.

[0039] For ARIMA models, the optimal parameter combination (p, d, q) can be obtained through intelligent search within the parameter space using a Bayesian optimization algorithm. This automatically adapts to the temporal characteristics of different network environments, thereby enabling bandwidth prediction based on the optimal parameter combination. Here, p represents the order of the autoregressive term, meaning the model uses observations from the past p time steps to predict the current value. For example, p=2 means the model uses the sequence values ​​at times t-1 and t-2 to predict the value at time t, reflecting the short-term memory of the sequence. d represents the number of differencing operations (usually first or second differencing) required to transform the original sequence into a stationary sequence. The stationarity of the time series is a prerequisite for ARIMA modeling (mean and variance do not change over time), and the value of d is determined by testing the stationarity of the sequence (e.g., the ADF test). For example, d=1 means performing a first differencing operation on the original sequence (subtracting the previous value from the current value) to eliminate the trend. q represents the order of the moving average term, meaning the model uses prediction errors from the past q time steps to correct the current predicted value. For example, q=1 means that the model will take into account the prediction error at time t-1 to capture random fluctuations in the sequence.

[0040] For the GRU-based deep learning model (CNN-GRU-Attention), high-precision bandwidth prediction is achieved through multi-level feature extraction. The model first employs a multi-scale parallel CNN structure (3 / 5 / 7 time steps) to capture local fluctuations in network throughput. Then, it learns the long-term temporal dependencies of bandwidth through bidirectional GRU layers. Finally, an attention mechanism is introduced to dynamically weight the feature importance of key time nodes. The model training uses an adaptive learning rate strategy combined with DropPath regularization to prevent overfitting, ultimately forming an intelligent prediction model capable of simultaneously capturing both short-term fluctuations and long-term trends in network traffic.

[0041] S130, determine the target bandwidth prediction value based on the first bandwidth prediction value and the second bandwidth prediction value.

[0042] In this embodiment, the target bandwidth prediction value can be determined from the first bandwidth prediction value and the second bandwidth prediction value based on an adaptive threshold. The adaptive threshold... The calculation formula can be expressed as ,in, denoted as the standard deviation of the bandwidth measurement sequence, and k is an adjustable coefficient used to control the model's sensitivity to bandwidth fluctuations.

[0043] Specifically, the method for determining the target bandwidth prediction value based on the first bandwidth prediction value and the second bandwidth prediction value can be as follows: First, determine the difference between the first bandwidth prediction value and the second bandwidth prediction value; if the absolute value of the difference is less than or equal to an adaptive threshold, then the first bandwidth prediction value is determined as the target bandwidth prediction value; if the absolute value of the difference is greater than the adaptive threshold, then the second bandwidth prediction value is determined as the target bandwidth prediction value. The formula can be expressed as: ,in, The target bandwidth prediction value, This is the first bandwidth prediction value. This is the second bandwidth prediction value.

[0044] S140 adjusts the bitrate based on the target bandwidth prediction and adjusts the video playback speed based on latency information.

[0045] In this embodiment, the method of adjusting the bitrate based on the target bandwidth prediction value can be as follows: smoothing the target bandwidth prediction value based on historical bandwidth prediction values; if the smoothed target bandwidth prediction value is less than a first set multiple of the current bitrate, then the bitrate is reduced; if the smoothed target bandwidth prediction value is less than a second set multiple of the current bitrate and continues for a set number of periods, then the bitrate is increased.

[0046] Wherein, the first set multiple is less than the second set multiple. The calculation formula for smoothing the target bandwidth prediction value based on historical bandwidth prediction values ​​can be expressed as: ,in, Let i be the predicted target bandwidth value. The weights for the predicted value of the i-th target bandwidth are... The weighting of the target bandwidth prediction decreases over time, meaning that more recent predictions have a higher weight than more distant ones. In this embodiment, a sliding window weighted average algorithm is used to post-process the target bandwidth predictions, assigning higher weights to recent data through a time-decay weighting strategy. This processing effectively smooths the prediction curve, eliminates outliers caused by instantaneous network fluctuations, and improves the stability and reliability of bandwidth prediction.

[0047] The first set multiple can be set to 1.3, and the second set multiple can be set to 1.6. Bitrate adjustment can be limited to one bitrate level at a time (i.e., decreasing or increasing the bitrate by one level), avoiding frequent bitrate switching due to prediction errors and maintaining a smooth viewing experience. In this embodiment, if the predicted target bandwidth after smoothing is less than the first set multiple of the current bitrate, the bitrate is decreased to ensure a rapid response and avoid stuttering during sudden drops in network bandwidth. If the predicted target bandwidth after smoothing is less than the second set multiple of the current bitrate for a set number of periods, the bitrate is increased, balancing response speed and playback stability through asymmetric decision conditions. Employing a hierarchical decision-making mechanism based on dual threshold triggering allows for differentiated bitrate downsampling and upsampling control.

[0048] Optionally, the method for adjusting the video playback speed based on the delay information may be as follows: if the delay is less than or equal to the first set value, the video playback speed is adjusted using a non-linear playback control strategy; if the delay is greater than the first set value but less than or equal to the second set value, the preset non-key frames are skipped; if the delay is greater than the second set value, the buffer is cleared and the video stream is resynchronized.

[0049] The delay information can be the delay time of the video segment. The first setting value can be set to 0.5s, and the second setting value can be 2s. In this embodiment, the method of adjusting the video playback speed using a non-linear playback control strategy can be as follows: if the delay is too high, the playback speed is adjusted to 1+cpr; if the delay is too low, the playback speed is slowed down to 1-cpr. cpr is the adjustment range parameter, which can be 0.1.

[0050] In this embodiment, for mild delay ( ), using a non-linear playback control strategy to adjust the video playback speed; for moderate delay ( If the frame is not critical, then skip the preset non-critical frames to quickly align with real-time performance; for severe delays ( This mechanism forcibly clears the buffer and resynchronizes the video stream. While ensuring playback continuity, it effectively balances latency control and content integrity, achieving precise latency adjustment while minimizing content loss.

[0051] The technical solution of this embodiment uses the Common Media Application Format (CMAF) to parse the received video segments to determine a sequence of bandwidth measurement values. This sequence is then input into a first prediction model and a second prediction model to obtain a first bandwidth prediction value and a second bandwidth prediction value. A target bandwidth prediction value is determined based on these two values. The bitrate is adjusted based on the target bandwidth prediction value, and the video playback speed is adjusted based on latency information. The video bitrate control method provided by this embodiment ensures low latency while maintaining video quality and smooth playback.

[0052] Example 2

[0053] Figure 2 This is a schematic diagram of a video bitrate control device provided in Embodiment 2 of the present invention, as shown below. Figure 2 As shown, the device includes:

[0054] The bandwidth measurement value sequence determination module 210 is used to parse the received video segments using the Common Media Application Format (CMAF) to determine the bandwidth measurement value sequence.

[0055] The bandwidth prediction module 220 is used to input the bandwidth measurement value sequence into the first prediction model and the second prediction model respectively to obtain the first bandwidth prediction value and the second bandwidth prediction value.

[0056] The target bandwidth prediction value determination module 230 is used to determine the target bandwidth prediction value based on the first bandwidth prediction value and the second bandwidth prediction value;

[0057] The bitrate and playback speed adjustment module 240 is used to adjust the bitrate based on the target bandwidth prediction value and adjust the video playback speed based on latency information.

[0058] Optionally, the bandwidth measurement value sequence determination module 210 is also used for:

[0059] The received video segment is parsed using CMAF to obtain multiple HTTP blocks; the HTTP blocks include the video segment box MFB header and the media data box MDB content.

[0060] Valid HTTP blocks are selected from multiple HTTP blocks based on the MFB header and MDB content;

[0061] Bandwidth measurements are determined based on valid HTTP blocks.

[0062] Optionally, the bandwidth measurement value sequence determination module 210 is also used for:

[0063] An HTTP block is considered valid if it meets all of the following conditions: it is not the first HTTP block, it consists of only a single video block, and the current video block ID is consecutive to the video block ID of the previous TTTP block. Among these, a single video block must meet the following conditions: the sample count field in the MFB header is 1, the data size in the MDB content is the same as the size of a single video block recorded in the MFB header, and there is no fragmentation flag.

[0064] Optionally, the bandwidth measurement value sequence determination module 210 is also used for:

[0065] For each valid HTTP block, the initial bandwidth measurement is determined based on the size of the valid HTTP block in bytes and the transmission duration of the HTTP block;

[0066] The average of the initial bandwidth measurements for each valid HTTP block is used as the final bandwidth measurement.

[0067] Optionally, the first prediction model is an autoregressive integral moving average (ARIMA) model; the second prediction model is a deep learning model based on gated recurrent units (GRUs); the parameters in the ARIMA model are obtained by searching based on a preset optimization algorithm, and the GRU-based deep learning model includes a convolutional feature extraction layer, a GRU temporal processing layer, and an attention mechanism layer.

[0068] Optionally, the bitrate and playback speed adjustment module 240 is also used for:

[0069] The target bandwidth prediction value is smoothed based on historical bandwidth prediction values;

[0070] If the predicted target bandwidth after smoothing is less than a first set multiple of the current bitrate, then the bitrate will be reduced.

[0071] If the predicted target bandwidth after smoothing is less than a second set multiple of the current bitrate and continues for a set number of periods, then the bitrate is increased; wherein the first set multiple is less than the second set multiple.

[0072] Optionally, the bitrate and playback speed adjustment module 240 is also used for:

[0073] If the delay is less than or equal to the first set value, the playback speed of the video is adjusted using a non-linear playback control strategy.

[0074] If the delay is greater than the first set value and less than or equal to the second set value, then skip the preset non-key frames;

[0075] If the delay exceeds the second set value, the buffer will be cleared and the video stream will be resynchronized.

[0076] The above-described apparatus can execute the methods provided in all the foregoing embodiments of the present invention, and has the corresponding functional modules and beneficial effects for executing the above methods. Technical details not described in detail in this embodiment can be found in the methods provided in all the foregoing embodiments of the present invention.

[0077] Example 3

[0078] Figure 3 A schematic diagram of an electronic device 10 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components, connections and relationships between components, and their functions shown herein are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0079] like Figure 3 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0080] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0081] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as video bitrate control methods.

[0082] In some embodiments, the video bitrate control method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or mounted on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the video bitrate control method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the video bitrate control method by any other suitable means (e.g., by means of firmware).

[0083] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0084] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0085] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0086] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0087] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0088] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0089] This invention also provides a computer program product, including a computer program that, when executed by a processor, implements the video bitrate control method provided in any embodiment of this application.

[0090] In implementing the computer program product, computer program code for performing the operations of this invention can be written in one or more programming languages ​​or a combination thereof. Programming languages ​​include object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0091] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0092] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A method of controlling video bitrate, characterized by, The method comprises the following steps: parsing a received video segment by using a common media application format (CMAF) to determine a bandwidth measurement sequence; inputting the bandwidth measurement sequence into a first prediction model and a second prediction model respectively to obtain a first bandwidth prediction value and a second bandwidth prediction value; determining a target bandwidth prediction value based on the first bandwidth prediction value and the second bandwidth prediction value; adjusting a code rate based on the target bandwidth prediction value and adjusting a playing speed of the video based on delay information.

2. The method of claim 1, wherein, The method comprises the following steps: parsing a received video segment by using a common media application format (CMAF) to determine a bandwidth measurement sequence; parsing the received video segment by using the CMAF to obtain a plurality of HTTP blocks; wherein the HTTP blocks comprise a video fragment box (MFB) header and media data box (MDB) content; screening valid HTTP blocks from the plurality of HTTP blocks based on the MFB header and the MDB content; 3. The method of claim 2, wherein, determining a bandwidth measurement value based on the valid HTTP blocks. The method comprises the following steps:

4. The method of claim 2, wherein, if an HTTP block meets the following conditions simultaneously, the HTTP block is a valid HTTP block: the HTTP block is not the first HTTP block, only includes a single video block, and a current video block ID is continuous with a video block ID of a previous HTTP block; wherein the condition that the HTTP block only includes a single video block is that a sample number field value in the MFB header is 1, a data size in the MDB content is consistent with a single video block size recorded in the MFB header, and there is no fragmentation flag. The method comprises the following steps: for each valid HTTP block, determining an initial bandwidth measurement value based on a byte size of the valid HTTP block and a transmission duration of the HTTP block; 5. The method of claim 1, wherein, determining a mean value of the initial bandwidth measurement values of the valid HTTP blocks as a final bandwidth measurement value.

6. The method of claim 1, wherein, The first prediction model is an autoregressive integrated moving average (ARIMA) model, and the second prediction model is a deep learning model based on a gated recurrent unit (GRU); parameters in the ARIMA model are obtained by searching based on a preset optimization algorithm, and the deep learning model based on the GRU comprises a convolution feature extraction layer, a GRU time sequence processing layer, and an attention mechanism layer. The method comprises the following steps: smoothing the target bandwidth prediction value based on historical bandwidth prediction values; if the smoothed target bandwidth prediction value is less than a first preset multiple of a current code rate, reducing the code rate; 7. The method of claim 1, wherein, if the smoothed target bandwidth prediction value is less than a second preset multiple of the current code rate and lasts for a preset number of periods, increasing the code rate; wherein the first preset multiple is less than the second preset multiple. The method comprises the following steps: if the delay is less than or equal to a first preset value, adjusting the playing speed of the video by using a nonlinear playing control strategy; if the delay is greater than the first preset value and less than or equal to a second preset value, skipping a preset non-key frame. If the delay is greater than the second set value, the buffer is cleared and the video stream is resynchronized.

8. An apparatus for controlling video code rate, characterized by comprising: include: The bandwidth measurement value sequence determination module is used to parse the received video segments using the Common Media Application Format (CMAF) to determine the bandwidth measurement value sequence. A bandwidth prediction module is used to input the bandwidth measurement value sequence into a first prediction model and a second prediction model respectively to obtain a first bandwidth prediction value and a second bandwidth prediction value. A target bandwidth prediction value determination module is used to determine a target bandwidth prediction value based on the first bandwidth prediction value and the second bandwidth prediction value; The bitrate and playback speed adjustment module is used to adjust the bitrate based on the target bandwidth prediction value and adjust the video playback speed based on latency information.

9. An electronic device, comprising: The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the video bitrate control method according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed by a processor, implement the video bitrate control method according to any one of claims 1-7.