CN104021158A - Method and device for adjusting webpage elements in webpage and mobile terminal - Google Patents

Method and device for adjusting webpage elements in webpage and mobile terminal Download PDF

Info

Publication number
CN104021158A
CN104021158A CN201410222907.2A CN201410222907A CN104021158A CN 104021158 A CN104021158 A CN 104021158A CN 201410222907 A CN201410222907 A CN 201410222907A CN 104021158 A CN104021158 A CN 104021158A
Authority
CN
China
Prior art keywords
web page
webpage
adjusted
content
page element
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.)
Pending
Application number
CN201410222907.2A
Other languages
Chinese (zh)
Inventor
关翔
刘阳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingsoft Internet Science and Technology Co Ltd
Original Assignee
Beijing Kingsoft Internet Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kingsoft Internet Science and Technology Co Ltd filed Critical Beijing Kingsoft Internet Science and Technology Co Ltd
Priority to CN201410222907.2A priority Critical patent/CN104021158A/en
Publication of CN104021158A publication Critical patent/CN104021158A/en
Pending legal-status Critical Current

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention provides a method and device for adjusting webpage elements in a webpage and a mobile terminal. The method includes the following steps of receiving a webpage access request, obtaining webpage content according to the webpage access request, analyzing the webpage content to obtain the webpage elements to be adjusted in the webpage content, rendering the webpage content and adjusting attributes of rendering nodes corresponding to the webpage elements to be adjusted when the webpage content is rendered. According to the method for adjusting the webpage elements in the webpage, the elements to be adjusted in the webpage are obtained by analyzing the webpage content, the webpage elements to be adjusted are adjusted when the webpage content is rendered, a user can watch the content of a proper size after having access to the webpage, the webpage is prevented from being repeatedly loaded, and the method is easy, convenient and efficient, and user experience is improved.

Description

