Water level management method of buffer queue and related equipment thereof

By dynamically adjusting the water level threshold of the buffer queue, the stuttering problem caused by data rate mismatch in the multimedia playback link was solved, the data processing rhythm of the upstream and downstream modules was adapted, and the stability of the multimedia playback link was improved.

CN121728039APending Publication Date: 2026-03-24AUTOCHIPS
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-30
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

In the multimedia playback link, the fixed level of the buffer queue leads to a mismatch between the data input rate and the output rate, resulting in stuttering and uneven display rates in downstream modules.

Method used

By dynamically adjusting the first and second water level thresholds of the buffer queue, and based on the data input rate of the upstream module and the data output rate of the downstream module, the upper and lower limits of the data buffering of the upstream module are limited, thereby achieving a balanced adaptation of the data processing rhythm between the upstream and downstream modules.

Benefits of technology

It improves the stability of data transmission and processing in the multimedia playback link, avoids data underflow or output delay, and enhances the system's responsiveness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121728039A_ABST
    Figure CN121728039A_ABST
Patent Text Reader

Abstract

The invention provides a water level management method of a buffer queue and related equipment thereof. The method comprises the following steps: acquiring a data input rate corresponding to data input to the buffer queue by an upstream module; acquiring a data output rate corresponding to data output from the buffer queue to a downstream module; according to the data input rate and the data output rate, a first water level threshold value and / or a second water level threshold value of the buffer queue are / is adjusted, the first water level threshold value is used for limiting the data buffer upper limit of the buffer queue to the upstream module, and the second water level threshold value is used for limiting the data buffer upper limit of the buffer queue to the upstream module. The second water level threshold value is used for limiting the data buffering lower limit of the upstream module by the buffering queue, and the first water level threshold value and / or the second water level threshold value of the buffering queue are / is dynamically adjusted, so that the respective data processing rhythms of the upstream module and the downstream module of the buffering queue are adaptive and balanced. Therefore, the running stability of the multimedia playing link is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of buffer queue water level management technology, and in particular to a method for managing the water level of a buffer queue and related equipment. Background Technology

[0002] A multimedia playback link consists of multiple processing modules connected in series, which operate synchronously and collaboratively. For example, a multimedia playback link includes a receiving module, a decoder module, and an output module.

[0003] In the multimedia playback link, a module may cause its downstream modules to malfunction due to a sudden change in its own data block, resulting in instability in the multimedia playback link.

[0004] In related technologies, adjustments are made by setting up a buffer queue between the upstream and downstream modules. However, while setting up a buffer queue improves the stability of the multimedia playback link, when the data of the upstream module experiences a surge or drop due to network fluctuations, it can cause phenomena such as stuttering and uneven display rates in the downstream module. Summary of the Invention

[0005] This application provides a method for managing the water level of a buffer queue and related equipment, which enables the data processing rhythms of the upstream and downstream modules of the buffer queue to be adapted and balanced, thereby improving the stability of the multimedia playback link.

[0006] The first aspect of this application provides a method for managing the water level of a buffer queue, comprising: Obtain the data input rate corresponding to the data input from the upstream module to the buffer queue; and obtain the data output rate corresponding to the data output from the buffer queue to the downstream module; The buffer queue's first water level threshold and / or second water level threshold are adjusted according to the data input rate and the data output rate, wherein the first water level threshold is used to limit the upper limit of the data buffering of the upstream module by the buffer queue, and the second water level threshold is used to limit the lower limit of the data buffering of the upstream module by the buffer queue.

[0007] In some implementations, adjusting the first water level threshold and / or the second water level threshold of the buffer queue according to the data input rate and the data output rate includes: If the data input rate is greater than the data output rate, and the absolute value of the difference between the data input rate and the data output rate is greater than a threshold, then the first water level threshold is increased. If the data input rate is less than the data output rate, and the absolute value of the difference between the data input rate and the data output rate is greater than the threshold, then the second water level threshold is increased. In response to the absolute value of the difference between the data input rate and the data output rate being less than the threshold, the first water level threshold and the second water level threshold of the buffer queue are maintained.

[0008] In some implementations, the increased first water level threshold is less than or equal to the maximum limit water level threshold of the buffer queue, and the increased second water level threshold is less than the first water level threshold. In some implementations, before obtaining the data input rate corresponding to the data input to the buffer queue by the upstream module, the method further includes: Get the current amount of data buffered in the buffer queue; In response to the current data volume being greater than or equal to the first water level threshold, the upstream module is controlled to stop writing data to the buffer queue; If the current data volume is less than the first water level threshold, the upstream module is controlled to write data to the buffer queue.

[0009] In some embodiments, after obtaining the data output rate corresponding to the data output from the buffer queue to the downstream module, the method further includes: In response to a sudden change in the data input rate and / or the data output rate, the step of adjusting the first water level threshold and / or the second water level threshold of the buffer queue according to the data input rate and the data output rate is suspended. In response to the current amount of data buffered in the buffer queue being less than the minimum limit water level threshold, a prompt message indicating insufficient buffering is output, wherein the minimum limit water level threshold is less than the second water level threshold.

[0010] In some implementations, obtaining the data input rate corresponding to the data input from the upstream module to the buffer queue; and obtaining the data output rate corresponding to the data output from the buffer queue to the downstream module includes: Within the same preset sampling period, acquire the first amount of data input from the upstream module to the buffer queue; and acquire the second amount of data output from the buffer queue to the downstream module; The data input rate is obtained based on the first data volume, and the data output rate is obtained based on the second data volume.

[0011] A second aspect of this application provides a multimedia processing system, the multimedia processing system comprising: The data receiving module is used to receive multimedia data to be processed. A first buffer queue is used to buffer the multimedia data to be processed input by the data receiving module; wherein, the first buffer queue is managed according to any one of the embodiments of the first aspect described above; A decoding module is used to retrieve the multimedia data to be processed from the first buffer queue and decode it to obtain decoded data; A second buffer queue is used to buffer the decoded data input by the decoding module; wherein, the second buffer queue is managed in accordance with any of the embodiments of the first aspect described above; A data output module is used to obtain the decoded data from the second buffer queue.

[0012] This application provides a water level management device for a buffer queue, comprising: The acquisition unit is used to acquire the data input rate corresponding to the data input from the upstream module to the buffer queue; and to acquire the data output rate corresponding to the data output from the buffer queue to the downstream module. An adjustment unit is configured to adjust a first water level threshold and / or a second water level threshold of the buffer queue according to the data input rate and the data output rate, wherein the first water level threshold is used to limit the upper limit of data buffering of the buffer queue to the upstream module, and the second water level threshold is used to limit the lower limit of data buffering of the buffer queue to the upstream module.

[0013] A fourth aspect of this application provides a computer-readable storage medium storing program instructions that can be executed by a processor to implement any of the methods described in the first aspect above. The fifth aspect of this application provides a computer program product including program instructions that, when executed by a processor, implement any of the methods described in the first aspect above.

[0014] Compared to existing technologies, the technical solution of this application sets up a buffer queue between the upstream and downstream modules, and then adjusts the first and second water level thresholds of the buffer queue according to the data input rate corresponding to the data input from the upstream module to the buffer queue and the data output rate from the buffer queue to the downstream module. The first water level threshold is used to limit the upper limit of the data buffering of the upstream module by the buffer queue, and the second water level threshold is used to limit the lower limit of the data buffering of the upstream module by the buffer queue. This makes the data processing rhythm of the upstream and downstream modules of the buffer queue more compatible and balanced, and improves the problems of data underflow or data output delay caused by the fixed water level threshold of the buffer queue when the data input rate and data output rate are mismatched. This solves the problem of stuttering and uneven display rate of the downstream module when the data of the upstream module surges or drops due to network fluctuations, and can improve the stability of data transmission and data processing in the multimedia playback link. Attached Figure Description

[0015] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without any creative effort.

[0016] Figure 1 This is a flowchart illustrating the method for managing the water level of the buffer queue in a multimedia playback link according to an embodiment of this application. Figure 2 This is a flowchart illustrating the process of adjusting the first and second water level thresholds of the buffer queue according to an embodiment of this application. Figure 3 This is a schematic diagram of the process of controlling the buffer queue according to the current amount of data buffered in the buffer queue according to an embodiment of this application; Figure 4 This is a schematic diagram of another control buffer queue according to an embodiment of this application; Figure 5 This is a schematic diagram of the process for obtaining the data input rate and data output rate of the buffer queue according to an embodiment of this application; Figure 6 This is a schematic diagram of a multimedia processing system structure according to an embodiment of this application; Figure 7 This is a schematic diagram of the structure of a buffer queue water level management device according to an embodiment of this application; Figure 8 This is a schematic diagram of an electronic device structure according to an embodiment of this application. Detailed Implementation

[0017] The embodiments of this application will now be described in detail with reference to the accompanying drawings.

[0018] In the following description, specific details such as particular system architectures, interfaces, and technologies are presented for illustrative purposes rather than for limiting purposes, in order to provide a thorough understanding of this application.

[0019] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0020] The terms "first," "second," and "third" in this application are for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first," "second," or "third" may explicitly or implicitly include at least one of that feature. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified. All directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of this application are only used to explain the relative positional relationships and movements between components in a specific orientation (as shown in the figures). If the specific orientation changes, the directional indications also change accordingly. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices.

[0021] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0022] Please see Figure 1 , Figure 1 A flowchart illustrating the water level management method for the buffer queue in a multimedia playback link is shown, including: Step 101: Obtain the data input rate corresponding to the data input from the upstream module to the buffer queue; and obtain the data output rate corresponding to the data output from the buffer queue to the downstream module.

[0023] The upstream module of the buffer queue produces data and inputs data into the buffer queue. During this process, the data input rate corresponding to the data input by the upstream module into the buffer queue can be obtained.

[0024] Correspondingly, the downstream module corresponding to the buffer queue will continuously acquire data from the buffer queue. This is equivalent to the buffer queue outputting the acquired input data to the downstream module. During this process, the data output rate corresponding to the buffer queue outputting data to the downstream module can be obtained.

[0025] Step 102: Adjust the first water level threshold and / or the second water level threshold of the buffer queue according to the data input rate and the data output rate, wherein the first water level threshold is used to limit the upper limit of data buffering of the buffer queue to the upstream module, and the second water level threshold is used to limit the lower limit of data buffering of the buffer queue to the upstream module.

[0026] To ensure more stable operation of the multimedia playback link, the buffer queue is equipped with a first water level threshold and a second water level threshold. The first water level threshold is used to limit the upper limit of data buffering of the upstream module by the buffer queue, and the second water level threshold is used to limit the lower limit of data buffering of the upstream module by the buffer queue.

[0027] Understandably, adjusting the first water level threshold and / or the second water level threshold based on the data input rate of the upstream module and the data output rate of its downstream module in the buffer queue allows the buffer queue to adjust its data buffering capacity based on the dynamically changing first water level threshold and / or second water level threshold. This enables the buffer queue to adjust the amount of data received from the upstream module and the amount of data released from the downstream module, thereby adapting to and balancing the data processing rhythm of the upstream and downstream modules in the buffer queue, and ensuring that the upstream and downstream modules process in a consistent manner.

[0028] To enhance the operational stability of the multimedia playback link, in some implementations, at least one buffer queue can be set in the multimedia playback link, so that buffer queues are distributed among multiple adjacent upstream and downstream modules of the multimedia playback link, thereby enabling the corresponding adjacent upstream and downstream modules to process data smoothly.

[0029] Understandably, to improve the stability of data transmission and processing in the multimedia playback link, a buffer queue including a first water level threshold and a second water level threshold is set between the upstream and downstream modules of the multimedia playback link. The first water level threshold and / or the second water level threshold of the buffer queue are adjusted according to the data input rate of the upstream module and the data output rate of the downstream module. This adjusts the data capacity and data interception of the buffer queue, making the data processing rhythm of the upstream and downstream modules of the buffer queue more compatible and balanced, thereby achieving the stability of data transmission and processing in the multimedia playback link.

[0030] Please see Figure 2 , Figure 2 The flowchart further illustrates the process of adjusting the first and / or second water level thresholds of the buffer queue. After obtaining the data input rate of the upstream module and the data output rate of its downstream module, the adjustment strategy for the first and / or second water level thresholds is executed by obtaining the relationship between the data input and output rates and the relationship between the absolute value of the difference between the data input and output rates and the threshold. Increasing the first water level threshold means increasing the current storage capacity of the buffer queue, and decreasing the first water level threshold means decreasing the current storage capacity of the buffer queue. Increasing the second water level threshold means increasing the amount of data intercepted from releasing data to the downstream module, thereby raising the threshold for releasing data to the downstream module. Decreasing the second water level threshold means decreasing the amount of data intercepted from releasing data to the downstream module, thereby lowering the threshold for releasing data to the downstream module. For example, when the second water level threshold is 5, if the current data capacity of the buffer queue is less than or equal to 5, then the release of data from the buffer queue to the downstream module is intercepted, i.e., data release to the downstream module is prohibited; if the current data capacity of the buffer queue is greater than 5, then data is released to the downstream module, i.e., data release to the downstream module begins. Thus, by adjusting the size of the second water level threshold, the buffer queue can intercept storage changes that occur when data is transmitted from the upstream module to the downstream module. Figure 2 include: 201. If the response data input rate is greater than the data output rate, and the absolute value of the difference between the data input rate and the data output rate is greater than the threshold, then the first water level threshold is increased.

[0031] If the data input rate is determined to be greater than the data output rate, and the absolute value of the difference between the data input rate and the data output rate is greater than the threshold, then the first water level threshold is increased.

[0032] Understandably, a data input rate exceeding the data output rate indicates that the upstream module of the buffer queue is generating too much data, while the downstream module is consuming too little. This leads to data accumulation in the buffer queue, prompting the first water level threshold to be raised to increase the overall capacity of the buffer queue. This provides the necessary recovery time to bring the data processing rates of the upstream and downstream modules back to a more consistent level. In other words, it provides the transition time for the downstream module to increase its data processing speed to approach that of the upstream module, and prevents data loss, overflow, and frequent alarms caused by the downstream module's inability to process data in a timely manner.

[0033] 202. If the response data input rate is less than the data output rate, and the absolute value of the difference between the data input rate and the data output rate is greater than the threshold, then the second water level threshold is increased.

[0034] If the data input rate is determined to be less than the data output rate, and the absolute value of the difference between the data input rate and the data output rate is greater than the threshold, then the second water level threshold is increased.

[0035] Understandably, a data input rate lower than a data output rate indicates that the upstream module of the buffer queue is generating too little data, while the downstream module is consuming too much data. The buffer queue as a whole tends to become data-depleted, thus raising the second water level threshold to increase the interception rate and increase the threshold for releasing data to the downstream module. This allows the buffer queue to accumulate data, providing a transition time for the downstream module to slow down its data processing speed to approach that of the upstream module, thereby making the data processing rates of the upstream and downstream modules more consistent.

[0036] 203. In response to the absolute value of the difference between the data input rate and the data output rate being less than a threshold, maintain the first water level threshold and the second water level threshold of the buffer queue.

[0037] If the absolute value of the difference between the data input rate and the data output rate is less than the threshold, it indicates that the data processing speeds of the upstream and downstream modules of the buffer queue are compatible, and the first and second water level thresholds of the buffer queue are maintained.

[0038] It should be noted that the threshold is used to set the degree of adaptation of the data processing speed of the upstream and downstream modules of the buffer queue and to set the adjustment frequency of the first and second water level thresholds.

[0039] The threshold can be either non-zero or zero. When the threshold is set to a non-zero value, the magnitude of the non-zero value is inversely proportional to the degree of compatibility between the data processing speeds of the upstream and downstream modules of the buffer queue. That is, the larger the non-zero value, the smaller the compatibility between the data processing speeds of the upstream and downstream modules within the range of data processing speed compatibility of the buffer queue. The magnitude of the non-zero value is also inversely proportional to the adjustment frequency. That is, the larger the non-zero value, the smaller the adjustment frequency of the first and second water level thresholds.

[0040] Understandably, when the threshold is zero, if there is a discrepancy in the data processing speed between the upstream and downstream modules, the adjustment in step 201 or step 202 above will be performed.

[0041] In some implementations, the corresponding water level adjustment in step 201 or step 202 is an adjustment of the coefficient. Specifically, the buffer queue is set with a capacity value, which represents the maximum amount of data the buffer queue can hold. The first water level threshold and the second water level threshold are obtained by the product of the capacity value and the coefficient. For example, the first water level threshold is the product of the capacity value and the first coefficient, and the second water level threshold is the product of the capacity value and the second coefficient.

[0042] The coefficient adjustment refers to increasing or decreasing the coefficient by a percentage of the capacity value, for example, by 5%, 10%, or 15% of the current coefficient.

[0043] Understandably, the increased first water level threshold is less than or equal to the maximum limit water level threshold of the buffer queue, i.e., the capacity value of the buffer queue, and the increased second water level threshold is less than the first water level threshold.

[0044] Please see Figure 3 , Figure 3 The flowchart illustrates the process of controlling the buffer queue based on the current amount of data buffered in the buffer queue, including: 301. Get the current amount of data buffered in the buffer queue.

[0045] The current data volume represents the total amount of data that has been contained in the buffer queue.

[0046] 302. In response to the current data volume being greater than or equal to the first water level threshold, the upstream module is controlled to stop writing data to the buffer queue.

[0047] When the current data volume is determined to be greater than or equal to the first water level threshold, it indicates that the buffer queue has contained too much data and there is a risk of data overflow. Therefore, the upstream module is controlled to stop writing data to the buffer queue, that is, the buffer queue is controlled to stop receiving data from the upstream module.

[0048] 303. In response to the current data volume being less than the first water level threshold, control the upstream module to write data to the buffer queue.

[0049] When the current data volume is determined to be less than the first water level threshold, it indicates that there is spare capacity in the buffer queue. Therefore, the upstream module is controlled to write data to the buffer queue, that is, the buffer queue is controlled to allow the upstream module to receive data.

[0050] In some implementations, the aforementioned first water level threshold can be replaced by the capacity value of the buffer queue.

[0051] Understandably, by comparing the current data volume of the buffer queue with the first water level threshold and processing accordingly, it is possible to prevent the buffer queue from overflowing and crashing due to accommodating an overload of data, thereby ensuring the operational stability of the buffer queue.

[0052] In some implementations, steps 301 to 303 may precede steps 201 to 203, or steps 301 to 303 may follow steps 201 to 203. Steps 301 to 303 may also be interspersed between steps 201 to 203. No specific limitation is made here. This setting is used to improve the responsiveness of the buffer queue and enhance the stability of the buffer queue under the complex fluctuations of the multimedia playback link.

[0053] Please see Figure 4 , Figure 4 Another flowchart illustrating the control of the buffer queue is shown, including: 401. In response to a sudden change in the data input rate and / or data output rate, the step of adjusting the first water level threshold and / or the second water level threshold of the buffer queue according to the data input rate and the data output rate is suspended.

[0054] When the data input rate and / or data output rate are determined to be abrupt, the operation of adjusting the first water level threshold and / or the second water level threshold of the buffer queue based on the data input rate and data output rate is suspended.

