US2015363369A1PendingUtilityA1

Method and Apparatus of Processing Nested Fragment Caching of a Web Page

Assignee: ALIBABA GROUP HOLDING LTDPriority: Jul 12, 2010Filed: Aug 25, 2015Published: Dec 17, 2015
Est. expiryJul 12, 2030(~3.9 yrs left)· nominal 20-yr term from priority
H04L 67/02G06F 16/9574G06F 40/131H04L 41/0293G06F 40/186G06F 17/2229G06F 17/248G06F 17/30902H04L 67/2842G06F 17/2247H04L 67/568G06F 40/143
29
PatentIndex Score
0
Cited by
0
References
0
Claims

Abstract

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.

Claims

exact text as granted — not AI-modified
What is claimed is: 
     
         1 . A method of processing nested fragment caching of a web page, the method comprising:
 in response to receiving a request for a web page, obtaining first-level fragment information of the web page;   successively performing a fragment analysis process for first-level fragments based on the first-level fragment information, wherein the fragment analysis process includes rendering the first-level fragments based on predetermined nesting information of the first-level fragments, and wherein the nesting information includes information about whether a current fragment includes other fragments; and   combining results of the fragment analysis process to generate complete content of the first-level fragments of the web page.   
     
     
         2 . The method as recited in  claim 1 , wherein obtaining first-level fragment information of the web page comprises:
 obtaining a Uniform Resource Locator (URL) of the web page;   finding a template of the web page based on the URL of the web page; and   obtaining fragment names and fragment parameters corresponding to the first-level fragments in the template of the web page.   
     
     
         3 . The method as recited in  claim 1 , wherein successively performing a fragment analysis process for first-level fragments based on the first-level fragment information comprises:
 successively obtaining HTML codes and nesting information of the first-level fragments based on fragment names and fragment parameters of the first-level fragments; and   determining whether a first-level fragment includes a second-level fragment based on the nesting information, and if affirmative, recursively rendering the second-level fragment.   
     
     
         4 . The method as recited in  claim 3 , wherein successively obtaining HTML codes and nesting information of the first-level fragments further comprises:
 searching for caching information of the first-level fragment from a configuration server, the caching information including information about whether a fragment should be cached;   determining whether the first-level fragment should be cached based on the caching information, such that
 if affirmative, obtaining a fragment identifier ID of the first-level fragment by performing a hash calculation on a fragment name and a fragment parameter of the first-level fragment, and searching for HTML codes of the first-level fragment that correspond to the fragment ID from a caching system based on the fragment ID; and 
 if not affirmative, searching, by a transaction system of a web server, for the HTML codes that correspond to the fragment ID. 
   
     
     
         5 . The method as recited in  claim 4 , wherein when the first-level fragment and the caching system does not include the HTML codes of the first-level fragment, the method further comprises:
 finding, by the web server, the HTML codes that correspond to the fragment ID; and   caching the found HTML codes and corresponding relationship with the fragment ID in the caching system.   
     
     
         6 . The method as recited in  claim 4 , wherein the caching information further comprises information of caching time duration of the fragment to be cached, and the method further comprises:
 if content of a fragment changes within the caching time duration, obtaining a fragment ID of the changed fragment by performing the hash calculation on a fragment name and a fragment parameter of the changed fragment; and   finding and deleting the HTML codes that correspond to the fragment ID from the caching system based on the fragment ID.   
     
     
         7 . The method as recited in  claim 4 , wherein if a header is to be cached, the method further comprises:
 caching a value of the header that corresponds to the HTML codes of the fragment into the caching system.   
     
     
         8 . The method as recited in  claim 3 , wherein the recursively rendering comprises:
 generating, for a fragment to be processed, a placeholder in a fragment which level is above the fragment to be processed,   obtaining HTML codes of the fragment to be processed based on a fragment name and a fragment parameter of the fragment to be processed, and   replacing the placeholder for the fragment to be processed by the HTML codes of the fragment to be processed.   
     
     
         9 . The method as recited in  claim 3 , wherein successively performing a fragment analysis process further comprises determining whether the second-level fragment includes a third-level fragment, and if affirmative, recursively rendering the third-level fragment until an N-level fragment is determined to include no other fragments, wherein N is an integer greater than three. 
     
     
         10 . A method of processing web page caching, the method comprising:
 receiving a request for a web page;   determining whether to cache the web page;   in an event that the web page is to be cached, directly rendering the web page to obtain content of the web page; and   in an event that the web page is not to be cached, obtaining first-level fragment information of the web page and successively performing a fragment analysis process for first-level fragments based on the first-level fragment information, wherein the fragment analysis process includes:
 rendering the first-level fragments based on preset nesting information of the first-level fragments, the nesting information including information about whether a current fragment includes other fragments; and 
 combining results of the analysis process to generate complete content of the first-level fragments of the web page. 
   
     
     
         11 . The method as recited in  claim 10 , wherein determining whether to cache the web page comprises:
 obtaining a URL of the web page; and   finding preset caching information based on the URL, the caching information including information about whether page caching is appropriate for the web page and information of caching time duration of the web page.   
     
     
         12 . The method as recited in  claim 10 , wherein directly rendering the web page comprises:
 prior to an expiration of the caching time duration, generating a 32-digit web page ID from the URL and a web page parameter of the web page; and   finding corresponding HTML codes from a caching system based on the web page ID.   
     
     
         13 . The method as recited in  claim 12 , wherein if the HTML codes are not found, the method further comprises finding, by a transaction system of a web server, the HTML codes corresponding to the web page ID. 
     
     
         14 . An apparatus for nested fragment caching of a web page, the apparatus comprising:
 an acquisition module configured to obtain first-level fragment information of a web page in response to receiving a request for the web page;   a fragment analysis module configured to perform a fragment analysis process for first-level fragments based on first-level fragment information, wherein the fragment analysis process includes rendering the first-level fragments based on predetermined nesting information of the first-level fragments, and wherein the nesting information includes information about whether a current fragment includes other fragments; and   a combination and assembly module configured to combine rendering results of the rendering to generate complete content of the first-level fragments of the web page.   
     
     
         15 . The apparatus as recited in  claim 14 , wherein the acquisition module is further configured to obtain a Uniform Resource Locator (URL) of the web page and find a template of the web page based on the URL of the web page, the acquisition module obtaining fragment names and fragment parameters corresponding to the first-level fragments in the template of the web page. 
     
     
         16 . The apparatus as recited in  claim 14 , wherein the fragment analysis module is configured to successively obtain HTML codes and nesting information of the first-level fragments based on fragment names and fragment parameters of the first-level fragments and to determine whether a first-level fragment includes a second-level fragment based on the nesting information.

Join the waitlist — get patent alerts

Track US2015363369A1 — get alerts on status changes and closely related new filings.

We store only your email — no account needed. See our privacy policy.