A video playing buffer dynamic control method and system

By using an LSTM prediction model and an intelligent decision-making central system, the caching and download strategies of online video players are dynamically adjusted, solving the stuttering problem caused by cache exhaustion and achieving efficient bandwidth utilization and improved user experience.

CN122293909APending Publication Date: 2026-06-26GUANGZHOU BURYING TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGZHOU BURYING TECH CO LTD
Filing Date
2026-02-04
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

The cache management logic of existing online video players is based on fixed file size or video duration strategies, which leads to stuttering when the cache is exhausted. They cannot dynamically adapt to network conditions and playback needs, lack self-learning optimization capabilities, and are difficult to adapt to user behavior habits in the long term.

Method used

By employing an LSTM prediction model combined with an intelligent decision-making central system, future caching needs are predicted using historical user behavior data. The cache file duration and download speed are dynamically adjusted, a scenario-parameter correlation matrix is ​​established to achieve multi-scenario adaptation, and bandwidth utilization is optimized through a three-dimensional dynamic weight allocation algorithm.

Benefits of technology

It improves bandwidth utilization, reduces invalid downloads and storage resource consumption, lowers playback stuttering rate, enhances user experience, and can adapt to user behavior habits to optimize parameter adjustment accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122293909A_ABST
    Figure CN122293909A_ABST
Patent Text Reader

Abstract

This invention relates to the fields of audio and video playback technology and network communication technology, specifically a dynamic control method and system for video playback caching. By introducing intelligent prediction models, dynamic weight allocation algorithms, and scene association mechanisms, it achieves precise adjustment of video player caching duration, download speed, and external parameters, thereby maximizing the utilization of the player's local cached content, improving bandwidth utilization, reducing CDN bandwidth costs, and minimizing playback stuttering. Furthermore, this invention provides dynamic parameter and intelligent algorithm configuration interfaces for external users, allowing them to adjust caching control strategies based on multiple different parameters and business scenarios to achieve the optimal caching strategy for their own business.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to audio and video playback technology and network communication technology, and in particular to a dynamic control method and process for video playback caching that integrates intelligent prediction and dynamic weight allocation. Background Technology

[0002] Currently, most media players on the market cache a certain number of files locally to cope with fluctuations in the user's network connection. Existing online video playback technologies typically cache video resources using a fixed file size or video duration strategy.

[0003] Analysis and research on existing media players in the industry revealed that most cache management logic can only adjust the cache file size as a strategy parameter. However, multi-resolution video has become the mainstream solution for video playback, and using file size as an adjustment method has many shortcomings when dealing with videos of different resolutions.

[0004] Firstly, relying solely on static conditions to trigger cache download control can easily lead to stuttering caused by "downloading only starting when the cache is exhausted." Furthermore, the download speed is limited by a fixed threshold, making it impossible to dynamically adapt to network conditions and playback requirements. In addition, there is a lack of collaborative adjustment mechanisms when multiple scenarios change, the adjustment of parameters in a single scenario is highly limited, and there is no self-learning optimization capability, making it difficult to adapt to user behavior habits in the long term. Summary of the Invention

[0005] To address the problems in the prior art, this invention provides a method and system for dynamic control of video playback caching.

[0006] The technical solution adopted by this invention to solve its technical problem is: a dynamic control method for video playback buffering, comprising: Step S1: The intelligent decision-making central subsystem receives historical user behavior data and initial preset data, and calls the LSTM prediction model to output the cache consumption demand D_pred and the safe cache threshold MinT_pred within the next 3 seconds. It also calculates the dynamic weight and dynamic rate limit threshold MaxP_dynamic, matches the "scene-parameter" correlation matrix, and sends parameter adjustment instructions to the cache file duration dynamic control and intelligent prediction subsystem and the video player resource download dynamic rate limit and weight allocation subsystem. Step S2: When the user video starts playing signal is received, the intelligent decision-making central subsystem automatically collects the current scene, matches the correlation matrix parameters, and corrects the parameters by combining the prediction results of the LSTM cache demand prediction model. The parameters are then input into the cache file duration dynamic control and intelligent prediction subsystem and the video player resource download dynamic speed limit and weight allocation subsystem through the parameter interface. Step S3: Simultaneously, the intelligent decision-making central subsystem combines the current network status and playback scenario to calculate the initial MaxP_dynamic, and inputs it into the video player resource download dynamic speed limiting and weight allocation subsystem through the parameter interface; Step S4: When a signal of dynamic change in user playback behavior is received, the intelligent decision-making central subsystem adjusts the corresponding parameters and synchronously updates the matching results and predicted parameters of the "scene-parameter" correlation matrix. Step S5: When a signal indicating a change in the user's network status is received, the intelligent decision-making central subsystem adjusts the corresponding parameters and recalculates the dynamic weights and MaxP_dynamic.

