CN113591000B - Browser engine switching method, device and equipment - Google Patents

Browser engine switching method, device and equipment Download PDF

Info

Publication number
CN113591000B
CN113591000B CN202110788738.9A CN202110788738A CN113591000B CN 113591000 B CN113591000 B CN 113591000B CN 202110788738 A CN202110788738 A CN 202110788738A CN 113591000 B CN113591000 B CN 113591000B
Authority
CN
China
Prior art keywords
browser
page
browser engine
engine
interface
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110788738.9A
Other languages
Chinese (zh)
Other versions
CN113591000A (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.)
Hisense Mobile Communications Technology Co Ltd
Original Assignee
Hisense Mobile Communications Technology 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 Hisense Mobile Communications Technology Co Ltd filed Critical Hisense Mobile Communications Technology Co Ltd
Priority to CN202110788738.9A priority Critical patent/CN113591000B/en
Publication of CN113591000A publication Critical patent/CN113591000A/en
Application granted granted Critical
Publication of CN113591000B publication Critical patent/CN113591000B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • 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/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4482Procedural
    • 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/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4488Object-oriented
    • G06F9/449Object-oriented method invocation or resolution

Landscapes

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

Abstract

The invention provides a method, a device and equipment for switching a browser engine, wherein the method comprises the following steps: rendering and displaying a browser page by using a first browser engine; when triggering to switch to a second browser engine, saving the URL address of the uniform resource locator of the browser page; invoking a view interface of the second browser engine to generate a view object for rendering and displaying a browser page; and loading the source file of the browser page according to the URL address, and re-rendering and displaying the browser page by utilizing the view object. By utilizing the method provided by the invention, the switching of a plurality of browser engines in the same browser can be realized, the compatibility of the browser to the webpage is improved, the use requirement of a user on the browser is met as much as possible, and the user experience is improved.

Description

Browser engine switching method, device and equipment
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, and a device for switching a browser engine.
Background
Browser engines, also known as browser kernels, typesetting engines, rendering engines, etc., are a set of application software components that process markup languages, such as hypertext markup language (Hyper Text Markup Language, HTML), extensible markup language (eXtensible Markup Language, XML), extensible style language (eXtensible Stylesheet Language, XSL), picture files, etc., and process formatting information, such as cascading style sheets (CASCADING STYLE SHEETS, CSS), etc., and perform content presentation. In addition, due to the current widespread use of JavaScript languages, the browser engine generally includes a JavaScript engine at the same time, where the JavaScript engine is a virtual machine that specifically processes JavaScript scripts.
In the prior art, a plurality of browser engines exist, different browser engines have different advantages and disadvantages, and only a single browser is used, so that all use requirements of users cannot be met, but the browser in the prior art only uses a specified browser engine, so that the compatibility of the browser to web pages is poor, and if the users want to use other browser engines, the users can only open other browsers, so that the operation is complicated.
Disclosure of Invention
The invention provides a method, a device and equipment for switching a browser engine, which solve the problems that a browser in the prior art can only use a single browser, can not meet the use requirement of a user, has poor compatibility to a webpage and is complicated to operate.
In a first aspect, the present invention provides a method for switching a browser engine, applied to a client device, where the method includes:
Rendering and displaying a browser page by using a first browser engine;
When triggering to switch to a second browser engine, saving the URL address of the uniform resource locator of the browser page;
Invoking a view interface of the second browser engine to generate a view object for rendering and displaying a browser page;
And loading the source file of the browser page according to the URL address, and re-rendering and displaying the browser page by utilizing the view object.
Optionally, after generating the view object for rendering the display browser page, the method further comprises:
And calling a callback interface of the second browser engine to generate a callback object for monitoring an event generated by the browser page in the running process.
Optionally, after re-rendering the browser page for display, the method further comprises:
Determining that the data storage interface of the first browser engine is different from the data storage interface of the second browser engine, and synchronizing the pre-recorded storage operation of the first browser engine when the format and/or the storage path of the stored data are different;
recording the storage operation of the second browser engine when the second browser engine is determined to store data;
The storing operation comprises the operation of processing data to be stored and storing the data to a corresponding path.
Optionally, triggering a switch to the second browser engine includes:
When the abnormality of the browser is monitored and the abnormality is caused by the abnormality of the browser engine, triggering the switching of the currently used first browser engine to any currently unused second browser engine; or alternatively
And responding to an engine switching request of a user, and triggering the first browser engine which is currently used to be switched to a second browser engine indicated in the engine switching request.
Optionally, the engine switching request is triggered in any manner, including:
when the currently used first browser engine is determined and a browser page cannot be displayed normally, displaying inquiry information for switching the browser engine, and triggering an engine switching request in response to the operation of a user on the inquiry information; or alternatively
And responding to the selection operation of the browser engine of the setting interface by the user, and triggering an engine switching request.
Optionally, the view interface is implemented in any of the following manners:
When the second browser engine is a standard browser engine of a system used by the client device, taking a standard view interface of the system as the view interface;
When the second browser engine is not the standard browser engine, building the same program unit as the program unit for realizing the standard view interface under a catalog irrelevant to the standard view interface as the view interface; or (b)
And when the second browser engine is not the standard browser engine, adopting an interface layer logic code to realize the calling function of the second browser engine on the standard view interface.
Optionally, before rendering the display browser page using the first browser engine, the method further comprises:
receiving a starting request for starting a browser;
when the browser engine requested to be started is determined to be a standard browser engine, loading a default page by using the initialized standard browser engine;
When the browser engine requested to be started is not a standard browser engine and a dependency library of the browser engine requested to be started does not exist, downloading the dependency library, initializing the browser engine requested to be started according to the dependency library, and loading a default page;
And when the browser engine requested to be started is determined not to be a standard browser engine and a dependency library of the browser engine requested to be started exists, initializing the browser engine requested to be started according to the dependency library, and loading a default page.
In a second aspect, the present invention provides a switching device of a browser engine, including a memory and a processor, wherein:
the memory is used for storing a computer program;
the processor is used for reading the program in the memory and executing the following steps:
Rendering and displaying a browser page by using a first browser engine;
When triggering to switch to a second browser engine, saving the URL address of the uniform resource locator of the browser page;
Invoking a view interface of the second browser engine to generate a view object for rendering and displaying a browser page;
And loading the source file of the browser page according to the URL address, and re-rendering and displaying the browser page by utilizing the view object.
Optionally, after generating the view object for rendering the display browser page, the processor is further configured to:
And calling a callback interface of the second browser engine to generate a callback object for monitoring an event generated by the browser page in the running process.
Optionally, after re-rendering the browser page for display, the processor is further configured to:
Determining that the data storage interface of the first browser engine is different from the data storage interface of the second browser engine, and synchronizing the pre-recorded storage operation of the first browser engine when the format and/or the storage path of the stored data are different;
recording the storage operation of the second browser engine when the second browser engine is determined to store data;
The storing operation comprises the operation of processing data to be stored and storing the data to a corresponding path.
Optionally, the processor triggers a switch to a second browser engine, including:
When the abnormality of the browser is monitored and the abnormality is caused by the abnormality of the browser engine, triggering the switching of the currently used first browser engine to any currently unused second browser engine; or alternatively
And responding to an engine switching request of a user, and triggering the first browser engine which is currently used to be switched to a second browser engine indicated in the engine switching request.
Optionally, the engine switching request is triggered in any manner, including:
when the currently used first browser engine is determined and a browser page cannot be displayed normally, displaying inquiry information for switching the browser engine, and triggering an engine switching request in response to the operation of a user on the inquiry information; or alternatively
And responding to the selection operation of the browser engine of the setting interface by the user, and triggering an engine switching request.
Optionally, the view interface is implemented in any of the following manners:
When the second browser engine is a standard browser engine of a system used by the client device, taking a standard view interface of the system as the view interface;
When the second browser engine is not the standard browser engine, building the same program unit as the program unit for realizing the standard view interface under a catalog irrelevant to the standard view interface as the view interface; or (b)
And when the second browser engine is not the standard browser engine, adopting an interface layer logic code to realize the calling function of the second browser engine on the standard view interface.
Optionally, before rendering the display browser page using the first browser engine, the processor is further configured to:
receiving a starting request for starting a browser;
when the browser engine requested to be started is determined to be a standard browser engine, loading a default page by using the initialized standard browser engine;
When the browser engine requested to be started is not a standard browser engine and a dependency library of the browser engine requested to be started does not exist, downloading the dependency library, initializing the browser engine requested to be started according to the dependency library, and loading a default page;
And when the browser engine requested to be started is determined not to be a standard browser engine and a dependency library of the browser engine requested to be started exists, initializing the browser engine requested to be started according to the dependency library, and loading a default page.
In a third aspect, the present invention provides a switching device of a browser engine, including:
a first display unit for rendering and displaying a browser page using a first browser engine;
the address storage unit is used for storing the URL address of the uniform resource locator of the browser page when triggering the switching to the second browser engine;
the object generating unit is used for calling a view interface of the second browser engine and generating a view object for rendering and displaying a browser page;
And the second display unit is used for loading the source file of the browser page according to the URL address, and re-rendering and displaying the browser page by utilizing the view object.
Optionally, after generating the view object for rendering the display browser page, the object generating unit is further configured to:
And calling a callback interface of the second browser engine to generate a callback object for monitoring an event generated by the browser page in the running process.
Optionally, after the browser page is re-rendered and displayed, the second display unit is further configured to:
Determining that the data storage interface of the first browser engine is different from the data storage interface of the second browser engine, and synchronizing the pre-recorded storage operation of the first browser engine when the format and/or the storage path of the stored data are different;
recording the storage operation of the second browser engine when the second browser engine is determined to store data;
The storing operation comprises the operation of processing data to be stored and storing the data to a corresponding path.
Optionally, the address saving unit triggers a switch to a second browser engine, including:
When the abnormality of the browser is monitored and the abnormality is caused by the abnormality of the browser engine, triggering the switching of the currently used first browser engine to any currently unused second browser engine; or alternatively
And responding to an engine switching request of a user, and triggering the first browser engine which is currently used to be switched to a second browser engine indicated in the engine switching request.
Optionally, the engine switching request is triggered in any manner, including:
when the currently used first browser engine is determined and a browser page cannot be displayed normally, displaying inquiry information for switching the browser engine, and triggering an engine switching request in response to the operation of a user on the inquiry information; or alternatively
And responding to the selection operation of the browser engine of the setting interface by the user, and triggering an engine switching request.
Optionally, the view interface is implemented in any of the following manners:
When the second browser engine is a standard browser engine of a system used by the client device, taking a standard view interface of the system as the view interface;
When the second browser engine is not the standard browser engine, building the same program unit as the program unit for realizing the standard view interface under a catalog irrelevant to the standard view interface as the view interface; or (b)
And when the second browser engine is not the standard browser engine, adopting an interface layer logic code to realize the calling function of the second browser engine on the standard view interface.
Optionally, before rendering the display browser page using the first browser engine, the first display unit is further configured to:
receiving a starting request for starting a browser;
when the browser engine requested to be started is determined to be a standard browser engine, loading a default page by using the initialized standard browser engine;
When the browser engine requested to be started is not a standard browser engine and a dependency library of the browser engine requested to be started does not exist, downloading the dependency library, initializing the browser engine requested to be started according to the dependency library, and loading a default page;
And when the browser engine requested to be started is determined not to be a standard browser engine and a dependency library of the browser engine requested to be started exists, initializing the browser engine requested to be started according to the dependency library, and loading a default page.
In a fourth aspect, the present invention provides a computer program medium having stored thereon a computer program which, when executed by a processor, implements the steps of a method for switching a browser engine as provided in the first aspect above.
The method, the device and the equipment for switching the browser engine have the following beneficial effects:
The method and the device can realize the switching of a plurality of browser engines in the same browser, improve the compatibility of the browser to the webpage, meet the use requirement of a user on the browser as much as possible, and improve the user experience.
Drawings
Fig. 1 is a schematic diagram of an application scenario of a switching method of a browser engine according to an embodiment of the present invention;
FIG. 2 is a flowchart of a method for switching a browser engine according to an embodiment of the present invention;
FIG. 3 is a flowchart for initializing a browser engine according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a setting interface according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a browser engine according to an embodiment of the present invention;
FIG. 6 is a flowchart of a method for switching a browser engine according to an embodiment of the present invention;
Fig. 7 is a schematic diagram of a switching device of a browser engine according to an embodiment of the present invention;
Fig. 8 is a schematic diagram of a switching device of a browser engine according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments, but not all embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the foregoing figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the disclosure described herein may be capable of operation in sequences other than those illustrated or described herein.
The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
In the description of the embodiments of the present application, unless otherwise indicated, "/" means or, for example, a/B may represent a or B; the text "and/or" is merely an association relation describing the associated object, and indicates that three relations may exist, for example, a and/or B may indicate: in addition, in the description of the embodiments of the present application, "plural" means two or more, and other words and the like, it is to be understood that the preferred embodiments described herein are for illustration and explanation of the present application only, and are not intended to limit the present application, and embodiments of the present application and features in the embodiments may be combined with each other without conflict.
In the following, some terms in the embodiments of the present invention are explained for easy understanding by those skilled in the art.
(1) The term "application program interface (Application Programming Interface, API)" in the embodiments of the present invention refers to a predefined interface, or a convention that refers to the engagement of different components of a software system, for providing a set of routines that an application program and developer can access based on certain software or hardware, without having to access source code, or understanding the details of the internal operating mechanism.
(2) The term "hypertext 5 (HyperText Markup Language, html 5)", which is the next generation standard of the internet, is a description mode for constructing and presenting internet contents in the embodiment of the present invention, and is considered as one of the core technologies of the internet.
(3) In the embodiment of the present invention, the term "Memory Leak" refers to a heap Memory that has been dynamically allocated in a program, and because the program is not released or cannot be released for some reason, the system Memory is wasted, resulting in a slow running speed of the program, even a system crash, etc.
(4) The term "European computer manufacturers Association script program 6 (European Computer Manufacturers Association, ECMAScript 6)", abbreviated as ES6, also called ECMAScript 2015 in the present embodiment is the next generation standard for JavaScript.
(5) The term "Preference" in the embodiment of the present invention provides a method for accessing lightweight data, such as configuration information with less data, where the data is stored in an XML configuration file in a key-value pair manner.
(6) The term "uniform resource locator (Uniform Resource Locator, URL) address" in the embodiment of the present invention is a uniform resource locator flag of the WWW, and refers to a network address.
(7) In the embodiment of the invention, the term "small text file (Cookie/Cookies)" refers to data temporarily or permanently stored on a local terminal of a user.
(8) The term "Web page Storage (Web Storage)", in embodiments of the present invention, is a mechanism for storing a large amount of data that may exist across sessions, by way of storing session data outside of cookies.
(9) In the embodiment of the invention, the term "browser Agent (UA)" can enable a server to identify an operating system and version, a CPU type, a browser and version, a browser engine, a browser language and a browser plug-in used by a client, so that whether a User browses by a computer or a mobile phone is judged, and a webpage is automatically adapted.
(10) The term "the fragmentation problem of the browser engine" in the embodiment of the invention refers to the problem that various different results can appear when different versions of Android systems load the same webpage by using different versions of browser engines.
In the prior art, there are multiple browser engines, for example, a google browser engine (rendering engine blink and JavaScript engine V8), an X5 browser engine, a firefox browser engine (rendering engine Gecko and JavaScript engine TraceMonkey) which are standard browser engines of the Android system, and different browser engines have different advantages and disadvantages, taking the google browser engine and the X5 browser engine as examples: the Google browser engine has the problems of poor HTML5, memory leakage and the like, and is provided by Google in a manner of Google mobile service android application packages (GoogleMobile Service Android application PacKage, GMS APK), so that a developer cannot modify and optimize the Google browser engine; the X5 browser engine has the following advantages compared with the google browser engine: (1) at least 30% improvement in web page opening speed; (2) The cloud optimization technology is used, so that the flow is saved by at least 20%; (3) the safety problem can be repaired within 24 hours; (4) Through the use test of hundred million-class users, the collapse CRASH rate is lower than 0.15%; (5) The problem of fragmentation of the browser engine is avoided, and the problem of compatibility is less; (6) Supporting night mode, suitable screen typesetting, font setting and other browsing functions; (7) more complete support for HTML5, ES 6; (8) more video formats and file formats are supported; (9) open source, the developer can make modification optimization.
However, if the X5 browser engine is to be used in a browser configured with only the google browser engine, the X5 browser engine needs to be downloaded in the browser, and only the X5 browser engine can be used after the downloading, but the user cannot meet all the use requirements of the user by using only a single browser, and the user also has a requirement of using the google browser engine. In the prior art, only one appointed browser engine is used by the browser, the compatibility to the webpage is poor, and if a user wants to use other browser engines, the user can only open other browsers, so that the operation is complicated.
In view of the above problems of the related art browser, the present application provides a method, an apparatus and a device for switching a browser engine.
The following describes a method, a device and equipment for switching a browser engine in an embodiment of the present application in detail with reference to the accompanying drawings.
Example 1
As shown in fig. 1, an embodiment of the present invention provides a schematic diagram of an application scenario of a method for switching a browser engine, including:
A client device 101 for rendering a display browser page using a first browser engine; when triggering to switch to a second browser engine, saving the URL address of the uniform resource locator of the browser page; calling a view interface of the second browser engine to generate a view object for rendering and displaying a browser page; and loading the source file of the browser page according to the URL address, and re-rendering and displaying the browser page by utilizing the view object.
And a server 102 configured to send, to the client device 101, a source file of the browser page corresponding to the URL address.
The client device and the server are in communication connection through a network, and the network can be a local area network, a wide area network and the like.
The client device may be a portable device (e.g., a mobile phone, a tablet, a notebook, etc.), or may be a personal computer (PC, personal Computer), that is, the method for switching the browser engine may be applied to a PC device and/or a mobile terminal device.
As an optional implementation manner, the method for switching the browser engine is applied to the mobile terminal equipment using the Android system.
The server may be any device capable of providing internet services.
And the user performs data interaction with the server through a client installed in the client equipment, wherein the client can be a browser of a webpage or a browser client installed in mobile user equipment such as a mobile phone, a tablet personal computer and the like.
It should be noted that the above application scenario is merely illustrative of one possible implementation manner in the embodiment of the present application, and is not limited to the embodiment of the present application, but the embodiment of the present application may be applied to any applicable scenario, and the above application scenario may be increased, decreased, or deleted according to a specific implementation situation.
An embodiment of the present invention provides a flowchart of a method for switching a browser engine, as shown in fig. 2, including:
Step S201, rendering and displaying a browser page by using a first browser engine;
the first browser refers to a browser engine currently used by a browser, and may specifically be any type of browser engine, for example, google browser engine, X5 browser engine, firefox browser engine, etc., which is not limited in any way in the embodiment of the present invention.
The number of the browser pages may be one or more, and the embodiment of the present invention is not limited in this respect.
Step S202, when switching to a second browser engine is triggered, saving the URL address of the uniform resource locator of the browser page;
The second browser refers to any browser engine that is not currently used by the browser, for example, the browser engine a is currently used, the browser engine B, the browser engine C, and the browser engine D are not used, the second browser may be any browser engine of the browser engine B, the browser engine C, and the browser engine D, and specifically may be any type of browser engine, for example, google browser engine, X5 browser engine, and fox browser engine, which are not limited in the embodiment of the present invention.
And saving the URL addresses of the one or more browser pages.
Step S203, calling a view interface of the second browser engine to generate a view object for rendering and displaying a browser page;
The second browser engine is initialized before the view interface is invoked.
The view interface of the second browser engine is a predefined view interface.
And instantiating the page view of the second browser engine according to the configuration information of the second browser engine.
Instantiating the page view of the second browser engine refers to: and calling the view interface of the second browser engine to generate an object occupying a certain memory area, wherein the object can display an area of a browser page in an application program using an Android system or other systems.
The view object is also used for receiving user input on the browser page.
Step S204, loading the source file of the browser page according to the URL address, and re-rendering and displaying the browser page by utilizing the view object.
The browser uses the tab pages to manage the loading of the single browser page view, records the URL of the browser page, notifies each tab page when the configuration of the browser engine is changed, re-instantiates the page view, and triggers the instantiated page view to load the recorded URL, so that the browser page is not lost while the browser engine is switched.
The tab page includes a browser URL address, a browser page display area, and an instantiated callback class.
It should be noted that, the browser uses the initialized first browser engine/second browser engine, and in one possible implementation, before rendering and displaying the browser page using the first browser engine, the method further includes:
receiving a starting request for starting a browser;
when the browser engine requested to be started is determined to be a standard browser engine, loading a default page by using the initialized standard browser engine;
when the browser engine requested to be started is determined not to be a standard browser engine and a dependency library of the browser engine requested to be started does not exist, downloading the dependency library, initializing the browser engine requested to be started according to the dependency library, and loading a default page;
And when the browser engine requested to be started is determined not to be a standard browser engine and a dependency library of the browser engine requested to be started exists, initializing the browser engine requested to be started according to the dependency library, and loading a default page.
The activation request may be triggered by a user operating a browser icon, for example, clicking the browser icon, or by a user operating hardware of the client device, for example, pressing a preset key a plurality of times consecutively, or triggering by a voice manner or an gesture manner, which is not limited in the embodiments of the present invention.
The standard browser engine is a default browser engine of a system used by the client device, such as a google browser engine used by an Android system by default.
The standard browser engine exists in the system as a system service, and when the system is initialized, the default browser engine is initialized, and when the default browser engine is started, the default browser engine is not required to be initialized again, and only the page view of the default browser engine is required to be instantiated.
The nonstandard browser engine is realized by using a dynamic loading technology, and is shared by all applications relying on the nonstandard browser engine in the client device, and the initialization is divided into downloading and loading parts: (1) downloading: and when the non-standard browser engine is determined to be requested to start, detecting whether a dependent library of the non-standard browser engine exists, and downloading the dependent library when the dependent library is confirmed to not exist. (2) loading: after switching to the nonstandard browser engine, an initialized loading flow is carried out, and the underlying service is pulled up.
The dependency library, also called as a bottom layer support library, is specific code for realizing the browser engine, and comprises a rendering engine and a JavaScript engine, and is generally in the form of a so library on an Android system and is responsible for specific webpage rendering and JavaScript script running.
As shown in fig. 3, an embodiment of the present invention provides a flowchart for initializing a browser engine, including:
Step S301, a starting request for starting a browser is received;
step S302, judging whether the browser engine requested to be started is a standard browser engine, if yes, executing step S303, otherwise, executing step S304;
Step S303, loading a default page by using the initialized standard browser engine, and ending the flow;
Step S304, judging whether the dependency library of the browser engine requested to be started exists, if so, executing step S306, otherwise, executing step S305;
step S305, downloading the dependency library, and executing step S306;
Step S306, initializing the browser engine started by the request according to the dependency library, loading a default page, and ending the flow.
The non-standard browser engine is loaded, so that the smoothness of loading of the subsequent browser pages can be ensured.
Triggering a switch to the second browser engine by any one of:
When the abnormality of the browser is detected and the abnormality is caused by the abnormality of the browser engine, triggering the switching of the first browser engine which is currently used to any second browser engine which is not currently used; or alternatively
And responding to an engine switching request of a user, and triggering the first browser engine which is currently used to be switched to a second browser engine indicated in the engine switching request.
The engine switching request is triggered by any one of the following modes, including:
When the first browser engine which is currently used is determined and a browser page cannot be displayed normally, displaying inquiry information for switching the browser engine, and triggering an engine switching request in response to the operation of a user on the inquiry information; or alternatively
And responding to the selection operation of the browser engine of the setting interface by the user, and triggering an engine switching request.
And adding a switching inlet to the browser setting interface for selection by a user, and storing through a reference mechanism of the system to provide a function of configuring a browser engine.
As shown in fig. 4, an embodiment of the present invention provides a schematic diagram of a setting interface.
The setting interface comprises a selection trigger icon of a browser identifier (UA), a first sliding selection icon for opening the last un-closed webpage when starting, a second sliding selection icon for sliding forwards and backwards leftwards and rightwards, and a selection trigger icon of a browser engine.
After clicking the selection trigger icon of the browser engine, displaying selectable browser engine icons on the page, and displaying google browser engine icons and X5 browser engine icons for users to select as shown in the above figure 4; the selected browser engine icon will display a marker, as shown in fig. 4 above, and the google browser icon is selected, displaying a sign-up marker.
It should be noted that, the setting interface is an illustration of the setting interface according to the embodiment of the present invention, and the form of the setting interface may be specifically set according to specific implementation conditions, for example, an increase or decrease of setting options of the setting interface, a change of a specific form of the setting interface, and the embodiment of the present invention is not limited in any way.
The embodiment of the invention automatically identifies the scene of switching the browser engine by the following two modes:
embodiment 1: abnormality identification:
Taking the google browser and the X5 browser engine as examples, after the google browser engine has an official version updated, an abnormal situation that the google browser engine cannot operate is introduced, and the X5 browser engine may also have an abnormal situation during operation.
And adding application abnormality detection, and triggering to switch the currently used first browser engine into any currently unused second browser engine when the browser is detected to be abnormal and the abnormality cause is abnormal of the browser engine, for example, when the abnormality information comprises packet name information of the browser engine at a Java interface layer, so as to ensure that a user can normally use the browser.
Embodiment 2: support case identification:
Taking the google browser and the X5 browser engine as examples, the X5 browser engine supports a part of special tags and attributes, for example, for video tags, the X5 browser engine extends the X5-video-layer-type attribute for controlling the playing mode of the video embedded in the page, and the attribute does not exist in the HTML standard, so the google browser engine cannot provide support for the special tags and attributes.
And when the first browser engine which is currently used is determined to be incapable of normally displaying the browser page, displaying inquiry information for switching the browser engine, and triggering an engine switching request in response to the operation of the user on the inquiry information.
For example, for a poorly compatible web page, the user is prompted to switch engine attempts when the refresh fails.
And detecting whether the currently used first browser engine can normally display the browser page or not by tracking the information callback of the kernel console.
The kernel console information can output logs generated by the JavaScript script of the browser page, and compatibility is abnormal, and the browser engines can be switched pertinently by combining log analysis of common websites under different browser engines.
The callback refers to that the browser page generates a piece of kernel console information.
As an alternative embodiment, the view interface is implemented in any of the following ways:
When the second browser engine is a standard browser engine of a system used by the client, a standard view interface of the system is used as the view interface;
When the second browser engine is not the standard browser engine, establishing the same program unit as the program unit for realizing the standard view interface as the view interface under a catalog irrelevant to the standard view interface; or (b)
And when the second browser engine is not the standard browser engine, adopting an interface layer logic code to realize the calling function of the second browser engine on the standard view interface.
It should be noted that, the standard interface specification of the Android system provides WebView control and its related class as a basic interface supporting webpage loading, and based on the interface, a complete browser function can be realized, and the WebView bottom layer is realized based on the google browser chrome kernel.
The association class refers to a tool class under an android.webkit package, and functions used for customizing WebView replace default implementation, for example, functions used by an android.webkit. Cookie manager to provide Cookie management replace default implementation of WebView.
The X5 browser engine provides an interface similar to the WebView control described above, and may also support full browser functionality.
The engine interface adaptation layer definition is realized by adopting the following implementation modes:
because the standard browser engine, namely the relevant interface of the Android system WebView already covers the interfaces required for supporting the complete browser functions, the interfaces of the adaptation layer are directly defined to correspond to subclasses and method names of the relevant interface of the Android system WebView one by one, but are configured into independent packages for distinguishing.
The above configuration as a stand-alone package refers to placing classes that deal with the same problem under the same directory for ease of management.
And when the subsequent browser engines possibly introduced are not in one-to-one correspondence, the interface layer encapsulates the other browser engines, and the current external interface function is realized.
The encapsulation refers to that by adding the logic code of the interface layer, the external interface provided by the interface layer is consistent when the interface layer is accessed to any browser engine for implementation.
As shown in fig. 5, an embodiment of the present invention provides a schematic diagram of a browser engine, including:
An application layer 501, configured to implement interaction with a user, receive user input, and render and display a browser page;
the interface layer 502 is used for packaging the specific implementation of the browser engine, combining the specific functions provided by the browser engine into interfaces corresponding to the services of the application layer 501, and isolating the specific implementation of the browser engine; the method comprises the steps of managing a currently used browser engine, triggering the ending and resource recycling functions of an old browser engine and the initializing function of a new browser engine when the browser engine is switched.
The interface layer is matched with a standard interface of a standard browser engine in a one-to-one correspondence mode.
The interface layer 502 includes:
the view interface 502-1 is configured to provide a class inherited from an Android view, and may join a display area of an Android application, and display a rendering result of a page therein;
Callback interface 502-2, configured to monitor an event generated during operation of a browser webpage, so that an application layer processes a specific event;
The data storage interface 502-3 is used for managing data generated in web browsing, such as data stored by web sites through web standards such as cookies, webStorage, etc., history records corresponding to the user browsing process, and bookmarks actively stored by the user.
An interface 502-4 is configured to store a user's usage preference corresponding to a customization item opened by the browser, for example, whether to use an original size when loading a browser page or zoom to be displayable in a screen, whether to store a browsing history during browsing a web page, whether to allow web page positioning during browsing a web page, and the like.
The view interface 502-1, the callback interface 502-2, and the data storage interface 502-3 are interfaces related to the browser engine.
As an alternative embodiment, after generating the view object for rendering and displaying the browser page, the method further includes:
And calling a callback interface of the second browser engine to generate a callback object for monitoring an event generated by the browser page in the running process.
The application layer monitors events generated by the browser webpage in operation through the callback interface, wherein the events can be that a user clicks a download link, the page has running errors, the page loading progress changes, the page triggers redirection, the page pops up a window, the page requests full-screen display, the page generates a piece of console information and the like.
And instantiating callback class defined by a callback interface of the second browser engine according to the configuration information of the second browser engine.
The callback class refers to a class defining a processing method of an event which may occur in a page, and because the manner of reporting the event by a kernel may be different, the configuration needs to be performed according to a currently used engine, for example, an android.webkit.downloadListener, the callback class is instantiated before loading a browser page, and is input into a control for loading a browser webpage but does not participate in page loading, and only when a user clicks a download link to trigger the download event, the method can be called.
Because the browser page can locally store data through the standard interface of the Cookie or WebStorage, and the implementation of the interface by the browser engine is not completely consistent, a scene that the local storage cannot be read may appear after the browser engine is switched, and therefore, after the browser page is re-rendered and displayed, the embodiment of the invention further comprises:
Determining that the data storage interface of the first browser engine is different from the data storage interface of the second browser engine, and synchronizing the pre-recorded storage operation of the first browser engine when the format and/or the storage path of the stored data are different;
recording the storage operation of the second browser engine when the second browser engine is determined to store data;
The storing operation includes processing data to be stored and storing the data to a corresponding path.
The same scheme is used for realizing functions of different browser engines, for example, if the same format is used when the different browser engines store Cookies, and the same storage operation is adopted when the different browser engines are designated to store the Cookies in the same path; different schemes are used for realizing functions of different browser engines, the storage actions of the storage interfaces of the current browser engines are recorded in the adaptation layer, the browser engines are played back in the corresponding classes of the new browser engines after being switched, data synchronization is realized, and the switching of the browser engines is realized under the condition that a user does not feel.
For example, browser engine a uses storage action a, browser engine B uses storage action B, and when the browser engine a and browser engine B do not agree with each other: no matter which engine is currently running, as long as the storage is triggered, the storage action A and the storage action B are respectively executed on the data in the memory, so that the storage data of all browsed browser pages can be synchronized; or the memory data stored by the browser engine A through the storage action A is recorded in the tag page, and when the browser engine A is switched to the browser engine B, the storage action B is executed on all the data recorded in the tag page, so that the storage data of the current page can be synchronized.
Taking google browser engine switching to an X5 browser engine as an example, as shown in fig. 6, an embodiment of the present invention provides a flowchart of a method for switching a browser engine, including:
Step S601, rendering and displaying a browser page by using a google browser engine;
step S602, when switching to an X5 browser engine is triggered, the URL address of the browser page is stored;
After the URL address of the browser page is stored, destroying the page view of the browser page.
The purpose of destroying the page view is to release the occupied memory, and after destroying the page view, the tab page is still in an open state, but the content is blank.
Step S603, calling a view interface of the X5 browser engine to generate a view object for rendering and displaying a browser page;
step S604, calling a callback interface of the X5 browser engine to generate a callback object for monitoring an event generated in the running process of a browser page;
Step S605, loading the source file of the browser page according to the URL address, and re-rendering and displaying the browser page by utilizing the view object.
Updating the page view of the browser into the page view of the X5 browser engine, acquiring a source file at the server side according to the URL address, and re-rendering and displaying the source file in the page view of the X5 browser engine through the X5 browser engine.
The newly-built page view occupies the display area of the original page view, and triggers the request data and the loading flow of the X5 browser engine.
Example 2
An embodiment of the present invention provides a switching device 701 of a browser engine, including a memory 702 and a processor 703, as shown in fig. 7, where:
the memory is used for storing a computer program;
the processor is used for reading the program in the memory and executing the following steps:
Rendering and displaying a browser page by using a first browser engine;
When triggering to switch to a second browser engine, saving the URL address of the uniform resource locator of the browser page;
Invoking a view interface of the second browser engine to generate a view object for rendering and displaying a browser page;
And loading the source file of the browser page according to the URL address, and re-rendering and displaying the browser page by utilizing the view object.
Optionally, after generating the view object for rendering the display browser page, the processor is further configured to:
And calling a callback interface of the second browser engine to generate a callback object for monitoring an event generated by the browser page in the running process.
Optionally, after re-rendering the browser page for display, the processor is further configured to:
Determining that the data storage interface of the first browser engine is different from the data storage interface of the second browser engine, and synchronizing the pre-recorded storage operation of the first browser engine when the format and/or the storage path of the stored data are different;
recording the storage operation of the second browser engine when the second browser engine is determined to store data;
The storing operation comprises the operation of processing data to be stored and storing the data to a corresponding path.
Optionally, the processor triggers a switch to a second browser engine, including:
When the abnormality of the browser is monitored and the abnormality is caused by the abnormality of the browser engine, triggering the switching of the currently used first browser engine to any currently unused second browser engine; or alternatively
And responding to an engine switching request of a user, and triggering the first browser engine which is currently used to be switched to a second browser engine indicated in the engine switching request.
Optionally, the engine switching request is triggered in any manner, including:
when the currently used first browser engine is determined and a browser page cannot be displayed normally, displaying inquiry information for switching the browser engine, and triggering an engine switching request in response to the operation of a user on the inquiry information; or alternatively
And responding to the selection operation of the browser engine of the setting interface by the user, and triggering an engine switching request.
Optionally, the view interface is implemented in any of the following manners:
When the second browser engine is a standard browser engine of a system used by the client device, taking a standard view interface of the system as the view interface;
When the second browser engine is not the standard browser engine, building the same program unit as the program unit for realizing the standard view interface under a catalog irrelevant to the standard view interface as the view interface; or (b)
And when the second browser engine is not the standard browser engine, adopting an interface layer logic code to realize the calling function of the second browser engine on the standard view interface.
Optionally, before rendering the display browser page using the first browser engine, the processor is further configured to:
receiving a starting request for starting a browser;
when the browser engine requested to be started is determined to be a standard browser engine, loading a default page by using the initialized standard browser engine;
When the browser engine requested to be started is not a standard browser engine and a dependency library of the browser engine requested to be started does not exist, downloading the dependency library, initializing the browser engine requested to be started according to the dependency library, and loading a default page;
And when the browser engine requested to be started is determined not to be a standard browser engine and a dependency library of the browser engine requested to be started exists, initializing the browser engine requested to be started according to the dependency library, and loading a default page.
An embodiment of the present invention provides a switching device for a browser engine, as shown in fig. 8, including:
a first display unit 801 for rendering and displaying a browser page using a first browser engine;
An address saving unit 802, configured to save a URL address of a URL of a browser page when switching to the second browser engine is triggered;
An object generating unit 803, configured to invoke a view interface of the second browser engine, and generate a view object for rendering and displaying a browser page;
And the second display unit 804 is configured to load the source file of the browser page according to the URL address, and re-render and display the browser page by using the view object.
Optionally, after generating the view object for rendering the display browser page, the object generating unit is further configured to:
And calling a callback interface of the second browser engine to generate a callback object for monitoring an event generated by the browser page in the running process.
Optionally, after the browser page is re-rendered and displayed, the second display unit is further configured to:
Determining that the data storage interface of the first browser engine is different from the data storage interface of the second browser engine, and synchronizing the pre-recorded storage operation of the first browser engine when the format and/or the storage path of the stored data are different;
recording the storage operation of the second browser engine when the second browser engine is determined to store data;
The storing operation comprises the operation of processing data to be stored and storing the data to a corresponding path.
Optionally, the address saving unit triggers a switch to a second browser engine, including:
When the abnormality of the browser is monitored and the abnormality is caused by the abnormality of the browser engine, triggering the switching of the currently used first browser engine to any currently unused second browser engine; or alternatively
And responding to an engine switching request of a user, and triggering the first browser engine which is currently used to be switched to a second browser engine indicated in the engine switching request.
Optionally, the engine switching request is triggered in any manner, including:
when the currently used first browser engine is determined and a browser page cannot be displayed normally, displaying inquiry information for switching the browser engine, and triggering an engine switching request in response to the operation of a user on the inquiry information; or alternatively
And responding to the selection operation of the browser engine of the setting interface by the user, and triggering an engine switching request.
Optionally, the view interface is implemented in any of the following manners:
When the second browser engine is a standard browser engine of a system used by the client device, taking a standard view interface of the system as the view interface;
When the second browser engine is not the standard browser engine, building the same program unit as the program unit for realizing the standard view interface under a catalog irrelevant to the standard view interface as the view interface; or (b)
And when the second browser engine is not the standard browser engine, adopting an interface layer logic code to realize the calling function of the second browser engine on the standard view interface.
Optionally, before rendering the display browser page using the first browser engine, the first display unit is further configured to:
receiving a starting request for starting a browser;
when the browser engine requested to be started is determined to be a standard browser engine, loading a default page by using the initialized standard browser engine;
When the browser engine requested to be started is not a standard browser engine and a dependency library of the browser engine requested to be started does not exist, downloading the dependency library, initializing the browser engine requested to be started according to the dependency library, and loading a default page;
And when the browser engine requested to be started is determined not to be a standard browser engine and a dependency library of the browser engine requested to be started exists, initializing the browser engine requested to be started according to the dependency library, and loading a default page.
The present invention also provides a computer program medium having stored thereon a computer program which, when executed by a processor, implements the steps of the switching method for a browser engine applied to a client device provided in the above-described embodiment 1.
In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, and for example, the division of the modules is merely a logical function division, and there may be additional divisions when actually implemented, for example, multiple modules or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or modules, which may be in electrical, mechanical, or other forms.
The modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical modules, i.e., may be located in one place, or may be distributed over a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module. The integrated modules may be implemented in hardware or in software functional modules. The integrated modules, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product.
The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present application, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be stored by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Drive (SSD)), etc.
The above description has been made in detail for the technical solutions provided by the present application, and specific examples are applied in the present application to illustrate the principles and embodiments of the present application, and the above examples are only used to help understand the method and core ideas of the present application; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present application, the present description should not be construed as limiting the present application in view of the above.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present application without departing from the spirit or scope of the application. Thus, it is intended that the present application also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (9)

