CN102999578A - Method and device for processing page element - Google Patents

Method and device for processing page element Download PDF

Info

Publication number
CN102999578A
CN102999578A CN2012104544689A CN201210454468A CN102999578A CN 102999578 A CN102999578 A CN 102999578A CN 2012104544689 A CN2012104544689 A CN 2012104544689A CN 201210454468 A CN201210454468 A CN 201210454468A CN 102999578 A CN102999578 A CN 102999578A
Authority
CN
China
Prior art keywords
dom object
dom
handler
page
object handler
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
CN2012104544689A
Other languages
Chinese (zh)
Other versions
CN102999578B (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.)
Beijing Qihoo Technology Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing 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 Qihoo Technology Co Ltd, Qizhi Software Beijing Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201210454468.9A priority Critical patent/CN102999578B/en
Publication of CN102999578A publication Critical patent/CN102999578A/en
Application granted granted Critical
Publication of CN102999578B publication Critical patent/CN102999578B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a method and a device for processing a page element. The method comprises the steps of loading an obtaining page at the browser side; analyzing the page elements of the obtaining page, and converting each page element into a DOM (document object model) object; transferring at least one arranged DOM object processor; carrying out set custom treatment on at least one DOM object in the converted DOM objects; generating a final DOM tree by the arranged DOM objects for custom treatment, and rendering the DOM tree. By adopting the method and device, personalized customization on a webpage can be carried out according to the user requirements.

Description