The method of adjustment of webpage elements, device and mobile terminal
Technical field
The present invention relates to field of computer technology, relate in particular to a kind of method of adjustment, device and mobile terminal of webpage elements.
Background technology
Along with the development of electronic information technology and development of Mobile Internet technology, mobile terminal has become the main tool of user's obtaining information.Particularly, by being arranged on the browser class application program in mobile terminal, user is obtaining information quickly and easily.But; when user passes through browser class application program browsing page in mobile terminal; for example, owing to being subject to the restriction of the performance of mobile terminal (display screen size) own; the webpage that browser class application program loads often can not meet user's demand; for example, because the display screen of mobile terminal is often less, therefore can be to former webpage convergent-divergent; cause often there will be on webpage some smaller words, picture etc., thereby affected user's result of browse.
In prior art, exist by revising CSS (Cascading Style Sheet, the Cascading Style Sheet) mode of attribute of webpage and adjust the size of these smaller words or picture, thereby meet user after drafting, browse demand.In realizing process of the present invention, at least there is following problem in inventor's invention prior art: the words of adjusting web page element by revising the mode of CSS attribute, can cause browser to increase refreshing frequency, thereby delay the load time of webpage, affect user's the quality of browsing.
Summary of the invention
The present invention is intended at least one of solve the problems of the technologies described above.
For this reason, first object of the present invention is to propose a kind of method of adjustment of webpage elements.The method makes user after entering the Web page, directly see sizeable content, has avoided repeating to be written into the page.
Second object of the present invention is to propose a kind of adjusting gear of webpage elements.
The 3rd object of the present invention is to propose a kind of mobile terminal.
To achieve these goals, the method for adjustment of the webpage elements of first aspect present invention embodiment, comprises the following steps: receive web access requests; According to web access requests, obtain web page contents; Analyzing web page content is to obtain the web page element to be adjusted in web page contents; Play up described web page contents, and when playing up described web page contents, described web page element to be adjusted is adjusted.
The method of adjustment of the webpage elements of the embodiment of the present invention, by the element to be adjusted in analyzing web page content obtaining webpage, and when playing up web page contents, web page element to be adjusted is adjusted, make user after entering the Web page, directly see sizeable content, avoided repeating to be written into the page, simple and effective, has promoted user's experience.
To achieve these goals, the adjusting gear of the webpage elements of second aspect present invention embodiment, comprising: receiver module, for receiving web access requests; Acquisition module, for obtaining web page contents according to described web access requests; Parsing module, for resolving described web page contents to obtain the web page element to be adjusted of described web page contents; Rendering module, for playing up described web page contents; Adjusting module, for adjusting described web page element to be adjusted when playing up described web page contents.
The adjusting gear of the webpage elements of the embodiment of the present invention, by the element to be adjusted in analyzing web page content obtaining webpage, and when playing up web page contents, web page element to be adjusted is adjusted, make user after entering the Web page, directly see sizeable content, avoided repeating to be written into the page, simple and effective, has promoted user's experience.
To achieve these goals, the mobile terminal of third aspect present invention embodiment, comprising: housing, processor, storer, circuit board and power circuit, wherein, described circuit board is placed in the interior volume that described housing surrounds, and described processor and described storer are arranged on described circuit board; Described power circuit, is used to each circuit or the device power supply of described mobile terminal; Described storer is for stores executable programs code; Described processor moves the program corresponding with described executable program code by reading the executable program code of storing in described storer, for: receive web access requests; According to described web access requests, obtain web page contents; Resolve described web page contents to obtain the web page element to be adjusted in described web page contents; Play up described web page contents, and when playing up described web page contents, described web page element to be adjusted is adjusted.
The mobile terminal of the embodiment of the present invention, by the element to be adjusted in analyzing web page content obtaining webpage, and when playing up web page contents, web page element to be adjusted is adjusted, make user after entering the Web page, directly see sizeable content, avoided repeating to be written into the page, simple and effective, has promoted user's experience.
The aspect that the present invention is additional and advantage in the following description part provide, and part will become obviously from the following description, or recognize by practice of the present invention.
Accompanying drawing explanation
Above-mentioned and/or the additional aspect of the present invention and advantage will become from the following description of the accompanying drawings of embodiments and obviously and easily understand, wherein,
Fig. 1 is the process flow diagram of the method for adjustment of webpage elements according to an embodiment of the invention;
Fig. 2 be according to an embodiment of the invention analyzing web page content to obtain the process flow diagram of the web page element to be adjusted in web page contents;
Fig. 3 is the process flow diagram of the method for adjustment of the webpage elements of another embodiment according to the present invention;
Fig. 4 is the structural representation of the adjusting gear of webpage elements according to an embodiment of the invention;
Fig. 5 is the structural representation of the adjusting gear of the webpage elements of another embodiment according to the present invention.
Embodiment
Describe embodiments of the invention below in detail, the example of described embodiment is shown in the drawings, and wherein same or similar label represents same or similar element or has the element of identical or similar functions from start to finish.Below by the embodiment being described with reference to the drawings, be exemplary, only for explaining the present invention, and can not be interpreted as limitation of the present invention.On the contrary, embodiments of the invention comprise spirit and all changes within the scope of intension, modification and the equivalent that falls into additional claims.
In description of the invention, it will be appreciated that, term " first ", " second " etc. are only for describing object, and can not be interpreted as indication or hint relative importance.In description of the invention, it should be noted that, unless otherwise clearly defined and limited, term " is connected ", " connection " should be interpreted broadly, and for example, can be to be fixedly connected with, and can be also to removably connect, or connects integratedly; Can be mechanical connection, can be to be also electrically connected to; Can be to be directly connected, also can indirectly be connected by intermediary.For the ordinary skill in the art, can concrete condition understand above-mentioned term concrete meaning in the present invention.In addition,, in description of the invention, except as otherwise noted, the implication of " a plurality of " is two or more.
In process flow diagram or any process of otherwise describing at this or method describe and can be understood to, represent to comprise that one or more is for realizing module, fragment or the part of code of executable instruction of the step of specific logical function or process, and the scope of the preferred embodiment of the present invention comprises other realization, wherein can be not according to order shown or that discuss, comprise according to related function by the mode of basic while or by contrary order, carry out function, this should be understood by embodiments of the invention person of ordinary skill in the field.
Below with reference to accompanying drawing, describe according to the method for adjustment of the webpage elements of the embodiment of the present invention, device and mobile terminal.
At present, by revising the mode of the CSS Attribute tuning web page element size of webpage, can increase browser refreshing frequency, extend the webpage load time, affect user's the quality of browsing, in order to address the above problem, the present invention proposes a kind of method of adjustment of webpage elements.
Fig. 1 is the process flow diagram of the method for adjustment of webpage elements according to an embodiment of the invention.As shown in Figure 1, the method for adjustment of webpage elements comprises the following steps:
S101, receives web access requests.
Particularly, in one embodiment of the invention, in the browser interface of browser class application program, user can, by modes such as input network address or clickthroughs, send web access requests to corresponding server.
S102, obtains web page contents according to web access requests.
Particularly, the server that web access requests is corresponding returns to web page contents, as the HTML of webpage (Hyper Text Markup Language, supertext markup language) file, JS (JavaScript, client script language) script file, CSS (a Cascading Style Sheet, Cascading Style Sheet) file etc.
S103, analyzing web page content is to obtain the web page element to be adjusted in web page contents.
In a specific embodiment of the present invention, as shown in Figure 2, analyzing web page content can realize as follows with the web page element to be adjusted obtaining in web page contents:
S1031, analyzing web page content is to obtain a plurality of web page elements.
Particularly, after receiving web page contents, can to web page contents, resolve by existing any web page contents analytic technique, such as the html file of webpage being resolved etc., thereby obtain a plurality of web page elements in web page contents.
S1032, obtains respectively the characteristic information of a plurality of web page elements.
Wherein, characteristic information comprise the position, shape of web page element place content blocks, highly, width, area, type and with respect to one or more in the displaying ratio of webpage.For example, position can be positioned at the centre of webpage, upper left quarter, left side etc.; Type can be one or more in video, picture, word etc.
S1033, determines the web page element to be adjusted in a plurality of web page elements according to characteristic information.
In one embodiment of the invention, S1033 specifically comprises:
According to characteristic information, a plurality of web page elements are screened to obtain web page element to be adjusted.Particularly, can be by characteristic information with default judgment rule for mating, and at characteristic information when default judgment rule mates, determine that corresponding web page element is web page element to be adjusted.
Wherein, in the present embodiment, default judgment rule is body matter judgment rule, body matter judgment rule can be by one or more settings in characteristic information, body matter judgment rule is for judging whether the content in webpage content blocks is the body matter of webpage, be body matter judgment rule be the rule of screening web page element to be adjusted, such as area, surpass preset area value, highly surpass preset height value, width over the combination of one or more rules in predetermined width value etc. etc.; If characteristic information mates with body matter judgment rule, determine that web page element is web page element to be adjusted, for example body matter judgment rule is for being highly not less than preset height value.
Simply introduce body matter judgment rule below, in one embodiment of the invention, body matter judgment rule can be one or more in the following: (1) web page element place content blocks is greater than default displaying ratio threshold value with respect to the displaying ratio of webpage, for example, if when content blocks is greater than 50% with respect to the displaying ratio of webpage, illustrate that this content blocks is the body matter of webpage; (2) when the type of web page element place content blocks is text, text is carried out to semantic identification to obtain the degree of correlation of text and webpage, and the degree of correlation is greater than default degree of correlation threshold value, for example, the news web page of a Mobile phone of producing about mobile operator, if this mobile operator's title or the title of Mobile phone repeatedly appear in the textual portions of content blocks, illustrate that it is the body matter of this webpage.Wherein, default displaying ratio threshold value and default degree of correlation threshold value can, by browser default setting, also can manually be set by user.
Should be understood that, aforementioned body content judgment rule can be selected a selection and implement, or can implement to use simultaneously.Those skilled in the art can also upgrade body matter judgment rule according to the feature of other webpage body matter, at this, does not limit.
S104, plays up web page contents, and when playing up web page contents, web page element to be adjusted is adjusted.
Particularly, in one embodiment of the invention, when playing up web page contents, can first according to the analysis result of web page contents, generate DOM (Document Object Model, DOM Document Object Model) tree, and generate and play up tree according to dom tree.In an embodiment of the present invention, can be by web page contents being converted into dom tree and downloading related resource, and generate and play up tree according to dom tree, then by revising the attribute of the rendering node that web page element to be adjusted is corresponding, realize the adjustment to web page element to be adjusted.Concrete render process can be passed through existing techniques in realizing, does not repeat them here.
Wherein, when playing up web page contents, to web page element adjustment to be adjusted, can be that the web page element to be adjusted that characteristic information is mated with body matter judgment rule amplifies adjustment, other adjustment modes such as can be also overstriking, widen, so that the size after adjusting meets user's reading habit, for example, the word of body matter can be amplified, other guide dwindles etc., specifically can realize by corresponding coefficient is set.
The method of adjustment of the webpage elements of the embodiment of the present invention, by the element to be adjusted in analyzing web page content obtaining webpage, and when playing up web page contents, web page element to be adjusted is adjusted, make user after entering the Web page, directly see sizeable content, avoided repeating to be written into the page, simple and effective, has promoted user's experience.
Fig. 3 is the process flow diagram of the method for adjustment of the webpage elements of another embodiment according to the present invention.In order improving, to browse quality, also can to identify the ad content in webpage, and ad content is adjusted accordingly or hidden.As shown in Figure 3, the method for adjustment of this webpage elements comprises:
S301, receives web access requests.
S302, obtains web page contents according to web access requests.
S303, analyzing web page content is to obtain the web page element to be adjusted in web page contents.
In a specific embodiment of the present invention, to similar shown in Fig. 2, analyzing web page content can realize (not shown) as follows with the web page element to be adjusted obtaining in web page contents:
S3031, analyzing web page content is to obtain a plurality of web page elements.
S3032, obtains respectively the characteristic information of a plurality of web page elements.
S3033, determines the web page element to be adjusted in a plurality of web page elements according to characteristic information.
In one embodiment of the invention, characteristic information can be mated respectively with body matter judgment rule and ad content judgment rule.Wherein, the coupling implementation of body matter judgment rule and ad content judgment rule can be in no particular order sequentially.
Wherein, body matter judgment rule and matching process thereof can, with reference to said method embodiment, not repeat them here.
Wherein, ad content judgment rule can be by one or more settings in characteristic information, for judging whether the content in webpage content blocks is the ad content of webpage, be ad content judgment rule be the rule of screening advertisement, such as area, be less than preset area value, be highly less than the combination etc. that preset height value, width are less than one or more rules in predetermined width value etc.; If characteristic information mates with ad content judgment rule, determine that web page element is web page element to be adjusted, for example ad content judgment rule is for being highly less than preset height value.
In one embodiment of the invention, ad content judgment rule can be one or more in the following: (1) web page element place content blocks is less than or equal to default displaying ratio threshold value with respect to the displaying ratio of webpage, for example, if when content blocks is less than or equal to 20% with respect to the displaying ratio of webpage, illustrate that this content blocks is the ad content of webpage; (2) when the type of web page element place content blocks is text, text is carried out to semantic identification to obtain the degree of correlation of text and webpage, and the degree of correlation is less than or equal to default degree of correlation threshold value, for example, the news web page of a Mobile phone of producing about mobile operator, if the textual portions of content blocks repeatedly occurs and this mobile operator or the incoherent title of this mobile phone or content, illustrate that it is the ad content of this webpage.Wherein, default displaying ratio threshold value and default degree of correlation threshold value can, by browser default setting, also can manually be set by user.
Should be understood that, above-mentioned ad content judgment rule can divide appraise and select one to select to implement, or can implement to use simultaneously.Those skilled in the art can also upgrade ad content judgment rule according to the feature of other web advertisement content, at this, does not limit.
S304, play up web page contents, and the web page element to be adjusted when playing up web page contents, characteristic information being mated with body matter judgment rule amplifies adjustment, and/or the web page element to be adjusted that characteristic information is mated with ad content judgment rule is hidden adjustment.
Particularly, the web page element to be adjusted that characteristic information is mated with body matter judgment rule amplifies the content of adjustment referring to a upper embodiment, does not repeat them here.
In one embodiment of the invention, also can play up by adjustment the attribute of the rendering node that in tree, web page element to be adjusted is corresponding, the web page element to be adjusted in rendering node, characteristic information being mated with ad content judgment rule is hidden, to realize hiding ad content.For example, height and width are set to 1px and 1px, or the area unit of being set to 1, or hide and arrange etc.
The method of adjustment of the webpage elements of the embodiment of the present invention, by the element to be adjusted in analyzing web page content obtaining webpage, and when playing up web page contents, web page element to be adjusted is adjusted, can automatically identify the ad content in webpage and hide, make user after entering the Web page, directly see sizeable body matter, avoided ad content to take the page, simple and effective, has promoted user's experience.
In order to realize above-described embodiment, the present invention also proposes a kind of adjusting gear of webpage elements.
Fig. 4 is the structural representation of the adjusting gear of webpage elements according to an embodiment of the invention.As shown in Figure 4, the adjusting gear of webpage elements comprises: receiver module 100, acquisition module 200, parsing module 300, rendering module 400 and adjusting module 500.
Particularly, receiver module 100 is for receiving web access requests.In one embodiment of the invention, in the browser interface of browser class application program, user can be by modes such as input network address or clickthroughs to receiver module 100 input web access requests, and receiver module 100 sends web access requests to corresponding server.
Acquisition module 200 is for obtaining web page contents according to web access requests.More specifically, the server that web access requests is corresponding returns to web page contents to acquisition module 200, as the html file of webpage, JS script file, CSS file etc.
Parsing module 300 for analyzing web page content to obtain the web page element to be adjusted of web page contents.
Rendering module 400 is for playing up web page contents.According to web page contents, generate dom tree, and generate and play up tree according to dom tree.More specifically, generation module 400 can generate dom tree according to the analysis result of web page contents, and generates and play up tree according to dom tree.In an embodiment of the present invention, rendering module 400 can be by web page contents being converted into dom tree and downloading related resource, and generate and play up tree according to dom tree, and web page contents is played up.Concrete generative process can be passed through existing techniques in realizing, does not repeat them here.
Adjusting module 500 for adjusting web page element to be adjusted when playing up web page contents.In one embodiment of the invention, when playing up web page contents, to web page element adjustment to be adjusted, can be that the attribute of rendering node corresponding to web page element is carried out to zoom in/out adjustment, other adjustment modes such as can be also overstriking, widen, hide, so that the size after adjusting meets user's reading habit, for example, the word of body matter can be amplified, other guide dwindles etc., specifically can realize by corresponding coefficient is set.
The adjusting gear of the webpage elements of the embodiment of the present invention, by the element to be adjusted in analyzing web page content obtaining webpage, by the element to be adjusted in analyzing web page content obtaining webpage, and when playing up web page contents, web page element to be adjusted is adjusted, make user after entering the Web page, directly see sizeable content, avoided repeating to be written into the page, simple and effective, has promoted user's experience.
Fig. 5 is the structural representation of the adjusting gear of the webpage elements of another embodiment according to the present invention.As shown in Figure 5, the adjusting gear of webpage elements comprises: receiver module 100, acquisition module 200, parsing module 300, rendering module 400, adjusting module 500, resolution unit 310, acquiring unit 320 and determining unit 330.Wherein, parsing module 300 comprises resolution unit 310, acquiring unit 320 and determining unit 330.
Particularly, resolution unit 310 for analyzing web page content to obtain a plurality of web page elements.More specifically, after receiving web page contents, resolution unit 310 can be resolved web page contents by existing any web page contents analytic technique, such as the html file of webpage being resolved etc., thereby obtains a plurality of web page elements in web page contents.
Acquiring unit 320 is for obtaining respectively the characteristic information of a plurality of web page elements.Wherein, characteristic information comprise the position, shape of web page element place content blocks, highly, width, area, type and with respect to one or more in the displaying ratio of webpage.For example, position can be positioned at the centre of webpage, upper left quarter, left side etc.; Type can be one or more in video, picture, word etc.
Determining unit 330 is for determining the web page element to be adjusted of a plurality of web page elements according to characteristic information.Determining unit 330 can screen to obtain web page element to be adjusted to a plurality of web page elements according to characteristic information.More specifically, determining unit 330 can be by characteristic information with default judgment rule for mating, and at characteristic information when default judgment rule mates, determine that corresponding web page element is web page element to be adjusted.Wherein, default judgment rule be body matter judgment rule and/ad content judgment rule, body matter judgment rule and/or ad content judgment rule are by one or more settings in characteristic information.
Body matter judgment rule is for judging whether the content in webpage content blocks is the body matter of webpage, be body matter judgment rule be the rule of screening web page element to be adjusted, such as area, surpass preset area value, highly surpass preset height value, width over the combination of one or more rules in predetermined width value etc. etc.
If characteristic information mates with body matter judgment rule, determining unit 330 determines that this web page element is web page element to be adjusted, and for example body matter judgment rule is for being highly not less than preset height value.
Simply introduce body matter judgment rule below, in one embodiment of the invention, body matter judgment rule can be one or more in the following: (1) web page element place content blocks is greater than default displaying ratio threshold value with respect to the displaying ratio of webpage, for example, if when content blocks is greater than 50% with respect to the displaying ratio of webpage, illustrate that this content blocks is the body matter of webpage; (2) when the type of web page element place content blocks is text, text is carried out to semantic identification to obtain the degree of correlation of text and webpage, and the degree of correlation is greater than default degree of correlation threshold value, for example, the news web page of a Mobile phone of producing about mobile operator, if this mobile operator's title or the title of Mobile phone repeatedly appear in the textual portions of content blocks, illustrate that it is the body matter of this webpage.Wherein, default displaying ratio threshold value and default degree of correlation threshold value can, by browser default setting, also can manually be set by user.
Should be understood that, aforementioned body content judgment rule can be selected a selection and implement, or can implement to use simultaneously.Those skilled in the art can also upgrade body matter judgment rule according to the feature of other webpage body matter, at this, does not limit.
Ad content judgment rule is for judging whether the content in webpage content blocks is the ad content of webpage.In one embodiment of the invention, determining unit 330 can be mated characteristic information respectively with ad content judgment rule.Wherein, ad content judgment rule can be by one or more settings in characteristic information, for judging whether the content in webpage content blocks is the ad content of webpage, be ad content judgment rule be the rule of screening advertisement, such as area, be less than preset area value, be highly less than the combination etc. that preset height value, width are less than one or more rules in predetermined width value etc.If characteristic information mates with ad content judgment rule, determining unit 330 determines that this web page element is web page element to be adjusted.For example ad content judgment rule is for being highly less than preset height value, if the characteristic information of web page element mates with ad content judgment rule, determining unit 330 determines that this web page element is web page element to be adjusted.In one embodiment of the invention, ad content judgment rule can be one or more in the following: web page element place content blocks is less than or equal to default displaying ratio threshold value with respect to the displaying ratio of webpage, for example, if when content blocks is less than or equal to 20% with respect to the displaying ratio of webpage, illustrate that this content blocks is the ad content of webpage; When the type of web page element place content blocks is text, text is carried out to semantic identification to obtain the degree of correlation of text and webpage, and the degree of correlation is less than or equal to default degree of correlation threshold value, for example, the news web page of a Mobile phone of producing about mobile operator, if the textual portions of content blocks repeatedly occurs and this mobile operator or the incoherent title of this mobile phone or content, illustrate that it is the ad content of this webpage.Wherein, default displaying ratio threshold value and default degree of correlation threshold value can, by browser default setting, also can manually be set by user.
Should be understood that, above-mentioned ad content judgment rule can divide appraise and select one to select to implement, or can implement to use simultaneously.Those skilled in the art can also upgrade ad content judgment rule according to the feature of other web advertisement content, at this, does not limit.
It will be appreciated that, the coupling implementation of body matter judgment rule and ad content judgment rule is order in no particular order.
Adjusting module 500 amplifies adjustment specifically for the web page element to be adjusted that characteristic information is mated with body matter judgment rule, and other adjustment modes such as can be also overstriking, widen, so that the size after adjusting meets user's reading habit; And/or the web page element to be adjusted that characteristic information is mated with ad content judgment rule is hidden adjustment, to realize hiding ad content, for example, height and width are set to 1px and 1px, or the area unit of being set to 1, or hide and arrange etc.
The adjusting gear of the webpage elements of the embodiment of the present invention, by the element to be adjusted in analyzing web page content obtaining webpage, and when playing up web page contents, web page element to be adjusted is adjusted, can automatically identify the body matter in webpage and amplify the ad content in processing, identification webpage and hide, make user after entering the Web page, directly see sizeable body matter, avoided ad content to take the page, simple and effective, has promoted user's experience.
In order to realize above-described embodiment, the present invention also proposes a kind of mobile terminal.
A mobile terminal, is characterized in that, comprising: comprise housing, processor, storer, circuit board and power circuit, wherein, circuit board is placed in the interior volume that housing surrounds, and processor and storer are arranged on circuit board; Power circuit, is used to each circuit or the device power supply of mobile terminal; Storer is for stores executable programs code; Processor moves the program corresponding with executable program code by the executable program code of storing in read memory, and specifically for carrying out following steps:
S101 ', receives web access requests.
Particularly, in one embodiment of the invention, in the browser interface of browser class application program, user can, by modes such as input network address or clickthroughs, send web access requests to corresponding server.
S102 ', obtains web page contents according to web access requests.
Particularly, the server that web access requests is corresponding returns to web page contents, as the HTML of webpage (Hyper Text Markup Language, supertext markup language) file, JS (JavaScript, client script language) script file, CSS (a Cascading Style Sheet, Cascading Style Sheet) file etc.
S103 ', analyzing web page content is to obtain the web page element to be adjusted in web page contents.
In a specific embodiment of the present invention, as shown in Figure 2, processor analyzing web page content can realize as follows with the web page element to be adjusted obtaining in web page contents:
S1031 ', analyzing web page content is to obtain a plurality of web page elements.
Particularly, after receiving web page contents, processor can be resolved web page contents by existing any web page contents analytic technique, such as the html file of webpage being resolved etc., thereby obtains a plurality of web page elements in web page contents.
S1032 ', obtains respectively the characteristic information of a plurality of web page elements.
Wherein, characteristic information comprise the position, shape of web page element place content blocks, highly, width, area, type and with respect to one or more in the displaying ratio of webpage.For example, position can be positioned at the centre of webpage, upper left quarter, left side etc.; Type can be one or more in video, picture, word etc.
S1033 ', screens to obtain web page element to be adjusted according to characteristic information to a plurality of web page elements.
In one embodiment of the invention, S1033 ' specifically comprises: characteristic information can be mated with body matter judgment rule, wherein, body matter judgment rule can be by one or more settings in characteristic information, body matter judgment rule is for judging whether the content in webpage content blocks is the body matter of webpage, be body matter judgment rule be the rule of screening web page element to be adjusted, such as area, surpass preset area value, highly surpass preset height value, width over the combination of one or more rules in predetermined width value etc. etc.; If characteristic information mates with body matter judgment rule, determine that web page element is web page element to be adjusted, for example body matter judgment rule is for being highly not less than preset height value.
Simply introduce body matter judgment rule below, in one embodiment of the invention, body matter judgment rule can be one or more in the following: (1) web page element place content blocks is greater than default displaying ratio threshold value with respect to the displaying ratio of webpage, for example, if when content blocks is greater than 50% with respect to the displaying ratio of webpage, illustrate that this content blocks is the body matter of webpage; (2) when the type of web page element place content blocks is text, text is carried out to semantic identification to obtain the degree of correlation of text and webpage, and the degree of correlation is greater than default degree of correlation threshold value, for example, the news web page of a Mobile phone of producing about mobile operator, if this mobile operator's title or the title of Mobile phone repeatedly appear in the textual portions of content blocks, illustrate that it is the body matter of this webpage.Wherein, default displaying ratio threshold value and default degree of correlation threshold value can, by browser default setting, also can manually be set by user.
Should be understood that, aforementioned body content judgment rule can be selected a selection and implement, or can implement to use simultaneously.Those skilled in the art can also upgrade body matter judgment rule according to the feature of other webpage body matter, at this, does not limit.
S104 ', plays up described web page contents, and when playing up described web page contents, described web page element to be adjusted is adjusted.
Particularly, processor can generate DOM (Document Object Model, DOM Document Object Model) tree according to the analysis result of web page contents, and generates and play up tree according to dom tree.In an embodiment of the present invention, can be by web page contents being converted into dom tree and downloading related resource, and generate and play up tree according to dom tree, then by revising the attribute of the rendering node that web page element to be adjusted is corresponding, realize the adjustment to web page element to be adjusted.Concrete render process can be passed through existing techniques in realizing, does not repeat them here.
Wherein, when playing up web page contents, to web page element adjustment to be adjusted, can be that the web page element to be adjusted that characteristic information is mated with body matter judgment rule amplifies adjustment,
Other adjustment modes such as can be also overstriking, widen, so that the size after adjusting meets user's reading habit, for example, can amplify the word of body matter, other guide dwindles etc., specifically can realize by corresponding coefficient is set.
The mobile terminal of the embodiment of the present invention, by the element to be adjusted in analyzing web page content obtaining webpage, and when playing up web page contents, web page element to be adjusted is adjusted, make user after entering the Web page, directly see sizeable content, avoided repeating to be written into the page, simple and effective, has promoted user's experience.
Should be appreciated that each several part of the present invention can realize with hardware, software, firmware or their combination.In the above-described embodiment, a plurality of steps or method can realize with being stored in storer and by software or the firmware of suitable instruction execution system execution.For example, if realized with hardware, the same in another embodiment, can realize by any one in following technology well known in the art or their combination: have for data-signal being realized to the discrete logic of the logic gates of logic function, the special IC with suitable combinational logic gate circuit, programmable gate array (PGA), field programmable gate array (FPGA) etc.
In the description of this instructions, the description of reference term " embodiment ", " some embodiment ", " example ", " concrete example " or " some examples " etc. means to be contained at least one embodiment of the present invention or example in conjunction with specific features, structure, material or the feature of this embodiment or example description.In this manual, the schematic statement of above-mentioned term is not necessarily referred to identical embodiment or example.And the specific features of description, structure, material or feature can be with suitable mode combinations in any one or more embodiment or example.
Although illustrated and described embodiments of the invention, those having ordinary skill in the art will appreciate that: in the situation that not departing from principle of the present invention and aim, can carry out multiple variation, modification, replacement and modification to these embodiment, scope of the present invention is limited by claim and equivalent thereof.

