CN103064680A - Plug-in playing method and device in browser - Google Patents

Plug-in playing method and device in browser Download PDF

Info

Publication number
CN103064680A
CN103064680A CN2012105730783A CN201210573078A CN103064680A CN 103064680 A CN103064680 A CN 103064680A CN 2012105730783 A CN2012105730783 A CN 2012105730783A CN 201210573078 A CN201210573078 A CN 201210573078A CN 103064680 A CN103064680 A CN 103064680A
Authority
CN
China
Prior art keywords
plug
unit
window
control object
broadcast
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
CN2012105730783A
Other languages
Chinese (zh)
Other versions
CN103064680B (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 CN201210573078.3A priority Critical patent/CN103064680B/en
Publication of CN103064680A publication Critical patent/CN103064680A/en
Priority to US14/655,138 priority patent/US20150347164A1/en
Priority to PCT/CN2013/083729 priority patent/WO2014101486A1/en
Application granted granted Critical
Publication of CN103064680B publication Critical patent/CN103064680B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a plug-in playing method and device in a browser. The plug-in playing method includes: constructing an independent progress different from a page progress when a first plug-in is loaded and activated on the page progress of the browser, and loading and activating a second plug-in in the independent progress, wherein the second plug-in copies information of the first plug-in; calculating information of the second plug-in in the independent progress to obtain a calculation result; and drawing and playing the second plug-in in a playing window according to the calculation result. The plug-in playing method can improve stability of the browser. The invention further discloses a plug-in playing device.

Description

The player method of plug-in unit and device in the browser
Technical field
The present invention relates to the network application field, be specifically related to player method and the device of plug-in unit in a kind of browser.
Background technology
The page process of browser is understood the activity of constructing object when open any browser, then carries out the operations of the page, and moving object is often referred to the plug-in unit of browser, for example the ActiveX plug-in unit.
Because the ActiveX plug-in unit need to be embedded in the webpage, so plug-in unit and the page can move under same process.If this plug-in unit occurs stuck or collapse after, can cause whole webpage to withdraw from, affected the stability of page operation.After page process occurs stuck or collapses, can cause the ActiveX plug-in unit in the page to withdraw from, affected the stability of ActiveX plug-in unit.
And because the ActiveX plug-in unit is relatively fixing in the position of webpage, the user can't dynamically adjust size and the display position of ActiveX plug-in unit.
Summary of the invention
In view of the above problems, the present invention has been proposed so as the playing device of plug-in unit in a kind of browser that overcomes the problems referred to above or address the above problem at least in part to be provided and corresponding browser in the player method of plug-in unit.
According to one aspect of the present invention, the player method of plug-in unit in a kind of browser is provided, comprising:
When the page process of browser loads and activates the first plug-in unit, creates the detached process different from page process, loading and activate the second plug-in unit in detached process, wherein, described the second plug-in unit copies the information of described the first plug-in unit;
In detached process, the information of described the second plug-in unit is calculated, obtain result of calculation;
In broadcast window, described the second plug-in unit is drawn broadcast according to described result of calculation.
Alternatively, described the second plug-in unit copies the information of described the first plug-in unit, comprising:
In page process, generate the first control object for described the first plug-in unit;
In detached process, generate the second control object for described the second plug-in unit;
Utilize described the second control object and described the first control object to carry out interactive communication, obtain the information of described the first plug-in unit;
Utilize the information of described the first plug-in unit that described the second control object will obtain to be sent to described the second plug-in unit.
Alternatively, carry out mutual operation by pointer between described the first plug-in unit and described the first control object, wherein, this pointer can call a plurality of standard interfaces; And
Carry out mutual operation by pointer of the same type between described the second plug-in unit and described the second control object.
Alternatively, utilize described the second control object and described the first control object to carry out interactive communication, comprising:
In page process, create the first window related with described the first control object;
In detached process, create the Second Window related with described the second control object;
Utilize described first window and described Second Window to carry out interactive communication.
Alternatively, the information of interactive communication comprise following one of at least:
The refresh operation of the focus of the thread in the size of plug-in unit, the page process, the thread of page process, the execution of script.
Alternatively, in broadcast window, described the second plug-in unit is drawn broadcast according to described result of calculation, comprising:
When there is not the broadcast window of described the first plug-in unit in page process, utilize the newly-built broadcast window of described detached process;
According to the timer of described detached process, the described result of calculation of timing acquisition;
In newly-built broadcast window, described the second plug-in unit is drawn broadcast according to described result of calculation.
Alternatively, in broadcast window, described the second plug-in unit is drawn broadcast according to described result of calculation, comprising:
When having the former broadcast window of described the first plug-in unit in the page process, utilize the newly-built broadcast window of described detached process, and newly-built broadcast window is set to the parent window of former broadcast window;
In newly-built broadcast window, described the second plug-in unit is drawn broadcast according to described result of calculation.
Alternatively, described newly-built broadcast window can move or convergent-divergent at browser.
Alternatively, said method also comprises:
When page process was initiated to obtain the request of broadcast window, detached process informed that page process is without broadcast window.
Alternatively, described the first plug-in unit and/or described the second plug-in unit are the ActiveX plug-in unit.
According to another aspect of the present invention, the playing device of plug-in unit in a kind of browser is provided, comprising:
Creation module is configured to create the detached process different from page process when the page process of browser loads and activates the first plug-in unit, loading and activate the second plug-in unit in detached process, and wherein, described the second plug-in unit copies the information of described the first plug-in unit;
Computing module is configured in detached process, and the information of described the second plug-in unit is calculated, and obtains result of calculation;
Playing module is configured in broadcast window described the second plug-in unit be drawn broadcast according to described result of calculation.
Alternatively, described creation module also is configured to:
In page process, generate the first control object for described the first plug-in unit;
In detached process, generate the second control object for described the second plug-in unit;
Utilize described the second control object and described the first control object to carry out interactive communication, obtain the information of described the first plug-in unit;
Utilize the information of described the first plug-in unit that described the second control object will obtain to be sent to described the second plug-in unit.
Alternatively, wherein
Carry out mutual operation by pointer between described the first plug-in unit and described the first control object, wherein, this pointer can call a plurality of standard interfaces; And
Carry out mutual operation by pointer of the same type between described the second plug-in unit and described the second control object.
Alternatively, described creation module also is configured to:
In page process, create the first window related with described the first control object;
In detached process, create the Second Window related with described the second control object;
Utilize described first window and described Second Window to carry out interactive communication.
Alternatively, the information of interactive communication comprise following one of at least:
The refresh operation of the focus of the thread in the size of plug-in unit, the page process, the thread of page process, the execution of script.
Alternatively, described playing module also is configured to:
When there is not the broadcast window of described the first plug-in unit in page process, utilize the newly-built broadcast window of described detached process;
According to the timer of described detached process, the described result of calculation of timing acquisition;
In newly-built broadcast window, described the second plug-in unit is drawn broadcast according to described result of calculation.
Alternatively, described playing module also is configured to:
When having the former broadcast window of described the first plug-in unit in the page process, utilize the newly-built broadcast window of described detached process, and newly-built broadcast window is set to the parent window of former broadcast window;
In newly-built broadcast window, described the second plug-in unit is drawn broadcast according to described result of calculation.
Alternatively, described newly-built broadcast window can move or the convergent-divergent processing at browser.
Alternatively, said apparatus also comprises informs module, when being configured to receive page process and initiating to obtain the request of broadcast window, utilizes detached process to inform that page process is without broadcast window.
Alternatively, described the first plug-in unit and/or described the second plug-in unit are the ActiveX plug-in unit.
In embodiments of the present invention, in the page process of browser, load and activate the first plug-in unit, but the first plug-in unit is not drawn broadcast, but create a detached process different from page process, and in detached process, load and activate the second plug-in unit, utilize the second plug-in unit to realize copying the first plugin information.Because the information of the first plug-in unit and the second plug-in unit is consistent, therefore, it is consistent calculating with the information of the first plug-in unit is calculated obtained result of calculation to the information of the second plug-in unit, and it also should be consistent then in broadcast window the second plug-in unit being drawn the content that broadcast plays according to result of calculation.But, because the second plug-in unit is arranged in the detached process, share a process with detached process, from page process applicable two different processes respectively, therefore, the operation of the operation of the second plug-in unit and page process is independently, and the stability that problem can not affect the opposing party occurs a side.If the second plug-in unit occurs stuck or collapse after, can not cause whole webpage to withdraw from, can improve the stability of page operation, in like manner, after page process occurs stuck or collapses, can not cause the second plug-in unit in the page to withdraw from yet, improve the stability of plug-in component operation.This shows, the player method of plug-in unit can under the prerequisite that does not affect result of broadcast, improve the stability of browser execution in the browser that the embodiment of the invention provides.
Further, owing to the first plug-in unit is not really carried out, and the second plug-in unit is real executive agent, therefore, can claim that the first plug-in unit is agent object, and the second plug-in unit is moving object.The embodiment of the invention is by moving agent object in page process, and in detached process, move moving object, so that real browser plug-in, for example real ActiveX plug-in unit separates with page process, thereby make the browser plug-in Shi Buhui that goes wrong affect the browser process of embedding browser plug-in unit, be that the browser plug-in Shi Buhui that goes wrong affects page process, thereby improved the stability of browser.Simultaneously, when browser plug-in appearance virus waits the problem of security, because browser plug-in separates with page process, can not affect the operation of page process, thereby improve the security of browser yet.
In addition, when browser plug-in goes wrong, can hang up, reduce the operations such as authority or termination to the object thread execution of running browser plug-in unit, thereby so that detached process can be done directed distribution to system resources such as the EMS memory occupation of browser plug-in and CPU take, realize better resource distribution way of recycling, more rational dispatching resource, the termination process also can allow the resource recovery more thorough so that process withdraws from.
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 processing flow chart of the player method of plug-in unit in the browser according to an embodiment of the invention;
Fig. 2 shows the schematic diagram that communicates between page process and detached process according to an embodiment of the invention;
The schematic diagram that flash plug-in unit when Fig. 3 shows flash plug-in unit in the page process according to an embodiment of the invention without broadcast window is play;
The schematic diagram that flash plug-in unit when Fig. 4 shows flash plug-in unit in the page process according to an embodiment of the invention broadcast window is arranged is play; And
Fig. 5 shows the structural representation of the playing device of plug-in unit in the browser according to an embodiment of the invention.
Embodiment
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.
For solving above-mentioned at least one technical matters, the embodiment of the invention provides the player method of plug-in unit in a kind of browser, be used for to realize the independent operation of plug-in unit and page process, can not affect the stability of another one when guaranteeing one of any generation problem therein.Fig. 1 shows the processing flow chart of the player method of plug-in unit in the browser according to an embodiment of the invention.Referring to Fig. 1, the player method of plug-in unit comprises that step S102 is to step S106 in the browser.Being described as follows of each step.
Step S102, when the page process of browser loads and activates the first plug-in unit, creates the detached process different from page process, loading and activate the second plug-in unit in detached process, wherein, the second plug-in unit copies the information of the first plug-in unit.
Step S104, in detached process, the information of the second plug-in unit is calculated, obtain result of calculation.
Step S106, in broadcast window, the second plug-in unit is drawn broadcast according to result of calculation.
In embodiments of the present invention, in the page process of browser, load and activate the first plug-in unit, but the first plug-in unit is not drawn broadcast, but create a detached process different from page process, and in detached process, load and activate the second plug-in unit, utilize the second plug-in unit to realize copying the first plugin information.Because the information of the first plug-in unit and the second plug-in unit is consistent, therefore, it is consistent calculating with the information of the first plug-in unit is calculated obtained result of calculation to the information of the second plug-in unit, and it also should be consistent then in broadcast window the second plug-in unit being drawn the content that broadcast plays according to result of calculation.But, because the second plug-in unit is arranged in the detached process, share a process with detached process, from page process applicable two different processes respectively, therefore, the operation of the operation of the second plug-in unit and page process is independently, and the stability that problem can not affect the opposing party occurs a side.If the second plug-in unit occurs stuck or collapse after, can not cause whole webpage to withdraw from, can improve the stability of page operation, in like manner, after page process occurs stuck or collapses, can not cause the second plug-in unit in the page to withdraw from yet, improve the stability of plug-in component operation.This shows, the player method of plug-in unit can under the prerequisite that does not affect result of broadcast, improve the stability of browser execution in the browser that the embodiment of the invention provides.
Further, owing to the first plug-in unit is not really carried out, and the second plug-in unit is real executive agent, therefore, can claim that the first plug-in unit is agent object, and the second plug-in unit is moving object.The embodiment of the invention is by moving agent object in page process, and in detached process, move moving object, so that real browser plug-in, for example real ActiveX plug-in unit separates with page process, thereby make the browser plug-in Shi Buhui that goes wrong affect the browser process of embedding browser plug-in unit, be that the browser plug-in Shi Buhui that goes wrong affects page process, thereby improved the stability of browser.Simultaneously, when browser plug-in appearance virus waits the problem of security, because browser plug-in separates with page process, can not affect the operation of page process, thereby improve the security of browser yet.
In addition, when browser plug-in goes wrong, can hang up, reduce the operations such as authority or termination to the object thread execution of running browser plug-in unit, thereby so that detached process can be done directed distribution to system resources such as the EMS memory occupation of browser plug-in and CPU take, realize better resource distribution way of recycling, more rational dispatching resource, the termination process also can allow the resource recovery more thorough so that process withdraws from.
Need to prove, in embodiments of the present invention, claim that the first plug-in unit is agent object, and the second plug-in unit is moving object, has embodied the first plug-in unit different with the initiative of the second plug-in unit.When implementing, the player method of plug-in unit can be realized two-way communication in the browser that the embodiment of the invention provides, page process and detached process are not what fix, follow-up implementation might occur the plug-in unit in the detached process is separated to situation about carrying out in the page process, at this moment, agent object and moving object role exchange, its concrete processing procedure is similar.
Mention that in step S102 the second plug-in unit need to copy the information of the first plug-in unit, for guaranteeing the consistent of result of broadcast.Concrete, this example provides a kind of preferred copy mode.At first, be that the first plug-in unit generates the first control object in page process.Secondly, be that the second plug-in unit generates the second control object in detached process.Then, utilize the second control object and the first control object to carry out interactive communication, obtain the information of the first plug-in unit, the information that recycles the first plug-in unit that the second control object will obtain is sent to the second plug-in unit.
Owing to needing to operate between plug-in unit and self the corresponding control object, therefore, needing to have the interface of information interaction between the two.In the embodiment of the invention, arrange between plug-in unit and control object and carry out mutual operation by pointer, wherein, this pointer can call a plurality of standard interfaces.Concrete, carry out mutual operation by pointer between the first plug-in unit and the first control object, carry out mutual operation by pointer of the same type between the second plug-in unit and the second control object.Preferably, this pointer can be the IUnknown pointer, and the IUnknown pointer will call a lot of standard interfaces, such as IOleObject, IViewObject etc.
When utilizing the second control object and the first control object to carry out interactive communication, for convenient communication, can in page process, create the first window related with the first control object, then in detached process, create the Second Window related with the second control object.Subsequently, utilize first window and the Second Window set up to carry out interactive communication.
In the implementation process, the information of interactive communication can be that plug-in unit is play related any information, for example, and the size of plug-in unit, the focus of the thread in the page process, the refresh operation of the thread of page process, execution of script etc.Specifying information herein only is that conduct exemplifies, and does not cause restriction for information itself, and communication can also relate to other information that plug-in unit is play.
Step S106 mentions, in broadcast window the second plug-in unit is drawn broadcast according to result of calculation.That is, when the second plug-in unit is play, can be divided into two kinds of situations, a kind of is the broadcast window that does not have the first plug-in unit in the page process, and another kind is the broadcast window that there is the first plug-in unit in page process.Now respectively both are specifically described.
The first situation when there is not the broadcast window of the first plug-in unit in page process, is utilized the newly-built broadcast window of detached process.At this moment, because broadcast window is that detached process is newly-built, therefore there is no with original page process and contact.One or more timers are set in detached process, and timing acquisition is to the result of calculation of the second plug-in unit, and then in newly-built broadcast window the second plug-in unit drawn broadcast according to result of calculation and get final product.
The second situation, at this moment identical with the first situation when having the former broadcast window of the first plug-in unit in the page process, utilize equally the newly-built broadcast window of detached process.But, owing to there being former broadcast window, therefore, need between newly-built broadcast window and former broadcast window, setting up and contact.Concrete, newly-built broadcast window is set to the parent window of former broadcast window, then, in newly-built broadcast window the second plug-in unit is drawn broadcast according to result of calculation.
Newly-built broadcast window can move or convergent-divergent at browser, thereby realizes mobility, extensibility of broadcast window etc.Be presented on the broadcast window place of former page process if wish broadcast window, the window's position that then only needs newly-built broadcast window to be arranged on former page process gets final product.
Further, in implementation process, if the request that broadcast window is obtained in the initiation of page process, detached process informs that page process is without broadcast window.Page process can not be known the existence of broadcast window, then can not control broadcast window, thereby realize separating of plug-in unit and page process, improves the stability of browser.
In above-mentioned any one preferred embodiment, the first plug-in unit and/or the second plug-in unit are the ActiveX plug-in unit.
The flash plug-in unit is a kind of ActiveX plug-in unit commonly used, existing operates to example with the flash plug-in unit in page process, and the player method of plug-in unit is specifically described in the browser that the embodiment of the invention is provided.
Fig. 2 shows the schematic diagram that communicates between page process and detached process according to an embodiment of the invention.
In page process one side,
In the situation that flash is arranged in the webpage, when browser creates ActiveX plug-in unit (being the first plug-in unit that preamble is mentioned), can obtain CLSID by CLSIDFromProgID according to plug-in unit CLSID or ProgID() the inquiry registration table, whether the system of checking has installed corresponding plug-in unit, then can continue constructive process if install.
Browser obtains the IUnknown pointer of corresponding plug-in unit by calling CoGetClassObject, then carry out mutual operation by standard interface.The CoGetClassObject implementation is, go to registry query ActiveX path by CLSID, after obtaining the ActiveX path, call LoadLibrary and load the ActiveX plug-in unit, call its derivative function DllGetClassObject and obtain class factory's pointer (IClassFactory), the CreateInstance method of then calling IClassFactory obtains IUnknown pointer corresponding to ActiveX plug-in unit.
Need to prove herein, when loading the ActiveX plug-in unit, the Hook(interception) CoGetClassObject, create an ActiveX control object (i.e. first control object corresponding with the first plug-in unit), this ActiveX control object comprises a series of interfaces, IUnknown pointer a lot of standard interfaces that will call for example, such as IOleObject, IViewObject etc.Then when calling the CreateInstance of IClassFactory, the ActiveX control object that creates is returned to the IUnknown pointer of ActiveX plug-in unit.
In detached process one side,
When page process activates this ActiveX plug-in unit, extract the relevant informations such as attribute, URL, size of this control, then create a detached process, and in detached process, load ActiveX plug-in unit (i.e. the second plug-in unit).
Specifically, create a document, insert therein an object object, this detached process is called CoGetClassObject, this CoGetClassObject of Hook creates another ActiveX control object (i.e. second control object corresponding with the second plug-in unit) again, and this ActiveX control object comprises a series of interfaces, IUnknown pointer a lot of standard interfaces that will call for example, such as IOleObject, IViewObject etc.Then when calling the CreateInstance of IClassFactory, this another ActiveX control object that creates is returned to the IUnknown pointer of the ActiveX plug-in unit of detached process.
Between page process and detached process,
Creating respectively a window related with each control object in two ActiveX control objects that create communicates being used for.Specifically two control object can be for size, focus, refresh, script and other information carries out alternately.
All requests that the method that provides according to the present embodiment can be tackled page process and detached process direct interaction.If page process and detached process need to communicate, then realize information interaction between these two processes by two ActiveX control objects that are pre-created.Because the independence of detached process and page process, therefore, the concrete computation process of flash plug-in unit is carried out in detached process, thereby can not affect former page process.
Further, in the procedure for displaying of flash, can a newly-built broadcast window, then the result who calculates in the detached process is drawn in newly-built broadcast window, following two kinds of situations were described as follows in existing minute.
The first, the flash plug-in unit in the page process are the situations without the flash plug-in unit of broadcast window.
The schematic diagram that flash plug-in unit when Fig. 3 shows flash plug-in unit in the page process according to an embodiment of the invention without broadcast window is play.In Fig. 3, when the result who calculates in the detached process is drawn in newly-built broadcast window, a timer is arranged in detached process, according to predetermined time the interval call IViewObject interface Draw method and obtain draw data, be plotted in the flash broadcast window of new establishment with the data that will calculate.
When the user wishes to show, newly-built broadcast window can be arranged on the flash broadcast window position of the former page, but this window is removable, convergent-divergent etc., to satisfy user's demand in the flash of former page window.
The second, the flash plug-in unit in the page process are the situations that the flash plug-in unit of broadcast window is arranged.
The schematic diagram that flash plug-in unit when Fig. 4 shows flash plug-in unit in the page process according to an embodiment of the invention broadcast window is arranged is play.The result who calculates in the detached process is drawn in newly-built broadcast window, and newly-built broadcast window is set to the parent window of flash broadcast window in the former page.
Particularly, by calling the IOleWindow interface GetWindow method of flash object, obtain its corresponding window, then the parent window of flash broadcast window is set by SetParent.
When the user wishes to show, newly-built broadcast window can be arranged on the flash broadcast window position of the former page, but this window is removable, convergent-divergent etc., to satisfy user's demand in the flash of former page window.
Further, in former page process, on the opportunity of obtaining window, detached process is returned sky.Specifically, when page process scroll through pages, can call the IOleWindow interface GetWindow method of flash object and judge whether the flash object has window, if window is arranged then by sending WM_MOVE message moving window, returns NULL by GetWindow and forbid that page process moves the flash window.
In summary, the present embodiment provide a kind of in browser the method for player plug-in, realized really peeling off of webpage and plug-in unit, and then just solved the pin function that embeds complete and plug-in unit and the interactional problem of the page.
Based on same inventive concept, the embodiment of the invention also provides the playing device of plug-in unit in a kind of browser, can realize the player method of plug-in unit in the browser of above-mentioned any one preferred embodiment.Fig. 5 shows the structural representation of the playing device of plug-in unit in the browser according to an embodiment of the invention.Referring to Fig. 5, the playing device of plug-in unit comprises at least in the browser:
Creation module 501 is configured to create the detached process different from page process when the page process of browser loads and activates the first plug-in unit, loading and activate the second plug-in unit in detached process, and wherein, the second plug-in unit copies the information of the first plug-in unit;
Computing module 502 is configured in detached process, and the information of the second plug-in unit is calculated, and obtains result of calculation;
Playing module 503 is configured in broadcast window the second plug-in unit be drawn broadcast according to result of calculation.
In a preferred embodiment, creation module 501 can also be configured to:
Be that the first plug-in unit generates the first control object in page process;
Be that the second plug-in unit generates the second control object in detached process;
Utilize the second control object and the first control object to carry out interactive communication, obtain the information of the first plug-in unit;
Utilize the information of the first plug-in unit that the second control object will obtain to be sent to the second plug-in unit.
In a preferred embodiment, carry out mutual operation by pointer between the first plug-in unit and the first control object, wherein, this pointer can call a plurality of standard interfaces; And
Carry out mutual operation by pointer of the same type between the second plug-in unit and the second control object.
In a preferred embodiment, creation module 501 can also be configured to:
In page process, create the first window related with the first control object;
In detached process, create the Second Window related with the second control object;
Utilize first window and Second Window to carry out interactive communication.
In a preferred embodiment, the information of interactive communication comprise following one of at least:
The refresh operation of the focus of the thread in the size of plug-in unit, the page process, the thread of page process, the execution of script.
In a preferred embodiment, playing module 503 can also be configured to:
When there is not the broadcast window of the first plug-in unit in page process, utilize the newly-built broadcast window of detached process;
According to the timer of detached process, timing acquisition result of calculation;
In newly-built broadcast window, the second plug-in unit is drawn broadcast according to result of calculation.
In a preferred embodiment, playing module 503 can also be configured to:
When having the former broadcast window of the first plug-in unit in the page process, utilize the newly-built broadcast window of detached process, and newly-built broadcast window is set to the parent window of former broadcast window;
In newly-built broadcast window, the second plug-in unit is drawn broadcast according to result of calculation.
Newly-built broadcast window can move or the convergent-divergent processing at browser.
In a preferred embodiment, referring to Fig. 5, the playing device of plug-in unit can also comprise and informs module 504 in the browser.When receiving page process and initiating to obtain the request of broadcast window, inform that module 504 can utilize detached process to inform that page process is without broadcast window.
In a preferred embodiment, the first plug-in unit and/or the second plug-in unit are the ActiveX plug-in unit.
The player method of plug-in unit and device can reach following beneficial effect in the browser that the employing embodiment of the invention provides:
In embodiments of the present invention, in the page process of browser, load and activate the first plug-in unit, but the first plug-in unit is not drawn broadcast, but create a detached process different from page process, and in detached process, load and activate the second plug-in unit, utilize the second plug-in unit to realize copying the first plugin information.Because the information of the first plug-in unit and the second plug-in unit is consistent, therefore, it is consistent calculating with the information of the first plug-in unit is calculated obtained result of calculation to the information of the second plug-in unit, and it also should be consistent then in broadcast window the second plug-in unit being drawn the content that broadcast plays according to result of calculation.But, because the second plug-in unit is arranged in the detached process, share a process with detached process, from page process applicable two different processes respectively, therefore, the operation of the operation of the second plug-in unit and page process is independently, and the stability that problem can not affect the opposing party occurs a side.If the second plug-in unit occurs stuck or collapse after, can not cause whole webpage to withdraw from, can improve the stability of page operation, in like manner, after page process occurs stuck or collapses, can not cause the second plug-in unit in the page to withdraw from yet, improve the stability of plug-in component operation.This shows, the player method of plug-in unit can under the prerequisite that does not affect result of broadcast, improve the stability of browser execution in the browser that the embodiment of the invention provides.
Further, owing to the first plug-in unit is not really carried out, and the second plug-in unit is real executive agent, therefore, can claim that the first plug-in unit is agent object, and the second plug-in unit is moving object.The embodiment of the invention is by moving agent object in page process, and in detached process, move moving object, so that real browser plug-in, for example real ActiveX plug-in unit separates with page process, thereby make the browser plug-in Shi Buhui that goes wrong affect the browser process of embedding browser plug-in unit, be that the browser plug-in Shi Buhui that goes wrong affects page process, thereby improved the stability of browser.Simultaneously, when browser plug-in appearance virus waits the problem of security, because browser plug-in separates with page process, can not affect the operation of page process, thereby improve the security of browser yet.
In addition, when browser plug-in goes wrong, can hang up, reduce the operations such as authority or termination to the object thread execution of running browser plug-in unit, thereby so that detached process can be done directed distribution to system resources such as the EMS memory occupation of browser plug-in and CPU take, realize better resource distribution way of recycling, more rational dispatching resource, the termination process also can allow the resource recovery more thorough so that process withdraws from.
In the instructions that provides herein, a large amount of details have been described.Yet, can understand, embodiments of the invention can be in the situation that there be these details to put into practice.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 playing device of plug-in unit in the browser 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 (20)

1. the player method of plug-in unit in the browser comprises:
When the page process of browser loads and activates the first plug-in unit, creates the detached process different from page process, loading and activate the second plug-in unit in detached process, wherein, described the second plug-in unit copies the information of described the first plug-in unit;
In detached process, the information of described the second plug-in unit is calculated, obtain result of calculation;
In broadcast window, described the second plug-in unit is drawn broadcast according to described result of calculation.
2. method according to claim 1, described the second plug-in unit copies the information of described the first plug-in unit, comprising:
In page process, generate the first control object for described the first plug-in unit;
In detached process, generate the second control object for described the second plug-in unit;
Utilize described the second control object and described the first control object to carry out interactive communication, obtain the information of described the first plug-in unit;
Utilize the information of described the first plug-in unit that described the second control object will obtain to be sent to described the second plug-in unit.
3. method according to claim 2,
Carry out mutual operation by pointer between described the first plug-in unit and described the first control object, wherein, this pointer can call a plurality of standard interfaces; And
Carry out mutual operation by pointer of the same type between described the second plug-in unit and described the second control object.
4. method according to claim 2 utilizes described the second control object and described the first control object to carry out interactive communication, comprising:
In page process, create the first window related with described the first control object;
In detached process, create the Second Window related with described the second control object;
Utilize described first window and described Second Window to carry out interactive communication.
5. according to claim 2 to 4 each described methods, the information of interactive communication comprise following one of at least:
The refresh operation of the focus of the thread in the size of plug-in unit, the page process, the thread of page process, the execution of script.
6. according to claim 1 to 5 each described methods, in broadcast window, described the second plug-in unit is drawn broadcast according to described result of calculation, comprising:
When there is not the broadcast window of described the first plug-in unit in page process, utilize the newly-built broadcast window of described detached process;
According to the timer of described detached process, the described result of calculation of timing acquisition;
In newly-built broadcast window, described the second plug-in unit is drawn broadcast according to described result of calculation.
7. according to claim 1 to 6 each described methods, in broadcast window, described the second plug-in unit is drawn broadcast according to described result of calculation, comprising:
When having the former broadcast window of described the first plug-in unit in the page process, utilize the newly-built broadcast window of described detached process, and newly-built broadcast window is set to the parent window of former broadcast window;
In newly-built broadcast window, described the second plug-in unit is drawn broadcast according to described result of calculation.
8. according to claim 6 or 7 described methods, described newly-built broadcast window can move or convergent-divergent at browser.
9. method according to claim 7 also comprises:
When page process was initiated to obtain the request of broadcast window, detached process informed that page process is without broadcast window.
10. according to claim 1 to 9 each described methods, described the first plug-in unit and/or described the second plug-in unit are the ActiveX plug-in unit.
11. the playing device of plug-in unit in the browser comprises:
Creation module is configured to create the detached process different from page process when the page process of browser loads and activates the first plug-in unit, loading and activate the second plug-in unit in detached process, and wherein, described the second plug-in unit copies the information of described the first plug-in unit;
Computing module is configured in detached process, and the information of described the second plug-in unit is calculated, and obtains result of calculation;
Playing module is configured in broadcast window described the second plug-in unit be drawn broadcast according to described result of calculation.
12. device according to claim 11, described creation module also is configured to:
In page process, generate the first control object for described the first plug-in unit;
In detached process, generate the second control object for described the second plug-in unit;
Utilize described the second control object and described the first control object to carry out interactive communication, obtain the information of described the first plug-in unit;
Utilize the information of described the first plug-in unit that described the second control object will obtain to be sent to described the second plug-in unit.
13. device according to claim 12, wherein
Carry out mutual operation by pointer between described the first plug-in unit and described the first control object, wherein, this pointer can call a plurality of standard interfaces; And
Carry out mutual operation by pointer of the same type between described the second plug-in unit and described the second control object.
14. device according to claim 12, described creation module also is configured to:
In page process, create the first window related with described the first control object;
In detached process, create the Second Window related with described the second control object;
Utilize described first window and described Second Window to carry out interactive communication.
15. according to claim 12 to 14 each described devices, the information of interactive communication comprise following one of at least:
The refresh operation of the focus of the thread in the size of plug-in unit, the page process, the thread of page process, the execution of script.
16. to 15 each described devices, described playing module also is configured to according to claim 11:
When there is not the broadcast window of described the first plug-in unit in page process, utilize the newly-built broadcast window of described detached process;
According to the timer of described detached process, the described result of calculation of timing acquisition;
In newly-built broadcast window, described the second plug-in unit is drawn broadcast according to described result of calculation.
17. to 16 each described devices, described playing module also is configured to according to claim 11:
When having the former broadcast window of described the first plug-in unit in the page process, utilize the newly-built broadcast window of described detached process, and newly-built broadcast window is set to the parent window of former broadcast window;
In newly-built broadcast window, described the second plug-in unit is drawn broadcast according to described result of calculation.
18. according to claim 16 or 17 described devices, described newly-built broadcast window can move or convergent-divergent is processed at browser.
19. device according to claim 17 also comprises and informs module, when being configured to receive page process and initiating to obtain the request of broadcast window, utilizes detached process to inform that page process is without broadcast window.
20. according to claim 11 to 19 each described devices, described the first plug-in unit and/or described the second plug-in unit are the ActiveX plug-in unit.
CN201210573078.3A 2012-12-25 2012-12-25 The player method of plug-in unit and device in browser Active CN103064680B (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN201210573078.3A CN103064680B (en) 2012-12-25 2012-12-25 The player method of plug-in unit and device in browser
US14/655,138 US20150347164A1 (en) 2012-12-25 2013-09-18 Method and Device for Playing Plug-in in Browser
PCT/CN2013/083729 WO2014101486A1 (en) 2012-12-25 2013-09-18 Method and device for playing plug-in in browser

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210573078.3A CN103064680B (en) 2012-12-25 2012-12-25 The player method of plug-in unit and device in browser

Publications (2)

Publication Number Publication Date
CN103064680A true CN103064680A (en) 2013-04-24
CN103064680B CN103064680B (en) 2016-08-03

Family

ID=48107318

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210573078.3A Active CN103064680B (en) 2012-12-25 2012-12-25 The player method of plug-in unit and device in browser

Country Status (1)

Country Link
CN (1) CN103064680B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103077047A (en) * 2012-12-25 2013-05-01 北京奇虎科技有限公司 Plug-in playback method and device
CN103226477A (en) * 2013-05-21 2013-07-31 北京暴风科技股份有限公司 Method and system for enhancing flash video picture quality in Web Browser
CN103488967A (en) * 2013-10-14 2014-01-01 张祖锋 Visible light or infrared positioning based cabinet management system and method
WO2014101486A1 (en) * 2012-12-25 2014-07-03 北京奇虎科技有限公司 Method and device for playing plug-in in browser
CN103914327A (en) * 2014-04-25 2014-07-09 广东威创视讯科技股份有限公司 Plug-in loading method and plug-in loading module
CN104268019A (en) * 2014-09-23 2015-01-07 广州金山网络科技有限公司 Software operating method and device and terminal
CN105630507A (en) * 2015-12-29 2016-06-01 Tcl集团股份有限公司 Method and device for drawing WebView control interface
CN108334779A (en) * 2018-01-30 2018-07-27 上海连尚网络科技有限公司 A kind of processing method of application, equipment and computer storage media

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100037317A1 (en) * 2008-08-06 2010-02-11 Jeong Wook Oh Mehtod and system for security monitoring of the interface between a browser and an external browser module
CN101706796A (en) * 2008-11-14 2010-05-12 北京搜狗科技发展有限公司 Method and device for showing webpage resources
CN102314510A (en) * 2011-09-15 2012-01-11 奇智软件(北京)有限公司 Method and system for executing browser control
CN102436507A (en) * 2011-12-28 2012-05-02 奇智软件(北京)有限公司 Method and device for browsing web pages
CN103077047A (en) * 2012-12-25 2013-05-01 北京奇虎科技有限公司 Plug-in playback method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100037317A1 (en) * 2008-08-06 2010-02-11 Jeong Wook Oh Mehtod and system for security monitoring of the interface between a browser and an external browser module
CN101706796A (en) * 2008-11-14 2010-05-12 北京搜狗科技发展有限公司 Method and device for showing webpage resources
CN102314510A (en) * 2011-09-15 2012-01-11 奇智软件(北京)有限公司 Method and system for executing browser control
CN102436507A (en) * 2011-12-28 2012-05-02 奇智软件(北京)有限公司 Method and device for browsing web pages
CN103077047A (en) * 2012-12-25 2013-05-01 北京奇虎科技有限公司 Plug-in playback method and device

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
DALE ROGERSON: "《COM技术内幕-微软组件对象模型》", 31 March 1999, 清华大学出版社 *
SHIPFI: "COM程序的简单实现(COM技术内幕笔记之一)", 《HTTP://WWW.CNBLOGS.COM/SHIPFI/ARCHIVE/2007/02/07/643829.HTML》 *
佚名: "详解主流浏览器多进程架构:Chrome、IE", 《HTTP://WWW.CNBETA.COM/ARTICLES/109595.HTM》 *

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014101486A1 (en) * 2012-12-25 2014-07-03 北京奇虎科技有限公司 Method and device for playing plug-in in browser
CN103077047A (en) * 2012-12-25 2013-05-01 北京奇虎科技有限公司 Plug-in playback method and device
CN103077047B (en) * 2012-12-25 2016-08-03 北京奇虎科技有限公司 A kind of plug-in playback method and device
CN103226477B (en) * 2013-05-21 2016-12-28 成都云朵技术有限公司 A kind of method and system strengthening flash video image quality in WebBrowser
CN103226477A (en) * 2013-05-21 2013-07-31 北京暴风科技股份有限公司 Method and system for enhancing flash video picture quality in Web Browser
CN103488967A (en) * 2013-10-14 2014-01-01 张祖锋 Visible light or infrared positioning based cabinet management system and method
CN103488967B (en) * 2013-10-14 2016-08-10 张祖锋 A kind of based on visible ray or the Cabinet administration system of infrared location and method
CN103914327A (en) * 2014-04-25 2014-07-09 广东威创视讯科技股份有限公司 Plug-in loading method and plug-in loading module
CN104268019A (en) * 2014-09-23 2015-01-07 广州金山网络科技有限公司 Software operating method and device and terminal
CN104268019B (en) * 2014-09-23 2018-04-27 广州猎豹网络科技有限公司 A kind of software running method, device and terminal
CN105630507A (en) * 2015-12-29 2016-06-01 Tcl集团股份有限公司 Method and device for drawing WebView control interface
CN105630507B (en) * 2015-12-29 2020-01-24 Tcl集团股份有限公司 WebView control interface drawing method and device
CN108334779A (en) * 2018-01-30 2018-07-27 上海连尚网络科技有限公司 A kind of processing method of application, equipment and computer storage media
WO2019149150A1 (en) * 2018-01-30 2019-08-08 上海连尚网络科技有限公司 Application processing method and device, and computer storage medium
CN108334779B (en) * 2018-01-30 2023-11-21 上海连尚网络科技有限公司 Application processing method, device and computing storage medium

Also Published As

Publication number Publication date
CN103064680B (en) 2016-08-03

Similar Documents

Publication Publication Date Title
CN103064680A (en) Plug-in playing method and device in browser
CN103246578A (en) Method and browser for processing collapse of application software
CN103034517A (en) Method and device for loading browser control tool
CN102890724A (en) Webpage loading method and device
CN103019538A (en) Method and system for implementing application interface in terminal
CN103577552A (en) Webpage picture processing method and device
CN102999336A (en) Application interface realizing method and application interface realizing system
CN103077047A (en) Plug-in playback method and device
CN103226474A (en) Method, device and system for interaction between webpage script and browser program
CN103034518A (en) Method and browser for loading browser control tool
CN102999578A (en) Method and device for processing page element
CN102915366A (en) Method and device for loading webpage on browser
CN102999579A (en) Browser for processing page textbox, and method for processing page textbox element
TW201804340A (en) Method and device for generating script
WO2015080903A1 (en) Systems and methods for executing aspects of a document
CN103309752A (en) Method and system for communication between components and communication processor
CN102981848A (en) Webpage main body element processing browser and method
CN110727429A (en) Front-end page generation method, device and equipment
CN110262749B (en) Webpage operation method, device, container, equipment and medium
CN103034723A (en) Page presenting method and equipment
CN102929953A (en) Webpage picture display device and method
CN103034503B (en) A kind of script execution, system and browser
CN102880382A (en) Interface display system, method and equipment
CN104182229A (en) Callback display method and device and callback method and device
CN103559097A (en) Inter-process communication method and device in browser and browser

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

Effective date of registration: 20220721

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.

TR01 Transfer of patent right