Page elements disposal route and device
Technical field
The present invention relates to the network application field, especially relate to a kind of page elements disposal route and device.
Background technology
Along with the fast development of Internet, also present fulminant growth based on application and the information of Internet.Web browser provides a kind of accesses network information for the Internet user and has used the mode of network application, and this mode applicability is strong, and more many users have got used to obtaining various information and using various application by web browser.The network information and application vendor provide with such as the HTML(HTML (Hypertext Markup Language), Hypertext MarkupLanguage) and so on the webpage of the language compilation of form, web browser presents these webpages at the user place, thereby so that the user of web browser can obtain relevant information.Along with the fast development of network technology, the content that is presented by web browser is also more and more abundanter, thus web browser present function also from strength to strength with important.Common web browser has Internet Explorer, the Mozilla Firefox of Microsoft, Chrome, the Opera of Google and Safari of Apple etc. at present.
In correlation technique, web browser utilizes render engine (Rendering Engine) to explain the content (such as HTML, JavaScript) in the webpage and plays up (demonstration) webpage.Render engine has determined the browser how content of display web page and the format information of the page.Different render engines also has difference to the explanation of program grammer, and therefore same webpage playing up in the browser of different render engines (demonstration) effect also may be different.
At present the render engine of web browser is played up by converting each element among the HTML and js code to the DOM model.When changing, whole html document is fabricated dom tree, and each element among the HTML is converted into the object in the dom tree, and the relation that the relation between the object is constructed between node and the child node is constructed, by using the method for relevant object, can carry out addressing and operation to these objects.The DOM model has had a lot of public standard and definition.
When web browser was processed html page, the render engine in the browser was analyzed the html page language, and it is treated to the DOM model, utilizes subsequently the DOM model to be configured to the inner structure of display page in browser.DOM API also provides the interface of monitoring or modification webpage to the js code.
Render engine has been introduced based on the mechanism of event and has been processed the DOM object.Each DOM object has a plurality of events that are associated, and these events can be triggered.For example, the JS code in the render engine analyzing web page, and corresponding JS code and event be associated, thus make when obtaining particular event and being triggered, carry out corresponding JS code.
Yet in present web browser, render engine is mostly just controlled corresponding DOM object according to the JS code in the html web page, therefore, is difficult to the DOM object when user uses browser, and namely each element in the webpage customizes and plays up.
In summary, present web browser usually presents web page contents according to the desired mode of network application and Information Provider, and does not take into full account the user to the preference of page presentation mode when presenting webpage.Therefore although existing web browser has different render engines, to present effect basic identical when it, and this is so that the abundant content that presents of personalized customization web browser of user reduces user's impression experience.
Summary of the invention
In view of the above problems, the present invention has been proposed in order to provide a kind of page elements treating apparatus that overcomes the problems referred to above or address the above problem at least in part and corresponding page elements disposal route.
According to one aspect of the present invention, a kind of page elements treating apparatus is provided, comprising: at least one DOM object handler, be arranged on the browser side, each DOM object handler is configured to store the customized treatment of specific DOM object; Page resolver is configured to obtain the page in the loading of browser side, and the page elements that obtains the page is resolved, and each page elements is converted to the DOM object; The DOM processor is couple to page resolver and at least one DOM object handler, is configured to call at least one DOM object handler of setting, at least one customized treatment that arranges in the DOM object of conversion; The tree maker is couple to the DOM processor, is configured to utilize the final dom tree of DOM object generation through the customized treatment that arranges, and dom tree is played up.
Alternatively, the DOM processor is configured to also whether inquiry exists the DOM object handler that current DOM object is processed in the object handles registration table, wherein, is registered with the register information of at least one DOM object handler of setting in the object handles registration table; If find the DOM object handler that this DOM object is processed according to register information, and call.
Alternatively, the DOM processor also is configured to call this DOM object handler when having the DOM object handler that current DOM object is processed in the browser, the customized treatment that this DOM object is arranged; When not existing for the DOM object handler that current DOM object processes in the browser, this DOM object is carried out default process.
Alternatively, each DOM object handler stores specific DOM object has been loaded the processing mode that the event ContentReady that triggers when finishing processes.
Alternatively, each DOM object handler also stores the HTML that obtains the page is all loaded the processing mode that the event DocumentReady that triggers when finishing processes.
Alternatively, the DOM processor is arranged in the render engine of browser.
Alternatively, the DOM processor is configured to utilize at least one DOM object handler of interface interchange that browser provides plays up web page element.
Alternatively, the DOM object comprises: the text box element; Password Input frame element.
According to another aspect of the present invention, a kind of page elements disposal route also is provided, in the browser side at least one DOM object handler is set, wherein each DOM object handler stores the customized treatment of specific DOM object, the method comprises: load in the browser side and obtain the page, and the page elements that obtains the page resolved, each page elements is converted to the DOM object; Call at least one DOM object handler of setting, at least one customized treatment that arranges in the DOM object of conversion; After at least one customized treatment that arranges in the DOM object of conversion, also comprise: utilize the final dom tree of DOM object generation through the customized treatment that arranges; Dom tree is played up.
Alternatively, call at least one DOM object handler of setting, comprise: whether inquiry exists the DOM object handler that current DOM object is processed in the object handles registration table, wherein, is registered with the register information of at least one DOM object handler of setting in the object handles registration table; If find the DOM object handler that this DOM object is processed according to register information, and call.
Alternatively, call at least one DOM object handler of setting, to at least one customized treatment that arranges in the DOM object of conversion, comprise: when having the DOM object handler that current DOM object is processed in the browser, call this DOM object handler, the customized treatment that this DOM object is arranged; When not existing for the DOM object handler that current DOM object processes in the browser, this DOM object is carried out default process.
Alternatively, each DOM object handler stores specific DOM object has been loaded the processing mode that the event ContentReady that triggers when finishing processes.
Alternatively, each DOM object handler also stores the HTML that obtains the page is all loaded the processing mode that the event DocumentReady that triggers when finishing processes.
Alternatively, call at least one DOM object handler of setting, comprising: at least one the DOM object handler of interface interchange that provides according to browser, web page element is played up.
Alternatively, when browser is the IE browser, the client at browser place arranges first interface IElementBehaviorFactory, the second interface IElementBehavior and the 3rd interface IDocHostUIHandler at the WebBrowser plug-in unit, wherein, first interface and the second interface are used for calling each DOM object handler, and the 3rd interface is used for each DOM object handler is registered to the object handles registration table; Call at least one DOM object handler of setting, comprising: the behavior title BehaviorName that core engine provides according to the client at browser place, at least one the DOM object handler that is connected with first interface by the second interface interchange; And the page elements sign TAG that provides according to client of core engine calls element behavior Notification Method, the stress state of notice customer terminal webpage element when loading corresponding page elements.
Alternatively, core engine is called at least one DOM object handler, comprising: core engine is with to obtain the 4th interface IElementBehaviorSite that the page provides related, by the 4th interface determine current DOM to as if surely existing customized treatment.
Alternatively, the DOM object comprises: the text box element; Password Input frame element.
In embodiments of the present invention, for each DOM object, in the browser side DOM object handler of it being carried out customized treatment is set, in the acquisition process of the page, the customized treatment that the DOM object handler of utilizing the DOM processor to call selection arranges the DOM object.This shows, the page elements treating apparatus that adopts the embodiment of the invention to provide, can process for each DOM object respectively, the mode of its processing is to carry out Selection and call by the DOM processor, the web page contents that presents thus can be realized the personalized customization processing, and be not to be according to the desired fixed form of network application and Information Provider, and then realized the purpose that the user can carry out personalized customization to content that web browser presents, satisfy different users' preference, improve user's impression and experience.
Above-mentioned explanation only is the general introduction of technical solution of the present invention, for can clearer understanding technological means of the present invention, and can be implemented according to the content of instructions, and for above and other objects of the present invention, feature and advantage can be become apparent, below especially exemplified by the specific embodiment of the present invention.
Description of drawings
By reading hereinafter detailed description of the preferred embodiment, various other advantage and benefits will become cheer and bright for those of ordinary skills.Accompanying drawing only is used for the purpose of preferred implementation is shown, and does not think limitation of the present invention.And in whole accompanying drawing, represent identical parts with identical reference symbol.In the accompanying drawings:
Fig. 1 shows the according to an embodiment of the invention structural representation of page elements treating apparatus;
Fig. 2 shows the according to an embodiment of the invention process flow diagram of page elements disposal route; And
Fig. 3 shows the according to an embodiment of the invention querying flow figure of DOM object handler.
Embodiment
Exemplary embodiment of the present disclosure is described below with reference to accompanying drawings in more detail.Although shown exemplary embodiment of the present disclosure in the accompanying drawing, yet should be appreciated that and to realize the disclosure and the embodiment that should do not set forth limits here with various forms.On the contrary, it is in order to understand the disclosure more thoroughly that these embodiment are provided, and can with the scope of the present disclosure complete convey to those skilled in the art.
Mention in the correlation technique, present web browser usually presents web page contents according to the desired mode of network application and Information Provider, and does not take into full account the user to the preference of page presentation mode when presenting webpage.Therefore although existing web browser has different render engines, to present effect basic identical when it, and this is so that the abundant content that presents of personalized customization web browser of user reduces user's impression experience.
For solving the problems of the technologies described above, the embodiment of the invention provides a kind of and has carried out the device that page elements is processed in the browser side, be used for realizing that improved web page element processing mode, this device can allow the user to come the presentation mode of personalized customization web page element, thereby strengthen the display effect of the page.
Fig. 1 shows the structural representation of the page elements treating apparatus of one embodiment of the invention.Referring to Fig. 1, this device comprises at least one DOM object handler 110, page resolver 120 and the DOM processor 130 that is arranged on the browser side.
Wherein, DOM object handler 110 comprises at least one, and sets in advance in the browser side, stores the customized treatment of specific DOM object in each DOM object handler 110.The quantity of DOM object handler can be 1, also can be 2, also can be 3,4,5 or more, and concrete quantity determines according to the quantity of specific DOM object and the quantity of customized treatment.Among Fig. 1 in order to illustrate that it is set to 3.
When a page that obtains was processed, page resolver 120 loaded this in the browser side and obtains the page, and the page elements that obtains the page is resolved.Consider that the page and page elements can not directly process, therefore, page resolver 120 is converted to the DOM object with each page elements in resolving, processes for follow-up DOM processor 130.
Referring to Fig. 1, DOM processor 130 is couple to page resolver 120 and at least one DOM object handler 110.After page resolver 120 is resolved end, start DOM processor 130.DOM processor 130 selects at least one as DOM object that current preparation is processed in the DOM object of conversion, calls at least one DOM object handler 110 of setting, the customized treatment that the DOM object of selecting is arranged.
In embodiments of the present invention, for each DOM object, in the browser side DOM object handler of it being carried out customized treatment is set, in the acquisition process of the page, the customized treatment that the DOM object handler of utilizing the DOM processor to call selection arranges the DOM object.This shows, the device that the browsing device net page element that adopts the embodiment of the invention to provide is processed, can process for each DOM object respectively, the mode of its processing is to carry out Selection and call by the DOM processor, the web page contents that presents thus can be realized the personalized customization processing, and be not to be according to the desired fixed form of network application and Information Provider, and then realized the purpose that the user can carry out personalized customization to content that web browser presents, satisfy different users' preference, improve user's impression and experience.
Referring to Fig. 1, the device that browser carries out the web page element processing also comprises tree maker 140, is couple to DOM processor 130.After DOM processor 130 called DOM object handler 110, and the DOM object is carried out the customized treatment end, tree maker 140 utilized the final dom tree of DOM object generation through the customized treatment that arranges, and dom tree is played up.
Wherein, call operation for DOM object handler 110, DOM processor 130 need to be known the address of each DOM object handler 110, and then call accordingly, if in the situation that the DOM object handler is more and memory address is disperseed relatively, will there be certain difficulty in calling of DOM processor 130.A kind of preferred method of calling now is provided, in this example, the object handles registration table is set, the register information of all DOM object handler of registration in this form, register information herein can comprise memory address, each DOM object handler of each DOM object handler customization operations, whether be called etc.DOM processor 130 can inquire about whether there is the DOM object handler that current DOM object is processed in the object handles registration table.Optionally, if Query Result is yes, DOM processor 130 will find the DOM object handler 110 that this DOM object is processed according to register information, and calls.Optionally, if Query Result is no, then prove the current DOM object handler 110 that this DOM object is processed that do not exist.
In the process of calling, if when DOM processor 130 is determined to have the DOM object handler that current DOM object is processed in the browsers, call this DOM object handler, the customized treatment that this DOM object is arranged.And DOM processor 130 carries out default process to this DOM object when determining not exist in the browsers DOM object handler that current DOM object processes.
For each DOM object, all have at least two events, one is that this DOM object has loaded the event ContentReady that triggers when finishing, another is that whole HTML has loaded the event DocumentReady that triggers when finishing.For web page element is customized, being contemplated that of the embodiment of the invention: when the ContentReady event of the DOM object corresponding with web page element is triggered, just be invoked at web browser place customized treatment prepared in advance, thereby realize the customized treatment to the particular webpage element.Corresponding with this design, store in each DOM object handler 110 specific DOM object has been loaded the processing mode that the event ContentReady that triggers when finishing processes.Further, because the DOM object also exists full page to load the event that triggers when finishing, therefore, each DOM object handler 110 can also store the HTML that obtains the page is all loaded the processing mode that the event DocumentReady that triggers when finishing processes.
Because what finally present is a complete webpage, and in the prior art presenting of webpage present after playing up end by render engine, therefore, present for ease of the page, the DOM processor that the embodiment of the invention provides is arranged in the render engine of browser.
In the prior art, render engine is mostly just controlled corresponding DOM object according to the JS code in the html web page, render engine provide and the JS code between interface.And the JS code is controlled by network application self or service provider usually, and therefore, the Webpage that render engine renders is similar.And in this example, at least one DOM object handler 110 of interface interchange that web page element is played up that DOM processor 130 can utilize that browser provides can realize user's personalized customization from this interface.
Preferably, the DOM object of mentioning in the various embodiments described above comprises text box element, Password Input frame element.Certainly, the DOM object not only comprises above-mentioned two kinds of elements, and other web page element all can be realized.
The each several part framework that above-mentioned browser carries out the device of page elements processing provides according to its function, and actual framework is not limited in each part mentioned above, can also comprise other parts, module, device etc.
Fig. 2 shows the process flow diagram according to a kind of page elements disposal route of the embodiment of the invention, in the browser side at least one DOM object handler is set, and wherein each DOM object handler stores the customized treatment of specific DOM object.The treatment scheme of the method comprises that step S202 is to step S204.
Step S202, load in the browser side and to obtain the page, and the page elements that obtains the page is resolved, each page elements is converted to the DOM object.
Step S204, call at least one DOM object handler of setting, at least one customized treatment that arranges in the DOM object of step S202 conversion.
In embodiments of the present invention, for each DOM object, in the browser side DOM object handler of it being carried out customized treatment is set, in the acquisition process of the page, calls the customized treatment that the DOM object handler of selection arranges the DOM object.This shows, the device that the browsing device net page element that adopts the embodiment of the invention to provide is processed, can process for each DOM object respectively, the mode of its processing is to carry out Selection and call according to the DOM object, the web page contents that presents thus can be realized the personalized customization processing, and be not to be according to the desired fixed form of network application and Information Provider, and then realized the purpose that the user can carry out personalized customization to content that web browser presents, satisfy different users' preference, improve user's impression and experience.
Referring to flow process shown in Figure 2, step S204 utilizes the final dom tree of DOM object generation through the customized treatment that arranges, and to dom tree is played up, the webpage after playing up is presented to the user after implementing.
Mention at least one DOM object handler of calling setting among the step S204, the address that to know allocating object (each DOM object handler) by calling, and then call accordingly, in the situation that if the DOM object handler is more and memory address is relatively disperseed, call and to have certain difficulty.A kind of preferred method of calling now is provided, in this example, the object handles registration table is set, the register information of all DOM object handler of registration in this form, register information herein can comprise memory address, each DOM object handler of each DOM object handler customization operations, whether be called etc.Its concrete call method sees also Fig. 3.
Fig. 3 shows the according to an embodiment of the invention process flow diagram of the call method of DOM object handler.Referring to Fig. 3, this step comprises that step S302 is to step S306.
Step S302, whether inquiry exists the DOM object handler that current DOM object is processed in the object handles registration table.
Step S304, when the Query Result of step S302 when being, find the DOM object handler that this DOM object is processed according to register information, and call.
Step S306, when the Query Result of step S302 when being no, determine not exist the DOM object handler of processing as current DOM object.
In the process of calling, when having the DOM object handler that current DOM object is processed in the browser, call this DOM object handler, the customized treatment that this DOM object is arranged.And when not existing for the DOM object handler that current DOM object processes in the browser, then directly this DOM object is carried out default process.
For each DOM object, all have at least two events, one is that this DOM object has loaded the event ContentReady that triggers when finishing, another is that whole HTML has loaded the event DocumentReady that triggers when finishing.For web page element is customized, being contemplated that of the embodiment of the invention: when the ContentReady event of the DOM object corresponding with web page element is triggered, just be invoked at web browser place customized treatment prepared in advance, thereby realize the customized treatment to the particular webpage element.Corresponding with this design, store in each DOM object handler specific DOM object has been loaded the processing mode that the event ContentReady that triggers when finishing processes.Further, because the DOM object also exists full page to load the event that triggers when finishing, therefore, each DOM object handler can also store the HTML that obtains the page is all loaded the processing mode that the event DocumentReady that triggers when finishing processes.
In the prior art, render engine is mostly just controlled corresponding DOM object according to the JS code in the html web page, render engine provide and the JS code between interface.And the JS code is controlled by network application self or service provider usually, and therefore, the Webpage that render engine renders is similar.And in this example, browser provides the interface that can play up web page element, utilizes at least one DOM object handler of this interface interchange, realizes user's personalized customization.
Embodiment one
The browser that is mentioned in the embodiment of the invention can be for multiple, and for example the Internet Explorer(of Microsoft is called for short IE), Mozilla Firefox, Chrome, the Opera of Google and Safari of Apple etc.
The concrete disposal route of the web page element that now as an example of the IE browser example the embodiment of the invention is provided is at length set forth and is illustrated.
When browser is the IE browser, the client at browser place arranges first interface IElementBehaviorFactory, the second interface IElementBehavior and the 3rd interface IDocHostUIHandler at the WebBrowser plug-in unit, wherein, first interface and the second interface are used for calling each DOM object handler, and the 3rd interface is used for each DOM object handler is registered to the object handles registration table.
For the particular procedure for each web page element, may need to realize
The behavior of IElementBehavior(element)
Implementing the IElementBehavior Interface(carries out the element behavior interface)
Implementing the Notify Method(carries out Notification Method)
Implementing the Init Method(carries out initial method)
Implementing the Detach Method(carries out separation method)
The behavior of IElementBehaviorFactory(element behavior factory)
IElementNamespaceFactory(element NameSpace factor interface)
IElementNamespaceFactoryCallback(element NameSpace callback interface)
After initialization arranges, the client WebBrowser(web browser in the IE browser) plug-in unit realizes that the concrete treatment step of web page element is as follows:
Step 1, client WebBrowser plug-in unit are realized IElementBehaviorFactory interface and IElementBehavior interface.
Step 2, client WebBrowser plug-in unit are realized the IDocHostUIHandler interface.
Annotate: the WebBrowser plug-in unit here is exactly in the embodiment of par-ticular processor in IE for specific DOM object, realize that the IDocHostUIHandler interface is used for par-ticular processor is registered to object registry by the DOM processor adopting, realize that IElementBehaviorFactory and IElementBehavior interface are used for illustrating that concrete customized treatment realizes.
When step 3, page creation, MSHTML can call the GetHostInfo method of IDocHostUIHandler, and client-side program provides page elements TAG and corresponding Behavior Name to MSHTML
Annotate: MSHTML is corresponding to core engine, and this step is inquired about all DOM object handler tabulations corresponding to the DOM processor.
When step 4, page loading, the Behavior Name that provide more than the basis is provided MSHTML, calls one by one the FindBehavior method of IElementBehaviorFactory, provides the IElementBehavior Interface realization by client.
Herein, preferred,, and the corresponding interface IElementBehaviorSite that provides with the page is related, to determine whether the customization behavior.
If step 5 client provides the IElementBehavior realization, MSHTML calls element behavior Notification Method when loading the page elements of corresponding TAG, the stress state of notice customer terminal webpage element.
Annotate: element behavior Notification Method is realized utilizing IElementBehavior::Notify in IE.
Wherein, it should be noted that step 4 and step 5 are looked into corresponding to the DOM processor calls corresponding DOM object handler the DOM object is processed.
The method of present embodiment is not only for the IE browser, and for other browsers, its implementation is similar.
Preferably, the DOM object of mentioning in the various embodiments described above comprises text box element, Password Input frame element.Certainly, the DOM object not only comprises above-mentioned two kinds of elements, and other web page element all can be realized.Now describe as an example of the text box element example.
Embodiment two
For the Textarea(text box) units of pages, the input frame of a large amount of literal of input in webpage is provided for the user, but under current webpage presentation mode, the user only can textarea in the simple literal of input, and can't input the contents such as the literal of subscribing form, image.And by providing at the browser place customization of textarea is played up, can be so that the content that input is enriched more in textarea.
Concrete operations for the text box element in this example provide corresponding explanation.
1, at first, carry out event definition, in the GetHostInfo of IDocHostUIHandler method, carry out self-defined to structure and the sign of browser.At the text box element div layer is set, utilizes the scheduling of pCSSBuffer pointer, the operation that will be referred to the text box element all is pulled on the div layer to be carried out.
2, in the FindBehavior method of IElementBehaviorFactory, return the realization object CTextAreaElementBehavior of IElementBehavior, and preserve the IElementBehaviorSite pointer to object that MSHTML provides.
When 3, MSHTML calls text box element behavior notice (CTextAreaElementBehavior::Notify) method, the operation that relates to the text box element is implemented.
When loading the text box element of corresponding TAG, call element behavior Notification Method, the stress state of notice client text box element.At the div layer content in the text box element is processed, this processing relate to the width of adjusting the text box element content, highly, result of broadcast etc.
After the processing of div layer finishes, the treatment effect of the content of text box element and div layer is overlapping, the effect after overlapping is presented to the user.
Use the embodiment of the invention can realize utilizing browser to carry out the method that page elements (text box element) is processed, realize user's personalized customization, improve user's impression and experience.
Adopt apparatus and method provided by the invention, can reach following beneficial effect:
In embodiments of the present invention, for each DOM object, in the browser side DOM object handler of it being carried out customized treatment is set, in the acquisition process of the page, the customized treatment that the DOM object handler of utilizing the DOM processor to call selection arranges the DOM object.This shows, the device that the browsing device net page element that adopts the embodiment of the invention to provide is processed, can process for each DOM object respectively, the mode of its processing is to carry out Selection and call by the DOM processor, the web page contents that presents thus can be realized the personalized customization processing, and be not to be according to the desired fixed form of network application and Information Provider, and then realized the purpose that the user can carry out personalized customization to content that web browser presents, satisfy different users' preference, improve user's impression and experience.
Intrinsic not relevant with any certain computer, virtual system or miscellaneous equipment with demonstration at this algorithm that provides.Various general-purpose systems also can be with using based on the teaching at this.According to top description, it is apparent constructing the desired structure of this type systematic.In addition, the present invention is not also for any certain programmed language.Should be understood that and to utilize various programming languages to realize content of the present invention described here, and the top description that language-specific is done is in order to disclose preferred forms of the present invention.
In the instructions that provides herein, a large amount of details have been described.Yet, can understand, embodiments of the invention can be put into practice in the situation of these details not having.In some instances, be not shown specifically known method, structure and technology, so that not fuzzy understanding of this description.
Similarly, be to be understood that, in order to simplify the disclosure and to help to understand one or more in each inventive aspect, in the description to exemplary embodiment of the present invention, each feature of the present invention is grouped together in single embodiment, figure or the description to it sometimes in the above.Yet the method for the disclosure should be construed to the following intention of reflection: namely the present invention for required protection requires the more feature of feature clearly put down in writing than institute in each claim.Or rather, as following claims reflected, inventive aspect was to be less than all features of the disclosed single embodiment in front.Therefore, follow claims of embodiment and incorporate clearly thus this embodiment into, wherein each claim itself is as independent embodiment of the present invention.
Those skilled in the art are appreciated that and can adaptively change and they are arranged in one or more equipment different from this embodiment the module in the equipment among the embodiment.Can be combined into a module or unit or assembly to the module among the embodiment or unit or assembly, and can be divided into a plurality of submodules or subelement or sub-component to them in addition.In such feature and/or process or unit at least some are mutually repelling, and can adopt any combination to disclosed all features in this instructions (comprising claim, summary and the accompanying drawing followed) and so all processes or the unit of disclosed any method or equipment make up.Unless in addition clearly statement, disclosed each feature can be by providing identical, being equal to or the alternative features of similar purpose replaces in this instructions (comprising claim, summary and the accompanying drawing followed).
In addition, those skilled in the art can understand, although embodiment more described herein comprise some feature rather than further feature included among other embodiment, the combination of the feature of different embodiment means and is within the scope of the present invention and forms different embodiment.For example, in the following claims, the one of any of embodiment required for protection can be used with array mode arbitrarily.
All parts embodiment of the present invention can realize with hardware, perhaps realizes with the software module of moving at one or more processor, and perhaps the combination with them realizes.It will be understood by those of skill in the art that and to use in practice microprocessor or digital signal processor (DSP) to realize according to some or all some or repertoire of parts in the page elements treating apparatus of the embodiment of the invention.The present invention can also be embodied as be used to part or all equipment or the device program (for example, computer program and computer program) of carrying out method as described herein.Such realization program of the present invention can be stored on the computer-readable medium, perhaps can have the form of one or more signal.Such signal can be downloaded from internet website and obtain, and perhaps provides at carrier signal, perhaps provides with any other form.
It should be noted above-described embodiment the present invention will be described rather than limit the invention, and those skilled in the art can design alternative embodiment in the situation of the scope that does not break away from claims.In the claims, any reference symbol between bracket should be configured to limitations on claims.Word " comprises " not to be got rid of existence and is not listed in element or step in the claim.Being positioned at word " " before the element or " one " does not get rid of and has a plurality of such elements.The present invention can realize by means of the hardware that includes some different elements and by means of the computing machine of suitably programming.In having enumerated the unit claim of some devices, several in these devices can be to come imbody by same hardware branch.The use of word first, second and C grade does not represent any order.Can be title with these word explanations.