Claims (15)

1. a method of adjustment for webpage elements, is characterized in that, comprises the following steps:
Receive web access requests;
According to described web access requests, obtain web page contents;
Resolve described web page contents to obtain the web page element to be adjusted in described web page contents;
Play up described web page contents, and when playing up described web page contents, described web page element to be adjusted is adjusted.
2. the method for adjustment of webpage elements according to claim 1, is characterized in that, described analyzing web page content specifically comprises with the web page element to be adjusted obtaining in described web page contents:
Resolve described web page contents to obtain a plurality of web page elements;
Obtain respectively the characteristic information of described a plurality of web page elements; And
According to described characteristic information, determine the web page element to be adjusted in described a plurality of web page element.
3. the method for adjustment of webpage elements according to claim 2, is characterized in that, describedly according to described characteristic information, determines the web page element to be adjusted in described a plurality of web page element, comprising:
According to described characteristic information, described a plurality of web page elements are screened to obtain described web page element to be adjusted.
4. the method for adjustment of webpage elements according to claim 2, is characterized in that, describedly according to described characteristic information, determines the web page element to be adjusted in described a plurality of web page element, comprising:
Described characteristic information is mated with default judgment rule, and when described characteristic information mates with described default judgment rule, determines that corresponding web page element is described web page element to be adjusted,
Wherein, described default judgment rule comprises body matter judgment rule and/or ad content judgment rule, described body matter judgment rule and/or ad content judgment rule are by one or more settings in described characteristic information, described body matter judgment rule is for judging whether the content in described webpage content blocks is the body matter of webpage, and described ad content judgment rule is for judging whether the content in described webpage content blocks is the ad content of webpage.
5. according to the method for adjustment of the webpage elements described in claim 3 or 4, it is characterized in that, described characteristic information comprise the position, shape of described web page element place content blocks, highly, width, area, type and with respect to one or more in the displaying ratio of described webpage.
6. the method for adjustment of webpage elements according to claim 5, is characterized in that,
Described body matter judgment rule is one or more in the following:
Described web page element place content blocks is greater than default displaying ratio threshold value with respect to the displaying ratio of described webpage; Or
When the type of described web page element place content blocks is text, described text is carried out to semantic identification to obtain the degree of correlation of described text and described webpage, and the described degree of correlation is greater than default degree of correlation threshold value;
Described ad content judgment rule is one or more in the following:
Described web page element place content blocks is less than or equal to default displaying ratio threshold value with respect to the displaying ratio of described webpage; Or
When the type of described web page element place content blocks is text, described text is carried out to semantic identification to obtain the degree of correlation of described text and described webpage, and the described degree of correlation is less than or equal to default degree of correlation threshold value.
7. the method for adjustment of webpage elements according to claim 4, is characterized in that, describedly when playing up described web page contents, described web page element to be adjusted is adjusted, and comprising:
Described characteristic information is amplified to adjustment with the web page element described to be adjusted that described body matter judgment rule mates; And/or
Described characteristic information is hidden to adjustment with the web page element described to be adjusted that described ad content judgment rule mates.
8. an adjusting gear for webpage elements, is characterized in that, comprising:
Receiver module, for receiving web access requests;
Acquisition module, for obtaining web page contents according to described web access requests;
Parsing module, for resolving described web page contents to obtain the web page element to be adjusted of described web page contents;
Rendering module, for playing up described web page contents;
Adjusting module, for adjusting described web page element to be adjusted when playing up described web page contents.
9. the adjusting gear of webpage elements according to claim 8, is characterized in that, described parsing module specifically comprises:
Resolution unit, for resolving described web page contents to obtain a plurality of web page elements;
Acquiring unit, for obtaining respectively the characteristic information of described a plurality of web page elements; And
Determining unit, for determining the web page element to be adjusted of described a plurality of web page elements according to described characteristic information.
10. the adjusting gear of webpage elements according to claim 9, is characterized in that, described determining unit specifically for:
According to described characteristic information, described a plurality of web page elements are screened to obtain described web page element to be adjusted.
The adjusting gear of 11. webpage elements according to claim 9, is characterized in that, described determining unit specifically for:
Described characteristic information is mated with default judgment rule, and when described characteristic information mates with described default judgment rule, determines that corresponding web page element is described web page element to be adjusted,
Wherein, described default judgment rule comprises body matter judgment rule and/or ad content judgment rule, described body matter judgment rule and/or ad content judgment rule are by one or more settings in described characteristic information, described body matter judgment rule is for judging whether the content in described webpage content blocks is the body matter of webpage, and described ad content judgment rule is for judging whether the content in described webpage content blocks is the ad content of webpage.
12. according to the adjusting gear of the webpage elements described in claim 10 or 11, it is characterized in that, described characteristic information comprise the position, shape of described web page element place content blocks, highly, width, area, type and with respect to one or more in the displaying ratio of described webpage.
The adjusting gear of 13. webpage elements according to claim 12, is characterized in that,
Described body matter judgment rule is one or more in the following:
Described web page element place content blocks is greater than default displaying ratio threshold value with respect to the displaying ratio of described webpage; Or
When the type of described web page element place content blocks is text, described text is carried out to semantic identification to obtain the degree of correlation of described text and described webpage, and the described degree of correlation is greater than default degree of correlation threshold value;
Described ad content judgment rule is one or more in the following:
Described web page element place content blocks is less than or equal to default displaying ratio threshold value with respect to the displaying ratio of described webpage; Or
When the type of described web page element place content blocks is text, described text is carried out to semantic identification to obtain the degree of correlation of described text and described webpage, and the described degree of correlation is less than or equal to default degree of correlation threshold value.
The adjusting gear of 14. webpage elements according to claim 11, is characterized in that, described adjusting module specifically for:
Described characteristic information is amplified to adjustment with the web page element described to be adjusted that described body matter judgment rule mates; And/or
Described characteristic information is hidden to adjustment with the web page element described to be adjusted that described ad content judgment rule mates.
15. 1 kinds of mobile terminals, is characterized in that, comprise housing, processor, storer, circuit board and power circuit, and wherein, described circuit board is placed in the interior volume that described housing surrounds, and described processor and described storer are arranged on described circuit board;
Described power circuit, is used to each circuit or the device power supply of described mobile terminal;
Described storer is for stores executable programs code;
Described processor moves the program corresponding with described executable program code by reading the executable program code of storing in described storer, for:
Receive web access requests;
According to described web access requests, obtain web page contents;
Resolve described web page contents to obtain the web page element to be adjusted in described web page contents;
Play up described web page contents, and when playing up described web page contents, described web page element to be adjusted is adjusted.
CN201410222907.2A 2014-05-23 2014-05-23 Method and device for adjusting webpage elements in webpage and mobile terminal Pending CN104021158A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410222907.2A CN104021158A (en) 2014-05-23 2014-05-23 Method and device for adjusting webpage elements in webpage and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410222907.2A CN104021158A (en) 2014-05-23 2014-05-23 Method and device for adjusting webpage elements in webpage and mobile terminal

