CN103970770A - Optimization processing method and device for web page and client - Google Patents

Optimization processing method and device for web page and client Download PDF

Info

Publication number
CN103970770A
CN103970770A CN201310034271.4A CN201310034271A CN103970770A CN 103970770 A CN103970770 A CN 103970770A CN 201310034271 A CN201310034271 A CN 201310034271A CN 103970770 A CN103970770 A CN 103970770A
Authority
CN
China
Prior art keywords
page data
webpage
row
node element
window
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
CN201310034271.4A
Other languages
Chinese (zh)
Other versions
CN103970770B (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 CN201310034271.4A priority Critical patent/CN103970770B/en
Publication of CN103970770A publication Critical patent/CN103970770A/en
Application granted granted Critical
Publication of CN103970770B publication Critical patent/CN103970770B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9577Optimising the visualization of content, e.g. distillation of HTML documents

Abstract

The embodiment of the invention provides an optimization processing method and device for a web page and a client. The optimization processing method comprises the following steps of: loading page data of the web page and converting the page data into an element node; adding the element node to a display column of a window for displaying; determining the display position of new web page data of the web page according to the display height of the display column; when trigger operation for the new page data of the web page is detected, loading the new page data of the web page and displaying the new page data of the web page at the determined display position. According to the optimization processing method and device provided by the invention, the optimization processing of the display process of the web page can be realized, the display effect of the web page is improved, memory usage is reduced and the performances of the device are improved.

Description

A kind of webpage optimized treatment method, device and client
Technical field
The present invention relates to a kind of Internet technical field, relate in particular to a kind of webpage optimized treatment method, device and client.
Background technology
In traditional web page display process, the page data of webpage is shown by row conventionally.Referring to Fig. 1 a, is a schematic diagram of existing web displaying; Client is obtained the DISPLAY ORDER of page data He this page data of webpage from server; This page data is converted to node element, and as shown in Figure 1a, 9 page datas can be exchanged into 9 node elements, from node element 1 to node element 9; Successively corresponding node element is pressed to row according to the DISPLAY ORDER of this page data and show, as shown in Figure 1a, in window, comprise 3 and show row, 9 node elements are added into successively line by line in displaying row and show.Referring to Fig. 1 b, is another schematic diagram of existing web displaying; For example, when need to show the new page data of this webpage in window time: the vertical scroll bar in user's rolling window, or turnover key in user's window need to show the new page data of this webpage in window; Now, obtain new page data and be converted to new node element, as shown in Figure 1 b, 3 corresponding 3 new node elements of new page data, from node element 10 to node element 12, successively node element 10 to node element 12 is added in each displaying row and shows according to the DISPLAY ORDER of this new page data.Above-mentioned known, existing web displaying process directly shows successively according to the DISPLAY ORDER of page data, not to specifically representing situation analysis in window, because the height of the node element showing in each displaying row is uneven, in the webpage that makes to show in window, there is more white space, as shown in Fig. 1 a and Fig. 1 b, affected the display effect of webpage, the internal memory that while takies because the increase of blank area causes webpage to play up increases, and has reduced the performance of device.
Summary of the invention
The embodiment of the present invention provides a kind of webpage optimized treatment method, device and client, can be optimized processing to the procedure for displaying of webpage, promotes the display effect of webpage, reduces EMS memory occupation, lifting gear performance.
First aspect present invention provides a kind of webpage optimized treatment method, can comprise:
The page data of Web page loading, is converted to node element by described page data;
Described node element is added in the displaying row of window and shows;
According to the demonstration height of described displaying row, determine the display position of the new page data of described webpage;
When the trigger action of the new page data to described webpage detected, load the new page data of described webpage and show the new page data of described webpage at described definite display position.
Second aspect present invention provides a kind of webpage optimization process device, can comprise:
Load-on module, for the page data of Web page loading, is converted to node element by described page data;
Display module, shows for the displaying row that described node element are added into window;
Position determination module, for according to the demonstration height of described displaying row, determines the display position of the new page data of described webpage;
Trigger module, for in the time the trigger action of the new page data to described webpage being detected, trigger the new page data that described load-on module loads described webpage, and shown the new page data of described webpage by described display module at described definite display position.
Third aspect present invention provides a kind of client, can comprise the webpage optimization process device that above-mentioned second aspect provides.
Implement the embodiment of the present invention, there is following beneficial effect:
In the embodiment of the present invention, the page data of Web page loading is also converted to node element, in window, adopt and show that row show described node element by row, highly determine the display position of the new page data of webpage according to the demonstration of displaying row, at the new page data of definite display position display web page; Owing to having considered to show the demonstration height of row, considered to show the uneven situation of height of the node element showing in row, highly determine the display position of new page data based on showing the demonstration of row, the demonstration that can ensure each displaying row is highly relatively consistent, reduce the white space in webpage, realized the optimization process of the procedure for displaying to webpage, promoted the display effect of webpage, reduce EMS memory occupation, promoted device performance.
Brief description of the drawings
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, to the accompanying drawing of required use in embodiment or description of the Prior Art be briefly described below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, do not paying under the prerequisite of creative work, can also obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 a is a schematic diagram of existing web displaying;
Fig. 1 b is another schematic diagram of existing web displaying;
The process flow diagram of a kind of webpage optimized treatment method that Fig. 2 provides for the embodiment of the present invention;
The process flow diagram of the another kind of webpage optimized treatment method that Fig. 3 provides for the embodiment of the present invention;
A schematic diagram of the web displaying that Fig. 4 a provides for the embodiment of the present invention;
Another schematic diagram of the web displaying that Fig. 4 b provides for the embodiment of the present invention;
The structural representation of a kind of webpage optimization process device that Fig. 5 provides for the embodiment of the present invention;
The structural representation of the another kind of webpage optimization process device that Fig. 6 provides for the embodiment of the present invention;
The structural representation of the load-on module that Fig. 7 provides for the embodiment of the present invention;
The structural representation of an embodiment of the display module that Fig. 8 provides for the embodiment of the present invention;
The structural representation of another embodiment of the display module that Fig. 9 provides for the embodiment of the present invention;
The structural representation of the position determination module that Figure 10 provides for the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiment.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtaining under creative work prerequisite, belong to the scope of protection of the invention.
In the embodiment of the present invention, client can include but not limited to: PC(Personal Computer, personal computer), the terminal device such as mobile phone, smart mobile phone, panel computer, notebook computer.Webpage optimization process device can be browser or the application that comprises browser.
Below in conjunction with accompanying drawing 2-accompanying drawing 4, the webpage optimized treatment method that the embodiment of the present invention is provided describes in detail.
Refer to Fig. 2, the process flow diagram of a kind of webpage optimized treatment method providing for the embodiment of the present invention; The method can comprise the following steps S101-step S104.
S101, the page data of Web page loading, is converted to node element by described page data;
Wherein, the page data of webpage is often referred to the HTML(Hypertext Markup Language of webpage, HTML (Hypertext Markup Language)) source code, after server obtains the page data of webpage, if will show this webpage, need to load the page data of this webpage, and the page data generating web page of resolving this webpage shows required node element.In specific implementation, the page data that this step can Web page loading, is converted to DOM(Document Object Model, DOM Document Object Model by described page data) node element.
S102, is added into described node element in the displaying row of window and shows;
Wherein, the page data of webpage shows by row conventionally, can be described as and shows that row, the node element that the page data conversion of webpage is formed are added in the displaying row of window and show for the row of displayed page data, realized and in window, shown described webpage.
S103, according to the demonstration height of described displaying row, determines the display position of the new page data of described webpage;
Wherein, the demonstration of showing row highly for this displaying be listed as in the height sum of all elements node.Because the height of each node element may there are differences, therefore in window, the demonstration of each displaying row highly also may there are differences, the demonstration difference in height of showing row can make to exist in webpage white space, in prior art owing to not considering to show the demonstration height of row,, in the time need to showing the new page data of described webpage, these white spaces affect the display effect of webpage.In the embodiment of the present invention, in order to ensure the display effect of webpage, this step has been considered the demonstration height of the displaying row of window, considered to show the situation of the difference in height of each node element in row, the demonstration based on described displaying row highly, is determined the display position of the new page data of described webpage, can ensure in the time need to showing the new page data of described webpage, the demonstration that in window, each displaying is listed as is highly relatively consistent, reduces the white space in webpage, promotes the display effect of webpage.
S104, when the trigger action of the new page data to described webpage detected, loads the new page data of described webpage and shows the new page data of described webpage at described definite display position.
Wherein, described trigger action can comprise: the operation of the vertical scroll bar in rolling window, or clicking operation to the turnover key in window, etc.In the time need to showing the new page data of described webpage, load the new page data of described webpage, the new page data of described webpage is converted to new node element, add described new node element at described definite display position, to show the new page data of described webpage.
In the embodiment of the present invention, the page data of Web page loading is also converted to node element, in window, adopt and show that row show described node element by row, highly determine the display position of the new page data of webpage according to the demonstration of displaying row, at the new page data of definite display position display web page; Owing to having considered to show the demonstration height of row, considered to show the uneven situation of height of the node element showing in row, highly determine the display position of new page data based on showing the demonstration of row, the demonstration that can ensure each displaying row is highly relatively consistent, reduce the white space in webpage, realized the optimization process of the procedure for displaying to webpage, promoted the display effect of webpage, reduce EMS memory occupation, promoted device performance.
Refer to Fig. 3, the process flow diagram of the another kind of webpage optimized treatment method providing for the embodiment of the present invention; The method can comprise the following steps S201-step S213.
S201, when web-page requests detected, the URL(Uniform ResourceLocator carrying according to described web-page requests, URL(uniform resource locator)) address, obtains the page data of institute's requested webpage and the DISPLAY ORDER of described page data from server.
Wherein, when user wants browsing page, can initiate web-page requests, for example: the URL address chain sending and receiving of user's webpage clicking play web-page requests, or user inputs URL address initiation web-page requests in web page address hurdle.In this step, in the time web-page requests being detected, domain name mapping is carried out in the URL address of first this web-page requests being carried, and obtains the IP(Internet Protocol of institute's requested webpage, net association) address; Initiate web-page requests based on this IP address to server, the page data of institute's requested webpage that reception server returns and the DISPLAY ORDER of described page data.
S202 according to the DISPLAY ORDER of the page data of the described webpage obtaining, selects the page data of predetermined number from the described page data obtaining;
Wherein, predetermined number can be set according to actual needs, performance, the webpage that can consider webpage optimization process device in assignment procedure played up ability, played up calculated amount, the factor such as quantity and display effect of network page of the displaying of window row, preferably, can set predetermined number is 2n-1, and wherein n is that positive integer and n are the quantity of showing row in window.In the present embodiment, predetermined number is preferably set to 2n-1, can make in the time that this 2n-1 page data is loaded and shown, divide batch render, calculating and processing to 2n-1 page data, can ensure the optimization display effect of webpage, the demonstration of each displaying row in window is consistent highly relatively, reduces and play up calculated amount to a certain extent again, ensured the performance of webpage optimization process device.
S203, loads the page data of described predetermined number, the page data of described predetermined number is converted to the node element of predetermined number;
Wherein, the page data of webpage is often referred to the html source code of webpage, after server obtains the page data of webpage, if will show this webpage, need to load the page data of this webpage, and the page data generating web page of resolving this webpage shows required node element.After having selected to need the page data of the predetermined number loading, this step can load the page data of the described predetermined number of selection, the page data of described predetermined number is converted to the DOM node element of predetermined number.
S204, according to the width information of the width information of window and default displaying row, determines the quantity of showing row in described window;
Consider the browse custom of user to webpage, normally, in the time that window adopts the page data of showing row display web page, the width sum of all displaying row should be not more than the width of window, webpage is browsed without usage level scroll bar so that obtain user.Particularly, the width information of predeterminable each displaying row, according to the width information of window and the width information that default each displaying is listed as, determines the quantity of the displaying row in described window; For example: the width information of supposing window is 46cm, the width information of each displaying row is 15cm, can determine that the quantity of showing row in described window is preferably 3, adopts 3 page datas of showing row display web page.
S205, according to the DISPLAY ORDER of the page data of described predetermined number, is added into the node element of described predetermined number successively in the each displaying row of described window and shows;
Server is in the time returning to the page data of webpage, indicate the DISPLAY ORDER of described page data simultaneously, this step, according to the DISPLAY ORDER of the page data of described predetermined number, is added into the node element of described predetermined number successively in the each displaying row in described window and shows.Please also refer to Fig. 4 a, a schematic diagram of the web displaying providing for the embodiment of the present invention; As shown in Fig. 4 a, in described window, there are 3 to show row (in figure not label), n=3; Described predetermined number is 2n-1=2*3-1=5, the DISPLAY ORDER of these 5 page datas is to show successively from page data 1 to page data 5, the processing procedure of this step is: the node element 1 of page data 1 correspondence is added into shows in row one successively, the node element 2 of page data 2 correspondences is added into and is shown in row two, the node element 3 of page data 3 correspondences is added into and is shown in row three, again the node element 4 of page data 4 correspondences is added into and shows in row one, then the node element 5 of page data 5 correspondences is added into and is shown in row two.It should be noted that, this step is added into the node element of described predetermined number line by line successively in the each displaying row of described window and shows, this processing procedure specifically can be referring to browser in prior art the render process to node element.
S206, obtains the height of each node element in described window;
After node element is added into displaying in window row and shows, webpage optimization process device can obtain the height of each node element, and wherein, the height of each node element is each node element shared demonstration height in described window.
S207, according to the height of all elements node in each displaying row of described window, calculates the demonstration height of each displaying row;
Wherein, the demonstration of each displaying row is highly the summation of the height of all elements node in each displaying row, for example: show containing element node 1 and node element 4 in row one, the demonstration of showing row one is highly that the height of node element 1 and the height sum of node element 4 are to show the demonstration height of row one.
S208, will show that highly minimum displaying row are defined as DISPLAY ORDER in the new page data of described webpage and are positioned at the display position of the first described new page data.
After calculating the demonstration height of each displaying row in window, the demonstration height of more each displaying row, therefrom selects to show highly minimum displaying row; For example: supposing has 3 to show row in described window, the demonstration of showing row one is highly 50cm, the demonstration of showing row two is highly 40cm, the demonstration of showing row three is highly 45cm, show that from 3 row, row two are shown in selection, the displaying row two of selection are defined as to the display position that DISPLAY ORDER in the new page data of described webpage is positioned at the first described new page data, in the time need to showing the new page data of described webpage, from showing that row two add line by line node element corresponding to described new page data and show.
S209, when the trigger action of the new page data to described webpage detected, loads the new page data of described webpage, and described new page data is converted to new node element;
Wherein, described trigger action can comprise: the operation of the vertical scroll bar in rolling window, or clicking operation to the turnover key in window, etc.For example: when the vertical scroll bar in user's rolling window pulls the new page data of webpage, if the position of vertical scroll bar arrives the bottom that shows highly minimum displaying row, the bottom that is the described demonstration node element that highly displaying of minimum is added in being listed as has the latest been shown in described window, needs to show the new page data of described webpage.In this step, again according to the DISPLAY ORDER of the page data of the described webpage obtaining, from the described page data obtaining, select the new page data of predetermined number; Load the new page data of described predetermined number, the new page data of described predetermined number is converted to the new node element of predetermined number.The loading procedure of this step can, referring to the associated description in step S202-step S203, be not repeated herein.
S210, is arranged in DISPLAY ORDER in the new page data of described webpage in the first described new node element corresponding to described new page data and is added into described window and shows that highly minimum displaying row show;
S211, according to the DISPLAY ORDER of the new page data of described webpage, is added into other described new node element successively in the each displaying row of described window and shows.
Can adopt above-mentioned example to describe the specific implementation of step S210-step S211 in detail.Please also refer to Fig. 4 b, another schematic diagram of the web displaying providing for the embodiment of the present invention; In described window, there are 3 to show row (in figure not label), n=3; The demonstration of showing row two in described window is highly minimum.Described predetermined number is 2n-1=2*3-1=5, the DISPLAY ORDER of these 5 new page datas is to show successively to page data 10 from page data 6, and the processing procedure of step S210 is: the node element 6 that DISPLAY ORDER is arranged in to the first page data 6 correspondences is added into displaying row two; The processing procedure of step S210 is: the node element 7 of page data 7 correspondences is added into shows in row three successively, the node element 8 of page data 8 correspondences is added into and is shown in row one, again the node element 9 of page data 9 correspondences is added into and shows in row two, then the node element 10 of page data 10 correspondences is added into and is shown in row three.Due to the demonstration height of having considered that the displaying of window is listed as, considered to show the situation of the difference in height of each node element in row, display position based on showing the highly minimum definite new page data of displaying row particularly, thereby effectively reduce due to the page empty region of showing that the demonstration difference in height of row produces, can ensure in the time need to showing the new page data of described webpage, the demonstration that in window, each displaying is listed as is highly relatively consistent, promotes the display effect of webpage.
S212, stores the height of each node element in described window, and stores the demonstration height of each displaying row in described window;
In this step, to the height of each node element in described window, and the storage of the demonstration that in described window, each displaying is listed as height, can avoid carrying out the calculating of playing up repeating in webpage optimization process, reduce and play up calculated amount, ensured the performance of webpage optimization process device.
S213, in the time that the node element in any displaying row of described window changes, upgrades the demonstration of the described displaying row of storing highly.
Wherein, show that the node element in row changes and can be: delete the node element shown in row, in row, add node element and the node element in row is shown in amendment to showing.Any in window shown when the node element of row changes, may cause the demonstration of these displaying row highly to change, upgrade in time the demonstration height of described displaying row of storage of this step, to ensure the accuracy of webpage optimization process, ensures the effect of optimization of webpage.
In the embodiment of the present invention, the page data of Web page loading is also converted to node element, in window, adopt and show that row show described node element by row, highly determine the display position of the new page data of webpage according to the demonstration of displaying row, at the new page data of definite display position display web page; Owing to having considered to show the demonstration height of row, considered to show the uneven situation of height of the node element showing in row, highly determine the display position of new page data based on showing the demonstration of row, the demonstration that can ensure each displaying row is highly relatively consistent, reduce the white space in webpage, realized the optimization process of the procedure for displaying to webpage, promoted the display effect of webpage, reduce EMS memory occupation, promoted device performance.
Below in conjunction with accompanying drawing 5-accompanying drawing 10, the webpage optimization process device that the embodiment of the present invention is provided describes in detail.It should be noted that, following device can be applied in said method.
Refer to Fig. 5, the structural representation of a kind of webpage optimization process device providing for the embodiment of the present invention; This device can comprise: load-on module 101, display module 102, position determination module 103 and trigger module 104.
Load-on module 101, for the page data of Web page loading, is converted to node element by described page data;
Wherein, the page data of webpage is often referred to the html source code of webpage, after server obtains the page data of webpage, if will show this webpage, need to load the page data of this webpage, and the page data generating web page of resolving this webpage shows required node element.In specific implementation, the page data that described load-on module 101 can Web page loading, is converted to DOM node element by described page data.
Display module 102, shows for the displaying row that described node element are added into window;
Wherein, the page data of webpage shows by row conventionally, can be described as and shows that row, the node element that the page data conversion of webpage is formed are added in the displaying row of window and show for the row of displayed page data, realized and in window, shown described webpage.
Position determination module 103, for according to the demonstration height of described displaying row, determines the display position of the new page data of described webpage;
Wherein, the demonstration of showing row highly for this displaying be listed as in the height sum of all elements node.Because the height of each node element may there are differences, therefore in window, the demonstration of each displaying row highly also may there are differences, the demonstration difference in height of showing row can make to exist in webpage white space, in prior art owing to not considering to show the demonstration height of row,, in the time need to showing the new page data of described webpage, these white spaces affect the display effect of webpage.In the embodiment of the present invention, in order to ensure the display effect of webpage, described position determination module 103 has been considered the demonstration height of the displaying row of window, considered to show the situation of the difference in height of each node element in row, demonstration height based on described displaying row, determine the display position of the new page data of described webpage, can ensure in the time need to showing the new page data of described webpage, in window, the demonstration of each displaying row is highly relatively consistent, reduce the white space in webpage, promote the display effect of webpage.
Trigger module 104, for in the time the trigger action of the new page data to described webpage being detected, trigger the new page data that described load-on module loads described webpage, and shown the new page data of described webpage by described display module at described definite display position.
Wherein, described trigger action can comprise: the operation of the vertical scroll bar in rolling window, or clicking operation to the turnover key in window, etc.In the time need to showing the new page data of described webpage, load the new page data of described webpage, the new page data of described webpage is converted to new node element, add described new node element at described definite display position, to show the new page data of described webpage.
In the embodiment of the present invention, the page data of Web page loading is also converted to node element, in window, adopt and show that row show described node element by row, highly determine the display position of the new page data of webpage according to the demonstration of displaying row, at the new page data of definite display position display web page; Owing to having considered to show the demonstration height of row, considered to show the uneven situation of height of the node element showing in row, highly determine the display position of new page data based on showing the demonstration of row, the demonstration that can ensure each displaying row is highly relatively consistent, reduce the white space in webpage, realized the optimization process of the procedure for displaying to webpage, promoted the display effect of webpage, reduce EMS memory occupation, promoted device performance.
Refer to Fig. 6, the structural representation of the another kind of webpage optimization process device providing for the embodiment of the present invention; This device can comprise: load-on module 101, display module 102, position determination module 103, trigger module 104, acquisition module 105, memory module 106 and update module 107.Wherein, the associated description that the structure of load-on module 101, display module 102, position determination module 103 and trigger module 104 can embodiment shown in Figure 5, is not repeated herein.
Acquisition module 105, in the time web-page requests being detected, the URL address of carrying according to described web-page requests, obtains the page data of institute's requested webpage and the DISPLAY ORDER of described page data from server.
Wherein, when user wants browsing page, can initiate web-page requests, for example: the URL address chain sending and receiving of user's webpage clicking play web-page requests, or user inputs URL address initiation web-page requests in web page address hurdle.Described acquisition module 105 is in the time web-page requests being detected, and domain name mapping is carried out in the URL address of first this web-page requests being carried, and obtains the IP address of institute's requested webpage; Initiate web-page requests based on this IP address to server, the page data of institute's requested webpage that reception server returns and the DISPLAY ORDER of described page data.
Memory module 106, stores the height of each node element in described window, and stores the demonstration height of each displaying row in described window;
The height of described memory module 106 to each node element in described window, and the storage of the demonstration that in described window, each displaying is listed as height, can avoid in webpage optimization process, carrying out the calculating of playing up repeating, reduce and play up calculated amount, ensure the performance of webpage optimization process device.
Update module 107, while changing, upgrades the demonstration of the described displaying row of storing highly for the node element being listed as when any displaying of described window.
Wherein, show that the node element in row changes and can be: delete the node element shown in row, in row, add node element and the node element in row is shown in amendment to showing.Any in window shown when the node element of row changes, may cause the demonstration of these displaying row highly to change, upgrade in time the demonstration height of described displaying row of storage of described update module 107, to ensure the accuracy of webpage optimization process, ensures the effect of optimization of webpage.
In the embodiment of the present invention, the page data of Web page loading is also converted to node element, in window, adopt and show that row show described node element by row, highly determine the display position of the new page data of webpage according to the demonstration of displaying row, at the new page data of definite display position display web page; Owing to having considered to show the demonstration height of row, considered to show the uneven situation of height of the node element showing in row, highly determine the display position of new page data based on showing the demonstration of row, the demonstration that can ensure each displaying row is highly relatively consistent, reduce the white space in webpage, realized the optimization process of the procedure for displaying to webpage, promoted the display effect of webpage, reduce EMS memory occupation, promoted device performance.
Below the each module in the webpage optimization process device that the embodiment of the present invention is provided is described in detail.
Refer to Fig. 7, the structural representation of the load-on module providing for the embodiment of the present invention; This load-on module 101 can comprise: selected cell 1101 and loading unit 1102.
Selected cell 1101 for the DISPLAY ORDER of the page data according to the described webpage obtaining, is selected the page data of predetermined number from the described page data obtaining;
Wherein, predetermined number can be set according to actual needs, performance, the webpage that can consider webpage optimization process device in assignment procedure played up ability, played up calculated amount, the factor such as quantity and display effect of network page of the displaying of window row, preferably, can set predetermined number is 2n-1, and wherein n is that positive integer and n are the quantity of showing row in window.In the present embodiment, predetermined number is preferably set to 2n-1, can make in the time that this 2n-1 page data is loaded and shown, divide batch render, calculating and processing to 2n-1 page data, can ensure the optimization display effect of webpage, the demonstration of each displaying row in window is consistent highly relatively, reduces and play up calculated amount to a certain extent again, ensured the performance of webpage optimization process device.
Loading unit 1102, for loading the page data of described predetermined number, is converted to the page data of described predetermined number the node element of predetermined number.
Wherein, the page data of webpage is often referred to the html source code of webpage, after server obtains the page data of webpage, if will show this webpage, need to load the page data of this webpage, and the page data generating web page of resolving this webpage shows required node element.After having selected to need the page data of the predetermined number loading, loading unit 1102 can load the page data of the described predetermined number of selection, the page data of described predetermined number is converted to the DOM node element of predetermined number.
Refer to Fig. 8, the structural representation of an embodiment of the display module providing for the embodiment of the present invention; Display module 1201 can comprise: show row determining unit 1201 and the first display processing unit 1202.
Show row determining unit 1201, for according to the width information of the width information of window and default displaying row, determine the quantity of showing row in described window;
Consider the browse custom of user to webpage, normally, in the time that window adopts the page data of showing row display web page, the width sum of all displaying row should be not more than the width of window, webpage is browsed without usage level scroll bar so that obtain user.Particularly, the width information of predeterminable each displaying row, according to the width information of window and the width information that default each displaying is listed as, determines the quantity of the displaying row in described window.
The first display processing unit 1202, for according to the DISPLAY ORDER of the page data of described predetermined number, is added into the node element of described predetermined number successively in each displaying row of described window and shows.
Server is in the time returning to the page data of webpage, indicate the DISPLAY ORDER of described page data simultaneously, described the first display processing unit 1202, according to the DISPLAY ORDER of the page data of described predetermined number, is added into the node element of described predetermined number successively in the each displaying row in described window and shows.
Refer to Fig. 9, the structural representation of another embodiment of the display module providing for the embodiment of the present invention; This display module 102 can comprise: show row determining unit 1201, the first display processing unit 1202 and the second display processing unit 1203.Wherein, show the associated description that the structure of row determining unit 1201 and the first display processing unit 1202 can embodiment shown in Figure 8, be not repeated herein.
The second display processing unit 1203, be added into described window and show that highly minimum displaying row show for the new page data DISPLAY ORDER of described webpage being arranged in to the first described new node element corresponding to described new page data, and according to the DISPLAY ORDER of the new page data of described webpage, successively other described new node element is added in the each displaying row of described window and shows.
It should be noted that, described the second display processing unit 1203 is before carrying out Graphics Processing, and described load-on module first loads the new page data of described webpage according to the triggering of described trigger module, described new page data is converted to new node element.
Refer to Figure 10, the structural representation of the position determination module providing for the embodiment of the present invention; This position determination module 103 can comprise: height acquiring unit 1301, computing unit 1302 and position determination unit 1303.
Height acquiring unit 1301, for obtaining the height of the each node element of described window;
After node element is added into displaying in window row and shows, webpage optimization process device can obtain the height of each node element, and wherein, the height of each node element is each node element shared demonstration height in described window.
Computing unit 1302, for according to the height of all elements node of each displaying row of described window, calculates the demonstration height of each displaying row; Wherein, the demonstration of each displaying row is highly the summation of the height of all elements node in each displaying row.
Position determination unit 1303, the new page data DISPLAY ORDER that is defined as described webpage for the highly minimum displaying of demonstration is listed as is positioned at the display position of the first described new page data.
It should be noted that, the 26S Proteasome Structure and Function of the webpage optimization process device that the embodiment of the present invention provides can be referring to the method specific implementation in said method embodiment, and this specific implementation process can, referring to the associated description of said method embodiment, be not repeated herein.
In the embodiment of the present invention, the page data of Web page loading is also converted to node element, in window, adopt and show that row show described node element by row, highly determine the display position of the new page data of webpage according to the demonstration of displaying row, at the new page data of definite display position display web page; Owing to having considered to show the demonstration height of row, considered to show the uneven situation of height of the node element showing in row, highly determine the display position of new page data based on showing the demonstration of row, the demonstration that can ensure each displaying row is highly relatively consistent, reduce the white space in webpage, realized the optimization process of the procedure for displaying to webpage, promoted the display effect of webpage, reduce EMS memory occupation, promoted device performance.
The embodiment of the invention also discloses a kind of client, this client comprises webpage optimization process device, and the structure of this webpage optimization process device can, referring to Fig. 5-associated description embodiment illustrated in fig. 10, be not repeated herein.It should be noted that, this client can be applied in said method.
In the embodiment of the present invention, the page data of Web page loading is also converted to node element, in window, adopt and show that row show described node element by row, highly determine the display position of the new page data of webpage according to the demonstration of displaying row, at the new page data of definite display position display web page; Owing to having considered to show the demonstration height of row, considered to show the uneven situation of height of the node element showing in row, highly determine the display position of new page data based on showing the demonstration of row, the demonstration that can ensure each displaying row is highly relatively consistent, reduce the white space in webpage, realized the optimization process of the procedure for displaying to webpage, promoted the display effect of webpage, reduce EMS memory occupation, promoted device performance.
One of ordinary skill in the art will appreciate that all or part of flow process realizing in above-described embodiment method, can carry out the hardware that instruction is relevant by computer program to complete, described program can be stored in a computer read/write memory medium, this program, in the time carrying out, can comprise as the flow process of the embodiment of above-mentioned each side method.Wherein, described storage medium can be magnetic disc, CD, read-only store-memory body (Read-Only Memory, ROM) or random store-memory body (Random Access Memory, RAM) etc.
Above disclosed is only preferred embodiment of the present invention, certainly can not limit with this interest field of the present invention, and the equivalent variations of therefore doing according to the claims in the present invention, still belongs to the scope that the present invention is contained.

Claims (15)

1. a webpage optimized treatment method, is characterized in that, comprising:
The page data of Web page loading, is converted to node element by described page data;
Described node element is added in the displaying row of window and shows;
According to the demonstration height of described displaying row, determine the display position of the new page data of described webpage;
When the trigger action of the new page data to described webpage detected, load the new page data of described webpage and show the new page data of described webpage at described definite display position.
2. the method for claim 1, is characterized in that, the page data of described Web page loading, before described page data is converted to node element, also comprises:
When web-page requests detected, the uniform resource position mark URL address of carrying according to described web-page requests, obtains the page data of institute's requested webpage and the DISPLAY ORDER of described page data from server.
3. method as claimed in claim 2, is characterized in that, described page data is converted to node element by the page data of described Web page loading, comprising:
According to the DISPLAY ORDER of the page data of the described webpage obtaining, from the described page data obtaining, select the page data of predetermined number;
Load the page data of described predetermined number, the page data of described predetermined number is converted to the node element of predetermined number.
4. method as claimed in claim 3, is characterized in that, in the described displaying row that described node element are added into window, shows, comprising:
According to the width information of the width information of window and default displaying row, determine the quantity of showing row in described window;
According to the DISPLAY ORDER of the page data of described predetermined number, successively the node element of described predetermined number is added in the each displaying row of described window and shows.
5. method as claimed in claim 4, is characterized in that, described according to the demonstration height of described displaying row, determines the display position of the new page data of described webpage, comprising:
Obtain the height of each node element in described window;
According to the height of all elements node in each displaying row of described window, calculate the demonstration height of each displaying row;
To show that highly minimum displaying row are defined as DISPLAY ORDER in the new page data of described webpage and are positioned at the display position of the first described new page data.
6. method as claimed in claim 5, is characterized in that, the new page data of the described webpage of described loading also shows the new page data of described webpage at described definite display position, comprising:
Load the new page data of described webpage, described new page data is converted to new node element;
DISPLAY ORDER in the new page data of described webpage is arranged in to the first described new node element corresponding to described new page data to be added into described window and to show that highly minimum displaying row show;
According to the DISPLAY ORDER of the new page data of described webpage, successively other described new node element is added in the each displaying row of described window and shows.
7. the method as described in claim 1-6 any one, is characterized in that, also comprises:
Store the height of each node element in described window, and store the demonstration height of each displaying row in described window;
In the time that the node element in any displaying row of described window changes, upgrade the demonstration of the described displaying row of storing highly.
8. a webpage optimization process device, is characterized in that, comprising:
Load-on module, for the page data of Web page loading, is converted to node element by described page data;
Display module, shows for the displaying row that described node element are added into window;
Position determination module, for according to the demonstration height of described displaying row, determines the display position of the new page data of described webpage;
Trigger module, for in the time the trigger action of the new page data to described webpage being detected, trigger the new page data that described load-on module loads described webpage, and shown the new page data of described webpage by described display module at described definite display position.
9. device as claimed in claim 8, is characterized in that, also comprises:
Acquisition module, in the time web-page requests being detected, the URL address of carrying according to described web-page requests, obtains the page data of institute's requested webpage and the DISPLAY ORDER of described page data from server.
10. device as claimed in claim 9, is characterized in that, described load-on module comprises:
Selected cell for the DISPLAY ORDER of the page data according to the described webpage obtaining, is selected the page data of predetermined number from the described page data obtaining;
Loading unit, for loading the page data of described predetermined number, is converted to the page data of described predetermined number the node element of predetermined number.
11. devices as claimed in claim 10, is characterized in that, described display module comprises:
Show row determining units, for according to the width information of the width information of window and default displaying row, determine the quantity of showing row in described window;
The first display processing unit, for according to the DISPLAY ORDER of the page data of described predetermined number, is added into the node element of described predetermined number successively in each displaying row of described window and shows.
12. devices as claimed in claim 11, is characterized in that, described position determination module comprises:
Height acquiring unit, for obtaining the height of the each node element of described window;
Computing unit, for according to the height of all elements node of each displaying row of described window, calculates the demonstration height of each displaying row;
Position determination unit, the new page data DISPLAY ORDER that is defined as described webpage for the highly minimum displaying of demonstration is listed as is positioned at the display position of the first described new page data.
13. devices as claimed in claim 12, is characterized in that:
Described load-on module, also, for load the new page data of described webpage according to the triggering of described trigger module, is converted to new node element by described new page data;
Described display module also comprises:
The second display processing unit, be added into described window and show that highly minimum displaying row show for the new page data DISPLAY ORDER of described webpage being arranged in to the first described new node element corresponding to described new page data, and according to the DISPLAY ORDER of the new page data of described webpage, successively other described new node element is added in the each displaying row of described window and shows.
14. devices as described in claim 8-13 any one, is characterized in that, also comprise:
Memory module, stores the height of each node element in described window, and stores the demonstration height of each displaying row in described window;
Update module, while changing, upgrades the demonstration of the described displaying row of storing highly for the node element being listed as when any displaying of described window.
15. 1 kinds of clients, is characterized in that, comprise the webpage optimization process device as described in claim 7-14 any one.
CN201310034271.4A 2013-01-29 2013-01-29 A kind of front page optimization processing method, device and client Active CN103970770B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310034271.4A CN103970770B (en) 2013-01-29 2013-01-29 A kind of front page optimization processing method, device and client

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310034271.4A CN103970770B (en) 2013-01-29 2013-01-29 A kind of front page optimization processing method, device and client

