CN103077047A - Plug-in playback method and device - Google Patents

Plug-in playback method and device Download PDF

Info

Publication number
CN103077047A
CN103077047A CN2012105716606A CN201210571660A CN103077047A CN 103077047 A CN103077047 A CN 103077047A CN 2012105716606 A CN2012105716606 A CN 2012105716606A CN 201210571660 A CN201210571660 A CN 201210571660A CN 103077047 A CN103077047 A CN 103077047A
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
CN2012105716606A
Other languages
Chinese (zh)
Other versions
CN103077047B (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 CN201210571660.6A priority Critical patent/CN103077047B/en
Publication of CN103077047A publication Critical patent/CN103077047A/en
Application granted granted Critical
Publication of CN103077047B publication Critical patent/CN103077047B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention discloses a plug-in playback method and device. The device comprises an establishing module, a calculating module and a playback module, wherein the establishing module is configured to establish an independent process different from a page process when a first plug-in is loaded and activated, and load and activate a second plug-in in the independent process, wherein the second plug-in copies the information of the first plug-in; the calculating module is configured in the independent process to calculate the information of the second plug-in; the playback module is configured to play the second plug-in in a draw way in a playback window according to the calculated result, wherein the establishing module is further configured to generate a first plug-in object for the first plug-in the page process, generate a second plug-in object for the second plug-in in the independent process, utilize the second plug-in object and the first plug-in object to perform interactive communication so as to obtain the information of the first plug-in, and utilize the second plug-in object to send the information of the first plug-in to the second plug-in. By adopting the technical scheme provided by the invention, the stability of a browser can be improved.

Description

A kind of plug-in unit player method and device
Technical field
The present invention relates to the network application field, be specifically related to a kind of plug-in unit player method and device.
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 in order to provide a kind of plug-in unit playing device that overcomes the problems referred to above or address the above problem at least in part and corresponding plug-in unit player method.
According to one aspect of the present invention, a kind of plug-in unit player method 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;
Wherein, described the second plug-in unit information of copying described the first plug-in unit comprises:
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, a kind of plug-in unit playing device 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;
Wherein, 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 plug-in unit player method that the embodiment of the invention provides can under the prerequisite that does not affect result of broadcast, improve the stability of browser execution.
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 according to an embodiment of the invention processing flow chart of plug-in unit player method;
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 according to an embodiment of the invention structural representation of plug-in unit playing device.
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 a kind of plug-in unit player method, 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 according to an embodiment of the invention processing flow chart of plug-in unit player method.Referring to Fig. 1, the plug-in unit player method comprises that step S102 is to step S106.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 plug-in unit player method that the embodiment of the invention provides can under the prerequisite that does not affect result of broadcast, improve the stability of browser execution.
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 plug-in unit player method that the embodiment of the invention provides can be realized two-way communication, 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, now operates to example with the flash plug-in unit in page process, and the plug-in unit player method that the embodiment of the invention is provided is specifically described.
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 N ULL 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 a kind of plug-in unit playing device, can realize the plug-in unit player method of above-mentioned any one preferred embodiment.Fig. 5 shows the according to an embodiment of the invention structural representation of plug-in unit playing device.Referring to Fig. 5, the plug-in unit playing device comprises at least:
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 plug-in unit playing device can also comprise informs module 504.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 plug-in unit player method and the device that adopt the embodiment of the invention to provide can reach following beneficial effect:
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 plug-in unit player method that the embodiment of the invention provides can under the prerequisite that does not affect result of broadcast, improve the stability of browser execution.
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 plug-in unit playing device 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 (18)

1. plug-in unit player method 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;
Wherein, described the second plug-in unit information of copying described the first plug-in unit comprises:
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.
2. method according to claim 1,
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.
3. method according to claim 1 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.
4. according to claim 1 to 3 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.
5. according to claim 1 to 4 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.
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 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.
7. according to claim 5 or 6 described methods, described newly-built broadcast window can move or convergent-divergent at browser.
8. method according to claim 6 also comprises:
When page process was initiated to obtain the request of broadcast window, detached process informed that page process is without broadcast window.
9. according to claim 1 to 8 each described methods, described the first plug-in unit and/or described the second plug-in unit are the ActiveX plug-in unit.
10. plug-in unit playing device 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;
Wherein, 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.
11. device according to claim 10, 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.
12. device according to claim 10, 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.
13. according to claim 10 to 12 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.
14. to 13 each described devices, described playing module also is configured to according to claim 10:
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.
15. to 14 each described devices, described playing module also is configured to according to claim 10:
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.
16. according to claim 14 or 15 described devices, described newly-built broadcast window can move or convergent-divergent is processed at browser.
17. device according to claim 15 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.
18. according to claim 10 to 17 each described devices, described the first plug-in unit and/or described the second plug-in unit are the ActiveX plug-in unit.
CN201210571660.6A 2012-12-25 2012-12-25 A kind of plug-in playback method and device Expired - Fee Related CN103077047B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210571660.6A CN103077047B (en) 2012-12-25 2012-12-25 A kind of plug-in playback method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210571660.6A CN103077047B (en) 2012-12-25 2012-12-25 A kind of plug-in playback method and device

Publications (2)

Publication Number Publication Date
CN103077047A true CN103077047A (en) 2013-05-01
CN103077047B CN103077047B (en) 2016-08-03

Family

ID=48153584

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210571660.6A Expired - Fee Related CN103077047B (en) 2012-12-25 2012-12-25 A kind of plug-in playback method and device

Country Status (1)

Country Link
CN (1) CN103077047B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103064680A (en) * 2012-12-25 2013-04-24 北京奇虎科技有限公司 Plug-in playing method and device in browser
CN106406998A (en) * 2016-09-28 2017-02-15 北京奇虎科技有限公司 Method and device for processing user interface
CN106933607A (en) * 2015-12-30 2017-07-07 五八同城信息技术有限公司 Plug-in component operation method and device
CN108762881A (en) * 2018-06-21 2018-11-06 广州酷狗计算机科技有限公司 Interface method for drafting, device, terminal and storage medium

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
CN103064680A (en) * 2012-12-25 2013-04-24 北京奇虎科技有限公司 Plug-in playing method and device in browser

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
CN103064680A (en) * 2012-12-25 2013-04-24 北京奇虎科技有限公司 Plug-in playing method and device in browser

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 (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103064680A (en) * 2012-12-25 2013-04-24 北京奇虎科技有限公司 Plug-in playing method and device in browser
CN103064680B (en) * 2012-12-25 2016-08-03 北京奇虎科技有限公司 The player method of plug-in unit and device in browser
CN106933607A (en) * 2015-12-30 2017-07-07 五八同城信息技术有限公司 Plug-in component operation method and device
CN106933607B (en) * 2015-12-30 2020-02-14 五八同城信息技术有限公司 Plug-in operation method and device
CN106406998A (en) * 2016-09-28 2017-02-15 北京奇虎科技有限公司 Method and device for processing user interface
CN108762881A (en) * 2018-06-21 2018-11-06 广州酷狗计算机科技有限公司 Interface method for drafting, device, terminal and storage medium
CN108762881B (en) * 2018-06-21 2021-02-12 广州酷狗计算机科技有限公司 Interface drawing method and device, terminal and storage medium

Also Published As

Publication number Publication date
CN103077047B (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
CN106649640B (en) Instant search method and device
CN103577552A (en) Webpage picture processing method and device
CN103019538A (en) Method and system for implementing application interface in terminal
CN103279517A (en) Webpage content showing method
CN103164541A (en) Image presentation method and equipment
CN103077047A (en) Plug-in playback method and device
CN102999336A (en) Application interface realizing method and application interface realizing system
CN103226474A (en) Method, device and system for interaction between webpage script and browser program
CN103019733A (en) Moving object execution method and system for browser and browser
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
CN103440107A (en) Method and device for processing touch operation of electronic device
CN103324734A (en) Method and device for webpage zooming on electronic equipment
TW201804340A (en) Method and device for generating script
CN102981848A (en) Webpage main body element processing browser and method
CN103019720A (en) Method and device for processing page in browser
CN102981846A (en) Method for treating password input box element and browser for treating the password input box element
CN110727429A (en) Front-end page generation method, device and equipment
CN103197972A (en) Method and device for browser plugin management, browser and plugin interactive system
CN103559097A (en) Inter-process communication method and device in browser and browser
CN103034723A (en) Page presenting method and equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20220718

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

Patentee after: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

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

Patentee before: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

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

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

Granted publication date: 20160803