1. A method for switching a browser engine, applied to a client device, comprising:
Rendering and displaying a browser page by using a first browser engine;
when triggering to switch to a second browser engine, storing a Uniform Resource Locator (URL) address of the browser page, and destroying a page view corresponding to the browser page;
Invoking a view interface of the second browser engine to generate a view object for rendering and displaying a browser page, wherein the view object occupies a preset memory area, an area of the browser page is displayed in an application program using an android system or other systems, loading of the view object is managed through a tab page, the tab page comprises a URL address of the browser page, a display area of the browser page and an instantiated callback class, the callback class defines a processing method of an event occurring in the browser page, and the event comprises that a user clicks a download link, the page has running errors, the page loading progress changes, the page triggers redirection, the page pops up a window, the page requests full screen display, and the page generates part or all of console information;
Loading a source file of the browser page according to the URL address, and re-rendering and displaying the browser page by utilizing the view object;
when determining that the data storage interface of the first browser engine is different from the data storage interface of the second browser engine and the format and/or the storage path of the stored data are different, if the second browser engine is triggered to store the data, performing the storage operation of the first browser engine and the storage operation of the second browser engine on the data in the memory; the storing operation comprises the operation of processing data to be stored and storing the data to a corresponding path.
2. The method of claim 1, wherein after generating the view object for rendering the display browser page, further comprising:
And calling a callback interface of the second browser engine to generate a callback object for monitoring an event generated by the browser page in the running process.
3. The method of claim 1, wherein triggering the switch to the second browser engine comprises:
When the abnormality of the browser is monitored and the abnormality is caused by the abnormality of the browser engine, triggering the switching of the currently used first browser engine to any currently unused second browser engine; or alternatively
And responding to an engine switching request of a user, and triggering the first browser engine which is currently used to be switched to a second browser engine indicated in the engine switching request.
4. A method according to claim 3, wherein the engine switch request is triggered in any of the following ways, including:
when the currently used first browser engine is determined and a browser page cannot be displayed normally, displaying inquiry information for switching the browser engine, and triggering an engine switching request in response to the operation of a user on the inquiry information; or alternatively
And responding to the selection operation of the browser engine of the setting interface by the user, and triggering an engine switching request.
5. The method of claim 1, wherein the view interface is implemented in any of the following ways:
When the second browser engine is a standard browser engine of a system used by the client device, taking a standard view interface of the system as the view interface;
When the second browser engine is not the standard browser engine, building the same program unit as the program unit for realizing the standard view interface under a catalog irrelevant to the standard view interface as the view interface; or (b)
And when the second browser engine is not the standard browser engine, adopting an interface layer logic code to realize the calling function of the second browser engine on the standard view interface.
6. The method of claim 1, further comprising, prior to rendering the display browser page using the first browser engine:
receiving a starting request for starting a browser;
when the browser engine requested to be started is determined to be a standard browser engine, loading a default page by using the initialized standard browser engine;
When the browser engine requested to be started is not a standard browser engine and a dependency library of the browser engine requested to be started does not exist, downloading the dependency library, initializing the browser engine requested to be started according to the dependency library, and loading a default page;
And when the browser engine requested to be started is determined not to be a standard browser engine and a dependency library of the browser engine requested to be started exists, initializing the browser engine requested to be started according to the dependency library, and loading a default page.
7. A switching device of a browser engine, comprising a memory and a processor, wherein:
the memory is used for storing a computer program;
The processor is configured to read the program in the memory and execute the steps of the method for switching a browser engine according to any one of claims 1 to 6.
8. A switching device of a browser engine, comprising:
a first display unit for rendering and displaying a browser page using a first browser engine;
The address storage unit is used for storing the URL address of the uniform resource locator of the browser page and destroying the page view corresponding to the browser page when triggering the switching to the second browser engine;
The object generating unit is used for calling a view interface of the second browser engine to generate a view object for rendering and displaying a browser page, the view object occupies a preset memory area, an area of the browser page is displayed in an application program using an android system or other systems, loading of the view object is managed through a tab page, the tab page comprises a URL address of the browser page, a display area of the browser page and an instantiated callback class, the callback class defines a processing method of an event occurring in the browser page, the event comprises that a user clicks a download link, the page has running errors, the page loading progress changes, the page triggers redirection, the page pops up a window, the page requests full-screen display, and the page generates part or all of control console information;
The second display unit is used for loading the source file of the browser page according to the URL address and re-rendering and displaying the browser page by utilizing the view object;
And a storage unit: when determining that the data storage interface of the first browser engine is different from the data storage interface of the second browser engine and the format and/or the storage path of the stored data are different, if the second browser engine is triggered to store the data, performing the storage operation of the first browser engine and the storage operation of the second browser engine on the data in the memory; the storing operation comprises the operation of processing data to be stored and storing the data to a corresponding path.
9. A computer program medium, characterized in that it has stored thereon a computer program which, when executed by a processor, implements the steps of the switching method of a browser engine according to any of claims 1-6.
CN202110788738.9A 2021-07-13 2021-07-13 Browser engine switching method, device and equipment Active CN113591000B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110788738.9A CN113591000B (en) 2021-07-13 2021-07-13 Browser engine switching method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110788738.9A CN113591000B (en) 2021-07-13 2021-07-13 Browser engine switching method, device and equipment