[0055] The abrupt change scenario refers to a situation where the change in data input rate from the previous data input rate exceeds a preset threshold, and the change in data output rate from the previous data output rate also exceeds a preset threshold. The preset threshold is adjustable. In some implementations, the preset threshold is set to 28KB / s. For example, if the data input rate is 1MB / s and the previous data input rate was 100KB / s, then this scenario constitutes an abrupt change.

[0056] In some implementations, even if the data input rate and / or data output rate changes as described in the graph, the current first water level threshold and the current second water level threshold of the buffer queue can still be maintained.

[0057] 402. In response to the current amount of data buffered in the buffer queue being less than the minimum limit water level threshold, output a prompt message indicating insufficient buffering. The minimum limit water level threshold is less than the second water level threshold.

[0058] The buffer queue is set with a minimum limit water level threshold to represent the data exhaustion threshold that the current amount of data in the buffer queue is insufficient and is about to be exhausted. The limit water level threshold is also an adjustable water level threshold.

[0059] If the current amount of data buffered in the buffer queue is less than the limit water level threshold, it means that the amount of data in the buffer queue is about to be exhausted, which will cause the downstream module to also have no data to process. Therefore, the message of insufficient buffer is output.

[0060] In some implementations, after outputting a message indicating insufficient buffering, a first water level threshold is raised to accommodate more data from the upstream module of the buffer queue, ultimately allowing the buffer queue to accumulate data.

[0061] Please see Figure 5 , Figure 5 A flowchart illustrating the process of obtaining the data input rate and data output rate of the buffer queue is provided to further explain the aforementioned step 101. In this application, the buffer queue is positioned between adjacent upstream and downstream modules. The data input rate and data output rate of the buffer queue are obtained by quantifying the data generation amount of the upstream module and the data consumption amount of the downstream module, including: 501. Within the same preset sampling period, acquire the first data volume of data input from the upstream module to the buffer queue; and acquire the second data volume of data output from the buffer queue to the downstream module.

[0062] Within the same preset sampling period, the first data quantity input to the buffer queue by the upstream module and the second data quantity output to the downstream module are obtained. The first data quantity represents the amount of result data generated after the upstream module of the buffer queue performs data processing operations. In some embodiments, if the upstream module does not perform such data processing operations, the first data quantity is the amount of data input forwarded by the upstream module.

[0063] The preset period can be adjusted. In some implementations, the preset sampling period can be 0.5s, 1s or 1.5s, and the specific value is not limited here.

[0064] 502. Obtain the data input rate based on the first data quantity, and obtain the data output rate based on the second data quantity.

[0065] After obtaining the first and second data volumes within a preset period, the sliding window algorithm is used to process the first and second data volumes, filtering out instantaneous fluctuations, thereby obtaining a stable data input rate and data output rate.

[0066] Please see Figure 6 , Figure 6 A schematic diagram of a multimedia processing system is shown. This multimedia processing system includes: Data receiving module 601 is used to receive multimedia data to be processed; The first buffer queue 602 is used to buffer the multimedia data to be processed input by the data receiving module; wherein, the first buffer queue is configured as described above. Figures 1 to 5 The implementation method described herein is for water level management; The decoding module 603 is used to obtain the multimedia data to be processed from the first buffer queue and decode it to obtain decoded data; The second buffer queue 604 is used to buffer the decoded data input by the decoding module; wherein, the second buffer queue is configured as described above. Figures 1 to 5 The implementation method described herein is for water level management; The data output module 605 is used to obtain decoded data from the second buffer queue.

[0067] The data receiving module receives multimedia data to be processed from the information source and performs corresponding data processing. It then sends the processed multimedia data to a first buffer queue for buffering. The first buffer queue forwards the buffered multimedia data to a decoding module. The decoding module decodes the received data and sends the decoded data to a second buffer queue for buffering. The second buffer queue forwards the buffered decoded data to a data output module. The output module processes the received decoded data and sends it to the destination. It is understood that the first and second buffer queues can be dynamically adjusted according to the aforementioned implementation method, adjusting the corresponding first and second water level thresholds.