[0007] Furthermore, the historical user behavior data includes: the average cache consumption rate V_consume under different network environments, the average single-frame data volume and cache loading delay T_delay corresponding to different video resolutions, the cache consumption fluctuation coefficient K_var corresponding to user operation habits, and the cache interruption duration T_switch. The initial preset data includes: the total buffer duration SumT of the player's queue to be played, the maximum buffer duration MaxT, the minimum percentage of the buffer duration to be enabled MinP, and the minimum buffer duration MinT; The initial preset data also includes: the maximum download speed per second baseline parameter maxPreSecondByte, the player's unit time interval start timestamp tcp_read_time, the player's unit time interval cumulative data read size tcp_read_byte, the unit time TCP_TIME_RANGE, and the maximum speed limit baseline parameter MaxP_base; The unit time TCP_TIME_RANGE is 1 second, which is converted to 1,000,000 microseconds.

[0008] 3. The video playback caching dynamic control method according to claim 2, characterized in that: the historical user behavior data is classified and stored according to the dimension of "user ID-video type-network scenario" to form a training dataset; The LSTM cache demand prediction model receives input features, is trained using a training dataset, outputs the cache consumption demand D_pred within the next 3 seconds, and calculates the safe cache threshold MinT_pred. The input features include: current network status, current playback parameters, and cached duration SumT; The MinT_pred is equal to the minimum cache duration MinT + D_pred × 1.2. After each playback cycle, the deviation rate Err between the actual cache consumption D_actual and the predicted value D_pred is calculated. If Err > 15%, the weight parameters of the LSTM model are automatically adjusted to correct the LSTM prediction deviation. When SumT ≥ MaxT, the player suspends the video resource download thread and no longer actively requests new video resources; When SumT is less than MaxT and less than MinT_pred, the player resumes the suspended video resource download thread and starts requesting new video resources. When the player detects that the current SumT < MinT_pred, it starts the download thread in advance and adjusts the download priority according to the predicted D_pred: when D_pred > 5 seconds, the download thread priority is increased to "high" and when D_pred < 2 seconds, the priority is kept to "medium".

[0009] Furthermore, the dynamic weight includes three-dimensional weight indicators, namely network bandwidth utilization W1, playback urgency W2, and user experience weight W3. The dynamic rate limiting threshold MaxP_dynamic is calculated using a weighted summation formula: MaxP_dynamic = maxPreSecondByte × (0.3 × W1 + 0.5 × W2 + 0.2 × W3) / 10, and bandwidth is allocated as needed; The video player resource download dynamic speed limit and weight allocation subsystem records the current system timestamp and data size when the player starts requesting data and when the requested video resource data is returned. It also calculates the cumulative download duration T1 and the cumulative download data size D1. When D1≥MaxP_dynamic, it calculates the remaining duration per unit time and performs the next operation accordingly based on the remaining duration per unit time. When a user triggers a report of lag or a fast-forward / rewind signal, the system automatically marks the current weight combination as an optimized sample and adjusts the three-dimensional weight coefficients.

[0010] Furthermore, the "scene-parameter" association matrix uses network type, playback speed, and screen orientation as three-dimensional scene dimensions, and each scene combination corresponds to a unique MaxT and MinP parameter combination.

[0011] Furthermore, when a user simultaneously triggers multiple scene change signals, the cache file duration dynamic control and intelligent prediction subsystem automatically matches the corresponding parameter combination from the correlation matrix. If the scene combination does not exist in the matrix, the interpolation algorithm is started to calculate the parameters.

[0012] Furthermore, the weight parameters of the LSTM model are automatically adjusted using the temporal difference algorithm.

[0013] A dynamic control system for video playback buffering, comprising a system for implementing the above-described dynamic control method for video playback buffering, including: The dynamic control and intelligent prediction subsystem for cached file duration is used to dynamically control the duration of cached files in the video player, set relevant external parameters, and intelligently predict cache requirements. The video player resource download dynamic speed limiting and weight allocation subsystem is used to dynamically control the download speed of video player resources, set corresponding external parameters, and dynamically allocate weights in multiple dimensions. The intelligent decision-making central subsystem is used to call and coordinate the dynamic control and intelligent prediction subsystem for cached file duration, as well as the dynamic speed limiting and weight allocation subsystem for video player resource downloads, and dynamically control video playback caching in a closed loop.