Claims (17)

1. page elements treating apparatus comprises:
At least one DOM object handler is arranged on the browser side, and each DOM object handler is configured to store the customized treatment of specific DOM object;
Page resolver is configured to obtain the page in described browser side loading, and the described page elements that obtains the page is resolved, and each page elements is converted to the DOM object;
The DOM processor is couple to described page resolver and described at least one DOM object handler, is configured to call at least one DOM object handler of described setting, at least one customized treatment that arranges in the DOM object of described conversion;
The tree maker is couple to described DOM processor, is configured to utilize the final dom tree of DOM object generation through the customized treatment of described setting, and described dom tree is played up.
2. device according to claim 1, it is characterized in that, described DOM processor is configured to also whether inquiry exists the DOM object handler that current DOM object is processed in the object handles registration table, wherein, be registered with the register information of at least one DOM object handler of described setting in the described object handles registration table;
If find the DOM object handler that this DOM object is processed according to register information, and call.
3. device according to claim 1, it is characterized in that, described DOM processor also is configured to call this DOM object handler when having the DOM object handler that current DOM object is processed in the described browser, the customized treatment that this DOM object is arranged;
When not existing for the DOM object handler that current DOM object processes in the described browser, this DOM object is carried out default process.
4. according to claim 1 to 3 each described devices, it is characterized in that each DOM object handler stores described specific DOM object has been loaded the processing mode that the event ContentReady that triggers when finishing processes.
5. device according to claim 4 is characterized in that, each DOM object handler also stores the described HTML that obtains the page is all loaded the processing mode that the event DocumentReady that triggers when finishing processes.
6. according to claim 1 to 5 each described devices, it is characterized in that described DOM processor is arranged in the render engine of described browser.
7. according to claim 1 to 6 each described devices, it is characterized in that described DOM processor is configured to utilize described at least one object handler of interface interchange that described browser provides plays up described web page element.
8. device according to claim 7 is characterized in that, described DOM object comprises: the text box element; Password Input frame element.
9. a page elements disposal route arranges at least one DOM object handler in the browser side, and wherein each DOM object handler stores the customized treatment of specific DOM object, and the method comprises:
Obtain the page in the loading of browser side, and the described page elements that obtains the page is resolved, each page elements is converted to the DOM object;
Call at least one DOM object handler of described setting, at least one customized treatment that arranges in the DOM object of described conversion;
Utilize the final dom tree of DOM object generation through the customized treatment of described setting;
Described dom tree is played up.
10. method according to claim 9 is characterized in that, calls at least one DOM object handler of described setting, comprising:
Whether inquiry exists the DOM object handler that current DOM object is processed in the object handles registration table, wherein, is registered with the register information of at least one DOM object handler of described setting in the described object handles registration table;
If find the DOM object handler that this DOM object is processed according to register information, and call.
11. method according to claim 9 is characterized in that, calls at least one DOM object handler of described setting, at least one customized treatment that arranges in the DOM object of described conversion comprises:
When having the DOM object handler that current DOM object is processed in the described browser, call this DOM object handler, the customized treatment that this DOM object is arranged;
When not existing for the DOM object handler that current DOM object processes in the described browser, this DOM object is carried out default process.
12. to 11 each described methods, it is characterized in that according to claim 9 each DOM object handler stores described specific DOM object has been loaded the processing mode that the event ContentReady that triggers when finishing processes.
13. method according to claim 12 is characterized in that, each DOM object handler also stores the described HTML that obtains the page is all loaded the processing mode that the event DocumentReady that triggers when finishing processes.
14. to 13 each described methods, it is characterized in that according to claim 9, call at least one DOM object handler of described setting, comprising:
Described at least one the DOM object handler of interface interchange that provides according to described browser, described web page element is played up.
15. according to claim 10 to 14 each described methods, it is characterized in that, when described browser is the IE browser, the client at described browser place arranges first interface IElementBehaviorFactory, the second interface IElementBehavior and the 3rd interface IDocHostUIHandler at the WebBrowser plug-in unit, wherein, described first interface and described the second interface are used for calling each DOM object handler, and described the 3rd interface is used for each DOM object handler is registered to described object handles registration table;
Call at least one DOM object handler of described setting, comprising:
The behavior title BehaviorName that core engine provides according to the client at described browser place, described at least one the DOM object handler that is connected with described first interface by described the second interface interchange; And
When the page elements sign TAG that described core engine provides according to described client loads corresponding page elements, call element behavior Notification Method, notify the stress state of described customer terminal webpage element.
16. method according to claim 15 is characterized in that, described core engine is called described at least one DOM object handler, comprising:
Described core engine is with described to obtain the 4th interface IElementBehaviorSite that the page provides related, by described the 4th interface determine current DOM to as if surely existing customized treatment.
17. to 16 each described methods, it is characterized in that according to claim 9 described DOM object comprises: the text box element; Password Input frame element.
CN201210454468.9A 2012-11-13 2012-11-13 Page elements treatment process and device Expired - Fee Related CN102999578B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210454468.9A CN102999578B (en) 2012-11-13 2012-11-13 Page elements treatment process and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210454468.9A CN102999578B (en) 2012-11-13 2012-11-13 Page elements treatment process and device

