CN103116609B - Realize server, client, system and method that in browser, the page loads - Google Patents

Realize server, client, system and method that in browser, the page loads Download PDF

Info

Publication number
CN103116609B
CN103116609B CN201310020113.3A CN201310020113A CN103116609B CN 103116609 B CN103116609 B CN 103116609B CN 201310020113 A CN201310020113 A CN 201310020113A CN 103116609 B CN103116609 B CN 103116609B
Authority
CN
China
Prior art keywords
page
client
link
text
browsed
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.)
Active
Application number
CN201310020113.3A
Other languages
Chinese (zh)
Other versions
CN103116609A (en
Inventor
文哲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Qihoo Technology Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing Qihoo Technology Co Ltd, Qizhi Software Beijing Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201310020113.3A priority Critical patent/CN103116609B/en
Publication of CN103116609A publication Critical patent/CN103116609A/en
Application granted granted Critical
Publication of CN103116609B publication Critical patent/CN103116609B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The present invention relates to network data communication field, disclose and realize server, client, the system and method that in browser, the page loads, this server comprises: script injection module, be suitable for, after the request receiving the loading parent page that client sends, injecting text loading scripts to sending in the parent page of client; Text extraction module, be suitable for the key word parsing the mutual relationship for text between representation page from the current page browsed of client, extract the link that key word is corresponding, the page that described link is corresponding is downloaded from website, extract text in the page downloaded, the text of extraction is stored in memory module; Memory module, is suitable for storing the text extracted; Communication module, is suitable for the request of the page receiving link corresponding to loading key word that client sends, the text of this link correspondence stored in memory module is sent to client.The present invention can solve and cause useless downloading flow in client, the technical matters of waste network traffics.

Description

Realize server, client, system and method that in browser, the page loads
Technical field
The present invention relates to network data communication field, be specifically related to a kind of server, client, the system and method that realize page loading in browser.
Background technology
In prior art, link according in the browsing pages of browser, navigation patterns after user is predicted, for in the page likely download all in advance in link clicked afterwards, promoted the loading velocity of the page in browser by the mode downloaded in advance by the page corresponding for these links.But, in the page most be linked at after browse in do not have clicked, although therefore adopt prior art can accelerate the speed of browsing pages, produce downloading flow useless in a large number in client, waste the network traffics of client.
Summary of the invention
In view of the above problems, the present invention is proposed to provide a kind of server, client, the system and method that realize page loading in browser that overcome the problems referred to above or solve the problem at least in part.
According to one aspect of the present invention, provide a kind of server realizing page loading in browser, this server comprises:
Script injection module, is suitable for, after the request receiving the loading parent page that client sends, injecting text loading scripts, the page of described parent page for browsing during initial access website to sending in the parent page of client;
Text extraction module, be suitable for the key word parsing the mutual relationship for text between representation page from the current page browsed of client, extract the link that key word is corresponding, the page that described link is corresponding is downloaded from website, extract text in the page downloaded, the text of extraction is stored in memory module;
Memory module, is suitable for storing the text extracted;
Communication module, be suitable for the request of the page receiving link corresponding to loading key word that client sends, the text of this link correspondence stored in memory module is sent to client, this text is added in the text of the current page browsed by text loading scripts by client.
Alternatively, described script injection module, also be suitable for injecting internal memory release script to sending in the parent page of client, to make client after receiving the instruction loading link corresponding to key word, judge shared by the current page browsed, whether internal memory exceedes pre-set threshold value, if exceeded, then internal memory shared by the text browsed before discharging in this page.
Alternatively, described script injection module, also being suitable for injecting label reading function script and/or page selection function script to sending in the parent page of client, in the current page browsed, adding label reading function key to make client and/or select page function key.
Alternatively, described text extraction module, is further adapted for and from the page downloaded, extracts text according to page structure in page affiliated web site.
Alternatively, described text extraction module, is further adapted for and carries out compression process to the text extracted, be stored in memory module by the compressed package of generation.
Alternatively, described server also comprises:
Page preloaded components, be suitable for extracting the link that in the current page browsed of client, non-keyword is corresponding, the page that described link is corresponding is downloaded from website, compression process is carried out to the page downloaded, generate the page compressed package that link is corresponding, this page compressed package is stored into memory module, the link that what described non-keyword was corresponding be linked as in the page except link corresponding to key word;
Described memory module, is also suitable for memory page compressed package;
Described communication module, is also suitable for the request of the link that non-keyword is corresponding in the current page browsed of loading of reception client transmission, sends to client by linking corresponding page compressed package in this request in memory module.
Alternatively, described server also comprises:
Storage update module, be suitable for sending to the page that in the page compressed package of client, the page is browsed for client is current, link corresponding to the non-keyword comprised by this current page the browsed Link Ratio corresponding with the page compressed package stored comparatively, upgrades the page compressed package stored according to comparative result.
Alternatively, described storage update module, be further adapted for for not the link that comprises by this current page browsed, the page compressed package of this link correspondence is deleted from memory module; For comprise in this current page browsed and the link that the non-keyword that is not stored of the page compressed package of correspondence is corresponding, the page of this link correspondence is downloaded from website, compression process is carried out to the page downloaded, generate the page compressed package of this link correspondence, this page compressed package is stored in memory module.
According to an aspect of the present invention, provide a kind of client realizing page loading in browser, this client comprises:
Request sending module, be suitable for after receiving the instruction loading original web page, the request loading parent page is sent to server, the page of described parent page for browsing during initial access website, and after receiving link instruction corresponding to loading key word, send the request of the page loading link corresponding to key word to server;
Page load-on module, be suitable for the parent page being injected with text loading scripts that reception server sends, load this parent page, and text in the page of link corresponding to key word that sends of reception server, by text loading scripts, this text is added in the text of the current page browsed.
Alternatively, internal memory release script is also injected with in described parent page;
Described page load-on module, also be suitable for after the instruction receiving the page loading link corresponding to key word, judge shared by the current page browsed, whether internal memory exceedes pre-set threshold value by internal memory release script, if exceeded, then internal memory shared by the text browsed before discharging in this page.
Alternatively, in described parent page, be also injected with label reading function script and/or page selection function script,
Described page load-on module, is also suitable for by label reading function script and/or page selection function script, adds label reading function key and/or select page function key in the current page browsed.
Alternatively, described client also comprises: decompression module, is suitable for decompressing to page compressed package;
Described request sending module, is also suitable for, after receiving the instruction loading link corresponding to non-keyword, sending the request of the page loading the link that non-keyword is corresponding in the current page browsed to server; The link that what described non-keyword was corresponding be linked as in the page except link corresponding to key word;
Described page load-on module, be also suitable for linking corresponding page compressed package in the instruction of reception server transmission, this page compressed package decompresses by instruction decompression module, loads the page in this page compressed package.
According to another aspect of the present invention, provide a kind of system realizing page loading in browser, this system comprises described server, and described client.
According to another aspect of the present invention, provide a kind of method realizing page loading in browser, the method comprises:
After the request receiving the loading parent page that client sends, inject text loading scripts to sending in the parent page of client, the page of described parent page for browsing during initial access website;
From the current page browsed of client, parse the key word of the mutual relationship for text between representation page, extract the link that key word is corresponding, download the page that described link is corresponding from website, extract text in the page downloaded, store the text extracted;
When after the request receiving link corresponding to loading key word that client sends, the text of extraction is sent to client, this text is added in the text of the current page browsed by text loading scripts by client.
Alternatively, described method also comprises:
Internal memory release script is injected to sending in the parent page of client, to make client after receiving the instruction loading link corresponding to key word, judge shared by the current page browsed, whether internal memory exceedes pre-set threshold value, if exceeded, then internal memory shared by the text browsed before discharging in this page.
Alternatively, described method also comprises:
Injecting label reading function script and/or page selection function script to sending in the parent page of client, in the current page browsed, adding label reading function key to make client and/or select page function key.
Alternatively, described extract download the page in text comprise further:
From the page downloaded, text is extracted according to page structure in page affiliated web site.
Alternatively, the described text extracted that stores comprises further:
Compression process is carried out to the text extracted, stores the compressed package generated.
Alternatively, described method also comprises:
Extract the link that in the current page browsed of client, non-keyword is corresponding, the page that described link is corresponding is downloaded from website, compression process is carried out to the page downloaded, generate the page compressed package that link is corresponding, store this page compressed package, the link that what described non-keyword was corresponding be linked as except link corresponding to key word;
When after the request receiving link corresponding to non-keyword in the current page browsed of loading that client sends, send to client by linking corresponding page compressed package in this request.
Alternatively, described method also comprises:
To send to the page that in the page compressed package of client, the page is browsed for client is current, link corresponding to the non-keyword comprised by this current page the browsed Link Ratio corresponding with the page compressed package stored comparatively, upgrades the page compressed package stored according to comparative result.
Alternatively, the described page compressed package stored according to comparative result renewal comprises further:
For not the link that comprises by this current page browsed, the page compressed package of this link correspondence is deleted;
For comprise in this current page browsed and the link that the non-keyword that is not stored of the page compressed package of correspondence is corresponding, the page of this link correspondence is downloaded from website, compression process is carried out to the page downloaded, generates the page compressed package of this link correspondence, store this page compressed package.
According to technical scheme of the present invention, after the request receiving the loading parent page that client sends, text loading scripts is injected to sending in the parent page of client, the key word of the mutual relationship for text between representation page is parsed from the current page browsed of client, extract the link that key word is corresponding, download the page that described link is corresponding from website, extract text in the page downloaded, store the text extracted; When after the request receiving link corresponding to loading key word that client sends, the text of extraction is sent to client, this text is added in the text of the current page browsed by text loading scripts by client.
Adopt technical scheme in the present invention, the corresponding page is connected for key word, only extracting wherein text, text is handed down to client, by injecting the mode of text loading scripts in parent page, this text being added in the current page browsed by client.Because the text issued extracts in advance, therefore can improve the speed of browsing pages, issue content simultaneously and be only body matter, decrease the data volume issued, reduce Client browse webpage network traffics used.Solve thus and cause downloading flow useless in a large number in client, the problem of waste network traffics, achieves and can either accelerate surfing in client and can save again the beneficial effect of the network traffics of client.
Above-mentioned explanation is only the general introduction of technical solution of the present invention, in order to technological means of the present invention can be better understood, and can be implemented according to the content of instructions, and can become apparent, below especially exemplified by the specific embodiment of the present invention to allow above and other objects of the present invention, feature and advantage.
Accompanying drawing explanation
By reading hereafter detailed description of the preferred embodiment, various other advantage and benefit will become cheer and bright for those of ordinary skill in the art.Accompanying drawing only for illustrating the object of preferred implementation, and does not think limitation of the present invention.And in whole accompanying drawing, represent identical parts by identical reference symbol.In the accompanying drawings:
Fig. 1 shows the structural drawing realizing the server that the page loads in browser according to an embodiment of the invention;
Fig. 2 shows the schematic diagram of three related web pages that client is according to an embodiment of the invention browsed in advance;
Fig. 3 show in client according to an embodiment of the invention complete text add after the schematic diagram of the complete page;
Fig. 4 shows the structural drawing realizing the server that the page loads in browser according to an embodiment of the invention;
Fig. 5 shows the schematic diagram of the current page browsed of client according to an embodiment of the invention;
Fig. 6 shows the structural drawing realizing the server that the page loads in browser according to an embodiment of the invention;
The schematic diagram of the page that Fig. 7 upgrades after showing client link clicks according to an embodiment of the invention;
Fig. 8 shows the structural drawing realizing the client that the page loads in browser according to an embodiment of the invention;
Fig. 9 shows the structural drawing realizing the client that the page loads in browser according to an embodiment of the invention;
Figure 10 shows the structural drawing realizing the system that the page loads in browser according to an embodiment of the invention;
Figure 11 shows the process flow diagram realizing the method that the page loads in browser according to an embodiment of the invention; And
Figure 12 shows the process flow diagram of the method for link process corresponding for non-keyword in the page according to an embodiment of the invention.
Embodiment
Below with reference to accompanying drawings exemplary embodiment of the present disclosure is described in more detail.Although show exemplary embodiment of the present disclosure in accompanying drawing, however should be appreciated that can realize the disclosure in a variety of manners and not should limit by the embodiment set forth here.On the contrary, provide these embodiments to be in order to more thoroughly the disclosure can be understood, and complete for the scope of the present disclosure can be conveyed to those skilled in the art.
See Fig. 1, show the structural drawing realizing the server that the page loads in browser according to an embodiment of the invention.Server 100 comprises: script injection module 110, text extraction module 120, memory module 140 and communication module 130.
Script injection module 110, is suitable for, after the request receiving the loading parent page that client 200 sends, injecting text loading scripts to sending in the parent page of client 200.The page of described parent page for browsing during initial access website.
Text extraction module 120, be suitable for the key word parsing the mutual relationship for text between representation page from the current page browsed of client 200, extract the link that key word is corresponding, the page of this link correspondence is downloaded from website, extract text in the page downloaded, the text of extraction is stored in memory module 140.
Memory module 140, is suitable for storing the text extracted.
Communication module 130, be suitable for the request of the page receiving link corresponding to loading key word that client 200 sends, the text of this link correspondence stored in memory module 140 is sent to client 200, this text is added in the text of the current page browsed by text loading scripts by client 200.
For saving network traffics further, text extraction module 120 can carry out compression process to the text extracted, be stored in memory module 140 by the compressed package of generation.The compressed package of the text of this link correspondence stored in memory module 140, after the request of the page receiving link corresponding to loading key word that client 200 sends, is sent to client 200 by communication module 130.
Fig. 2 shows the schematic diagram of three related web pages that client is according to an embodiment of the invention browsed in advance.In Fig. 2, three webpages are the 1st page, the 2nd page, the 3rd page of one section of article, and in three pages, body matter merges into one section of complete article.In Fig. 2, square frame institute frame part is key word.
Key word is used for the mutual relationship of text between representation page, and such as, key word can be " page up ", " lower one page ", " X page " etc.The key word marked in Fig. 2 is only exemplary illustration, and in the present invention, key word is not limited thereto.
First, script injection module 110 receiving client 200 send loading parent page, namely the 1st page, request after, inject text loading scripts to sending in the parent page of client 200.The text of reception can be added in the text of the current page browsed by this text loading scripts by client 200.
Text extraction module 120, for link corresponding to key word " lower one page " in current 1st page of browsing of client 200, is downloaded the page of this link correspondence, is extracted text in the page of this link correspondence from website, i.e. text in the 2nd page.Particularly, text extraction module 120 by inquiring about in the html of the 2nd page, find that the 3rd <div> label is to <divclass=" w1Text " > ... have in </div> " Text ", what then determine that the 3rd <div> label centering comprise is text, extracts this text.
After completing the 1st page browsing, the slide downward page, client 200 receives the instruction of the page loading key word " lower one page " correspondence link in the current page browsed, and sends the request of the page loading link corresponding to key word " lower one page ".Communication module 130 receives request, will link " lower one page ", namely the 2nd page, and in the corresponding page, text sends to client 200.Text is added in the text of the current page browsed by text loading scripts by client 200.Further, after client 200 receives the 2nd page of text, automatically the page number in the link of " lower one page " correspondence is added 1, make " lower one page " corresponding 3rd page.After completing the 2nd page browsing, slide downward, client 200 obtains text the 3rd page from server 100, is added in the text of the current page browsed by text in the 3rd page by text loading scripts.Complete text in client 200 and add rear complete page face as shown in Figure 3.
Further, text extraction module 120 extracts text according to page structure in page affiliated web site from the page downloaded.For the page of three shown in Fig. 2, known by analysis, all comprise " Text " in the html of three pages, and three pages comprise " page up " or " lower one page ".Can determine between three pages, to there is association, and all include text thus.As mentioned above, text extraction module 120 by inquiring about in the html of the page, find that the 3rd <div> label is to <divclass=" w1Text " > ... have in </div> " Text ", what then determine that the 3rd <div> label centering comprise is text, extracts this text.
Further, script injection module 110, also be suitable for injecting internal memory release script to sending in the parent page of client 200, to make client 200 after receiving the instruction loading link corresponding to key word, judge shared by the current page browsed, whether internal memory exceedes pre-set threshold value, if exceeded, then internal memory shared by the text browsed before discharging in this page.
Such as, in internal memory release script, content is:
parent.removeChild(e);
e=null;
deletee
After completing the 2nd page browsing, the slide downward page, client 200 receives the instruction of the page loading the link of key word " lower one page " correspondence.Client 200 judges shared by the current page browsed, whether internal memory exceedes pre-set threshold value, if exceeded, then and internal memory shared by text in discharging the 1st page and/or the 2nd page.
Therefore, by injecting internal memory release script to sending in the parent page of client, solving the problem that the text owing to adding too much causes internal memory to overflow, achieving the beneficial effect preventing internal memory from overflowing.
Further, script injection module 110, also being suitable for injecting label reading function script and/or page selection function script to sending in the parent page of client 200, in the current page browsed, adding label reading function key to make client 200 and/or select page function key.
At this, by the mode to function of injecting script in parent page, function key can be added in the page of client 200, reach the beneficial effect of function in the expansion page thus.
See Fig. 4, show the structural drawing realizing the server that the page loads in browser according to an embodiment of the invention.In this embodiment, server 100 is except comprising script injection module 110, text extraction module 120, memory module 140 and communication module 130, also comprises page preloaded components 150.
Page preloaded components 150, be suitable for extracting the link that in the current page browsed of client 200, non-keyword is corresponding, the page of this link correspondence is downloaded from website, compression process is carried out to the page downloaded, generate the page compressed package that link is corresponding, this page compressed package is stored into memory module 140.
The link that what described non-keyword was corresponding be linked as in the page except link corresponding to key word;
Memory module 140, is also suitable for memory page compressed package.
Communication module 130, is also suitable for the request of the link that non-keyword is corresponding in the current page browsed of loading of reception client 200 transmission, sends to client 200 by linking corresponding page compressed package in this request in memory module 140.
See Fig. 5, show the schematic diagram of the current page browsed of client according to an embodiment of the invention.For the page shown in Fig. 5, embodiment is illustrated.
Link is included: " login ", " registration ", " homepage ", " science and technology ", " IT ", " internet ", " world ", " page up " etc. at this page.Wherein, " page up " is link corresponding to key word, and remaining is link corresponding to non-keyword.Page preloaded components 150 to extract in this page comprise link corresponding to non-keyword.Because client 200 obtains the page browsed from server 100, therefore server 100 can know the current page browsed of client 200.Page preloaded components 150 downloads the page corresponding to each non-keyword correspondence link from each website.Page preloaded components 150 carries out compression process to the page downloaded, and generates the page compressed package that link is corresponding, page compressed package is stored into memory module 140.Memory module 140 can be the internal memory of server 100, wherein stores page compressed package corresponding to link.After the link that certain non-keyword in the page is corresponding is clicked, client 200 will send the request of the page loading this clicked link.Communication module 130 receives the request that client 200 sends, and sends to client 200 by linking corresponding page compressed package in this request.Thus, client 200 obtains the page compressed package of the link correspondence clicked, and shows this page after being decompressed by this compressed package in client 200.
In the present embodiment, server can be Cloud Server, and this Cloud Server carries out unified download and preservation to linking the corresponding page in the page of each Client browse, and this page is compressed into compressed package.When in client because the reason such as link clicks, actually produce download when needing, the compressed package of correspondence be handed down to client.Thus, the compressed data packets of the link that non-keyword can be provided corresponding to client, improve the speed browsing the page of link corresponding to non-keyword, achieve and can either accelerate surfing in client and can save again the network traffics of client, reduce the beneficial effect of the work load of client.
See Fig. 6, show the structural drawing realizing the server that the page loads in browser according to an embodiment of the invention.In this embodiment, server 100 is except comprising script injection module 110, text extraction module 120, memory module 140, communication module 130 and page preloaded components 150, also comprises storage update module 160.
Storage update module 160, be suitable for sending to the page that in the page compressed package of client 200, the page is browsed for client 200 is current, link corresponding to the non-keyword comprised by this current page the browsed Link Ratio corresponding with the page compressed package stored comparatively, upgrades the page compressed package stored according to comparative result.
Further, storage update module 160 for not the link that comprises by this current page browsed, the page compressed package of this link correspondence is deleted from memory module 140; For comprise in this current page browsed and the link that the non-keyword that is not stored of the page compressed package of correspondence is corresponding, the page of this link correspondence is downloaded from website, compression process is carried out to the page downloaded, generate the page compressed package of this link correspondence, this page compressed package is stored in memory module 140.
See Fig. 7, the page upgraded after showing client link clicks according to an embodiment of the invention.For the page that link " world " upgrades afterwards in client link clicks Fig. 5 shown in Fig. 7, carry out exemplary illustration.Link is comprised: " login ", " registration ", " homepage ", " science and technology ", " IT ", " internet ", " world " in this page, and 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 comprises by storage update module 160 Link Ratio corresponding with the page compressed package stored comparatively.Wherein, " login ", " registration ", " homepage ", " science and technology ", " IT ", " internet ", " world " comprise by the page after this renewal, and the page compressed package of these link correspondences is stored, so the page compressed package of these link correspondences is still stored, not change.Do not comprise link " page up " in the page after this renewal, therefore, the text corresponding by " page up " or text compressed bag are deleted from memory module 140.The page compressed package of the news item link correspondence comprised in the page after this renewal is not stored module 140 and stores, therefore the page corresponding to news item link is downloaded from website, compression process is carried out to the page downloaded, generate the page compressed package of this link correspondence, this page compressed package is stored in memory module 140.
Therefore, when being changed by the page browsed in the client, the corresponding page compressed package upgrading the link correspondence stored, page compressed package useful in the page compressed package stored is retained, page compressed package corresponding to link is increased newly in the page after only increasing change, therefore, it is possible to reduce the network traffics of server end further, and server carries out the work load of page compression.
Fig. 8 shows the structural drawing realizing the client that the page loads in browser according to an embodiment of the invention.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 loading original web page, the request loading parent page is sent to server 100, the page of described parent page for browsing during initial access website, and after receiving link instruction corresponding to loading key word, send the request of the page loading link corresponding to key word to server 100.
Page load-on module 220, be suitable for the parent page being injected with text loading scripts that reception server 100 sends, load this parent page, and text in the page of link corresponding to key word that sends of reception server 100, by text loading scripts, this text is added in the text of the current page browsed.
Because the text issued extracts in advance, therefore can improve the speed of browsing pages, issue content simultaneously and be only body matter, decrease the data volume issued, reduce Client browse webpage network traffics used.
Further, internal memory release script is also injected with in parent page.
Page load-on module 220, also be suitable for after the instruction receiving the page loading link corresponding to key word, judge shared by the current page browsed, whether internal memory exceedes pre-set threshold value by internal memory release script, if exceeded, then internal memory shared by the text browsed before discharging in this page.
Injecting internal memory release script by performing in parent page, solving the problem that the text owing to adding too much causes internal memory to overflow, reaching the beneficial effect preventing internal memory from overflowing.
Further, label reading function script and/or page selection function script is also injected with in parent page.
Page load-on module 220, is also suitable for by label reading function script and/or page selection function script, adds label reading function key and/or select page function key in the current page browsed.
By the mode to function of injecting script in parent page, function key can be added in the page of client, reach the beneficial effect of function in the expansion page thus.
Fig. 9 shows the structural drawing realizing the client that the page loads in browser according to an embodiment of the invention.This client 200 is except comprising request sending module 210 and page load-on module 220 is also comprise decompression module 230.
Decompression module 230, is suitable for decompressing to page compressed package;
Request sending module 210, is also suitable for, after receiving the instruction loading link corresponding to non-keyword, sending the request of the page loading the link that non-keyword is corresponding in the current page browsed to server 100; The link that what described non-keyword was corresponding be linked as in the page except link corresponding to key word;
Page load-on module 220, be also suitable for linking corresponding page compressed package in the instruction of reception server 100 transmission, this page compressed package decompresses by instruction decompression module 230, loads the page in this page compressed package.
In embodiment, client only receives the page compressed package of the link correspondence that will browse, the page of all-links in the page is not needed all to do pre-download, on the other hand, page compressed package is generated in advance at server side, by downloading this page compressed package from server side, surfing can be improved.Therefore, achieve further and can either accelerate surfing in client and can save again the network traffics of client, reduce the beneficial effect of the work load of client.
See Figure 10, show the structural drawing realizing the system that the page loads in browser according to an embodiment of the invention.System comprises aforementioned server 100, and multiple aforementioned client 200.Directly can be connected between server 100 with client 200 and also can be connected by network, be not particularly limited at this.
See Figure 11, show the process flow diagram realizing the method that the page loads in browser according to an embodiment of the invention.The method comprises the steps.
Step S1110, after the request receiving the loading parent page that client sends, injects text loading scripts to sending in the parent page of client.The page of parent page for browsing during initial access website;
Step S1120, from the current page browsed of client, parse the key word of the mutual relationship for text between representation page, extract the link that key word is corresponding, download the page that described link is corresponding from website, extract text in the page downloaded, store the text extracted.
Step S1130, when after the request receiving link corresponding to loading key word that client sends, sends to client by the text of extraction, this text is added in the text of the current page browsed by text loading scripts by client.
For saving network traffics further, in step S1120, compression process can be carried out to the text extracted, storing the compressed package generated.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 stored is sent to client.
Three related web pages browsed in advance for the client shown in Fig. 2, carry out exemplary illustration.In Fig. 2, three webpages are the 1st page, the 2nd page, the 3rd page of one section of article, and in three pages, body matter merges into one section of complete article.In Fig. 2, square frame institute frame part is key word.
Key word is used for the mutual relationship of text between representation page, and such as, key word can be " page up ", " lower one page ", " X page " etc.The key word marked in Fig. 2 is only exemplary illustration, and in the present invention, key word is not limited thereto.
First, in step S1110, receiving client send loading parent page, namely the 1st page, request after, inject text loading scripts to sending in the parent page of client.The text of reception can be added in the text of the current page browsed by this text loading scripts by client.
In step S1120, for the link that key word " lower one page " in current 1st page of browsing of client 200 is corresponding, from website, download the page of this link correspondence, extract text in the page of this link correspondence, be i.e. text in the 2nd page.Particularly, by inquiring about in the html of the 2nd page, find that the 3rd <div> label is to <divclass=" w1Text " > ... have in </div> " Text ", what then determine that the 3rd <div> label centering comprise is text, extracts this text.
After completing the 1st page browsing, the slide downward page, client receives the instruction of the page loading key word " lower one page " correspondence link in the current page browsed, and sends the request of the page loading link corresponding to key word " lower one page ".In step S1130, receive request, will link " lower one page ", namely the 2nd page, in the corresponding page, text sends to client.Text is added in the text of the current page browsed by text loading scripts by client.
Further, after client receives the 2nd page of text, automatically the page number in the link of " lower one page " correspondence is added 1, make " lower one page " corresponding 3rd page.After completing the 2nd page browsing, slide downward, client obtains text in the 3rd page, is added in the text of the current page browsed by text in the 3rd page by text loading scripts.Complete text in client and add rear complete page face as shown in Figure 3.
Further, in step S1120, from the page downloaded, text is extracted according to page structure in page affiliated web site.For the page of three shown in Fig. 2, known by analysis, all comprise " Text " in the html of three pages, and three pages comprise " page up " or " lower one page ".Can determine between three pages, to there is association, and all include text thus.As mentioned above, by inquiring about in the html of the page, find that the 3rd <div> label is to <divclass=" w1Text " > ... have in </div> " Text ", what then determine that the 3rd <div> label centering comprise is text, extracts this text.
Further, method also comprises: inject internal memory release script to sending in the parent page of client, to make client after receiving the instruction loading link corresponding to key word, judge shared by the current page browsed, whether internal memory exceedes pre-set threshold value, if exceeded, then internal memory shared by the text browsed before discharging in this page.
Such as, in internal memory release script, content is:
parent.removeChild(e);
e=null;
deletee
After completing the 2nd page browsing, the slide downward page, client receives the instruction of the page loading the link of key word " lower one page " correspondence.Client judges shared by the current page browsed, whether internal memory exceedes pre-set threshold value, if exceeded, then and internal memory shared by text in discharging the 1st page and/or the 2nd page.
Therefore, by injecting internal memory release script to sending in the parent page of client, solving the problem that the text owing to adding too much causes internal memory to overflow, achieving the beneficial effect preventing internal memory from overflowing.
Further, method also comprises: inject label reading function script and/or page selection function script to sending in the parent page of client, adds label reading function key to make client and/or selects page function key in the current page browsed.
At this, by the mode to function of injecting script in parent page, function key can be added in the page of client, reach the beneficial effect of function in the expansion page thus.
See Figure 12, show the process flow diagram of the method for link process corresponding for non-keyword in the page according to an embodiment of the invention.In this embodiment, method, except comprising step S1110 to except step S1130, also comprises the steps.
Step S1210, extracts the link that in the current page browsed of client, non-keyword is corresponding, downloads the page that described link is corresponding from website.The link that what described non-keyword was corresponding be linked as except link corresponding to key word.
Step S1220, carries out compression process to the page downloaded, generates the page compressed package that link is corresponding, store this page compressed package.
Step S1230, when after the request receiving link corresponding to non-keyword in the current page browsed of loading that client sends, sends to client by linking corresponding page compressed package in this request.
For the page shown in Fig. 5, embodiment is illustrated.
Link is included: " login ", " registration ", " homepage ", " science and technology ", " IT ", " internet ", " world ", " page up " etc. at this page.Wherein, " page up " is link corresponding to key word, and remaining is link corresponding to non-keyword.In step S1210, to extract in this page comprise link corresponding to non-keyword.Because client obtains the page browsed from server, therefore server can know the current page browsed of client.Further, the page that each non-keyword correspondence link is corresponding is downloaded from each website.In step S1220, compression process is carried out to the page downloaded, generates the page compressed package that link is corresponding, memory page compressed package.After the link that certain non-keyword in the page is corresponding is clicked, client will send the request of the page loading this clicked link.In step S1230, receive the request that client sends, and send to client by linking corresponding page compressed package in this request.Thus, client obtains the page compressed package of the link correspondence clicked, and shows this page after being decompressed by this compressed package in client 2.
Carry out unified download and preservation to linking the corresponding page in the page of each Client browse in the present embodiment, and this page is compressed into compressed package.When in client because the reason such as link clicks, actually produce download when needing, the compressed package of correspondence be handed down to client.Thus, the compressed data packets of the link that non-keyword can be provided corresponding to client, improve the speed browsing the page of link corresponding to non-keyword, achieve and can either accelerate surfing in client and can save again the network traffics of client, reduce the beneficial effect of the work load of client.
In one embodiment, method also comprises: to send to the page that in the page compressed package of client, the page is browsed for client is current, link corresponding to the non-keyword comprised by this current page the browsed Link Ratio corresponding with the page compressed package stored comparatively, upgrades the page compressed package stored according to comparative result.
Further, for not the link that comprises by this current page browsed, the page compressed package of this link correspondence is deleted;
For comprise in this current page browsed and the link that the non-keyword that is not stored of the page compressed package of correspondence is corresponding, the page of this link correspondence is downloaded from website, compression process is carried out to the page downloaded, generates the page compressed package of this link correspondence, store this page compressed package.
For the page that link " world " upgrades afterwards in client link clicks Fig. 5 shown in Fig. 7, carry out exemplary illustration.Link is comprised: " login ", " registration ", " homepage ", " science and technology ", " IT ", " internet ", " world " in this page, and 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 comprised by this page Link Ratio corresponding with the page compressed package stored comparatively.Wherein, " login ", " registration ", " homepage ", " science and technology ", " IT ", " internet ", " world " comprise by the page after this renewal, and the page compressed package of these link correspondences is stored, so the page compressed package of these link correspondences is still stored, not change.Do not comprise link " page up " in the page after this renewal, therefore, the text corresponding by " page up " or text compressed bag are deleted.The page compressed package of the news item link correspondence comprised in the page after this renewal is not stored, therefore the page corresponding to news item link is downloaded from website, compression process is carried out to the page downloaded, generates the page compressed package of this link correspondence, store this page compressed package.
Therefore, when being changed by the page browsed in the client, the corresponding page compressed package upgrading the link correspondence stored, page compressed package useful in the page compressed package stored is retained, page compressed package corresponding to link is increased newly in the page after only increasing change, therefore, it is possible to reduce the network traffics of server end further, and server carries out the work load of page compression.
Intrinsic not relevant to any certain computer, virtual system or miscellaneous equipment with display at this algorithm provided.Various general-purpose system also can with use based on together with this teaching.According to description above, the structure constructed required by this type systematic is apparent.In addition, the present invention is not also for any certain programmed language.It should be understood that and various programming language can be utilized to realize content of the present invention described here, and the description done language-specific is above to disclose preferred forms of the present invention.
In instructions provided herein, describe a large amount of detail.But can understand, embodiments of the invention can be put into practice when not having these details.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 in each inventive aspect one or more, in the description above 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.But, the method for the disclosure should be construed to the following intention of reflection: namely the present invention for required protection requires feature more more than the feature clearly recorded in each claim.Or rather, as claims below reflect, all features of disclosed single embodiment before inventive aspect is to be less than.Therefore, the claims following embodiment are incorporated to this embodiment thus clearly, and wherein each claim itself is as independent embodiment of the present invention.
Those skilled in the art are appreciated that and adaptively can change the module in the equipment in embodiment and they are arranged in one or more equipment different from this embodiment.Module in embodiment or unit or assembly can be combined into a module or unit or assembly, and multiple submodule or subelement or sub-component can be put them in addition.Except at least some in such feature and/or process or unit be mutually repel except, any combination can be adopted to combine all processes of all features disclosed in this instructions (comprising adjoint claim, summary and accompanying drawing) and so disclosed any method or equipment or unit.Unless expressly stated otherwise, each feature disclosed in this instructions (comprising adjoint claim, summary and accompanying drawing) can by providing identical, alternative features that is equivalent or similar object replaces.
In addition, those skilled in the art can understand, although embodiments more described herein to comprise in other embodiment some included feature instead of further feature, the combination of the feature of different embodiment means and to be within scope of the present invention and to form different embodiments.Such as, in the following claims, the one of any of embodiment required for protection can use with arbitrary array mode.
The present invention will be described instead of limit the invention to it should be noted above-described embodiment, and those skilled in the art can design alternative embodiment when not departing 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 does not arrange element in the claims or step.Word "a" or "an" before being positioned at element is not got rid of and be there is multiple such element.The present invention can by means of including the hardware of some different elements and realizing by means of the computing machine of suitably programming.In the unit claim listing some devices, several in these devices can be carry out imbody by same hardware branch.Word first, second and third-class use do not represent any order.Can be title by these word explanations.

Claims (21)

1. realize the server that in browser, the page loads, this server comprises:
Script injection module, is suitable for, after the request receiving the loading parent page that client sends, injecting text loading scripts, the page of described parent page for browsing during initial access website to sending in the parent page of client;
Text extraction module, be suitable for the key word parsing the mutual relationship for text between representation page from the current page browsed of client, extract the link that key word is corresponding, the page that described link is corresponding is downloaded from website, extract text in the page downloaded, the text of extraction is stored in memory module;
Memory module, is suitable for storing the text extracted;
Communication module, be suitable for the request of the page receiving link corresponding to loading key word that client sends, the text of this link correspondence stored in memory module is sent to client, this text is added in the text of the current page browsed by text loading scripts by client.
2. server according to claim 1, wherein,
Described script injection module, also be suitable for injecting internal memory release script to sending in the parent page of client, to make client after receiving the instruction loading link corresponding to key word, judge shared by the current page browsed, whether internal memory exceedes pre-set threshold value, if exceeded, then internal memory shared by the text browsed before discharging in this page.
3. server according to claim 1 and 2, wherein,
Described script injection module, is also suitable for injecting label reading function script and/or page selection function script to sending in the parent page of client, adds label reading function key to make client and/or selects page function key in the current page browsed.
4. server according to claim 1 and 2, wherein,
Described text extraction module, is further adapted for and from the page downloaded, extracts text according to page structure in page affiliated web site.
5. server according to claim 1 and 2, wherein,
Described text extraction module, is further adapted for and carries out compression process to the text extracted, be stored in memory module by the compressed package of generation.
6. server according to claim 1 and 2, wherein,
Described server also comprises:
Page preloaded components, be suitable for extracting the link that in the current page browsed of client, non-keyword is corresponding, the page that described link is corresponding is downloaded from website, compression process is carried out to the page downloaded, generate the page compressed package that link is corresponding, this page compressed package is stored into memory module, the link that what described non-keyword was corresponding be linked as in the page except link corresponding to key word;
Described memory module, is also suitable for memory page compressed package;
Described communication module, is also suitable for the request of the link that non-keyword is corresponding in the current page browsed of loading of reception client transmission, sends to client by linking corresponding page compressed package in this request in memory module.
7. server according to claim 6, wherein,
Described server also comprises:
Storage update module, be suitable for sending to the page that in the page compressed package of client, the page is browsed for client is current, link corresponding to the non-keyword comprised by this current page the browsed Link Ratio corresponding with the page compressed package stored comparatively, upgrades the page compressed package stored according to comparative result.
8. server according to claim 7, wherein,
Described storage update module, be further adapted for for not the link that comprises by this current page browsed, the page compressed package of this link correspondence is deleted from memory module; For comprise in this current page browsed and the link that the non-keyword that is not stored of the page compressed package of correspondence is corresponding, the page of this link correspondence is downloaded from website, compression process is carried out to the page downloaded, generate the page compressed package of this link correspondence, this page compressed package is stored in memory module.
9. realize the client that in browser, the page loads, this client comprises:
Request sending module, be suitable for after receiving the instruction loading original web page, the request loading parent page is sent to server, the page of described parent page for browsing during initial access website, and after receiving link instruction corresponding to loading key word, send the request of the page loading link corresponding to key word to server;
Page load-on module, be suitable for the parent page being injected with text loading scripts that reception server sends, load this parent page, and text in the page of link corresponding to key word that sends of reception server, by text loading scripts, this text is added in the text of the current page browsed.
10. client according to claim 9, wherein,
Internal memory release script is also injected with in described parent page;
Described page load-on module, also be suitable for after the instruction receiving the page loading link corresponding to key word, judge shared by the current page browsed, whether internal memory exceedes pre-set threshold value by internal memory release script, if exceeded, then internal memory shared by the text browsed before discharging in this page.
11. clients according to claim 9 or 10, wherein,
Label reading function script and/or page selection function script is also injected with in described parent page,
Described page load-on module, is also suitable for by label reading function script and/or page selection function script, adds label reading function key and/or select page function key in the current page browsed.
12. clients according to claim 9 or 10, wherein,
Described client also comprises: decompression module, is suitable for decompressing to page compressed package;
Described request sending module, is also suitable for, after receiving the instruction loading link corresponding to non-keyword, sending the request of the page loading the link that non-keyword is corresponding in the current page browsed to server; The link that what described non-keyword was corresponding be linked as in the page except link corresponding to key word;
Described page load-on module, be also suitable for linking corresponding page compressed package in the instruction of reception server transmission, this page compressed package decompresses by instruction decompression module, loads the page in this page compressed package.
13. 1 kinds realize the system that in browser, the page loads, and this system comprises:
Server as described in as arbitrary in claim 1 to 8, and
Client as described in as arbitrary in claim 9 to 12.
14. 1 kinds realize the method that in browser, the page loads, and the method comprises:
After the request receiving the loading parent page that client sends, inject text loading scripts to sending in the parent page of client, the page of described parent page for browsing during initial access website;
From the current page browsed of client, parse the key word of the mutual relationship for text between representation page, extract the link that key word is corresponding, download the page that described link is corresponding from website, extract text in the page downloaded, store the text extracted;
When after the request receiving link corresponding to loading key word that client sends, the text of extraction is sent to client, this text is added in the text of the current page browsed by text loading scripts by client.
15. methods according to claim 14, wherein,
Described method also comprises:
Internal memory release script is injected to sending in the parent page of client, to make client after receiving the instruction loading link corresponding to key word, judge shared by the current page browsed, whether internal memory exceedes pre-set threshold value, if exceeded, then internal memory shared by the text browsed before discharging in this page.
16. methods according to claims 14 or 15, wherein,
Described method also comprises:
Injecting label reading function script and/or page selection function script to sending in the parent page of client, in the current page browsed, adding label reading function key to make client and/or select page function key.
17. methods according to claims 14 or 15, wherein,
In the page that described extraction is downloaded, text comprises further:
From the page downloaded, text is extracted according to page structure in page affiliated web site.
18. methods according to claims 14 or 15, wherein,
The described text extracted that stores comprises further:
Compression process is carried out to the text extracted, stores the compressed package generated.
19. methods according to claims 14 or 15, wherein,
Described method also comprises:
Extract the link that in the current page browsed of client, non-keyword is corresponding, the page that described link is corresponding is downloaded from website, compression process is carried out to the page downloaded, generate the page compressed package that link is corresponding, store this page compressed package, the link that what described non-keyword was corresponding be linked as except link corresponding to key word;
When after the request receiving link corresponding to non-keyword in the current page browsed of loading that client sends, send to client by linking corresponding page compressed package in this request.
20. methods according to claim 19, wherein,
Described method also comprises:
To send to the page that in the page compressed package of client, the page is browsed for client is current, link corresponding to the non-keyword comprised by this current page the browsed Link Ratio corresponding with the page compressed package stored comparatively, upgrades the page compressed package stored according to comparative result.
21. methods according to claim 20, wherein,
The described page compressed package stored according to comparative result renewal comprises further:
For not the link that comprises by this current page browsed, the page compressed package of this link correspondence is deleted;
For comprise in this current page browsed and the link that the non-keyword that is not stored of the page compressed package of correspondence is corresponding, the page of this link correspondence is downloaded from website, compression process is carried out to the page downloaded, generates the page compressed package of this link correspondence, store this page compressed package.
CN201310020113.3A 2013-01-18 2013-01-18 Realize server, client, system and method that in browser, the page loads Active CN103116609B (en)

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 CN103116609A (en) 2013-05-22
CN103116609B true 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)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105335139B (en) * 2014-07-24 2019-05-17 广州市动景计算机科技有限公司 Webpage display process and device
CN105634683B (en) * 2014-10-30 2019-03-15 阿里巴巴集团控股有限公司 Data transmission method and device
CN106055367B (en) * 2016-06-01 2021-06-18 腾讯科技(深圳)有限公司 Script file loading method and device
CN106777116B (en) * 2016-12-15 2021-10-15 腾讯科技(深圳)有限公司 Content acquisition method, user client, server and system
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