[0068] Understandably, the data input rate of the first buffer queue corresponds to the data input to it by the data receiving module, and the data output rate of the first buffer queue corresponds to the data output to the decoding module; the data input rate of the second buffer queue corresponds to the data input to it by the decoding module, and the data output rate of the second buffer queue corresponds to the data output to the data output module.

[0069] In some implementations, the multimedia processing system can be applied to servers, mobile phones, and computers. A data receiving module receives data from external or internal devices acting as the source, and an output module outputs data to external or internal devices acting as the destination; specific details are not limited here. The data is multimedia data, such as audio and video data; specific details are not limited here.

[0070] Understandably, by setting up a buffer queue between the upstream and downstream modules of the multimedia processing system, and then adjusting the first and second water level thresholds of the buffer queue according to the data input rate of the upstream module and the data output rate of the downstream module, the first water level threshold indicates the upper limit of the variable buffer used by the buffer queue to accommodate the received data, and the second water level indicates the lower limit of the variable buffer used by the buffer queue to accommodate the received data. In this way, by adjusting the data capacity and data interception amount of the buffer queue, the data processing rhythm of the upstream and downstream modules of the buffer queue is made more balanced, thereby improving the stability of data transmission and data processing in the multimedia processing system and avoiding blocking or data loss in the multimedia processing system.

[0071] Understandably, in some multimedia processing systems or multimedia playback links that include more upstream and downstream modules, by setting up buffer queues between each adjacent upstream and downstream module and dynamically adjusting the data capacity and data interception of the buffer queues according to the corresponding data input rate and data output rate, the consistency of pace between each adjacent upstream and downstream module is enhanced, so that the data processing rhythm of the matched upstream and downstream modules is adapted and balanced, thereby improving the stability of data transmission and data processing in such multimedia processing systems or multimedia playback links.

[0072] Please see Figure 7 , Figure 7 A schematic diagram of a water level management device for a buffer queue is shown. The device includes: The acquisition unit 701 is used to acquire the data input rate corresponding to the data input to the buffer queue from the upstream module; and to acquire the data output rate corresponding to the data output from the buffer queue to the downstream module. The adjustment unit 702 is used to adjust the first water level threshold and / or the second water level threshold of the buffer queue according to the data input rate and the data output rate, wherein the first water level threshold is used to limit the upper limit of data buffering of the buffer queue to the upstream module, and the second water level threshold is used to limit the lower limit of data buffering of the buffer queue to the upstream module.

[0073] This application also includes an electronic device, please refer to... Figure 8 It includes: a memory 801 and a processor 802; wherein the memory 801 is used to store a program; and the processor 802 is used to execute the program in the memory, including executing any of the methods in the foregoing embodiments.

[0074] Optionally, the electronic device also includes a bus system for connecting the memory and the processor to enable communication between the memory and the processor.

[0075] The processor can be a Central Processing Unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.

[0076] In some embodiments, the memory may be an internal storage unit of the cloud device, such as a hard drive or RAM. In other embodiments, the memory may be an external storage device of the cloud device, such as a plug-in hard drive, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card. Furthermore, the memory may include both internal and external storage units of the cloud device. The memory is used to store operating systems, applications, bootloaders, data, and other programs, such as program code for computer programs. The memory can also be used to temporarily store data that has been output or will be output.

[0077] This application also includes a computer-readable storage medium having internally stored program instructions that are executed by a processor to implement any of the methods described in the foregoing embodiments.

[0078] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by a processor, it can implement the steps of the various method embodiments described above.

[0079] Computer programs include computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. Computer-readable media can include at least: any entity or device capable of carrying computer program code to a photographic device / terminal device, recording media, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media. Examples include USB flash drives, portable hard drives, magnetic disks, or optical discs. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.

[0080] The above are merely embodiments of this application and do not limit the scope of patent protection of this application. Any equivalent structural or procedural changes made using the content of this application’s specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of this application.

Claims