Publications (2)

Publication Number Publication Date
CN102999578A true CN102999578A (en) 2013-03-27
CN102999578B CN102999578B (en) 2016-06-01

Family

ID=47928146

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210454468.9A Expired - Fee Related CN102999578B (en) 2012-11-13 2012-11-13 Page elements treatment process and device

Country Status (1)

Country Link
CN (1) CN102999578B (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102981845A (en) * 2012-11-13 2013-03-20 北京奇虎科技有限公司 Page elements processing method of browser and page elements processing device of browser
WO2014075509A1 (en) * 2012-11-13 2014-05-22 北京奇虎科技有限公司 Method and device for browser to process page element
CN103902571A (en) * 2012-12-27 2014-07-02 腾讯科技(深圳)有限公司 Method and system for saving webpage complete content and corresponding client end and server
CN104102736A (en) * 2014-07-28 2014-10-15 可牛网络技术(北京)有限公司 Personalized web page display method and personalized web page display device
WO2014187202A1 (en) * 2013-12-18 2014-11-27 中兴通讯股份有限公司 Method, device, terminal, and computer storage medium for implementing webpage layout
CN104866509A (en) * 2014-02-26 2015-08-26 阿里巴巴集团控股有限公司 Page element positioning method and device
CN105468344A (en) * 2014-08-26 2016-04-06 腾讯科技(深圳)有限公司 Floating layer setting method and device, and electronic equipment
CN105631011A (en) * 2015-12-28 2016-06-01 上海瀚之友信息技术服务有限公司 Webpage view interaction processing method and system
CN106921894A (en) * 2017-02-28 2017-07-04 烽火通信科技股份有限公司 The lookup method and system of a kind of set box browser page initial focus
WO2018058614A1 (en) * 2016-09-30 2018-04-05 深圳市华傲数据技术有限公司 Page rendering method and apparatus
CN108509189A (en) * 2018-04-13 2018-09-07 南京新贝金服科技有限公司 A kind of component of the H5 time gates based on DOM unifies implementation method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1310415A (en) * 2000-02-24 2001-08-29 国际商业机器公司 Custom HTML of service device terminal based on form and a target equipment
US20080243910A1 (en) * 2005-02-15 2008-10-02 Meadows Chad L Hierarchical inherited xml dom
CN102214244A (en) * 2011-07-07 2011-10-12 深圳市万兴软件有限公司 Analytic method and system for docx file information
CN102981845A (en) * 2012-11-13 2013-03-20 北京奇虎科技有限公司 Page elements processing method of browser and page elements processing device of browser

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1310415A (en) * 2000-02-24 2001-08-29 国际商业机器公司 Custom HTML of service device terminal based on form and a target equipment
US20080243910A1 (en) * 2005-02-15 2008-10-02 Meadows Chad L Hierarchical inherited xml dom
CN102214244A (en) * 2011-07-07 2011-10-12 深圳市万兴软件有限公司 Analytic method and system for docx file information
CN102981845A (en) * 2012-11-13 2013-03-20 北京奇虎科技有限公司 Page elements processing method of browser and page elements processing device of browser

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
潘超等: "基于DOM的网页信息抽取方法", 《硅谷》, no. 20, 23 February 2011 (2011-02-23), pages 172 - 190 *

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014075509A1 (en) * 2012-11-13 2014-05-22 北京奇虎科技有限公司 Method and device for browser to process page element
CN102981845A (en) * 2012-11-13 2013-03-20 北京奇虎科技有限公司 Page elements processing method of browser and page elements processing device of browser
CN102981845B (en) * 2012-11-13 2016-06-29 北京奇虎科技有限公司 Browser carries out method and the device of page elements process
CN103902571B (en) * 2012-12-27 2017-09-01 腾讯科技(深圳)有限公司 Preserve method, system and the corresponding client and server of webpage complete content
CN103902571A (en) * 2012-12-27 2014-07-02 腾讯科技(深圳)有限公司 Method and system for saving webpage complete content and corresponding client end and server
WO2014187202A1 (en) * 2013-12-18 2014-11-27 中兴通讯股份有限公司 Method, device, terminal, and computer storage medium for implementing webpage layout
CN104731787A (en) * 2013-12-18 2015-06-24 中兴通讯股份有限公司 Method, device and terminal capable of realizing page layout
CN104866509A (en) * 2014-02-26 2015-08-26 阿里巴巴集团控股有限公司 Page element positioning method and device
CN104102736A (en) * 2014-07-28 2014-10-15 可牛网络技术(北京)有限公司 Personalized web page display method and personalized web page display device
CN105468344A (en) * 2014-08-26 2016-04-06 腾讯科技(深圳)有限公司 Floating layer setting method and device, and electronic equipment
CN105468344B (en) * 2014-08-26 2019-08-06 腾讯科技(深圳)有限公司 A kind of float layer setting method, device and electronic equipment
CN105631011A (en) * 2015-12-28 2016-06-01 上海瀚之友信息技术服务有限公司 Webpage view interaction processing method and system
WO2018058614A1 (en) * 2016-09-30 2018-04-05 深圳市华傲数据技术有限公司 Page rendering method and apparatus
CN106921894B (en) * 2017-02-28 2019-05-14 烽火通信科技股份有限公司 A kind of lookup method and system of set box browser page initial focus
CN106921894A (en) * 2017-02-28 2017-07-04 烽火通信科技股份有限公司 The lookup method and system of a kind of set box browser page initial focus
CN108509189A (en) * 2018-04-13 2018-09-07 南京新贝金服科技有限公司 A kind of component of the H5 time gates based on DOM unifies implementation method

Also Published As

Publication number Publication date
CN102999578B (en) 2016-06-01

Similar Documents

Publication Publication Date Title
CN102999578A (en) Method and device for processing page element
CN102999579B (en) Page text frame process browser and page text frame element disposal route
CN102981848B (en) Webpage main body element process browser and method
CN102981844B (en) The browser that webpage main body element is processed and method
CN102981845A (en) Page elements processing method of browser and page elements processing device of browser
US8990289B2 (en) Server based framework for improving Ajax performance
CN103500194A (en) Method, device and browser for loading webpage
CN105094786B (en) Method and system based on JavaScript customized web page
EP2916243A1 (en) Method, apparatus, server and system for implementing web application
US8682964B1 (en) Progressively loading network content
US20140281883A1 (en) Mobile enablement of existing web sites
CN102982162B (en) The acquisition system of info web
CN102982161A (en) Method and device for acquiring webpage information
CN104021172A (en) Advertisement filtering method and advertisement filtering device
CN104077387A (en) Webpage content display method and browser device
CN101876897A (en) System and method used for processing Widget on Web browser
CN103019538A (en) Method and system for implementing application interface in terminal
CN102981846A (en) Method for treating password input box element and browser for treating the password input box element
US20160154771A1 (en) Method and device for browser to process page element
CN103559097A (en) Inter-process communication method and device in browser and browser
CN103019817A (en) Method and device for page interaction
CN102981847B (en) The browser that page text frame is processed and method
CN103034622A (en) Rich text content processing method and server
CN103019720A (en) Method and device for processing page in browser
CN103034723A (en) Page presenting method and 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
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20220720

Address after: Room 801, 8th floor, No. 104, floors 1-19, building 2, yard 6, Jiuxianqiao Road, Chaoyang District, Beijing 100015

Patentee after: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Address before: 100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park)

Patentee before: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Patentee before: Qizhi software (Beijing) Co.,Ltd.

CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20160601