[0014] Furthermore, the cache file duration dynamic control and intelligent prediction subsystem includes: The historical data acquisition submodule is used to record the user's historical playback data in real time; The LSTM cache demand prediction model is used to output the cache consumption demand D_pred and the safe cache threshold MinT_pred within the next 3 seconds based on the data collected by the historical data acquisition submodule and the current playback data. The data statistics submodule is used to analyze the lag rate, bandwidth saving rate, and cache hit rate of various scenario combinations every month, and automatically adjust their parameters and update the correlation matrix based on the lag rate.

[0015] Furthermore, the system also includes a video player terminal, which is connected to several external parameter interfaces for inputting relevant parameters into the system through external setting methods.

[0016] The beneficial effects of this invention are: This invention establishes a dynamic control and intelligent prediction subsystem for cached file duration, a dynamic speed limit and weight allocation subsystem for video player resource downloads, and an intelligent decision-making center subsystem, enabling precise cache control of the video player based on business needs, scenario changes, and proactive adjustment needs. This invention breaks through the traditional framework of "parameterized adjustment + condition judgment" in existing technologies, introduces an LSTM cache demand prediction model to predict cache consumption, realizes bandwidth allocation on demand through a three-dimensional dynamic weight allocation algorithm, and achieves deep adaptation of multiple scenarios by combining scene association matrix and self-updating mechanism, thus forming a principle innovation and mechanism innovation.

[0017] This invention's intelligent prediction and dynamic rate limiting mechanism significantly improves bandwidth utilization, reduces invalid downloads and bandwidth waste, saves CDN bandwidth costs, and reduces the local storage resources occupied by cached files.

[0018] This invention effectively avoids playback stuttering caused by network fluctuations and multi-scene switching through pre-caching triggering and dynamic bandwidth allocation, reducing the stuttering rate and improving the user playback experience; the self-learning mechanism can adapt to user behavior habits over a long period of time and further optimize the accuracy of parameter adjustment.

[0019] This invention integrates into any player as a plug-in module, dynamically and intelligently adjusting the caching logic without affecting its original logic; the external parameter interface and algorithm configuration interface allow business users to flexibly adapt to different scenario requirements, and have broad engineering application value. Attached Figure Description

[0020] Other features, objects, and advantages of the present invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings: Figure 1 This is a schematic diagram of the system composition of a video playback buffer dynamic control method and system according to the present invention; Figure 2 This is a logic diagram of a video playback buffer dynamic control method and an LSTM prediction model in the system of the present invention. Figure 3 This invention relates to a dynamic control method for video playback caching and a scene-parameter correlation matrix composition diagram in the system. Detailed Implementation

[0021] To make the technical means, creative features, objectives and effects of this invention easier to understand, the invention will be further described below in conjunction with specific embodiments.

[0022] First embodiment: Please refer to Figures 1-3 This invention discloses a method and system for dynamic control of video playback buffering, wherein the system includes: The system includes a dynamic control and intelligent prediction subsystem for cached file duration, a dynamic speed limit and weight allocation subsystem for video player resource downloads, and an intelligent decision-making center subsystem. The system also includes a video player terminal, which connects to several external parameter interfaces for inputting relevant parameters into the system through external setting methods.

[0023] The dynamic control and intelligent prediction subsystem for cached file duration includes: The historical data acquisition submodule is used to record the user's historical playback data in real time; The LSTM cache demand prediction model is used to output the cache consumption demand D_pred and the safe cache threshold MinT_pred within the next 3 seconds based on the data collected by the historical data acquisition submodule and the current playback data. The data statistics submodule is used to analyze the lag rate, bandwidth saving rate, and cache hit rate of various scenario combinations every month, and automatically adjust their parameters and update the correlation matrix based on the lag rate.

[0024] Specifically, the subsystem for dynamic control and intelligent prediction of cached file duration implements dynamic control of video player cached file duration, external parameterization settings, and intelligent prediction of cache requirements. The process is as follows: Step [S001]: The player starts playing, reads the first frame data AVPacket of the video resource, and obtains its unit time base parameter time_base, which has the structure AVRational.

[0025] Step [S002]: When the player requests new video frame data P through the network, it obtains the internal display duration parameter of the frame data P. The display duration Pw of the video frame represented by P is obtained by the conversion formula Pw=duration×av_q2d(time_base), thus completing the conversion of the video cache calculation scale between file size and file duration.

[0026] Step [S003]: Define the total buffer duration SumT of the player's waiting queue. When the player obtains a new video frame and adds it to the queue, SumT = SumT + Pw is accumulated.

[0027] Step [S004]: When a video frame in the player's queue is dequeued and rendered, the total buffer duration SumT is reduced by the display duration Pt of that video frame, i.e., SumT = SumT - Pt.

[0028] Step [S005]: Set the maximum cacheable duration MaxT. When SumT is greater than or equal to MaxT, the player suspends the video resource download thread and no longer actively requests new video resources.

[0029] Step [S006]: Set the minimum cache duration percentage MinP, and use MinP multiplied by MaxT to get the minimum cache duration MinT. Assuming the calculated MinT = 2 minutes, the player will ensure that at least 2 minutes of video content is cached to avoid playback stuttering due to insufficient caching.

[0030] Step [S006-1]: Construct a user behavior-caching consumption database. Add a "historical data collection submodule" to record user historical playback data in real time, including the average cache consumption rate V_consume under different network environments, the single-frame data volume and average cache loading delay T_delay corresponding to different video resolutions, the cache consumption fluctuation coefficient K_var corresponding to user operation habits, and the cache interruption duration T_switch. Store this data categorized by "user ID-video type-network scenario" to form a training dataset. Based on "User ID-Video Type-Network Scenario", the data can be stored as an entry like this: User 123-Short Video-4G Network: V_consume=xxx, Single Frame Data Size=xxx, T_delay=xxx, K_var=xxx, T_switch=xxx.

[0031] The advantage of storing data in this categorized way is that the player can accurately match it later: for example, when user 123 watches short videos on 4G, the corresponding data can be directly called to adjust the caching strategy and avoid lag.

[0032] Step [S006-2]: Train the LSTM cache demand prediction model. Using "current network status (bandwidth B, fluctuation frequency F), current playback parameters (resolution R, playback speed S), and cached duration SumT" as input features, and "cache consumption demand D_pred (unit: seconds) within the next 3 seconds" as the output label, train the LSTM model using the training dataset, and calculate "safe cache threshold MinT_pred = MinT (minimum cache duration) + D_pred × 1.2" (1.2 is the redundancy coefficient). LSTM predicts potential caching needs based on current network conditions, video type, and user habits, and then dynamically adjusts its caching strategy. If network congestion is anticipated, cache an extra video segment in advance; If a user is predicted to pause, caching will be temporarily stopped to save bandwidth; If a user is predicted to fast forward, the video at the target fast-forward position will be cached first to avoid waiting.

[0033] Step [S006-3]: Dynamically adjust the cache trigger threshold. When the player detects that the current SumT < MinT_pred, it starts the download thread in advance and adjusts the download priority according to the predicted D_pred: when D_pred > 5 seconds, the download thread priority is increased to "high"; when D_pred < 2 seconds, the priority is kept at "medium".

[0034] Step [S006-4]: Prediction bias correction. After each playback cycle (30 seconds), calculate the deviation rate Err between the actual cache consumption D_actual and the predicted value D_pred. If Err > 15%, automatically adjust the weight parameters of the LSTM model (such as the learning rate η) to optimize the prediction accuracy in the next round.

[0035] Step [S006-5]: Add an external prediction parameter interface M4 to support business users in dynamically configuring key parameters such as redundancy coefficient, bias threshold, and learning rate of the prediction model to adapt to different scenario requirements.

[0036] Step [S007]: When the player continues to play video resources, when SumT is less than MaxT (maximum cacheable duration) and less than MinT_pred (safe cache threshold), the player resumes the suspended video resource download thread and starts requesting new video resources.

[0037] Step [S008]: Add a new parameter cacheDuration with the unit of seconds as the maximum duration of video caching for the player, replacing the current video player's setting parameter for cacheable files with the unit of bytes.

[0038] Step [S009]: Add an external setting method M1 to the video player so that cacheDuration can be dynamically associated with MaxT through the external setting method.

[0039] Step [S010]: Add a parameter minCachePercent with the unit of percentage, which is the minimum percentage of video cache to be enabled in the player.

[0040] Step [S011]: Add an external setting method M2 to the video player so that minCachePercent can be dynamically associated with MinP through the external setting method.

[0041] Step [S012]: The client receives the policy parameters and extracts the parameters required for different user states.

[0042] Step [S013]: When the user starts playing video resources, the obtained start-up status parameters are set into the service player through M1, M2, and M4.

[0043] Step [S014]: Establish a dynamic strategy adjustment system based on user's landscape and portrait playback behavior. When the user switches between landscape and portrait playback behavior, the corresponding status parameters P1 and P2 are set in the service player through M1 and M2. The P1 and P2 parameters can be set by the user through the external player parameters.

