CN112181406A - Rendering engine sharing method and device - Google Patents

Rendering engine sharing method and device Download PDF

Info

Publication number
CN112181406A
CN112181406A CN201910517057.1A CN201910517057A CN112181406A CN 112181406 A CN112181406 A CN 112181406A CN 201910517057 A CN201910517057 A CN 201910517057A CN 112181406 A CN112181406 A CN 112181406A
Authority
CN
China
Prior art keywords
rendering engine
target
target object
target rendering
view component
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.)
Pending
Application number
CN201910517057.1A
Other languages
Chinese (zh)
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 Sogou Technology Development Co Ltd
Original Assignee
Beijing Sogou Technology Development 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 Sogou Technology Development Co Ltd filed Critical Beijing Sogou Technology Development Co Ltd
Priority to CN201910517057.1A priority Critical patent/CN112181406A/en
Publication of CN112181406A publication Critical patent/CN112181406A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/36Software reuse
    • 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/44557Code layout in executable memory
    • G06F9/44563Sharing

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the application discloses a sharing method and a sharing device of a rendering engine. Therefore, when the target object needs to create the page view component, the page view component can be realized by calling the target rendering engine instead of calling the system rendering engine, and the performance of the target rendering engine is superior to that of the system rendering engine, so that the page view component can be suitable for more development requirements, and developers do not need to additionally develop a set of independent rendering engines. Therefore, when a developer creates the installation package of the developed target object, the additional packaging of the rendering engine in the installation package is not needed, and the shared target rendering engine is directly adopted, so that the size of the installation package is reduced, and the development cost is also reduced.

Description

