CN103116609A - Server, client-side, system and method of achieving page load of browser - Google Patents
Server, client-side, system and method of achieving page load of browser Download PDFInfo
- Publication number
- CN103116609A CN103116609A CN2013100201133A CN201310020113A CN103116609A CN 103116609 A CN103116609 A CN 103116609A CN 2013100201133 A CN2013100201133 A CN 2013100201133A CN 201310020113 A CN201310020113 A CN 201310020113A CN 103116609 A CN103116609 A CN 103116609A
- Authority
- CN
- China
- Prior art keywords
- page
- client
- link
- text
- browsing
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- Information Transfer Between Computers (AREA)
Abstract
The invention relates to the field of network data communication and discloses a server, a client-side, a system and a method of achieving page load of a browser. The server comprises a script injection module, a text extracting module, a memory module and a communication module. After the script injection module receives a request of loading an original page sent by the client-side, the script injection module injects a text load script to the original page sent to the client-side. The text extracting module is suitable for analyzing keywords which are used for expressing mutual relation of texts between the pages from pages browsed by the client-side at present. Interlinkage corresponding to the keywords is extracted. The pages corresponding to the interlinkage are downloaded from a website. The texts of the pages are extracted and stored in the memory module. The memory module is suitable for storing the extracted texts. The communication module is suitable for receiving requests of the pages of the interlinkage corresponding to the loading keywords sent by the client-side and sending the texts corresponding to the interlinkage stored in the memory module to the client-side. The server, the client-side, the system and the method of achieving the page load of the browser is capable of solving the technical problems that useless download traffic is caused in the client-side and network traffic is wasted.
Description
Technical field
The present invention relates to the network data communication field, be specifically related to a kind of server, client, system and method for realizing that in browser, the page loads.
Background technology
In prior art, link in browsing pages according to browser, the behavior of browsing after the user is predicted, for in the page might after clicked link all download in advance, the mode of downloading in advance by pages that these links are corresponding promotes the loading velocity of the page in browser.But, do not have in browsing in the page after most being linked at clicked, although therefore adopt prior art can accelerate the speed of browsing pages,, produce a large amount of useless downloading flow in client, wasted the network traffics of client.
Summary of the invention
In view of the above problems, the present invention has been proposed in order to a kind of server, client, system and method for realizing page loading in browser that overcomes the problems referred to above or address the above problem at least in part is provided.
According to one aspect of the present invention, a kind of server of realizing that in browser, the page loads is provided, this server comprises:
The script injection module is suitable for injecting the text loading scripts, the page of browsing when described parent page is the initial access website in the parent page that sends to client after the request of the loading parent page that receives the client transmission;
The text extraction module, be suitable for parsing the key word for the mutual relationship of text between representation page from the current page of browsing of client, extract link corresponding to key word, download the page corresponding to described link from the website, extract text in the page of downloading, the text that extracts is stored in memory module;
Memory module is suitable for storing the text of extraction;
Communication module, be suitable for receiving the request of the page of link corresponding to loading key word that client sends, text corresponding to this link of storing in memory module sent to client, client is added to this text in the text of the current page of browsing by the text loading scripts.
Alternatively, described script injection module, also be suitable for injecting internal memory in the parent page that sends to client and discharge script, so that client is after receiving the instruction that loads link corresponding to key word, judge whether the shared internal memory of the current page of browsing surpasses pre-set threshold value, if surpass, discharge the shared internal memory of text of browsing before in this page.
Alternatively, described script injection module, also be suitable for injecting label reading function script and/or page selection function script in the parent page that sends to client, so that client is added the label reading function key and/or selected page function key in the current page of browsing.
Alternatively, described text extraction module is further adapted for according to page structure in page affiliated web site and extracts text from the page of downloading.
Alternatively, described text extraction module, the text that is further adapted for extracting compresses processing, and the compressed package that generates is stored in memory module.
Alternatively, described server also comprises:
Page prestrain module, be suitable for extracting link corresponding to non-keyword in the current page of browsing of client, download the page corresponding to described link from the website, the page of downloading is compressed processing, generate page compressed package corresponding to link, store this page compressed package into memory module, described non-keyword is corresponding is linked as the link except link corresponding to key word in the page;
Described memory module also is suitable for the memory page compressed package;
Described communication module also is suitable for receiving the request of link corresponding to non-keyword in the current page of browsing of loading that client sends, and the page compressed package that links correspondence in this request in memory module is sent to client.
Alternatively, described server also comprises:
The storage update module, be suitable for sending to that in the page compressed package of client, the page is the current page of browsing of client, link corresponding to the non-keyword that this current page of browsing the is comprised Link Ratio corresponding with the page compressed package of having stored, according to the page compressed package of comparative result updated stored.
Alternatively, described storage update module is further adapted for for not by this current link that the page comprised of browsing, and the page compressed package of this link correspondence is deleted from memory module; There is no link corresponding to stored non-keyword for that comprise in this current page of browsing and corresponding page compressed package, download the page corresponding to this link from the website, the page of downloading is compressed processing, generate page compressed package corresponding to this link, this page compressed package is stored in memory module.
According to an aspect of the present invention, provide a kind of client that realizes that in browser, the page loads, this client comprises:
Request sending module, be suitable for after receiving the instruction that loads original web page, send the request that loads parent page to server, the page of browsing when described parent page is the initial access website, and after receiving link instruction corresponding to loading key word, send the request of the page that loads link corresponding to key word to server;
Page load-on module, be suitable for the parent page that is injected with the text loading scripts that reception server sends, load this parent page, and text in the page of link corresponding to the key word that sends of reception server, by the text loading scripts, this text is added in the text of the current page of browsing.
Alternatively, also be injected with internal memory in described parent page and discharge script;
Described page load-on module, also be suitable for after the instruction that receives the page that loads link corresponding to key word, discharge script by internal memory and judge that whether the shared internal memory of the current page of browsing surpasses pre-set threshold value, if surpass, discharges the shared internal memory of text of browsing before in this page.
Alternatively, also be injected with label reading function script and/or page selection function script in described parent page,
Described page load-on module also is suitable for by label reading function script and/or page selection function script, adds the label reading function key and/or select page function key in the current page of browsing.
Alternatively, described client also comprises: decompression module is suitable for page compressed package is decompressed;
The described request sending module also is suitable for after receiving the instruction that loads link corresponding to non-keyword, sends the request of the page that loads link corresponding to non-keyword in the current page of browsing to server; Described non-keyword is corresponding is linked as the link except link corresponding to key word in the page;
Described page load-on module also is suitable for page compressed package corresponding to link in instruction that reception server sends, and the indication decompression module decompresses this page compressed package, loads the page in this page compressed package.
According to another aspect of the present invention, provide a kind of system that realizes that in browser, the page loads, this system comprises described server, and described client.
According to another aspect of the present invention, provide a kind of method that realizes that in browser, the page loads, the method comprises:
After the request of the loading parent page that receives the client transmission, inject the text loading scripts, the page of browsing when described parent page is the initial access website in the parent page that sends to client;
Parse the key word for the mutual relationship of text between representation page from the current page of browsing of client, extract link corresponding to key word, download the page corresponding to described link from the website, extract text in the page of downloading, the text that storage is extracted;
After the request of link corresponding to the loading key word that receives the client transmission, the text that extracts is sent to client, client is added to this text in the text of the current page of browsing by the text loading scripts.
Alternatively, described method also comprises:
Inject internal memory release script in the parent page that sends to client, so that client is after receiving the instruction that loads link corresponding to key word, judge whether the shared internal memory of the current page of browsing surpasses pre-set threshold value, if surpass, discharge the shared internal memory of text of browsing before in this page.
Alternatively, described method also comprises:
Inject label reading function script and/or page selection function script in the parent page that sends to client, so that client is added the label reading function key and/or selected page function key in the current page of browsing.
Alternatively, in the page of described extraction download, text further comprises:
Extract text according to page structure in page affiliated web site from the page of downloading.
Alternatively, the text of described storage extraction further comprises:
The text that extracts is compressed processing, the compressed package that storage generates.
Alternatively, described method also comprises:
Extract link corresponding to non-keyword in the current page of browsing of client, download the page corresponding to described link from the website, the page of downloading is compressed processing, generate page compressed package corresponding to link, store this page compressed package, described non-keyword is corresponding is linked as link except link corresponding to key word;
After the request of link corresponding to non-keyword in the current page of browsing of loading that receives the client transmission, page compressed package corresponding to link in this request sent to client.
Alternatively, described method also comprises:
The page that the page is browsed as client is current in the page compressed package that sends to client, link corresponding to the non-keyword that this current page of browsing the is comprised Link Ratio corresponding with the page compressed package of having stored, according to the page compressed package of comparative result updated stored.
Alternatively, described page compressed package according to the comparative result updated stored further comprises:
For not by this current link that the page comprised of browsing, the page compressed package of this link correspondence is deleted;
There is no link corresponding to stored non-keyword for that comprise in this current page of browsing and corresponding page compressed package, download the page corresponding to this link from the website, the page of downloading is compressed processing, generate page compressed package corresponding to this link, store this page compressed package.
According to technical scheme of the present invention, after the request of the loading parent page that receives the client transmission, inject the text loading scripts in the parent page that sends to client, parse the key word for the mutual relationship of text between representation page from the current page of browsing of client, extract link corresponding to key word, download the page corresponding to described link from the website, extract text in the page of downloading, the text that storage is extracted; After the request of link corresponding to the loading key word that receives the client transmission, the text that extracts is sent to client, client is added to this text in the text of the current page of browsing by the text loading scripts.
Adopt technical scheme in the present invention, connect the corresponding page for key word, only extract wherein text, text is handed down to client, by inject the mode of text loading scripts in parent page, client is added to this text in the current page of browsing.Because the text that issues extracts in advance, therefore can improve the speed of browsing pages, issue simultaneously content only for body matter, reduced the data volume that issues, reduce client browsing page network traffics used.Solved thus in client and caused a large amount of useless downloading flow, the problem of waste network traffics has obtained and can either accelerate in client surfing and can save the beneficial effect of the network traffics of client again.
Above-mentioned explanation is only the general introduction of technical solution of the present invention, for can clearer understanding technological means of the present invention, and can be implemented according to the content of instructions, and for above and other objects of the present invention, feature and advantage can be become apparent, below especially exemplified by the specific embodiment of the present invention.
Description of drawings
By reading hereinafter detailed description of the preferred embodiment, various other advantage and benefits will become cheer and bright for those of ordinary skills.Accompanying drawing only is used for the purpose of preferred implementation is shown, and does not think limitation of the present invention.And in whole accompanying drawing, represent identical parts with identical reference symbol.In the accompanying drawings:
Fig. 1 shows the structural drawing of the server of realizing that according to an embodiment of the invention in browser, the page loads;
Fig. 2 shows the schematic diagram of three related web pages that client according to an embodiment of the invention browses in advance;
Fig. 3 shows the schematic diagram of completing the complete page after text adds in client according to an embodiment of the invention;
Fig. 4 shows the structural drawing of the server of realizing that according to an embodiment of the invention in browser, the page loads;
Fig. 5 shows the schematic diagram of the current page of browsing of client according to an embodiment of the invention;
Fig. 6 shows the structural drawing of the server of realizing that according to an embodiment of the invention in browser, the page loads;
Fig. 7 shows the schematic diagram of the page that upgrades after client link clicks according to an embodiment of the invention;
Fig. 8 shows the structural drawing of the client that realizes that according to an embodiment of the invention in browser, the page loads;
Fig. 9 shows the structural drawing of the client that realizes that according to an embodiment of the invention in browser, the page loads;
Figure 10 shows the structural drawing of the system that realizes that according to an embodiment of the invention in browser, the page loads;
Figure 11 shows the process flow diagram of the method that realizes that according to an embodiment of the invention in browser, the page loads; And
Figure 12 shows the process flow diagram of the method that corresponding link is processed for non-keyword in the page according to an embodiment of the invention.
Embodiment
Exemplary embodiment of the present disclosure is described below with reference to accompanying drawings in more detail.Although shown exemplary embodiment of the present disclosure in accompanying drawing, yet should be appreciated that and to realize the disclosure and the embodiment that should do not set forth limits here with various forms.On the contrary, it is in order to understand the disclosure more thoroughly that these embodiment are provided, and can with the scope of the present disclosure complete convey to those skilled in the art.
Referring to Fig. 1, show the structural drawing of the server of realizing that according to an embodiment of the invention in browser, the page loads.Server 100 comprises: script injection module 110, text extraction module 120, memory module 140 and communication module 130.
For further saving network traffics, text extraction module 120 can compress processing to the text that extracts, and the compressed package that generates is stored in memory module 140.Communication module 130 is after the request of the page of link corresponding to the loading key word that receives client 200 transmissions, and the compressed package of the text that this link of storage in memory module 140 is corresponding sends to client 200.
Fig. 2 shows the schematic diagram of three related web pages that client according to an embodiment of the invention browses in advance.In Fig. 2, three webpages are the 1st page, the 2nd page, the 3rd page of one piece of article, and body matter is merged into one piece of complete article in three pages.In Fig. 2, square frame institute frame is partly key word.
Key word is used for the mutual relationship of text between representation page, and for example, key word can be " page up ", " lower one page ", " X page " etc.The key word that marks in Fig. 2 only is exemplary illustration, and in the present invention, key word is not limited to this.
At first, script injection module 110 is in the loading parent page that receives client 200 and send, namely the 1st page, request after, inject the text loading scripts in the parent page that sends to client 200.Client 200 can be added the text that receives in the text of the current page of browsing to by this text loading scripts.
After completing the 1st page browsing, the down sliding page, client 200 receives the instruction that loads the page of the corresponding link of key word " lower one page " in the current page of browsing, and sends the request of the page that loads link corresponding to key word " lower one page ".Communication module 130 receives request, will link " lower one page ", and namely the 2nd page, in the corresponding page, text sends to client 200.Client 200 is added text in the text of the current page of browsing to by the text loading scripts.And, after client 200 receives the 2nd page of text, automatically the page number in " lower one page " corresponding link is added 1, make " lower one page " corresponding the 3rd page.After completing the 2nd page browsing, down sliding, client 200 is text from server 100 obtains the 3rd page, by the text loading scripts, text in the 3rd page is added in the text of the current page of browsing.After completing the text interpolation in client 200, complete page looks like shown in Figure 3.
Further, text extraction module 120 extracts text according to page structure in page affiliated web site from the page of downloading.Take three pages shown in Figure 2 as example, by analysis as can be known, all comprise in the html of three pages " Text ", and three pages comprise " page up " or " lower one page ".Can determine thus to have association between three pages, and all include text.As mentioned above, text extraction module 120 is by inquiring about in the html of the page, find the 3rd<div〉label is right<div class=" w1Text " ...</div〉in have " Text ", determine the 3rd<div〉label centering comprise be text, extract this text.
Further, script injection module 110, also be suitable for injecting internal memory in the parent page that sends to client 200 and discharge script, so that client 200 is after receiving the instruction that loads link corresponding to key word, judge whether the shared internal memory of the current page of browsing surpasses pre-set threshold value, if surpass, discharge the shared internal memory of text of browsing before in this page.
For example, in internal memory release script, content is:
parent.removeChild(e);
e=null;
delete?e
After completing the 2nd page browsing, the down sliding page, client 200 receives the instruction of the page that loads the corresponding link of key word " lower one page ".Client 200 judges that whether the shared internal memory of the current page of browsing surpasses pre-set threshold value, if surpass, discharges the shared internal memory of text in the 1st page and/or the 2nd page.
Therefore, discharge script by inject internal memory in the parent page that sends to client, solve the problem that too much causes internal memory to overflow due to the text that adds, obtained the beneficial effect that prevents that internal memory from overflowing.
Further, script injection module 110, also be suitable for injecting label reading function script and/or page selection function script in the parent page that sends to client 200, so that client 200 is added the label reading function key and/or selected page function key in the current page of browsing.
At this, by the mode of function of injecting script in parent page, can add function key in the page of client 200, reach thus the beneficial effect of function in the expansion page.
Referring to Fig. 4, show the structural drawing of the server of realizing that according to an embodiment of the invention in browser, the page loads.In this embodiment, server 100 except comprising script injection module 110, text extraction module 120, memory module 140 and communication module 130, also comprises page prestrain module 150.
Described non-keyword is corresponding is linked as the link except link corresponding to key word in the page;
Referring to Fig. 5, show the schematic diagram of the current page of browsing of client according to an embodiment of the invention.Take the page shown in Fig. 5 as example, embodiment is illustrated.
Include link at this page: " login ", " registration ", " homepage ", " science and technology ", " IT ", " internet ", " world ", " page up " etc.Wherein, " page up " is link corresponding to key word, and remaining is link corresponding to non-keyword.Page prestrain module 150 is extracted and is comprised link corresponding to non-keyword in this page.Obtain the page browsed from server 100 due to client 200, so server 100 can be known the current page of browsing of client 200.Page prestrain module 150 is downloaded the page corresponding to the corresponding link of each non-keyword from each website.The page of 150 pairs of downloads of page prestrain module compresses processing, generates page compressed package corresponding to link, stores page compressed package into memory module 140.Memory module 140 can be the internal memory of server 100, wherein page compressed package corresponding to storage link.After link corresponding to certain non-keyword in the page was clicked, client 200 will send the request of the page that loads this clicked link.Communication module 130 receives the request that client 200 sends, and in asking, page compressed package corresponding to link sends to client 200.Thus, client 200 obtains the page compressed package of the link correspondence of click, decompresses this compressed package rear at client 200 these pages of demonstration.
In the present embodiment, server can be Cloud Server, and in the page that this Cloud Server is browsed each client, the page corresponding to link carries out unified download and preservation, and this page is compressed into compressed package.Because the reason such as link clicks, the actual generation downloaded when needing in client, and the compressed package of correspondence is handed down to client.Thus, the compressed data packets of link corresponding to non-keyword can be provided to client, improve the speed of the page of browsing link corresponding to non-keyword, obtained and to have accelerated in client surfing and can save the network traffics of client again, reduced the beneficial effect of the work load of client.
Referring to Fig. 6, show the structural drawing of the server of realizing that according to an embodiment of the invention in browser, the page loads.In this embodiment, server 100 except comprising script injection module 110, text extraction module 120, memory module 140, communication module 130 and page prestrain module 150, also comprises storage update module 160.
Storage update module 160, be suitable for sending to that in the page compressed package of client 200, the page is the current page of browsing of client 200, link corresponding to the non-keyword that this current page of browsing the is comprised Link Ratio corresponding with the page compressed package of having stored, according to the page compressed package of comparative result updated stored.
Further, storage update module 160 is deleted the page compressed package of this link correspondence for not by this current link that the page comprised of browsing from memory module 140; There is no link corresponding to stored non-keyword for that comprise in this current page of browsing and corresponding page compressed package, download the page corresponding to this link from the website, the page of downloading is compressed processing, generate page compressed package corresponding to this link, this page compressed package is stored in memory module 140.
Referring to Fig. 7, show the page that upgrades after client link clicks according to an embodiment of the invention.Take the page that upgrades after link " world " shown in Figure 7 as example, carry out exemplary illustration in client link clicks Fig. 5.Comprise link in this page: " login ", " registration ", " homepage ", " science and technology ", " IT ", " internet ", " world ", and the news item link, such as: " 4 reasons that Baidu's share price next week is high ", " Amazon claims Kindlefire to set a record " etc.
The link that storage update module 160 comprises this page Link Ratio corresponding with the page compressed package of having stored.Wherein, " login ", " registration ", " homepage ", " science and technology ", " IT ", " internet ", " world " page after by this renewal comprises, and page compressed package corresponding to these links is stored, so page compressed package corresponding to these links still is stored, and do not change.Do not comprise link " page up " in the page after this renewal, therefore, text or text compressed bag that " page up " is corresponding are deleted from memory module 140.Page compressed package corresponding to news item link that comprises in the page after this renewal is not stored module 140 storages, therefore download the page corresponding to news item link from the website, the page of downloading is compressed processing, generate page compressed package corresponding to this link, this page compressed package is stored in memory module 140.
Therefore, when changing by the page of browsing in client, the page compressed package of the link correspondence of corresponding updated stored, make page compressed package useful in the page compressed package of having stored be retained, only increase and change page compressed package corresponding to newly-increased link in the rear page, therefore can further reduce the network traffics of server end, and server carries out the work load of page compression.
Fig. 8 shows the structural drawing of the client that realizes that according to an embodiment of the invention in browser, the page loads.This client 200 comprises: request sending module 210 and page load-on module 220.
Request sending module 210, be suitable for after receiving the instruction that loads original web page, send to server 100 request that loads parent page, the page of browsing when described parent page is the initial access website, and after receiving link instruction corresponding to loading key word, send the request of the page that loads link corresponding to key words to server 100.
Page load-on module 220, be suitable for the parent page that is injected with the text loading scripts that reception server 100 sends, load this parent page, and text in the page of link corresponding to the key word that sends of reception server 100, by the text loading scripts, this text is added in the text of the current page of browsing.
Because the text that issues extracts in advance, therefore can improve the speed of browsing pages, issue simultaneously content only for body matter, reduced the data volume that issues, reduce client browsing page network traffics used.
Further, also be injected with internal memory in parent page and discharge script.
Page load-on module 220, also be suitable for after the instruction that receives the page that loads link corresponding to key word, discharge script by internal memory and judge that whether the shared internal memory of the current page of browsing surpasses pre-set threshold value, if surpass, discharges the shared internal memory of text of browsing before in this page.
Inject internal memory release script in parent page by carrying out, solve the problem that too much causes internal memory to overflow due to the text that adds, reached the beneficial effect that prevents that internal memory from overflowing.
Further, also be injected with label reading function script and/or page selection function script in parent page.
Page load-on module 220 also is suitable for by label reading function script and/or page selection function script, adds the label reading function key and/or select page function key in the current page of browsing.
By the mode of function of injecting script in parent page, can add function key in the page of client, reach thus the beneficial effect of function in the expansion page.
Fig. 9 shows the structural drawing of the client that realizes that according to an embodiment of the invention in browser, the page loads.This client 200 is except comprising that request sending module 210 and page load-on module 220 are also to comprise decompression module 230.
Decompression module 230 is suitable for page compressed package is decompressed;
Request sending module 210 also is suitable for after receiving the instruction that loads link corresponding to non-keyword, sends the request of the page that loads link corresponding to non-keyword in the current pages of browsing to server 100; Described non-keyword is corresponding is linked as the link except link corresponding to key word in the page;
Page load-on module 220 also is suitable for page compressed package corresponding to link in instruction that reception server 100 sends, and indication decompression module 230 decompresses this page compressed package, loads the page in this page compressed package.
In embodiment, client only receives the page compressed package of the link correspondence that will browse, do not need the page of all-links in the page is all done pre-download, on the other hand, generated in advance page compressed package at server side, by download this page compressed package from server side, can improve surfing.Therefore, further obtained and to have accelerated in client surfing and can save the network traffics of client again, reduced the beneficial effect of the work load of client.
Referring to Figure 10, show the structural drawing of the system that realizes that according to an embodiment of the invention in browser, the page loads.System comprises aforementioned server 100, and a plurality of aforementioned client 200.Server 100 is connected with client and can be directly connected also and can connect by network, is not particularly limited at this.
Referring to Figure 11, show the process flow diagram of the method that realizes that according to an embodiment of the invention in browser, the page loads.The method comprises the steps.
Step S1110 after the request of the loading parent page that receives the client transmission, injects the text loading scripts in the parent page that sends to client.The page of browsing when parent page is the initial access website;
Step S1120, parse the key word for the mutual relationship of text between representation page from the current page of browsing of client, extract link corresponding to key word, download the page corresponding to described link from the website, extract text in the page of downloading, the text that storage is extracted.
Step S1130 after the request of link corresponding to the loading key word that receives the client transmission, sends to client with the text that extracts, and client is added to this text in the text of the current page of browsing by the text loading scripts.
For further saving network traffics, in step S1120, can compress processing to the text that extracts, the compressed package that storage generates.In step S1130, after receiving the request of the page of link corresponding to loading key word that client sends, the compressed package of the text of this link correspondence of storage is sent to client.
Three related web pages browsing in advance take the client shown in Fig. 2 carry out exemplary illustration as example.In Fig. 2, three webpages are the 1st page, the 2nd page, the 3rd page of one piece of article, and body matter is merged into one piece of complete article in three pages.In Fig. 2, square frame institute frame is partly key word.
Key word is used for the mutual relationship of text between representation page, and for example, key word can be " page up ", " lower one page ", " X page " etc.The key word that marks in Fig. 2 only is exemplary illustration, and in the present invention, key word is not limited to this.
At first, in step S1110, in the loading parent page that receives client and send, namely the 1st page, request after, inject the text loading scripts in the parent page that sends to client.Client can be added the text that receives in the text of the current page of browsing to by this text loading scripts.
In step S1120, for link corresponding to key word " lower one page " in current the 1st page of browsing of client 200, download the page corresponding to this link from the website, extract text in the page of this link correspondence, i.e. text in the 2nd page.Particularly, by inquiring about, find the 3rd<div in the html of the 2nd page〉label is right<div class=" w1 Text " ...</div〉in have " Text ", determine the 3rd<div〉label centering comprise be text, extract this text.
After completing the 1st page browsing, the down sliding page, client send the request of the page that loads link corresponding to key word " lower one page " to the instruction that loads the page of the corresponding link of key word " lower one page " in the current page of browsing.In step S1130, receive request, will link " lower one page ", namely the 2nd page, in the corresponding page, text sends to client.Client is added text in the text of the current page of browsing to by the text loading scripts.
And, after 2 pages of texts of client to the, automatically the page number in " lower one page " corresponding link is added 1, make " lower one page " corresponding the 3rd page.After completing the 2nd page browsing, down sliding, text during client obtains the 3rd page adds text in the 3rd page in the text of the current page of browsing to by the text loading scripts.After completing the text interpolation in client, complete page looks like shown in Figure 3.
Further, extract text according to page structure in page affiliated web site from the page of downloading in step S1120.Take three pages shown in Figure 2 as example, by analysis as can be known, all comprise in the html of three pages " Text ", and three pages comprise " page up " or " lower one page ".Can determine thus to have association between three pages, and all include text.As mentioned above, by inquiring about, find the 3rd<div in the html of the page〉label is right<div class=" w1 Text " ...</div〉in have " Text ", determine the 3rd<div〉label centering comprise be text, extract this text.
Further, method also comprises: inject internal memory release script in the parent page that sends to client, so that client is after receiving the instruction that loads link corresponding to key word, judge whether the shared internal memory of the current page of browsing surpasses pre-set threshold value, if surpass, discharge the shared internal memory of text of browsing before in this page.
For example, in internal memory release script, content is:
parent.removeChild(e);
e=null;
delete?e
After completing the 2nd page browsing, the down sliding page, client is to the instruction of the page that loads the corresponding link of key word " lower one page ".Client judges that whether the shared internal memory of the current page of browsing surpasses pre-set threshold value, if surpass, discharges the shared internal memory of text in the 1st page and/or the 2nd page.
Therefore, discharge script by inject internal memory in the parent page that sends to client, solve the problem that too much causes internal memory to overflow due to the text that adds, obtained the beneficial effect that prevents that internal memory from overflowing.
Further, method also comprises: inject label reading function script and/or page selection function script in the parent page that sends to client, so that client is added the label reading function key and/or selected page function key in the current page of browsing.
At this, by the mode of function of injecting script in parent page, can add function key in the page of client, reach thus the beneficial effect of function in the expansion page.
Referring to Figure 12, show the process flow diagram of the method that corresponding link is processed for non-keyword in the page according to an embodiment of the invention.In this embodiment, method is except comprising that step S1110 to step S1130, also comprises the steps.
Step S1210 extracts link corresponding to non-keyword in the current page of browsing of client, downloads the page corresponding to described link from the website.Described non-keyword is corresponding is linked as link except link corresponding to key word.
Step S1220 compresses processing to the page of downloading, and generates page compressed package corresponding to link, stores this page compressed package.
Step S1230 after the request of link corresponding to non-keyword in the current page of browsing of loading that receives the client transmission, sends to client with page compressed package corresponding to link in this request.
Take the page shown in Fig. 5 as example, embodiment is illustrated.
Include link at this page: " login ", " registration ", " homepage ", " science and technology ", " IT ", " internet ", " world ", " page up " etc.Wherein, " page up " is link corresponding to key word, and remaining is link corresponding to non-keyword.In step S1210, extract and comprise link corresponding to non-keyword in this page.Obtain the page browse from server due to client, so server can be known the current page of browsing of client.And, download the page corresponding to the corresponding link of each non-keyword from each website.In step S1220, the page of downloading is compressed processing, generate page compressed package corresponding to link, the memory page compressed package.After link corresponding to certain non-keyword in the page was clicked, client will send the request of the page that loads this clicked link.In step S1230, receive the request that client sends, and in asking, page compressed package corresponding to link sends to client.Thus, client obtains the page compressed package of the link correspondence of click, will show this page in client 2 after this compressed package decompression.
In the page of in the present embodiment, each client being browsed, the page corresponding to link carries out unified download and preservation, and this page is compressed into compressed package.Because the reason such as link clicks, the actual generation downloaded when needing in client, and the compressed package of correspondence is handed down to client.Thus, the compressed data packets of link corresponding to non-keyword can be provided to client, improve the speed of the page of browsing link corresponding to non-keyword, obtained and to have accelerated in client surfing and can save the network traffics of client again, reduced the beneficial effect of the work load of client.
In one embodiment, method also comprises: the page that the page is browsed as client is current in the page compressed package that sends to client, link corresponding to the non-keyword that this current page of browsing the is comprised Link Ratio corresponding with the page compressed package of having stored, according to the page compressed package of comparative result updated stored.
Further, for not by this current link that the page comprised of browsing, the page compressed package of this link correspondence is deleted;
There is no link corresponding to stored non-keyword for that comprise in this current page of browsing and corresponding page compressed package, download the page corresponding to this link from the website, the page of downloading is compressed processing, generate page compressed package corresponding to this link, store this page compressed package.
Take the page that upgrades after link " world " shown in Figure 7 as example, carry out exemplary illustration in client link clicks Fig. 5.Comprise link in this page: " login ", " registration ", " homepage ", " science and technology ", " IT ", " internet ", " world ", and the news item link, such as: " 4 reasons that Baidu's share price next week is high ", " Amazon claims Kindlefire to set a record " etc.
The link that this page the is comprised Link Ratio corresponding with the page compressed package of having stored.Wherein, " login ", " registration ", " homepage ", " science and technology ", " IT ", " internet ", " world " page after by this renewal comprises, and page compressed package corresponding to these links is stored, so page compressed package corresponding to these links still is stored, and do not change.Do not comprise link " page up " in the page after this renewal, therefore, the text that " page up " is corresponding or the deletion of text compressed bag.Page compressed package corresponding to news item link that comprises in the page after this renewal is not stored, therefore download the page corresponding to news item link from the website, the page of downloading is compressed processing, generate page compressed package corresponding to this link, store this page compressed package.
Therefore, when changing by the page of browsing in client, the page compressed package of the link correspondence of corresponding updated stored, make page compressed package useful in the page compressed package of having stored be retained, only increase and change page compressed package corresponding to newly-increased link in the rear page, therefore can further reduce the network traffics of server end, and server carries out the work load of page compression.
Intrinsic not relevant to any certain computer, virtual system or miscellaneous equipment with demonstration at this algorithm that provides.Various general-purpose systems also can with based on using together with this teaching.According to top description, it is apparent constructing the desired structure of this type systematic.In addition, the present invention is not also for any certain programmed language.Should be understood that and to utilize various programming languages to realize content of the present invention described here, and the top description that language-specific is done is in order to disclose preferred forms of the present invention.
In the instructions that provides herein, a large amount of details have been described.Yet, can understand, embodiments of the invention can be in the situation that do not have these details to put into practice.In some instances, be not shown specifically known method, structure and technology, so that not fuzzy understanding of this description.
Similarly, be to be understood that, in order to simplify the disclosure and to help to understand one or more in each inventive aspect, in the description to exemplary embodiment of the present invention, each feature of the present invention is grouped together in single embodiment, figure or the description to it sometimes in the above.Yet the method for the disclosure should be construed to the following intention of reflection: namely the present invention for required protection requires the more feature of feature clearly put down in writing than institute in each claim.Or rather, as following claims reflected, inventive aspect was to be less than all features of the disclosed single embodiment in front.Therefore, follow claims of embodiment and incorporate clearly thus this embodiment into, wherein each claim itself is as independent embodiment of the present invention.
Those skilled in the art are appreciated that and can adaptively change and they are arranged in one or more equipment different from this embodiment the module in the equipment in embodiment.Can be combined into a module or unit or assembly to the module in embodiment or unit or assembly, and can put them into a plurality of submodules or subelement or sub-component in addition.At least some in such feature and/or process or unit are mutually repelling, and can adopt any combination to disclosed all features in this instructions (comprising claim, summary and the accompanying drawing followed) and so all processes or the unit of disclosed any method or equipment make up.Unless clearly statement in addition, in this instructions (comprising claim, summary and the accompanying drawing followed), disclosed each feature can be by providing identical, being equal to or the alternative features of similar purpose replaces.
In addition, those skilled in the art can understand, although embodiment more described herein comprise some feature rather than further feature included in other embodiment, the combination of the feature of different embodiment mean be in scope of the present invention within and form different embodiment.For example, in the following claims, the one of any of embodiment required for protection can be used with array mode arbitrarily.
It should be noted above-described embodiment the present invention will be described rather than limit the invention, and those skilled in the art can design alternative embodiment in the situation that do not break away from the scope of claims.In the claims, any reference symbol between bracket should be configured to limitations on claims.Word " comprises " not to be got rid of existence and is not listed in element or step in claim.Being positioned at word " " before element or " one " does not get rid of and has a plurality of such elements.The present invention can realize by means of the hardware that includes some different elements and by means of the computing machine of suitably programming.In having enumerated the unit claim of some devices, several in these devices can be to come imbody by same hardware branch.The use of word first, second and C grade does not represent any order.Can be title with these word explanations.
Claims (21)
1. server of realizing that the page in browser loads, this server comprises:
The script injection module is suitable for injecting the text loading scripts, the page of browsing when described parent page is the initial access website in the parent page that sends to client after the request of the loading parent page that receives the client transmission;
The text extraction module, be suitable for parsing the key word for the mutual relationship of text between representation page from the current page of browsing of client, extract link corresponding to key word, download the page corresponding to described link from the website, extract text in the page of downloading, the text that extracts is stored in memory module;
Memory module is suitable for storing the text of extraction;
Communication module, be suitable for receiving the request of the page of link corresponding to loading key word that client sends, text corresponding to this link of storing in memory module sent to client, client is added to this text in the text of the current page of browsing by the text loading scripts.
2. server according to claim 1, wherein,
Described script injection module, also be suitable for injecting internal memory in the parent page that sends to client and discharge script, so that client is after receiving the instruction that loads link corresponding to key word, judge whether the shared internal memory of the current page of browsing surpasses pre-set threshold value, if surpass, discharge the shared internal memory of text of browsing before in this page.
3. server according to claim 1 and 2, wherein,
Described script injection module also is suitable for injecting label reading function script and/or page selection function script in the parent page that sends to client, so that client is added the label reading function key and/or selected page function key in the current page of browsing.
4. the described server of according to claim 1 to 3 any one, wherein,
Described text extraction module is further adapted for according to page structure in page affiliated web site and extracts text from the page of downloading.
5. the described server of according to claim 1 to 4 any one, wherein,
Described text extraction module, the text that is further adapted for extracting compresses processing, and the compressed package that generates is stored in memory module.
6. the described server of according to claim 1 to 5 any one, wherein,
Described server also comprises:
Page prestrain module, be suitable for extracting link corresponding to non-keyword in the current page of browsing of client, download the page corresponding to described link from the website, the page of downloading is compressed processing, generate page compressed package corresponding to link, store this page compressed package into memory module, described non-keyword is corresponding is linked as the link except link corresponding to key word in the page;
Described memory module also is suitable for the memory page compressed package;
Described communication module also is suitable for receiving the request of link corresponding to non-keyword in the current page of browsing of loading that client sends, and the page compressed package that links correspondence in this request in memory module is sent to client.
7. server according to claim 6, wherein,
Described server also comprises:
The storage update module, be suitable for sending to that in the page compressed package of client, the page is the current page of browsing of client, link corresponding to the non-keyword that this current page of browsing the is comprised Link Ratio corresponding with the page compressed package of having stored, according to the page compressed package of comparative result updated stored.
8. server according to claim 7, wherein,
Described storage update module is further adapted for for not by this current link that the page comprised of browsing, and the page compressed package of this link correspondence is deleted from memory module; There is no link corresponding to stored non-keyword for that comprise in this current page of browsing and corresponding page compressed package, download the page corresponding to this link from the website, the page of downloading is compressed processing, generate page compressed package corresponding to this link, this page compressed package is stored in memory module.
9. client that realizes that the page in browser loads, this client comprises:
Request sending module, be suitable for after receiving the instruction that loads original web page, send the request that loads parent page to server, the page of browsing when described parent page is the initial access website, and after receiving link instruction corresponding to loading key word, send the request of the page that loads link corresponding to key word to server;
Page load-on module, be suitable for the parent page that is injected with the text loading scripts that reception server sends, load this parent page, and text in the page of link corresponding to the key word that sends of reception server, by the text loading scripts, this text is added in the text of the current page of browsing.
10. client according to claim 9, wherein,
Also be injected with internal memory in described parent page and discharge script;
Described page load-on module, also be suitable for after the instruction that receives the page that loads link corresponding to key word, discharge script by internal memory and judge that whether the shared internal memory of the current page of browsing surpasses pre-set threshold value, if surpass, discharges the shared internal memory of text of browsing before in this page.
11. according to claim 9 or 10 described clients, wherein,
Also be injected with label reading function script and/or page selection function script in described parent page,
Described page load-on module also is suitable for by label reading function script and/or page selection function script, adds the label reading function key and/or select page function key in the current page of browsing.
12. the described client of according to claim 9 to 11 any one, wherein,
Described client also comprises: decompression module is suitable for page compressed package is decompressed;
The described request sending module also is suitable for after receiving the instruction that loads link corresponding to non-keyword, sends the request of the page that loads link corresponding to non-keyword in the current page of browsing to server; Described non-keyword is corresponding is linked as the link except link corresponding to key word in the page;
Described page load-on module also is suitable for page compressed package corresponding to link in instruction that reception server sends, and the indication decompression module decompresses this page compressed package, loads the page in this page compressed package.
13. a system that realizes that in browser, the page loads, this system comprises:
Described server as arbitrary in claim 1 to 8, and
Described client as arbitrary in claim 9 to 12.
14. a method that realizes that in browser, the page loads, the method comprises:
After the request of the loading parent page that receives the client transmission, inject the text loading scripts, the page of browsing when described parent page is the initial access website in the parent page that sends to client;
Parse the key word for the mutual relationship of text between representation page from the current page of browsing of client, extract link corresponding to key word, download the page corresponding to described link from the website, extract text in the page of downloading, the text that storage is extracted;
After the request of link corresponding to the loading key word that receives the client transmission, the text that extracts is sent to client, client is added to this text in the text of the current page of browsing by the text loading scripts.
15. method according to claim 14, wherein,
Described method also comprises:
Inject internal memory release script in the parent page that sends to client, so that client is after receiving the instruction that loads link corresponding to key word, judge whether the shared internal memory of the current page of browsing surpasses pre-set threshold value, if surpass, discharge the shared internal memory of text of browsing before in this page.
16. according to claim 14 or 15 described methods, wherein,
Described method also comprises:
Inject label reading function script and/or page selection function script in the parent page that sends to client, so that client is added the label reading function key and/or selected page function key in the current page of browsing.
17. according to claim 14 to the 16 described methods of any one, wherein,
In the page that described extraction is downloaded, text further comprises:
Extract text according to page structure in page affiliated web site from the page of downloading.
18. according to claim 14 to the 17 described methods of any one, wherein,
The text that described storage is extracted further comprises:
The text that extracts is compressed processing, the compressed package that storage generates.
19. according to claim 14 to the 18 described methods of any one, wherein,
Described method also comprises:
Extract link corresponding to non-keyword in the current page of browsing of client, download the page corresponding to described link from the website, the page of downloading is compressed processing, generate page compressed package corresponding to link, store this page compressed package, described non-keyword is corresponding is linked as link except link corresponding to key word;
After the request of link corresponding to non-keyword in the current page of browsing of loading that receives the client transmission, page compressed package corresponding to link in this request sent to client.
20. method according to claim 19, wherein,
Described method also comprises:
The page that the page is browsed as client is current in the page compressed package that sends to client, link corresponding to the non-keyword that this current page of browsing the is comprised Link Ratio corresponding with the page compressed package of having stored, according to the page compressed package of comparative result updated stored.
21. method according to claim 20, wherein,
Described page compressed package according to the comparative result updated stored further comprises:
For not by this current link that the page comprised of browsing, the page compressed package of this link correspondence is deleted;
There is no link corresponding to stored non-keyword for that comprise in this current page of browsing and corresponding page compressed package, download the page corresponding to this link from the website, the page of downloading is compressed processing, generate page compressed package corresponding to this link, store this page compressed package.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310020113.3A CN103116609B (en) | 2013-01-18 | 2013-01-18 | Realize server, client, system and method that in browser, the page loads |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310020113.3A CN103116609B (en) | 2013-01-18 | 2013-01-18 | Realize server, client, system and method that in browser, the page loads |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103116609A true CN103116609A (en) | 2013-05-22 |
CN103116609B CN103116609B (en) | 2015-11-25 |
Family
ID=48414983
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310020113.3A Active CN103116609B (en) | 2013-01-18 | 2013-01-18 | Realize server, client, system and method that in browser, the page loads |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103116609B (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105335139A (en) * | 2014-07-24 | 2016-02-17 | 广州市动景计算机科技有限公司 | Webpage display method and apparatus |
CN105634683A (en) * | 2014-10-30 | 2016-06-01 | 阿里巴巴集团控股有限公司 | Data transmission method and device |
CN106055367A (en) * | 2016-06-01 | 2016-10-26 | 腾讯科技(深圳)有限公司 | Script file loading method and device |
CN106777116A (en) * | 2016-12-15 | 2017-05-31 | 腾讯科技(深圳)有限公司 | A kind of content acquisition method, subscription client, server and system |
CN107133180A (en) * | 2017-06-07 | 2017-09-05 | 腾讯科技(深圳)有限公司 | Method of testing, test device and the storage medium of dynamic page |
CN107562799A (en) * | 2017-08-04 | 2018-01-09 | 海南智媒云图科技股份有限公司 | A kind of content reprints the method and device shared |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7747749B1 (en) * | 2006-05-05 | 2010-06-29 | Google Inc. | Systems and methods of efficiently preloading documents to client devices |
US8103742B1 (en) * | 2003-11-24 | 2012-01-24 | Amazon Technologies, Inc. | Deferred and off-loaded rendering of selected portions of web pages to incorporate late-arriving service data |
CN102646135A (en) * | 2012-03-31 | 2012-08-22 | 奇智软件(北京)有限公司 | Webpage collecting method, device and system |
-
2013
- 2013-01-18 CN CN201310020113.3A patent/CN103116609B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8103742B1 (en) * | 2003-11-24 | 2012-01-24 | Amazon Technologies, Inc. | Deferred and off-loaded rendering of selected portions of web pages to incorporate late-arriving service data |
US7747749B1 (en) * | 2006-05-05 | 2010-06-29 | Google Inc. | Systems and methods of efficiently preloading documents to client devices |
CN102646135A (en) * | 2012-03-31 | 2012-08-22 | 奇智软件(北京)有限公司 | Webpage collecting method, device and system |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105335139A (en) * | 2014-07-24 | 2016-02-17 | 广州市动景计算机科技有限公司 | Webpage display method and apparatus |
CN105335139B (en) * | 2014-07-24 | 2019-05-17 | 广州市动景计算机科技有限公司 | Webpage display process and device |
CN105634683A (en) * | 2014-10-30 | 2016-06-01 | 阿里巴巴集团控股有限公司 | Data transmission method and device |
CN105634683B (en) * | 2014-10-30 | 2019-03-15 | 阿里巴巴集团控股有限公司 | Data transmission method and device |
CN106055367A (en) * | 2016-06-01 | 2016-10-26 | 腾讯科技(深圳)有限公司 | Script file loading method and device |
CN106055367B (en) * | 2016-06-01 | 2021-06-18 | 腾讯科技(深圳)有限公司 | Script file loading method and device |
CN106777116A (en) * | 2016-12-15 | 2017-05-31 | 腾讯科技(深圳)有限公司 | A kind of content acquisition method, subscription client, server and system |
CN106777116B (en) * | 2016-12-15 | 2021-10-15 | 腾讯科技(深圳)有限公司 | Content acquisition method, user client, server and system |
CN107133180A (en) * | 2017-06-07 | 2017-09-05 | 腾讯科技(深圳)有限公司 | Method of testing, test device and the storage medium of dynamic page |
CN107133180B (en) * | 2017-06-07 | 2021-03-23 | 腾讯科技(深圳)有限公司 | Dynamic page testing method, testing device and storage medium |
CN107562799A (en) * | 2017-08-04 | 2018-01-09 | 海南智媒云图科技股份有限公司 | A kind of content reprints the method and device shared |
Also Published As
Publication number | Publication date |
---|---|
CN103116609B (en) | 2015-11-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103118081A (en) | Server, client, system and method for preloading browse pages on explorer | |
US10108595B2 (en) | Method and system for automated analysis and transformation of web pages | |
CN103116609B (en) | Realize server, client, system and method that in browser, the page loads | |
CN102075570B (en) | Method for implementing HTTP (hyper text transport protocol) message caching mechanism based on keywords | |
CN105095280A (en) | Caching method and apparatus for browser | |
US8082488B2 (en) | Method for accessing a parent page while browsing web pages | |
CN101201827A (en) | Method and system for displaying web page | |
CN103577596A (en) | Keyword searching method and device based on current browse webpage | |
CN103577597A (en) | Keyword searching system based on current browse webpage | |
CN103577595A (en) | Keyword pushing method and device based on current browse webpage | |
CN103281387A (en) | Method, server, client side and system for processing child resources in web page | |
KR102550540B1 (en) | Landing page processing method, device, equipment and medium | |
CN103577392A (en) | Keyword pushing method and device based on current browse webpage | |
CN104281574A (en) | Information recommending method, device and system | |
CN103279538A (en) | Server, browser client side and method for preloading webpages in visited websites | |
CN102915363A (en) | Website storing method and system | |
CN105260424A (en) | Processing method and apparatus for webpage browsing historical records and most common accesses of user | |
CN104462571A (en) | Webpage loading method and device and browser client-side | |
CN103744845A (en) | Method and system for WEB platform data caching | |
CN102624910B (en) | Method, the Apparatus and system of the web page contents that process user chooses | |
CN102902784B (en) | Web page classification storage system and method | |
CN104199865A (en) | Searching method, client-side and system of custom result providing content provider | |
CN103530385A (en) | Method and device for searching for information based on vertical searching channels | |
CN102929489A (en) | Implementation method of client browser and client browser | |
CN113656737A (en) | Webpage content display method and device, electronic equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right |
Effective date of registration: 20220714 Address after: Room 801, 8th floor, No. 104, floors 1-19, building 2, yard 6, Jiuxianqiao Road, Chaoyang District, Beijing 100015 Patentee after: BEIJING QIHOO TECHNOLOGY Co.,Ltd. Address before: 100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park) Patentee before: BEIJING QIHOO TECHNOLOGY Co.,Ltd. Patentee before: Qizhi software (Beijing) Co.,Ltd. |
|
TR01 | Transfer of patent right |