Citations (3)

* Cited by examiner, † Cited by third party
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

Patent Citations (3)

* Cited by examiner, † Cited by third party
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

Also Published As

Publication number Publication date
CN103116609A (en) 2013-05-22

Similar Documents

Publication Publication Date Title
CN103118081B (en) Server, client, the system and method for browsing pages in prestrain browser
CN103116609B (en) Realize server, client, system and method that in browser, the page loads
CN102457500B (en) Website scanning equipment and method
CN101201827B (en) Method and system for displaying web page
CN101997927A (en) Method and system for caching data of WEB platform
CN105335139B (en) Webpage display process and device
CN104572777B (en) Webpage loading method and device based on UIWebView component
CN111478956B (en) Deployment and preview method and device of small program package
CN102081633A (en) JavaScript file management method, device and system
CN103699600A (en) Data processing method for web cache and browser
CN104281574A (en) Information recommending method, device and system
CN103744845A (en) Method and system for WEB platform data caching
WO2007107100A1 (en) Method for accessing a parent page while browsing web pages
CN103377064A (en) Page script loading method and page script loading device
CN102819553B (en) A kind ofly carry out the mutual method of the page and device
CN103034495A (en) Browser capable of isolating plug-in in webpage and webpage plug-in isolating method
CN101355590A (en) Method, system and apparatus for prompting download
CN105260421A (en) Webpage loading method and apparatus
CN103077349B (en) A kind of method of browser side prompting access secure information and device
CN104199865A (en) Searching method, client-side and system of custom result providing content provider
CN103593396A (en) Network resource extracting method and device based on browser
CN105183890A (en) Webpage loading method based on browser and browser device
CN105260424A (en) Processing method and apparatus for webpage browsing historical records and most common accesses of user
CN102929489A (en) Implementation method of client browser and client browser
CN102156697A (en) Method and terminal equipment for realizing webpage application through widget

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