Nested Fragment Caching Recursive HTML Rendering
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing technologies fail to effectively handle nested fragment caching of web pages, where fragments have recursive relationships, leading to incomplete content rendering and inefficient caching systems.
Innovation Solution
A method and apparatus for processing nested fragment caching, which involves obtaining first-level fragment information, performing fragment analysis based on nesting information, and recursively rendering HTML codes to generate complete content, allowing for flexible caching and storage across a distributed server cluster.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If fragment caching is used to divide web pages into multiple fragments, then caching efficiency is improved, but existing technology fails to support nested fragment caching scenarios
Solution Approach 1:
The patent implements nested fragment caching by allowing fragments to contain other fragments within them. The system parses HTML documents to identify nested fragment relationships, where a parent fragment can encapsulate child fragments. This enables the caching system to handle complex nested structures where fragment A may include fragment B, and fragment B may include fragment C, resolving the limitation of existing technology that cannot support such nested scenarios.
2Reliability
If recursive rendering is implemented for nested fragments, then complete content display is achieved, but system complexity increases
Solution Approach 1:
The patent applies preliminary action by pre-parsing HTML documents to identify all fragment relationships and nesting structures before actual rendering occurs. The system builds a fragment relationship map that stores parent-child relationships and nesting information in advance. When rendering is needed, the system simply follows the pre-established relationships rather than dynamically analyzing the document structure, thereby reducing system complexity while ensuring complete content display.
Solution Approach 2:
The patent introduces an intermediary fragment relationship map that mediates between the HTML document structure and the rendering process. This intermediary data structure stores pre-analyzed fragment relationships, acting as a bridge that simplifies the rendering process. Instead of directly handling complex nested fragment relationships during rendering, the system uses this intermediary map to guide the recursive rendering process, reducing complexity while maintaining content completeness.
3Adaptability or versatility
If different cache times are set for each fragment, then caching flexibility is improved, but management complexity increases
Solution Approach 1:
The patent applies segmentation by allowing different cache times to be set for different fragments independently. Each fragment can have its own cache duration parameter, enabling fine-grained control over caching behavior. The system manages these individual cache times through the fragment relationship map, which stores caching parameters for each fragment. This segmentation approach provides caching flexibility while managing complexity through structured data organization.
Data Source
Figure 1
Figure 2
Figure 3
AI summary
Nested fragment caching of web pages is described. In response to receiving a request for a web page, first-level fragment information of the web page is obtained. Based on the first-level fragment information, a fragment analysis process is successively performed for first-level fragments, wherein the fragment analysis process includes rendering the first-level fragments based on preset nesting information of the first-level fragments. The nesting information includes information about whether a current fragment includes other fragments. Results of the fragment analysis process are combined to generate complete content of the first-level fragments of the web page. The exemplary embodiments of the present disclosure not only allow nested fragment caching of a web page, but also recursively obtain HTML codes of each fragment when nested fragment caching of the web page is performed, thus displaying complete content of the web page to a user.