A rendering engine sharing method and device
By sharing the target rendering engine with better performance than the system rendering engine on the smart terminal and replacing the system rendering engine, the problem of insufficient performance of the smart terminal rendering engine is solved, the installation package size and development cost are reduced, and the applicability of the rendering engine is improved.
Patent Information
- Application Number
- CN201910517057.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-06-14
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2039-06-14
AI Technical Summary
The rendering engine provided by the smart terminal system is weak, which leads to developers need to develop the rendering engine by themselves, which increases the installation package volume and development cost.
By sharing the target rendering engine with better performance than the system rendering engine, replacing the system rendering engine of the smart terminal, avoiding the additional package of the rendering engine in the installation package, and creating page view components based on the target rendering engine if needed.
It reduces the installation package size and development cost, improves the performance of the rendering engine, and is suitable for more development needs.
Smart Images

Figure CN112181406B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing, and in particular to a rendering engine sharing method and device. Background Art
[0002] With the development of technology in the field of smart terminals, objects deployed on smart terminals, such as programs, applets, and applications (APPs), can display web pages through WebView components to provide users with richer services. The page view component is a system component for displaying web pages provided by smart terminal systems, such as the Android system. It realizes functions such as displaying and rendering web pages by calling the rendering engine of the smart terminal system.
[0003] However, the rendering engine provided by the smart terminal system has weak performance. Most object developers will develop their own rendering engine when developing objects that can provide page view component functions, so that when the object needs to create a page view component when running on the smart terminal, it can be created by calling the self-developed rendering engine.
[0004] Therefore, when developers release the installation package of the object, they need to package the rendering engine they developed in the installation package, which increases the size of the installation package, consumes extra system resources when downloading and installing such installation packages, and the extra rendering engine also increases the development cost of the object. Summary of the invention
[0005] In order to solve the above technical problems, the present application provides a rendering engine sharing method and device, which does not need to be additionally packaged in the installation package. The shared target rendering engine can be directly used, which reduces the size of the installation package and also reduces the development cost.
[0006] The embodiments of the present application disclose the following technical solutions:
[0007] In a first aspect, an embodiment of the present application provides a method for sharing a rendering engine, the method comprising:
[0008] Obtaining an installation package of a target object, wherein the target object has a function of providing services through a page view component, and the installation package does not include a rendering engine for the page view component;
[0009] Install the target object on the smart terminal through the installation package;
[0010] Before the target object creates a page view component, determining a target rendering engine;
[0011] By initializing the operating environment of the target rendering engine, the system rendering engine of the smart terminal is replaced with the target rendering engine; the performance of the target rendering engine is better than that of the system rendering engine;
[0012] If a request for creating a page view component for the target object is obtained, a page view component is created for the target object according to the target rendering engine.
[0013] Optionally, determining the target rendering engine includes:
[0014] Determining whether the shared area of the smart terminal includes the target rendering engine;
[0015] If so, determining the target rendering engine from the shared area;
[0016] If not, download the target rendering engine.
[0017] Optionally, after determining the target rendering engine, the method further includes:
[0018] The target rendering engine is backed up to the local directory where the target object is installed.
[0019] Optionally, the method further includes:
[0020] Sending a version detection request to a server, wherein the version detection request includes version information of the target rendering engine;
[0021] Obtaining updated content of version information for the target rendering engine from the server;
[0022] The target rendering engine is updated according to the update content.
[0023] Optionally, if the local directory where 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:
[0024] If the version information of the target rendering engine included in the shared area 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 is replaced with the target rendering engine included in the shared area of the smart terminal.
[0025] Optionally, the target rendering engine includes a difference parameter, and the difference parameter is used to identify the difference between the system rendering engine in different versions.
[0026] Optionally, creating a page view component for the target object according to the target rendering engine includes:
[0027] Determine target version information of the system rendering engine of the smart terminal;
[0028] According to the target version information and the difference parameter, a page view component is created for the target object through the target rendering engine.
[0029] Optionally, the initializing the operating environment of the target rendering engine includes:
[0030] Obtaining a software development kit for the target rendering engine;
[0031] The target rendering engine is initialized in its operating environment according to the software development kit.
[0032] Optionally, replacing the system rendering engine of the smart terminal with the target rendering engine includes:
[0033] By creating an instance of the target rendering engine, the system rendering engine of the smart terminal is replaced with the target rendering engine.
[0034] In a second aspect, an embodiment of the present application provides a sharing device of a rendering engine, the device comprising an acquisition unit, an installation unit, a determination unit, a replacement unit, and a creation unit:
[0035] The acquisition unit is used to acquire an installation package of a target object, the target object has a function of providing services through a page view component, and the installation package does not include a rendering engine for the page view component;
[0036] The installation unit is used to install the target object on the smart terminal through the installation package;
[0037] The determination unit is used to determine a target rendering engine before the target object creates a page view component;
[0038] The replacement unit is used to replace the system rendering engine of the smart terminal with the target rendering engine by initializing the operating environment of the target rendering engine; the performance of the target rendering engine is better than that of the system rendering engine;
[0039] The creation unit is used to create a page view component for the target object according to the target rendering engine if a request for creating a page view component for the target object is obtained.
[0040] Optionally, the determining unit is specifically configured to:
[0041] Determining whether the shared area of the smart terminal includes the target rendering engine;
[0042] If so, determining the target rendering engine from the shared area;
[0043] If not, download the target rendering engine.
[0044] Optionally, the determining unit is further specifically configured to:
[0045] After determining the target rendering engine, backing up the target rendering engine to a local directory where the target object is installed.
[0046] Optionally, the determining unit is further specifically configured to:
[0047] Sending a version detection request to a server, wherein the version detection request includes version information of the target rendering engine;
[0048] Obtaining updated content of version information for the target rendering engine from the server;
[0049] The target rendering engine is updated according to the update content.
[0050] Optionally, the determining unit is further specifically configured to:
[0051] 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 sending a version detection request to the server, if the version information of the target rendering engine included in the shared area 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 is replaced with the target rendering engine included in the shared area of the smart terminal.
[0052] Optionally, the target rendering engine includes a difference parameter, and the difference parameter is used to identify the difference between the system rendering engine in different versions.
[0053] Optionally, the creation unit is specifically used to:
[0054] Determine target version information of the system rendering engine of the smart terminal;
[0055] According to the target version information and the difference parameter, a page view component is created for the target object through the target rendering engine.
[0056] Optionally, the replacement unit is specifically used to:
[0057] Obtaining a software development kit for the target rendering engine;
[0058] The target rendering engine is initialized in its operating environment according to the software development kit.
[0059] Optionally, the replacement unit is further specifically used for:
[0060] By creating an instance of the target rendering engine, the system rendering engine of the smart terminal is replaced with the target rendering engine.
[0061] In a third aspect, an embodiment of the present application provides a sharing device of a rendering engine, comprising a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors, wherein the one or more programs include instructions for performing the following operations:
[0062] Obtaining an installation package of a target object, wherein the target object has a function of providing services through a page view component, and the installation package does not include a rendering engine for the page view component;
[0063] Install the target object on the smart terminal through the installation package;
[0064] Before the target object creates a page view component, determining a target rendering engine;
[0065] By initializing the operating environment of the target rendering engine, the system rendering engine of the smart terminal is replaced with the target rendering engine; the performance of the target rendering engine is better than that of the system rendering engine;
[0066] If a request for creating a page view component for the target object is obtained, a page view component is created for the target object according to the target rendering engine.
[0067] Optionally, the processor executes the one or more programs including instructions for performing the following operations:
[0068] Determining whether the shared area of the smart terminal includes the target rendering engine;
[0069] If so, determining the target rendering engine from the shared area;
[0070] If not, download the target rendering engine.
[0071] Optionally, the processor executes the one or more programs including instructions for performing the following operations:
[0072] The target rendering engine is backed up to the local directory where the target object is installed.
[0073] Optionally, the processor executes the one or more programs including instructions for performing the following operations:
[0074] Sending a version detection request to a server, wherein the version detection request includes version information of the target rendering engine;
[0075] Obtaining updated content of version information for the target rendering engine from the server;
[0076] The target rendering engine is updated according to the update content.
[0077] Optionally, the processor executes the one or more programs including instructions for performing the following operations:
[0078] If the version information of the target rendering engine included in the shared area 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 is replaced with the target rendering engine included in the shared area of the smart terminal.
[0079] Optionally, the target rendering engine includes a difference parameter, and the difference parameter is used to identify the difference between the system rendering engine in different versions.
[0080] Optionally, the processor executes the one or more programs including instructions for performing the following operations:
[0081] Determine target version information of the system rendering engine of the smart terminal;
[0082] According to the target version information and the difference parameter, a page view component is created for the target object through the target rendering engine.
[0083] Optionally, the processor executes the one or more programs including instructions for performing the following operations:
[0084] Obtaining a software development kit for the target rendering engine;
[0085] The target rendering engine is initialized in its operating environment according to the software development kit.
[0086] Optionally, the processor executes the one or more programs including instructions for performing the following operations:
[0087] By creating an instance of the target rendering engine, the system rendering engine of the smart terminal is replaced with the target rendering engine.
[0088] In a fourth aspect, an embodiment of the present application provides a machine-readable medium having instructions stored thereon, which, when executed by one or more processors, enables the device to execute a rendering engine sharing method as described in one or more of the first aspects.
[0089] It can be seen from the above technical solution that before the target object creates a page view component, the target rendering engine can be initialized in the operating environment. By initializing the operating environment, the target rendering engine can replace the original system rendering engine of the system deployed by the smart terminal. Therefore, when the target object needs to create a page view component, it will be implemented by calling the target rendering engine instead of the system rendering engine. Since the performance of the target rendering engine is better than that of the system rendering engine, it can be applied to more development needs, and developers no longer need to develop an additional independent rendering engine. Therefore, when developers create the installation package of the target object they are developing, they do not need to package the rendering engine in the installation package, but can directly use the shared target rendering engine, which reduces the size of the installation package and also reduces the development cost. BRIEF DESCRIPTION OF THE DRAWINGS
[0090] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0091] Figure 1 A flow chart of a rendering engine sharing method provided in an embodiment of the present application;
[0092] Figure 2 A schematic diagram of an Android system architecture involved in a process of creating a page view component provided in an embodiment of the present application;
[0093] Figure 3 A structural diagram of a sharing device of a rendering engine provided in an embodiment of the present application;
[0094] Figure 4 A block diagram of a terminal device 400 provided in an embodiment of the present application;
[0095] Figure 5 A structural diagram of a server provided in an embodiment of the present application. DETAILED DESCRIPTION
[0096] The embodiments of the present application are described below in conjunction with the accompanying drawings.
[0097] Currently, when developers develop objects, in order to solve the problem of weak performance of the system rendering engine provided by smart terminals, they will package the rendering engine developed by themselves in the installation package of the object, thereby increasing the size of the installation package, making the downloading and installation of such installation packages consume additional system resources. The additionally developed rendering engine also increases the development cost of the object.
[0098] To this end, the embodiment of the present application provides a method for sharing a rendering engine, by providing a target rendering engine with better performance than the system rendering engine as a shared rendering engine, so that any object installed on the smart terminal can call the shared rendering engine with better performance to create the page view component and provide subsequent services when it needs to create a page view component corresponding to it, instead of each object calling the rendering engine in its own installation package to create the page view component function. Thus, it provides developers with the possibility of development based on a shared rendering engine with better performance.
[0099] Next, the application scenario of the embodiment of the present application is introduced, and the application scenario of the present application may include a smart terminal, and the smart terminal executes the sharing method of the rendering engine provided by the embodiment of the present application. The smart terminal may specifically be a smart phone, a computer, a personal digital assistant (PDA), a tablet computer, etc.
[0100] In this method, after the installation package of the target object is downloaded to the smart terminal, the target object can be installed, wherein the target object described here can be an object that implements some functions by providing services through a page view component, and the installation package of the target object does not include a rendering engine that provides background logic for the page view component, for example: the target object can be a game APP that provides a web page display function through a page view component, and its installation package does not include a rendering engine. Then, for such a target object that has been installed on the smart terminal, before creating the page view component corresponding to the target object, a target rendering engine with better performance than the system rendering engine, that is, a shared rendering engine, can be determined. When it is necessary to create the page view component corresponding to the target object, the page view component corresponding to the target object can be created according to the shared target rendering engine.
[0101] In an embodiment of the present application, for the target object, the mechanism of replacing the rendering engine can be used. Regarding the functions such as creating the page view component corresponding to the target object, it can be achieved by calling the shared target rendering engine instead of calling the system rendering engine with weaker performance. The mechanism of replacing the rendering engine can be, after determining the shared target rendering engine, by initializing the operating environment of the target rendering engine, so that the operating environment is suitable for the target rendering engine, thereby replacing the target rendering engine with the system rendering engine, that is, realizing the processing logic of the target rendering engine providing the web page view component function for the target object. It should be noted that the operation of replacing the rendering engine in the embodiment of the present application is for the target object, and should not be understood as for the entire smart terminal system. Therefore, when it is necessary to create the page view component corresponding to the target object, the page view component corresponding to the target object can be created according to the shared rendering engine, that is, the target rendering engine with better performance, and subsequent services can be provided.
[0102] It can be seen that the rendering engine sharing method provided by the embodiment of the present application provides a shared rendering engine with better performance, so that different objects installed on the smart terminal can realize the web view component function of the target object by calling the shared rendering engine. Since the performance of the shared rendering engine is better than the system rendering engine, it can be applied to more development needs. Therefore, when the developer develops the object, there is no need to develop an additional independent rendering engine, which reduces the development cost. Moreover, when the developer creates the installation package of the developed target object, there is no need to package the rendering engine in the installation package, but directly use the shared target rendering engine, thereby reducing the size of the installation package and avoiding the consumption of additional system resources by downloading and installing such installation packages.
[0103] Next, we will combine Figure 1 A method for creating a page view component provided in an embodiment of the present application is introduced, see Figure 1 , which shows a flow chart of a method for creating a page view component provided in an embodiment of the present application, the method comprising:
[0104] S101: Obtain an installation package of a target object.
[0105] The target object described here may be an object that implements some functions by providing services through a page view component, and the installation package of the target object does not include a rendering engine that provides background logic for the page view component. The installation package of the target object may be a file for installing the target object.
[0106] S102: Install the target object on the smart terminal through the installation package.
[0107] After the installation package of the target object is obtained, the target object can be installed on the smart terminal according to the installation package.
[0108] S103: Before the target object creates a page view component, determine a target rendering engine.
[0109] For the system rendering engine in the smart terminal, a rendering engine with better performance than the system rendering engine can be developed in advance, which is recorded as the target rendering engine. In a specific implementation, the target rendering engine can be the Sogou browser kernel, wherein the Sogou browser kernel is a powerful and feature-rich browsing kernel deeply developed based on Google Chromium. The performance of the Sogou browser kernel is much better than the system rendering engine under different versions of the Android system, and can improve the performance of the page view component in the Android system. In addition, the Sogou browser kernel can be saved in the installation package of the Sogou browser APP in the smart terminal, or in the installation package of the Sogou input method APP, or in the APP of other Sogou products.
[0110] In an embodiment of the present application, before creating a page view component corresponding to the target object, a target rendering engine can be determined.
[0111] It should be noted that the embodiments of the present application do not limit the specific method for determining the target rendering engine, and an adaptive determination method can be selected and set according to different determination requirements.
[0112] In an embodiment of the present application, after the target object is installed, if the target rendering engine is included in the local directory where the target object is installed, the target rendering engine can be directly determined for the target object in the local directory where the target object is installed, wherein the local directory of the object can be the directory corresponding to the object installed by the user in the smart terminal. If the target rendering engine is not included in the local directory where the target object is installed, it is impossible to determine the target rendering engine from the local directory where the target object is installed, and it is also impossible to directly call the target rendering engine in the local directory of other objects. Then, in a possible implementation, the method for determining the target rendering engine may include:
[0113] S201: Determine whether the shared area of the smart terminal includes the target rendering engine.
[0114] The intelligent terminal may include a shared area, which may be used to store common files, data, etc., so that different objects deployed in the intelligent terminal can call them. In a specific implementation, the shared area of the intelligent terminal may be an SD card in the intelligent terminal.
[0115] It is understandable that in actual scenarios, there may be a situation where the target rendering engine is already included in the shared area of the smart terminal, for example: the user has downloaded the target rendering engine to the shared area of the smart terminal to facilitate the call of the object installed on the smart terminal. Alternatively, the target rendering engine is included in the installation package of other objects on the smart terminal, and the target rendering engine in the installation package of the object is backed up to the shared area. For example, the installation package of the Sogou Browser APP of the smart terminal includes the Sogou Browser kernel, and the Sogou Browser kernel in the installation package can be backed up to the SD card of the smart terminal. Alternatively, before executing the sharing method of the rendering engine for the current target object, the method may have been executed for other objects. Then, if the method has been executed for other objects before, the target rendering engine may have been downloaded to the shared area of the smart terminal during the previous execution of other objects. For example: the current target object is object A, and before executing the sharing method of the rendering engine for the current object A, the method may have been executed for object B. Then, it is understandable that after determining the target rendering engine for object B, the target rendering engine should have been saved in the shared area of the smart terminal.
[0116] Then, in the embodiment of the present application, it can be determined whether the target rendering engine is included in the shared area of the smart terminal. If yes, step S202 is executed, and if no, step S203 is executed.
[0117] S202: Determine the target rendering engine from the shared area.
[0118] S203: Download the target rendering engine.
[0119] Among them, the target rendering engine can be downloaded by downloading it in the cloud or downloading an installation package including an object of the target rendering engine, such as downloading the Sogou browser kernel, or downloading the Sogou product APP installation package such as the Sogou browser APP including the Sogou browser kernel.
[0120] Therefore, the method for determining the target rendering engine first determines whether the target rendering engine is included in the shared area of the intelligent terminal. If it is included, the target rendering engine can be directly determined without downloading the target rendering engine, thereby reducing the waste of system resources and improving the efficiency of determining the target rendering engine. If it is not included, the target rendering engine is downloaded, so as to facilitate providing the target rendering engine for other objects.
[0121] After determining the target rendering engine, in order to facilitate calling the target rendering engine for the target object, in a possible implementation, the determined target rendering engine can be backed up to the local directory where the target object is installed. For example: the current target rendering engine is stored in the SD card, and the local directory where the target object is installed can be the directory corresponding to the target object installed by the user in the smart terminal. For example, if the user installs the target object in the data / app directory in the smart terminal, the data / app directory can be the local directory where the target object is installed. A copy of the target rendering engine can be backed up in the local directory corresponding to the target object, such as the data / app directory. Thus, when calling the target rendering engine for the target object to perform the corresponding steps, the speed of calling the target rendering engine can be improved. It can be understood that for any object that has been installed in the smart terminal, the target rendering engine can be backed up in its local directory, so that when calling the target rendering engine for each object, it can be called in its own local directory, thereby improving the calling efficiency of the target rendering engine.
[0122] S104: replacing the system rendering engine of the smart terminal with the target rendering engine by initializing the operating environment of the target rendering engine; the performance of the target rendering engine is better than that of the system rendering engine.
[0123] In an embodiment of the present application, after the target rendering engine is determined, the operating environment of the target rendering engine can be initialized so that the current environment is suitable for the operation of the target rendering engine and has the basic conditions for replacing the rendering engine for the target object. In this way, the system rendering engine of the smart terminal where the target object is deployed can be replaced with a target rendering engine with better performance.
[0124] S105: If a request for creating a page view component for the target object is obtained, create a page view component for the target object according to the target rendering engine.
[0125] In an embodiment of the present application, when it is necessary to create a page view component corresponding to a target object, a request for the page view component corresponding to the target object will be generated accordingly. If the requirement to create the page view component corresponding to the target object is obtained, since the rendering engine has been 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.
[0126] For example, a mobile phone is used as a smart terminal, and a game APP with a web page display function installed on the mobile phone is used as a target object, and the smart phone includes the original system rendering engine A and also includes a target rendering engine B with better performance than the system rendering engine A. After completing step S104, that is, after the system rendering engine A in the mobile phone is replaced with the target rendering engine B, when it is necessary to create a page view component corresponding to the game APP, a request for the page view component corresponding to the target object can be generated accordingly. If the requirement for creating the page view component corresponding to the target object is obtained, the page view component corresponding to the game APP can be created according to the target rendering engine B with better performance.
[0127] After the page view component corresponding to the target object is created according to the target rendering engine, the web page of the target object can be downloaded, parsed, and rendered through the target rendering engine.
[0128] It can be seen that the rendering engine sharing method provided by the embodiment of the present application provides a shared rendering engine with better performance, so that different objects installed on the smart terminal can realize the web view component function of the target object by calling the shared rendering engine. Since the performance of the shared rendering engine is better than the system rendering engine, it can be applied to more development needs. Therefore, when the developer develops the object, there is no need to develop an additional independent rendering engine, which reduces the development cost. Moreover, when the developer creates the installation package of the developed target object, there is no need to package the rendering engine in the installation package, but directly use the shared target rendering engine, thereby reducing the size of the installation package and avoiding the consumption of additional system resources by downloading and installing such installation packages.
[0129] In the embodiment of the present application, there may be a function of updating the shared rendering engine, that is, for the shared rendering engine in the smart terminal, that is, the target rendering engine, if the 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 a possible implementation, the method for updating the target rendering engine may include:
[0130] S301: Send a version detection request to a server, where the version detection request includes version information of the target rendering engine.
[0131] In an embodiment of the present application, the server may be a publishing platform for the latest version of the target rendering engine, then a version detection request may be sent to the server, wherein the version detection request may include the version information of the target rendering engine of the smart terminal, and the version information of the target rendering engine described here may be used to indicate the version to which the target rendering engine belongs, such as the version information of the target rendering engine may be "1.0", to indicate that the target rendering engine is the first version. In other words, a version detection request including the version information of the target rendering engine in the smart terminal may be sent to the server. For example: a target rendering engine A is deployed in a smart terminal such as a mobile phone, and the target rendering engine A is the first version, and the corresponding version information is "1.0", then a version detection request may be sent to the server, and the version detection request may include the version information "1.0" of the target rendering engine.
[0132] S302: Obtain updated content of version information for the target rendering engine from the server.
[0133] S303: Update the target rendering engine according to the update content.
[0134] In an embodiment of the present application, after receiving the version detection request, the server can determine the update content for the version information of the target rendering engine according to the version information of the target rendering engine in the version detection request, and send the update content of the version information of the target rendering engine to the smart terminal. Among them, the update content described here can be the content of updating the target rendering engine in the smart terminal to the latest version of the target rendering engine. It can be understood that the update content may include the content in the target rendering engine installation package in the smart terminal, or may not include the content in the target rendering engine installation package in the smart terminal. For example: assuming that the installation package of the target rendering engine in the current smart terminal is A, and the update content is A+B, the situation is that the update content includes the content in the target rendering engine installation package in the smart terminal; correspondingly, assuming that the installation package of the target rendering engine in the current smart terminal is A, and the update content is B, then the situation is that the update content does not include the content of the target rendering engine packaging package in the smart terminal. The smart terminal obtains the update content for the version information of the target rendering engine from the server, and updates the target rendering engine in the smart terminal to the latest version of the target rendering engine according to the update content.
[0135] For example: Assuming that the latest version of the target rendering engine currently announced by the server is the third version of the target rendering engine, and its version information is "3.0", then, after receiving the version detection request including the version information of the target rendering engine, i.e. "1.0", the server can 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 obtains the update content "W" for the version information of the target rendering engine from the server, and updates the first version of the target rendering engine in the mobile phone to the latest version, i.e. the third version of the target rendering engine according to the update content "W".
[0136] In addition, if the server determines that the target rendering engine is already the latest version of the target rendering engine according to the version information of the target rendering engine in the version detection request, the server can send information to the smart terminal that no version update is required, and the smart terminal ends the update step after receiving the information. It can be seen that the target rendering engine in the shared area of the smart terminal is updated, so that in the next step, the latest version of the target rendering engine can be called to implement functions such as creating page view components, thereby providing developers with the possibility of developing the latest version of the target rendering engine with better performance. Moreover, for all smart terminals that include target rendering engines circulating on the market, the above steps can be performed to update the target rendering engine, so that the target rendering engine currently on the market can be quickly updated to the latest version of the target rendering engine. In addition, since only the smaller system rendering engine needs to be updated, the corresponding update time is also short, which facilitates the user's update operation, thereby achieving the unification of the version of the target rendering engine on the current market, avoiding the problem of too many versions of the target rendering engine on the current market, that is, the fragmentation of the target rendering engine.
[0137] The above target rendering engine update method can be used to update the target rendering engine in the shared area of the smart terminal, so as to ensure that the rendering engine called for the object in the smart terminal is the latest version of the target rendering engine. In addition, the update method can also be used to update the target rendering engine in the local directory where the target object is installed in the smart terminal, so that the latest version of the target rendering engine is called for each object in the smart terminal, so as to improve the effect of the object when implementing functions based on the target rendering engine.
[0138] In an embodiment of the present application, a situation may occur in which the target rendering engine in the shared area of the smart terminal is updated while the target rendering engine included in the local directory is not updated. In this case, in a possible implementation method, 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, then before performing the above step S301, the update can be performed by the following method, including: if the version information of the target rendering engine included in the shared area 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 can be replaced with the target rendering engine included in the shared area of the smart terminal.
[0139] That is to say, compared with the version of the target rendering engine included in the local directory, if the version of the target rendering engine included in the shared area of the smart terminal is higher, the target rendering engine included in the local directory can be replaced with the target rendering engine included in the shared area of the smart terminal, so that the target rendering engine included in the local directory is updated to a higher version of the target rendering engine. For example: the version information of the target rendering engine included in the shared area of the smart terminal can 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 can be "1.0", indicating that the target rendering engine is the first version, and the version of the third version of the target rendering engine included in the shared area of the smart terminal is higher, then the first version of the target rendering engine included in the local directory can be replaced with the third version of the target rendering engine included in the shared area of the smart terminal. Therefore, this method for updating the target rendering engine under the local directory of the target object can only transmit data within the smart terminal without interacting with the server, thereby reducing the waste of system resources.
[0140] It should be noted that the embodiments of the present application do not limit the specific method for initializing the operating environment of the target rendering engine, and an adaptive determination method can be selected and set according to different determination requirements. With respect to S401, in a possible implementation, the method for initializing the operating environment of the target rendering engine may include:
[0141] S401: Obtain a software development kit of the target rendering engine.
[0142] In the embodiment of the present application, a software development kit (SDK) of the target rendering engine may be developed in advance for the target rendering engine. The SDK of the target rendering engine may be a collection of documents, examples, and tools related to the specific implementation of replacing the system rendering engine with the target rendering engine. When the operating environment of the target rendering engine needs to be initialized, the SDK of the target rendering engine may be obtained.
[0143] S402: Initializing the operating environment of the target rendering engine according to the software development kit.
[0144] In the embodiment of the present application, the target rendering engine's operating environment can be initialized by initializing the target rendering engine's SDK according to the acquired target rendering engine's SDK. For example, the target rendering engine's SDK may include information such as parameters related to the target rendering engine's operating environment, and the target rendering engine's SDK can be initialized to quickly reset the parameters related to the target rendering engine's operating environment.
[0145] In this way, by only initializing a software development kit, that is, the SDK of the target rendering engine, the current operating environment can be made suitable for the operation of the target rendering engine, thereby improving the initialization efficiency.
[0146] In addition, the embodiments of the present application do not limit the specific method of replacing the system rendering engine of the smart terminal with the target rendering engine, and an adaptive determination method can be selected and set according to different determination requirements. For S104, in a possible implementation, the method may include: replacing the system rendering engine of the smart terminal with the target rendering engine by creating an instance of the target rendering engine. The instance described here can be a process, and the instance of the target rendering engine can be a process related to the target rendering engine, such as the instance of the target rendering engine can be a process that calls the interface of the target rendering engine. In other words, the system rendering engine of the smart terminal can be replaced with the target rendering engine by creating an instance of the target rendering engine.
[0147] The following is a specific example: Figure 2 , which shows a schematic diagram of the Android system architecture involved in the process of creating a page view component provided by an embodiment of the present application. Figure 2 As shown, Figure 2 The architecture diagram connected by solid lines shown in , corresponds to: by calling an instance of the system rendering engine, the system rendering engine is used as the background logic for creating a page view component corresponding to the target object, thereby creating a page view component corresponding to the target object according to the system rendering engine; and Figure 2 The architecture diagram connected by dotted lines shown in the figure corresponds to the method provided in the embodiment of the present application, that is, when the operating environment of the target rendering engine is initialized so that the current operating environment is suitable for the target rendering engine, an instance of the target rendering engine can be created, wherein the instance can be a process that calls the interface of the target rendering engine. Through the process, the target rendering engine can be used as the background logic of the page view software corresponding to the target object, rather than the system rendering engine, thereby replacing the system rendering engine with the target rendering engine.
[0148] In a specific implementation, for an Android smart terminal, when initializing the SDK of the target rendering engine so that the current operating environment is suitable for the operation of the target rendering engine, the application framework layer (Frameworks) in the Android system is used as a starting point to create an instance of the mProvider interface that calls the target rendering engine, thereby replacing the system rendering engine with the target rendering engine. Among them, the application framework layer can be used to provide API methods and services for objects in the smart terminal.
[0149] Therefore, this method can replace the system rendering engine of the smart terminal with the target rendering engine only by creating an instance of the target rendering engine, thereby improving the efficiency of replacing the rendering engine.
[0150] As the smart terminal system is upgraded, the version of the rendering engine called by the page view component will also be updated. The working mechanisms of different versions of the rendering engine may be different. For example, the application programming interface (API) required to be accessed will be updated, deleted, modified, etc. as the version changes.
[0151] However, the smart terminals currently circulating in the market have different styles, models, and manufacturers, and the system versions deployed in smart terminals are not unified, that is, multiple versions of rendering engines are circulating in the market at the same time. This results in the developers of the above objects needing to adapt to different versions of rendering engines in order to enable the objects to use page view components when developing objects, which greatly increases the development cost.
[0152] In order to solve the above-mentioned problem caused by too many versions of the system rendering engine, in a possible implementation method, the target rendering engine provided in the embodiment of the present application may include a difference parameter, and the difference parameter described here can be used to identify the difference between the system rendering engine under different versions.
[0153] Among them, there are usually multiple different versions of smart terminal systems circulating in the current market, and different versions of smart terminal systems correspond to different versions of system rendering engines, that is, different versions of system rendering engines are also circulating in the current market. For example, suppose there are three versions of Android systems currently circulating in the market, namely version 1, version 2 and version 3, and for these three versions of Android systems, there may be three different versions of system rendering engines corresponding to them, namely the first version of the system rendering engine, the second version of the system rendering engine and the third version of the system rendering engine. For different versions of system rendering engines, there may also be differences between them. The following is a specific example to illustrate: For the aforementioned three different versions of system rendering engines, they may include similarities, such as: when function A needs to be implemented, these three versions of system rendering engines need to implement the function by calling interface a. And for these three system rendering engines under different versions, there may also be differences, such as: when function B needs to be implemented, the first version of the system rendering engine needs to implement the function by calling interface a; the second version of the system rendering engine needs to implement the function by calling interface b; the third version of the system rendering engine needs to implement the function by calling interface c.
[0154] It can be seen that when implementing function B, the three system rendering engines have differences, and the differences of the three system rendering engines can be identified by the difference parameters. It can be understood that the above example is only one possible scenario. In actual scenarios, the difference parameters included in the target rendering engine include all the differences of the system rendering engines under different versions.
[0155] In the embodiment of the present application, the difference parameter may identify the difference between the system rendering engines in all different versions currently in circulation, or may identify the difference between the system rendering engines in at least two different versions.
[0156] In this way, since the target rendering engine includes a difference parameter, and the difference parameter is used to identify the difference of the system rendering engine under different versions, the target rendering engine can realize the corresponding functions that can be realized by the system rendering engine based on the difference parameter for each version of the system rendering engine under different versions through the same working mechanism as the system rendering engine. For example: the difference parameter of the target rendering engine includes the information that the first version of the Android system rendering engine needs to call the interface a when implementing function B, then the target rendering engine can also call interface a according to the difference parameter to implement function B. Therefore, for each version of the system rendering engine of different versions, it can be replaced by the target rendering engine, and the functions that can be realized by the system rendering engine can be realized by the same working mechanism as the system rendering engine, so that the impact on the system where the replaced system rendering engine is located is relatively small. In other words, the target rendering engine has high compatibility for different versions of systems (such as Android systems) and can be adapted to smart terminals under different versions of systems.
[0157] In the specific implementation, the target rendering engine, Sogou Browser Kernel, can support at least Android version 4.1. Moreover, in all systems of Android version 4.1 and above, the behavior of Sogou Browser Kernel can be consistent with the behavior of the system rendering engine in the corresponding version of the Android system. In other words, Sogou Browser Kernel has high compatibility.
[0158] In the embodiment of the present application, after the replacement of the rendering engine is completed, the target rendering engine can implement the functions that the system rendering engine can implement based on the difference parameters with the same working mechanism as the system rendering engine. Then, in a possible implementation, the method for creating a page view component corresponding to the target object according to the target rendering engine in step S105 may include:
[0159] S501: Determine target version information of the system rendering engine of the smart terminal.
[0160] Different versions of the system rendering engine may have corresponding version information. The version information of the system rendering engine may be used to indicate the system version to which the system rendering engine belongs. For example, for the first version of the system rendering engine, the corresponding system version information may be "1.0". Then, in the embodiment of the present application, the version information of the system rendering engine in the current smart terminal may be recorded as the target version information, and for the smart terminal, the target version information of the system rendering engine therein may be determined.
[0161] For example: assuming that the system rendering engines currently circulating in the market include a first version system rendering engine, a second version system rendering engine, and a third version system rendering engine, and taking a mobile phone as the current smart terminal, the mobile phone includes the first version of the system rendering engine, and the version information of the first version of the system rendering engine is "1.0", then, for the current mobile phone, the target version information of the system rendering engine in the mobile phone is determined to be "1.0".
[0162] S502: Creating a page view component corresponding to the target object through the target rendering engine according to the target version information and the difference parameter.
[0163] In an embodiment of the present application, the working mechanism of the system rendering engine of the current smart terminal when creating a page view component corresponding to the target object can be determined based on the version information of the system rendering engine in the current smart terminal, that is, the target version information, and the difference parameters included in the target rendering engine, and based on the working mechanism, the target rendering engine implements the creation of the page view component corresponding to the target object.
[0164] The following is a specific example: Assume that there are three versions of Android systems currently circulating on the market, namely version 1, version 2 and version 3, and under these three versions of Android systems, there may be three different versions of system rendering engines, namely the first version of the system rendering engine, the second version of the system rendering engine and the third version of the system rendering engine. Then, for these three system rendering engines under different versions, there may be differences in the function of implementing the page view component corresponding to the target object, for example: the first version of the system rendering engine needs to implement the function by calling interface a; the second version of the system rendering engine needs to implement the function by calling interface b; the third version of the system rendering engine needs to implement the function by calling interface c. Since the difference parameter of the target rendering engine includes the difference corresponding to the page view component corresponding to the target object, then, according to the target version information of the system rendering engine in the mobile phone determined to be "1.0", the corresponding rendering engine is the first version of the system rendering engine, then according to the difference parameter, it can be determined that the first version of the system rendering engine needs to implement the function of the page view component corresponding to the target object by calling interface a, so the target rendering engine can also implement the function of the page view component corresponding to the target object by calling interface a.
[0165] From this, we can see that based on the advantage that the target rendering engine has high compatibility with different versions of systems (such as Android systems) and can adapt to smart terminals under different versions of systems, different versions of system rendering engines can be replaced with the target rendering engine, and the target rendering engine can be used to implement functions such as creating page view components corresponding to the target object. In this way, developers can develop objects only based on the target system engine, without having to pay attention to the differences between system rendering engines under different versions.
[0166] based on Figure 1 The corresponding embodiment provides a rendering engine sharing method, and the present application embodiment provides a rendering engine sharing device, see Figure 3 , which shows a structure diagram of a sharing device of a rendering engine provided in an embodiment of the present application, such as Figure 3 As shown, the device includes an acquisition unit 301, an installation unit 302, a determination unit 303, a replacement unit 304 and a creation unit 305:
[0167] The acquisition unit 301 is used to acquire an installation package of a target object, wherein the target object has a function of providing services through a page view component, and the installation package does not include a rendering engine for the page view component;
[0168] The installation unit 302 is used to install the target object on the smart terminal through the installation package;
[0169] The determining unit 303 is used to determine a target rendering engine before the target object creates a page view component;
[0170] The replacement unit 304 is used to replace the system rendering engine of the smart terminal with the target rendering engine by initializing the operating environment of the target rendering engine; the performance of the target rendering engine is better than that of the system rendering engine;
[0171] The creation unit 305 is used to create a page view component for the target object according to the target rendering engine if a request for creating a page view component for the target object is obtained.
[0172] Optionally, the determining unit 303 is specifically configured to:
[0173] Determining whether the shared area of the smart terminal includes the target rendering engine;
[0174] If so, determining the target rendering engine from the shared area;
[0175] If not, download the target rendering engine.
[0176] Optionally, the determining unit 303 is further specifically configured to:
[0177] After determining the target rendering engine, backing up the target rendering engine to a local directory where the target object is installed.
[0178] Optionally, the determining unit 303 is further specifically configured to:
[0179] Sending a version detection request to a server, wherein the version detection request includes version information of the target rendering engine;
[0180] Obtaining updated content of version information for the target rendering engine from the server;
[0181] The target rendering engine is updated according to the update content.
[0182] Optionally, the determining unit 303 is further specifically configured to:
[0183] 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 sending a version detection request to the server, if the version information of the target rendering engine included in the shared area 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 is replaced with the target rendering engine included in the shared area of the smart terminal.
[0184] Optionally, the target rendering engine includes a difference parameter, and the difference parameter is used to identify the difference between the system rendering engine in different versions.
[0185] Optionally, the creating unit 305 is specifically configured to:
[0186] Determine target version information of the system rendering engine of the smart terminal;
[0187] According to the target version information and the difference parameter, a page view component is created for the target object through the target rendering engine.
[0188] Optionally, the replacing unit 304 is specifically configured to:
[0189] Obtaining a software development kit for the target rendering engine;
[0190] The target rendering engine is initialized in its operating environment according to the software development kit.
[0191] Optionally, the replacing unit 304 is further specifically configured to:
[0192] By creating an instance of the target rendering engine, the system rendering engine of the smart terminal is replaced with the target rendering engine.
[0193] It can be seen from the above technical solution that before the target object creates a page view component, the target rendering engine can be initialized in the operating environment. By initializing the operating environment, the target rendering engine can replace the original system rendering engine of the system deployed by the smart terminal. Therefore, when the target object needs to create a page view component, it will be implemented by calling the target rendering engine instead of the system rendering engine. Since the performance of the target rendering engine is better than that of the system rendering engine, it can be applied to more development needs, and developers no longer need to develop an additional independent rendering engine. Therefore, when developers create the installation package of the target object they are developing, they do not need to package the rendering engine in the installation package, but can directly use the shared target rendering engine, which reduces the size of the installation package and also reduces the development cost.
[0194] Based on the aforementioned rendering engine sharing method and apparatus, this embodiment provides a rendering engine sharing device, which may be a terminal device. Figure 4 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, etc.
[0195] Reference Figure 4 The terminal device 400 may include one or more of the following components: a processing component 402 , a memory 404 , a power component 406 , a multimedia component 408 , an audio component 410 , an input / output (I / O) interface 412 , a sensor component 414 , and a communication component 416 .
[0196] The processing component 402 generally controls the overall operation of the terminal device 400, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 402 may include one or more processors 420 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 402 may include one or more modules to facilitate the interaction between the processing component 402 and other components. For example, the processing component 402 may include a multimedia module to facilitate the interaction between the multimedia component 308 and the processing component 402.
[0197] The memory 404 is configured to store various types of data to support operations on the terminal device 400. Examples of such data include instructions for any application or method operating on the terminal device 400, contact data, phone book data, messages, pictures, videos, etc. The memory 404 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, 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 disk or optical disk.
[0198] The power supply component 406 provides power to various components of the terminal device 400. The power supply component 406 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the terminal device 400.
[0199] The multimedia component 408 includes a screen that provides 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 input signals from the 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 boundaries of the 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 camera and / or a rear camera. When the terminal device 400 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and the rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0200] The audio component 410 is configured to output and / or input audio signals. For example, the audio component 410 includes a microphone (MIC), and when the terminal device 400 is in an operation mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 404 or sent via the communication component 416. In some embodiments, the audio component 410 also includes a speaker for outputting audio signals.
[0201] I / O interface 412 provides an interface between processing component 402 and peripheral interface modules, such as 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.
[0202] The sensor assembly 414 includes one or more sensors for providing various aspects of status assessment for the terminal device 400. For example, the sensor assembly 414 can detect the open / closed state of the terminal device 400, the relative positioning of the components, such as the display and keypad of the terminal device 400, and the sensor assembly 414 can also detect the position change of the terminal device 400 or a component of the terminal device 400, the presence or absence of contact between the user and the terminal device 400, the orientation or acceleration / deceleration of the terminal device 400, and the temperature change of the 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 an optical 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.
[0203] The communication component 416 is configured to facilitate wired or wireless communication between the terminal device 400 and other devices. The terminal device 400 can 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 a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 416 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0204] In an exemplary embodiment, the terminal device 400 can 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, microcontrollers, microprocessors or other electronic components to perform the above method.
[0205] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 404 including instructions, and the instructions can be executed by a processor 420 of a terminal device 400 to complete the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0206] A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of a mobile terminal, enables the mobile terminal to execute a rendering engine sharing method, the method comprising:
[0207] Obtaining an installation package of a target object, wherein the target object has a function of providing services through a page view component, and the installation package does not include a rendering engine for the page view component;
[0208] Install the target object on the smart terminal through the installation package;
[0209] Before the target object creates a page view component, determining a target rendering engine;
[0210] By initializing the operating environment of the target rendering engine, the system rendering engine of the smart terminal is replaced with the target rendering engine; the performance of the target rendering engine is better than that of the system rendering engine;
[0211] If a request for creating a page view component for the target object is obtained, a page view component is created for the target object according to the target rendering engine.
[0212] Figure 5 : is a schematic diagram of the structure of the server in an embodiment of the present invention. The server 500 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 522 (for example, one or more processors) and a memory 532, and one or more storage media 530 (for example, one or more mass storage devices) storing application programs 542 or data 544. Among them, the memory 532 and the storage medium 530 can be temporary storage or permanent storage. The program stored in the storage medium 530 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the server. Furthermore, the central processing unit 522 can be configured to communicate with the storage medium 530 to execute a series of instruction operations in the storage medium 530 on the server 500.
[0213] 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 and output interfaces 558, one or more keyboards 556, and / or one or more operating systems 541, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
[0214] A person of ordinary skill in the art can understand that all or part of the steps of implementing the above-mentioned method embodiment can be completed by hardware related to program instructions, and the above-mentioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above-mentioned method embodiment; and the above-mentioned storage medium can be at least one of the following media: read-only memory (English: read-only memory, abbreviated: ROM), RAM, magnetic disk or optical disk, etc. Various media that can store program codes.
[0215] It should be noted that each embodiment in this specification is described in a progressive manner, and the same and similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiments. The device and system embodiments described above are merely schematic, in which the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative work.
[0216] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A rendering engine sharing method, characterized in that: The method comprises: Obtaining an installation package of a target object, wherein the target object has a function of providing services through a page view component, and the installation package does not include a rendering engine for the page view component; Install the target object on the smart terminal through the installation package; Before the target object creates a page view component, a target rendering engine is determined, wherein the target rendering engine includes a difference parameter, and the difference parameter is used to identify the difference between system rendering engines under different versions; By initializing the operating environment of the target rendering engine, the system rendering engine of the smart terminal is replaced with the target rendering engine; the performance of the target rendering engine is better than that of the system rendering engine; If a request to create a page view component for the target object is obtained, determining target version information of the system rendering engine of the smart terminal; According to the target version information and the difference parameter, a page view component is created for the target object through the target rendering engine.
2. The method according to claim 1, characterized in that The determining the target rendering engine comprises: Determining whether the shared area of the smart terminal includes the target rendering engine; If so, determining the target rendering engine from the shared area; If not, download the target rendering engine.
3. The method according to claim 1, characterized in that After determining the target rendering engine, the method further includes: The target rendering engine is backed up to the local directory where the target object is installed.
4. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: Sending a version detection request to a server, wherein the version detection request includes version information of the target rendering engine; Obtaining updated content of version information for the target rendering engine from the server; The target rendering engine is updated according to the update content.
5. The method according to claim 4, characterized in that 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 sending the version detection request to the server, the method further includes: If the version information of the target rendering engine included in the shared area 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 is replaced with the target rendering engine included in the shared area of the smart terminal.
6. The method according to claim 1, characterized in that The initialization of the operating environment of the target rendering engine includes: Obtaining a software development kit for the target rendering engine; The target rendering engine is initialized in its operating environment according to the software development kit.
7. The method according to claim 1, characterized in that The step of replacing the system rendering engine of the smart terminal with the target rendering engine includes: By creating an instance of the target rendering engine, the system rendering engine of the smart terminal is replaced with the target rendering engine.
8. A rendering engine sharing device, characterized in that: The device comprises an acquisition unit, an installation unit, a determination unit, a replacement unit and a creation unit: The acquisition unit is used to acquire an installation package of a target object, the target object has a function of providing services through a page view component, and the installation package does not include a rendering engine for the page view component; The installation unit is used to install the target object on the smart terminal through the installation package; The determining unit is used to determine a target rendering engine before the target object creates a page view component, wherein the target rendering engine includes a difference parameter, and the difference parameter is used to identify the difference between system rendering engines under different versions; The replacement unit is configured to replace the system rendering engine of the smart terminal with the target rendering engine by initializing the operating environment of the target rendering engine; The performance of the target rendering engine is better than that of the system rendering engine; The creation unit is used to determine the target version information of the system rendering engine of the smart terminal if a request for creating a page view component for the target object is obtained; and create a page view component for the target object through the target rendering engine according to the target version information and the difference parameter.
9. The device according to claim 8, characterized in that The determining unit is specifically configured to: Determining whether the shared area of the smart terminal includes the target rendering engine; If so, determining the target rendering engine from the shared area; If not, download the target rendering engine.
10. The device according to claim 8, characterized in that The determining unit is further specifically configured to: After determining the target rendering engine, backing up the target rendering engine to a local directory where the target object is installed.
11. The device according to any one of claims 8 to 10, characterized in that: The determining unit is further specifically configured to: Sending a version detection request to a server, wherein the version detection request includes version information of the target rendering engine; Obtaining updated content of version information for the target rendering engine from the server; The target rendering engine is updated according to the update content.
12. The device according to claim 11, characterized in that The determining unit is further specifically configured to: 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 sending a version detection request to the server, if the version information of the target rendering engine included in the shared area 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 is replaced with the target rendering engine included in the shared area of the smart terminal.
13. The device according to claim 8, characterized in that The replacement unit is specifically used for: Obtaining a software development kit for the target rendering engine; The target rendering engine is initialized in its operating environment according to the software development kit.
14. The device according to claim 8, characterized in that The replacement unit is further specifically used for: By creating an instance of the target rendering engine, the system rendering engine of the smart terminal is replaced with the target rendering engine.
15. A rendering engine sharing device, characterized in that: The system comprises a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors, wherein the one or more programs include instructions for performing the following operations: Obtaining an installation package of a target object, wherein the target object has a function of providing services through a page view component, and the installation package does not include a rendering engine for the page view component; Install the target object on the smart terminal through the installation package; Before the target object creates a page view component, a target rendering engine is determined, wherein the target rendering engine includes a difference parameter, and the difference parameter is used to identify the difference between system rendering engines under different versions; By initializing the operating environment of the target rendering engine, the system rendering engine of the smart terminal is replaced with the target rendering engine; the performance of the target rendering engine is better than that of the system rendering engine; If a request to create a page view component for the target object is obtained, determining target version information of the system rendering engine of the smart terminal; According to the target version information and the difference parameter, a page view component is created for the target object through the target rendering engine.
16. The device according to claim 15, characterized in that The processor executes the one or more programs including instructions for performing the following operations: Determining whether the shared area of the smart terminal includes the target rendering engine; If so, determining the target rendering engine from the shared area; If not, download the target rendering engine.
17. The device according to claim 15, characterized in that The processor executes the one or more programs including instructions for performing the following operations: The target rendering engine is backed up to the local directory where the target object is installed.
18. The device according to any one of claims 15 to 17, characterized in that: The processor executes the one or more programs including instructions for performing the following operations: Sending a version detection request to a server, wherein the version detection request includes version information of the target rendering engine; Obtaining updated content of version information for the target rendering engine from the server; The target rendering engine is updated according to the update content.
19. The device according to claim 18, characterized in that The processor executes the one or more programs including instructions for performing the following operations: If the version information of the target rendering engine included in the shared area 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 is replaced with the target rendering engine included in the shared area of the smart terminal.
20. The device according to claim 15, characterized in that The processor executes the one or more programs including instructions for performing the following operations: Obtaining a software development kit for the target rendering engine; The target rendering engine is initialized in its operating environment according to the software development kit.
21. The device according to claim 15, characterized in that The processor executes the one or more programs including instructions for performing the following operations: By creating an instance of the target rendering engine, the system rendering engine of the smart terminal is replaced with the target rendering engine.
22. A machine-readable medium having instructions stored thereon, which, when executed by one or more processors, causes a device to execute the rendering engine sharing method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Interface calling method, apparatus and terminal
CN104881318A
Webpage access method and device
CN104978378A
Kernel loading method and apparatus, and storage medium
CN108549552A
