Specific embodiment
As shown in Figure 1, in one embodiment, a kind of webpage pre-head method includes the following steps:
Step S110 obtains the keyword of customized setting.
In the present embodiment, the keyword of customized setting is user according to the pre-added keyword of browsing intention.User
Corresponding keyword can be voluntarily added according to the web page contents that expectation browses to during opening any webpage using browser,
At this point, the addition operation triggering by user to be obtained to the keyword of customized setting.
Step S130 obtains the corresponding network linking of keyword in open webpage.
In the present embodiment, searched in the webpage when front opening according to keyword, to obtain corresponding to keyword
Network linking.Specifically, usually contain multiple fields in webpage, for example, the field in webpage be " lower one page ", it is " next
Chapter ", " video " and " picture " etc., wherein each field pre-sets corresponding network linking, user clicks any word
Section can be triggered by corresponding network linking and load webpage corresponding to the field, for example, the homepage institute in a certain website
The field for including is the Level-2 column of the homepage, and the field of user's click " video " can carry out the video column institute of the website
Webpage load.
Further, user open a certain webpage when, the field in webpage is searched according to keyword, obtain with
The field that keyword matches, and then obtain network linking corresponding to the field.For obtaining the keyword packet of network linking
It the keyword of user's currently customized setting has been included, but has been not limited to that, may also include and be set in browser
Keyword, for example, the already existing keyword in the customized setting keyword of active user.
Step S150 obtains webpage according to network linking, and caches the webpage of acquisition.
In the present embodiment, after obtaining network linking corresponding with keyword, it will be obtained by network linking accordingly
Webpage, and cached, to obtain word corresponding with the network linking by clicking operation or other operations triggering to user
When the webpage at section place, the webpage of caching is shown to user.
As shown in Fig. 2, in another embodiment, before above-mentioned steps S130 further include:
Step S210 updates the keyword of customized setting to set of keywords.
Several keywords are stored in the present embodiment, in set of keywords, for example, the key stored in set of keywords
Word can be preset in browser, customized setting when progress web page browsing before being also possible to user.It gets current
After the keyword of customized setting, the keyword of current customized setting need to be stored, be updated set of keywords
In conjunction, to facilitate the use of subsequent processes.In a preferred embodiment, set of keywords is in the form of a list to several
Keyword is orderly stored.
Step S230, extracts keyword from set of keywords.
In the present embodiment, several keywords are extracted from set of keywords, further to know required carry out in advance
The webpage of reading.
As shown in figure 3, in one embodiment, the detailed process of above-mentioned steps S130 includes:
Step S131 is searched in open webpage and is obtained the field to match with keyword.
In the present embodiment, when front opening webpage in included to webpage field be compared one by one, with obtain with
The field that keyword matches, wherein searching obtained field can be consistent with keyword, can also be with keyword phase
Seemingly.
Step S133 extracts the corresponding network linking of field, and initiates webpage acquisition request according to network linking.
In the present embodiment, network linking corresponding to the field is obtained according to obtained field is searched, and then according to the word
Network linking corresponding to section initiates webpage acquisition request by network, which generated according to network linking
's.
The detailed process of above-mentioned steps S150 are as follows: receive the webpage of request according to webpage acquisition request, and cache and ask
Seek the webpage of acquisition.
In the present embodiment, server, will be according in network acquisition request after receiving the webpage acquisition request of initiation
Network linking obtain corresponding webpage.And then the webpage of this request is returned into browser, at this point, being requested receiving
The webpage of acquisition, and cached.
As shown in figure 4, further including following steps after above-mentioned steps S150 in another embodiment:
Step S310 obtains network corresponding to the webpage of load according to the webpage load instruction triggered in open webpage
Link.
It can be that index gets corresponding webpage by network linking in several webpages of caching in the present embodiment.With
When family carries out the triggering webpage load operation such as clicking in open webpage to a certain field, webpage load instruction will be generated, into
And instruction is loaded by webpage and obtains network linking corresponding to the webpage of load.For example, user clicks the webpage for working as front opening
In " video " field, the load instruction of video web-pages will be generated at this time, which is obtained by the loads of video web-pages instruction
The network linking in face.
Step S330, the webpage of load is extracted according to network linking from the webpage of caching, and is shown.
It is in several webpages of index judgement caching according to network linking corresponding to the webpage of load in the present embodiment
It with the presence or absence of the webpage of request of loading, if so, extracting the webpage of load from the webpage of caching, and shows, if determining slow
In the webpage deposited and there is no the webpages of active user's load, then initiate webpage acquisition request to server according to network linking,
And then the webpage of request of loading is obtained by server.
As shown in figure 5, in one embodiment, a kind of pre- read apparatus of webpage, including keyword obtain module 110, link
Obtain module 130 and web cache module 150.
Keyword obtains module 110, for obtaining customized keyword.
In the present embodiment, the keyword of customized setting is user according to the pre-added keyword of browsing intention.User
Corresponding keyword can be voluntarily added according to the web page contents that expectation browses to during opening any webpage using browser,
At this point, keyword obtains the keyword that the addition operation triggering by user is obtained customized setting by module 110.
Link obtains module 130, for obtaining the corresponding network linking of keyword in open webpage.
In the present embodiment, link obtains module 130 and is searched in the webpage when front opening according to keyword, to obtain
Network linking corresponding to keyword.Specifically, usually contain multiple fields in webpage, for example, the field in webpage be " under
One page ", " next chapter ", " video " and " picture " etc., wherein each field pre-sets corresponding network linking, user
Webpage corresponding to the load field can be triggered by corresponding network linking by clicking either field, for example, in a certain net
The field that the homepage stood is included is the Level-2 column of the homepage, and the field that user clicks " video " can carry out the website
The load of webpage where video column.
Further, when user opens a certain webpage, link obtains module 130 according to keyword to the field in webpage
It is searched to obtain the field to match with keyword, and then obtains network linking corresponding to the field.For obtaining network
The keyword of link includes the keyword of user's currently customized setting, but is not limited to that, may also include browsing
The keyword being set in device, for example, the already existing keyword in the customized setting keyword of active user.
Web cache module 150 for obtaining webpage according to network linking, and caches the webpage of acquisition.
In the present embodiment, after obtaining network linking corresponding with keyword, web cache module 150 will pass through network
Link obtains corresponding webpage, and is cached, to be obtained and the net to user by clicking operation or other operations triggering
When network links the webpage where corresponding field, the webpage of caching is shown to user.
As shown in fig. 6, in another embodiment, the above-mentioned pre- read apparatus of webpage further includes update module 210 and key
Word extraction module 230.
Update module 210, for updating customized keyword to set of keywords.
Several keywords are stored in the present embodiment, in set of keywords, for example, the key stored in set of keywords
Word can be preset in browser, customized setting when progress web page browsing before being also possible to user.It gets current
After the keyword of customized setting, needs update module 210 to store the keyword of current customized setting, updated
Into set of keywords, to facilitate the use of subsequent processes.In a preferred embodiment, set of keywords is with the shape of list
Formula orderly stores several keywords.
Keyword-extraction module 230, for extracting keyword from set of keywords.
In the present embodiment, keyword-extraction module 230 extracts several keywords from set of keywords, with further
The webpage read in advance needed for knowing.
As shown in fig. 7, in one embodiment, it includes searching unit 131 and request hair that above-mentioned link, which obtains module 130,
Play unit 133.
Searching unit 131 obtains the field to match with keyword for searching in open webpage.
In the present embodiment, the field that searching unit 131 is included to webpage in the webpage when front opening compares one by one
It is right, to obtain the field to match with keyword, wherein searching obtained field can be consistent with keyword, can also be with
It is similar to keyword.
Request initiating cell 133 for extracting the corresponding network linking of field, and is initiated webpage according to network linking and is obtained
Request.
In the present embodiment, request initiating cell 133 obtains lattice chain corresponding to the field according to obtained field is searched
It connects, and then the network linking according to corresponding to the field initiates webpage acquisition request by network, which is root
It is generated according to network linking.
Web cache module 150 is also used to receive the webpage of request according to webpage acquisition request, and cache request obtains
The webpage taken.
In the present embodiment, server, will be according in network acquisition request after receiving the webpage acquisition request of initiation
Network linking obtain corresponding webpage.And then the webpage of this request is returned into browser, at this point, web cache mould
Block 150 will receive the webpage of request, and be cached.
As shown in figure 8, in another embodiment, the above-mentioned pre- read apparatus of webpage further includes webpage loading processing module 310
And webpage extraction module 330.
Webpage loading processing module 310, for according to the webpage load acquisition instruction load triggered in open webpage
Network linking corresponding to webpage.
It can be that index gets corresponding webpage by network linking in several webpages of caching in the present embodiment.With
When family carries out the triggering webpage load operation such as clicking in open webpage to a certain field, webpage loading processing module 310 will
Webpage load instruction is generated, and then instruction is loaded by webpage and obtains network linking corresponding to the webpage of load.For example, user
It clicks when " video " field in the webpage of front opening, webpage loading processing module 310 generates the load instruction of video web-pages, leads to
The load instruction for crossing video web-pages obtains the network linking of the video page.
Webpage extraction module 330 for extracting the webpage of load from the webpage of caching according to network linking, and is shown.
In the present embodiment, the network linking according to corresponding to the webpage of load of webpage extraction module 330 is that index judgement is slow
It whether there is the webpage of request of loading in several webpages deposited, if so, the webpage of load is extracted from the webpage of caching, and
Display is sent out according to network linking to server if determining in the webpage of caching and being not present the webpage of active user's load
Play webpage acquisition request, and then the webpage loaded by server.
The above-mentioned pre- read apparatus of webpage can be applied in browser improve the web page browsing speed of user.
Above-mentioned webpage pre-head method and device get correspondence in open webpage by the keyword of customized setting
Network linking, and then webpage is obtained according to network linking and is cached, realized and obtain the net that user may browse in advance
Page is realized by the keyword of the customized setting of user and improves web page browsing speed for different user.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with
Relevant hardware is instructed to complete by computer program, the program can be stored in a computer-readable storage medium
In, the program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, the storage medium can be magnetic
Dish, CD, read-only memory (Read-Only Memory, ROM) or random access memory (Random Access
Memory, RAM) etc..The embodiments described above only express several embodiments of the present invention, and description is more specific and detailed
Carefully, but it cannot be understood as limitations on the scope of the patent of the present invention.It should be pointed out that for the common skill of this field
For art personnel, without departing from the inventive concept of the premise, various modifications and improvements can be made, these belong to this hair
Bright protection scope.Therefore, the scope of protection of the patent of the invention shall be subject to the appended claims.