Publications (2)

Publication Number Publication Date
CN103970770A true CN103970770A (en) 2014-08-06
CN103970770B CN103970770B (en) 2018-10-09

Family

ID=51240282

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310034271.4A Active CN103970770B (en) 2013-01-29 2013-01-29 A kind of front page optimization processing method, device and client

Country Status (1)

Country Link
CN (1) CN103970770B (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104965914A (en) * 2015-07-06 2015-10-07 无锡天脉聚源传媒科技有限公司 Page display method and apparatus
CN104965656A (en) * 2015-06-19 2015-10-07 努比亚技术有限公司 Page displaying method and apparatus
CN105512141A (en) * 2014-09-26 2016-04-20 腾讯科技(深圳)有限公司 Method and device for data loading
CN106126517A (en) * 2016-05-31 2016-11-16 美通云动(北京)科技有限公司 The PC end application page is converted to the method and device of the mobile terminal application page
CN106202315A (en) * 2016-06-30 2016-12-07 北京奇虎科技有限公司 The method and device that data process
CN107066524A (en) * 2017-02-20 2017-08-18 平安科技(深圳)有限公司 The display methods and device of product
CN107133340A (en) * 2017-05-18 2017-09-05 杭州迪普科技股份有限公司 A kind of method for information display and device of WEB page multiline text inframe
CN107220351A (en) * 2017-05-31 2017-09-29 北京京东尚科信息技术有限公司 The page is left white width calculation method, device, storage medium and electronic equipment
CN107844577A (en) * 2017-11-08 2018-03-27 国电南瑞科技股份有限公司 A kind of method that lifting GIS pels draw efficiency
CN107885799A (en) * 2017-10-30 2018-04-06 维沃移动通信有限公司 Info web display methods and device
CN108280119A (en) * 2017-11-29 2018-07-13 广州市动景计算机科技有限公司 Page generation method, device and user terminal
CN108804514A (en) * 2018-04-25 2018-11-13 网宿科技股份有限公司 A kind of webpage loading method, server and webpage loading system
CN110275657A (en) * 2019-05-21 2019-09-24 杭州国文科技有限公司 Page display method and terminal device
CN111723318A (en) * 2020-06-09 2020-09-29 百度在线网络技术(北京)有限公司 Page data processing method, device, equipment and storage medium

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101261642A (en) * 2008-04-10 2008-09-10 深圳市迅雷网络技术有限公司 Method and device for regulating internet page layout
CN101388037A (en) * 2008-10-27 2009-03-18 阿里巴巴集团控股有限公司 Page layout method and apparatus
CN102073650A (en) * 2009-11-25 2011-05-25 阿里巴巴集团控股有限公司 Adaptive adjustment method and equipment for webpage
CN102117290B (en) * 2009-12-30 2015-03-18 北京搜狗科技发展有限公司 Method and system used for showing page elements in webpage
CN101894168B (en) * 2010-06-30 2013-02-06 优视科技有限公司 Method and system for layout display of web page of mobile terminal
CN102375851B (en) * 2010-08-23 2014-05-07 中国移动通信有限公司 Method and equipment for display page
CN102866993B (en) * 2011-07-04 2016-08-17 联想(北京)有限公司 Page data loading method and electronic equipment
CN102368193B (en) * 2011-08-26 2017-10-10 百度在线网络技术(北京)有限公司 A kind of method and apparatus for being used to provide browsing pages

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105512141B (en) * 2014-09-26 2020-03-03 腾讯科技(深圳)有限公司 Data loading method and device
CN105512141A (en) * 2014-09-26 2016-04-20 腾讯科技(深圳)有限公司 Method and device for data loading
CN104965656A (en) * 2015-06-19 2015-10-07 努比亚技术有限公司 Page displaying method and apparatus
CN104965914A (en) * 2015-07-06 2015-10-07 无锡天脉聚源传媒科技有限公司 Page display method and apparatus
CN106126517A (en) * 2016-05-31 2016-11-16 美通云动(北京)科技有限公司 The PC end application page is converted to the method and device of the mobile terminal application page
CN106126517B (en) * 2016-05-31 2021-08-31 云深互联(北京)科技有限公司 Method and device for converting PC (personal computer) end application page into mobile end application page
CN106202315A (en) * 2016-06-30 2016-12-07 北京奇虎科技有限公司 The method and device that data process
CN107066524A (en) * 2017-02-20 2017-08-18 平安科技(深圳)有限公司 The display methods and device of product
WO2018149071A1 (en) * 2017-02-20 2018-08-23 平安科技(深圳)有限公司 Method, apparatus and device for displaying product item, and computer readable storage medium
CN107133340A (en) * 2017-05-18 2017-09-05 杭州迪普科技股份有限公司 A kind of method for information display and device of WEB page multiline text inframe
CN107220351A (en) * 2017-05-31 2017-09-29 北京京东尚科信息技术有限公司 The page is left white width calculation method, device, storage medium and electronic equipment
CN107885799A (en) * 2017-10-30 2018-04-06 维沃移动通信有限公司 Info web display methods and device
CN107844577A (en) * 2017-11-08 2018-03-27 国电南瑞科技股份有限公司 A kind of method that lifting GIS pels draw efficiency
CN108280119A (en) * 2017-11-29 2018-07-13 广州市动景计算机科技有限公司 Page generation method, device and user terminal
CN108804514A (en) * 2018-04-25 2018-11-13 网宿科技股份有限公司 A kind of webpage loading method, server and webpage loading system
US11263284B2 (en) 2018-04-25 2022-03-01 Wangsu Science & Technology Co., Ltd. Method and system for loading web page, and server
CN110275657A (en) * 2019-05-21 2019-09-24 杭州国文科技有限公司 Page display method and terminal device
CN111723318A (en) * 2020-06-09 2020-09-29 百度在线网络技术(北京)有限公司 Page data processing method, device, equipment and storage medium
CN111723318B (en) * 2020-06-09 2023-09-01 百度在线网络技术(北京)有限公司 Page data processing method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN103970770B (en) 2018-10-09

Similar Documents

Publication Publication Date Title
CN103970770A (en) Optimization processing method and device for web page and client
CN112667330B (en) Page display method and computer equipment
CN103605739A (en) Method and device for displaying thermodynamic diagrams
CN104424199A (en) Search method and device
CN104980512A (en) Method and equipment for providing target object based on mobile application
CN103823841A (en) Method and device for increasing browsing speed for mobile terminal client
CN103618773A (en) Display method, device and system for thermodynamic diagrams
CN104834646A (en) Webpage display method, client and system
CN112182444A (en) Data rendering system and method and electronic equipment
CN111079048B (en) Page loading method and device
CN106648821B (en) Webpage optimization method and device
CN104050947A (en) Display control method and electronic device
CN103455503A (en) Word stock collection method, webpage rendering method, device and system
CN103258055A (en) Device and method for file downloading
CN108052521B (en) Coordinated data display method, application server and storage medium
CN104408135A (en) Webpage thermodynamic diagram loading method and device
CN111198731A (en) Interface implementation method and device, electronic equipment and storage medium
CN103500190B (en) Icon content updating method and device
CN113127783B (en) Page display method and device, equipment and medium
CN110162373B (en) Method and device for displaying chart in webpage
US20130332568A1 (en) Method of data processing by a navigation module
CN104182247A (en) Method and device for configuring navigation page of browser
CN113393294A (en) Page display method and device, equipment and storage medium
CN104714958A (en) Webpage transfer method and device
CN111263025A (en) Picture processing method and device, equipment and storage medium thereof

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