Publications (2)

Publication Number Publication Date
CN113591000A CN113591000A (en) 2021-11-02
CN113591000B true CN113591000B (en) 2024-04-19

Family

ID=78247595

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110788738.9A Active CN113591000B (en) 2021-07-13 2021-07-13 Browser engine switching method, device and equipment

Country Status (1)

Country Link
CN (1) CN113591000B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115470423B (en) * 2022-11-15 2023-03-24 深圳市乐凡信息科技有限公司 Android system updating method, device, equipment and storage medium

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101557415A (en) * 2008-04-11 2009-10-14 北京亿企通信息技术有限公司 Method supporting web page switching for uploading a plurality of documents to web browser
CN102346780A (en) * 2011-10-18 2012-02-08 北龙中网(北京)科技有限责任公司 Method and device for acquiring webpage address
AU2012200261A1 (en) * 2005-09-01 2012-02-09 Vishal Dhawan Voice application network platform
CN102508710A (en) * 2011-09-28 2012-06-20 奇智软件(北京)有限公司 Method and system for switching between IE6 kernel and novel IE kernel
WO2012125696A2 (en) * 2011-03-14 2012-09-20 Browsium, Inc. Methods and systems for one browser version to use a rendering engine of another browser version for displaying information
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
CN103324735A (en) * 2013-06-28 2013-09-25 贝壳网际(北京)安全技术有限公司 Method and device for loading abnormal page in browser and client
CN104516913A (en) * 2013-09-30 2015-04-15 昆明能讯科技有限责任公司 Webpage browser based on multiple kernel technologies
CN104615670A (en) * 2015-01-16 2015-05-13 百纳(武汉)信息技术有限公司 Method for supporting multiple rendering engines in android browser and browser
CN106354484A (en) * 2015-07-16 2017-01-25 中兴通讯股份有限公司 Browser compatibility method and browser
CN106993009A (en) * 2016-01-20 2017-07-28 青岛海信移动通信技术股份有限公司 A kind of method and apparatus for loading webpage in a browser
CN107171874A (en) * 2017-07-21 2017-09-15 维沃移动通信有限公司 A kind of speech engine switching method, mobile terminal and server
CN109948085A (en) * 2017-11-23 2019-06-28 广州市动景计算机科技有限公司 Browser kernel initial method, calculates equipment and storage medium at device
CN110740178A (en) * 2019-10-15 2020-01-31 深圳乐信软件技术有限公司 application service processing system and application service processing method
CN111176628A (en) * 2019-12-19 2020-05-19 福建天泉教育科技有限公司 Front-end access method under modular architecture and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7546538B2 (en) * 2000-02-04 2009-06-09 Browse3D Corporation System and method for web browsing
CN102467565B (en) * 2010-11-19 2016-05-11 北京奇虎科技有限公司 A kind of method that browser kernel switches

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU2012200261A1 (en) * 2005-09-01 2012-02-09 Vishal Dhawan Voice application network platform
CN101557415A (en) * 2008-04-11 2009-10-14 北京亿企通信息技术有限公司 Method supporting web page switching for uploading a plurality of documents to web browser
WO2012125696A2 (en) * 2011-03-14 2012-09-20 Browsium, Inc. Methods and systems for one browser version to use a rendering engine of another browser version for displaying information
CN102508710A (en) * 2011-09-28 2012-06-20 奇智软件(北京)有限公司 Method and system for switching between IE6 kernel and novel IE kernel
CN102346780A (en) * 2011-10-18 2012-02-08 北龙中网(北京)科技有限责任公司 Method and device for acquiring webpage address
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
CN103324735A (en) * 2013-06-28 2013-09-25 贝壳网际(北京)安全技术有限公司 Method and device for loading abnormal page in browser and client
CN104516913A (en) * 2013-09-30 2015-04-15 昆明能讯科技有限责任公司 Webpage browser based on multiple kernel technologies
CN104615670A (en) * 2015-01-16 2015-05-13 百纳(武汉)信息技术有限公司 Method for supporting multiple rendering engines in android browser and browser
CN106354484A (en) * 2015-07-16 2017-01-25 中兴通讯股份有限公司 Browser compatibility method and browser
CN106993009A (en) * 2016-01-20 2017-07-28 青岛海信移动通信技术股份有限公司 A kind of method and apparatus for loading webpage in a browser
CN107171874A (en) * 2017-07-21 2017-09-15 维沃移动通信有限公司 A kind of speech engine switching method, mobile terminal and server
CN109948085A (en) * 2017-11-23 2019-06-28 广州市动景计算机科技有限公司 Browser kernel initial method, calculates equipment and storage medium at device
CN110740178A (en) * 2019-10-15 2020-01-31 深圳乐信软件技术有限公司 application service processing system and application service processing method
CN111176628A (en) * 2019-12-19 2020-05-19 福建天泉教育科技有限公司 Front-end access method under modular architecture and storage medium

Also Published As

Publication number Publication date
CN113591000A (en) 2021-11-02

Similar Documents

Publication Publication Date Title
US11799984B2 (en) Installable web applications
US11258866B2 (en) Web resource load blocking API
US7506248B2 (en) Asynchronously loading dynamically generated content across multiple internet domains
US20120297324A1 (en) Navigation Control Availability
US8806333B2 (en) Systems and methods for integrated application platforms
WO2017206626A1 (en) Network resource access apparatus, mixed apparatus, and method
US10084878B2 (en) Systems and methods for hosted application marketplaces
US20070226734A1 (en) Auxiliary display gadget for distributed content
WO2019100985A1 (en) Page processing method and mobile terminal
US20120227032A1 (en) Method, apparatus, and system for invoking widget
US20090193363A1 (en) Representing Multiple Computing Resources Within A Predefined Region Of A Graphical User Interface For Displaying A Single Icon
US20140068421A1 (en) Systems and methods for tracking and updating hosted applications
US9996512B2 (en) Customized processing of DOM objects
WO2013139268A1 (en) Method, terminal, and system for generating and invoking offline application
US20110010615A1 (en) Method for displaying information generated by a client
CN113591000B (en) Browser engine switching method, device and equipment
EP2362306A1 (en) Method and server for widget communication
CN110008423B (en) Off-line processing method of dynamic webpage, output terminal and storage medium
JP5821631B2 (en) Playback apparatus, playback method, and playback program
CN108304169B (en) Implementation method, device and equipment for HTML5 application
CN112256381A (en) Language resource processing method and device, computer equipment and storage medium
US10642629B2 (en) Web-application-launch application programming interfaces
CN116450962A (en) Page display method, device, equipment and storage medium based on distributed system
CN116932126A (en) Application embedding method, device, terminal, medium and program product
CN115421813A (en) Player control method, device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Country or region after: China

Address after: 266071 Shandong city of Qingdao province Jiangxi City Road No. 11

Applicant after: Qingdao Hisense Mobile Communication Technology Co.,Ltd.

Address before: 266071 Shandong city of Qingdao province Jiangxi City Road No. 11

Applicant before: HISENSE MOBILE COMMUNICATIONS TECHNOLOGY Co.,Ltd.

Country or region before: China

GR01 Patent grant
GR01 Patent grant