CN103294695A - Method and device for browsing webpage as well as method and device for extracting website - Google Patents

Method and device for browsing webpage as well as method and device for extracting website Download PDF

Info

Publication number
CN103294695A
CN103294695A CN2012100458862A CN201210045886A CN103294695A CN 103294695 A CN103294695 A CN 103294695A CN 2012100458862 A CN2012100458862 A CN 2012100458862A CN 201210045886 A CN201210045886 A CN 201210045886A CN 103294695 A CN103294695 A CN 103294695A
Authority
CN
China
Prior art keywords
web page
page address
address
web
network address
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
Application number
CN2012100458862A
Other languages
Chinese (zh)
Other versions
CN103294695B (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201210045886.2A priority Critical patent/CN103294695B/en
Publication of CN103294695A publication Critical patent/CN103294695A/en
Application granted granted Critical
Publication of CN103294695B publication Critical patent/CN103294695B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a method and a device for browsing a webpage as well as a method and a device for extracting a website, and belongs to the field of network communication, and belongs to the field of network communication. The method for browsing the webpage comprises the steps as follows: a site of the webpage is acquired, and whether the site of the webpage is a special website is judged; if the site of the webpage is a special website, webpage data are acquired according to a manner corresponding to the special website; and the special website comprises a WAP (wireless application protocol) webpage site with pre-stored webpage data values larger than a first preset threshold value or an HTML (hypertext markup language) webpage site with pre-stored webpage data values smaller than a second preset threshold value. According to the methods and the devices, under the condition that a to-be-browsed webpage site is an extracted special website, the network data are acquired according to the manner corresponding to the special website, so that the network traffic is reduced, the speed for acquiring the webpage data is increased, and the occupied capacity of the memory resources of a browser is reduced.

Description

Web browser method and device and network address extracting method and device
Technical field
The present invention relates to field of network communication, particularly a kind of Web browser method and device and network address extracting method and device.
Background technology
Along with the continuous development of computer technology, More and more factories drops into also increasing to the research and development of browser in the various portable terminals.Be example with the smart mobile phone, in mobile network's early stage of development, mobile phone browser only is used for resolving demonstration and follows WAP (Wireless Application Protocol, WAP (wireless application protocol)) simple web page of agreement, but along with the growth of people to information requirement, HTML in the Internet (HyperText Markup Language, the HTML (Hypertext Markup Language)) page also progressively can show in mobile phone browser.But the html web page content is very abundant usually, because cell phone platform resource-constrained, the internal memory that can give mobile phone browser is very limited (generally being no more than 300K) also, this makes mobile phone browser unusual poor efficiency when handling html web page, thereby makes the experience effect of mobile phone browser decline to a great extent.
Provide in the prior art a kind of under the internal memory condition of limited method of browsing page, see also shown in Figure 1, Fig. 1 be of the prior art a kind of under the internal memory condition of limited synoptic diagram of the method for browsing page.Generally, browser at first obtains web page address, web page address can be the web page address of WAP type or the web page address of HTML type, the acquiescence mode of browser access WAP types of web pages is: directly to web page server requested webpage data, i.e. step 1 and step 2 among the figure, specifically comprise: step 1, browser is to web page server requested webpage information; Step 2, web page server is to the corresponding web data of browser feedback.And the acquiescence mode of browser access HTML types of web pages is: obtain web data by acting server to web page server, i.e. step 3~step 6 among the figure specifically comprises: step 3, and browser sends web-page requests to acting server; Step 4, acting server send requested webpage information to web page server after receiving web-page requests; Step 5, web page server is to the corresponding web data of acting server feedback; Step 6, acting server are carried out dividing processing with web data after receiving web data, and the little page data after will cutting apart then is handed down to browser.
The proposition of technique scheme mainly be to consider that common WAP page content is fewer, and the html web page content is many, so just obtain web data according to acting server at html page.But during reality was used, not all html web page content was all many, and some html page is also fairly simple, as Baidu's homepage; And the content of some WAP page is also very many sometimes, comprise a lot of pictures such as a lot of pages in Taobao's website, the link of " demonstration residue " or " showing all " and so on is arranged in the WAP page of some literal classes in addition, and a click links, and will receive the WAP page of the complexity of thousands of words.This moment, following problems will appear in technique scheme: the first, also obtain web data by acting server for simple html page, and increased network traffics, also reduced browser networking speed; The second, the WAP page for the super many complexity of content directly obtains web data by web page server, may directly will deplete the memory source of browser, makes browser enter torpor, and any operation all no longer includes reflection.
Therefore, need a kind of improved technical scheme to solve the problems referred to above.
Summary of the invention
In order to reduce network traffics, improve browser networking speed, reduce the occupancy to the browser memory source, the embodiment of the invention provides a kind of Web browser method and device and network address extracting method and device.Described technical scheme is as follows:
A kind of Web browser method, it comprises:
Obtain web page address, and judge whether described web page address is special network address;
If described web page address is described special network address, then according to obtaining web data with the corresponding mode of described special network address;
Wherein, described special network address comprises the size of the web data that prestores greater than the WAP page address of first predetermined threshold, and the size of the web data that perhaps prestores is less than the html web page address of second predetermined threshold.
Further, if described web page address be the size of the described web data that prestores greater than the WAP page address of first predetermined threshold, then according to obtaining web data with the corresponding mode of described special network address, specifically comprise:
Send web-page requests to acting server, carry described web page address in the described web-page requests;
Receive the web data that described acting server returns.
Further, if described web page address be the size of the described web data that prestores less than the html web page address of second predetermined threshold, then according to obtaining web data with the corresponding mode of described special network address, specifically comprise:
Send web-page requests to web page server, carry described web page address in the described web-page requests;
Receive the web data that described web page server returns.
A kind of web page browsing device is characterized in that it comprises:
First judge module is used for obtaining web page address, and judges whether described web page address is special network address;
First acquisition module is used for when described first judge module judges that described web page address is described special network address, according to obtaining web data with the corresponding mode of described special network address;
Wherein, described special network address comprises the size of the web data that prestores greater than the WAP page address of first predetermined threshold, and the size of the web data that perhaps prestores is less than the html web page address of second predetermined threshold.
Further, if described web page address be the size of the described web data that prestores greater than the WAP page address of first predetermined threshold, described first acquisition module specifically comprises:
First transmitting element is used for sending web-page requests to acting server, carries described web page address in the described web-page requests;
First receiving element is used for receiving the web data that described acting server returns.
Further, described web page address be the size of the described web data that prestores less than the html web page address of second predetermined threshold, described first acquisition module specifically comprises:
Second transmitting element is used for sending web-page requests to web page server, carries described web page address in the described web-page requests;
Second receiving element is used for receiving the web data that described web page server returns.
A kind of network address extracting method, it comprises:
Obtain web page address, and obtain web data by described web page address to web page server;
Judge whether the described web data that gets access to satisfies predetermined condition;
If the described web data that gets access to satisfies described predetermined condition, then described web page address is stored as special network address;
Wherein, described special network address comprises the size of web data greater than the WAP page address of first predetermined threshold, and perhaps the size of web data is less than the html web page address of second predetermined threshold.
Further, describedly judge that whether described web data satisfies predetermined condition, also comprises before:
Determine the type of described web page address, the type of described web page address comprises: WAP type or HTML type.
Further, if described web page address is the web page address of WAP type, then whether the size of the described web data that gets access to of described judgement satisfies predetermined condition; If the size of the described web data that gets access to satisfies described predetermined condition, then described web page address is stored as special network address, specifically comprise:
Judge that whether the size of described web data is greater than first predetermined threshold;
If the size of described web data then is stored as special network address with described web page address greater than described first predetermined threshold.
Further, if described web page address is the web page address of HTML type, then whether the size of the described web data that gets access to of described judgement satisfies predetermined condition; If the size of the described web data that gets access to satisfies described predetermined condition, then described web page address is stored as special network address, specifically comprise:
Judge that whether the size of described web data is less than second predetermined threshold;
If the size of described web data then is stored as special network address with described web page address less than described second predetermined threshold.
Further, described described web page address is stored as special network address, specifically comprises:
Convert described web page address to Hash codes by default hash function, and the described web page address of Hash codes form is stored as special network address.
A kind of network address extraction element, it comprises:
Second acquisition module is used for obtaining web page address, and obtains web data by described web page address to web page server;
Second judge module is used for judging whether the described web data that gets access to satisfies predetermined condition;
Memory module is used for when described second judge module judges that the size of described web data satisfies described predetermined condition described web page address being stored as special network address;
Wherein, described special network address comprises the size of web data greater than the WAP page address of first predetermined threshold, and perhaps the size of web data is less than the html web page address of second predetermined threshold.
Further, described device also comprises:
Determination module, for the type of determining described web page address, the type of described web page address comprises: WAP type or HTML type.
Further, if described web page address is the web page address of WAP type,
Described second judge module specifically is used for: judge that whether the size of described web data is greater than first predetermined threshold;
Described memory module specifically is used for: when described second judge module is judged described first predetermined threshold of the size first of described web data, described web page address is stored as special network address.
Further, if described web page address is the web page address of HTML type,
Described second judge module specifically is used for: judge that whether the size of described web data is less than second predetermined threshold;
Described memory module specifically is used for: the size of judging described web data at described second judge module is stored as special network address with described web page address during less than described second predetermined threshold.
Further, described memory module specifically is used for:
Convert described web page address to Hash codes by default hash function, and the described web page address of Hash codes form is stored as special network address.
The beneficial effect that the technical scheme that the embodiment of the invention provides is brought is:
By special network address extracting method will need by web page server obtain web data the HTML type web page address and need extract as special network address by the web page address that acting server obtains the WAP type of web data, judge by Web browser method whether the web page address of desiring to browse is described special network address, if described special network address, then can obtain web data according to the corresponding mode of described special network address, thereby reduction network traffics, improve browser networking speed, reduce the occupancy to the browser memory source.
Description of drawings
In order to be illustrated more clearly in the technical scheme in the embodiment of the invention, the accompanying drawing of required use is done to introduce simply in will describing embodiment below, apparently, accompanying drawing in describing below only is some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 be of the prior art a kind of under the internal memory condition of limited synoptic diagram of the method for browsing page;
Fig. 2 is the enforcement environment synoptic diagram of the Web browser method that provides of the embodiment of the invention;
Fig. 3 is the schematic flow sheet of the network address extracting method that provides of the embodiment of the invention one;
Fig. 4 is the block diagram of the network address extraction element that provides of the embodiment of the invention two;
Fig. 5 is the schematic flow sheet of the Web browser method that provides of the embodiment of the invention three;
Fig. 6 is the block diagram of the web page browsing device that provides of the embodiment of the invention four.
Embodiment
For making the purpose, technical solutions and advantages of the present invention clearer, embodiment of the present invention is described further in detail below in conjunction with accompanying drawing." browser " of indication browser for installing in the browser in the mobile phone or other terminal among the present invention.
Please refer to Fig. 2, it shows the enforcement environment synoptic diagram of the Web browser method that the embodiment of the invention provides.This enforcement environment can comprise browser 210, web page server 220 and acting server 230.
Browser 210 is contained in the terminal, and such as being contained in the terminals such as mobile phone, computer, it can obtain web data and web data is presented on the screen of terminal, browses for the user.
Web page server 220 is used for preserving the web data of all kinds webpage, such as the web data of WAP type or the web data of HTML type etc.
Acting server 230 can cut the web data that receives, such as big webpage being cut into a plurality of little webpages.
Embodiment one
When carrying out web page browsing, judge at first whether the web page address get access to is the special network address of presetting, when the web page address that gets access to when judgement is special network address, can obtain web data according to the corresponding manner to special network address definition.Therefore, before web page browsing, to the judgement of web page address, a kind of embodiment of the special network address extracting method here can be referring to shown in Figure 3 when at first needing to obtain a series of special network address for web page browsing.
Fig. 3 is the schematic flow sheet of the network address extracting method that provides of the embodiment of the invention one, and this network address extracting method can be applied to also can be applied in the acting server 230 among Fig. 2 in the browser 210 of Fig. 2.The network address extracting method comprises:
Step 310 is obtained web page address, and obtains web data by web page address to web page server.
Web page address can be the web page address of WAP type or the web page address of HTML type.
Browser 210 and acting server 230 all can obtain web data to web page server 220 by web page address.
Step 320 judges whether the web data that gets access to satisfies predetermined condition.
Usually, before this step, the network address extracting method can also comprise: determine the type of web page address, the type of web page address comprises: WAP type or HTML type.
When web page address is the web page address of WAP type, judge that whether the web data that gets access to satisfies predetermined condition, is specifically as follows: judge that whether the size of the web data that gets access to is greater than first predetermined threshold.
When web page address is the web page address of HTML type, judge that whether the web data that gets access to satisfies predetermined condition, is specifically as follows: judge that whether the size of the web data that gets access to is less than second predetermined threshold.
Wherein, first predetermined threshold can be identical with second predetermined threshold.
Step 330 if the web data that gets access to satisfies predetermined condition, then is stored as web page address special network address.
If web page address is the web page address of WAP type, and the size of judging the web data get access to then is stored as web page address special network address during greater than first predetermined threshold.
When web page address is the web page address of HTML type, and the size of judging the web data that gets access to then is stored as web page address special network address during less than second predetermined threshold.
In order to accelerate in the web page browsing process inquiry velocity to special network address, can distinguish storage to the special network address here, such as, the web data size is stored as the special network address of the first kind greater than the web page address of the WAP type of first predetermined threshold, the web data size is stored as the special network address of second type less than the web page address of the HTML type of second predetermined threshold.
Usually, web page address being stored as special network address (such as the special network address of the first kind) afterwards, can interrupt obtaining the process of web data, and obtain web data by web page address to acting server 230 again from web page server 220; Can certainly after interrupting from web page server 220, obtaining the process of web data, on terminal screen, only show the web data that has obtained.
If the web data that gets access to does not satisfy predetermined condition, when namely if web page address is the web page address of WAP type, the size of the web data that gets access to is less than or equal to first predetermined threshold, if or web page address is when being the web page address of HTML type, the size of the web data that gets access to is then obtained web data according to the acquiescence mode of web page address correspondence more than or equal to second predetermined threshold.
When web page address was the web page address of WAP type, special network address extracting method can be applied in the browser 210 among Fig. 2.When web page address is the web page address of HTML type, special network address extracting method can be applied in the acting server 230 among Fig. 2, this moment is in order to make browser 210 to obtain web data according to the situation of special network address, also need web page address be stored as special network address (such as the special network address of second type) afterwards at acting server 230, give browser 210 synchronously every the special network address that predetermined time interval will obtain.
In actual applications, storage space is limited, along with the special network address of obtaining is more and more, in order to store more special network address, can be when web page address be stored as special network address, at first convert web page address to Hash codes by default hash function, the web page address with the Hash codes form is stored as special network address then.
In sum, the special network address extracting method that the embodiment of the invention one provides can will extract and be stored as special network address greater than the web page address of the WAP type of first predetermined threshold with less than the web page address of the HTML type of second predetermined threshold, so that browser is when web page browsing, when the web page address that gets access to when judgement is special network address, can obtain web data according to the corresponding manner to special network address definition.
Embodiment two
Fig. 4 is the block diagram of the network address extraction element that provides of the embodiment of the invention two, and this network address extraction element can be applied to also can be applied in the acting server 230 among Fig. 2 in the browser 210 of Fig. 2.The network address extraction element comprises second acquisition module 410, determination module 420, second judge module 430 and memory module 430.
Second acquisition module 410 is used for obtaining web page address, and obtains web data by web page address to web page server.
Web page address can be the web page address of WAP type or the web page address of HTML type.
Browser 210 and acting server 230 all can obtain web data to web page server 220 by web page address.
Determination module 420 is used for determining the type of web page address, and the type of web page address comprises: WAP type or HTML type.
Second judge module 430 is used for judging whether the web data that gets access to satisfies predetermined condition.
If web page address is the web page address of WAP type, second judge module 430 can be used for judging that whether the size of the web data that gets access to is greater than first predetermined threshold.
When web page address was the web page address of HTML type, second judge module 430 can be used for judging that whether the size of the web data that gets access to is less than second predetermined threshold.
Wherein, first predetermined threshold can be identical with second predetermined threshold.
Memory module 440 is used for when second judge module 430 judges that web data satisfies predetermined condition web page address being stored as special network address.
If web page address is the web page address of WAP type, and the size of judging the web data that gets access at second judge module 430 is during greater than first predetermined threshold, and memory module 440 is stored as special network address with web page address.
If web page address is the web page address of HTML type, and the size of judging the web data that gets access at second judge module 430 is during less than second predetermined threshold, and memory module 440 is stored as special network address with web page address.
In order to accelerate in the web page browsing process inquiry velocity to special network address, can distinguish storage to the special network address here, such as, the web data size is stored as the special network address of the first kind greater than the web page address of the WAP type of first predetermined threshold, the web data size is stored as the special network address of second type less than the web page address of the HTML type of second predetermined threshold.
When web page address was the web page address of WAP type, special network address extraction element can be applied in the browser 210 among Fig. 2.When web page address is the web page address of HTML type, special network address extraction element can be applied in the acting server 230 among Fig. 2, this moment is in order to make browser 210 to obtain web data according to the situation of special network address, special network address extraction element can also comprise synchronization module, after web page address being stored as the special network address of second type, synchronization module is given browser 210 synchronously every the special network address of second type that predetermined time interval will obtain.
In actual applications, storage space is limited, along with the special network address of obtaining is more and more, in order to store more special network address, memory module 440 is when being stored as special network address with web page address, can at first convert web page address to Hash codes by default hash function, the web page address with the Hash codes form is stored as special network address then.
Need to prove: the network address extraction element that above-described embodiment provides is when the present invention describes, only the division with above-mentioned each functional module is illustrated, in the practical application, can as required the above-mentioned functions distribution be finished by different functional modules, the inner structure that is about to device is divided into different functional modules, to finish all or part of function described above.In addition, the network address extraction element that above-described embodiment provides and network address extracting method embodiment belong to same design, and its specific implementation process sees method embodiment for details, repeats no more here.
In sum, the special network address extraction element that the embodiment of the invention two provides can will extract and be stored as special network address greater than the web page address of the WAP type of first predetermined threshold with less than the web page address of the HTML type of second predetermined threshold, so that when web page browsing, when the web page address that obtains when judgement is special network address, can obtain web data according to the corresponding manner to special network address definition.
Embodiment three
Under the situation of the special network address that existence prestores, can judge whether the web page address that gets access to is special network address with this, when the web page address that obtains when judgement is special network address, can obtain web data according to the corresponding manner to special network address definition, detailed process can be referring to shown in Figure 5.
Fig. 5 is the schematic flow sheet of the Web browser method that provides of the embodiment of the invention three, and this Web browser method can be applied in the browser 210 of Fig. 2.Web browser method comprises:
Step 510 is obtained web page address, and judges whether web page address is special network address.
Web page address can be the web page address of WAP type or the web page address of HTML type.
Special network address is the special network address that prestores, and generally can comprise the web data size that prestores greater than the web page address of the WAP type of first predetermined threshold, and the size of the web data that perhaps prestores is less than the html web page address of second predetermined threshold.
Usually, speed when judging in order to improve whether web page address is special network address, special network address can distinguish in advance that to be stored as the first kind special and second type is special, certainly, also the special network address that the not difference of being scheduled to is stored can be categorized into the special network address of the first kind or the special network address of second type.Wherein, the size of the web data that prestores is stored as the special network address of the first kind greater than the WAP page address difference of first predetermined threshold, the size of the web data that prestores is stored as the special network address of second type less than the html web page address difference of second predetermined threshold.
First predetermined threshold can be identical with second predetermined threshold.When judging whether web page address is special network address, can be in obtaining the process of web data, judge whether the size of web data reaches the lower safety limit of internal memory, general, if reach the lower safety limit of internal memory, show that then web data is bigger, may need to obtain web data by acting server 230 that the value of the lower safety limit of internal memory can wait and be all first predetermined threshold at this moment here; And if do not reach the lower safety limit of internal memory, show that then web data is smaller, may directly obtain web data by web page server 220, here the value of the lower safety limit of internal memory can wait and be all second predetermined threshold at this moment, therefore can arrange identical with second predetermined threshold first predetermined threshold.
Need to prove, judge that the purpose whether internal memory that terminal provides for browser 210 reaches lower safety limit is to want to judge whether this free memory is enough (if free memory is enough when browser 210 shows these webpages, then show and directly to obtain web data by web page server 220, if free memory is not enough, show that then web data is bigger, can need to obtain web data by acting server 230).In actual applications, whether enough in the time of can also passing through other factor auxiliary judgment browser 210 display web pages, such as, can judge with the size that obtains webpage by the web length field in the web-page requests header packet information, to judge whether this webpage internal memory reaches the lower limit of free memory, if this webpage is handled through overcompression, also must consider the actual size of webpage behind the decompress(ion).Certainly, whether enough Considerations not only are confined to above-mentioned factor when existing browser 210 to show this webpage in the judgement, just no longer describe in detail here.
Step 520 is if web page address is special network address, then according to obtaining web data with the corresponding mode of special network address.
If web page address be the size of the web data that prestores greater than the web page address of the WAP type of first predetermined threshold, according to obtaining web data with the corresponding mode of special network address, specifically can be:
The first, send web-page requests to acting server 230, carry web page address in the web-page requests;
The second, receive the web data that acting server 230 returns.
If web page address be the size of the web data that prestores less than the web page address of the HTML type of second predetermined threshold, according to obtaining web data with the corresponding mode of special network address, specifically can be:
The first, send web-page requests to web page server 220, carry web page address in the web-page requests;
The second, receive the web data that web page server 220 returns.
That is to say, when web page address is web page address greater than the WAP type of first predetermined threshold, can obtain web data to acting server 230 by web page address, and when web page address be when being less than or equal to the web page address of WAP type of first predetermined threshold, still can obtain web data to web page server 220 by web page address; When web page address is web page address less than the HTML type of second predetermined threshold, can obtain web data to web page server 220 by web page address, and when web page address is web page address more than or equal to the HTML type of second predetermined threshold, still can obtain web data to acting server 230 by web page address.
Can be understood as: when web page address is special network address, can be by the corresponding mode of special network address definition be obtained web data, and when web page address is not special network address, is still by the acquiescence mode of this type of webpage of the prior art and obtains web data.Obtaining web data by the acquiescence mode of this type of webpage of the prior art is specifically as follows: when web page address is the web page address of WAP type, and when not being the special network address of the first kind, then obtain web data by web page address to web page server 220; When web page address is the web page address of HTML type, and when not being the special network address of second type, then obtain web data by web page address to acting server 230.
In addition, can be learnt by special network address extracting mode, can be along with the special network address of the first kind be constantly stored in the increase to the access times of WAP types of web pages in the browser 210, and acting server 230 also can constantly be synchronized to the special network address of second type in the browser 210.In actual applications, along with the number of times of browsing page constantly increases, the special network address quantity of storage also will constantly increase in the browser 210, and the internal memory that terminal provides for browser 210 is limited, this moment is in order to reduce the EMS memory occupation amount, can be according to storage time or the corresponding special network address of accessed number of times deletion of special network address, wherein, the accessed number of times of special network address refers to that the web page address that has obtained is the number of times of special network address.
A kind of method of deleting special network address is: can delete storage time apart from the current time greater than the special network address of the 3rd predetermined threshold, wherein the 3rd predetermined threshold can be arranged to 7 days or 30 days etc.Need to prove that the setting of the 3rd predetermined threshold not only is the above-mentioned value of enumerating, and can also be worth for other, even can platform be set for the user provides, and it can be arranged as required voluntarily.
Such as, can be every first predetermined time interval (can be 10 days or 20 days etc.) deletion storage time apart from the current time the special network address greater than the 3rd predetermined threshold; Also can set an application program for detection of the internal memory of storing special network address, when this application program detected the low memory of the special network address of storage, deletion storage time apart from the current time was greater than the special network address of the 3rd predetermined threshold; Can also judge remaining internal memory according to some parameters of the special network address internal memory correspondence of storage, if this parameter is indicated remaining low memory, then delete storage time apart from the current time greater than the special network address of the 3rd predetermined threshold.In actual applications, judge that the method for free memory deficiency is not limited only to above-mentioned method, just no longer describe in detail here.
The method of the special network address of deletion that another kind is more excellent is:
The first, when judging that web page address is special network address, the accessed number of times of the special network address of correspondence is added 1;
The second, judge that whether the accessed number of times of each special network address is less than the 4th predetermined threshold;
Such as, can judge that whether the access number of each special network address is less than the 4th predetermined threshold every second predetermined time interval (as 5 days, 10 days or 20 days etc.); Also can set an application program for detection of the internal memory of storing special network address, when this application program detects the low memory of the special network address of storage, judge that whether the accessed number of times of each special network address is less than the 4th predetermined threshold; Can also judge remaining internal memory according to some parameters of the special network address internal memory correspondence of storage, if this parameter is indicated remaining low memory, judge that then whether the accessed number of times of each special network address is less than the 4th predetermined threshold.In actual applications, judge that the method for free memory deficiency is not limited only to above-mentioned method, just no longer describe in detail here.
The 3rd, if the accessed number of times that determines a special network address less than the 4th predetermined threshold, the special address of deletion from default special network address then, wherein the 4th predetermined threshold can be set to 10,20 or 100 etc.Need to prove that the setting of the 4th predetermined threshold not only is the above-mentioned value of enumerating, and can also be worth for other, even can platform be set for the user provides, and it can be arranged as required voluntarily.
First predetermined time interval and second predetermined time interval can be set according to the size of the internal memory that is used for the special network address of storage, also can set it according to other qualificationss, just no longer describe in detail here.
In actual applications, user even can when deciding the redundant special network address of deletion in its sole discretion, select to delete less than the special network address of the 4th predetermined threshold greater than special network address or the accessed number of times of the 3rd predetermined threshold apart from the current time.
This method can be deleted the special network address that seldom conducts interviews, and keeps the often special network address of visit, thereby can guarantee that in use reasonable saving flow improves access speed, and has saved internal memory greatly.
It is worthy of note, in actual applications, the 3rd predetermined threshold and the 4th predetermined threshold can be that the value of the internal memory set of browser is set according to terminal, or can set according to the internal memory that is used for the special network address of storage, certainly can also set by other qualifications, just no longer describe in detail here.
In sum, the Web browser method that the embodiment of the invention three provides can obtain web data according to the corresponding mode of special network address learning that web page address is under the situation of special network address, thereby reduces network traffics, improve browser networking speed, reduce the occupancy to the browser memory source.
Embodiment four
Fig. 6 is the block diagram of the web page browsing device that provides of the embodiment of the invention four, and this web page browsing device can be applied in the browser 210 of Fig. 2.The web page browsing device comprises: first judge module 610 and first acquisition module 620.
First judge module 610 can be used for obtaining web page address, and judges whether web page address is special network address.
First acquisition module 620 can be used for when first judge module 620 judges that web page address is special network address, according to obtaining web data with the corresponding mode of special network address.
If web page address be the size of the web data that prestores greater than the WAP page address of first predetermined threshold, first acquisition module 620 can comprise first transmitting element and first receiving element.
First transmitting element can be used for sending web-page requests to acting server 230, carries described web page address in the web-page requests.
First receiving element can be used for receiving the web data that acting server 230 returns.
If web page address be the size of the web data that prestores less than the html web page address of second predetermined threshold, first acquisition module 620 can comprise second transmitting element and second receiving element.
Second transmitting element can be used for sending web-page requests to web page server 220, carries described web page address in the web-page requests.
Second receiving element can be used for receiving the web data that web page server 220 returns.
Can be learnt by special network address extracting mode, can be along with the special network address of the first kind be constantly stored in the increase to the access times of WAP types of web pages in the browser 210, and acting server 230 also can constantly be synchronized to the special network address of second type in the browser 210.In actual applications, along with the number of times of browsing page constantly increases, the special network address quantity of storage also will constantly increase, and the internal memory that terminal provides for browser 210 is limited, then need this moment the special network address of storage is deleted, at this moment, the web page browsing device can also comprise removing module.
Removing module can be used for according to the storage time of special network address or the corresponding special network address of accessed number of times deletion, and wherein, the accessed number of times of described special network address refers to that the web page address that has obtained is the number of times of described special network address.
For instance, removing module can be used for deletion storage time apart from the current time greater than the special network address of the 3rd predetermined threshold, and wherein, the 3rd predetermined threshold can be arranged to 7 days or 30 days etc.Need to prove that the setting of the 3rd predetermined threshold not only is the above-mentioned value of enumerating, and can also be worth for other, even can platform be set for the user provides, and it can be arranged as required voluntarily.
Again for instance, removing module can also be used for: when judging that web page address is special network address, the accessed number of times of the special network address of correspondence is added 1; Judge that whether the accessed number of times of each special network address is less than the 4th predetermined threshold; If determine the accessed number of times of a special network address less than the 4th predetermined threshold, the special address of deletion from default special network address then, wherein the 4th predetermined threshold can be set to 10,20 or 100 etc.Need to prove that the setting of the 4th predetermined threshold not only is the above-mentioned value of enumerating, and can also be worth for other, even can platform be set for the user provides, and it can be arranged as required voluntarily.
In actual applications, user even can when deciding the redundant special network address of deletion in its sole discretion, select to delete less than the special network address of the 4th predetermined threshold greater than special network address or the accessed number of times of the 3rd predetermined threshold apart from the current time.
Need to prove: the web page browsing device that above-described embodiment provides is when the present invention describes, only the division with above-mentioned each functional module is illustrated, in the practical application, can as required the above-mentioned functions distribution be finished by different functional modules, the inner structure that is about to device is divided into different functional modules, to finish all or part of function described above.In addition, web page browsing device and Web browser method embodiment that above-described embodiment provides belong to same design, and its specific implementation process sees method embodiment for details, repeats no more here.
In sum, the web page browsing device that the embodiment of the invention four provides can learn that web page address is under the situation of special network address, obtain web data according to the corresponding mode of special network address, thereby reduction network traffics, improve the speed of obtaining web data, reduce the occupancy to the browser memory source.
It should be noted that, in actual applications, can there be a large amount of browser 210, each browser 210 all extracts a large amount of special network address by the network address extracting method, the special network address of having stored for better utilization, reduce network traffics, improve the speed of browsing page, the special network address of having stored in a plurality of browsers 210 can be sent in the acting server 230 (such as, the special network address that to store when relatively more idle when browser 210 sends in the acting server 230), the special network address that acting server 230 will get access to gathers, and opens or other suitable times at browser 210, and the special network address after will gathering feeds back to browser 210.Can reduce each browser 210 in a large number like this
Extract the time of special network address, accelerated the speed of browsing page.
Certainly, in order to reduce the load to acting server 230, also a station server can be set in addition, being used for the gathering special network address that each browser 210 has been stored, and the special network address after will gathering feeds back to each browser 210.
The all or part of step that one of ordinary skill in the art will appreciate that realization above-described embodiment can be finished by hardware, also can instruct relevant hardware to finish by program, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium of mentioning can be ROM (read-only memory), disk or CD etc.
The above only is preferred embodiment of the present invention, and is in order to limit the present invention, within the spirit and principles in the present invention not all, any modification of doing, is equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (16)

1. Web browser method is characterized in that it comprises:
Obtain web page address, and judge whether described web page address is special network address;
If described web page address is described special network address, then according to obtaining web data with the corresponding mode of described special network address;
Wherein, described special network address comprises the size of the web data that prestores greater than the WAP page address of first predetermined threshold, and the size of the web data that perhaps prestores is less than the html web page address of second predetermined threshold.
2. method according to claim 1, it is characterized in that, if described web page address be the size of the described web data that prestores greater than the WAP page address of first predetermined threshold, then according to obtaining web data with the corresponding mode of described special network address, specifically comprise:
Send web-page requests to acting server, carry described web page address in the described web-page requests;
Receive the web data that described acting server returns.
3. the method for claim 1, it is characterized in that, if described web page address be the size of the described web data that prestores less than the html web page address of second predetermined threshold, then according to obtaining web data with the corresponding mode of described special network address, specifically comprise:
Send web-page requests to web page server, carry described web page address in the described web-page requests;
Receive the web data that described web page server returns.
4. web page browsing device is characterized in that it comprises:
First judge module is used for obtaining web page address, and judges whether described web page address is special network address;
First acquisition module is used for when described first judge module judges that described web page address is described special network address, according to obtaining web data with the corresponding mode of described special network address;
Wherein, described special network address comprises the size of the web data that prestores greater than the WAP page address of first predetermined threshold, and the size of the web data that perhaps prestores is less than the html web page address of second predetermined threshold.
5. device according to claim 4 is characterized in that, if described web page address be the size of the described web data that prestores greater than the WAP page address of first predetermined threshold, described first acquisition module specifically comprises:
First transmitting element is used for sending web-page requests to acting server, carries described web page address in the described web-page requests;
First receiving element is used for receiving the web data that described acting server returns.
6. device according to claim 4 is characterized in that, if described web page address be the size of the described web data that prestores less than the html web page address of second predetermined threshold, described first acquisition module specifically comprises:
Second transmitting element is used for sending web-page requests to web page server, carries described web page address in the described web-page requests;
Second receiving element is used for receiving the web data that described web page server returns.
7. network address extracting method is characterized in that it comprises:
Obtain web page address, and obtain web data by described web page address to web page server;
Judge whether described web data satisfies predetermined condition;
If described web data satisfies described predetermined condition, then described web page address is stored as special network address;
Wherein, described special network address comprises the size of web data greater than the WAP page address of first predetermined threshold, and perhaps the size of web data is less than the html web page address of second predetermined threshold.
8. method according to claim 7 is characterized in that, describedly judges that whether described web data satisfies predetermined condition, also comprises before:
Determine the type of described web page address, the type of described web page address comprises: WAP type or HTML type.
9. method as claimed in claim 8 is characterized in that, if described web page address is the web page address of WAP type, then describedly judges whether described web data satisfies predetermined condition; If described web data satisfies described predetermined condition, then described web page address is stored as special network address, specifically comprise:
Judge that whether the size of described web data is greater than first predetermined threshold;
If the size of described web data then is stored as special network address with described web page address greater than described first predetermined threshold.
10. method according to claim 8 is characterized in that, if described web page address is the web page address of HTML type, then describedly judges whether described web data satisfies predetermined condition; If described web data satisfies described predetermined condition, then described web page address is stored as special network address, specifically comprise:
Judge that whether the size of described web data is less than second predetermined threshold;
If the size of described web data then is stored as special network address with described web page address less than described second predetermined threshold.
11. according to arbitrary described method among the claim 7-10, it is characterized in that, described described web page address is stored as special network address, specifically comprise:
Convert described web page address to Hash codes by default hash function, and the described web page address of Hash codes form is stored as special network address.
12. a network address extraction element is characterized in that it comprises:
Second acquisition module is used for obtaining web page address, and obtains web data by described web page address to web page server;
Second judge module is used for judging whether obtain described web data satisfies predetermined condition;
Memory module is used for when described second judge module judges that the size of described web data satisfies described predetermined condition described web page address being stored as special network address;
Wherein, described special network address comprises the size of web data greater than the WAP page address of first predetermined threshold, and perhaps the size of web data is less than the html web page address of second predetermined threshold.
13. device according to claim 12 is characterized in that, described device also comprises:
Determination module, for the type of determining described web page address, the type of described web page address comprises: WAP type or HTML type.
14. device according to claim 13 is characterized in that, if described web page address is the web page address of WAP type,
Described second judge module specifically is used for: judge that whether the size of described web data is greater than first predetermined threshold;
Described memory module specifically is used for: the size of judging described web data at described second judge module is stored as special network address with described web page address during greater than described first predetermined threshold.
15. device according to claim 13 is characterized in that, if described web page address is the web page address of HTML type,
Described second judge module specifically is used for: judge that whether the size of described web data is less than second predetermined threshold;
Described memory module specifically is used for: the size of judging described web data at described second judge module is stored as special network address with described web page address during less than described second predetermined threshold.
16. according to arbitrary described device among the claim 12-15, it is characterized in that described memory module specifically is used for:
Convert described web page address to Hash codes by default hash function, and the described web page address of Hash codes form is stored as special network address.
CN201210045886.2A 2012-02-27 2012-02-27 Web browser method and device and network address extracting method and device Active CN103294695B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210045886.2A CN103294695B (en) 2012-02-27 2012-02-27 Web browser method and device and network address extracting method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210045886.2A CN103294695B (en) 2012-02-27 2012-02-27 Web browser method and device and network address extracting method and device

Publications (2)

Publication Number Publication Date
CN103294695A true CN103294695A (en) 2013-09-11
CN103294695B CN103294695B (en) 2017-09-12

Family

ID=49095587

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210045886.2A Active CN103294695B (en) 2012-02-27 2012-02-27 Web browser method and device and network address extracting method and device

Country Status (1)

Country Link
CN (1) CN103294695B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104090801A (en) * 2014-07-11 2014-10-08 Tcl通讯(宁波)有限公司 Method for fast opening webpage of mobile terminal browser and browser
CN104639588A (en) * 2013-11-14 2015-05-20 腾讯科技(北京)有限公司 Method, device and system for downloading files

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6389423B1 (en) * 1999-04-13 2002-05-14 Mitsubishi Denki Kabushiki Kaisha Data synchronization method for maintaining and controlling a replicated data
CN1471017A (en) * 2002-07-26 2004-01-28 英业达集团(南京)电子技术有限公司 Method for automatic identifying different-format web sites by browser
CN101197849A (en) * 2007-12-21 2008-06-11 腾讯科技(深圳)有限公司 Method and device for commuting internet page into wireless application protocol page

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6389423B1 (en) * 1999-04-13 2002-05-14 Mitsubishi Denki Kabushiki Kaisha Data synchronization method for maintaining and controlling a replicated data
CN1471017A (en) * 2002-07-26 2004-01-28 英业达集团(南京)电子技术有限公司 Method for automatic identifying different-format web sites by browser
CN101197849A (en) * 2007-12-21 2008-06-11 腾讯科技(深圳)有限公司 Method and device for commuting internet page into wireless application protocol page

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104639588A (en) * 2013-11-14 2015-05-20 腾讯科技(北京)有限公司 Method, device and system for downloading files
CN104639588B (en) * 2013-11-14 2019-07-16 腾讯科技(北京)有限公司 A kind of document down loading method, device and system
CN104090801A (en) * 2014-07-11 2014-10-08 Tcl通讯(宁波)有限公司 Method for fast opening webpage of mobile terminal browser and browser

Also Published As

Publication number Publication date
CN103294695B (en) 2017-09-12

Similar Documents

Publication Publication Date Title
RU2522103C2 (en) Update notification method and browser
CN102867007B (en) Web browser method and device
CN101674329B (en) Internet access method and Internet access system
CN101583072B (en) Middleware product for realizing Mobile Internet and method thereof
KR100848319B1 (en) Harmful web site filtering method and apparatus using web structural information
CN102663135B (en) Method and device for implementing graphical bookmark for embedded browser, and terminal
CN103123630A (en) Method, system, mobile terminal and server for obtaining webpage contents
CN101178717A (en) Method for adaptation processing web page and web page adaptation device
CN101702173A (en) Method and device for increasing access speed of mobile portal dynamic page
CN106817391A (en) Document breakpoint transmission method and apparatus
CN102624756B (en) Data download terminal and data download method
CN105721538A (en) Data access method and apparatus
CN102819554A (en) Favorite data processing method and device and server
CN104978358A (en) Method for displaying web page fragment on desktop and system for capturing web page fragment to desktop for displaying
CN101008946A (en) Search method of Chinese mobile communication information and device thereof
CN105512227A (en) Webpage data loading method and system
CN102523296B (en) Method, device and system for optimizing wireless webpage browsing resources
CN103761257A (en) Webpage handling method and system based on mobile browser
CN102262628B (en) Webpage segmentation method and paging server
CN101620621A (en) Method and system for segmenting web page
CN102306184B (en) Method, device and apparatus for obtaining compressed link address information and compressed webpage
CN103729440B (en) A kind of method and device of access website
CN103838797A (en) Method for optimizing mobile search engine
CN103294695A (en) Method and device for browsing webpage as well as method and device for extracting website
CN101257501B (en) Data leading-in method, system as well as Web server

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant