WO2017157175A1 - 一种应用启动方法、装置和智能终端 - Google Patents
一种应用启动方法、装置和智能终端 Download PDFInfo
- Publication number
- WO2017157175A1 WO2017157175A1 PCT/CN2017/075449 CN2017075449W WO2017157175A1 WO 2017157175 A1 WO2017157175 A1 WO 2017157175A1 CN 2017075449 W CN2017075449 W CN 2017075449W WO 2017157175 A1 WO2017157175 A1 WO 2017157175A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- application
- startup
- parent process
- parent
- child
- 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.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44505—Configuring for program initiating, e.g. using registry, configuration files
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44521—Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45504—Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators
- G06F9/45529—Embedded in an application, e.g. JavaScript in a Web browser
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
- G06F9/485—Task life-cycle, e.g. stopping, restarting, resuming execution
- G06F9/4856—Task life-cycle, e.g. stopping, restarting, resuming execution resumption being on a different machine, e.g. task migration, virtual machine migration
- G06F9/4862—Task life-cycle, e.g. stopping, restarting, resuming execution resumption being on a different machine, e.g. task migration, virtual machine migration the task being a mobile agent, i.e. specifically designed to migrate
- G06F9/4868—Task life-cycle, e.g. stopping, restarting, resuming execution resumption being on a different machine, e.g. task migration, virtual machine migration the task being a mobile agent, i.e. specifically designed to migrate with creation or replication
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
Definitions
- the present application relates to the field of application processing technologies, and in particular, to an application startup method, an application startup device, and an intelligent terminal.
- Javascript language Because the Javascript language has strong community support and features dynamic updates, it is widely used in games and applications such as games. At the same time, the industry has introduced frameworks and engines based on javascript, such as unity3d-js, cocos2d-js, React.js, React Native, etc., so that developers can write applications through these frameworks and engines.
- some frameworks or engines use the Native language to write some functional modules of the application in order to improve the running efficiency.
- the binding relationship between the Javascript interface and the Native functional module needs to be established during the startup process of the application.
- the establishment of the above binding relationship increases the time loss during the application startup process.
- the technical problem to be solved by the embodiments of the present application is to provide an application startup method, which can improve the startup speed of the application.
- the embodiment of the present application further provides an application starting device and an intelligent terminal to ensure implementation and application of the foregoing method.
- an application startup method including:
- the startup process associated with the application is performed by the parent process before the application is launched;
- the application is launched by the child process.
- the step of performing a startup process associated with the application by using a parent process including:
- the startup process of the function module associated with the application is performed by the parent process.
- the step of performing a startup process associated with the application by using a parent process including:
- the step of performing a startup process associated with the application by using a parent process including:
- the target JavaScript code associated with the application is compiled in the virtual machine to obtain a corresponding compilation result.
- the step of compiling the target JavaScript code associated with the application in the virtual machine includes:
- the syntax tree is compiled to obtain instructions that the smart terminal can recognize.
- the step of creating a child process by using the parent process includes:
- the fork function is executed by the parent process to obtain a child process corresponding to the parent process.
- the parent process corresponds to multiple child processes
- the startup process associated with the application includes: a startup process that is commonly associated with multiple applications corresponding to the multiple child processes.
- the application also discloses an application activation device, including:
- a startup module is configured to launch the application by the child process.
- the execution module includes:
- the first execution submodule is configured to perform a startup process of the function module associated with the application by the parent process.
- the execution module includes:
- the execution module includes:
- the third execution submodule is configured to establish, by the parent process, a binding relationship between the JavaScript interface associated with the application and the Native functional module.
- the execution module includes:
- a launch submodule for launching a virtual machine in the parent process
- the compiling submodule includes:
- a syntax tree generating unit configured to parse the target JavaScript code associated with the application in the virtual machine to obtain a corresponding syntax tree
- the instruction generating unit is configured to compile the syntax tree to obtain an instruction that the smart terminal can recognize.
- the present application also discloses an intelligent terminal comprising a memory and one or more programs, wherein one or more programs are stored in the memory and configured to be executed by one or more processors
- the one or more programs include instructions for performing the following operations:
- the startup process associated with the application is performed by the parent process before the application is launched;
- the application is launched by the child process.
- the embodiment of the present application includes the following advantages:
- FIG. 2 is a flow chart of steps of a second embodiment of an application startup method according to the present application.
- Embodiment 3 is a flow chart of steps of Embodiment 2 of an application startup method according to the present application;
- FIG. 4 is a structural block diagram of an embodiment of an application activation device of the present application.
- FIG. 5 is a structural block diagram of an embodiment of a smart terminal of the present application.
- One of the core concepts of the embodiments of the present application is to pre-start a parent process before the application is started, and execute a startup process associated with the application by the parent process; and, in response to the startup instruction of the application, pass the parent
- the process creates a child process and launches the application through the child process.
- the process information of the data segment, the code segment, and the stack of the parent process can be copied into the space of the child process; and the process execution information of the parent process can include The startup processing result associated with the above application; thus, compared with the existing solution, since the embodiment of the present application completes the startup processing associated with the application by the parent process before the application is started, the startup process starts the required operation for the application. Part of it, therefore, can reduce the number of operations required by the child process to start the application, thereby increasing the startup speed of the application.
- the foregoing operating systems may specifically include but are not limited to: Android, IOS, cloud OS, Linux, Windows, and the like.
- the above intelligent terminal specifically includes but not limited to: smart phone, tablet computer, e-book reader, MP3 (Moving Picture Experts Group Audio Layer III) player, MP4 (motion image expert compresses standard audio) Level 4, Moving Picture Experts Group Audio Layer IV) Players, laptops, on-board computers, desktop computers, set-top boxes, smart TVs, wearable devices, and more.
- the operating system may perform a startup process of a function module (such as a networking module, a drawing module, and the like) associated with the WeChat APP through a parent process before the WeChat APP is started in the smart terminal;
- a function module such as a networking module, a drawing module, and the like
- the child process may be created by the parent process, and the WeChat APP is started by the child process. Since the startup process of the function module associated with the WeChat APP is performed in advance in the parent process, the operation required for the child process to start the application can be reduced, thereby improving the startup speed of the application.
- FIG. 1 a flow chart of steps in the first embodiment of an application startup method of the present application is shown, which may specifically include the following steps:
- the above-mentioned startup process associated with the application may be associated with one application or may be associated with multiple applications.
- multiple applications such as WeChat APP, Alipay APP, QQ APP, and browser APP need to have networking functions and drawing functions, so the startup processing of corresponding functional modules such as networking functions and drawing functions can be associated with multiple applications.
- the step of performing a startup process associated with the application by using a parent process may specifically include:
- the functional module may be a module for implementing an application operating environment.
- the application running environment may specifically include a network environment, a drawing environment, and the like, and the corresponding module may specifically include a networking module and a drawing module, where the drawing module may further include: a GUI (Graphical User Interface) module, Render modules, etc.
- GUI Graphic User Interface
- the functional module may also be a module for implementing an application function. It can be understood that the embodiments of the present application do not limit the specific functional modules.
- an associated function module may be collected in advance for an application that needs to increase the startup speed, and the corresponding collection manner may include: analyzing the application, or cooperating with the developer of the application, etc., the application
- the embodiment does not limit the specific collection method.
- the step of performing a startup process associated with the application by using a parent process may specifically include:
- Step B1 executing a system API and/or a library associated with the application through a parent process.
- system API application programming interface, Application Program Interface
- the system API is a function provided by the operating system to the user to easily design an application, which can be used to implement some specific functions. Since the system API can be independent of the application, the system API associated with the application can be pre-executed by the parent process.
- a library is a way of putting functions into a library for use.
- the above library may specifically include: a class library, a standard library, a dynamic link library, etc.; wherein, the Class Library is a comprehensive object-oriented reusable type set, and the types include: an interface, an abstract class, and a concrete class. Since the library is usually language dependent and can be independent of the application, the library associated with the application can be pre-executed by the parent process.
- an associated system API and/or a library may be collected in advance for an application that needs to increase the startup speed.
- the corresponding collection manner may include: analyzing the application, or cooperating with the developer of the application.
- the embodiment of the present application does not limit the specific collection manner.
- the operating system may execute a system API and/or a library associated with the Alipay APP through a parent process before the Alipay APP is started in the smart terminal (such as a common class library, a standard library).
- the child process may be created by the parent process, and the Alipay APP is started by the child process. Since the startup process of the system API and/or the library associated with the Alipay APP is pre-executed in the parent process, the operations required for the child process to start the application can be reduced, thereby enabling the startup speed of the application to be improved.
- the step of performing a startup process associated with the application by using a parent process may specifically include:
- Step C1 Establish a binding relationship between the JavaScript interface associated with the application and the Native functional module by using a parent process.
- Technical solution 3 can be applied to this category of partial functional modules written in the Native language.
- Target application the existing solution usually establishes the binding relationship between the Javascript interface and the Native function module during the startup process of the target application.
- the technical solution 3 can establish a binding relationship between the JavaScript interface and the Native functional module of the target application in advance through the parent process before the target application is started. Therefore, the establishment process of the binding relationship can be saved during the application startup process. The time lost by the use of the target application can be increased.
- the related information of the JavaScript interface and the Native function module of the target application may be collected in advance, so that the binding relationship may be established according to the related information in the step C1.
- the specific establishment process of the relationship is not limited.
- the step of performing a startup process associated with the application by using a parent process may specifically include:
- Step D1 Start a virtual machine in the parent process
- Step D2 Compile the target JavaScript code associated with the application in the virtual machine to obtain a corresponding compilation result.
- the technical solution 4 can be applied to an application written in the JavaScript language; since the target JavaScript code associated with the application can be pre-compiled in the virtual machine of the parent process, so that the child process directly executes the corresponding compilation result; The child process needs to start the application The compilation of the target JavaScript code can therefore increase the startup speed of the application.
- the above target JavaScript code may include: any JavaScript code required to launch the application.
- the above-mentioned target JavaScript code may include: the JavaScript code corresponding to the startup process in the above-mentioned technical solution 1 - technical solution 3; and, for example, the target JavaScript code may further include: a code of a functional module written by the JavaScript language.
- JavaScript code functions, and/or functions in the JavaScript code object may be executed to obtain compiled results in native machine code form. So that the child process can directly execute the above compilation results. This can greatly improve the execution speed of the application compared to the way in which the existing scheme is explained line by line.
- the step D2 of compiling the target JavaScript code associated with the application in the virtual machine may specifically include: first, in the virtual machine, the The associated target JavaScript code is parsed to obtain a corresponding syntax tree; then the syntax tree is compiled to obtain an instruction recognizable by the smart terminal. The parsing may be performed in a parsing manner to generate a corresponding syntax tree.
- the compilation process of the above syntax tree may be an optional process, and it is also feasible for the parent process to compile the syntax tree without compiling the syntax tree by the child process.
- the target JavaScript code associated with the application is performed in the virtual machine.
- the step D2 of the compilation may specifically include:
- Step D21 Calling a virtual machine related function to parse the target javascript code associated with the application
- Step D22 executing a warm-up code capable of calling a key javacript function to obtain an instruction that the smart terminal can recognize.
- the key javascript function is called, so that the key javascript function can be fully compiled, and The preheat code may not affect the execution result of the target javascript code. It can be understood that the key javascript functions can be within the protection scope of the key javascript function of the present application, and the embodiment of the present application does not limit the specific key javascript function and the warm-up code.
- Step 102 Create a child process by using the parent process in response to the startup instruction of the application.
- the child process can be used as an application process. Since it is a copy of the parent process, after the child process is created, the process information of the data segment, the code segment, and the stack of the parent process can be copied to the space of the child process.
- the process execution information of the parent process may include the startup processing result associated with the application, and the space of the child process may also include the startup processing result, thereby reducing the operation required for the child process to start the application. This can increase the startup speed of the application.
- the step 102 of creating a child process by using the parent process may specifically include:
- step E1 in response to the startup instruction of the application, a fork function is executed by the parent process to obtain a child process corresponding to the parent process.
- the CreateProcess() function may be run by the parent process to obtain the child process corresponding to the parent process, wherein the BOOL bInheritHandles of the CreateProcess() function may be used to specify whether to inherit.
- the properties of the parent process It can be understood that the specific process of creating a child process by the parent process is not limited in this embodiment of the present application.
- the parent process may correspond to multiple child processes, and the startup process associated with the application may specifically include: multiple applications corresponding to the multiple child processes Associated startup processing.
- the parent process may correspond to three sub-processes of the three applications, such as a WeChat APP, an Alipay APP, and a browser APP, and the startup process associated with the application may include: Specifically, the startup process may include: a startup process of the function modules that are commonly associated with the three applications, an API and/or a startup process of the library that are commonly associated with the three applications, and the like.
- the method may include the following steps:
- Step 201 Start a parent process.
- Step 202 Start a virtual machine in the parent process.
- the above virtual machine can be used as an execution environment of JavaScript code.
- Step 203 Perform, after the application is started, a startup process associated with the application by using a parent process
- the step 203 may specifically include at least one of the following steps:
- Step 231 Enter, in the virtual machine, the target JavaScript code associated with the application. Compile the line to get the corresponding compilation result;
- Step 232 Perform startup processing of a function module associated with the application in the virtual machine.
- Step 233 Establish a binding relationship between the JavaScript interface associated with the application and the Native functional module in the virtual machine.
- Step 234 Perform, in the virtual machine, a system API and/or a library associated with the application;
- Step 204 In response to the startup instruction of the application, create a child process by using the parent process, where the child process is an application process of the application;
- Step 205 Start the application by using the application process.
- the step 204 may create an application process of the current application after receiving the startup instruction of the application, where a plurality of application processes may be created when the application has multiple startup commands.
- the foregoing method saves system resources by means of a parent process corresponding to multiple child processes of multiple applications.
- Embodiment 3 of an application starting method of the present application is shown, which may specifically include the following steps:
- Step 301 Start a parent process.
- the steps performed by the parent process may specifically include:
- Step 302 Initialize a JavaScript VM (Virtual Manufacturing) in the parent process
- Step 303 Perform, by using the VM, the startup process associated with the application
- the step 303 of performing the startup process associated with the application by using the foregoing VM may specifically include at least one of the following steps:
- Step 331 Perform, by using the VM, a startup process of a function module associated with the application;
- Step 332 Perform, by the VM, a system API and/or a library associated with the application;
- Step 333 Establish a binding relationship between the JavaScript interface associated with the application and the Native functional module by using a parent process.
- Step 304 In response to the startup instruction of the application, create a child process by using the parent process as an application process corresponding to the application;
- the application process corresponding to the startup instruction may be created, that is, the number of application processes may be one or more, and the number of application processes created by the parent process is not in the embodiment of the present application. Limit it.
- steps performed by the application process may specifically include:
- Step 305 Start a corresponding application by using the application process.
- the executing module 401 is configured to execute, by the parent process, a startup process associated with the application before the application is started;
- the startup module 403 is configured to start the application by using the sub-process.
- the executing module 401 may specifically include:
- the first execution submodule is configured to perform a startup process of the function module associated with the application by the parent process.
- the executing module 401 may specifically include:
- a second execution sub-module for executing a system API and/or a library associated with the application through a parent process.
- the executing module 401 may specifically include:
- the third execution submodule is configured to establish, by the parent process, a binding relationship between the JavaScript interface associated with the application and the Native functional module.
- the executing module 401 may specifically include:
- the compiling sub-module may specifically include:
- a syntax tree generating unit configured to parse the target JavaScript code associated with the application in the virtual machine to obtain a corresponding syntax tree
- the instruction generating unit is configured to compile the syntax tree to obtain an instruction that the smart terminal can recognize.
- Creating a submodule configured to run a fork function by the parent process to obtain a child process corresponding to the parent process in response to a startup instruction of the application.
- the parent process may correspond to multiple child processes.
- the initiating process associated with the application may include: a startup process in which a plurality of applications corresponding to the plurality of sub-processes are associated in common.
- the method may include at least one memory 501, a display 502, at least one processor 503, and at least one input unit 504.
- the input unit 504 can be configured to receive numeric or character information input by a user, and a control signal.
- the input unit 504 may include a touch screen 541, which may collect a touch operation on or near the user (such as an operation of the user using a finger, a stylus, or the like on the touch screen 541 using any suitable object or accessory. ), and drive the corresponding connection device according to a preset program.
- the input unit 504 may also include other input devices such as a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), a mouse, and the like.
- the computer device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
- the memory may include non-persistent memory, random access memory (RAM), and/or non-volatile memory in a computer readable medium, such as read only memory (ROM) or flash memory.
- RAM random access memory
- ROM read only memory
- Memory is an example of a computer readable medium.
- Computer readable media includes both permanent and non-persistent, removable and non-removable media.
- Information storage can be implemented by any method or technology. The information can be computer readable instructions, data structures, modules of programs, or other data.
- Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory. (ROM), electrically erasable programmable read only memory (EEPROM), flash memory or other memory technology, compact disk read only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, Magnetic tape cartridges, magnetic tape storage or other magnetic storage devices or any other non-transportable media can be used to store information that can be accessed by a computing device.
- computer readable media does not include non-persistent computer readable media, such as modulated data signals and carrier waves.
- Embodiments of the present application are described with reference to flowcharts and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the present application. It will be understood that each flow and/or block of the flowchart illustrations and/or FIG.
- These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor or other programmable data processing terminal device to produce a machine such that instructions are executed by a processor of a computer or other programmable data processing terminal device Generated for implementing a process or multiple processes and/or parties in a flowchart
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
- Devices For Executing Special Programs (AREA)
Abstract
一种应用启动方法、装置和智能终端,其中的方法具体包括:在应用启动之前,通过父进程执行与所述应用相关联的启动处理(101);响应于所述应用的启动指令,通过所述父进程创建子进程(102);通过所述子进程启动所述应用(103)。该方法能够提高应用的启动速度。
Description
本申请涉及应用处理技术领域,特别是涉及一种应用启动方法、一种应用启动装置和一种智能终端。
由于Javascript语言有强大的社区支持,且同时具备可以动态更新的特点,因此其被广泛应用于游戏等各类APP(应用程序,Application)。同时业界纷纷推出以javascript为接口的框架和引擎,如unity3d-js、cocos2d-js、React.js、React Native等,以使开发人员通过这些框架和引擎编写应用。
现有方案通常在接收到用户针对应用的启动指令后,执行该应用所需的启动运算。然而,由于Javascript具有解释执行的特性,故现有方案通常利用解释器在执行Javascript的过程中对Javascript进行逐行解释。虽然上述逐行解释具有灵活方便的优点,但是其影响了Javascript的执行速度和应用的启动速度。
另外,有些框架或引擎为了提高运行效率,会使用Native(本地)语言编写应用的部分功能模块;这样,在应用的启动过程中需要建立Javascript接口和Native功能模块之间的绑定关系。然而,上述绑定关系的建立过程增加了应用启动过程中的时间损耗。
发明内容
本申请实施例所要解决的技术问题是提供一种应用启动方法,能够提高应用的启动速度。
相应的,本申请实施例还提供了一种应用启动装置和一种智能终端,用以保证上述方法的实现及应用。
为了解决上述问题,本申请公开了一种应用启动方法,包括:
在应用启动之前,通过父进程执行与所述应用相关联的启动处理;
响应于所述应用的启动指令,通过所述父进程创建子进程;
通过所述子进程启动所述应用。
可选地,所述通过父进程执行与所述应用相关联的启动处理的步骤,包括:
通过父进程执行与所述应用相关联的功能模块的启动处理。
可选地,所述通过父进程执行与所述应用相关联的启动处理的步骤,包括:
通过父进程执行与所述应用相关联的系统API和/或库。
可选地,所述通过父进程执行与所述应用相关联的启动处理的步骤,包括:
通过父进程建立所述应用相关联的JavaScript接口与Native功能模块之间的绑定关系。
可选地,所述通过父进程执行与所述应用相关联的启动处理的步骤,包括:
在所述父进程中启动虚拟机;
在所述虚拟机中对所述应用相关联的目标JavaScript代码进行编译,以得到对应的编译结果。
可选地,所述在所述虚拟机中对所述应用相关联的目标JavaScript代码进行编译的步骤,包括:
在所述虚拟机中对所述应用相关联的目标JavaScript代码进行解析,以得到对应的语法树;
对所述语法树进行编译,以得到智能终端能够识别的指令。
可选地,所述通过所述父进程创建子进程的步骤,包括:
响应于所述应用的启动指令,通过所述父进程运行分叉函数,以得到所述父进程对应的子进程。
可选地,所述父进程对应多个子进程,则所述与所述应用相关联的启动处理包括:所述多个子进程对应的多个应用共同关联的启动处理。
另一方面,本申请还公开了一种应用启动装置,包括:
执行模块,用于在应用启动之前,通过父进程执行与所述应用相关联的启动处理;
创建模块,用于响应于所述应用的启动指令,通过所述父进程创建子进程;以及
启动模块,用于通过所述子进程启动所述应用。
可选地,所述执行模块,包括:
第一执行子模块,用于通过父进程执行与所述应用相关联的功能模块的启动处理。
可选地,所述执行模块,包括:
第二执行子模块,用于通过父进程执行与所述应用相关联的系统API和/或库。
可选地,所述执行模块,包括:
第三执行子模块,用于通过父进程建立所述应用相关联的JavaScript接口与Native功能模块之间的绑定关系。
可选地,所述执行模块,包括:
启动子模块,用于在所述父进程中启动虚拟机;以及
编译子模块,用于在所述虚拟机中对所述应用相关联的目标JavaScript代码进行编译,以得到对应的编译结果。
可选地,所述编译子模块,包括:
语法树生成单元,用于在所述虚拟机中对所述应用相关联的目标JavaScript代码进行解析,以得到对应的语法树;以及
指令生成单元,用于对所述语法树进行编译,以得到智能终端能够识别的指令。
再一方面,本申请还公开了一种智能终端,包括有存储器,以及一个或者一个以上的程序,其中一个或者一个以上程序存储于存储器中,且经配置以由一个或者一个以上处理器执行所述一个或者一个以上程序包含用于进行以下操作的指令:
在应用启动之前,通过父进程执行与所述应用相关联的启动处理;
响应于所述应用的启动指令,通过所述父进程创建子进程;
通过所述子进程启动所述应用。
与现有方案相比,本申请实施例包括以下优点:
本申请实施例在应用启动之前预先启动父进程,并通过该父进程执行与上述应用相关联的启动处理;并且,响应于所述应用的启动指令,通过所述父进程创建子进程,并通过所述子进程启动所述应用;由于子进程是父进程的一个副本,创建子进程后,可以将父进程的代码段、数据段堆栈等进程执行信息拷贝到子进程的空间中;而父进程的进程执行信息中可以包含有与上述应用相关联的启动处理结果;这样,相对于现有方案,由于本申请实施例在应用启动之前通过父进程完成与上述应用相关联的启动处理,而该启动处理为应用启动所需运算的一部分,因此能够减少子进程所需的运算,从而能够提高应用的启动速度。
图1是本申请的一种应用启动方法实施例一的步骤流程图;
图2是本申请的一种应用启动方法实施例二的步骤流程图;
图3是本申请的一种应用启动方法实施例二的步骤流程图;
图4是本申请的一种应用启动装置实施例的结构框图;以及
图5是本申请的一种智能终端实施例的结构框图。
为使本申请的上述目的、特征和优点能够更加明显易懂,下面结合附图和具体实施方式对本申请作进一步详细的说明。
本申请实施例的核心构思之一在于,在应用启动之前预先启动父进程,并通过该父进程执行与上述应用相关联的启动处理;并且,响应于所述应用的启动指令,通过所述父进程创建子进程,并通过所述子进程启动所述应用。
由于子进程是父进程的一个副本,创建子进程后,可以将父进程的数据段、代码段、堆栈等进程执行信息拷贝到子进程的空间中;而父进程的进程执行信息可以包含有与上述应用相关联的启动处理结果;这样,相对于现有方案,由于本申请实施例在应用启动之前通过父进程完成与上述应用相关联的启动处理,而该启动处理为应用启动所需运算的一部分,因此能够减少子进程启动应用所需的运算,从而能够提高应用的启动速度。
本申请实施例提供的应用启动方法可应用于智能终端的操作系统中,例如,可以应用于上述操作系统中javascript接口的框架和引擎中。具体地,上述操作系统可以在智能终端上电后先于智能终端中APP启动,并且,上述操作系统可以在智能终端中APP启动之前,通过父进程执行与所述APP相关联的启动处理;以及,在接收到用户或者其他应用针对所述APP的启动指令后,通过所述父进程创建子进程,并通过所述子进程启动所述应用。
在实际应用中,上述操作系统具体可以包括但不限:安卓、IOS、云OS、Linux、Windows等。上述智能终端具体包括但不限:智能手机、平板电脑、电子书阅读器、MP3(动态影像专家压缩标准音频层面3,Moving Picture Experts Group Audio Layer III)播放器、MP4(动态影像专家压缩标准音频层面4,Moving Picture Experts Group Audio Layer IV)播放器、膝上型便携计算机、车载电脑、台式计算机、机顶盒、智能电视机、可穿戴设备等等。
在本申请的一种应用示例1中,操作系统可以在智能终端中微信APP启动之前,通过父进程执行与所述微信APP相关联的功能模块(如联网模块、绘图模块等)的启动处理;则在接收到用户针对所述微信APP的启动指令后,可以通过所述父进程创建子进程,并通过所述子进程启动所述微信APP。由于在父进程中预先执行了所述微信APP相关联的功能模块的启动处理,因此能够减少子进程启动应用所需的运算,从而能够提高应用的启动速度。
方法实施例一
参照图1,示出了本申请的一种应用启动方法实施例一的步骤流程图,具体可以包括如下步骤:
步骤101、在应用启动之前,通过父进程执行与所述应用相关联的启动处理;
本申请实施例中,与所述应用相关联的启动处理可以为支持预先执行的任意启动处理。对于上述与所述应用相关联的启动处理,由于其可以在应用启动之前被执行,故通常其可以与应用的源代码无关,这样,可以较好地保证应用的源代码的安全性。当然,本领域技术人员还可以通过约定、合作等方式获取应用的源代码,这样,上述与所述应用相关联的启动处理还可以与应用的源代码有关,可以理解,本申请实施例对于上述与所述应用相关联的启动处理不加以限制。
另外,需要说明的是,上述与所述应用相关联的启动处理可以与一个应用相关联,也可以与多个应用相关联。例如,微信APP、支付宝APP、QQ APP、浏览器APP等多个应用均需要具备联网功能和绘图功能,故联网功能和绘图功能等对应功能模块的启动处理可以与多个应用相关联。
本申请实施例可以提供通过父进程执行与所述应用相关联的启动处理的如下技术方案:
技术方案1
技术方案1中,所述通过父进程执行与所述应用相关联的启动处理的步骤,具体可以包括:
步骤A1、通过父进程执行与所述应用相关联的功能模块的启动处理。
在本申请的一种可选实施例中,功能模块可以为用于实现应用运行环境的模块。例如,应用运行环境具体可以包括网络环境、绘图环境等,则其对应的模块具体可以包括联网模块和绘图模块,其中,上述绘图模块可以进一步包括:GUI(图形用户界面,Graphical User Interface)模块、渲染模块等。
在本申请的其他实施例中,功能模块还可以为用于实现应用功能的模块。可以理解,本申请实施例对于具体的功能模块不加以限制。
在实际应用中,可以针对需要提高启动速度的应用,预先收集其相关联的功能模块,其中,对应的收集方式可以包括:对应用进行分析、或者与应用的开发者进行合作等方式,本申请实施例对于具体的收集方式不加以限制。
技术方案2
技术方案2中,所述通过父进程执行与所述应用相关联的启动处理的步骤,具体可以包括:
步骤B1、通过父进程执行与所述应用相关联的系统API和/或库。
本申请实施例中,系统API(应用程序编程接口,Application Program
Interface)是操作系统提供给用户方便设计应用程序的函数,其可用于实现一些特定的功能。由于系统API可以独立于应用,故可以通过父进程预先执行与所述应用相关联的系统API。
库是指将函数放到库中、供使用的一种方式。上述库具体可以包括:类库、标准库、动态链接库等;其中,类库(Class Library)是一个综合性的面向对象的可重用类型集合,这些类型包括:接口、抽象类和具体类。由于库通常与语言相关,而可以独立于应用,故可以通过父进程预先执行与所述应用相关联的库。
需要说明的是,上述执行具体可以包括:调用或者加载等,本申请实施例对于具体的执行方式不加以限制。
在实际应用中,可以针对需要提高启动速度的应用,预先收集其相关联的系统API和/或库,其中,对应的收集方式可以包括:对应用进行分析、或者与应用的开发者进行合作等方式,本申请实施例对于具体的收集方式不加以限制。
在本申请的一种应用示例2中,操作系统可以在智能终端中支付宝APP启动之前,通过父进程执行与所述支付宝APP相关联的系统API和/或库(如常用的类库、标准库等)的启动处理;则在接收到用户针对所述支付宝APP的启动指令后,可以通过所述父进程创建子进程,并通过所述子进程启动所述支付宝APP。由于在父进程中预先执行了所述支付宝APP相关联的系统API和/或库的启动处理,因此能够减少子进程启动应用所需的运算,从而能够提高应用的启动速度。
技术方案3
技术方案3中,所述通过父进程执行与所述应用相关联的启动处理的步骤,具体可以包括:
步骤C1、通过父进程建立所述应用相关联的JavaScript接口与Native功能模块之间的绑定关系。
技术方案3可以适用于使用Native语言编写部分功能模块的这一类目
标应用;现有方案通常在目标应用的启动过程中建立Javascript接口和Native功能模块之间的绑定关系。
而技术方案3可以在目标应用启动之前,预先通过父进程建立目标应用相关联的JavaScript接口与Native功能模块之间的绑定关系,因此,能够节省上述绑定关系的建立过程在应用启动过程中所占用的时间损耗,从而能够提高目标应用的启动速度。
在实际应用中,可以预先收集目标应用相关联的JavaScript接口与Native功能模块的相关信息,这样,步骤C1可以依据上述相关信息建立相应的绑定关系,可以理解,本申请实施例对于上述绑定关系的具体建立过程不加以限制。
在本申请的一种应用示例3中,假设某目标APP使用了Native语言编写部分功能模块,则操作系统可以在智能终端中该目标APP启动之前,通过父进程建立该目标APP相关联的JavaScript接口与Native功能模块之间的绑定关系;并且,在接收到用户针对该目标APP的启动指令后,可以通过所述父进程创建子进程,并通过所述子进程启动该目标APP。由于在父进程中预先建立所述应用相关联的JavaScript接口与Native功能模块之间的绑定关系,因此能够减少子进程启动应用所需的运算,从而能够提高应用的启动速度。
技术方案4
技术方案4中,所述通过父进程执行与所述应用相关联的启动处理的步骤,具体可以包括:
步骤D1、在所述父进程中启动虚拟机;
步骤D2、在所述虚拟机中对所述应用相关联的目标JavaScript代码进行编译,以得到对应的编译结果。
技术方案4可以适用于使用JavaScript语言编写的应用;由于可以在父进程的虚拟机中对所述应用相关联的目标JavaScript代码进行预先编译,以使子进程直接执行对应的编译结果;由于减少了子进程启动应用所需的
目标JavaScript代码的编译运算,因此能够提高应用的启动速度。
在实际应用中,上述目标JavaScript代码可以包括:启动应用所需的任意JavaScript代码。例如,上述目标JavaScript代码可以包括:上述技术方案1—技术方案3中启动处理所对应的JavaScript代码等;又如,上述目标JavaScript代码还可以包括:应用通过JavaScript语言编写的功能模块的代码等。
在本申请的一种可选实施例中,在对目标JavaScript代码进行编译的过程中,可以执行JavaScript代码函数、和/或、JavaScript代码对象中的函数,以得到本机机器码形式的编译结果,从而可以使子进程直接执行上述编译结果。这相对于现有方案逐行解释的方式,可以大大提高应用的执行速度。
在本申请的另一种可选实施例中,上述在所述虚拟机中对所述应用相关联的目标JavaScript代码进行编译的步骤D2,具体可以包括:首先在所述虚拟机中对所述应用相关联的目标JavaScript代码进行解析,以得到对应的语法树;然后对所述语法树进行编译,以得到智能终端能够识别的指令。其中,可以采用语法分析的方式进行上述解析以生成对应的语法树。另外,需要说明的是,上述语法树的编译过程可以为可选过程,父进程不对语法树进行编译而由子进程进行语法树的编译也是可行的。
在本申请的再一种可选实施例中,为了保证上述目标JavaScript代码被充分编译,从而提高应用的启动准确率,所述在所述虚拟机中对所述应用相关联的目标JavaScript代码进行编译的步骤D2,具体可以包括:
步骤D21、调用虚拟机相关函数对所述应用相关联的目标javascript代码进行解析;
步骤D22、执行能够调用关键javacript函数的预热代码,以得到智能终端能够识别的指令。
由于上述预热代码可用于利用javascript运行时执行的特性,调用关键javascript函数,因此能够保证关键javascript函数被充分编译,并且,上
述预热代码可以不对目标javascript代码的执行结果产生影响。可以理解,能够起关键性的javascript函数均在本申请的关键javascript函数的保护范围之内,本申请实施例对于具体的关键javascript函数和预热代码不加以限制。
以上通过技术方案—技术方案4对通过父进程执行与所述应用相关联的启动处理的技术方案进行了详细介绍,可以理解,本领域技术人员可以根据实际应用需求,采用技术方案—技术方案4中的任一或者组合,或者,可以采用通过父进程执行与所述应用相关联的启动处理的其他技术方案;本申请实施例的一个目的为:在应用启动之前通过父进程预先完成与应用相关联的启动处理,而不会对具体的启动处理加以限制。
步骤102、响应于所述应用的启动指令,通过所述父进程创建子进程;
步骤103、通过所述子进程启动所述应用。
本申请实施例中,子进程可以作为应用的进程,由于其是父进程的一个副本,创建子进程后,可以将父进程的数据段、代码段、堆栈等进程执行信息拷贝到子进程的空间中;而父进程的进程执行信息中可以包含有与上述应用相关联的启动处理结果,故子进程的空间中也可以包含有上述启动处理结果,因此能够减少子进程启动应用所需的运算,从而能够提高应用的启动速度。
在本申请的一种可选实施例中,针对于Linux内核的操作系统,所述通过所述父进程创建子进程的步骤102,具体可以包括:
步骤E1、响应于所述应用的启动指令,通过所述父进程运行分叉(fork)函数,以得到所述父进程对应的子进程。
在本申请的其他实施例中,针对于Windows操作系统,可以通过父进程运行CreateProcess()函数,以得到所述父进程对应的子进程,其中,可以通过CreateProcess()函数的BOOL bInheritHandles指定是否继承父进程的属性。可以理解,本申请实施例对于通过所述父进程创建子进程的具体过程不加以限制。
在本申请的另一种可选实施例中,所述父进程可以对应多个子进程,则所述与所述应用相关联的启动处理具体可以包括:所述多个子进程对应的多个应用共同关联的启动处理。例如,父进程可以对应微信APP、支付宝APP、浏览器APP等3个应用的3个子进程,则上述与所述应用相关联的启动处理具体可以包括:该3个应用共同关联的启动处理,具体地,上述启动处理具体可以包括:该3个应用共同关联的功能模块的启动处理、该3个应用共同关联的API和/或库的启动处理等。上述通过一个父进程对应多个应用的多个子进程的方式,可以节省系统资源。
综上,本申请实施例在应用启动之前通过父进程完成与上述应用相关联的启动处理,并且,响应于所述应用的启动指令,通过所述父进程创建子进程,并通过所述子进程启动所述应用;由于子进程是父进程的一个副本,创建子进程后,可以将父进程的数据段、代码段、堆栈等进程执行信息拷贝到子进程的空间中;而父进程的进程执行信息中可以包含有与上述应用相关联的启动处理结果;这样,相对于现有方案,由能够减少子进程启动应用所需的运算,从而能够提高应用的启动速度。
方法实施例二
参照图2,示出了本申请的一种应用启动方法实施例二的步骤流程图,具体可以包括如下步骤:
步骤201、启动父进程;
步骤202、在所述父进程中启动虚拟机;
其中,上述虚拟机可以作为JavaScript代码的执行环境。
步骤203、在应用启动之前,通过父进程执行与所述应用相关联的启动处理;
所述步骤203具体可以包括如下步骤中的至少一种:
步骤231、在所述虚拟机中对所述应用相关联的目标JavaScript代码进
行编译,以得到对应的编译结果;
步骤232、在所述虚拟机中执行与所述应用相关联的功能模块的启动处理;
步骤233、在所述虚拟机中建立所述应用相关联的JavaScript接口与Native功能模块之间的绑定关系;
步骤234、在所述虚拟机中执行与所述应用相关联的系统API和/或库;
步骤204、响应于所述应用的启动指令,通过所述父进程创建子进程,所述子进程作为所述应用的应用进程;
步骤205、通过所述应用进程启动所述应用。
其中,步骤204可以在接收到应用的启动指令后,可以创建当前应用的应用进程,其中,在应用的启动指令为多个时,可以创建对应的多个应用进程。上述通过一个父进程对应多个应用的多个子进程的方式,可以节省系统资源。
方法实施例三
参照图3,示出了本申请的一种应用启动方法实施例三的流程示意图,其具体可以包括如下步骤:
步骤301、启动父进程;
其中,通过父进程执行的步骤具体可以包括:
步骤302、在父进程中初始化JavaScript VM(虚拟机,Virtual Manufacturing);
步骤303、通过上述VM执行与应用相关联的启动处理;
可选地,上述通过上述VM执行与应用相关联的启动处理的步骤303,具体可以包括如下步骤中的至少一种:
步骤331、通过上述VM执行与所述应用相关联的功能模块的启动处理;
步骤332、通过上述VM执行与所述应用相关联的系统API和/或库;
步骤333、通过父进程建立所述应用相关联的JavaScript接口与Native功能模块之间的绑定关系;
步骤304、响应于应用的启动指令,通过所述父进程创建子进程,作为该应用对应的应用进程;
在实际应用中,在获取到启动指令后即可以创建该启动指令对应的应用进程,也即应用进程的数目可以为一个或者多个,本申请实施例对于通过父进程创建的应用进程的数目不加以限制。
进一步,通过应用进程执行的步骤具体可以包括:
步骤305、通过所述应用进程启动对应应用。
需要说明的是,对于方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请实施例并不受所描述的动作顺序的限制,因为依据本申请实施例,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作并不一定是本申请实施例所必须的。
装置实施例
参照图4,示出了本申请的一种应用启动装置实施例的结构框图,具体可以包括如下模块:
执行模块401,用于在应用启动之前,通过父进程执行与所述应用相关联的启动处理;
创建模块402,用于响应于所述应用的启动指令,通过所述父进程创
建子进程;以及
启动模块403,用于通过所述子进程启动所述应用。
在本申请的一种可选实施例中,所述执行模块401,具体可以包括:
第一执行子模块,用于通过父进程执行与所述应用相关联的功能模块的启动处理。
在本申请的另一种可选实施例中,所述执行模块401,具体可以包括:
第二执行子模块,用于通过父进程执行与所述应用相关联的系统API和/或库。
在本申请的再一种可选实施例中,所述执行模块401,具体可以包括:
第三执行子模块,用于通过父进程建立所述应用相关联的JavaScript接口与Native功能模块之间的绑定关系。
在本申请的又一种可选实施例中,所述执行模块401,具体可以包括:
启动子模块,用于在所述父进程中启动虚拟机;以及
编译子模块,用于在所述虚拟机中对所述应用相关联的目标JavaScript代码进行编译,以得到对应的编译结果。
在本申请的一种可选实施例中,所述编译子模块,具体可以包括:
语法树生成单元,用于在所述虚拟机中对所述应用相关联的目标JavaScript代码进行解析,以得到对应的语法树;以及
指令生成单元,用于对所述语法树进行编译,以得到智能终端能够识别的指令。
在本申请的另一种可选实施例中,所述创建模块402,具体可以包括:
创建子模块,用于响应于所述应用的启动指令,通过所述父进程运行分叉函数,以得到所述父进程对应的子进程。
在本申请的再一种可选实施例中,所述父进程可以对应多个子进程,
则所述与所述应用相关联的启动处理具体可以包括:所述多个子进程对应的多个应用共同关联的启动处理。
对于装置实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
智能终端实施例
参照图5,示出了本申请一种智能终端实施例的结构框图,具体可以包括:至少一个存储器501、显示器502、至少一个处理器503和至少一个输入单元504。
其中,该输入单元504可用于接收用户输入的数字或字符信息,以及控制信号。具体地,本申请实施例中,该输入单元504可以包括触摸屏541,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触摸屏541上的操作),并根据预先设定的程式驱动相应的连接装置。当然,除了触摸屏541,输入单元504还可以包括其他输入设备,如物理键盘、功能键(比如音量控制按键、开关按键等)、鼠标等。
显示器502具体可以包括显示面板,可选的,可以采用液晶显示器(Liquid Crystal Display,LCD)或有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板。其中,触摸屏541可以覆盖显示面板,形成触摸显示屏,当该触摸显示屏检测到在其上或附近的触摸操作后,传送给处理器503以执行相应的处理。
在本申请实施例中,通过调用存储该存储器501内的程序,和/或,模块,和/或,数据,处理器503在应用启动之前,通过父进程执行与所述应用相关联的启动处理;响应于所述应用的启动指令,通过所述父进程创建子进程;通过所述子进程启动所述应用。
本说明书中的各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似的部分互相
参见即可。
本领域内的技术人员应明白,本申请实施例的实施例可提供为方法、装置、或计算机程序产品。因此,本申请实施例可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请实施例可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
在一个典型的配置中,所述计算机设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括非持续性的电脑可读媒体(transitory media),如调制的数据信号和载波。
本申请实施例是参照根据本申请实施例的方法、终端设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理终端设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理终端设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方
框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理终端设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理终端设备上,使得在计算机或其他可编程终端设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程终端设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
尽管已描述了本申请实施例的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例做出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本申请实施例范围的所有变更和修改。
最后,还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者终端设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者终端设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者终端设备中还存在另外的相同要素。
以上对本申请所提供的一种应用启动方法、一种应用启动装置和一种智能终端,进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。
Claims (15)
- 一种应用启动方法,其特征在于,包括:在应用启动之前,通过父进程执行与所述应用相关联的启动处理;响应于所述应用的启动指令,通过所述父进程创建子进程;通过所述子进程启动所述应用。
- 根据权利要求1所述的方法,其特征在于,所述通过父进程执行与所述应用相关联的启动处理的步骤,包括:通过父进程执行与所述应用相关联的功能模块的启动处理。
- 根据权利要求1所述的方法,其特征在于,所述通过父进程执行与所述应用相关联的启动处理的步骤,包括:通过父进程执行与所述应用相关联的系统API和/或库。
- 根据权利要求1所述的方法,其特征在于,所述通过父进程执行与所述应用相关联的启动处理的步骤,包括:通过父进程建立所述应用相关联的JavaScript接口与Native功能模块之间的绑定关系。
- 根据权利要求1至4中任一所述的方法,其特征在于,所述通过父进程执行与所述应用相关联的启动处理的步骤,包括:在所述父进程中启动虚拟机;在所述虚拟机中对所述应用相关联的目标JavaScript代码进行编译,以得到对应的编译结果。
- 根据权利要求5所述的方法,其特征在于,所述在所述虚拟机中对所述应用相关联的目标JavaScript代码进行编译的步骤,包括:在所述虚拟机中对所述应用相关联的目标JavaScript代码进行解析, 以得到对应的语法树;对所述语法树进行编译,以得到智能终端能够识别的指令。
- 根据权利要求1或2或3或6所述的方法,其特征在于,所述通过所述父进程创建子进程的步骤,包括:响应于所述应用的启动指令,通过所述父进程运行分叉函数,以得到所述父进程对应的子进程。
- 根据权利要求1或2或3或6所述的方法,其特征在于,所述父进程对应多个子进程,则所述与所述应用相关联的启动处理包括:所述多个子进程对应的多个应用共同关联的启动处理。
- 一种应用启动装置,其特征在于,包括:执行模块,用于在应用启动之前,通过父进程执行与所述应用相关联的启动处理;创建模块,用于响应于所述应用的启动指令,通过所述父进程创建子进程;以及启动模块,用于通过所述子进程启动所述应用。
- 根据权利要求9所述的装置,其特征在于,所述执行模块,包括:第一执行子模块,用于通过父进程执行与所述应用相关联的功能模块的启动处理。
- 根据权利要求9所述的装置,其特征在于,所述执行模块,包括:第二执行子模块,用于通过父进程执行与所述应用相关联的系统API和/或库。
- 根据权利要求9所述的装置,其特征在于,所述执行模块,包括:第三执行子模块,用于通过父进程建立所述应用相关联的JavaScript 接口与Native功能模块之间的绑定关系。
- 根据权利要求9至12中任一所述的装置,其特征在于,所述执行模块,包括:启动子模块,用于在所述父进程中启动虚拟机;以及编译子模块,用于在所述虚拟机中对所述应用相关联的目标JavaScript代码进行编译,以得到对应的编译结果。
- 根据权利要求13所述的装置,其特征在于,所述编译子模块,包括:语法树生成单元,用于在所述虚拟机中对所述应用相关联的目标JavaScript代码进行解析,以得到对应的语法树;以及指令生成单元,用于对所述语法树进行编译,以得到智能终端能够识别的指令。
- 一种智能终端,其特征在于,包括有存储器,以及一个或者一个以上的程序,其中一个或者一个以上程序存储于存储器中,且经配置以由一个或者一个以上处理器执行所述一个或者一个以上程序包含用于进行以下操作的指令:在应用启动之前,通过父进程执行与所述应用相关联的启动处理;响应于所述应用的启动指令,通过所述父进程创建子进程;通过所述子进程启动所述应用。
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US16/130,501 US10846101B2 (en) | 2016-03-15 | 2018-09-13 | Method and system for starting up application |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610147440.9A CN107193577B (zh) | 2016-03-15 | 2016-03-15 | 一种应用启动方法、装置和智能终端 |
| CN201610147440.9 | 2016-03-15 |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| US16/130,501 Continuation-In-Part US10846101B2 (en) | 2016-03-15 | 2018-09-13 | Method and system for starting up application |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2017157175A1 true WO2017157175A1 (zh) | 2017-09-21 |
Family
ID=59850728
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2017/075449 Ceased WO2017157175A1 (zh) | 2016-03-15 | 2017-03-02 | 一种应用启动方法、装置和智能终端 |
Country Status (3)
| Country | Link |
|---|---|
| US (1) | US10846101B2 (zh) |
| CN (1) | CN107193577B (zh) |
| WO (1) | WO2017157175A1 (zh) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111475235A (zh) * | 2020-04-13 | 2020-07-31 | 北京字节跳动网络技术有限公司 | 函数计算冷启动的加速方法、装置、设备及存储介质 |
Families Citing this family (12)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US10922089B2 (en) * | 2016-09-22 | 2021-02-16 | Groupon, Inc. | Mobile service applications |
| CN107943576B (zh) * | 2017-12-14 | 2020-09-29 | 中国平安人寿保险股份有限公司 | 应用程序的启动优化方法、装置、设备、系统及介质 |
| CN109947576B (zh) * | 2017-12-21 | 2022-12-06 | 上海盛霄云计算技术有限公司 | 一种虚拟机内部代理程序管理的方法 |
| CN108681436B (zh) * | 2018-03-13 | 2020-09-22 | Oppo广东移动通信有限公司 | 画质参数调节方法、装置、终端及存储介质 |
| CN108595200B (zh) * | 2018-04-19 | 2020-05-15 | 北京微播视界科技有限公司 | 代码更新方法、图形更新方法、装置、存储介质和终端 |
| CN112102688A (zh) * | 2019-06-17 | 2020-12-18 | 北京张善风文化传播有限公司 | 0至12岁家庭心游会教育系统及其教育方法 |
| CN110659057B (zh) * | 2019-09-24 | 2021-10-22 | 腾讯科技(深圳)有限公司 | 应用程序热更新方法、装置、存储介质及计算机设备 |
| CN112650541B (zh) * | 2019-10-09 | 2023-02-17 | 深圳Tcl新技术有限公司 | 一种应用程序启动加速方法、系统、设备及存储介质 |
| CN110990075B (zh) * | 2019-11-18 | 2023-08-29 | 北京小米移动软件有限公司 | 快应用的启动方法、装置、设备及存储介质 |
| CN114489850B (zh) * | 2022-01-20 | 2023-08-22 | 中广核工程有限公司 | 一种设计软件的调用方法、装置、计算机设备及存储介质 |
| US20230393888A1 (en) * | 2022-06-05 | 2023-12-07 | Apple Inc. | Process Launch Constraints |
| CN115469943B (zh) * | 2022-09-22 | 2023-05-16 | 安芯网盾(北京)科技有限公司 | Java虚拟终端命令执行的检测方法及装置 |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101222709A (zh) * | 2008-01-22 | 2008-07-16 | 中兴通讯股份有限公司 | 一种手机应用程序快速启动的方法 |
| CN101610316A (zh) * | 2009-07-24 | 2009-12-23 | 中兴通讯股份有限公司 | 手机应用程序的启动方法、装置和系统 |
| CN101639787A (zh) * | 2009-09-07 | 2010-02-03 | 中兴通讯股份有限公司 | 应用程序启动方法及装置 |
| CN103631612A (zh) * | 2012-08-23 | 2014-03-12 | 腾讯科技(深圳)有限公司 | 启动操作系统的方法与装置 |
| US20140229951A1 (en) * | 2011-10-24 | 2014-08-14 | Huawei Technologies Co., Ltd. | Method and System for Starting Application Program in Linux Container |
Family Cites Families (15)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6405367B1 (en) * | 1998-06-05 | 2002-06-11 | Hewlett-Packard Company | Apparatus and method for increasing the performance of Java programs running on a server |
| US6785721B1 (en) | 2000-06-19 | 2004-08-31 | International Business Machines Corporation | System and method for providing a distributable runtime that deploys web applications and services from a workflow, enterprise, and mail-enabled web application server and platform |
| US7770158B2 (en) * | 2004-10-14 | 2010-08-03 | Bea Systems, Inc. | Source code translator |
| US7779034B2 (en) * | 2005-10-07 | 2010-08-17 | Citrix Systems, Inc. | Method and system for accessing a remote file in a directory structure associated with an application program executing locally |
| US8458612B2 (en) | 2007-07-29 | 2013-06-04 | Hewlett-Packard Development Company, L.P. | Application management framework for web applications |
| CN101645018B (zh) * | 2009-09-03 | 2012-12-26 | 深圳市茁壮网络股份有限公司 | 多版本的字节码处理方法、系统和装置 |
| US20120167122A1 (en) | 2010-12-27 | 2012-06-28 | Nokia Corporation | Method and apparatus for pre-initializing application rendering processes |
| US8880991B2 (en) * | 2011-04-21 | 2014-11-04 | Qualcomm Innovation Center, Inc. | Methods and apparatus for improved browsing performance by precompilation of high-priority JavaScripts in a webpage and delaying the removal of corresponding compiled code |
| US20120324481A1 (en) * | 2011-06-16 | 2012-12-20 | Samsung Electronics Co. Ltd. | Adaptive termination and pre-launching policy for improving application startup time |
| US9189252B2 (en) * | 2011-12-30 | 2015-11-17 | Microsoft Technology Licensing, Llc | Context-based device action prediction |
| CN103577212B (zh) * | 2012-08-08 | 2017-10-24 | 腾讯科技(深圳)有限公司 | 系统启动预加载方法及装置 |
| CN103677839B (zh) * | 2013-12-17 | 2017-02-15 | 深圳市蓝凌软件股份有限公司 | 一种跨移动终端的ui控件的生成方法及装置 |
| US9588796B2 (en) * | 2014-06-28 | 2017-03-07 | Vmware, Inc. | Live migration with pre-opened shared disks |
| US9578032B2 (en) * | 2014-08-23 | 2017-02-21 | Vmware, Inc. | Application publishing using memory state sharing |
| US20160321116A1 (en) * | 2015-04-29 | 2016-11-03 | Microsoft Technology Licensing, Llc | Translating operating system processes |
-
2016
- 2016-03-15 CN CN201610147440.9A patent/CN107193577B/zh active Active
-
2017
- 2017-03-02 WO PCT/CN2017/075449 patent/WO2017157175A1/zh not_active Ceased
-
2018
- 2018-09-13 US US16/130,501 patent/US10846101B2/en active Active
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101222709A (zh) * | 2008-01-22 | 2008-07-16 | 中兴通讯股份有限公司 | 一种手机应用程序快速启动的方法 |
| CN101610316A (zh) * | 2009-07-24 | 2009-12-23 | 中兴通讯股份有限公司 | 手机应用程序的启动方法、装置和系统 |
| CN101639787A (zh) * | 2009-09-07 | 2010-02-03 | 中兴通讯股份有限公司 | 应用程序启动方法及装置 |
| US20140229951A1 (en) * | 2011-10-24 | 2014-08-14 | Huawei Technologies Co., Ltd. | Method and System for Starting Application Program in Linux Container |
| CN103631612A (zh) * | 2012-08-23 | 2014-03-12 | 腾讯科技(深圳)有限公司 | 启动操作系统的方法与装置 |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111475235A (zh) * | 2020-04-13 | 2020-07-31 | 北京字节跳动网络技术有限公司 | 函数计算冷启动的加速方法、装置、设备及存储介质 |
| CN111475235B (zh) * | 2020-04-13 | 2023-09-12 | 北京字节跳动网络技术有限公司 | 函数计算冷启动的加速方法、装置、设备及存储介质 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN107193577B (zh) | 2021-08-03 |
| US20190108038A1 (en) | 2019-04-11 |
| CN107193577A (zh) | 2017-09-22 |
| US10846101B2 (en) | 2020-11-24 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2017157175A1 (zh) | 一种应用启动方法、装置和智能终端 | |
| EP3824391B1 (en) | Transparently remote execution of development tool extensions | |
| CN114600082B (zh) | 具有联合文件系统层装载的容器实例化 | |
| EP3543847B1 (en) | Service processing method and device | |
| US10296362B2 (en) | Execution of a script based on properties of a virtual device associated with a virtual machine | |
| US9747438B2 (en) | Enabling resource access for secure application containers | |
| WO2017124961A1 (zh) | 一种界面处理方法、装置和智能终端 | |
| TWI715762B (zh) | 虛擬機器創建方法和裝置 | |
| WO2016184320A1 (zh) | 在线升级机器虚拟器的方法与设备 | |
| US20230205561A1 (en) | Managing containers across multiple operating systems | |
| Whitechapel et al. | Windows phone 8 development internals | |
| CN103377079B (zh) | 终端及其应用运行装置和方法,运行应用程序的方法 | |
| WO2019238145A1 (zh) | 一种基于WebGL的图形绘制方法、装置及系统 | |
| US9990216B2 (en) | Providing hypercall interface for virtual machines | |
| CN110020370A (zh) | 在客户端应用中实现动画的方法、装置及动画脚本的框架 | |
| RU2616164C9 (ru) | Способы и устройство для работы браузерного движка | |
| WO2018001041A1 (zh) | 接口实现方法、装置、机顶盒及存储介质 | |
| CN107180168A (zh) | 文件加载、生成方法和装置,以及智能终端 | |
| US20140237469A1 (en) | Firmware metadata and migration in virtualized systems | |
| Cohen et al. | GUI design for Android apps | |
| US10579373B2 (en) | Seamless extension porting | |
| HK1244559A1 (zh) | 一种应用启动方法、装置和智能终端 | |
| US9229763B2 (en) | Virtual media shelf | |
| EP4237946B1 (en) | Computer system executing multiple operating systems | |
| WO2026056620A1 (zh) | 内核模块处理方法、设备、存储介质及程序产品 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 17765717 Country of ref document: EP Kind code of ref document: A1 |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 17765717 Country of ref document: EP Kind code of ref document: A1 |