CN112083981A - Method and device for creating page view component - Google Patents

Method and device for creating page view component Download PDF

Info

Publication number
CN112083981A
CN112083981A CN201910517014.3A CN201910517014A CN112083981A CN 112083981 A CN112083981 A CN 112083981A CN 201910517014 A CN201910517014 A CN 201910517014A CN 112083981 A CN112083981 A CN 112083981A
Authority
CN
China
Prior art keywords
rendering engine
target
page view
view component
creating
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
CN201910517014.3A
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 CN201910517014.3A priority Critical patent/CN112083981A/en
Publication of CN112083981A publication Critical patent/CN112083981A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Human Computer Interaction (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the application discloses a method and a device for creating a page view component. Therefore, when the page view component corresponding to the target object needs to be created, 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.

Description

Method and device for creating page view component
Technical Field
The present application relates to the field of data processing, and in particular, to a method and an apparatus for creating a page view component.
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, the rendering engine provided by the intelligent terminal system has weak performance, and is difficult to meet the current object development requirement.
Disclosure of Invention
In order to solve the technical problem, the application provides a method and a device for creating a page view component, the page view component corresponding to a target object is created by calling a target rendering engine, and the performance of the target rendering engine is superior to that of a system rendering engine, so that the method and the device can be suitable for more development requirements.
The embodiment of the application discloses the following technical scheme:
in a first aspect, an embodiment of the present application provides a method for creating a page view component, where the method includes:
before a page view component corresponding to a target object is created, initializing a running environment of a target rendering engine, and replacing a system rendering engine of an intelligent terminal for deploying the target object with the target rendering engine; the target rendering engine has better performance than the system rendering engine;
and if a request for creating the page view component corresponding to the target object is obtained, creating the page view component corresponding to the target object according to the target rendering engine.
Optionally, before creating the page view component corresponding to the target object, the method includes:
when the intelligent terminal starts the target object, or when a request of a page view component corresponding to the target object is generated.
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, according to the target rendering engine, a page view component corresponding to the target object includes:
determining target version information of a system rendering engine of the intelligent terminal;
and creating a page view creating component corresponding to 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.
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.
In a second aspect, an embodiment of the present application provides an apparatus for creating a page view component, where the apparatus includes a replacing unit and a creating unit:
the replacing unit is used for replacing a system rendering engine of the intelligent terminal for deploying the target object with the target rendering engine by initializing the running environment of the target rendering engine before the page view component corresponding to the target object is created; the target rendering engine has better performance than the system rendering engine;
and the creating unit is used for creating the page view component corresponding to the target object according to the target rendering engine if a request for creating the page view component corresponding to the target object is obtained.
Optionally, before creating the page view component corresponding to the target object, the method includes: when the intelligent terminal starts the target object, or when a request of a page view component corresponding to the target object is generated.
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 creating component corresponding to 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.
Optionally, the creating 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.
In a third aspect, an embodiment of the present application provides a page view component creating apparatus, 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, where the one or more programs include instructions for:
before a page view component corresponding to a target object is created, initializing a running environment of a target rendering engine, and replacing a system rendering engine of an intelligent terminal for deploying the target object with the target rendering engine; the target rendering engine has better performance than the system rendering engine;
and if a request for creating the page view component corresponding to the target object is obtained, creating the page view component corresponding to the target object according to the target rendering engine.
Optionally, before creating the page view component corresponding to the target object, the method includes: when the intelligent terminal starts the target object, or when a request of a page view component corresponding to the target object is generated.
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 creating component corresponding to 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.
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.
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 creating a page view component as claimed in one or more of the first aspects.
According to the technical scheme, before the page view component corresponding to the target object is created, the running 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 running environment. Therefore, when the page view component corresponding to the target object needs to be created, 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.
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 method for creating a page view component 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 block diagram of a device for creating a page view component according to an embodiment of the present application;
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.
When an object deployed in the intelligent terminal provides a service for a user through a webpage view component, the service needs to be realized by calling a system rendering engine. However, the performance of a system rendering engine provided by a smart terminal system such as an android system is weak, and it is difficult to support some complex functions that can be realized through a web page view component. For an object developed based on the system rendering engine, if a developer has a development requirement for developing the complex function, it is difficult to develop work for the development requirement due to the functional limitation of the system rendering engine.
Based on this, the embodiment of the application provides a method for creating a page view component, and through a mechanism of replacing a rendering engine, when a page view component for any object needs to be created, a replaced target rendering engine with better performance can be called to create the page view component, and subsequent services are provided. Therefore, development possibility based on the target rendering engine is provided for developers, and influence of performance limitation of the rendering engine of the original system on development requirements is reduced.
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 creating the page view component 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. For convenience of introduction, the method for creating the page view component provided by the embodiment of the present application will be described later by taking the intelligent terminal as an execution subject.
For a target object deployed in the intelligent terminal, namely any object deployed in the intelligent terminal and having a webpage display function, before a page view component corresponding to the target object is created, a running environment can be initialized for the target rendering engine, so that the running environment is suitable for the target rendering engine, and an implementation basis is provided for replacing the target rendering engine with a system rendering engine.
In the embodiment of the present application, replacing the target rendering engine with the system rendering engine may be understood as replacing the system rendering engine that should originally provide the web view component function for the target object with the target rendering engine, and providing the processing logic of the web view component function for the target object by the target rendering engine. That is, 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 to be directed to the entire smart terminal system.
When a 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 a target rendering engine with better performance, instead of calling a system rendering engine with weaker performance, for example, a mobile phone is used as an intelligent terminal, a game APP with a webpage page display function deployed on the mobile phone is used as a target object, and the smart phone includes an original system rendering engine a and a target rendering engine B with better performance than the system rendering engine a. Before a page view component corresponding to the game APP is created, initializing a running environment of a target rendering engine B, so that a system rendering engine A in the mobile phone is replaced by the target rendering engine B under an environment suitable for the target rendering engine B to run. Therefore, when the page view component corresponding to the game APP needs to be created, the page view component corresponding to the game APP can be created according to the target rendering engine B with better performance, and the page view component corresponding to the game APP can be achieved by calling the system rendering engine A with weaker performance.
Therefore, through the mechanism for replacing the rendering engine provided by the embodiment of the application, the webpage view component function of the target object can be realized by calling the target rendering engine instead of calling the system rendering engine, and as the performance of the target rendering engine is superior to that of the system rendering engine, the method can be suitable for more development requirements, so that developers can develop the target object based on the target rendering engine with superior performance, and the development requirements which cannot be implemented originally are possible.
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: before a page view component corresponding to a target object is created, a system rendering engine of an intelligent terminal for deploying the target object is replaced by the target rendering engine by initializing a running environment of the target rendering engine.
In the embodiment of the application, any object which is deployed on the intelligent terminal and has a webpage display function can be used as a target object. And aiming at a system rendering engine in the intelligent terminal, a rendering engine with performance superior to that of the system rendering engine can be developed in advance and is marked as a target rendering engine. Before creating the page view component corresponding to the target object, initializing the running environment of the target rendering engine so that the current environment is suitable for running of the target rendering engine, and having the basic condition for replacing the rendering engine for the target object, so that the system rendering engine of the intelligent terminal deploying the target object can be replaced by the target rendering engine with better performance.
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.
It can be understood that, in the embodiment of the present application, the replacing step of the rendering engine is performed before the page view component corresponding to the target object is created, so that when the page view component for the target object needs to be created, the replaced better-performance target rendering engine is invoked to implement the creation of the page view component, and provide subsequent services. In a possible implementation manner, for example, the time point corresponding to the time point before the page view component corresponding to the target object is created in step S101 may be when the target object is started at the smart terminal, or when a request for generating the page view component corresponding to the target object is generated.
The time point corresponding to before the page view component corresponding to the target object is created may be when the smart terminal starts the target object, that is, for the target object of the smart terminal, when the smart terminal starts the target object, for example, in a specific implementation, when the target object is started, an onCreate () function for the target object is executed, during which the target rendering engine is initialized with the running environment, and the system rendering engine is replaced with the 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 deployed 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. When the game APP is started by the mobile phone, initializing the running environment of the target rendering engine B, and replacing the system rendering engine A of the mobile phone with the target rendering engine B with better performance.
When the rendering engine is not replaced in time, the situation that the system rendering engine is used as the background logic for creating the page view component can occur, and in order to avoid the situation, the replacement step of the rendering engine can be carried out when the intelligent terminal starts the target object, so that the functions of creating the page view component and the like can be realized according to the target rendering engine with better performance in the whole running process of the target object, and the system rendering engine with poorer performance is prevented from being called for realization.
In addition, the corresponding time point before the page view component corresponding to the target object is created can also be when a request for generating the page view component corresponding to the target object is made. It should be noted that, for a target object of the intelligent terminal, when a page view component corresponding to the target object needs to be created, a request of the page view component corresponding to the target object generally needs to be generated first, and the step of creating the page view component is performed only when the request of the page view component corresponding to the target object is obtained.
Then, for the target object of the intelligent terminal, when a request of the page view component corresponding to the target object is generated, the target rendering engine may be initialized with the operating environment, and the system rendering engine may be replaced with the 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 deployed 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. When a request of a page view component corresponding to a game APP is generated, initializing a running environment of a target rendering engine B, and replacing a system rendering engine A of a mobile phone with the target rendering engine B with better performance.
Because the target object may appear in the whole operation process without involving the display scene of the webpage, in order to avoid the problem of system resource waste caused by the step of still performing rendering engine replacement in the scene, the step of performing rendering engine replacement can be performed when a request of the page view component corresponding to the target object is generated, that is, when the page view component corresponding to the target object needs to be created, so that the waste of unnecessary system resources can be reduced, and the system operation efficiency can be improved.
S102: and if the request for creating the page view component corresponding to the target object is obtained, creating the page view component corresponding to 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 deployed 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 S101 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, in the embodiment of the application, before the page view component corresponding to the target object is created, the running 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 running environment. Therefore, when the page view component corresponding to the target object needs to be created, 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.
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 S101, in a possible implementation manner, a method for initializing a runtime environment of a target rendering engine may include:
s201: 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.
S202: 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 S101, 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 connected by the solid line shown in fig. 2 may correspond to the method involved in the background art, that is, a method for creating a page view component corresponding to a target object according to a system rendering engine by calling an instance of the system rendering engine to implement a background logic using the system rendering engine as the page view component corresponding to the target object; while the architecture diagram shown in fig. 2, connected by dashed lines, may correspond to the approach provided by 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. Then, 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 S102, the method may include:
s301: 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".
S302: 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.
In the embodiment of the present application, the function of updating the target rendering engine may be provided, that is, for the target rendering engine in the intelligent terminal, if a latest version of the target rendering engine is released, the target rendering engine in the intelligent terminal may be updated to the latest version of the target rendering engine. In a possible implementation manner, before performing the replacing step of the rendering engine shown in fig. 1, that is, replacing the system rendering engine of the smart terminal that deploys the target object with the target rendering engine, the target rendering engine may be updated, and the method for updating the target rendering engine may include:
s401: 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 the target rendering engine in the smart terminal, where the version information of the target rendering engine described herein may be used to indicate a system 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.
S402: update content for version information of the target rendering engine is acquired from the server.
S403: 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, before the replacing step of the rendering engine shown in fig. 1, that is, replacing the system rendering engine of the intelligent terminal deploying the target object with the target rendering engine, the target rendering engine in the intelligent terminal is updated, so that the replaced target rendering engine of the latest version can be called in the next step to realize functions of creating a page view component and the like, 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.
Based on the method for creating a page view component provided in the embodiment corresponding to fig. 1, an embodiment of the present application provides a device for creating a page view component, see fig. 3, which shows a structure diagram of the device for creating a page view component provided in the embodiment of the present application, and as shown in fig. 3, the device includes a replacing unit 301 and a creating unit 302:
the replacing unit 301 is configured to replace a system rendering engine of an intelligent terminal, which deploys a target object, with the target rendering engine by initializing a running environment of the target rendering engine before creating a page view component corresponding to the target object; the target rendering engine has better performance than the system rendering engine;
the creating unit 302 is configured to create, according to the target rendering engine, a page view component corresponding to the target object if a request for creating the page view component corresponding to the target object is obtained.
Optionally, before creating the page view component corresponding to the target object, the method includes: when the intelligent terminal starts the target object, or when a request of a page view component corresponding to the target object is generated.
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 302 is specifically configured to:
determining target version information of a system rendering engine of the intelligent terminal;
and creating a page view creating component corresponding to the target object through the target rendering engine according to the target version information and the difference parameters.
Optionally, the replacing unit 301 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 301 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.
Optionally, the creating unit 302 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.
According to the technical scheme, before the page view component corresponding to the target object is created, the running 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 running environment. Therefore, when the page view component corresponding to the target object needs to be created, 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.
Based on the aforementioned method and apparatus for creating a page view component, this embodiment provides a device for creating a page view component, where the device for creating a page view component may be a terminal device, and fig. 4 is a block diagram of a terminal device 400 shown 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 in which instructions, when executed by a processor of a mobile terminal, enable the mobile terminal to perform a method of creating a page view component, the method comprising:
before a page view component corresponding to a target object is created, initializing a running environment of a target rendering engine, and replacing a system rendering engine of an intelligent terminal for deploying the target object with the target rendering engine; the target rendering engine has better performance than the system rendering engine;
and if a request for creating the page view component corresponding to the target object is obtained, creating the page view component corresponding to 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 for creating a page view component, the method comprising:
before a page view component corresponding to a target object is created, initializing a running environment of a target rendering engine, and replacing a system rendering engine of an intelligent terminal for deploying the target object with the target rendering engine; the target rendering engine has better performance than the system rendering engine;
and if a request for creating the page view component corresponding to the target object is obtained, creating the page view component corresponding to the target object according to the target rendering engine.
2. The method of claim 1, wherein before creating the page view component corresponding to the target object, the method comprises:
when the intelligent terminal starts the target object, or when a request of a page view component corresponding to the target object is generated.
3. 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.
4. The method of claim 3, wherein creating the page view component corresponding to 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 creating component corresponding to the target object through the target rendering engine according to the target version information and the difference parameters.
5. The method of any of claims 1-4, wherein initializing a runtime environment for a target rendering engine comprises:
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.
6. The method according to any one of claims 1 to 4, wherein the replacing the system rendering engine of the intelligent terminal with the target rendering engine comprises:
and replacing the system rendering engine of the intelligent terminal with the target rendering engine by creating an instance of the target rendering engine.
7. The method according to any one of claims 1-4, 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.
8. An apparatus for creating a page view component, the apparatus comprising a replacing unit and a creating unit:
the replacing unit is used for replacing a system rendering engine of the intelligent terminal for deploying the target object with the target rendering engine by initializing the running environment of the target rendering engine before the page view component corresponding to the target object is created; the target rendering engine has better performance than the system rendering engine;
and the creating unit is used for creating the page view component corresponding to the target object according to the target rendering engine if a request for creating the page view component corresponding to the target object is obtained.
9. An apparatus for creating a page view component, 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:
before a page view component corresponding to a target object is created, initializing a running environment of a target rendering engine, and replacing a system rendering engine of an intelligent terminal for deploying the target object with the target rendering engine; the target rendering engine has better performance than the system rendering engine;
and if a request for creating the page view component corresponding to the target object is obtained, creating the page view component corresponding to 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 creating a page view component as claimed in one or more of claims 1 to 7.
CN201910517014.3A 2019-06-14 2019-06-14 Method and device for creating page view component Pending CN112083981A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910517014.3A CN112083981A (en) 2019-06-14 2019-06-14 Method and device for creating page view component

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910517014.3A CN112083981A (en) 2019-06-14 2019-06-14 Method and device for creating page view component

Publications (1)

Publication Number Publication Date
CN112083981A true CN112083981A (en) 2020-12-15

Family

ID=73734063

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910517014.3A Pending CN112083981A (en) 2019-06-14 2019-06-14 Method and device for creating page view component

Country Status (1)

Country Link
CN (1) CN112083981A (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
CN105955765B (en) Application preloading method and device
US20150333971A1 (en) Method and device for managing processes of application program
CN111221559B (en) Application updating method, device, storage medium, terminal and server
US20180365003A1 (en) Method and apparatus for updating application
CN105808305B (en) Static resource loading method and device
CN111427622B (en) Execution method and device of script codes in application program
CN110839073A (en) Method for acquiring push information, method and device for sending push information
CN109117144B (en) Page processing method, device, terminal and storage medium
CN110781080A (en) Program debugging method and device and storage medium
CN107911482B (en) Target application opening method and device
CN107463372B (en) Data-driven page updating method and device
CN108280342B (en) Application synchronization method and device for application synchronization
RU2632396C2 (en) Method and device to control router plug-in module
CN109471714B (en) Platform deployment method, device, equipment and storage medium
CN109901886B (en) Page language switching method, system, device and computer readable storage medium
CN112083981A (en) Method and device for creating page view component
CN112181406A (en) Rendering engine sharing method and device
CN112087544B (en) Prompting method and device
CN110569037B (en) Data writing method and device
CN109933357B (en) Application program upgrading method and device
CN111597106A (en) Point burying management method and device
CN112214252A (en) Information expansion method and device and electronic equipment
CN111104110A (en) Global style sharing method, global style sharing device and electronic device
CN110311968B (en) Method and device for loading file in streaming mode and intelligent equipment
CN114416218B (en) Data processing method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination