Decoding Task Queue Scheduling for 16 ms Page Rendering
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing page rendering technologies face challenges in maintaining a consistent decoding duration, leading to frame freezing and poor user experience due to decoding tasks taking longer than 16 ms, making it difficult to achieve a frame rate of 60 frames/second.
Innovation Solution
A method is introduced to determine a target decoding task queue by calculating the decoding duration of to-be-loaded content, ensuring the sum of decoding durations is within a threshold, thereby controlling the entire rendering process within 16 ms, using techniques like table lookup or mathematical interpolation, and executing tasks using two threads to improve efficiency.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If decoding tasks are executed without duration control, then complete decoding of all content is achieved, but rendering process exceeds 16 ms threshold causing frame freezing
Solution Approach 1:
The patent segments the decoding task queue into multiple sub-queues based on decoding duration thresholds. By dividing the rendering process into multiple frames, each frame decodes only a portion of the content (e.g., first frame decodes 50% of images, second frame decodes remaining 50%), ensuring each frame's decoding duration stays within 16 ms while ultimately completing full content rendering across multiple frames.
Solution Approach 2:
The patent performs preliminary classification of decoding tasks by duration before execution. The system pre-calculates decoding durations for different content types (images, videos, texts) and organizes them into priority queues in advance. This preliminary organization allows the renderer to select appropriate tasks for each frame to meet the 16 ms threshold, rather than attempting to decode all content in a single frame.
2Productivity
If all decoding tasks are included in one queue, then complete content rendering is achieved, but rendering smoothness deteriorates due to exceeding time threshold
Solution Approach 1:
The patent implements dynamic task queue management where the system continuously monitors decoding progress and adjusts the composition of task queues in real-time. Based on current frame timing and remaining content, the system dynamically determines which decoding tasks to include in the current frame's queue, ensuring adaptive control over rendering speed and frame rate consistency.
Solution Approach 2:
The patent changes the parameter of task queue composition by duration thresholds. Different types of content (images, videos, texts) are assigned different duration weights, and the system adjusts the proportion of each content type in the decoding queue to control overall decoding duration. This parameter-based control allows flexible adjustment between rendering speed and frame rate stability.
3Speed
If decoding duration is reduced to meet 16 ms threshold, then frame rate reaches 60 fps, but incomplete decoding of content occurs
Solution Approach 1:
The patent ensures continuous rendering action across multiple frames. Rather than completing all decoding in one frame, the system maintains continuous rendering by decoding different portions of content in successive frames. The first frame renders initial content, the second frame renders additional content, creating a continuous rendering flow that achieves both high frame rate and complete content display over time.
Solution Approach 2:
The patent implements periodic content decoding across frame cycles. Content decoding is distributed periodically across multiple frame periods, with each frame responsible for decoding a specific portion of the total content. This periodic distribution ensures that while no single frame exceeds 16 ms, the cumulative effect across multiple frames achieves complete content rendering.
Data Source
AI summary
A method for determining a decoding task and an apparatus are disclosed. The method includes: obtaining to-be-loaded content of a to-be-rendered page; obtaining a decoding duration of the to-be-loaded content; determining a target decoding task queue based on the decoding duration of the to-be-loaded content, where a sum of decoding durations of decoding tasks included in the target decoding task queue is less than a threshold; and executing the decoding tasks included in the target decoding task queue. According to the method, a consumed time of an entire rendering process can be made to be within an expected range, for example, within 16 ms, thereby effectively improving page rendering smoothness and improving user experience.


