CN102982113B - A kind of browser page loading method based on content packet for android system - Google Patents
A kind of browser page loading method based on content packet for android system Download PDFInfo
- Publication number
- CN102982113B CN102982113B CN201210445282.7A CN201210445282A CN102982113B CN 102982113 B CN102982113 B CN 102982113B CN 201210445282 A CN201210445282 A CN 201210445282A CN 102982113 B CN102982113 B CN 102982113B
- Authority
- CN
- China
- Prior art keywords
- node
- browser
- information
- node group
- content
- 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
Links
- 238000009877 rendering Methods 0.000 claims abstract description 5
- 239000000284 extract Substances 0.000 claims description 6
- 238000007689 inspection Methods 0.000 claims description 5
- 238000000034 method Methods 0.000 claims description 4
- 102000010954 Link domain Human genes 0.000 claims description 3
- 108050001157 Link domain Proteins 0.000 claims description 3
- 238000001514 detection method Methods 0.000 claims description 3
- 230000004044 response Effects 0.000 claims description 3
- 230000001737 promoting Effects 0.000 abstract 1
- 238000002592 echocardiography Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 1
- RZVAJINKPMORJF-UHFFFAOYSA-N p-acetaminophenol Chemical compound CC(=O)NC1=CC=C(O)C=C1 RZVAJINKPMORJF-UHFFFAOYSA-N 0.000 description 1
- 230000011218 segmentation Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Abstract
The present invention relates to a kind of browser page loading method based on content packet for android system, after browser is connected with server foundation and obtains resource, web analysis is become dom tree, before webpage renders, the node being loaded in dom tree is carried out packet reconstruction according to content, and preferentially complete rendering the text node group containing mass efficient information, while ensureing that user can receive effective information, complete the content such as picture, audio frequency and video is rendered.This browser page loading method based on content packet, significantly improve the rendering rate of effective information, avoid the defect that user waits that web page loading time is long, ensured Consumer's Experience good, to promoting internet information the most effectively to transmit, there is positive meaning.
Description
Technical field
The present invention relates to a kind of browser page loading method based on content packet for android system, belong to intelligence
The technical field of energy information terminal.
Background technology
The general flow for the browser page loading method of android system used now is by all of for webpage interior
Hold after all having loaded, then be rendered on the page.The defect of above-mentioned loading method is, if network browser pages ratio
More complicated, the required load time is the most long, and therefore user is by blank to be loaded in the face of one inside the longer time
The page, causes the Consumer's Experience of bad luck, and user is not aware that webpage is the most also in work.
In order to improve Consumer's Experience, for the shortcoming of above-mentioned webpage loading method, use in the industry and web page release is realized clear
Device webpage of looking at rapidly and efficiently shows.Existing web page release method, the heuristic being mostly on DOM structure,
Such as VIPS(Vision based Page Segmentation).This method the most easily realizes, and efficiency is the highest, but not
There is general applicability.Another kind of method Graph Approach based on graph theory, can be converted into figure by webpage and represent,
Then figure is divided, obtain division result and re-map on webpage.The method is applicable to all of net on web
Page, has general applicability, but very big owing to representing the figure of webpage, divides difficulty, and inefficient, practicality is poor.
Summary of the invention
For the deficiencies in the prior art, the present invention discloses a kind of browser based on content packet for android system
Page loading method.The method, in loading procedure, carries out being grouped loading for browser page displayed content and renders,
Not only increase webpage loading efficiency, and ensure preferable general applicability and practicality, and there is good user
Experience.
Technical scheme is as follows:
A kind of browser page loading method based on content packet for android system, comprises the following steps that
(1), after browser receives the hyperlink request of browser address bar, browser finds above-mentioned asking by dns resolution
Asking the IP address that link domain name maps, browser obtains with described IP address and links, and the most described browser passes through HTTP
Agreement utilizes the request header information server to place, described IP address to initiate request;
(2) described server receive the request described in step (1) and etc. this request pending;Described server process
Response beamed back by the backward described browser of above-mentioned request, and now under http protocol, described browser receives from server
The code file of HTML/XML type, and obtain the most embedded resource address;
(3) code file of HTML type is resolved to XML dom tree by described browser, and step is as follows: first, inspection
Look into the code file whether compliant of whole HTML type, the when of a most initial tag occurring, be
Termination tag is had to echo therewith;Secondly, check whether the code file of XML type meets specific grammatical rules, i.e.
The specification of a certain DTD or XML-Schema;Finally, start to build dom tree;After being parsed, whole XML class
Content described by the code file of type and structure thereof, be stored among the internal memory of android system as dom tree;
(4) described browser starts detection from XML dom tree root node, and each DOM node can be performed inspection,
Each DOM node contains text message, picture, the node of Voice & Video information are respectively stored in different nodes
In group: the node of text message class is stored in text message node group, the node of picture category is stored in picture node
In group, the node of audio class is stored in audio node group, the node of video class is stored in video node group, complete
Become the reconstruction of dom tree;
(5) described browser uses multithreading, extracts text message node group, picture node group, audio frequency joint simultaneously
Point group carries out webpage with content in video node group and renders;As a example by text message node group content information, extract dom tree
The content information of Chinese version information node group interior joint, proceeds by webpage and renders;After having rendered, loading text information
JS file in the node of class and text style CSS, load according to serial load mode described JS file;Wherein
JS file contains syntactic definition, in order to meet the mutual call relation of the variable inside JS file and function, therefore uses
The mode that serial loads loads;
(6) described browser is sequentially completed in the pictorial information of picture node group interior joint, audio node group in dom tree
The audio-frequency information of node, the rendering of video information of video node group interior joint;Because literal node group Chinese version information is
Being rendered out the soonest, therefore the render time of Consumer's Experience is i.e. to render the text message time, is ensureing that user is soon
While speed obtains effective information, complete full page is rendered.
Present invention have an advantage that
Information content to be loaded, by loading renders the page when, is grouped by the present invention, uses multithreading skill
Art renders multiple node group simultaneously, and visual effect is first to complete to render text message, is text formatting the most successively
(CSS style), picture, audio frequency, video information, guarantee user while quickly obtaining effective information, browser
Backstage completes to render whole Webpage, makes user utilize intelligent terminal's android system to log in tool when browsing webpage
A kind of good experience sense is had to be subject to.
Detailed description of the invention
Below in conjunction with embodiment, the present invention is described in detail, but is not limited to this.
Embodiment,
A kind of browser page loading method based on content packet for android system, comprises the following steps that
(1), after browser receives the hyperlink request of browser address bar, browser finds above-mentioned asking by dns resolution
Asking the IP address that link domain name maps, browser obtains with described IP address and links, and the most described browser passes through HTTP
Agreement utilizes the request header information server to place, described IP address to initiate request;
(2) described server receive the request described in step (1) and etc. this request pending;Described server process
Response beamed back by the backward described browser of above-mentioned request, and now under http protocol, described browser receives from server
The code file of HTML/XML type, and obtain the most embedded resource address;
(3) code file of HTML type is resolved to XML dom tree by described browser, and step is as follows: first, inspection
Look into the code file whether compliant of whole HTML type, the when of a most initial tag occurring, be
Termination tag is had to echo therewith;Secondly, check whether the code file of XML type meets specific grammatical rules, i.e.
The specification of a certain DTD or XML-Schema;Finally, start to build dom tree;After being parsed, whole XML class
Content described by the code file of type and structure thereof, be stored among the internal memory of android system as dom tree;
(4) described browser starts detection from XML dom tree root node, and each DOM node can be performed inspection,
Each DOM node contains text message, picture, the node of Voice & Video information are respectively stored in different nodes
In group: the node of text message class is stored in text message node group, the node of picture category is stored in picture node
In group, the node of audio class is stored in audio node group, the node of video class is stored in video node group, complete
Become the reconstruction of dom tree;
(5) described browser uses multithreading, extracts text message node group, picture node group, audio frequency joint simultaneously
Point group carries out webpage with content in video node group and renders;As a example by text message node group content information, extract dom tree
The content information of Chinese version information node group interior joint, proceeds by webpage and renders;After having rendered, loading text information
JS file in the node of class and text style CSS, load according to serial load mode described JS file;Wherein
JS file contains syntactic definition, in order to meet the mutual call relation of the variable inside JS file and function, therefore uses
The mode that serial loads loads;
(6) described browser is sequentially completed in the pictorial information of picture node group interior joint, audio node group in dom tree
The audio-frequency information of node, the rendering of video information of video node group interior joint;Because literal node group Chinese version information is
Being rendered out the soonest, therefore the render time of Consumer's Experience is i.e. to render the text message time, is ensureing that user is soon
While speed obtains effective information, complete full page is rendered.
Claims (1)
1. the browser page loading method based on content packet for android system, it is characterised in that the method
Comprise the following steps that
(1), after browser receives the hyperlink request of browser address bar, browser finds above-mentioned asking by dns resolution
Asking the IP address that link domain name maps, browser obtains with described IP address and links, and the most described browser passes through HTTP
Agreement utilizes the request header information server to place, described IP address to initiate request;
(2) described server receive the request described in step (1) and etc. this request pending;Described server process
Response beamed back by the backward described browser of above-mentioned request, and now under http protocol, described browser receives from server
The code file of HTML type or the code file of XML type, and obtain the most embedded resource address;
(3) code file of HTML type is resolved to XML dom tree by described browser, after being parsed, described
Content described by the code file of XML type and structure thereof, be stored in the internal memory of android system as dom tree
Among;
(4) described browser starts detection from XML dom tree root node, and each DOM node can be performed inspection,
Each DOM node contains text message, picture, the node of Voice & Video information are respectively stored in different nodes
In group: the node of text message class is stored in text message node group, the node of picture category is stored in picture node
In group, the node of audio class is stored in audio node group, the node of video class is stored in video node group, complete
Become the reconstruction of dom tree;
(5) described browser uses multithreading, extracts text message node group, picture node group, audio frequency joint simultaneously
Point group carries out webpage with content in video node group and renders;As a example by text message node group content information, extract dom tree
The content information of Chinese version information node group interior joint, proceeds by webpage and renders;After having rendered, loading text information
JS file in the node of class and text style CSS, load according to serial load mode described JS file;
(6) described browser is sequentially completed in the pictorial information of picture node group interior joint, audio node group in dom tree
The audio-frequency information of node, the rendering of video information of video node group interior joint.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210445282.7A CN102982113B (en) | 2012-11-08 | A kind of browser page loading method based on content packet for android system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210445282.7A CN102982113B (en) | 2012-11-08 | A kind of browser page loading method based on content packet for android system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102982113A CN102982113A (en) | 2013-03-20 |
CN102982113B true CN102982113B (en) | 2016-11-30 |
Family
ID=
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101763357A (en) * | 2008-11-13 | 2010-06-30 | 北京搜狗科技发展有限公司 | Method and system for browser to load internet resources |
CN102368213A (en) * | 2011-09-26 | 2012-03-07 | 奇智软件(北京)有限公司 | Page downloading control method and system for IE (Internet Explorer) core browser |
CN102541848A (en) * | 2010-12-08 | 2012-07-04 | 卓望数码技术(深圳)有限公司 | Method, device, system and server for page loading based on cell phone browser |
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101763357A (en) * | 2008-11-13 | 2010-06-30 | 北京搜狗科技发展有限公司 | Method and system for browser to load internet resources |
CN102541848A (en) * | 2010-12-08 | 2012-07-04 | 卓望数码技术(深圳)有限公司 | Method, device, system and server for page loading based on cell phone browser |
CN102368213A (en) * | 2011-09-26 | 2012-03-07 | 奇智软件(北京)有限公司 | Page downloading control method and system for IE (Internet Explorer) core browser |
Non-Patent Citations (1)
Title |
---|
基于Webkit手机浏览器的研究与实现;杜娇;《中国优秀硕士学位论文全文数据库 信息科技辑》;20120715(第07期);I139-450第23-25页 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103095681B (en) | A kind of method and device detecting leak | |
CN102655481B (en) | A kind of instant messaging chat content inspection method based on webpage and system | |
CN103366019B (en) | A kind of webpage hold-up interception method based on iOS device and equipment | |
CN101370024B (en) | Distributed information collection method and system | |
CN104063401B (en) | The method and apparatus that a kind of webpage pattern address merges | |
CN103744985A (en) | Webpage adaption method and webpage adaption system | |
CN102184184B (en) | Method for acquiring webpage dynamic information | |
CN110602269B (en) | Method for converting domain name | |
CN105095280A (en) | Caching method and apparatus for browser | |
CN106469044A (en) | The method and apparatus realizing page jump | |
CN108959539B (en) | Rule-configurable webpage data analysis method | |
CN101902485A (en) | Rewriting method of reversal Web agent link | |
CN107766509A (en) | A kind of method and apparatus of webpage static backup | |
CN107342910A (en) | Simulate automated testing method and instrument that multi-user carries out network access | |
CN104426863B (en) | A kind of page request method, page request device, transfer server and terminal | |
CN110083755A (en) | A kind of high emulation parsing web-page approach, device and electronic equipment | |
CN106095985A (en) | A kind of dynamic collection the method for cluster web pages information | |
CN103513986A (en) | Method for using CGI technology for achieving dynamic web server in no-operation system | |
CN104899212A (en) | Webpage display method, server and system | |
CN104967698A (en) | Network data crawling method and apparatus | |
CN103761257A (en) | Webpage handling method and system based on mobile browser | |
CN103825772A (en) | Method for identifying user click behavior and gateway equipment | |
CN101159739A (en) | Subtitling display process and communication system and related equipment | |
CN102982113B (en) | A kind of browser page loading method based on content packet for android system | |
CN106993016A (en) | Network request and the treating method and apparatus of response |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant |