CN105607928A - Supporting method for browser kernel and webpage display method and apparatus - Google Patents

Supporting method for browser kernel and webpage display method and apparatus Download PDF

Info

Publication number
CN105607928A
CN105607928A CN201510958618.3A CN201510958618A CN105607928A CN 105607928 A CN105607928 A CN 105607928A CN 201510958618 A CN201510958618 A CN 201510958618A CN 105607928 A CN105607928 A CN 105607928A
Authority
CN
China
Prior art keywords
browser
kernel
browser kernel
component
webpage
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
CN201510958618.3A
Other languages
Chinese (zh)
Other versions
CN105607928B (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 CN201510958618.3A priority Critical patent/CN105607928B/en
Publication of CN105607928A publication Critical patent/CN105607928A/en
Application granted granted Critical
Publication of CN105607928B publication Critical patent/CN105607928B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The present invention discloses a supporting method for a browser kernel, and a webpage display method and apparatus. The supporting method comprises: creating a browser component based on a first browser kernel; and when the browser component loads a kernel, redirecting the loaded kernel from the first browser kernel to a second browser kernel, wherein the second browser kernel cannot be called directly, and the first browser kernel and the second browser kernel at least have a same data input interface and a same data output interface. According to the supporting method and a supporting apparatus for the browser kernel disclosed by the present invention, the technical problem that webpage rendering cannot be carried out by using the browser kernel when there is a failure during calling the browser kernel is solved, and the browser component created based on the first browser kernel can be used as the second browser kernel to render the webpage, so that the technical effect that a convenient webpage browsing service is provided for users is reached, and support to the second browser kernel is realized.

Description

For the support method of browser kernel and display methods and the device of webpage
Technical field
The present invention relates to electronic technology field, relate in particular to a kind of support method and net for browser kernelDisplay methods and the device of page.
Background technology
Web browser is for the file in display web page server or archives economy and allows user more therewithA kind of software of file interaction, it is used for being presented at word, the image in WWW or local local networking etc.And other information, greatly facilitate user and obtain various information. And browser kernel is the weight of web browserWant part, be responsible for the explanation to webpage grammer and play up webpage, so browser kernel has determined to browseThe how content of display web page and the format information of the page of device.
A lot of browsers are played up webpage by the browser kernel that calls other, but there will be this browserKernel cannot invoked technical problem, thereby causes normally display web page of this browser. Micro-with the U.S.The browser kernel that soft company provides is example, and the web browser providing due to MS is that IE is clearLook at device (InternetExplorer, be called for short IE), its occupation rate of market is higher, so a lot of website providesWebpage all can normally be shown as target with IE browser, simultaneously due to the localization of IE browserPoor, thus the browser kernel that calls Microsoft and provide be provided play up third party's browser of webpage,Make user can browse easily various webpage information.
But, along with version updating, the browser kernel of web browser have been closed connecing of calling for third partyThe reasons such as mouth, other browsers there will be in the time calling browser kernel cannot invoked technical problem, thisCan cause other browsers to play up webpage with this browser kernel, then cannot carry to userFor web page browsing service easily.
Therefore, in prior art, exist browser to go wrong in the time calling browser kernel and cannot be clear with thisLook at and check the technical problem of the technical problem that webpage plays up in device.
Summary of the invention
The embodiment of the present invention is by providing a kind of support method for browser kernel and the demonstration side of webpageMethod and device, go wrong in the time calling browser kernel in order to solve the browser existing in prior artAnd the technical problem of the technical problem that cannot play up webpage with this browser kernel.
Embodiment of the present invention first aspect provides a kind of support method of browser kernel, comprising:
Create browser component based on the first browser kernel, described the first browser kernel can directly be adjustedWith;
In the time that described browser component loads kernel, the kernel of loading is reset by described the first browser kernelTo the second browser kernel, described the second browser kernel can not directly be called;
Wherein, at least to have identical data defeated for described the second browser kernel and described the first browser kernelIncoming interface and data output interface.
Alternatively, in the time of described browser component operation, described support method also comprises:
The user agent UA of described browser component is changed to consistent with described the second browser kernel, withMake the website of described browser component access send and be applicable to institute to described browser component according to described UAState the web data of the second browser kernel.
Alternatively, the described user agent UA by described browser component changes to described second and browsesDevice kernel is consistent, specifically comprises:
Monitor UA by Hook Function and obtain function, if described UA obtains function by process name acquiringThe UA of described browser component, generates the UA consistent with described the second browser kernel, and described in inciting somebody to actionThe UA consistent with described the second browser kernel sends to described UA to obtain function.
Alternatively, described based on the first browser kernel establishment browser component, specifically comprise:
Obtain the assembly coding of described the first browser;
Based on described assembly coding, create described browser component.
Alternatively, described the kernel of loading is redirected in the second browser by described the first browser kernelCore, specifically comprises:
By the loading Dynamic Link Library Function of Hook Function monitoring system, if described loading dynamic link library letterNumber calls described the first browser kernel, described the first browser kernel is redirected to described second and browsesDevice kernel.
Alternatively, described the first browser kernel can directly be called, and is specially: described the first browserThe assembly coding of kernel can be known by third party's browser, and described third party's browser can be based on describedThe assembly coding of the first browser kernel generates described browser component;
Described the second browser kernel can not directly be called, and is specially: described the second browser kernelThe second assembly coding can not be known by third party's browser.
Alternatively, described the first browser kernel is specially trident kernel, described the second browser kernel toolBody is Sparta's kernel.
Embodiment of the present invention second aspect is a kind of supportive device for browser kernel also, it is characterized in that,Comprise:
Creating unit, for creating browser component based on the first browser kernel, in described the first browserNuclear energy is enough directly to be called;
Be redirected unit, in the time that described browser component loads kernel, by the kernel loading by described theOne browser kernel is redirected to the second browser kernel, and described the second browser kernel can not directly be adjustedWith;
Wherein, at least to have identical data defeated for described the second browser kernel and described the first browser kernelIncoming interface and data output interface.
Alternatively, described supportive device also comprises:
User agent UA changing unit, in the time that described browser component moves, by described browser groupThe UA of part changes to consistent with described the second browser kernel, to make the net of described browser component accessStand and send the webpage number that is applicable to described the second browser kernel according to described UA to described browser componentAccording to.
Alternatively, described UA changing unit is obtained function specifically for monitoring UA by Hook Function, ifDescribed UA obtains function by the UA of browser component described in process name acquiring, generates and described theThe UA that two browser kernels are consistent, and the consistent UA of described and described the second browser kernel is sent toDescribed UA obtains function.
Alternatively, creating unit is encoded specifically for the assembly that obtains described the first browser, and based on describedAssembly coding, creates described browser component.
Alternatively, be redirected unit specifically for passing through the loading dynamic link library letter of Hook Function monitoring systemNumber, if described loading Dynamic Link Library Function is called described the first browser kernel, browses described firstDevice kernel is redirected to described the second browser kernel.
Alternatively, described the first browser kernel can directly be called, and is specially: described the first browserThe assembly coding of kernel can be known by third party's browser, and described third party's browser can be based on describedThe assembly coding of the first browser kernel generates described browser component;
Described the second browser kernel can not directly be called, and is specially: described the second browser kernelThe second assembly coding can not be known by third party's browser.
Alternatively, described the first browser kernel is specially trident kernel, described the second browser kernel toolBody is Sparta's kernel.
The embodiment of the present invention third aspect is a kind of display methods of webpage also, comprising:
Obtain the request of access of webpage;
Create browser component based on the first browser kernel, described the first browser kernel can directly be adjustedWith;
Access described webpage by described browser component, obtain the web data of described webpage;
In the time that described browser component is played up according to described web data, by the kernel loading by described theOne browser kernel is redirected to the second browser kernel, and wherein, described the second browser kernel can not be byDirectly call, it is defeated that described the second browser kernel and described the first browser kernel at least have identical dataIncoming interface and data output interface;
Show the webpage after playing up by described the second browser kernel.
Embodiment of the present invention fourth aspect also provides a kind of browser, comprising:
Acquisition request unit, for obtaining the request of access of webpage;
Creating unit, for creating browser component based on the first browser kernel, in described the first browserNuclear energy is enough directly to be called;
Web data acquiring unit, access described webpage by described browser component, obtains described webpageWeb data;
Be redirected unit, in the time that described browser component is played up according to described web data, will addThe kernel carrying is redirected to the second browser kernel by described the first browser kernel, wherein, described second clearThe device kernel of looking at can not directly be called, and described the second browser kernel and described the first browser kernel haveIdentical Data Input Interface and data output interface;
Display unit, for showing the webpage after playing up by described the second browser kernel.
One or more technical scheme in the embodiment of the present invention, at least has following technique effect or excellentPoint:
1, first based on the first browser kernel establishment browser component, then at this browser owing to having adoptedWhen assembly loads kernel, the technical side that this first browser kernel is redirected to the second browser kernelCase, has solved that browser goes wrong in the time calling browser kernel and cannot be with this browser kernel to webpageThe technical problem of playing up, make based on first browser kernel create browser component can be with secondBrowser kernel is played up webpage, thereby has realized the skill of the web page browsing service of providing convenience to userArt effect, has realized the support to the second browser kernel;
2, owing to having adopted, the user agent UA of described browser component is changed to described second and browsedThe technical scheme that device kernel is consistent, makes this browser component send to the UA of website to be and the second browserThe UA that kernel is consistent, has ensured that the web data that this browser receives is clear for being applicable to by second thenThe web data that the device kernel of looking at is played up, has realized the support to the second browser kernel further.
Brief description of the drawings
The flow chart of the support method of the browser kernel that Fig. 1 provides for the embodiment of the present invention;
The flow chart of the display methods of the webpage that Fig. 2 provides for the embodiment of the present invention;
The module map of the supportive device of the browser kernel that Fig. 3 provides for the embodiment of the present invention;
The module map of the browser that Fig. 4 provides for the embodiment of the present invention.
Detailed description of the invention
The embodiment of the present invention is by providing a kind of support method for browser kernel and the demonstration side of webpageMethod and device, go wrong in the time calling browser kernel in order to solve the browser existing in prior artAnd the technical problem that cannot play up webpage with this browser kernel.
The embodiment of the present invention provides a kind of support method of browser kernel, comprising:
First, create browser component based on the first browser kernel, the first browser kernel can be by directlyCall; The Trident of the IE browser that for example, the first browser kernel can provide for MSKernel, the Trident kernel trident kernel that is otherwise known as, this first browser kernel is can viewed device directCall and there will not be problem, thereby can create a browser component based on this first browser kernel(CLSID_WebBrowser assembly);
Then,, in the time that browser component loads kernel, the kernel loading is redirected by the first browser kernelTo the second browser kernel, wherein, the second browser kernel can not directly be called, in the second browserCore has identical Data Input Interface and data output interface with the first browser kernel, and for example, second is clearSparta (Spartan) kernel of the Edge browser that the device kernel of looking at provides for MS, EdgeThe browser border browser that is otherwise known as, this Sparta's kernel does not provide interface (to refer to remove to other browsersBrowser beyond Edge browser) use, other browsers also just cannot directly call in SpartaCore comes to user's displayed web page, and the method that the embodiment of the present application provides first creates based on the first browser kernelBrowser component, then, in this browser component operation, is redirected to this first browser kernelThe second browser kernel, the second browser kernel and the first browser kernel have identical data input simultaneouslyInterface and data output interface, make this browser component to carry out wash with watercolours to webpage with the second browser kernelDye, thereby the technique effect of the web page browsing that realization is provided convenience to user service is realized like this to secondThe support of browser kernel.
Can find out by above-mentioned part, first based on the first browser kernel establishment browser group owing to having adoptedPart, then, when this browser component loads kernel, is redirected to second by this first browser kernelThe technical scheme of browser kernel, has solved that browser goes wrong in the time calling browser kernel and cannot be withThe technical problem that this browser kernel is played up webpage, make based on first browser kernel create clearThe device assembly of looking at can be played up webpage with the second browser kernel, provides convenience thereby realized to userThe technique effect of web page browsing service, realized the support to the second browser kernel.
In ensuing part, in connection with accompanying drawing and detailed description of the invention, introduce in detail above-mentioned technologyScheme.
Please refer to Fig. 1, the flow chart of the support method of the browser kernel that Fig. 1 provides for the embodiment of the present invention,As shown in Figure 1, the method comprises:
S1: create browser component based on the first browser kernel, the first browser kernel can directly be adjustedWith;
S2: in the time that browser component loads kernel, the kernel of loading is redirected to by the first browser kernelThe second browser kernel, the second browser kernel can not directly be called;
Wherein, the second browser kernel has identical Data Input Interface and data with the first browser kernelOutput interface.
In the present embodiment, be the first browser kernel by the Trident kernel taking IE browser, Edge is clearThe Spartan kernel of device look at is that the second browser kernel is example, carries out detailed introducing for example.
Specifically, in the present embodiment, the first browser kernel can directly be called, also first clearThe assembly coding of device kernel look at can be known by third party's browser, and third party's browser can be based on firstThe assembly coding of browser kernel generates browser component, and the assembly coding of for example Trident kernel can be notedVolume is in system, so third party's browser (referring to the browser except Edge browser) canAssembly coding by Trident kernel generates browser component, completes the webpage of needs access is carried out to wash with watercoloursThe action of dying, thereby the web page browsing service that can provide convenience to user; And the second browser kernel can notEnough directly called, also the second assembly coding of the second browser kernel can not be obtained by third party's browserKnow, for example Spartan kernel is not registered to the assembly coding of oneself in system, so Spartan kernelConcerning third party's browser, be the equal of non-existent, third party's browser cannot be known Spartan kernelAssembly coding, also just directly call Spartan kernel, specifically, third party's browser needs first existIn system, search the assembly coding of Spartan kernel, as in WINDOWS system, assembly coding is concreteFor CLSID (English: classid; Chinese: type coding), can create and browse by this CLSIDDevice assembly is also played up corresponding webpage, and Spartan kernel does not provide to system or third party's browserCLSID, third party's browser just cannot utilize the CLSID of Spartan kernel to create browser group like thisPart, so third party's browser also just cannot call Spartan kernel, also just cannot be with this browser kernelWebpage is played up and shown corresponding webpage to user.
In S1, because Trident kernel can directly be called, so the equal energy of any third party's browserEnough call Trident kernel and play up corresponding webpage, in the present embodiment, create based on Trident kernelThe detailed process of browser component is as follows:
First, obtain the assembly coding of Trident kernel; Because Trident kernel can directly be called,So can encode to the assembly of Trident kernel by the registry query of system, at WINDOWS beIn system, this assembly coding is specially CLSID, certainly, in other embodiments, as in LINUX systemIn lower or IOS system, assembly coding is specifically as follows GUID (English: GloballyUniqueIdentifier; Be called for short: GUID), just repeated no more at this.
Then, can, based on this assembly coding, create browser component; Specifically, with object embeddingWith link (English: ObjectLinkingandEmbedding; Be called for short: Ole) programming technique is example, canTo pass through a browser component of OleCreate function creation (CLSID_WebBrowser), this browserAssembly is the browser component that always uses Trident kernel under WINDOWS system.
After creating browser component by S1 based on the first browser kernel, the embodiment of the present invention providesThe support method of browser kernel enter S2, that is: in the time that browser component loads kernel, in loadingCore is redirected to the second browser kernel by the first browser kernel, and the second browser kernel can not be by directlyCall, wherein, the second browser kernel has identical Data Input Interface and number with the first browser kernelAccording to output interface.
In S2, specifically, in the present embodiment, can be in the time creating browser component, just logicalLoading dynamic link library (loadlibrary) function of crossing Hook Function (hook) monitoring system is also hookLive the loadlibrary function of system, like this, in loadlibrary function call Trident kernel,Be redirected to Spartan kernel by Trident kernel. Specifically be, that Hook Function is at loadlibraryWhen function loads mshtml.dll file corresponding to Trident kernel, mshtml.dll is redirected toEdgehtml.dll, is redirected to Spartan kernel thereby completed by Trident kernel. Trident kernel andSpartan kernel has identical Data Input Interface and data output interface, refers to the net sending for websitePage data, this web data, after Data Input Interface is input to Trident kernel, can pass throughData output interface is exported the webpage after Trident kernel is played up, same, and this web data is through numberBe input to after Spartan kernel according to input interface, can export process by data output interface equallyWebpage after Spartan kernel is played up.
Like this, the browser component creating based on Trident kernel just can enter webpage by Spartan kernelRow is played up, thereby can provide the webpage of playing up through Spartan kernel to user, has realized to user and having carriedFor the technique effect of the service of web page browsing easily, realize the support to Spartan kernel. In this enforcementIn example, for Trident kernel, Spartan kernel has better performance, as CPU usageFast and the EMS memory occupation of lower, webpage rendering speed is lower etc., thereby can provide better net for userPage browsing service.
By the introduction of the present embodiment, in other embodiments, during according to browser kernel, browser executionThe difference of system, programming software and other concrete conditions, the technical staff under this area can basisActual conditions, select suitable mode, and the first browser kernel is redirected to the second browser kernel,To meet the needs of actual conditions, just repeat no more at this.
In specific implementation process, in the time that browser component moves, the support method that the embodiment of the present invention providesAlso comprise: the user agent UA of browser component is changed to consistent with the second browser kernel.
Specifically, user agent's (English: UserAgent; Be called for short UA) refer to be widely used for markBrowser information, for example browser brand, browser version, browser kernel and place operating system environmentEtc., with the website that makes browser component access according to UA to browser component send be applicable to second clearLook at the web data of device kernel.
In the present embodiment, passing through for fear of the browser component creating based on Trident kernelWhen Spartan kernel is played up webpage, the web data of acquisition is to be applicable to the net that Trident kernel is played up, may there is compatible problem in page data, for example browser component display web page cannot be resolved etc.,So the UA of this browser component need to be changed to consistent with Spartan kernel.
Specifically, browser component, in the website at accessed web page place, can be sent out the UA of oneselfGive website, in the present embodiment, can monitor UA by Hook Function and obtain function, this UA obtainsGet function as being header function, if this header function is raw by the process title of browser componentBecome UA, now can generate a UA consistent with Spartan kernel, and fed back to UA and obtainGet function as header function, then, in this browser component accessed web page, header function willThis UA consistent with Spartan kernel is sent to the website that this webpage is corresponding, and like this, this website canAccording to the UA consistent with Spartan kernel receiving, send and be applicable to Spartan to this browser componentThe web data that kernel is played up, plays up by Spartan kernel thereby be convenient to this browser componentAnd show user.
Certainly, it should be noted that, in the present embodiment, it is that header function is only that UA obtains functionOne in other embodiments, UA obtains function can be adjusted into other functions according to actual needs for example,Do not limit at this.
Can find out by above-mentioned part, owing to having adopted the user agent UA by browser component to change toThe technical scheme consistent with the second browser kernel, make UA that this browser component sends to website forThe UA that the second browser kernel is consistent, has ensured that web data that this browser receives is for being applicable to thenThe web data of playing up by the second browser kernel, has realized further to the second browser kernelSupport.
It should be noted that, in the present embodiment, the loading Dynamic Link Library Function of system is monitoredHook Function and UA is obtained to the Hook Function that function monitors can be two independently Hook Functions,Also two subprocess under can a Hook Function, do not limit at this.
The embodiment of the present invention also provides a kind of display methods of webpage, please refer to Fig. 2, and Fig. 2 is that the present invention is realThe flow chart of executing the display methods of the webpage that example provides, as shown in Figure 2, the method comprises:
S1: the request of access of obtaining webpage; For example, user inputs the address of a webpage, the ground of this webpageLocation is www.xxxx.com/a.html, in the present embodiment, sets the web data of this webpage for being applicable toThe webpage of playing up as Spartan kernel by the second browser kernel.
S2: create browser component based on the first browser kernel, the first browser kernel can directly be adjustedWith; Specifically, can first find the first browser kernel as the assembly of Trident kernel in systemCoding, it is CLSID that this assembly is coded in WINDOWS system, thereby creates clear according to this CLSIDLook at device assembly;
S3: by browser component accessed web page, obtain the web data of webpage; Also, in S2The browser component generating sends request of access to the website at webpage place, and the server at this place, website canThe web data of this webpage is sent to browser component, thereby obtained the web data of this webpage;
S4: in the time that browser component is played up according to web data, by load kernel by the first browserKernel is redirected to the second browser kernel, and wherein, the second browser kernel can not directly be called, theTwo browser kernels have identical Data Input Interface and data output interface with the first browser kernel; ToolBody, is obtaining after web data by S3, and it is right that browser component can call according to web dataThe browser kernel of answering is played up, because browser component creates based on the first browser kernel, and instituteNow can load the first browser kernel, but the display methods that the present embodiment provides can by load kernel byThe first browser kernel is redirected to the second browser kernel as Spartan kernel, like this as Trident kernelCan play up by checking this webpage in Spartan, concrete redirection process is in the invention processThe support method for browser kernel that example is introduced is described in detail, just no longer superfluous at thisState;
S5: show the webpage after playing up by the second browser kernel; Specifically, in S4 by theTwo browser kernels can obtain the second browser kernel and enter after playing up according to the web data obtainingWebpage after row is played up, because the web data of this webpage is played up for being applicable to the second browser kernel, so display effect is better, there will not be as shown mess code, demonstration " this webpage cannot be shown " etc.Problem, has realized the technique effect of the web page browsing service of providing convenience to user, has realized and having browsed secondThe support of device kernel.
The embodiment of the present invention also provides a kind of supportive device of browser kernel, please refer to Fig. 3, and Fig. 3 is thisThe module map of the supportive device of the browser kernel that inventive embodiments provides, as shown in Figure 3, this supportive deviceComprise:
Creating unit 201, for creating browser component based on the first browser kernel, in the first browserNuclear energy is enough directly to be called;
Be redirected unit 202, in the time that browser component loads kernel, by clear by first the kernel loadingThe device kernel of looking at is redirected to the second browser kernel, and the second browser kernel can not directly be called; Wherein,The second browser kernel has identical Data Input Interface and data output interface with the first browser kernel.
In specific implementation process, supportive device also comprises:
User agent UA changing unit 203, in the time that browser component moves, by browser componentUA changes to consistent with the second browser kernel, with the website that makes browser component access according to UA toBrowser component sends the web data that is applicable to the second browser kernel.
In specific implementation process, UA changing unit 203 obtains specifically for monitoring UA by Hook FunctionGet function, if UA obtains function by the UA of process name acquiring browser component, generate and secondThe UA that browser kernel is consistent, and send to UA to obtain letter the UA consistent with the second browser kernelNumber.
In specific implementation process, creating unit 201 is encoded specifically for the assembly that obtains the first browser,And based on assembly coding, create browser component.
In specific implementation process, be redirected unit 202 specifically for adding by Hook Function monitoring systemCarry Dynamic Link Library Function, call the first browser kernel if load Dynamic Link Library Function, clear by firstThe device kernel of looking at is redirected to the second browser kernel.
In specific implementation process, the first browser kernel can directly be called, and is specially: first browsesThe assembly coding of device kernel can be known by third party's browser, and third party's browser can be clear based on firstThe assembly coding of device kernel look at generates browser component;
The second browser kernel can not directly be called, and is specially: the second assembly of the second browser kernelCoding can not be known by third party's browser.
In specific implementation process, the first browser kernel is specially trident kernel, the second browser kernelBe specially Sparta's kernel.
In actual applications, on the one hand, the supportive device of the browser kernel that the embodiment of the present invention provides is passableBe an independent program or software, utilize the supportive device of the browser kernel that the embodiment of the present invention providesCan realize the support to the second browser kernel, thereby show and undertaken by the second browser kernel to userThe webpage of playing up, on the other hand, the supportive device of the browser kernel that the embodiment of the present invention provides can be alsoA module of third party's browser, ensures that this third party's browser can be based on the second browser kernelPlay up webpage and show to user, thereby realizing the compatible technique effect that improves third party's browser.
The support method of the supportive device of the browser kernel that the embodiment of the present invention provides and browser kernel isTwo aspects of same invention, have described the support method of browser kernel in the aforementioned embodiment in detailProcessing procedure, by the introduction of the support method to browser kernel, the technical staff's energy under this areaEnough recognize the processing procedure of the supportive device of browser kernel, in this case description succinct, to browsingThe supportive device of device kernel just no longer describes in detail.
The embodiment of the present invention also provides a kind of browser, please refer to Fig. 4, and Fig. 4 provides for the embodiment of the present inventionThe module map of browser, as shown in Figure 4, this browser comprises:
Acquisition request unit 401, for obtaining the request of access of webpage;
Creating unit 402, for creating browser component based on the first browser kernel, in the first browserNuclear energy is enough directly to be called;
Web data acquiring unit 403, by browser component accessed web page, obtains the web data of webpage;
Be redirected unit 404, in the time that browser component is played up according to web data, by what loadKernel is redirected to the second browser kernel by the first browser kernel, and the second browser kernel can not be by directlyConnect and call, wherein, the second browser kernel and the first browser kernel have identical Data Input Interface withData output interface;
Display unit 405, for showing the webpage after playing up by the second browser kernel.
Two aspects that the browser that the embodiment of the present invention provides and the display methods of webpage are same invention,In previous embodiment, describe the processing procedure of the display methods of webpage in detail, by the demonstration side of webpageThe introduction of method, the technical staff under this area can recognize the processing procedure of browser, in this case sayBright book succinct, just no longer describes in detail browser.
One or more technical scheme in the embodiment of the present invention, at least has following technique effect or excellentPoint:
1, first based on the first browser kernel establishment browser component, then at this browser owing to having adoptedWhen assembly loads kernel, the technical side that this first browser kernel is redirected to the second browser kernelCase, has solved that browser goes wrong in the time calling browser kernel and cannot be with this browser kernel to webpageThe technical problem of playing up, make based on first browser kernel create browser component can be with secondBrowser kernel is played up webpage, thereby has realized the skill of the web page browsing service of providing convenience to userArt effect, has realized the support to the second browser kernel;
2, owing to having adopted, the user agent UA of described browser component is changed to described second and browsedThe technical scheme that device kernel is consistent, makes this browser component send to the UA of website to be and the second browserThe UA that kernel is consistent, has ensured that the web data that this browser receives is clear for being applicable to by second thenThe web data that the device kernel of looking at is played up, has realized the support to the second browser kernel further.
The invention discloses:
A1, a kind of support method for browser kernel, is characterized in that, comprising:
Create browser component based on the first browser kernel, described the first browser kernel can directly be adjustedWith;
In the time that described browser component loads kernel, the kernel of loading is reset by described the first browser kernelTo the second browser kernel, described the second browser kernel can not directly be called;
Wherein, at least to have identical data defeated for described the second browser kernel and described the first browser kernelIncoming interface and data output interface.
A2, support method as described in A1, is characterized in that, in the time of described browser component operation, and instituteStating support method also comprises:
The user agent UA of described browser component is changed to consistent with described the second browser kernel, withMake the website of described browser component access send and be applicable to institute to described browser component according to described UAState the web data of the second browser kernel.
A3, support method as described in A2, is characterized in that, described by the use of described browser componentFamily is acted on behalf of UA and is changed to unanimously with described the second browser kernel, specifically comprises:
Monitor UA by Hook Function and obtain function, if described UA obtains function by process name acquiringThe UA of described browser component, generates the UA consistent with described the second browser kernel, and described in inciting somebody to actionThe UA consistent with described the second browser kernel sends to described UA to obtain function.
A4, support method as described in A1, is characterized in that, describedly creates based on the first browser kernelBrowser component, specifically comprises:
Obtain the assembly coding of described the first browser;
Based on described assembly coding, create described browser component.
A5, support method as described in A1, is characterized in that, described by the kernel loading by described firstBrowser kernel is redirected to the second browser kernel, specifically comprises:
By the loading Dynamic Link Library Function of Hook Function monitoring system, if described loading dynamic link library letterNumber calls described the first browser kernel, described the first browser kernel is redirected to described second and browsesDevice kernel.
A6, support method as described in arbitrary claim in A1-A5, is characterized in that, described first browsesDevice kernel can directly be called, and is specially: the assembly coding of described the first browser kernel can be by the 3rdSide's browser is known, and described third party's browser can be encoded based on the assembly of described the first browser kernelGenerate described browser component;
Described the second browser kernel can not directly be called, and is specially: described the second browser kernelThe second assembly coding can not be known by third party's browser.
A7, support method as described in arbitrary claim in A1-A5, is characterized in that, described first browsesDevice kernel is specially trident kernel, and described the second browser kernel is specially Sparta's kernel.
8, for a supportive device for browser kernel, it is characterized in that, comprising:
Creating unit, for creating browser component based on the first browser kernel, in described the first browserNuclear energy is enough directly to be called;
Be redirected unit, in the time that described browser component loads kernel, by the kernel loading by described theOne browser kernel is redirected to the second browser kernel, and described the second browser kernel can not directly be adjustedWith;
Wherein, at least to have identical data defeated for described the second browser kernel and described the first browser kernelIncoming interface and data output interface.
B9, supportive device as described in B8, is characterized in that, described supportive device also comprises:
User agent UA changing unit, in the time that described browser component moves, by described browser groupThe UA of part changes to consistent with described the second browser kernel, to make the net of described browser component accessStand and send the webpage number that is applicable to described the second browser kernel according to described UA to described browser componentAccording to.
B10, supportive device as described in B9, is characterized in that, described UA changing unit is specifically for logicalCross Hook Function monitoring UA and obtain function, if described UA obtains function by clear described in process name acquiringLook at the UA of device assembly, generate the UA consistent with described the second browser kernel, and by described and described inThe consistent UA of the second browser kernel sends to described UA to obtain function.
B11, supportive device as described in B8, is characterized in that, creating unit is specifically for obtaining describedThe assembly coding of one browser, and based on described assembly coding, create described browser component.
B12, supportive device as described in B8, is characterized in that, is redirected unit specifically for passing through hookThe loading Dynamic Link Library Function of subfunction monitoring system, if described in described loading Dynamic Link Library Function callsThe first browser kernel, is redirected to described the second browser kernel by described the first browser kernel.
B13, supportive device as described in arbitrary claim in B8-B12, is characterized in that, described first clearThe device kernel of looking at can directly be called, and is specially: the assembly of described the first browser kernel coding can be by theTripartite's browser is known, and described third party's browser can be compiled based on the assembly of described the first browser kernelCode generates described browser component;
Described the second browser kernel can not directly be called, and is specially: described the second browser kernelThe second assembly coding can not be known by third party's browser.
B14, supportive device as described in arbitrary claim in B8-B12, is characterized in that, described first clearThe device kernel of looking at is specially trident kernel, and described the second browser kernel is specially Sparta's kernel.
The display methods of C15, a kind of webpage, is characterized in that, comprising:
Obtain the request of access of webpage;
Create browser component based on the first browser kernel, described the first browser kernel can directly be adjustedWith;
Access described webpage by described browser component, obtain the web data of described webpage;
In the time that described browser component is played up according to described web data, by the kernel loading by described theOne browser kernel is redirected to the second browser kernel, and wherein, described the second browser kernel can not be byDirectly call, it is defeated that described the second browser kernel and described the first browser kernel at least have identical dataIncoming interface and data output interface;
Show the webpage after playing up by described the second browser kernel.
D16, a kind of browser, is characterized in that, comprising:
Acquisition request unit, for obtaining the request of access of webpage;
Creating unit, for creating browser component based on the first browser kernel, in described the first browserNuclear energy is enough directly to be called;
Web data acquiring unit, access described webpage by described browser component, obtains described webpageWeb data;
Be redirected unit, in the time that described browser component is played up according to described web data, will addThe kernel carrying is redirected to the second browser kernel by described the first browser kernel, wherein, described second clearThe device kernel of looking at can not directly be called, and described the second browser kernel and described the first browser kernel haveIdentical Data Input Interface and data output interface;
Display unit, for showing the webpage after playing up by described the second browser kernel.
Those skilled in the art should understand, embodiments of the invention can be provided as method, system or meterCalculation machine program product. Therefore, the present invention can adopt complete hardware implementation example, completely implement software example or knotClose the form of the embodiment of software and hardware aspect. And the present invention can adopt at one or more wherein bagsThe computer-usable storage medium that contains computer usable program code (include but not limited to magnetic disc store,CD-ROM, optical memory etc.) form of the upper computer program of implementing.
The present invention is that reference is according to the method for the embodiment of the present invention, equipment (system) and computer program productThe flow chart of product and/or block diagram are described. Should understand can be by computer program instructions realization flow figure and/ or block diagram in each flow process and/or flow process in square frame and flow chart and/or block diagram and/Or the combination of square frame. Can provide these computer program instructions to all-purpose computer, special-purpose computer, embeddingThe processor of formula processor or other programmable data processing device, to produce a machine, makes by calculatingThe instruction that the processor of machine or other programmable data processing device is carried out produces for realizing at flow chart oneThe device of the function of specifying in square frame of individual flow process or multiple flow process and/or block diagram or multiple square frame.
These computer program instructions also can be stored in energy vectoring computer or other programmable data processing are establishedIn the standby computer-readable memory with ad hoc fashion work, make to be stored in this computer-readable memoryInstruction produce and comprise the manufacture of command device, this command device is realized in flow process or multiple of flow chartThe function of specifying in square frame of flow process and/or block diagram or multiple square frame.
These computer program instructions also can be loaded in computer or other programmable data processing device, makeMust on computer or other programmable devices, carry out sequence of operations step to produce computer implemented placeReason, thus the instruction of carrying out on computer or other programmable devices is provided for realizing one of flow chartThe step of the function of specifying in square frame of flow process or multiple flow process and/or block diagram or multiple square frame.
Obviously, those skilled in the art can carry out various changes and modification and not depart from this present inventionBright spirit and scope. Like this, if of the present invention these amendment and modification belong to the claims in the present invention andWithin the scope of its equivalent technologies, the present invention be also intended to comprise these change and modification interior.

Claims (10)

1. for a support method for browser kernel, it is characterized in that, comprising:
Create browser component based on the first browser kernel, described the first browser kernel can directly be adjustedWith;
In the time that described browser component loads kernel, the kernel of loading is reset by described the first browser kernelTo the second browser kernel, described the second browser kernel can not directly be called;
Wherein, at least to have identical data defeated for described the second browser kernel and described the first browser kernelIncoming interface and data output interface.
2. support method as claimed in claim 1, is characterized in that, in described browser component operationTime, described support method also comprises:
The user agent UA of described browser component is changed to consistent with described the second browser kernel, withMake the website of described browser component access send and be applicable to institute to described browser component according to described UAState the web data of the second browser kernel.
3. support method as claimed in claim 2, is characterized in that, described by described browser componentUser agent UA change to unanimously with described the second browser kernel, specifically comprise:
Monitor UA by Hook Function and obtain function, if described UA obtains function by process name acquiringThe UA of described browser component, generates the UA consistent with described the second browser kernel, and described in inciting somebody to actionThe UA consistent with described the second browser kernel sends to described UA to obtain function.
4. support method as claimed in claim 1, is characterized in that, described based in the first browserCore creates browser component, specifically comprises:
Obtain the assembly coding of described the first browser;
Based on described assembly coding, create described browser component.
5. support method as claimed in claim 1, is characterized in that, described by load kernel by instituteState the first browser kernel and be redirected to the second browser kernel, specifically comprise:
By the loading Dynamic Link Library Function of Hook Function monitoring system, if described loading dynamic link library letterNumber calls described the first browser kernel, described the first browser kernel is redirected to described second and browsesDevice kernel.
6. the support method as described in arbitrary claim in claim 1-5, is characterized in that, described firstBrowser kernel can directly be called, and is specially: the assembly of described the first browser kernel coding can be byThird party's browser knows, and the assembly that described third party's browser can be based on described the first browser kernelCoding generates described browser component;
Described the second browser kernel can not directly be called, and is specially: described the second browser kernelThe second assembly coding can not be known by third party's browser.
7. the support method as described in arbitrary claim in claim 1-5, is characterized in that, described firstBrowser kernel is specially trident kernel, and described the second browser kernel is specially Sparta's kernel.
8. for a supportive device for browser kernel, it is characterized in that, comprising:
Creating unit, for creating browser component based on the first browser kernel, in described the first browserNuclear energy is enough directly to be called;
Be redirected unit, in the time that described browser component loads kernel, by the kernel loading by described theOne browser kernel is redirected to the second browser kernel, and described the second browser kernel can not directly be adjustedWith;
Wherein, at least to have identical data defeated for described the second browser kernel and described the first browser kernelIncoming interface and data output interface.
9. a display methods for webpage, is characterized in that, comprising:
Obtain the request of access of webpage;
Create browser component based on the first browser kernel, described the first browser kernel can directly be adjustedWith;
Access described webpage by described browser component, obtain the web data of described webpage;
In the time that described browser component is played up according to described web data, by the kernel loading by described theOne browser kernel is redirected to the second browser kernel, and wherein, described the second browser kernel can not be byDirectly call, it is defeated that described the second browser kernel and described the first browser kernel at least have identical dataIncoming interface and data output interface;
Show the webpage after playing up by described the second browser kernel.
10. a browser, is characterized in that, comprising:
Acquisition request unit, for obtaining the request of access of webpage;
Creating unit, for creating browser component based on the first browser kernel, in described the first browserNuclear energy is enough directly to be called;
Web data acquiring unit, access described webpage by described browser component, obtains described webpageWeb data;
Be redirected unit, in the time that described browser component is played up according to described web data, will addThe kernel carrying is redirected to the second browser kernel by described the first browser kernel, wherein, described second clearThe device kernel of looking at can not directly be called, and described the second browser kernel and described the first browser kernel haveIdentical Data Input Interface and data output interface;
Display unit, for showing the webpage after playing up by described the second browser kernel.
CN201510958618.3A 2015-12-18 2015-12-18 For the support method of browser kernel and the display methods and device of webpage Active CN105607928B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510958618.3A CN105607928B (en) 2015-12-18 2015-12-18 For the support method of browser kernel and the display methods and device of webpage

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510958618.3A CN105607928B (en) 2015-12-18 2015-12-18 For the support method of browser kernel and the display methods and device of webpage

Publications (2)

Publication Number Publication Date
CN105607928A true CN105607928A (en) 2016-05-25
CN105607928B CN105607928B (en) 2019-03-01

Family

ID=55987882

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510958618.3A Active CN105607928B (en) 2015-12-18 2015-12-18 For the support method of browser kernel and the display methods and device of webpage

Country Status (1)

Country Link
CN (1) CN105607928B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109710327A (en) * 2017-10-20 2019-05-03 龙芯中科技术有限公司 Browser memory allocation method, memory allocator and browser
CN110489679A (en) * 2018-05-10 2019-11-22 腾讯科技(深圳)有限公司 A kind of processing method of browser kernel, device and storage medium
CN114595020A (en) * 2022-02-25 2022-06-07 深圳盛显科技有限公司 Split screen display method, device and system based on hook technology and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102508710A (en) * 2011-09-28 2012-06-20 奇智软件(北京)有限公司 Method and system for switching between IE6 kernel and novel IE kernel
CN102968341A (en) * 2012-10-25 2013-03-13 北京奇虎科技有限公司 Method and device for switching different versions of IE (internet explorer) kernels on basis of multi-kernel browser
CN104516885A (en) * 2013-09-26 2015-04-15 腾讯科技(深圳)有限公司 Implementation method and device of browse program double-kernel assembly
CN104731598A (en) * 2012-05-07 2015-06-24 北京奇虎科技有限公司 Method and device for providing web browsing based on Webkit kernel

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102508710A (en) * 2011-09-28 2012-06-20 奇智软件(北京)有限公司 Method and system for switching between IE6 kernel and novel IE kernel
CN104731598A (en) * 2012-05-07 2015-06-24 北京奇虎科技有限公司 Method and device for providing web browsing based on Webkit kernel
CN102968341A (en) * 2012-10-25 2013-03-13 北京奇虎科技有限公司 Method and device for switching different versions of IE (internet explorer) kernels on basis of multi-kernel browser
CN104516885A (en) * 2013-09-26 2015-04-15 腾讯科技(深圳)有限公司 Implementation method and device of browse program double-kernel assembly

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109710327A (en) * 2017-10-20 2019-05-03 龙芯中科技术有限公司 Browser memory allocation method, memory allocator and browser
CN110489679A (en) * 2018-05-10 2019-11-22 腾讯科技(深圳)有限公司 A kind of processing method of browser kernel, device and storage medium
CN114595020A (en) * 2022-02-25 2022-06-07 深圳盛显科技有限公司 Split screen display method, device and system based on hook technology and storage medium
CN114595020B (en) * 2022-02-25 2023-12-19 深圳盛显科技有限公司 Split screen display method, device and system based on hook technology and storage medium

Also Published As

Publication number Publication date
CN105607928B (en) 2019-03-01

Similar Documents

Publication Publication Date Title
US10666758B2 (en) Browser resource pre-pulling method, terminal and storage medium
CN103631664B (en) Communication means between a kind of process and device
CN103942225B (en) A kind of resource transfer method, client and the system of mixed type applications client
CN108563517B (en) Calling method and device of system interface
WO2017219833A1 (en) Method and apparatus for developing and managing application program page
CN106339414A (en) Webpage rendering method and device
CN107203419A (en) Intermodule call method, apparatus and system in application program
US11436066B2 (en) System for offline object based storage and mocking of rest responses
CN103425491A (en) Game engine
CN113010827B (en) Page rendering method and device, electronic equipment and storage medium
CN103226474B (en) Exchange method between page script and browser program, Apparatus and system
CA2540361A1 (en) System and method for extending capabilities and execution efficiency of script based applications
CN108052589A (en) The method, apparatus and storage medium of a kind of text exhibition
CN102982169A (en) Browser and method for isolating webpage plugins
CN105955714A (en) Mixed development front end MVC frame implementation method and system
CN101645090B (en) Page display method, server and network system
CN104462571A (en) Webpage loading method and device and browser client-side
CN105607928A (en) Supporting method for browser kernel and webpage display method and apparatus
CN106201562A (en) A kind of page switching method and device
CN107479873A (en) A kind of APP page modules melt forwarding method, electronic equipment and storage medium
CN102981846A (en) Method for treating password input box element and browser for treating the password input box element
CN104967689A (en) Data processing method and data processing device
CN109240756A (en) A kind of method and device of dynamically load JavaScript module
CN106649299A (en) Method and device for lazy loading of webpage block
CN112926002A (en) Service request processing method and device

Legal Events

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

Effective date of registration: 20220719

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