Rendering engine sharing method and device
Technical Field
The present application relates to the field of data processing, and in particular, to a method and an apparatus for sharing a rendering engine.
Background
With the technical development in the field of intelligent terminals, objects such as programs, applets, Applications (APPs), and the like deployed on the intelligent terminals can display Web pages through a WebView component to provide richer services for users. The page view component is a system component which is provided by an intelligent terminal system such as an android system and is used for displaying a Web page, and functions of displaying, rendering the Web page and the like are realized by calling a rendering engine of the intelligent terminal system.
However, rendering engines provided by the intelligent terminal system are weak in performance, most object developers can develop a set of rendering engines by themselves when developing objects capable of providing page view component functions, so that the objects can be created by calling the self-developed rendering engines when the intelligent terminal runs to create a page view component.
Therefore, when a developer issues an installation package of an object, the developer needs to pack a rendering engine developed by the developer in the installation package. Therefore, the volume of the installation package is increased, additional system resources are consumed for downloading and installing the installation package, and the development cost of the object is increased by the additionally developed rendering engine.
Disclosure of Invention
In order to solve the technical problem, the present application provides a method and an apparatus for sharing a rendering engine, which do not require extra packaging of the rendering engine in an installation package, and only directly use a shared target rendering engine, thereby reducing the size of the installation package and also reducing the development cost.
The embodiment of the application discloses the following technical scheme:
in a first aspect, an embodiment of the present application provides a method for sharing a rendering engine, where the method includes:
acquiring an installation package of a target object, wherein the target object has a function of providing services through a page view component, and a rendering engine aiming at the page view component is not packaged in the installation package;
installing the target object at the intelligent terminal through the installation package;
determining a target rendering engine before the target object creates a page view component;
replacing a system rendering engine of the intelligent terminal with the target rendering engine by initializing the running environment of the target rendering engine; the target rendering engine has better performance than the system rendering engine;
and if a request for establishing the page view component for the target object is obtained, establishing the page view component for the target object according to the target rendering engine.
Optionally, the determining the target rendering engine includes:
determining whether the target rendering engine is included in a shared area of the smart terminal;
if so, determining the target rendering engine from the shared area;
and if not, downloading the target rendering engine.
Optionally, after the determining the target rendering engine, the method further includes:
backing up the target rendering engine into a local directory in which the target object is installed.
Optionally, the method further includes:
sending a version detection request to a server, wherein the version detection request comprises version information of the target rendering engine;
obtaining, from the server, update content for version information of the target rendering engine;
and updating the target rendering engine according to the updating content.
Optionally, if the local directory in which the target object is installed and the shared area of the smart terminal both include the target rendering engine, before sending the version detection request to the server, the method further includes:
and if the version information of the target rendering engine in the shared area of the intelligent terminal is higher than the version information of the target rendering engine in the local directory, replacing the target rendering engine in the local directory with the target rendering engine in the shared area of the intelligent terminal.
Optionally, the target rendering engine includes a disparity parameter, and the disparity parameter is used to identify disparity of the system rendering engine in different versions.
Optionally, the creating a page view component for the target object according to the target rendering engine includes:
determining target version information of a system rendering engine of the intelligent terminal;
and creating a page view component for the target object through the target rendering engine according to the target version information and the difference parameters.
Optionally, the initializing the runtime environment of the target rendering engine includes:
acquiring a software development kit of the target rendering engine;
and initializing the running environment of the target rendering engine according to the software development toolkit.
Optionally, the replacing the system rendering engine of the smart terminal with the target rendering engine includes:
and replacing the system rendering engine of the intelligent terminal with the target rendering engine by creating an instance of the target rendering engine.
In a second aspect, an embodiment of the present application provides an apparatus for sharing a rendering engine, where the apparatus includes an obtaining unit, an installing unit, a determining unit, a replacing unit, and a creating unit:
the acquiring unit is used for acquiring an installation package of a target object, the target object has a function of providing services through the page view component, and a rendering engine aiming at the page view component is not packaged in the installation package;
the installation unit is used for installing the target object on the intelligent terminal through the installation package;
the determining unit is used for determining a target rendering engine before the target object creates the page view component;
the replacing unit is used for replacing a system rendering engine of the intelligent terminal with the target rendering engine by initializing the running environment of the target rendering engine; the target rendering engine has better performance than the system rendering engine;
and the creating unit is used for creating the page view component for the target object according to the target rendering engine if the request for creating the page view component for the target object is acquired.
Optionally, the determining unit is specifically configured to:
determining whether the target rendering engine is included in a shared area of the smart terminal;
if so, determining the target rendering engine from the shared area;
and if not, downloading the target rendering engine.
Optionally, the determining unit is further specifically configured to:
after the target rendering engine is determined, backing up the target rendering engine into a local directory in which the target object is installed.
Optionally, the determining unit is further specifically configured to:
sending a version detection request to a server, wherein the version detection request comprises version information of the target rendering engine;
obtaining, from the server, update content for version information of the target rendering engine;
and updating the target rendering engine according to the updating content.
Optionally, the determining unit is further specifically configured to:
if the local directory in which the target object is installed and the shared area of the intelligent terminal both include the target rendering engine, before the version detection request is sent to the server, if version information of the target rendering engine included in the shared area of the intelligent terminal is higher than version information of the target rendering engine included in the local directory, replacing the target rendering engine included in the local directory with the target rendering engine included in the shared area of the intelligent terminal.
Optionally, the target rendering engine includes a disparity parameter, and the disparity parameter is used to identify disparity of the system rendering engine in different versions.
Optionally, the creating unit is specifically configured to:
determining target version information of a system rendering engine of the intelligent terminal;
and creating a page view component for the target object through the target rendering engine according to the target version information and the difference parameters.
Optionally, the replacing unit is specifically configured to:
acquiring a software development kit of the target rendering engine;
and initializing the running environment of the target rendering engine according to the software development toolkit.
Optionally, the replacing unit is further specifically configured to:
and replacing the system rendering engine of the intelligent terminal with the target rendering engine by creating an instance of the target rendering engine.
In a third aspect, an embodiment of the present application provides a shared device for a rendering engine, including a memory, and one or more programs, where the one or more programs are stored in the memory, and configured to be executed by one or more processors, the one or more programs including instructions for:
acquiring an installation package of a target object, wherein the target object has a function of providing services through a page view component, and a rendering engine aiming at the page view component is not packaged in the installation package;
installing the target object at the intelligent terminal through the installation package;
determining a target rendering engine before the target object creates a page view component;
replacing a system rendering engine of the intelligent terminal with the target rendering engine by initializing the running environment of the target rendering engine; the target rendering engine has better performance than the system rendering engine;
and if a request for establishing the page view component for the target object is obtained, establishing the page view component for the target object according to the target rendering engine.
Optionally, the processor executing the one or more programs includes instructions for:
determining whether the target rendering engine is included in a shared area of the smart terminal;
if so, determining the target rendering engine from the shared area;
and if not, downloading the target rendering engine.
Optionally, the processor executing the one or more programs includes instructions for:
backing up the target rendering engine into a local directory in which the target object is installed.
Optionally, the processor executing the one or more programs includes instructions for:
sending a version detection request to a server, wherein the version detection request comprises version information of the target rendering engine;
obtaining, from the server, update content for version information of the target rendering engine;
and updating the target rendering engine according to the updating content.
Optionally, the processor executing the one or more programs includes instructions for:
and if the version information of the target rendering engine in the shared area of the intelligent terminal is higher than the version information of the target rendering engine in the local directory, replacing the target rendering engine in the local directory with the target rendering engine in the shared area of the intelligent terminal.
Optionally, the target rendering engine includes a disparity parameter, and the disparity parameter is used to identify disparity of the system rendering engine in different versions.
Optionally, the processor executing the one or more programs includes instructions for:
determining target version information of a system rendering engine of the intelligent terminal;
and creating a page view component for the target object through the target rendering engine according to the target version information and the difference parameters.
Optionally, the processor executing the one or more programs includes instructions for:
acquiring a software development kit of the target rendering engine;
and initializing the running environment of the target rendering engine according to the software development toolkit.
Optionally, the processor executing the one or more programs includes instructions for:
and replacing the system rendering engine of the intelligent terminal with the target rendering engine by creating an instance of the target rendering engine.
In a fourth aspect, embodiments of the present application provide a machine-readable medium having stored thereon instructions, which when executed by one or more processors, cause an apparatus to perform a method of sharing a rendering engine as described in one or more of the first aspects.
According to the technical scheme, before the page view component is created by the target object, the operation environment of the target rendering engine can be initialized, and the target rendering engine can replace the original system rendering engine of the system deployed by the intelligent terminal through the initialization of the operation environment. Therefore, when the target object needs to create the page view component, the page view component can be realized by calling the target rendering engine instead of calling the system rendering engine, and the performance of the target rendering engine is superior to that of the system rendering engine, so that the page view component can be suitable for more development requirements, and developers do not need to additionally develop a set of independent rendering engines. Therefore, when a developer creates the installation package of the developed target object, the additional packaging of the rendering engine in the installation package is not needed, and the shared target rendering engine is directly adopted, so that the size of the installation package is reduced, and the development cost is also reduced.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
Fig. 1 is a flowchart of a sharing method for rendering engines according to an embodiment of the present disclosure;
fig. 2 is a schematic diagram of an architecture of an android system involved in a process of creating a page view component according to an embodiment of the present application;
fig. 3 is a structural diagram of a sharing device of a rendering engine according to an embodiment of the present disclosure;
fig. 4 is a block diagram of a terminal device 400 according to an embodiment of the present application;
fig. 5 is a block diagram of a server according to an embodiment of the present application.
Detailed Description
Embodiments of the present application are described below with reference to the accompanying drawings.
At present, when a developer develops an object, in order to solve the problem that a system rendering engine provided by an intelligent terminal is poor in performance, the self-developed rendering engine is packaged in an installation package of the object, so that the volume of the installation package is increased, extra system resources are consumed for downloading and installing the installation package, and the development cost of the object is increased by the additionally developed rendering engine.
Therefore, the embodiment of the application provides a method for sharing a rendering engine, and by providing a target rendering engine with performance superior to that of a system rendering engine as a shared rendering engine, any object which is installed on an intelligent terminal can be called to create a page view component with better performance and provide subsequent services when the page view component corresponding to the object needs to be created, instead of calling the rendering engines in respective installation packages by each object, so as to achieve the function of creating the page view component. Therefore, development possibility based on the shared rendering engine with better performance is provided for developers.
Next, an application scenario of the embodiment of the present application is introduced, where the application scenario of the present application may include an intelligent terminal, and the intelligent terminal executes the method for sharing the rendering engine provided in the embodiment of the present application. The intelligent terminal may be a smart phone, a computer, a Personal Digital Assistant (PDA), a tablet computer, or the like.
In the method, after downloading an installation package of a target object to an intelligent terminal, the target object may be installed, where the target object may be an object that provides a service through a page view component to implement some functions, and a rendering engine that provides background logic for the page view component is not included in the installation package of the target object, for example: the target object can be a game APP providing a webpage display function through a page view component, and a rendering engine is not packaged in an installation package of the target object. Then, for such a target object that has been installed on the smart terminal, before creating a page view component corresponding to the target object, a target rendering engine, that is, a shared rendering engine, whose performance is superior to that of a system rendering engine may be determined, and when a page view component corresponding to the target object needs to be created, a page view component corresponding to the target object may be created according to the shared target rendering engine.
In the embodiment of the present application, for a target object, functions such as creating a page view component corresponding to the target object may be implemented by calling a shared target rendering engine, instead of calling a system rendering engine with a weaker performance, through a mechanism of replacing a rendering engine. The rendering engine replacement mechanism may be configured to, after the shared target rendering engine is determined, initialize the runtime environment for the target rendering engine to make the runtime environment suitable for the target rendering engine, thereby replacing the target rendering engine with a system rendering engine, that is, implementing processing logic for providing a web view component function for the target object by the target rendering engine. It should be noted that the operations of the replacement rendering engine in the embodiment of the present application are directed to the target object, and should not be understood as being directed to the entire smart terminal system. Therefore, when the page view component corresponding to the target object needs to be created, the page view component corresponding to the target object can be created according to the shared rendering engine, namely the target rendering engine with better performance, and subsequent services can be provided.
Therefore, according to the sharing method of the rendering engine provided by the embodiment of the application, the shared rendering engine with better performance is provided, so that the webpage view component function of the target object can be realized by calling the shared rendering engine aiming at different objects which are installed on the intelligent terminal. Moreover, when a developer creates an installation package of the developed target object, the developer does not need to additionally pack the rendering engine in the installation package, but directly adopts the shared target rendering engine, so that the size of the installation package is reduced, and the additional system resources consumed by downloading and installing the installation package are avoided.
Next, a method for creating a page view component provided by an embodiment of the present application will be described with reference to fig. 1, which is a flowchart illustrating a method for creating a page view component provided by an embodiment of the present application, where the method includes:
s101: and acquiring an installation package of the target object.
The target object may be an object that implements some functions by providing a service through a page view component, and a rendering engine that provides background logic for the page view component is not included in an installation package of the target object, and the installation package of the target object may be a file for installing the target object.
S102: and installing the target object at the intelligent terminal through the installation package.
After the installation package of the target object is obtained, the target object can be installed on the intelligent terminal according to the installation package.
S103: determining a target rendering engine before the target object creates a page view component.
Aiming at a system rendering engine in the intelligent terminal, a rendering engine with better performance than the system rendering engine can be developed in advance and is marked as a target rendering engine. In specific implementation, the target rendering engine may be a dog search browser kernel, where the dog search browser kernel is a browsing kernel with strong performance and rich functions, which is deeply developed based on google chrome, and the performance of the dog search browser kernel is greatly superior to that of a system rendering engine under android systems of different versions, so that the performance of a page view component in the android system can be improved. In addition, the kernel of the dog searching browser can be stored in an installation package of a dog searching browser APP in the intelligent terminal, or in an installation package of a dog searching input method APP, or in APPs of other dog searching products.
In this embodiment of the application, before creating the page view component corresponding to the target object, a target rendering engine may be determined.
It should be noted that, the embodiment of the present application does not limit the specific method for determining the target rendering engine, and the determination method for adaptability may be selected and set according to different determination requirements.
In the embodiment of the application, after the target object is installed, if the target rendering engine is included in the local directory in which the target object is installed, the target rendering engine may be directly determined for the target object in the local directory in which the target object is installed, where the local directory of the object may be a directory corresponding to the object installed in the intelligent terminal by the user. If the target rendering engine is not included in the local directory in which the target object is installed, the target rendering engine cannot be determined from the local directory in which the target object is installed, and the target rendering engine under the local directory of other objects cannot be directly called. In one possible implementation, the method for determining a target rendering engine may include:
s201: determining whether the target rendering engine is included in a shared area of the smart terminal.
The intelligent terminal may include a shared area, and the shared area may be used to store common files, data, and the like, so as to facilitate calling of different objects deployed in the intelligent terminal. In a specific implementation, the shared area of the smart terminal may be an SD card in the smart terminal.
It is understood that in an actual scenario, a situation may occur where a target rendering engine is already included in the shared area of the smart terminal, such as: the user has downloaded the target rendering engine into a shared area of the smart terminal to facilitate invocation of objects installed on the smart terminal. Or, the target rendering engine is included in the installation package of other objects on the intelligent terminal, and the target rendering engine in the installation package of the object is backed up to the shared area. For example, if the installation package of the dog search browser APP of the intelligent terminal includes a dog search browser kernel, the dog search browser kernel in the installation package can be backed up to the SD card of the intelligent terminal. Alternatively, the method may have already been performed for other objects before the shared method of the rendering engine is performed for the current target object. Then, if the method has been previously performed for other objects, the target rendering engine may have been downloaded into the shared area of the smart terminal during the previous execution of the other objects. Such as: if the current target object is object a, which may have been executed for object B before the sharing method of the rendering engine is executed for current object a, it is understood that the target rendering engine should have been saved in the shared area of the smart terminal after the target rendering engine is determined for object B.
Then, in the embodiment of the present application, it may be determined whether a target rendering engine is included in the shared area of the smart terminal. If yes, go to step S202, otherwise go to step S203.
S202: determining the target rendering engine from the shared region.
S203: downloading the target rendering engine.
The target rendering engine can be downloaded through downloading the target rendering engine at the cloud end or downloading the installation package of the object comprising the target rendering engine, for example, downloading a dog browser kernel, or downloading dog product APP installation packages such as a dog browser APP comprising the dog browser kernel.
Therefore, according to the method for determining the target rendering engine, whether the target rendering engine is included is determined in the shared area of the intelligent terminal, if yes, the target rendering engine can be directly determined without downloading the target rendering engine, so that waste of system resources can be reduced, and the determination efficiency of the target rendering engine is improved. If not, the target rendering engine is downloaded, so that the target rendering engine can be provided for other objects conveniently.
After determining the target rendering engine, to facilitate invoking the target rendering engine for the target object, in one possible implementation, the determined target rendering engine may be backed up into a local directory in which the target object is installed. Such as: the current target rendering engine is stored in the SD card, and the local directory in which the target object is installed may be a directory corresponding to the target object installed in the smart terminal by the user, and if the user installs the target object under a data/app directory in the smart terminal, the data/app directory may be the local directory in which the target object is installed. A target rendering engine may be backed up in a local directory corresponding to the target object, such as a data/app directory. Therefore, when the target rendering engine is called for the target object to perform corresponding steps, the calling speed of the target rendering engine can be increased. It can be understood that, for any object that has been installed in the intelligent terminal, a target rendering engine is backed up in its local directory, so that when the target rendering engine is called for each object, the object can be called in its local directory, thereby improving the calling efficiency of the target rendering engine.
S104: replacing a system rendering engine of the intelligent terminal with the target rendering engine by initializing the running environment of the target rendering engine; the target rendering engine has better performance than the system rendering engine.
In the embodiment of the application, after the target rendering engine is determined, the target rendering engine may be initialized to run the environment, so that the current environment is suitable for running of the target rendering engine, and the basic condition for replacing the rendering engine with the target object is provided, so that the system rendering engine of the intelligent terminal deploying the target object may be replaced with the target rendering engine with better performance.
S105: and if a request for establishing the page view component for the target object is obtained, establishing the page view component for the target object according to the target rendering engine.
In the embodiment of the application, when a page view component corresponding to a target object needs to be created, a request for generating the page view component corresponding to the target object is generated correspondingly, and if a requirement for creating the page view component corresponding to the target object is obtained, because the rendering engine is replaced for the target object, the page view component corresponding to the target object can be created according to a target rendering engine with better performance.
For example: the method comprises the steps that a mobile phone serves as an intelligent terminal, a game APP with a webpage page display function and installed on the mobile phone serves as a target object, the intelligent mobile phone comprises an original system rendering engine A and a target rendering engine B with performance superior to that of the system rendering engine A. After step S104 is completed, that is, after the system rendering engine a in the mobile phone is replaced with the target rendering engine B, when a page view component corresponding to the game APP needs to be created, a request for generating the page view component corresponding to the target object may be correspondingly generated, and if a page view component requirement corresponding to the created target object is obtained, the page view component corresponding to the game APP may be created according to the target rendering engine B with better performance.
After the page view component corresponding to the target object is created according to the target rendering engine, the webpage of the target object can be downloaded, analyzed and rendered through the target rendering engine.
Therefore, according to the sharing method of the rendering engine provided by the embodiment of the application, the shared rendering engine with better performance is provided, so that the webpage view component function of the target object can be realized by calling the shared rendering engine aiming at different objects which are installed on the intelligent terminal. Moreover, when a developer creates an installation package of the developed target object, the developer does not need to additionally pack the rendering engine in the installation package, but directly adopts the shared target rendering engine, so that the size of the installation package is reduced, and the additional system resources consumed by downloading and installing the installation package are avoided.
In the embodiment of the present application, the function of updating the shared rendering engine may be provided, that is, for a shared rendering engine in the smart terminal, that is, a target rendering engine, if a latest version of the target rendering engine is released, the target rendering engine in the smart terminal may be updated to the latest version of the target rendering engine. Then, in one possible implementation, the method for updating the target rendering engine may include, for example:
s301: sending a version detection request to a server, the version detection request including version information of the target rendering engine.
In this embodiment, the server may be a release platform of a latest version target rendering engine, and then, a version detection request may be sent to the server, where the version detection request may include version information of a target rendering engine of the smart terminal, where the version information of the target rendering engine described herein may be used to indicate a version to which the target rendering engine belongs, for example, the version information of the target rendering engine may be "1.0" to indicate that the target rendering engine is the first version. That is, a version check request including version information of a target rendering engine in the smart terminal may be transmitted to the server. For example: a target rendering engine a is deployed in an intelligent terminal, which is a mobile phone, where the target rendering engine a is a first version and the corresponding version information is "1.0", a version detection request may be sent to a server, where the version detection request may include the version information "1.0" of the target rendering engine.
S302: update content for version information of the target rendering engine is acquired from the server.
S303: and updating the target rendering engine according to the updating content.
In this embodiment of the application, after receiving the version detection request, the server may determine, according to the version information of the target rendering engine in the version detection request, the update content of the version information of the target rendering engine, and send the update content of the version information of the target rendering engine to the intelligent terminal. The update content may be content for updating the target rendering engine in the intelligent terminal to the latest version of the target rendering engine, and it is understood that the update content may include content in the target rendering engine installation package in the intelligent terminal, or may not include content in the target rendering engine installation package in the intelligent terminal. Such as: assuming that the installation package of the target rendering engine in the current intelligent terminal is A, and the updating content is A + B, wherein the updating content comprises the content in the target rendering engine installation package in the intelligent terminal; correspondingly, if the installation package of the target rendering engine in the current intelligent terminal is a and the update content is B, the situation is that the content of the target rendering engine packaging package in the intelligent terminal is not included in the update content. And the intelligent terminal acquires the update content of the version information of the target rendering engine from the server and updates the target rendering engine in the intelligent terminal to the latest version of the target rendering engine according to the update content.
For example: assuming that the target rendering engine published by the current server with the latest version is the third version target rendering engine, and the version information of the third version target rendering engine is "3.0", after receiving the version detection request including the version information of the target rendering engine, namely "1.0", the server may determine the update content "W" corresponding to the version information of the target rendering engine according to the version information "1.0" of the target rendering engine in the version detection request, and send the update content "W" of the version information of the target rendering engine to the mobile phone. The mobile phone acquires the update content 'W' of the version information of the target rendering engine from the server, and updates the target rendering engine of the first version in the mobile phone to the target rendering engine of the latest version, namely the third version according to the update content 'W'.
In addition, if the server determines that the target rendering engine is the current latest version of the target rendering engine according to the version information of the target rendering engine in the version detection request, the server may send information that the version update is not required to the intelligent terminal, and the intelligent terminal finishes the updating step after receiving the information. Therefore, the target rendering engine in the shared area of the intelligent terminal is updated, so that functions of creating a page view component and the like can be realized by calling the target rendering engine of the latest version in the next step, and development possibility of the target rendering engine of the latest version based on better performance is provided for developers. Moreover, all the intelligent terminals which are distributed on the market and comprise the target rendering engines can carry out the steps to update the target rendering engines, so that the target rendering engines on the market can be quickly updated to the target rendering engines of the latest version. In addition, only the system rendering engine with a smaller volume needs to be updated, and the corresponding updating time is shorter, so that the updating operation of a user is facilitated, the versions of the target rendering engines in the current market can be unified, and the problem that the target rendering engines in the current market are too many in version, namely, the target rendering engines are fragmented is solved.
The method for updating the target rendering engine can be used for updating the target rendering engine in the shared area of the intelligent terminal, so that the rendering engine called for the object in the intelligent terminal can be ensured to be the target rendering engine of the latest version. In addition, the updating method can also be used for updating the target rendering engine in the local directory of the installed target object in the intelligent terminal, so that the target rendering engine of the latest version is called for each object in the intelligent terminal, and the effect of the object when the function is realized based on the target rendering engine is improved.
In this embodiment of the present application, it may be a case that the target rendering engine in the shared area of the smart terminal is updated, but the target rendering engine included in the local directory is not updated, and in a possible implementation manner, if the target rendering engine is included in both the local directory in which the target object is installed and the shared area of the smart terminal, before performing step S301, the updating may be performed by the following method, including: if the version information of the target rendering engine included in the shared region of the smart terminal is higher than the version information of the target rendering engine included in the local directory, the target rendering engine included in the local directory may be replaced with the target rendering engine included in the shared region of the smart terminal.
That is, if the version of the target rendering engine included in the shared region of the smart terminal is higher than the version of the target rendering engine included in the local directory, the target rendering engine included in the local directory may be replaced with the target rendering engine included in the shared region of the smart terminal, so that the target rendering engine included in the local directory is updated to the higher version of the target rendering engine. Such as: the version information of the target rendering engine included in the shared area of the smart terminal may be "3.0", indicating that the target rendering engine is the third version; the version information of the target rendering engine included in the local directory may be "1.0", which indicates that the target rendering engine is the first version, and the version of the target rendering engine of the third version included in the shared area of the smart terminal is higher, and then the target rendering engine of the first version included in the local directory may be replaced with the target rendering engine of the third version included in the shared area of the smart terminal. Therefore, the method for updating the target rendering engine under the local directory for installing the target object can only transmit data in the intelligent terminal without interacting with the server, so that waste of system resources is reduced.
It should be noted that, the embodiment of the present application does not limit a specific method for initializing the operating environment of the target rendering engine, and the determination mode of the adaptability may be selected and set according to different determination requirements. With respect to S401, in a possible implementation manner, a method for initializing a runtime environment of a target rendering engine may include:
s401: and acquiring a software development kit of the target rendering engine.
In the embodiment of the present application, a Software Development Kit (SDK) of a target rendering engine may be developed in advance for the target rendering engine, and the SDK of the target rendering engine may be a set including documents, paradigms, tools, and the like related to the specific implementation of replacing the system rendering engine with the target rendering engine. When the target rendering engine needs to be initialized with the runtime environment, the SDK of the target rendering engine may be obtained.
S402: and initializing the running environment of the target rendering engine according to the software development toolkit.
In the embodiment of the application, the initialization of the running environment of the target rendering engine can be realized by initializing the SDK of the target rendering engine according to the acquired SDK of the target rendering engine. Such as: the SDK of the target rendering engine may include information such as parameters related to the operating environment of the target rendering engine, and the parameters related to the operating environment of the target rendering engine may be quickly reset by initializing the SDK of the target rendering engine.
Therefore, only one software development kit, namely the SDK of the target rendering engine, is initialized, so that the current running environment is suitable for running of the target rendering engine, and the initialization efficiency is improved.
In addition, the embodiment of the application does not limit a specific method for replacing the system rendering engine of the intelligent terminal with the target rendering engine, and the determination mode of adaptability can be selected and set according to different determination requirements. For S104, in one possible implementation, the method may include: and replacing the system rendering engine of the intelligent terminal with the target rendering engine by creating an instance of the target rendering engine. The instance described herein may be a process and the instance of the target rendering engine may be a process associated with the target rendering engine, e.g., the instance of the target rendering engine may be a process that invokes an interface of the target rendering engine. That is, replacing the system rendering engine of the smart terminal with the target rendering engine may be accomplished by creating an instance of the target rendering engine.
The following is a description of a specific example: referring to fig. 2, the figure shows an architectural diagram of an android system involved in creating a page view component according to an embodiment of the present application. As shown in fig. 2, the architecture diagram shown in fig. 2 connected by solid lines corresponds to: the method comprises the steps of calling an instance of a system rendering engine to realize the background logic of taking the system rendering engine as a page view component corresponding to a target object, and thus creating the page view component corresponding to the target object according to the system rendering engine; and the architecture diagram shown in fig. 2, connected by dashed lines, corresponds to the method provided by the embodiments of the present application, namely: the method comprises the steps of initializing a running environment of a target rendering engine to enable the current running environment to be suitable for the target rendering engine, creating an instance of the target rendering engine, wherein the instance can be a process for calling an interface of the target rendering engine, and enabling the target rendering engine to serve as background logic of page view software corresponding to a target object instead of a system rendering engine through the process, so that the system rendering engine is replaced by the target rendering engine.
In a specific implementation, for an intelligent terminal of an android system, initializing an SDK of a target rendering engine to enable a current running environment to be suitable for running of the target rendering engine, taking an application framework layer (frames) in the android system as a starting point to create an instance of an mProvider interface for calling the target rendering engine, so as to replace the system rendering engine with the target rendering engine. The application framework layer can be used for providing API methods and services for objects in the intelligent terminal.
Therefore, the method can replace the system rendering engine of the intelligent terminal with the target rendering engine only by creating the example of the target rendering engine, so that the replacement efficiency of the rendering engine is improved.
With the upgrade of the intelligent terminal system, the version of the rendering engine called by the page view component may also be updated, and the working mechanisms of the rendering engines of different versions may be different, for example, an Application Programming Interface (API) to be accessed may be updated, deleted, modified, and the like as the versions are changed.
However, the styles, models, and manufacturers of the smart terminals currently circulating in the market are different, and the versions of the systems deployed in the smart terminals are not uniform, that is, rendering engines of multiple versions are circulating in the market at the same time. Therefore, when the developer of the object develops the object, the object needs to be capable of adapting to rendering engines of different versions in order to enable the object to use the page view component, and development cost is greatly increased.
In order to solve the problem caused by the excessive versions of the system rendering engine, in a possible implementation manner, the target rendering engine provided in the embodiment of the present application may include a difference parameter, where the difference parameter may be used to identify differences of the system rendering engine in different versions.
In the current market, a plurality of different versions of intelligent terminal systems generally circulate, and the different versions of intelligent terminal systems correspond to different versions of system rendering engines, that is, different versions of system rendering engines circulate in the current market, such as: suppose that the currently marketed android system has three versions, namely version 1, version 2 and version 3, and for the android system with the three versions, the android system can correspond to system rendering engines with three different versions, namely a system rendering engine with a first version, a system rendering engine with a second version and a system rendering engine with a third version. There may also be differences between different versions of the system rendering engine, as illustrated by a specific example below: for the aforementioned three different versions of system rendering engines, there may be identity included between them, such as: when the function A needs to be realized, the three versions of the system rendering engine need to realize the function by calling the interface a. Differences may also be included for the three system rendering engines in different versions, such as: when the function B needs to be realized, the system rendering engine of the first version needs to realize the function by calling the interface a; the second version of the system rendering engine needs to realize the function by calling the interface b; the third version of the system rendering engine needs to implement this function by calling interface c.
Therefore, for differences among the three system rendering engines when the function B is implemented, the differences of the three system rendering engines can be identified through the difference parameters. It will be appreciated that the above example is only one possible scenario, and in an actual scenario, the target rendering engine includes a disparity parameter that includes the overall disparity of the system rendering engines in different versions.
In this embodiment of the application, the difference parameter may identify differences of system rendering engines of all different versions currently in circulation, or may identify differences of system rendering engines of at least two different versions.
In this way, because the target rendering engine includes the difference parameter, and the difference parameter is used to identify the difference of the system rendering engines in different versions, for each version of the system rendering engines in different versions, the target rendering engine may implement the corresponding function that the system rendering engine can implement through the same working mechanism as the system rendering engine based on the difference parameter. Such as: the difference parameters of the target rendering engine include a rendering engine of a first version system of the android system, and when the function B is implemented, the interface to be invoked is information of the interface a, so that the target rendering engine can also invoke the interface a according to the difference parameters to implement the function B. Therefore, each version of the system rendering engine in different versions can be replaced by the target rendering engine, and the functions which can be realized by the system rendering engine are realized by the same working mechanism as the system rendering engine, so that the influence on the system where the replaced system rendering engine is located is relatively small. That is to say, the target rendering engine has higher compatibility for different versions of systems (such as an android system), and can be adapted to intelligent terminals under different versions of systems.
In a specific implementation, for a target rendering engine, a dog browser kernel, the target rendering engine may support the Android 4.1 version at the lowest, and in all systems of the Android 4.1 version and above, behaviors of the dog browser kernel may be consistent with those of a system rendering engine in an Android system of a corresponding version, that is, the dog browser kernel has high compatibility.
In this embodiment of the application, after the replacement of the rendering engine is completed, the target rendering engine may implement, based on the difference parameter, the function that the system rendering engine can implement with the same working mechanism as the system rendering engine. In a possible implementation manner, for the method for creating a page view component corresponding to the target object according to the target rendering engine in step S105, the method may include:
s501: and determining target version information of a system rendering engine of the intelligent terminal.
The system rendering engines under different versions may all correspond to corresponding version information, and the version information of a system rendering engine may be used to indicate a system version to which the system rendering engine belongs, for example: for a first version of the system rendering engine, its corresponding system version information may be "1.0". Then, in this embodiment of the present application, the version information of the system rendering engine in the current intelligent terminal may be recorded as target version information, and for the intelligent terminal, the target version information of the system rendering engine in the intelligent terminal is determined.
For example: assuming that a system rendering engine circulating in the current market includes a first version system rendering engine, a second version system rendering engine and a third version system rendering engine, and a mobile phone is used as a current intelligent terminal, the mobile phone includes the first version system rendering engine, and version information of the first version system rendering engine is "1.0", then, for the current mobile phone, it is determined that target version information of the system rendering engine in the mobile phone is "1.0".
S502: and creating a page view component corresponding to the target object through the target rendering engine according to the target version information and the difference parameters.
In the embodiment of the application, a working mechanism of the system rendering engine of the current intelligent terminal when the page view component corresponding to the target object is created can be determined according to version information of the system rendering engine in the current intelligent terminal, that is, target version information, and difference parameters included by the target rendering engine, and according to the working mechanism, the target rendering engine realizes creation of the page view component corresponding to the target object.
The following is a description of a specific example: it is assumed that the currently marketed android system has three versions, namely version 1, version 2 and version 3, and under the versions of the three android systems, three different versions of system rendering engines can be correspondingly provided, namely a first version of system rendering engine, a second version of system rendering engine and a third version of system rendering engine. Then, for these three system rendering engines under different versions, there may be differences in implementing the function of creating the page view component corresponding to the target object, such as: the system rendering engine of the first version needs to realize the function by calling the interface a; the second version of the system rendering engine needs to realize the function by calling the interface b; the third version of the system rendering engine needs to implement this function by calling interface c. Because the difference parameters of the target rendering engine include the difference corresponding to the creation of the page view component corresponding to the target object, it may be determined that the target version information of the system rendering engine in the mobile phone is "1.0", and the rendering engine corresponding to the target rendering engine is the first version system rendering engine, and it may be determined that the first version system rendering engine needs to call the interface a to implement the function of the page view component corresponding to the created target object according to the difference parameters, so the target rendering engine may also implement the function of the page view component corresponding to the created target object by calling the interface a.
Therefore, based on the fact that the target rendering engine has high compatibility for different versions of systems (such as an android system), the method can be adapted to the advantages of intelligent terminals under different versions of systems, and for different versions of system rendering engines, the target rendering engine can be replaced by the target rendering engine, and functions of creating a page view component corresponding to a target object and the like are realized through the target rendering engine, so that a developer can develop the object only according to the target system engine, and does not need to pay attention to differences of the system rendering engines under different versions.
Based on the rendering engine sharing method provided in the embodiment corresponding to fig. 1, an embodiment of the present application provides a rendering engine sharing device, see fig. 3, which shows a structure diagram of a rendering engine sharing device provided in an embodiment of the present application, and as shown in fig. 3, the device includes an obtaining unit 301, an installing unit 302, a determining unit 303, a replacing unit 304, and a creating unit 305:
the obtaining unit 301 is configured to obtain an installation package of a target object, where the target object has a function of providing a service through a page view component, and a rendering engine for the page view component is not packaged in the installation package;
the installation unit 302 is configured to install the target object in the smart terminal through the installation package;
the determining unit 303 is configured to determine a target rendering engine before the target object creates a page view component;
the replacing unit 304 is configured to replace the system rendering engine of the intelligent terminal with the target rendering engine by initializing the running environment of the target rendering engine; the target rendering engine has better performance than the system rendering engine;
the creating unit 305 is configured to create a page view component for the target object according to the target rendering engine if a request for creating the page view component for the target object is obtained.
Optionally, the determining unit 303 is specifically configured to:
determining whether the target rendering engine is included in a shared area of the smart terminal;
if so, determining the target rendering engine from the shared area;
and if not, downloading the target rendering engine.
Optionally, the determining unit 303 is further specifically configured to:
after the target rendering engine is determined, backing up the target rendering engine into a local directory in which the target object is installed.
Optionally, the determining unit 303 is further specifically configured to:
sending a version detection request to a server, wherein the version detection request comprises version information of the target rendering engine;
obtaining, from the server, update content for version information of the target rendering engine;
and updating the target rendering engine according to the updating content.
Optionally, the determining unit 303 is further specifically configured to:
if the local directory in which the target object is installed and the shared area of the intelligent terminal both include the target rendering engine, before the version detection request is sent to the server, if version information of the target rendering engine included in the shared area of the intelligent terminal is higher than version information of the target rendering engine included in the local directory, replacing the target rendering engine included in the local directory with the target rendering engine included in the shared area of the intelligent terminal.
Optionally, the target rendering engine includes a disparity parameter, and the disparity parameter is used to identify disparity of the system rendering engine in different versions.
Optionally, the creating unit 305 is specifically configured to:
determining target version information of a system rendering engine of the intelligent terminal;
and creating a page view component for the target object through the target rendering engine according to the target version information and the difference parameters.
Optionally, the replacing unit 304 is specifically configured to:
acquiring a software development kit of the target rendering engine;
and initializing the running environment of the target rendering engine according to the software development toolkit.
Optionally, the replacing unit 304 is further specifically configured to:
and replacing the system rendering engine of the intelligent terminal with the target rendering engine by creating an instance of the target rendering engine.
According to the technical scheme, before the page view component is created by the target object, the operation environment of the target rendering engine can be initialized, and the target rendering engine can replace the original system rendering engine of the system deployed by the intelligent terminal through the initialization of the operation environment. Therefore, when the target object needs to create the page view component, the page view component can be realized by calling the target rendering engine instead of calling the system rendering engine, and the performance of the target rendering engine is superior to that of the system rendering engine, so that the page view component can be suitable for more development requirements, and developers do not need to additionally develop a set of independent rendering engines. Therefore, when a developer creates the installation package of the developed target object, the additional packaging of the rendering engine in the installation package is not needed, and the shared target rendering engine is directly adopted, so that the size of the installation package is reduced, and the development cost is also reduced.
Based on the foregoing rendering engine sharing method and apparatus, the present embodiment provides a rendering engine sharing device, where the rendering engine sharing device may be a terminal device, and fig. 4 is a block diagram of a terminal device 400 according to an exemplary embodiment. For example, the terminal device 400 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, and the like.
Referring to fig. 4, the terminal device 400 may include one or more of the following components: processing components 402, memory 404, power components 406, multimedia components 408, audio components 410, input/output (I/O) interfaces 412, sensor components 414, and communication components 416.
The processing component 402 generally controls overall operation of the terminal device 400, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing element 402 may include one or more processors 420 to execute instructions to perform all or part of the steps of the methods described above. Further, the processing component 402 can include one or more modules that facilitate interaction between the processing component 402 and other components. For example, the processing component 402 can include a multimedia module to facilitate interaction between the multimedia component 308 and the processing component 402.
The memory 404 is configured to store various types of data to support operations at the terminal device 400. Examples of such data include instructions for any application or method operating on the device 400, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 404 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power supply component 406 provides power to the various components of the terminal device 400. The power components 406 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the apparatus 400.
The multimedia component 408 comprises a screen providing an output interface between the terminal device 400 and the user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 408 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the terminal device 400 is in an operation mode, such as a photographing mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 410 is configured to output and/or input audio signals. For example, audio component 410 includes a Microphone (MIC) configured to receive external audio signals when apparatus 400 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 404 or transmitted via the communication component 416. In some embodiments, audio component 410 also includes a speaker for outputting audio signals.
The I/O interface 412 provides an interface between the processing component 402 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor component 414 includes one or more sensors for providing various aspects of status assessment for the terminal device 400. For example, sensor component 414 can detect an open/closed status of terminal device 400, the relative positioning of components, such as a display and keypad of terminal device 400, sensor component 414 can also detect a change in the position of terminal device 400 or a component of terminal device 400, the presence or absence of user contact with terminal device 400, orientation or acceleration/deceleration of terminal device 400, and a change in the temperature of terminal device 400. The sensor assembly 414 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 414 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 414 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 416 is configured to facilitate wired or wireless communication between the terminal device 400 and other devices. The terminal device 400 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 416 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 416 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the terminal device 400 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 404 comprising instructions, executable by the processor 420 of the terminal device 400 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
A non-transitory computer readable storage medium having instructions therein, which when executed by a processor of a mobile terminal, enable the mobile terminal to perform a method of sharing a rendering engine, the method comprising:
acquiring an installation package of a target object, wherein the target object has a function of providing services through a page view component, and a rendering engine aiming at the page view component is not packaged in the installation package;
installing the target object at the intelligent terminal through the installation package;
determining a target rendering engine before the target object creates a page view component;
replacing a system rendering engine of the intelligent terminal with the target rendering engine by initializing the running environment of the target rendering engine; the target rendering engine has better performance than the system rendering engine;
and if a request for establishing the page view component for the target object is obtained, establishing the page view component for the target object according to the target rendering engine.
Fig. 5 is a schematic structural diagram of a server in an embodiment of the present invention. The server 500 may vary widely in configuration or performance and may include one or more Central Processing Units (CPUs) 522 (e.g., one or more processors) and memory 532, one or more storage media 530 (e.g., one or more mass storage devices) storing applications 542 or data 544. Memory 532 and storage media 530 may be, among other things, transient storage or persistent storage. The program stored on the storage medium 530 may include one or more modules (not shown), each of which may include a series of instruction operations for the server. Still further, the central processor 522 may be configured to communicate with the storage medium 530, and execute a series of instruction operations in the storage medium 530 on the server 500.
The server 500 may also include one or more power supplies 526, one or more wired or wireless network interfaces 550, one or more input-output interfaces 558, one or more keyboards 556, and/or one or more operating systems 541, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
Those of ordinary skill in the art will understand that: all or part of the steps for realizing the method embodiments can be completed by hardware related to program instructions, the program can be stored in a computer readable storage medium, and the program executes the steps comprising the method embodiments when executed; and the aforementioned storage medium may be at least one of the following media: various media that can store program codes, such as read-only memory (ROM), RAM, magnetic disk, or optical disk.
It should be noted that, in the present specification, all the embodiments are described in a progressive manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus and system embodiments, since they are substantially similar to the method embodiments, they are described in a relatively simple manner, and reference may be made to some of the descriptions of the method embodiments for related points. The above-described embodiments of the apparatus and system are merely illustrative, and the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
The above description is only one specific embodiment of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present application should be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A method of sharing a rendering engine, the method comprising:
acquiring an installation package of a target object, wherein the target object has a function of providing services through a page view component, and a rendering engine aiming at the page view component is not packaged in the installation package;
installing the target object at the intelligent terminal through the installation package;
determining a target rendering engine before the target object creates a page view component;
replacing a system rendering engine of the intelligent terminal with the target rendering engine by initializing the running environment of the target rendering engine; the target rendering engine has better performance than the system rendering engine;
and if a request for establishing the page view component for the target object is obtained, establishing the page view component for the target object according to the target rendering engine.
2. The method of claim 1, wherein the determining the target rendering engine comprises:
determining whether the target rendering engine is included in a shared area of the smart terminal;
if so, determining the target rendering engine from the shared area;
and if not, downloading the target rendering engine.
3. The method of claim 1, wherein after the determining a target rendering engine, the method further comprises:
backing up the target rendering engine into a local directory in which the target object is installed.
4. The method according to any one of claims 1-3, further comprising:
sending a version detection request to a server, wherein the version detection request comprises version information of the target rendering engine;
obtaining, from the server, update content for version information of the target rendering engine;
and updating the target rendering engine according to the updating content.
5. The method according to claim 4, wherein if the target rendering engine is included in both the local directory where the target object is installed and the shared area of the smart terminal, before the sending of the version detection request to the server, the method further comprises:
and if the version information of the target rendering engine in the shared area of the intelligent terminal is higher than the version information of the target rendering engine in the local directory, replacing the target rendering engine in the local directory with the target rendering engine in the shared area of the intelligent terminal.
6. The method of claim 1, wherein the target rendering engine comprises a disparity parameter that identifies disparity of the system rendering engine under different versions.
7. The method of claim 6, wherein creating a page view component for the target object according to the target rendering engine comprises:
determining target version information of a system rendering engine of the intelligent terminal;
and creating a page view component for the target object through the target rendering engine according to the target version information and the difference parameters.
8. An apparatus for sharing a rendering engine, the apparatus comprising an acquisition unit, an installation unit, a determination unit, a replacement unit, and a creation unit:
the acquiring unit is used for acquiring an installation package of a target object, the target object has a function of providing services through the page view component, and a rendering engine aiming at the page view component is not packaged in the installation package;
the installation unit is used for installing the target object on the intelligent terminal through the installation package;
the determining unit is used for determining a target rendering engine before the target object creates the page view component;
the replacing unit is used for replacing a system rendering engine of the intelligent terminal with the target rendering engine by initializing the running environment of the target rendering engine; the target rendering engine has better performance than the system rendering engine;
and the creating unit is used for creating the page view component for the target object according to the target rendering engine if the request for creating the page view component for the target object is acquired.
9. A shared device for a rendering engine, comprising a memory, and one or more programs, wherein the one or more programs are stored in the memory, and wherein execution of the one or more programs by one or more processors comprises instructions for:
acquiring an installation package of a target object, wherein the target object has a function of providing services through a page view component, and a rendering engine aiming at the page view component is not packaged in the installation package;
installing the target object at the intelligent terminal through the installation package;
determining a target rendering engine before the target object creates a page view component;
replacing a system rendering engine of the intelligent terminal with the target rendering engine by initializing the running environment of the target rendering engine; the target rendering engine has better performance than the system rendering engine;
and if a request for establishing the page view component for the target object is obtained, establishing the page view component for the target object according to the target rendering engine.
10. A machine-readable medium having stored thereon instructions, which when executed by one or more processors, cause an apparatus to perform a method of sharing of a rendering engine as recited in one or more of claims 1-7.
CN201910517057.1A 2019-06-14 2019-06-14 Rendering engine sharing method and device Pending CN112181406A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910517057.1A CN112181406A (en) 2019-06-14 2019-06-14 Rendering engine sharing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910517057.1A CN112181406A (en) 2019-06-14 2019-06-14 Rendering engine sharing method and device

Publications (1)

Publication Number Publication Date
CN112181406A true CN112181406A (en) 2021-01-05

Family

ID=73914218

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910517057.1A Pending CN112181406A (en) 2019-06-14 2019-06-14 Rendering engine sharing method and device

Country Status (1)

Country Link
CN (1) CN112181406A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113741764A (en) * 2021-07-30 2021-12-03 阿里巴巴新加坡控股有限公司 Component processing method, device and equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113741764A (en) * 2021-07-30 2021-12-03 阿里巴巴新加坡控股有限公司 Component processing method, device and equipment

Similar Documents

Publication Publication Date Title
RU2647625C2 (en) Application program running method and device
US20150333971A1 (en) Method and device for managing processes of application program
CN110990105B (en) Interface display method and device, electronic equipment and storage medium
RU2641257C2 (en) Device management method and device
CN111221559B (en) Application updating method, device, storage medium, terminal and server
CN111427622B (en) Execution method and device of script codes in application program
CN106775903B (en) Security policy file updating method and device
CN109117144B (en) Page processing method, device, terminal and storage medium
CN110781080A (en) Program debugging method and device and storage medium
CN108280342B (en) Application synchronization method and device for application synchronization
CN106775644B (en) File operation method and equipment
CN111221613B (en) Program calling method and device and storage medium
CN112181406A (en) Rendering engine sharing method and device
CN109901886B (en) Page language switching method, system, device and computer readable storage medium
CN112083981A (en) Method and device for creating page view component
CN111008050A (en) Page task execution method, device, terminal and storage medium
CN116257706A (en) Application loading method, device and storage medium
CN110569037B (en) Data writing method and device
CN109933357B (en) Application program upgrading method and device
CN112214252A (en) Information expansion method and device and electronic equipment
CN111597106A (en) Point burying management method and device
WO2022143126A1 (en) Method, apparatus, and device for analyzing safety of application, and storage medium
CN112256274A (en) Application program processing method and device and storage medium
CN116126320B (en) Data processing method and device, electronic equipment and storage medium
CN111596949B (en) Method and device for developing application program

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