Publications (1)

Publication Number Publication Date
CN104021158A true CN104021158A (en) 2014-09-03

Family

ID=51437912

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410222907.2A Pending CN104021158A (en) 2014-05-23 2014-05-23 Method and device for adjusting webpage elements in webpage and mobile terminal

Country Status (1)

Country Link
CN (1) CN104021158A (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104915459A (en) * 2015-07-07 2015-09-16 英业达科技有限公司 Dynamic regulation system of webpage form and method thereof
CN105426524A (en) * 2015-12-08 2016-03-23 北京奇虎科技有限公司 Web interface displaying method and device
CN105912569A (en) * 2016-03-29 2016-08-31 网易传媒科技(北京)有限公司 Method and device for displaying webpage element contained in 3D target scene
CN106156101A (en) * 2015-04-02 2016-11-23 阿里巴巴集团控股有限公司 A kind of method and device of the dynamic change page
WO2017001901A1 (en) * 2015-06-30 2017-01-05 Yandex Europe Ag Method of identifying a target object on a web page
CN106815225A (en) * 2015-11-27 2017-06-09 方正国际软件(北京)有限公司 A kind of floating advertisement treatment of media interface and the method and device of display
CN107016067A (en) * 2017-03-17 2017-08-04 广州市利迪网络科技有限公司 A kind of page automatic adaptation method
CN108182190A (en) * 2016-12-08 2018-06-19 北京京东尚科信息技术有限公司 For the method, apparatus and electronic equipment that webpage is presented, generates self adaptive net
CN108509526A (en) * 2018-03-13 2018-09-07 百度在线网络技术(北京)有限公司 The method and apparatus of interface element for Dynamic Distribution's mobile application
CN109960552A (en) * 2017-12-26 2019-07-02 浙江宇视科技有限公司 A kind of web interface differentiation rendering method and device
CN111882371A (en) * 2019-04-15 2020-11-03 阿里巴巴集团控股有限公司 Content information processing method, image-text content processing method, computer device, and medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102024028A (en) * 2010-11-22 2011-04-20 百度在线网络技术(北京)有限公司 Method and equipment for distinctly displaying main contents of webpage on mobile terminal
CN102929871A (en) * 2011-08-08 2013-02-13 腾讯科技(深圳)有限公司 Webpage browsing method and device and mobile terminal
CN102981848A (en) * 2012-11-13 2013-03-20 北京奇虎科技有限公司 Webpage main body element processing browser and method
US20140040070A1 (en) * 2012-02-23 2014-02-06 Arsen Pereymer Publishing on mobile devices with app building
CN103577171A (en) * 2012-07-30 2014-02-12 腾讯科技(深圳)有限公司 Webpage content displaying method and mobile terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102024028A (en) * 2010-11-22 2011-04-20 百度在线网络技术(北京)有限公司 Method and equipment for distinctly displaying main contents of webpage on mobile terminal
CN102929871A (en) * 2011-08-08 2013-02-13 腾讯科技(深圳)有限公司 Webpage browsing method and device and mobile terminal
US20140040070A1 (en) * 2012-02-23 2014-02-06 Arsen Pereymer Publishing on mobile devices with app building
CN103577171A (en) * 2012-07-30 2014-02-12 腾讯科技(深圳)有限公司 Webpage content displaying method and mobile terminal
CN102981848A (en) * 2012-11-13 2013-03-20 北京奇虎科技有限公司 Webpage main body element processing browser and method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
赵锋: "《网页设计与制作 HTML5+CSS+JavaScript 第2版》", 31 August 2013 *

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106156101A (en) * 2015-04-02 2016-11-23 阿里巴巴集团控股有限公司 A kind of method and device of the dynamic change page
WO2017001901A1 (en) * 2015-06-30 2017-01-05 Yandex Europe Ag Method of identifying a target object on a web page
US9916292B2 (en) 2015-06-30 2018-03-13 Yandex Europe Ag Method of identifying a target object on a web page
CN104915459A (en) * 2015-07-07 2015-09-16 英业达科技有限公司 Dynamic regulation system of webpage form and method thereof
CN106815225A (en) * 2015-11-27 2017-06-09 方正国际软件(北京)有限公司 A kind of floating advertisement treatment of media interface and the method and device of display
CN106815225B (en) * 2015-11-27 2020-09-04 方正国际软件(北京)有限公司 Method and device for processing and displaying floating advertisements on media interface
CN105426524A (en) * 2015-12-08 2016-03-23 北京奇虎科技有限公司 Web interface displaying method and device
CN105426524B (en) * 2015-12-08 2019-05-31 北京奇虎科技有限公司 A kind of web interface methods of exhibiting and device
CN105912569B (en) * 2016-03-29 2020-03-20 网易传媒科技(北京)有限公司 Method and device for displaying webpage elements contained in three-dimensional target scene
CN105912569A (en) * 2016-03-29 2016-08-31 网易传媒科技(北京)有限公司 Method and device for displaying webpage element contained in 3D target scene
CN108182190A (en) * 2016-12-08 2018-06-19 北京京东尚科信息技术有限公司 For the method, apparatus and electronic equipment that webpage is presented, generates self adaptive net
CN107016067A (en) * 2017-03-17 2017-08-04 广州市利迪网络科技有限公司 A kind of page automatic adaptation method
CN109960552A (en) * 2017-12-26 2019-07-02 浙江宇视科技有限公司 A kind of web interface differentiation rendering method and device
CN108509526A (en) * 2018-03-13 2018-09-07 百度在线网络技术(北京)有限公司 The method and apparatus of interface element for Dynamic Distribution's mobile application
CN111882371A (en) * 2019-04-15 2020-11-03 阿里巴巴集团控股有限公司 Content information processing method, image-text content processing method, computer device, and medium

Similar Documents

Publication Publication Date Title
CN104021158A (en) Method and device for adjusting webpage elements in webpage and mobile terminal
CN110673847B (en) Method and device for generating configuration page, electronic equipment and readable storage medium
CN106844635B (en) Method and device for editing elements in webpage
KR102001193B1 (en) System and method for automatically managing placement of content slots in an information resource
CN105242937A (en) Method for dynamically updating application interface, terminal and system
US11245951B2 (en) Display device and content providing method thereof
CN104144357B (en) Video broadcasting method and system
CN103914550A (en) Recommended content displaying method and recommended content displaying device
CN102915308A (en) Method and device for rendering pages
CN104866591B (en) Video recommendation method and device
US11349942B2 (en) Methods and apparatus to identify sponsored media in a document object model
WO2017016101A1 (en) Search result display method, device and search engine
CN105095374A (en) Method and device for browsing mobile terminal news
CN102375851A (en) Method and equipment for display page
CN105704562B (en) Multi-version compatible method and device for network television cloud service platform
US11184678B2 (en) Display apparatus and method for recommending contents of the display apparatus
CN102740142B (en) For different terminals provides method and the IPTV service system of IPTV service
CN104182481A (en) Resource recommendation method and device
CN103823841A (en) Method and device for increasing browsing speed for mobile terminal client
CN103607626A (en) Method and device for real-time information displaying in intelligent television
JP4621118B2 (en) Content related information acquisition device
US20140201618A1 (en) Client-side personalization of websites and corresponding network environment
KR101958662B1 (en) Method and Apparatus for sharing java script object in webpage
CN109800372B (en) Method and device for improving third-party webpage opening speed and electronic equipment
CN112287261A (en) Resource loading method and electronic equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20140903

RJ01 Rejection of invention patent application after publication