CN102999578B - Page elements treatment process and device - Google Patents

Page elements treatment process and device Download PDF

Info

Publication number
CN102999578B
CN102999578B CN201210454468.9A CN201210454468A CN102999578B CN 102999578 B CN102999578 B CN 102999578B CN 201210454468 A CN201210454468 A CN 201210454468A CN 102999578 B CN102999578 B CN 102999578B
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.)
Active
Application number
CN201210454468.9A
Other languages
Chinese (zh)
Other versions
CN102999578A (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
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The present invention discloses a kind of page elements treatment unit and method, and the method comprises: loads in browser side and obtains the page, and resolved by the page elements of the described acquisition page, each page elements is converted to DOM object; Call at least one DOM object handler of described setting, at least one customized treatment arranged in the DOM object of described conversion; The DOM object through the customized treatment of described setting is utilized to generate final dom tree; Described dom tree is played up. Adopt the present invention according to customer need, webpage can be carried out personalized customization.

Description

Page elements treatment process and device
Technical field
The present invention relates to network application field, especially relate to a kind of page elements treatment process and device.
Background technology
Along with the fast development of Internet, application and information based on Internet also present explosive growth. Web browser is that Internet user provides a kind of accesses network information and uses the mode of network application, and which suitability is strong, and more many more many users have got used to obtaining various information by web browser and using various application. The network information and application supplier provide with such as HTML(HTML, and so on HypertextMarkupLanguage) webpage of the language compilation of form, web browser presents these webpages at user place, so that the user of web browser can obtain relevant information. Along with the fast development of network technology, the content presented by web browser is also more and more abundanter, therefore web browser to present function also more and more powerful and important. Web browser common at present has the InternetExplorer of Microsoft, MozillaFirefox, Chrome, Opera of company of Google and Safari of Apple etc.
In the related, web browser utilizes content (such as HTML, JavaScript) that render engine (RenderingEngine) explains in webpage and plays up (display) webpage. Render engine determines the browser how content of display web page and the form information of the page. The explanation of program grammer is also had difference by different render engines, and therefore (display) effect of playing up in the browser of different render engine of same webpage also may difference.
The render engine of current web browser is played up by converting each element in HTML and js code to DOM model. When changing, whole html document is fabricated dom tree, the object that each element in HTML is converted in dom tree, and the relation that the relation between object is constructed between node and child node constructs, with the use of the method about object, it is possible to these objects to be carried out addressing and operation. DOM model has had much public specification and definition.
When web browser processes html page, html page language is analyzed by the render engine in browser, is treated to DOM model, utilizes DOM model to be configured to the internal structure of display page in a browser subsequently. DOMAPI also provides monitoring or the interface of amendment webpage to js code.
Render engine introduces the mechanism based on event and processes DOM object. Each DOM object has the multiple events being associated, and these events can be triggered. Such as, the JS code in render engine analyzing web page, and corresponding JS code and event are associated, so that when being triggered to particular event, perform corresponding JS code.
But, in current web browser, render engine mostly just controls corresponding DOM object according to the JS code in html web page, therefore, is difficult to DOM object when user uses browser, and namely each element in webpage carries out customization and plays up.
In summary, present web browser is when presenting webpage, and mode required by network application and information provider presents web page contents usually, and fully considers that user is to the preference of page presentation mode. Although therefore existing web browser has different render engines, when it, to present effect substantially identical, this make user cannot content that fully personalized customization web browser presents, the impression reducing user is experienced.
Summary of the invention
In view of the above problems, it is proposed that the present invention overcomes the problems referred to above or the page elements treatment unit solved the problem at least in part and corresponding page elements treatment process to provide a kind of.
According to an aspect of the present invention, it provides a kind of page elements treatment unit, comprising: at least one DOM object handler, is arranged on browser side, and each DOM object handler is configured to store the customized treatment of specific DOM object; Page parsing device, is configured to load in browser side obtain the page, and is resolved by the page elements obtaining the page, each page elements is converted to DOM object; DOM processor, is couple to page parsing device and at least one DOM object handler, is configured to call at least one DOM object handler of setting, at least one customized treatment arranged in the DOM object of conversion; Tree maker, is couple to DOM processor, is configured to utilize the DOM object through the customized treatment arranged to generate final dom tree, and is played up by dom tree.
Can selection of land, DOM processor is also configured in object handles registration table to inquire about the DOM object handler whether existed current DOM object processes, and wherein, is registered with the register information of at least one DOM object handler of setting in object handles registration table; If finding the DOM object handler processed by this DOM object according to register information, and calling.
Can selection of land, DOM processor is also configured to call this DOM object handler, to the customized treatment that this DOM object is arranged when there is the DOM object handler processed by current DOM object in browser; When browser not existing for current DOM object and carries out the DOM object handler processed, this DOM object is carried out default process.
Can selection of land, each DOM object handler stores the processing mode that processes of event ContentReady triggered when having been loaded by specific DOM object.
Can selection of land, each DOM object handler also stores the processing mode that processes of event DocumentReady triggered when all having been loaded by the HTML obtaining the page.
Can selection of land, DOM processor is arranged in the render engine of browser.
Can selection of land, DOM processor is configured at least one the DOM object handler of the interface interchange played up by web page element utilizing browser to provide.
Can selection of land, DOM object comprises: text box element; Password Input frame element.
According to the another aspect of the present invention, additionally provide a kind of page elements treatment process, at least one DOM object handler is set in browser side, wherein each DOM object handler stores the customized treatment of specific DOM object, the method comprises: loads in browser side and obtains the page, and the page elements obtaining the page is resolved, each page elements is converted to DOM object; Call at least one DOM object handler of setting, at least one customized treatment arranged in the DOM object of conversion; After at least one customized treatment arranged in the DOM object of conversion, also comprise: utilize the DOM object through the customized treatment arranged to generate final dom tree; Dom tree is played up.
Can selection of land, call at least one DOM object handler of setting, comprise: in object handles registration table, inquire about the DOM object handler whether existed current DOM object processes, wherein, object handles registration table is registered with the register information of at least one DOM object handler of setting; If finding the DOM object handler processed by this DOM object according to register information, and calling.
Can selection of land, call at least one DOM object handler of setting, to at least one customized treatment arranged in the DOM object of conversion, comprise: when browser exists the DOM object handler processed by current DOM object, call this DOM object handler, to the customized treatment that this DOM object is arranged; When browser not existing for current DOM object and carries out the DOM object handler processed, this DOM object is carried out default process.
Can selection of land, each DOM object handler stores the processing mode that processes of event ContentReady triggered when having been loaded by specific DOM object.
Can selection of land, each DOM object handler also stores the processing mode that processes of event DocumentReady triggered when all having been loaded by the HTML obtaining the page.
Can selection of land, call at least one DOM object handler of setting, comprising: provide according to browser, at least one DOM object handler of interface interchange that web page element is played up.
Can selection of land, when browser is IE browser, the client terminal at browser place arranges the first interface IElementBehaviorFactory, the 2nd interface IElementBehavior and the 3rd interface IDocHostUIHandler at WebBrowser plug-in unit, wherein, first interface and the 2nd interface are used for calling each DOM object handler, and the 3rd interface is for being registered in object handles registration table by each DOM object handler; Call at least one DOM object handler of setting, comprising: the behavior title BehaviorName that core engine provides according to the client terminal at browser place, at least one the DOM object handler being connected with the first interface by the 2nd interface interchange; And the page elements mark TAG that provides according to client terminal of core engine is when loading corresponding page elements, call element behavior Notification Method, the loading state of notice customer terminal webpage element.
Can selection of land, core engine calls at least one DOM object handler, comprising: core engine with obtain the page provide the 4th interface IElementBehaviorSite associate, by the 4th interface determine current DOM to as if surely have customized treatment.
Can selection of land, DOM object comprises: text box element; Password Input frame element.
In embodiments of the present invention, for each DOM object, the DOM object handler that it carries out customized treatment is set in browser side, in the acquisition process of the page, utilizes the customized treatment that DOM processor calls the DOM object handler of selection and arranged by DOM object. As can be seen here, adopt the page elements treatment unit that the embodiment of the present invention provides, can process for each DOM object respectively, the mode of its process carries out Selection and call by DOM processor, the web page contents thus presented can realize personalized customization process, and it is not the fixing mode required by network application and information provider, and then achieve the object that the content that web browser can present by user carries out personalized customization, meet the preference of different users, it is to increase the impression of user is experienced.
Above-mentioned explanation is only the general introduction of technical solution of the present invention, in order to the technique means of the present invention can be better understood, and can be implemented according to the content of specification sheets, and in order to 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.
Accompanying drawing explanation
By reading hereafter detailed description of the preferred embodiment, various other advantage and benefit will become clear for those of ordinary skill in the art and understand. Accompanying drawing is only for illustrating the object of preferred implementation, 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 structural representation of page elements treatment unit according to an embodiment of the invention;
Fig. 2 shows the schema of page elements treatment process according to an embodiment of the invention; And
Fig. 3 shows the querying flow figure of DOM object handler according to an embodiment of the invention.
Embodiment
Exemplary embodiment of the present disclosure is described below with reference to accompanying drawings more in detail. Although show exemplary embodiment of the present disclosure in accompanying drawing, it should be understood, however, that the embodiment that can realize the disclosure in a variety of manners and should do not set forth here limits. On the contrary, it is provided that these embodiments are to can more thoroughly understand the disclosure, and can pass on complete for the scope of the present disclosure to the technician of this area.
Mentioning in correlation technique, present web browser is when presenting webpage, and mode required by network application and information provider presents web page contents usually, and fully considers that user is to the preference of page presentation mode. Although therefore existing web browser has different render engines, when it, to present effect substantially identical, this make user cannot content that fully personalized customization web browser presents, the impression reducing user is experienced.
For solving the problems of the technologies described above, embodiments provide a kind of device carrying out page elements process in browser side, for realizing the web page element processing mode improved, this device can allow user to carry out the presentation mode of personalized customization web page element, thus strengthens the display effect of the page.
Fig. 1 shows the structural representation of the page elements treatment unit of one embodiment of the invention. See Fig. 1, this device comprises at least one the DOM object handler 110, page parsing device 120 and the DOM processor 130 that are arranged on browser side.
Wherein, DOM object handler 110 comprises at least one, and is set in advance in 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, it is also possible to is 2, it is also possible to is 3,4,5 or more, and concrete quantity determines according to the quantity of the quantity of specific DOM object and customized treatment. In order to illustrate in Fig. 1, be set to 3.
When being processed by the page obtained, page parsing device 120 loads this acquisition page in browser side, and is resolved by the page elements obtaining the page. Considering that the page and page elements can not directly process, therefore, each page elements is converted to DOM object by page parsing device 120 in resolving, processes for follow-up DOM processor 130.
See Fig. 1, DOM processor 130, is couple to page parsing device 120 and at least one DOM object handler 110. After page parsing device 120 parsing terminates, start DOM processor 130. DOM processor 130 selects at least one as the DOM object of current preparation process in the DOM object of conversion, calls at least one DOM object handler 110 of setting, to the customized treatment that the DOM object selected is arranged.
In embodiments of the present invention, for each DOM object, the DOM object handler that it carries out customized treatment is set in browser side, in the acquisition process of the page, utilizes the customized treatment that DOM processor calls the DOM object handler of selection and arranged by DOM object. As can be seen here, the device that the browsing device net page element adopting the embodiment of the present invention to provide processes, can process for each DOM object respectively, the mode of its process carries out Selection and call by DOM processor, the web page contents thus presented can realize personalized customization process, and it is not the fixing mode required by network application and information provider, and then achieve the object that the content that web browser can present by user carries out personalized customization, meet the preference of different users, it is to increase the impression of user is experienced.
See Fig. 1, the device that browser carries out web page element process also comprises tree maker 140, is couple to DOM processor 130. When DOM processor 130 calls DOM object handler 110, being carried out by DOM object after customized treatment terminates, tree maker 140 utilizes the DOM object through the customized treatment arranged to generate final dom tree, and is played up by dom tree.
Wherein, for the call operation of DOM object handler 110, DOM processor 130 needs the address knowing each DOM object handler 110, and then call accordingly, if when DOM object handler is more and stores address relative distribution, will there is certain difficulty in calling of DOM processor 130. One is now provided preferably to call mode, in this example, object handles registration table is set, registering the register information of all DOM object handler in this form, whether called etc. register information herein can comprise the customization operations, of the storage address of each DOM object handler, each DOM object handler. DOM processor 130 can inquire about the DOM object handler whether existed current DOM object processes in object handles registration table. Optionally, if Query Result is yes, DOM processor 130 will find the DOM object handler 110 processed by this DOM object according to register information, and calls. Optionally, if Query Result is no, then prove currently there is not the DOM object handler 110 processed by this DOM object.
In the process called, if when DOM processor 130 determines to there is the DOM object handler processed by current DOM object in browser, calling this DOM object handler, to the customized treatment that this DOM object is arranged. And DOM processor 130 is when determining that not existing for current DOM object in browser carries out the DOM object handler processed, this DOM object is carried out default process.
For each DOM object, all having at least two events, an event ContentReady being this DOM object and having triggered when having loaded, another is the event DocumentReady that whole HTML triggers when having loaded. In order to web page element is customized, being contemplated that of the embodiment of the present invention: when the ContentReady event of the DOM object corresponding with web page element is triggered, just it is invoked at the customized treatment that web browser place is prepared in advance, thus realizes the customized treatment to particular webpage element. Corresponding with this design, the processing mode that the event ContentReady triggered when each DOM object handler 110 stores and loaded by specific DOM object processes. Further, owing to DOM object also exists the event triggered when the whole page has loaded, therefore, each DOM object handler 110 can also store the processing mode that the event DocumentReady triggered when all having been loaded by the HTML obtaining the page processes.
A complete webpage due to what finally present, and in prior art webpage present terminate by render engine renders after present, therefore, present for ease of the page, the DOM processor that the embodiment of the present invention provides is arranged in the render engine of browser.
In the prior art, render engine mostly just controls corresponding DOM object according to the JS code in html web page, and render engine provides and interface between JS code. And JS code is controlled by network application self or service provider usually, therefore, the Webpage that render engine renders is mutually similar. And in this example, DOM processor 130 can utilize at least one DOM object handler 110 of the interface interchange played up by web page element that browser provides, and can realize the personalized customization of user from this interface.
Preferably, the DOM object mentioned in the various embodiments described above comprises text box element, Password Input frame element. Certainly, DOM object not only comprises above-mentioned two kinds of elements, and other web page element all can realize.
The each several part framework that above-mentioned browser carries out the device of page elements process provides according to its function, and actual framework is not limited in each part mentioned above, it is also possible to comprise other parts, module, device etc.
Fig. 2 shows the schema of a kind of page elements treatment process according to embodiments of the present invention, arranges at least one DOM object handler in browser side, and wherein each DOM object handler stores the customized treatment of specific DOM object. The treatment scheme of the method comprises step S202 to step S204.
Step S202, browser side load obtain the page, and to obtain the page page elements resolve, each page elements is converted to DOM object.
Step S204, at least one the DOM object handler calling setting, at least one customized treatment arranged in the DOM object of step S202 conversion.
In embodiments of the present invention, for each DOM object, the DOM object handler that it carries out customized treatment is set in browser side, in the acquisition process of the page, calls the customized treatment that DOM object is arranged by the DOM object handler of selection. As can be seen here, the device that the browsing device net page element adopting the embodiment of the present invention to provide processes, can process for each DOM object respectively, the mode of its process carries out Selection and call according to DOM object, the web page contents thus presented can realize personalized customization process, and it is not the fixing mode required by network application and information provider, and then achieve the object that the content that web browser can present by user carries out personalized customization, meet the preference of different users, it is to increase the impression of user is experienced.
Flow process shown in Figure 2, step S204, after implementing, utilizes the DOM object through the customized treatment arranged to generate final dom tree, and plays up to dom tree, the webpage after playing up is presented to user.
Step S204 mentions at least one the DOM object handler calling setting, it is need the address knowing allocating object (each DOM object handler) by calling, and then call accordingly, if when DOM object handler is more and stores address relative distribution, calling and will there is certain difficulty. One is now provided preferably to call mode, in this example, object handles registration table is set, registering the register information of all DOM object handler in this form, whether called etc. register information herein can comprise the customization operations, of the storage address of each DOM object handler, each DOM object handler. Its concrete call method refers to Fig. 3.
Fig. 3 shows the schema of the call method of DOM object handler according to an embodiment of the invention. See Fig. 3, this step comprises step S302 to step S306.
Step S302, in object handles registration table, inquire about the DOM object handler whether existed current DOM object processes.
Step S304, when the Query Result of step S302 is for being, finds the DOM object handler processed by this DOM object according to register information, and call.
Step S306, when the Query Result of step S302 is no, it is determined that do not exist the DOM object handler processed as current DOM object.
In the process called, when browser exists the DOM object handler processed by current DOM object, call this DOM object handler, to the customized treatment that this DOM object is arranged. And when browser not existing for current DOM object and carries out the DOM object handler processed, then directly this DOM object is carried out default process.
For each DOM object, all having at least two events, an event ContentReady being this DOM object and having triggered when having loaded, another is the event DocumentReady that whole HTML triggers when having loaded. In order to web page element is customized, being contemplated that of the embodiment of the present invention: when the ContentReady event of the DOM object corresponding with web page element is triggered, just it is invoked at the customized treatment that web browser place is prepared in advance, thus realizes the customized treatment to particular webpage element. Corresponding with this design, the processing mode that the event ContentReady triggered when each DOM object handler stores and loaded by specific DOM object processes. Further, owing to DOM object also exists the event triggered when the whole page has loaded, therefore, each DOM object handler can also store the processing mode that the event DocumentReady triggered when all having been loaded by the HTML obtaining the page processes.
In the prior art, render engine mostly just controls corresponding DOM object according to the JS code in html web page, and render engine provides and interface between JS code. And JS code is controlled by network application self or service provider usually, therefore, the Webpage that render engine renders is mutually similar. And in this example, browser provides the interface that can be played up by web page element, utilize at least one DOM object handler of this interface interchange, it is achieved the personalized customization of user.
Embodiment one
The browser being mentioned in the embodiment of the present invention can for multiple, and the InternetExplorer(of such as Microsoft is called for short IE), MozillaFirefox, Chrome, Opera of company of Google and Safari of Apple etc.
Now carry out setting forth in detail and illustrating for IE browser to the concrete treatment process of the web page element that the embodiment of the present invention provides.
When browser is IE browser, the client terminal at browser place arranges the first interface IElementBehaviorFactory, the 2nd interface IElementBehavior and the 3rd interface IDocHostUIHandler at WebBrowser plug-in unit, wherein, first interface and the 2nd interface are used for calling each DOM object handler, and the 3rd interface is for being registered to each DOM object handler in object handles registration table.
For the particular procedure for each web page element, it may be necessary to realize
IElementBehavior(element behavior)
ImplementingtheIElementBehaviorInterface(performs element behavior interface)
ImplementingtheNotifyMethod(performs Notification Method)
ImplementingtheInitMethod(performs initial method)
ImplementingtheDetachMethod(performs separation method)
IElementBehaviorFactory(element behavior factory behavior)
IElementNamespaceFactory(element name space factor interface)
IElementNamespaceFactoryCallback(element name space readjustment interface)
After Initialize installation, the client terminal WebBrowser(web browser in IE browser) to realize the concrete treatment step of web page element as follows for plug-in unit:
Step 1, client terminal WebBrowser plug-in unit realize IElementBehaviorFactory interface and IElementBehavior interface.
Step 2, client terminal WebBrowser plug-in unit realize IDocHostUIHandler interface.
Note: WebBrowser plug-in unit here is exactly in the embodiment of the par-ticular processor for specific DOM object in IE, realize IDocHostUIHandler interface to adopt by DOM processor for par-ticular processor is registered in object registry, it is achieved IElementBehaviorFactory and IElementBehavior interface realizes for illustration of concrete customized treatment.
When step 3, page creation, MSHTML can call the GetHostInfo method of IDocHostUIHandler, and client-side program provides the BehaviorName of page elements TAG and correspondence to MSHTML
Note: MSHTML inquires about all DOM object handler lists corresponding to core engine, this step corresponding to DOM processor.
When step 4, the page load, MSHTML according to the above BehaviorName provided, can call the FindBehavior method of IElementBehaviorFactory, provide IElementBehavior Interface realization by client terminal one by one.
Herein, it is preferable that, and the corresponding interface IElementBehaviorSite provided with the page associates, to determine whether customization behavior.
If step 5 client terminal provides IElementBehavior and realizes, MSHTML, when loading the page elements of corresponding TAG, calls element behavior Notification Method, the loading state of notice customer terminal webpage element.
Note: element behavior Notification Method realizes utilizing IElementBehavior::Notify in IE.
Wherein, it should be appreciated that step 4 and step 5 are looked into corresponding to DOM processor and called corresponding DOM object handler and processed by DOM object.
The method of the present embodiment is not only for IE browser, and for other browsers, its implementation is mutually similar.
Preferably, the DOM object mentioned in the various embodiments described above comprises text box element, Password Input frame element. Certainly, DOM object not only comprises above-mentioned two kinds of elements, and other web page element all can realize. Now it is described for text box element.
Embodiment two
For Textarea(text box) units of pages, for user provides the input frame inputting a large amount of word in webpage, but under current webpage presentation mode, user only can input simple word in textarea, and contents such as subscribing the word of form, image cannot be inputted. And by providing the customization to textarea to play up at browser place, it is possible to make in textarea, input more abundant content.
This example provides corresponding explanation for the concrete operation of text box element.
1, first, carrying out event definition, in the GetHostInfo method of IDocHostUIHandler, structure and mark to browser carry out self-defined. Text box element arranges a div layer, utilizes pCSSBuffer pointer to dispatch, the operation relating to text box element is all pulled on div layer and performs.
2, in the FindBehavior method of IElementBehaviorFactory, what return IElementBehavior realizes object CTextAreaElementBehavior, and preserves the IElementBehaviorSite pointer to object that MSHTML provides.
3, when MSHTML calls text box element behavior notice (CTextAreaElementBehavior::Notify) method, the operation relating to text box element is implemented.
When loading the text box element of corresponding TAG, call element behavior Notification Method, the loading state of notice client terminal text box element. At div layer, the content in text box element is processed, this process relate to adjustment text box element content width, highly, result of broadcast etc.
After div layer process terminates, by overlapping for the process effect of the content of text box element and div layer, the effect after overlap is presented to user.
Use the method that the embodiment of the present invention can realize utilizing browser to carry out page elements (text box element) and carry out processing, it is achieved the personalized customization of user, it is to increase the impression of user is experienced.
Adopt device provided by the invention and method, it is possible to reach following useful effect:
In embodiments of the present invention, for each DOM object, the DOM object handler that it carries out customized treatment is set in browser side, in the acquisition process of the page, utilizes the customized treatment that DOM processor calls the DOM object handler of selection and arranged by DOM object. As can be seen here, the device that the browsing device net page element adopting the embodiment of the present invention to provide processes, can process for each DOM object respectively, the mode of its process carries out Selection and call by DOM processor, the web page contents thus presented can realize personalized customization process, and it is not the fixing mode required by network application and information provider, and then achieve the object that the content that web browser can present by user carries out personalized customization, meet the preference of different users, it is to increase the impression of user is experienced.
Intrinsic not relevant to any certain computer, virtual system or other equipment with display at this algorithm provided. Various general-purpose system can also with use based on together with this teaching. According to description above, it is to construct the structure required by this type systematic is apparent. In addition, the present invention is not also for any certain programmed language. It should be appreciated that various programming language can be utilized to realize the content of the present invention described here, and the description done by language-specific above is the preferred forms in order to disclose the present invention.
In specification sheets mentioned herein, describe a large amount of detail. However, it is understood that embodiments of the invention can be put into practice when not having these details. In some instances, it is not shown specifically known method, structure and technology, so that not fuzzy understanding of this description.
Similarly, it is to be understood that, one or more in order to what simplify the disclosure and help to understand in each inventive aspect, above to, in the description of the 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. But, the method for the disclosure should be construed to the following intention of reflection: namely the present invention for required protection requires feature more more than the feature clearly recorded in each claim. More properly saying, as reflected in claim book below, inventive aspect is all features less than disclosed single embodiment above. Therefore, the claim book following embodiment is thus incorporated to this embodiment clearly, and wherein each claim itself is as the independent embodiment of the present invention.
Those skilled in the art it can be appreciated that the module in the equipment in embodiment can be carried out adaptively change and they are arranged in one or more equipment different from this embodiment. Module in embodiment or unit or assembly can be combined into a module or unit or assembly, and multiple submodule block or subelement or subgroup part can be put them in addition. Except at least some in such feature and/or process or unit mutually repels, it is possible to adopt any combination all processes or the unit of all features disclosed in this specification sheets (comprising adjoint claim, summary and accompanying drawing) and so disclosed any method or equipment to be combined. Unless expressly stated otherwise, each feature disclosed in this specification sheets (comprising adjoint claim, summary and accompanying drawing) can by providing alternative features that is identical, equivalent or similar object to replace.
In addition, the technician of this area can understand, although embodiments more described herein comprise in other embodiment some included feature instead of further feature, but the combination of the feature of different embodiment means to be within the scope of the present invention and forms different embodiments. Such as, in the following claims, the one of any of claimed embodiment can use with arbitrary array mode.
Each parts embodiment of the present invention with hardware implementing, or can realize with the software module run on one or more treater, or realizes with their combination. It will be understood by one skilled in the art that the some or all functions that microprocessor or digital signal processor (DSP) can be used in practice to realize the some or all parts in page elements treatment unit according to embodiments of the present invention. Such as, the present invention can also be embodied as part or all the equipment for performing method as described herein or device program (computer program and computer program). The program of such the present invention of realization can store on a computer-readable medium, or can have the form of one or more signal. Such signal can be downloaded from internet website and obtain, or provides on carrier signal, or provides with any other form.
Should it is to be noted that above-described embodiment the present invention will be described instead of limits the invention, and those skilled in the art can design alternative embodiment when not departing from the scope of claims. In the claims, it should not any reference symbol construction between bracket is become limitations on claims. Word " comprises " element or step not getting rid of and exist and do not arrange in the claims. Word "a" or "an" before being positioned at element is not got rid of and be there is multiple such element. The present invention can by means of including the hardware of some different elements and realize by means of the computer suitably programmed. In the unit claim listing some devices, some in these devices can be carry out particular embodiment by same hardware branch. Word first, second and third-class use do not represent any order. Can be title by these word explanations.

Claims (17)

1. a page elements treatment unit, comprising:
At least one DOM object handler, it is arranged on browser side, each DOM object handler be configured to store for specific DOM object personalization custom formats play up process, wherein, the content of often kind of custom formats is different from the content of the set form required by network application and/or information provider;
Page parsing device, is configured to load in described browser side obtain the page, and is resolved by the page elements of the described acquisition page, each page elements is converted to DOM object;
DOM processor, it is couple to described page parsing device and at least one DOM object handler described, at least one the DOM object handler being configured to call described setting, plays up process to the custom formats of at least one personalization arranged in the DOM object of described conversion;
Tree maker, is couple to described DOM processor, is configured to utilize the DOM object playing up process through the custom formats of the personalization of described setting to generate final dom tree, and is played up by described dom tree.
2. device according to claim 1, it is characterized in that, described DOM processor is also configured in object handles registration table to inquire about the DOM object handler whether existed current DOM object processes, wherein, described object handles registration table is registered with the register information of at least one DOM object handler of described setting;
If finding the DOM object handler processed by this DOM object according to register information, and calling.
3. device according to claim 1, it is characterized in that, described DOM processor is also configured to call this DOM object handler when there is the DOM object handler processed by current DOM object in described browser, and the custom formats that this DOM object is arranged is played up process;
When described browser not existing for current DOM object and carries out the DOM object handler processed, this DOM object is carried out default process.
4. device according to the arbitrary item of claims 1 to 3, it is characterised in that, each DOM object handler stores the processing mode that the event ContentReady triggered when having been loaded by described specific DOM object processes.
5. device according to claim 4, it is characterised in that, each DOM object handler also stores the processing mode that the event DocumentReady triggered when the HTML to the described acquisition page has all loaded processes.
6. device according to the arbitrary item of claims 1 to 3, it is characterised in that, described DOM processor is arranged in the render engine of described browser.
7. device according to the arbitrary item of claims 1 to 3, it is characterised in that, at least one object handler described in the interface interchange that described page elements is played up that described DOM processor is configured to utilize described browser to provide.
8. device according to claim 7, it is characterised in that, described DOM object comprises: text box element; Password Input frame element.
9. a page elements treatment process, at least one DOM object handler is set in browser side, what wherein each DOM object handler stored the custom formats of the personalization for specific DOM object plays up process, wherein, the content of often kind of custom formats is different from the content of the set form required by network application and/or information provider, and the method comprises:
Load in browser side and obtain the page, and the page elements of the described acquisition page is resolved, each page elements is converted to DOM object;
Call at least one DOM object handler of described setting, the custom formats of at least one personalization arranged in the DOM object of described conversion played up process;
The DOM object playing up process through the custom formats of the personalization of described setting is utilized to generate final dom tree;
Described dom tree is played up.
10. method according to claim 9, it is characterised in that, call at least one DOM object handler of described setting, comprising:
Object handles registration table is inquired about the DOM object handler whether existed current DOM object processes, wherein, described object handles registration table is registered with the register information of at least one DOM object handler of described setting;
If finding the DOM object handler processed by this DOM object according to register information, and calling.
11. methods according to claim 9, it is characterised in that, call at least one DOM object handler of described setting, the custom formats of at least one personalization arranged in the DOM object of described conversion played up process, comprising:
When described browser exists the DOM object handler processed by current DOM object, call this DOM object handler, the custom formats of the personalization that this DOM object is arranged played up process;
When described browser not existing for current DOM object and carries out the DOM object handler processed, this DOM object is carried out default process.
12. methods according to the arbitrary item of claim 9 to 11, it is characterised in that, each DOM object handler stores the processing mode that the event ContentReady triggered when having been loaded by described specific DOM object processes.
13. methods according to claim 12, it is characterised in that, each DOM object handler also stores the processing mode that the event DocumentReady triggered when the HTML to the described acquisition page has all loaded processes.
14. methods according to the arbitrary item of claim 9 to 11, it is characterised in that, call at least one DOM object handler of described setting, comprising:
At least one DOM object handler described in interface interchange that provide according to described browser, that described page elements is played up.
15. methods according to claim 10 or 11, it is characterized in that, when described browser is IE browser, the client terminal at described browser place arranges the first interface IElementBehaviorFactory, the 2nd interface IElementBehavior and the 3rd interface IDocHostUIHandler at WebBrowser plug-in unit, wherein, described first interface and described 2nd interface are used for calling each DOM object handler, and described 3rd interface is for being registered in described object handles registration table by each DOM object handler;
Call at least one DOM object handler of described setting, comprising:
The behavior title BehaviorName that core engine provides according to the client terminal at described browser place, at least one DOM object handler described in being connected with described first interface by described 2nd interface interchange; And
When described core engine loads the page elements of correspondence according to the page elements mark TAG that described client terminal provides, call element behavior Notification Method, notify the loading state of described customer terminal webpage element.
16. methods according to claim 15, it is characterised in that, described core engine calls at least one DOM object handler described, comprising:
The 4th interface IElementBehaviorSite that described core engine provides with the described acquisition page associates, and determines that current DOM is to liking surely existing customized treatment by described 4th interface.
17. methods according to claim 9, it is characterised in that, described DOM object comprises: text box element; Password Input frame element.
CN201210454468.9A 2012-11-13 2012-11-13 Page elements treatment process and device Active 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 CN102999578A (en) 2013-03-27
CN102999578B true CN102999578B (en) 2016-06-01

Family

ID=47928146

Family Applications (1)

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

Country Status (1)

Country Link
CN (1) CN102999578B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9996512B2 (en) * 2012-11-13 2018-06-12 Beijing Qihoo Technology Company Limited Customized processing of DOM objects
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
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
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
CN108509189B (en) * 2018-04-13 2019-09-10 南京新贝金服科技有限公司 A kind of component of the H5 time gate based on DOM unifies implementation method

Citations (2)

* 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
CN102981845A (en) * 2012-11-13 2013-03-20 北京奇虎科技有限公司 Page elements processing method of browser and page elements processing device of browser

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7444345B2 (en) * 2005-02-15 2008-10-28 International Business Machines Corporation Hierarchical inherited XML DOM
CN102214244A (en) * 2011-07-07 2011-10-12 深圳市万兴软件有限公司 Analytic method and system for docx file information

Patent Citations (2)

* 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
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的网页信息抽取方法;潘超等;《硅谷》;20110223(第20期);第172、190页 *

Also Published As

Publication number Publication date
CN102999578A (en) 2013-03-27

Similar Documents

Publication Publication Date Title
CN102999578B (en) Page elements treatment process and device
CN102981844B (en) The browser that webpage main body element is processed and method
CN102999579B (en) Page text frame process browser and page text frame element disposal route
CN102981848B (en) Webpage main body element process browser and method
US20200106850A1 (en) System and method for mobile application deep linking
CN102981845B (en) Browser carries out method and the device of page elements process
CN102890724B (en) webpage loading method and device
AU2010201642B2 (en) Remote module incorporation into a container document
US20150074561A1 (en) Customizable themes for browsers and web content
US9747117B2 (en) System and methods for loading an application and its modules in a client device
US11553035B2 (en) Cross-platform module for loading across a plurality of device types
WO2007130547A2 (en) Remote module syndication system and method
US20090249188A1 (en) Method for adaptive transcription of web pages
EP2033125A2 (en) Message catalogs for remote modules
CN102915366B (en) A kind of browser loads the method and apparatus of webpage
CN104021016B (en) Method and browser for loading browser plug-in icons
CN102930057A (en) Search implementation method and device
CN103023870B (en) The output intent of data, device and equipment in a kind of message
US20100229081A1 (en) Method for Providing a Navigation Element in an Application
EP2507727A1 (en) Adaptive selection of a search engine on a wireless communication device
CN102981846A (en) Method for treating password input box element and browser for treating the password input box element
CN102981847B (en) The browser that page text frame is processed and method
CN101860734A (en) Method for implementing incremental transmission and display of dynamic images through AJAX
CN105260421A (en) Webpage loading method and apparatus
CN105516333A (en) Interactive method and system based on webpage

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.