[0044] Step [S015]: Establish a dynamic strategy adjustment system based on user playback speed behavior. When a user plays at double speed, the corresponding parameters are set in the business player through M1 and M2. The parameters can be set by the user through the external parameters of the player.

[0045] Step [S016]: Establish a user network status-based system. When the user equipment network status changes, the corresponding parameters are set in the service player through M1 and M2. The parameters can be externalized through the player parameters for users to set preferentially.

[0046] Step [S017]: Construct a "scene-parameter" association matrix. Using "network type (WIFI / 4G / 5G), playback speed (1.0x / 1.25x / 1.5x / 2.0x), screen orientation (landscape / portrait)" as the three-dimensional scene dimensions, each scene combination corresponds to a unique MaxT, MinP, and MaxP parameter combination.

[0047] Step [S018]: Multi-scene overlay trigger logic. When a user triggers multiple scene changes simultaneously, the system automatically matches the corresponding parameter combination from the association matrix; if the scene combination does not exist in the matrix, the interpolation algorithm is started to calculate the parameters to ensure parameter continuity.

[0048] Step [S019]: Self-updating the correlation matrix. A new "Data Statistics Submodule" is added to analyze the stuttering rate, bandwidth saving rate, and cache hit rate of each scenario combination every month. If the stuttering rate of a certain scenario combination is >5%, its parameters are automatically adjusted and the correlation matrix is ​​updated.

[0049] Regarding the video player resource download dynamic speed limiting and weight allocation subsystem: This system enables dynamic speed limiting control for video player resource downloads, external parameter settings, and multi-dimensional dynamic weight allocation. The process is as follows: Step [S020]: Add a parameter maxPreSecondByte with the unit set in bytes / second as the baseline parameter for the maximum download speed per second, providing a baseline value for the maximum download data size of the video per second for the player.

[0050] Step [S021]: Set tcp_read_time to record the start timestamp of the unit time interval of the player, in microseconds.

[0051] Step [S022]: Set tcp_read_byte to record the cumulative size of data read by the player per unit time interval, in bytes.

[0052] Step [S023]: Set the unit time TCP_TIME_RANGE to 1 second, which is converted to 1,000,000 microseconds.

[0053] Step [S024]: Set the maximum download speed limit base parameter MaxP_base, in bytes / second.

[0054] Step [S024-1]: Define three-dimensional weighting indicators. Construct a three-dimensional weighting system for download speed adjustment and calculate the scores of each indicator (out of 10 points) in real time: network bandwidth utilization W1 (calculated based on actual download speed and current available bandwidth), playback urgency W2 (calculated based on predicted cache exhaustion time T_empty), and user experience weight W3 (dynamically assigned based on the user's current operation).

[0055] Dynamically assigning a score based on the user's current action assigns a "dynamic score" to the importance of "user experience." This score changes constantly based on the user's current activity, with a maximum score of 10. This score directly affects caching and speed-limiting strategies: when the weight is high, the player will prioritize smoothness at all costs; when the weight is low, it will sacrifice some smoothness in exchange for saving data or memory. For example, if a user is watching a movie continuously in full screen, the player will assign a high weight to the user experience, such as 9 points. If the user frequently fast-forwards and rewinds while watching short videos, the user's need is for "fast switching and no waiting," so the weight will also be relatively high, such as 8 points. If the user pauses playback and switches to WeChat or other mini-programs, where playback experience is not important, the weight will be very low, such as 2 points.

[0056] Step [S024-2]: Calculate the dynamic rate limiting threshold MaxP_dynamic. A weighted summation formula is used: MaxP_dynamic = maxPreSecondByte × (0.3 × W1 + 0.5 × W2 + 0.2 × W3) / 10, to achieve on-demand bandwidth allocation.

[0057] Step [S024-3]: Weight self-iterative optimization, adding the "user experience feedback collection" function. When a user triggers a lag report or fast forward / rewind operation, the current weight combination is automatically marked as an optimized sample, and the three-dimensional weight coefficients are adjusted.

[0058] The purpose of marking the current weight combination is because this combination causes stuttering in the current scenario and is a sample that needs optimization. For example, if a user is watching a 4K movie on 4G and the current weight combination is "data saving weight 7 points > smoothness weight 3 points", stuttering will occur and the user will report it. The player marks this (7,3,x) weight combination as a "stuttering sample" and records "4G + 4K + this weight = stuttering".

[0059] Subsequent adjustments to the three-dimensional weights: The player references this sample and increases the smoothness weight, for example, from 3 to 8, and decreases the data saving weight, for example, from 7 to 2. The next time the same scenario is encountered, the new weight combination will be used to avoid stuttering.

[0060] Step [S025]: When the player starts requesting data, tcp_read_time is reset to the current system timestamp, and tcp_read_byte is reset to 0.

[0061] Step [S026]: When the requested video resource returns data, record the current system timestamp tcp_current_time, and calculate the cumulative download time T1 by subtracting tcp_read_time from tcp_current_time.

[0062] Step [S027]: When the requested video resource returns data, obtain the size of the returned data read_data_byte, and obtain the cumulative downloaded data size D1 by tcp_read_byte=tcp_read_byte+read_data_byte.

[0063] Step [S028]: When the video resource continues to return data, the data receiving and statistics steps are executed in a loop. When it is found that D1 is greater than or equal to MaxP_dynamic, the remaining time interval per unit time is calculated as interval = TCP_TIME_RANGE - T1. If interval > 0 milliseconds, the current thread is suspended for interval duration to complete the millisecond-level precise rate limiting.

[0064] Step [S029]: When the video resource continues to return data, if the calculated interval is less than or equal to 0 milliseconds, then reinitialize tcp_read_time and tcp_read_byte.

[0065] Step [S030]: Add an external setting method M3 to the video player so that maxPreSecondByte can be dynamically associated with MaxP_base through the external setting method.

[0066] Step [S031]: The client receives the policy parameters and extracts the parameters required for different user states.

[0067] Step [S032]: When the user starts playing video resources, the obtained start-up status parameters are set into the service player through M3.

[0068] For the intelligent decision-making central subsystem: As the core collaborative module, this system calls upon the dynamic control and intelligent prediction subsystem for cached file duration, the dynamic speed limiting and weight allocation subsystem for video player resource downloads, and the intelligent decision-making center subsystem to achieve a closed-loop dynamic control of video playback caching. The process is as follows: Step [S040]: Start the intelligent decision center, which is responsible for receiving user behavior data from the historical data collection submodule, calling the LSTM prediction model to output D_pred and MinT_pred, calculating dynamic weights and MaxP_dynamic, matching the "scene-parameter" correlation matrix, and sending parameter adjustment instructions from the dynamic control and intelligent prediction subsystem for cached file duration and the dynamic speed limit and weight allocation subsystem for video player resource downloads.

[0069] Step [S041]: Intelligent parameter input. When the user's video starts playing, the intelligent decision center automatically collects the current scene, matches the correlation matrix parameters, and corrects the parameters by combining the LSTM prediction results. The input is then processed through the M1 / M2 / M3 / M4 interfaces to the dynamic control and intelligent prediction subsystem for cache file duration and the dynamic speed limit and weight allocation subsystem for video player resource download.

[0070] Step [S042]: Intelligent speed limiting parameter input. When the user's video starts playing, the intelligent decision center calculates the initial MaxP_dynamic based on the current network status and playback scenario, and inputs it into the video player resource download dynamic speed limiting and weight allocation subsystem through the M3 interface.

[0071] Step [S043]: Response to changes in playback interface logic. During video playback, when the user's playback interface logic changes, the parameters P1 of the dynamic control and intelligent prediction subsystem for adjusting cache file duration and the dynamic speed limit and weight allocation subsystem for video player resource download are triggered and input into the system. The intelligent decision center synchronously updates the correlation matrix matching results and prediction parameters, triggering the dynamic cache duration adjustment logic.

[0072] Step [S044]: Network Status Change Response. During video playback, when the network status of the user's playback device changes, the parameter MaxP_base of the video player resource download dynamic speed limiting and weight allocation subsystem is adjusted and input into the system. The intelligent decision center recalculates the dynamic weight and MaxP_dynamic, triggering the download dynamic speed limiting control logic.

[0073] Step [S045]: Feedback-driven parameter update. During video playback, when the dynamic control and intelligent prediction subsystem for cached file duration or the dynamic speed limiting and weight allocation subsystem for video player resource downloads receives an active parameter adjustment notification, or detects a cache hit rate <80% or a stuttering event, it updates the internal parameters in real time and triggers the corresponding adjustment logic; at the same time, it sends feedback to the intelligent decision center, which triggers the update of the correlation matrix or the adjustment of the LSTM model weights to achieve closed-loop optimization.

[0074] Step [S041]: When the user's video starts playing, the parameters M1, M2, P1, and P2 are obtained from external sources and input into the cache file duration dynamic control and intelligent prediction subsystem and then started.

[0075] Step [S042]: When the user's video starts playing, the parameter MaxP is obtained externally, input into the video player's resource download dynamic speed limit control cache file duration dynamic control and intelligent prediction subsystem, and then started.

[0076] Step [S043]: During video playback, when the dynamic control and intelligent prediction subsystem for cache file duration or the dynamic speed limit and weight allocation subsystem for video player resource download receives an active parameter adjustment notification, its internal real-time parameters also change accordingly, triggering the dynamic cache duration adjustment and dynamic speed limit control logic.

[0077] The dynamic control and intelligent prediction subsystem for cached file duration and the dynamic speed limit and weight allocation subsystem for video player resource downloads can be turned off and on independently without affecting the normal operation of other system logic.

[0078] The second embodiment, based on the first embodiment, uses a temporal difference algorithm to automatically adjust the weight parameters of the LSTM model, including the following steps: First, determine the direction of weight adjustment, and then calculate the "time series error value" using the time series difference algorithm. This value not only includes the difference between the current prediction and the actual value, but also takes into account the error trend in the short term to avoid incorrect adjustments caused by a single fluctuation. For example, when there is a positive error, i.e., when the actual consumption is greater than the predicted demand, the weight is adjusted in the direction of "increasing the cache threshold", while the opposite is true for a negative error. Then locate the neurons to be adjusted. The neurons in the LSTM hidden layer are respectively responsible for processing different input data. For example, some neurons are responsible for analyzing historical bandwidth, while others are responsible for user viewing habits. The algorithm uses the "gradient descent" logic to find the set of neurons that have the greatest impact on the current error. For example, when there is a sudden network fluctuation, the neurons that process historical bandwidth data are located. Finally, the weight values ​​are precisely adjusted. For the located neurons, the weights are adjusted proportionally to the error magnitude. For example, the weight of neurons corresponding to historical bandwidth data is reduced (from 0.6 to 0.3), while the weight of neurons corresponding to real-time bandwidth data is increased (from 0.2 to 0.5). This allows the LSTM to pay more attention to real-time fluctuation data in subsequent predictions and reduce the interference of historical data.

[0079] Adjust the "emphasis" of LSTM on various types of input data. For example, if it is found that "the reference value of historical bandwidth data decreases when there are sudden network fluctuations", reduce the weight of historical bandwidth data and increase the weight of "real-time bandwidth fluctuations".

[0080] Although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole. The technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.

Claims

1. A method for dynamic control of video playback buffering, characterized in that, include: Step S1: The intelligent decision-making central subsystem receives historical user behavior data and initial preset data, and calls the LSTM prediction model to output the cache consumption demand D_pred and the safe cache threshold MinT_pred within the next 3 seconds. It also calculates the dynamic weight and dynamic rate limit threshold MaxP_dynamic, matches the "scene-parameter" correlation matrix, and sends parameter adjustment instructions to the cache file duration dynamic control and intelligent prediction subsystem and the video player resource download dynamic rate limit and weight allocation subsystem. Step S2: When the user video starts playing signal is received, the intelligent decision-making central subsystem automatically collects the current scene, matches the correlation matrix parameters, and corrects the parameters by combining the prediction results of the LSTM cache demand prediction model. The parameters are then input into the cache file duration dynamic control and intelligent prediction subsystem and the video player resource download dynamic speed limit and weight allocation subsystem through the parameter interface. Step S3: Simultaneously, the intelligent decision-making central subsystem combines the current network status and playback scenario to calculate the initial MaxP_dynamic, and inputs it into the video player resource download dynamic speed limiting and weight allocation subsystem through the parameter interface; Step S4: When a signal of dynamic change in user playback behavior is received, the intelligent decision-making central subsystem adjusts the corresponding parameters and synchronously updates the matching results and predicted parameters of the "scene-parameter" correlation matrix. Step S5: When a signal indicating a change in the user's network status is received, the intelligent decision-making central subsystem adjusts the corresponding parameters and recalculates the dynamic weights and MaxP_dynamic.

2. The video playback buffer dynamic control method according to claim 1, characterized in that: The historical user behavior data includes: the average cache consumption rate V_consume under different network environments, the average single frame data volume and cache loading delay T_delay corresponding to different video resolutions, the cache consumption fluctuation coefficient K_var corresponding to user operation habits, and the cache interruption duration T_switch. The initial preset data includes: the total buffer duration SumT of the player's queue to be played, the maximum buffer duration MaxT, the minimum percentage of the buffer duration to be enabled MinP, and the minimum buffer duration MinT; The initial preset data also includes: the maximum download speed per second baseline parameter maxPreSecondByte, the player's unit time interval start timestamp tcp_read_time, the player's unit time interval cumulative data read size tcp_read_byte, the unit time TCP_TIME_RANGE, and the maximum speed limit baseline parameter MaxP_base; The unit time TCP_TIME_RANGE is 1 second, which is converted to 1,000,000 microseconds.

3. The video playback buffer dynamic control method according to claim 2, characterized in that: The historical user behavior data is categorized and stored according to the dimensions of "user ID-video type-network scenario" to form a training dataset; The LSTM cache demand prediction model receives input features, is trained using a training dataset, outputs the cache consumption demand D_pred within the next 3 seconds, and calculates the safe cache threshold MinT_pred. The input features include: current network status, current playback parameters, and cached duration SumT; The MinT_pred is equal to the minimum cache duration MinT + D_pred × 1.

2. After each playback cycle, the deviation rate Err between the actual cache consumption D_actual and the predicted value D_pred is calculated. If Err > 15%, the weight parameters of the LSTM model are automatically adjusted to correct the LSTM prediction deviation. When SumT≥MaxT, the player suspends the video resource download thread and no longer actively requests new video resources; When SumT is less than MaxT and less than MinT_pred, the player resumes the suspended video resource download thread and starts requesting new video resources. When the player detects that the current SumT < MinT_pred, it starts the download thread in advance and adjusts the download priority according to the predicted D_pred: when D_pred > 5 seconds, the download thread priority is increased to "high" and when D_pred < 2 seconds, the priority is kept to "medium".

4. The video playback buffer dynamic control method according to claim 3, characterized in that: The dynamic weights include three-dimensional weight indicators, namely network bandwidth utilization W1, playback urgency W2, and user experience weight W3. The dynamic rate limiting threshold MaxP_dynamic is calculated using a weighted summation formula: MaxP_dynamic = maxPreSecondByte × (0.3 × W1 + 0.5 × W2 + 0.2 × W3) / 10, and bandwidth is allocated as needed; The video player resource download dynamic speed limit and weight allocation subsystem records the current system timestamp and data size when the player starts requesting data and when the requested video resource data is returned. It also calculates the cumulative download duration T1 and the cumulative download data size D1. When D1≥MaxP_dynamic, it calculates the remaining duration per unit time and performs the next operation accordingly based on the remaining duration per unit time. When a user triggers a report of lag or a fast-forward / rewind signal, the system automatically marks the current weight combination as an optimized sample and adjusts the three-dimensional weight coefficients.

5. The video playback buffer dynamic control method according to claim 1, characterized in that: The "scene-parameter" association matrix uses network type, playback speed, and screen orientation as three-dimensional scene dimensions, and each scene combination corresponds to a unique MaxT and MinP parameter combination.

6. The video playback buffer dynamic control method according to claim 1, characterized in that: When a user simultaneously triggers multiple scene change signals, the cache file duration dynamic control and intelligent prediction subsystem automatically matches the corresponding parameter combination from the correlation matrix. If the scene combination does not exist in the matrix, the interpolation algorithm is started to calculate the parameters.

7. The video playback buffer dynamic control method according to claim 3, characterized in that: The time-difference algorithm is used to automatically adjust the weight parameters of the LSTM model.

8. A dynamic control system for video playback buffering, characterized in that: A system for implementing the video playback buffer dynamic control method according to any one of claims 1-7, comprising: The dynamic control and intelligent prediction subsystem for cached file duration is used to dynamically control the duration of cached files in the video player, set relevant external parameters, and intelligently predict cache requirements. The video player resource download dynamic speed limiting and weight allocation subsystem is used to dynamically control the download speed of video player resources, set corresponding external parameters, and dynamically allocate weights in multiple dimensions. The intelligent decision-making central subsystem is used to call and coordinate the dynamic control and intelligent prediction subsystem for cached file duration, as well as the dynamic speed limiting and weight allocation subsystem for video player resource downloads, and dynamically control video playback caching in a closed loop.

9. The video playback buffer dynamic control system according to claim 8, characterized in that: The cache file duration dynamic control and intelligent prediction subsystem includes: The historical data acquisition submodule is used to record the user's historical playback data in real time; The LSTM cache demand prediction model is used to output the cache consumption demand D_pred and the safe cache threshold MinT_pred within the next 3 seconds based on the data collected by the historical data acquisition submodule and the current playback data. The data statistics submodule is used to analyze the lag rate, bandwidth saving rate, and cache hit rate of various scenario combinations every month, and automatically adjust their parameters and update the correlation matrix based on the lag rate.

10. The video playback buffer dynamic control system according to claim 8, characterized in that: The system also includes a video player, which is connected to several external parameter interfaces for inputting relevant parameters into the system through external setting methods.