1. A method for managing the water level of a buffer queue, characterized in that, The method includes: Obtain the data input rate corresponding to the data input from the upstream module to the buffer queue; and obtain the data output rate corresponding to the data output from the buffer queue to the downstream module; The buffer queue's first water level threshold and / or second water level threshold are adjusted according to the data input rate and the data output rate, wherein the first water level threshold is used to limit the upper limit of the data buffering of the upstream module by the buffer queue, and the second water level threshold is used to limit the lower limit of the data buffering of the upstream module by the buffer queue.

2. The method according to claim 1, characterized in that, The step of adjusting the first water level threshold and / or the second water level threshold of the buffer queue according to the data input rate and the data output rate includes: If the data input rate is greater than the data output rate, and the absolute value of the difference between the data input rate and the data output rate is greater than a threshold, then the first water level threshold is increased. If the data input rate is less than the data output rate, and the absolute value of the difference between the data input rate and the data output rate is greater than the threshold, then the second water level threshold is increased. In response to the absolute value of the difference between the data input rate and the data output rate being less than the threshold, the first water level threshold and the second water level threshold of the buffer queue are maintained.

3. The method according to claim 2, characterized in that, The improved first water level threshold is less than or equal to the maximum limit water level threshold of the buffer queue, and the improved second water level threshold is less than the first water level threshold.

4. The method according to claim 1, characterized in that, Before obtaining the data input rate corresponding to the data input to the buffer queue by the upstream module, the method further includes: Get the current amount of data buffered in the buffer queue; In response to the current data volume being greater than or equal to the first water level threshold, the upstream module is controlled to stop writing data to the buffer queue; If the current data volume is less than the first water level threshold, the upstream module is controlled to write data to the buffer queue.

5. The method according to claim 1, characterized in that, After obtaining the data output rate corresponding to the data output from the buffer queue to the downstream module, the method further includes: In response to a sudden change in the data input rate and / or the data output rate, the step of adjusting the first water level threshold and / or the second water level threshold of the buffer queue according to the data input rate and the data output rate is suspended. In response to the current amount of data buffered in the buffer queue being less than the minimum limit water level threshold, a prompt message indicating insufficient buffering is output, wherein the minimum limit water level threshold is less than the second water level threshold.

6. The method according to claim 1, characterized in that, The data input rate corresponding to the data input from the upstream module to the buffer queue is obtained; And obtaining the data output rate corresponding to the data output from the buffer queue to the downstream module, including: Within the same preset sampling period, acquire the first amount of data input from the upstream module to the buffer queue; and acquire the second amount of data output from the buffer queue to the downstream module; The data input rate is obtained based on the first data volume, and the data output rate is obtained based on the second data volume.

7. A multimedia processing system, characterized in that, The multimedia processing system includes: The data receiving module is used to receive multimedia data to be processed. A first buffer queue is used to buffer the multimedia data to be processed input by the data receiving module; wherein, the first buffer queue is managed in accordance with the method described in any one of claims 1-6; A decoding module is used to retrieve the multimedia data to be processed from the first buffer queue and decode it to obtain decoded data; The second buffer queue is used to buffer the decoded data input by the decoding module; wherein the second buffer queue is managed in accordance with the method described in any one of claims 1-6. A data output module is used to obtain the decoded data from the second buffer queue.

8. A water level management device for a buffer queue, characterized in that, The device includes: The acquisition unit is used to acquire the data input rate corresponding to the data input from the upstream module to the buffer queue; and to acquire the data output rate corresponding to the data output from the buffer queue to the downstream module. An adjustment unit is configured to adjust a first water level threshold and / or a second water level threshold of the buffer queue according to the data input rate and the data output rate, wherein the first water level threshold is used to limit the upper limit of data buffering of the buffer queue to the upstream module, and the second water level threshold is used to limit the lower limit of data buffering of the buffer queue to the upstream module.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores program instructions that can be executed by a processor to implement the method as described in any one of claims 1-6.

10. A computer program product, characterized in that, The computer program product includes program instructions that, when executed by a processor, implement the method as described in any one of claims 1-6.