[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

WO2021115177A1 - Application installation method and apparatus, terminal device, server and storage medium - Google Patents

Application installation method and apparatus, terminal device, server and storage medium Download PDF

Info

Publication number
WO2021115177A1
WO2021115177A1 PCT/CN2020/133391 CN2020133391W WO2021115177A1 WO 2021115177 A1 WO2021115177 A1 WO 2021115177A1 CN 2020133391 W CN2020133391 W CN 2020133391W WO 2021115177 A1 WO2021115177 A1 WO 2021115177A1
Authority
WO
WIPO (PCT)
Prior art keywords
application
file
terminal device
compiled
code
Prior art date
Application number
PCT/CN2020/133391
Other languages
French (fr)
Chinese (zh)
Inventor
帅朝春
Original Assignee
Oppo广东移动通信有限公司
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 Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2021115177A1 publication Critical patent/WO2021115177A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files

Definitions

  • This application relates to the field of computer technology, and more specifically, to an application installation method, device, terminal device, server, and storage medium.
  • Terminal devices such as tablet computers and mobile phones, have become one of the most commonly used consumer electronic products in people's daily lives. People usually install various applications in terminal devices to meet different needs. In the use of applications, the frequently used methods or codes of the application are usually used as hot codes, and the hot codes are compiled into binary machine code in advance. The compiled binary machine code can be used directly by the next time the application is run. The processor executes, thereby improving the running speed of the application program, but the running speed of the terminal device when it first runs is not optimized.
  • this application proposes an application installation method, device, terminal device, server, and storage medium.
  • an embodiment of the present application provides an application installation method applied to a terminal device.
  • the method includes: sending a download request for downloading an application to a server; receiving an installation package returned by the server according to the download request And a compiled file, the compiled file is a code file obtained after compiling the hot code of the application; the application is installed according to the installation package, and the compiled file is stored, and the compiled file is used When the terminal device runs the hotspot code, the compiled file is directly run.
  • an embodiment of the present application provides an application installation method applied to a server.
  • the method includes: receiving a download request for downloading an application sent by a terminal device; obtaining a compiled file corresponding to the download request, and
  • the compiled file is a code file obtained by compiling the hot code of the application; the installation package of the application and the compiled file are sent to the terminal device, and the installation package is used by the terminal device to communicate with each other.
  • the application is installed, and the compiled file is used to directly run the compiled file when the terminal device runs the hotspot code.
  • an embodiment of the present application provides an application installation device applied to a terminal device.
  • the device includes: a request sending module, a file receiving module, and an installation execution module, wherein the request sending module is used to send a download request To the server, the download request carries at least the device information of the terminal device and the application information of the application; the file receiving module is configured to receive the installation package and the compiled file returned by the server according to the download request, and the compilation
  • the file is a code file obtained by compiling the hot code of the application, and the compiled file corresponds to the device information and the application information; the installation execution module is used to perform the operation on the application according to the installation package Install and store the compiled file, which is used to directly run the compiled file when the terminal device runs the hotspot code.
  • an embodiment of the present application provides an application installation device applied to a server.
  • the device includes: a request receiving module, a file obtaining module, and a file sending module, wherein the request receiving module is used to receive a request from a terminal device.
  • the download request for downloading the application the file obtaining module is used to obtain a compiled file corresponding to the download request, and the compiled file is a code file obtained by compiling the hot code of the application; the file
  • the sending module is configured to send an installation package of the application and the compiled file to the terminal device, the installation package is used for the terminal device to install the application, and the compiled file is used for the terminal device When running the hotspot code, run the compiled file directly.
  • an embodiment of the present application provides an application installation system.
  • the application installation system includes a terminal device and a server, the terminal device is in communication connection with the server, and the terminal device is used to send data for downloading
  • the download request of the application is sent to the server;
  • the server is used to receive the download request, obtain the compiled file corresponding to the download request, and send the installation package of the application and the compiled file to the terminal device
  • the compiled file is a code file obtained by compiling the hot code of the application;
  • the terminal device is also used to receive the installation package and the compiled file returned by the server, and pair
  • the application is installed, and the compiled file is stored, and the compiled file is used to directly run the compiled file when the terminal device runs the hotspot code.
  • an embodiment of the present application provides a terminal device, including: one or more processors; a memory; one or more application programs, wherein the one or more application programs are stored in the memory and configured To be executed by the one or more processors, the one or more programs are configured to execute the application installation method provided in the above-mentioned first aspect.
  • an embodiment of the present application provides a server, including: one or more processors; a memory; one or more application programs, wherein the one or more application programs are stored in the memory and configured to Executed by the one or more processors, the one or more programs are configured to execute the application installation method provided in the second aspect described above.
  • an embodiment of the present application provides a computer-readable storage medium, the computer-readable storage medium stores program code, and the program code can be invoked by a processor to execute the application provided in the first aspect. installation method.
  • an embodiment of the present application provides a computer-readable storage medium.
  • the computer-readable storage medium stores program code, and the program code can be invoked by a processor to execute the application provided in the second aspect. installation method.
  • Fig. 1 shows a schematic diagram of an application scenario provided according to an embodiment of the present application.
  • Fig. 2 shows another schematic diagram of an application scenario provided according to an embodiment of the present application.
  • Fig. 3 shows a flowchart of an application installation method according to an embodiment of the present application.
  • Fig. 4 shows a flowchart of an application installation method according to another embodiment of the present application.
  • Fig. 5 shows a flowchart of an application installation method according to another embodiment of the present application.
  • Fig. 6 shows a flowchart of an application installation method according to still another embodiment of the present application.
  • Fig. 7 shows a flowchart of an application installation method according to yet another embodiment of the present application.
  • Fig. 8 shows a block diagram of an application installation device according to an embodiment of the present application.
  • Fig. 9 shows a block diagram of an application installation device according to another embodiment of the present application.
  • FIG. 10 is a block diagram of a terminal device for executing the application installation method according to the embodiment of the present application according to an embodiment of the present application.
  • Fig. 11 is a block diagram of a server for executing an application installation method according to an embodiment of the present application according to an embodiment of the present application.
  • FIG. 12 is a storage unit for storing or carrying program code for implementing the application installation method according to the embodiment of the present application according to an embodiment of the present application.
  • Android has two virtual machine execution environments: Dalvik virtual machine and Art virtual machine.
  • the execution environment of the Dalvik virtual machine every time the application runs, the bytecode needs to be converted into machine code by a just-in-time compiler (JIT compiler) before it can be run by the device, which will slow down the application.
  • JIT compiler just-in-time compiler
  • the Art virtual machine began to replace the Dalvik virtual machine.
  • the system will use a tool named dex2oat to compile the dex file in the APK into The oat file containing the local machine code is stored. After doing this, when the program is executed, you can directly use the compiled machine code to speed up efficiency.
  • AOT Ahead Of Time
  • the original AOT was changed to a hybrid compilation of interpreter (Interpreter) + JIT + AOT.
  • the JAVA program is initially only interpreted and executed by the JAVA interpreter (Interpreter), that is, the bytecode is interpreted and executed one by one.
  • the execution speed of this method is relatively slow, especially when a method or code block is run very frequently. The execution efficiency is very low. So later, the JIT compiler was introduced into the virtual machine.
  • the virtual machine When the virtual machine found that a certain method or code block was running very frequently, it would identify these codes as "hot spot code”, and record it and save it to profile file (configuration file), in order to improve the execution efficiency of the hot code, at runtime, the virtual machine will compile these codes into machine code related to the local platform, and it is the JIT compiler that is responsible for this task. To put it simply, the profile file records the frequently run methods or code blocks of the application. After JIT or AOT compilation, the .odex/.oat file is obtained. The file contains the binary machine code compiled by these hot codes, which can be directly handed over The central processing unit (Central Processing Unit, CPU) executes, thereby improving the running speed.
  • CPU Central Processing Unit
  • the oat file can be directly run by the Art virtual machine because it contains the machine code that the program runs.
  • the dex file if it is a cold code (non-hot code), it will be executed by the JAVA interpreter. If it is a hot code (hot code), it will be compiled by JIT in real time and stored in JIT CODE CACHE. You will visit it again next time. For hotspots, the corresponding machine code can be executed directly from the cache.
  • the inventor proposes the application installation method, device, terminal device, server, and storage medium provided by the embodiments of the application.
  • the server pushes the hot code of the application to the terminal at the same time to compile The code file obtained afterwards, so that the terminal device can use the compiled file when it is run for the first time, which improves the running speed of the first run.
  • it also avoids the terminal device from compiling the hot code when installing the application, resulting in a longer installation time. Long question.
  • the specific application installation method is described in detail in the subsequent embodiments.
  • FIG. 1 shows a schematic diagram of an application scenario provided by an embodiment of the present application.
  • the application scenario includes an application installation system 10, and the application installation system 10 includes: a terminal device 100 and a second One server 200.
  • the terminal device 100 communicates with the first server 200 through a network.
  • the terminal device 100 may perform data interaction with the first server 200 to obtain the installation package, compiled file, etc. of the application program from the first server 200.
  • FIG. 2 shows another schematic diagram of an application scenario provided by an embodiment of the present application.
  • the application installation system 10 may also include: a terminal device 100, a first server 200, and a second server. Server 300.
  • the terminal device 100 and the first server 200 exchange data
  • the first server 200 and the second server 300 may also exchange data.
  • the first server 200 can be used to process requests from the terminal device 100
  • the second server 300 can be used to store and manage files such as compiled files and installation packages of the application program.
  • the terminal device 100 obtains the application program files from the first server 200
  • the first server 200 may obtain the file of the application program from the second server 300, and send the file of the application program to the terminal device 100.
  • the application installation system 10 may also include other servers.
  • the application installation system 10 may also include a third server, which may be used to collect compiled files of the application from the user's terminal device, and transmit the collected compiled files to the second server 200 for sorting and storage; and
  • the application installation system may also include a fourth server.
  • the fourth server may be used to store and manage application installation packages.
  • the second server 200 may store and manage the compiled files of the application to implement the application. The installation package of the program and the compiled file are managed and stored separately.
  • the aforementioned terminal device 100 may be a smart phone, a tablet computer, an e-book, a smart watch, etc.; the first server 200, the second server 300 and other servers may be traditional servers or cloud servers. This is not limited.
  • FIG. 3 shows a schematic flowchart of an application installation method provided by an embodiment of the present application.
  • the application installation method can be applied to the terminal equipment in the above-mentioned application installation system.
  • the following will take a terminal device as an example to illustrate the specific process of this embodiment.
  • the following will elaborate on the process shown in FIG. 3, and the application installation method may specifically include the following steps:
  • Step S110 Send a download request for downloading the application to the server.
  • the download request may be generated by a terminal device, and the download request may be used to download an application, obtain an installation file of the application from a server, and so on.
  • the application may be an application that has not been installed on the terminal device, or an application that has been installed on the terminal device before and needs to be updated, which is not limited here.
  • the terminal device may generate a download request according to a user operation of the user. For example, the terminal device detects a download operation of an application in an interface of a software store, and then generates a download request for the application. As another implementation manner, when the function of automatically updating the application is enabled, the terminal device may also generate a download request according to the function of automatic updating to obtain the installation file of the application from the server and update the application.
  • the terminal device may send the download request to the server after generating the download request for downloading the application.
  • the server can at least respond to download requests, query requests, etc. sent by the terminal device, and interact with the terminal device, that is, the server can respond to the download request, obtain files related to the installation of the application, and send it to the terminal The device returns the file.
  • the server is a server of a software store
  • the terminal device runs an application of the software store and detects a user's operation in the software store, and sends a download request to the server of the software store.
  • the server may be the first server in the above-mentioned application installation system.
  • the specific server may not be a limitation, as long as the server meets the request of the terminal device.
  • Step S120 Receive the installation package and the compiled file returned by the server according to the download request, where the compiled file is a code file obtained by compiling the hot code of the application.
  • the server responds to the download request, and obtains the installation package and the compiled file of the application according to the download request.
  • the installation package refers to the software installation package of the application, which is a collection of files that can be decompressed by itself.
  • the installation package includes all files for software installation.
  • the installation package can be an Android installation package, and the Android installation package can be used in a terminal.
  • the Android system in the device can be executed to install.
  • the compiled file may be a binary machine code file obtained by compiling the hot code of the application, for example, it may be an oat file or an odex file, and the hot code may refer to a function or code block that is frequently run.
  • the specific way of compiling the hotspot code is not limited, for example, it may be a binary machine code file obtained after JIT or AOT compilation.
  • the compiled file may be stored in the above-mentioned server.
  • the compiled file may be a compiled file of the application collected by the server from other terminals, or it may be the server after collecting the hot code of the application from other terminals.
  • the hotspot code is obtained after compilation.
  • the server can read the compiled file of the application from the stored compiled file.
  • the compiled file may be stored in another server, such as a cloud for storing and managing the compiled file of the application.
  • the server that receives the download request can obtain the compiled file of the application corresponding to the download request from other servers.
  • the installation package of the application may be stored in the server that receives the download request, and the server may directly read the installation package of the application.
  • the installation package of the application may also be stored in another server (for example, a server for storing the installation package of the application), and the server that receives the download request may obtain the installation package of the application corresponding to the download request from the other server.
  • the server After the server obtains the installation package and the compiled file of the application corresponding to the download request, it may jointly deliver the installation package and the compiled file to the terminal device.
  • the terminal device can receive the installation package and the compiled file returned by the server.
  • Step S130 Install the application according to the installation package, and store the compiled file, where the compiled file is used to directly run the compiled file when the terminal device runs the hot code.
  • the terminal device may receive the installation package and compiled file of the application returned by the server.
  • the terminal device can run the installation package to install the application. Specifically, the terminal device decompresses the installation package, and then executes the decompressed file to install the application.
  • the terminal device can store the received compiled file. After the compiled file of the application is stored by the terminal device, when the terminal device runs the hot code, since the compiled file contains the compiled binary code corresponding to the hot code, Therefore, it can be directly executed by the processor, which can increase the running speed.
  • the application installation method provided by the embodiment of the application sends a download request for downloading the application to the server, and receives the installation package and the compiled file returned by the server according to the download request.
  • the compiled file is obtained by compiling the heat code of the application Code file, install the application according to the installation package, and store the compiled file.
  • the compiled file is used to run the compiled file directly when the terminal device runs the hot code, so that the terminal device can use the compiled file when it runs for the first time. Improved the running speed of the first run. In addition, it also avoids the problem that the terminal device compiles the hot code when installing the application, which causes a long installation time.
  • FIG. 4 shows a schematic flowchart of an application installation method provided by another embodiment of the present application.
  • the application installation method is applied to the above-mentioned terminal device.
  • the process shown in FIG. 4 will be described in detail below.
  • the application installation method may specifically include the following steps:
  • Step S210 According to the device information of the terminal device and the application information of the application, generate a download request and send the download request to the server, the download request carries the device information and the application information.
  • the compiled file obtained after the hotspot code is compiled is related to environmental factors such as specific equipment, software version, system version, etc. Therefore, different equipment, system versions, or software versions have different compiled files obtained by compilation. Therefore, the compiled files of each application are associated with device information and application information.
  • the device information can include the device manufacturer, device model, and system version of the terminal device
  • the application information can include: the version number of the application, the application The version name, package name and other information, specific device information and application information may not be limited.
  • the device information and application information may include more information, so that the compiled file obtained by the terminal device is more accurate.
  • the generated download request when a terminal device generates a download request for downloading an application, the generated download request carries the device information of the terminal device and the application information of the application, so as to obtain the compilation corresponding to the device information and the application information. File so that the obtained compiled file can be used.
  • Step S220 Receive the installation package and the compiled file returned by the server according to the download request, where the compiled file is a code file obtained by compiling the hot code of the application.
  • the server can obtain the compiled file corresponding to the device information and application information after receiving the download request.
  • each compiled file of the application is stored in the server in association with the device information and application information, or each compiled file of the application is stored in other servers in association with the device information and application information.
  • the server can directly read the compiled file corresponding to the device information and application information according to the device information and application information; when the compiled file is stored on other servers, it can be downloaded from Other servers obtain compiled files corresponding to device information and application information.
  • the server After the server obtains the compiled file corresponding to the device information and application information in the download request, and obtains the installation package of the application, it can return the compiled file and installation package to the terminal device at the same time.
  • the terminal device can receive The installation package of the application, the compiled file corresponding to the device information and the application information.
  • Step S230 Install the application according to the installation package.
  • step S230 can refer to the content of the foregoing embodiment, and will not be repeated here.
  • Step S240 verify the compiled file.
  • the terminal device when the terminal device installs the application according to the installation package, before storing the compiled file, it can also verify the received compiled file to determine the integrity and integrity of the received compiled file. Consistency, that is, to determine whether the compiled file has been damaged or tampered with.
  • the terminal device may use the hash value of the file for verification.
  • the terminal device can use the MD5 (Message Digest 5, message digest) value verification method to verify the compiled file.
  • the terminal device can obtain the MD5 value of the source file of the compiled file, calculate the MD5 value of the received compiled file, and compare the two. If the two are consistent, it means that the received compiled file is complete , Is consistent with the source file, that is, it has not been damaged or tampered with; if the two are inconsistent, it means that the compiled file obtained is incomplete and inconsistent with the source file.
  • MD5 Message Digest 5, message digest
  • Step S250 When the verification result indicates that the compiled file meets the storage condition, the compiled file is stored in a designated file directory, and the compiled file is used to run the compilation directly when the terminal device runs the hot code file.
  • the terminal device may determine whether the compiled file meets the storage condition according to the verification result.
  • the verification result when the verification result is that the obtained compiled file is complete and consistent with the source file, the verification result can indicate that the compiled file meets the storage conditions.
  • the terminal device can store the compiled file in the specified file directory ;
  • the verification result when the verification result is that the acquired compiled file is incomplete and inconsistent with the source file, the verification result can indicate that the compiled file does not meet the storage conditions.
  • the terminal device does not execute the storage of the acquired compiled file to the specified The directory to avoid the subsequent unavailability of the compiled file, which may cause runtime crashes.
  • the designated directory can be a directory for storing the compiled binary machine code such as oat files, dex files, etc., so that when the terminal device runs the hot code of the application, the compiled files can be read and executed from the designated directory.
  • the terminal device may also obtain the compiled file of the application from the server multiple times, until it obtains the compiled file that meets the storage condition after verification, and will satisfy the storage condition.
  • the compiled file of the storage condition is stored.
  • the terminal device may also obtain the configuration file from the server. It includes the hot code of the application. After obtaining the configuration file, the terminal device can compile the hot code in the configuration file according to the configuration file, and store the compiled file obtained after compilation. It is understandable that when the verification results of the compiled files obtained multiple times in a row do not meet the storage conditions, it may be because the transmission of the compiled files between the terminal device and the server is prone to errors. Therefore, you can try to obtain the configuration file, but the hot spot The code is compiled to obtain a compiled file to improve the running speed of the application when it is running.
  • the terminal device after the terminal device installs the application and stores the compiled file, when the terminal device runs the hot code of the application for the first time, it directly executes the compiled file and an error occurs, it can also obtain the configuration from the server. File, and compile the hot code to get the compiled file and store it. It is understandable that when the terminal device runs the application for the first time and directly executes the machine code in the compiled file and makes an error, it means that the compiled file that has been compiled before may not match the device information. Therefore, the terminal device can Hotspot code is compiled to obtain available compiled files.
  • the application installation method provided in the embodiments of the present application sends a download request carrying device information and application information to the server, so that the installation package and compiled file returned by the server can be received, and the compiled file corresponds to the device information and application information , And then install the application according to the installation package, and verify the compiled file.
  • the verification result indicates that the compiled file meets the storage conditions
  • the compiled file is stored.
  • the stored compiled file corresponds to the device information and application information, so
  • the terminal device can directly run the machine code in the compiled file when running the hot code, which improves the running efficiency of the application. Since the compiled file is stored during installation, the terminal device can use the compiled file when it is run for the first time, which improves the running speed of the first run. In addition, it also avoids the problem that the terminal device compiles the hot code when installing the application, which causes a long installation time.
  • FIG. 5 shows a schematic flowchart of an application installation method provided by another embodiment of the present application.
  • the application installation method is applied to the terminal device in the above-mentioned application installation system.
  • the process shown in FIG. 5 will be described in detail below.
  • the application installation method may specifically include the following steps:
  • Step S310 When the state of the terminal device satisfies a preset condition, send a first download request to the server, where the first download request is used to obtain at least the installation package and the compiled file of the application.
  • the terminal device Before sending the download request to the server, the terminal device can also determine whether the state of the terminal device meets the preset condition, and only when the preset condition is satisfied, the installation package and the compiled file are obtained from the server at the same time.
  • the preset condition may be a condition that characterizes that the download speed and download time are normal when the terminal device downloads the installation package and the compiled file at the same time.
  • the preset condition includes at least one of the following conditions: the network speed of the network to which the terminal device is connected is greater than the first speed; the network type of the network to which the terminal device is connected is a specified type; the current time is within a preset time period . That is to say, the preset condition can be any one of the above conditions, or a combination of multiple conditions in the above conditions, which is not limited here.
  • the network speed can be the maximum or average speed when the terminal device uses the currently connected network to download;
  • the network type refers to the type of the network, such as data network, wireless network, etc., data network can also be divided into 3G Network, 4G network, 5G network, etc.
  • the first speed can be the speed at which the installation package and compiled files can be downloaded within the normal download time.
  • the first speed can be 1Mb (mega) per second, 5Mb (mega) per second, etc.
  • the specific value can be omitted Limited;
  • the designated type can be the type of the network with usually higher network speed, for example, the network type with the network speed greater than the second speed, for example, the designated network can be a WIFI network, a 5G network, etc.
  • the specific network type may not be a limitation;
  • the time period can be the time period when the network is idle or the time period when the network speed is higher (for example, greater than the third speed).
  • the terminal device downloads the installation package and the compiled file at the same time.
  • the download speed and download time are usually Will not be abnormal.
  • the specific preset condition may not be a limitation.
  • the preset condition may also be that the bandwidth of the download task that can be allocated to the installation package and the compiled file is greater than the specified bandwidth.
  • the terminal device can send at least the installation package used to obtain the application And the first download request of the compiled file is sent to the server to obtain the installation package and the compiled file from the server. Conversely, when the state of the terminal device meets the preset condition, the terminal device cannot simultaneously obtain the installation package and the compiled file from the server.
  • Step S320 Receive the installation package and the compiled file returned by the server according to the download request, where the compiled file is a code file obtained by compiling the hot code of the application.
  • step S320 can refer to the content of the foregoing embodiment, which will not be repeated here.
  • the download request may also carry the network speed.
  • the server returns the installation package and compiled file to the terminal device, it can also be based on the network speed.
  • Speed determines the number of code files in the compiled files returned, so that the number of code files can correspond to the network speed, where the number of code files can be positively correlated with the network speed to avoid downloading time when there are too many codes in the compiled files Too long.
  • Step S330 Install the application according to the installation package, and store the compiled file, where the compiled file is used to directly run the compiled file when the terminal device runs the hotspot code.
  • step S330 can refer to the content of the foregoing embodiment, and will not be repeated here.
  • the preset condition is when the network speed of the network to which the terminal device is connected is greater than the first speed. Since the number of code files in the compiled file corresponds to the network speed, the server may not transmit all the compiled files corresponding to the hotspot code. Therefore, the application installation method may also include: determining the number of all hotspot codes of the application, where the terminal The device can obtain the configuration file of the application and determine the number of all hot codes from the configuration file; if the number of code files in the compiled file is less than the number corresponding to all the hot codes, it will be based on the hotspot corresponding to the code file in the compiled file.
  • the terminal device can determine the number of all hot codes of the application from the server, and determine whether the number of code files in the compiled file is less than the number of all hot codes, so as to confirm whether the server has transmitted all the compiled files corresponding to all the hot codes . If it is determined that the number of code files in the compiled file is less than the number of all hot codes, it means that the server has not transmitted all the compiled files corresponding to the hot codes.
  • the specified state may be a state where the network speed is greater than the specified speed, and the specified speed may be a network speed greater than the above-mentioned first speed; the specified state may also be a state where the terminal device is in a dormant or low power consumption state, and the specific specified state may not be a limitation .
  • obtaining the compiled file corresponding to the first hotspot code may include: obtaining the compiled file corresponding to the first hotspot code from a server.
  • the terminal device may obtain the compiled file corresponding to the first hotspot code from the server when the device state meets the specified state during the installation of the application or during the installation process, and store the compiled file.
  • obtaining the compiled file corresponding to the first hotspot code may include: compiling the first hotspot code to obtain the compiled file corresponding to the first hotspot code.
  • the terminal device can directly obtain the configuration file corresponding to the first hotspot code from the server, and then compile the first hotspot code in the configuration file according to the configuration file, thereby obtaining the compiled file corresponding to the first hotspot code, and compile it Files are stored.
  • the application installation method may further include: if the network speed is less than or equal to the first speed, sending a second download request to the server, where the second download request is used to obtain at least the installation package and configuration file of the application; and receiving; The installation package and configuration file returned by the server; determine all the hot codes of the application according to the configuration file; install the application according to the installed package; compile all the hot codes and store the compiled files obtained after compilation. It is understandable that when the network speed is less than or equal to the first speed, it means that the terminal device downloads the installation package and the compiled file at the same time, and an abnormal situation will occur. Therefore, the terminal device can send the second data used to obtain the installation package and the configuration file.
  • the size of the configuration file is usually smaller than the size of the compiled file, exceptions can be avoided.
  • all hot code lines are compiled, and the compiled files obtained after compilation are stored, so as to facilitate the subsequent operation of the application and effectively improve the running speed.
  • Step S340 Obtain the code whose running times meets the set times condition during the running process of the application as a new hot code.
  • the terminal device can also determine the new hotspot code after the application is installed, according to the running process of the application, that is, the hotspot code that does not exist in the corresponding hotspot code in the currently stored compiled file .
  • the new hot code satisfies: the code whose running times meets the set times condition, that is, the code whose running times meets the set times condition, and the hot code that does not exist before can be used as the hot code.
  • Step S350 Compile the new hot code, and store the compiled compiled file.
  • the terminal device after the terminal device collects the new hot code, it can compile the new hot code.
  • the terminal device can compile the new hotspot code when it is in a sleep mode or a low power consumption mode.
  • the terminal device can compile the new hotspot code when it is in an idle state and in a charging state.
  • Step S360 Send the compiled file corresponding to the new hotspot code to the server, where the server is used to update the hotspot code of the application and the compiled file corresponding to the hotspot code.
  • the terminal device may also send the compiled file corresponding to the new hot code to the server, so that the server can collect the compiled file of the new hot code.
  • the server can be a server for terminal devices to download the installation package, such as a server corresponding to a software mall, or a server specifically used to collect compiled files of hotspot codes, which is not limited here.
  • the application installation method provided by the embodiments of the present application sends a first download request carrying device information and application information of the application to the server when the state of the terminal device meets a preset condition, so that the installation package and the application information returned by the server can be received.
  • Compile files and can ensure download efficiency.
  • the application is installed according to the installation package, and the compiled file is stored, so the terminal device can directly run the machine code in the compiled file when running the hot code, which improves the running efficiency of the application. Since the compiled files are stored during installation, the compiled files can be used by the terminal device when it is first run, which improves the running speed of the first run and avoids the terminal device from compiling hot codes when installing applications, causing installation Longer issues.
  • the compiled files of the new hot code can be collected to further improve the operating efficiency of the application.
  • FIG. 6 shows a schematic flowchart of an application installation method provided by still another embodiment of the present application.
  • the application installation method can be applied to the server in the above-mentioned application installation system. The process shown in FIG. 6 will be described in detail below.
  • the application installation method may specifically include the following steps:
  • Step S410 Receive a download request for downloading an application sent by a terminal device.
  • Step S420 Obtain a compiled file corresponding to the download request, where the compiled file is a code file obtained after compiling the hot code of the application.
  • Step S430 Send the installation package of the application and the compiled file to the terminal device, the installation package is used for the terminal device to install the application, and the compiled file is used for the terminal device to run When the hotspot code is used, the compiled file is directly run.
  • the server can return the application installation package to the terminal device according to the received download request, and at the same time return the code file obtained by compiling the hot code of the application, and the installation package is used for the terminal device
  • Install the application and the compiled file can be used to run directly when the terminal device runs the hot code, so that the terminal device can use the compiled file when it runs for the first time, which improves the running speed of the first run and avoids the terminal device.
  • the hot code is compiled when the application is installed, which causes the problem of a long installation time.
  • FIG. 7 shows a schematic flowchart of an application installation method according to yet another embodiment of the present application.
  • the application installation method can be applied to the server in the above-mentioned application installation system. The process shown in FIG. 7 will be described in detail below.
  • the application installation method may specifically include the following steps:
  • Step S510 Receive a download request for downloading an application sent by a terminal device, where the download request carries the device information of the terminal device and the application information of the application.
  • the server may collect and integrate the compiled file of the application in advance, and store the compiled file of the application in association with the device information of the terminal device and the application information of the application. Therefore, the server can obtain compiled files of applications sent by multiple terminals, device information and application information corresponding to the compiled files; associate the compiled files, device information and application information corresponding to the compiled files, and store them.
  • the server may also process the compiled files collected.
  • the compiled files stored in the server are compiled files corresponding to applications with outdated versions, they may be deleted to save storage space.
  • Step S520 Obtain a compiled file corresponding to the device information and the application information, where the compiled file is a code file obtained by compiling the hot code of the application.
  • the server when the compiled file of the application is stored locally on the server, the compiled file corresponding to the device information and the application information can be directly read locally.
  • the server can send a file acquisition request to the cloud server according to the download request.
  • the file acquisition request is used to acquire the compiled file, and then receives the compiled file returned by the cloud server, so as to obtain information about the device and the application.
  • the compiled file corresponding to the information when the compiled file of the application is stored locally on the server, the compiled file corresponding to the device information and the application information can be directly read locally.
  • the server can send a file acquisition request to the cloud server according to the download request.
  • the file acquisition request is used to acquire the compiled file, and then receives the compiled file returned by the cloud server, so as to obtain information about the device and the application.
  • the compiled file corresponding to the information when the compiled file of the application is stored locally on the server, the compiled file corresponding to the device information and the application information can be directly read locally.
  • Step S530 Determine the number of code files corresponding to the network speed according to the network speed.
  • Step S540 Obtain the compiled files of the number of code files from the compiled files.
  • Step S550 Send the installation package of the application and the compiled files of the number of code files to the terminal device, where the installation package is used by the terminal device to install the application, and the compiled file is used for all When the terminal device runs the hotspot code, the compiled file is directly run.
  • the above download request may also carry the network speed.
  • the server can determine the number of code files in the returned compiled file according to the network speed, so that the number of code files can correspond to the network speed, where the number of code files can be positive with the network speed Relevant to avoid excessive download time when the amount of code in the compiled file is too large.
  • the application installation method provided by the embodiment of the application receives a download request carrying device information and application information of the application, and then obtains a compiled file corresponding to the device information and application information, and then obtains a code file from the compiled file according to the network speed
  • the number of compiled files, and then the application installation package and the number of compiled files of the code file are sent to the terminal device, so that the terminal device can use the compiled file when it runs for the first time, which improves the running speed of the first run and avoids Therefore, the terminal device compiles the hot code when installing the application, which causes the problem of a long installation time.
  • FIG. 8 shows a structural block diagram of an application installation apparatus 400 provided by an embodiment of the present application.
  • the application installation apparatus 400 can be applied to the terminal equipment in the above-mentioned application installation system.
  • the application installation apparatus 400 includes a request sending module 410, a file receiving module 420, and an installation execution module 430.
  • the request sending module 410 is used to send a download request to the server, and the download request carries at least the device information of the terminal device and the application information of the application;
  • the file receiving module 420 is used to receive The installation package and the compiled file returned by the download request, the compiled file is a code file obtained after the hot code of the application is compiled, and the compiled file corresponds to the device information and the application information;
  • the installation The execution module 430 is configured to install the application according to the installation package and store the compiled file.
  • the compiled file is used to directly run the compiled file when the terminal device runs the hotspot code.
  • the application installation device 400 may further include: a file verification module.
  • the file verification module is used for verifying the compiled file before storing the compiled file.
  • the installation execution module 430 may be specifically configured to store the compiled file in a designated file directory when the verification result indicates that the compiled file meets the storage condition.
  • the compiled file corresponds to the device information of the terminal device and the application information of the application.
  • the request sending module 410 may be specifically configured to generate a download request according to the device information and application information and send the download request to the server, the download request carrying the device information and the application information.
  • the request sending module 410 may be specifically configured to send a first download request to the server when the state of the terminal device satisfies a preset condition, and the first download request is used to obtain at least the information of the application. Installation package and compiled files.
  • the preset condition includes at least one of the following conditions: the network speed of the network to which the terminal device is connected is greater than the first speed; the network type of the network to which the terminal device is connected is a specified type; currently The time is in the preset time period.
  • the application installation device 400 further includes: a code acquisition module and a code compilation module.
  • the code acquisition module is used to acquire the code whose running times meet the set times condition during the running process of the application as the new hot code;
  • the code compilation module is used to compile the new hot code and compile the compiled code. Compile the file for storage.
  • the application installation device 400 may further include: a file sending module.
  • the file sending module is used for sending the compiled file corresponding to the new hotspot code to the server, and the server is used for updating the hotspot code of the application and the compiled file corresponding to the hotspot code.
  • FIG. 9 shows a structural block diagram of an application installation apparatus 500 provided by another embodiment of the present application.
  • the application installation apparatus 500 may be applied to the terminal equipment in the above-mentioned application installation system.
  • the application installation apparatus 500 includes a request receiving module 510, a file obtaining module 520, and a file sending module 530.
  • the request receiving module 510 is configured to receive a download request for downloading an application sent by a terminal device;
  • the file obtaining module 520 is configured to obtain a compiled file corresponding to the download request, and the compiled file is a response to the The code file obtained by compiling the hot code of the application;
  • the file sending module 530 is configured to send the installation package of the application and the compiled file to the terminal device, and the installation package is used by the terminal device to pair The application is installed, and the compiled file is used to directly run the compiled file when the terminal device runs the hotspot code.
  • the download request carries device information of the terminal device and application information of the application.
  • the file obtaining module 520 may be specifically configured to obtain a compiled file corresponding to the device information and the application information.
  • the file acquisition module 520 may also be specifically configured to: send a file acquisition request to a cloud server according to the download request, the file acquisition request is used to acquire the compiled file; The compiled file.
  • the download request also carries network speed.
  • the file sending module 530 may include: a quantity determining unit, a file screening unit, and a sending execution unit.
  • the number determining unit is used to determine the number of code files corresponding to the network speed according to the network speed; the file screening unit is used to obtain the compiled files of the number of code files from the compiled files; the sending execution unit is used to transfer The installation package of the application and the compiled files of the number of code files are sent to the terminal device.
  • the application installation device 500 may further include an information acquisition module and an information storage module.
  • the information obtaining module is used to obtain compiled files of the application sent by multiple terminals, device information corresponding to the compiled files, and application information; the information storage module is used to convert the compiled files to the devices corresponding to the compiled files Information and application information are stored.
  • the coupling between the modules may be electrical, mechanical or other forms of coupling.
  • the functional modules in the various embodiments of the present application may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module.
  • the above-mentioned integrated modules can be implemented in the form of hardware or software functional modules.
  • the embodiment of the present application also provides an application installation system.
  • the application installation system includes a terminal device and a server.
  • the terminal device communicates with the server.
  • the server may be the first server 200.
  • the terminal device is used to send a download request for downloading an application to the server;
  • the server is used to receive the download request, obtain a compiled file corresponding to the download request, and install the application
  • the package and the compiled file are sent to the terminal device, the compiled file is a code file obtained by compiling the hot code of the application;
  • the terminal device is also used to receive the installation package returned by the server And the compiled file, install the application according to the installation package, and store the compiled file, and the compiled file is used to directly run the compiled file when the terminal device runs the hotspot code.
  • the solution provided by this application sends a download request for downloading an application to the server, and receives the installation package and compiled file returned by the server according to the download request.
  • the compiled file is obtained after compiling the application’s heat code Install the application according to the installation package, and store the compiled file.
  • the compiled file is used to run the compiled file directly when the terminal device runs the hot code, so that the terminal device can use the compiled file when it runs for the first time. And improve the running speed of the first run.
  • FIG. 10 shows a structural block diagram of a terminal device provided by an embodiment of the present application.
  • the terminal device 100 may be an electronic device capable of running application programs, such as a smart phone, a tablet computer, or a smart watch.
  • the terminal device 100 in this application may include one or more of the following components: a processor 110, a memory 120, and one or more application programs, where one or more application programs may be stored in the memory 120 and configured to be configured by One or more processors 110 execute, and one or more programs are configured to execute the methods described in the foregoing method embodiments.
  • the processor 110 may include one or more processing cores.
  • the processor 110 uses various interfaces and lines to connect various parts of the entire terminal device 100, and executes by running or executing instructions, programs, code sets, or instruction sets stored in the memory 120, and calling data stored in the memory 120.
  • Various functions and processing data of the terminal device 100 may use at least one of digital signal processing (Digital Signal Processing, DSP), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), and Programmable Logic Array (Programmable Logic Array, PLA).
  • DSP Digital Signal Processing
  • FPGA Field-Programmable Gate Array
  • PLA Programmable Logic Array
  • the processor 110 may be integrated with one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), a modem, and the like.
  • the CPU mainly processes the operating system, user interface, and application programs; the GPU is used for rendering and drawing of display content; the modem is used for processing wireless communication. It can be understood that the above-mentioned modem may not be integrated into the processor 110, but may be implemented by a communication chip alone.
  • the memory 120 may include random access memory (RAM) or read-only memory (Read-Only Memory).
  • the memory 120 may be used to store instructions, programs, codes, code sets or instruction sets.
  • the memory 120 may include a program storage area and a data storage area, where the program storage area may store instructions for implementing the operating system and instructions for implementing at least one function (such as touch function, sound playback function, image playback function, etc.) , Instructions used to implement the following various method embodiments, etc.
  • the data storage area can also store data (such as phone book, audio and video data, chat record data) created by the terminal 100 during use.
  • FIG. 11 shows a structural block diagram of a server provided by an embodiment of the present application.
  • the server 600 may be a traditional server, a cloud server, or the like.
  • the server 600 in this application may include one or more of the following components: a processor 610, a memory 620, and one or more application programs, where one or more application programs may be stored in the memory 620 and configured to be operated by one Or multiple processors 610 execute, and one or more programs are configured to execute the method described in the foregoing method embodiment.
  • the processor 610 may include one or more processing cores.
  • the processor 610 uses various interfaces and lines to connect various parts of the entire server 600, and executes the server by running or executing instructions, programs, code sets, or instruction sets stored in the memory 620, and calling data stored in the memory 620. 600's various functions and processing data.
  • the processor 610 may adopt at least one of digital signal processing (Digital Signal Processing, DSP), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), and Programmable Logic Array (Programmable Logic Array, PLA).
  • DSP Digital Signal Processing
  • FPGA Field-Programmable Gate Array
  • PLA Programmable Logic Array
  • the processor 610 may integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), a modem, and the like.
  • the CPU mainly processes the operating system, user interface, and application programs; the GPU is used for rendering and drawing of display content; the modem is used for processing wireless communication. It can be understood that the above-mentioned modem may not be integrated into the processor 610, but may be implemented by a communication chip alone.
  • the memory 620 may include random access memory (RAM) or read-only memory (Read-Only Memory).
  • the memory 620 may be used to store instructions, programs, codes, code sets, or instruction sets.
  • the memory 620 may include a storage program area and a storage data area, where the storage program area may store instructions for implementing the operating system and instructions for implementing at least one function (such as touch function, sound playback function, image playback function, etc.) , Instructions used to implement the following various method embodiments, etc.
  • the data storage area can also store data created by the server 600 in use, and the like.
  • FIG. 12 shows a structural block diagram of a computer-readable storage medium provided by an embodiment of the present application.
  • the computer-readable medium 800 stores program code, and the program code can be invoked by a processor to execute the method described in the foregoing method embodiment.
  • the computer-readable storage medium 800 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk, or ROM.
  • the computer-readable storage medium 800 includes a non-transitory computer-readable storage medium.
  • the computer-readable storage medium 800 has storage space for the program code 810 for executing any method steps in the above-mentioned methods. These program codes can be read from or written into one or more computer program products.
  • the program code 810 may be compressed in a suitable form, for example.

Landscapes

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

Abstract

An application installation method and apparatus, a terminal device, a server and a storage medium. The application installation method is applied to a terminal device. The application installation method comprises: sending to a server a download request for downloading an application; receiving an installation package and a compilation file returned by the server according to the download request, the compilation file being a code file obtained by compiling hot spot code of the application; and installing the application according to the installation package, and storing the compilation file, the compilation file being directly run when the terminal device runs the hot point code. The method can effectively increase the running speed of an application.

Description

应用安装方法、装置、终端设备、服务器及存储介质Application installation method, device, terminal equipment, server and storage medium
相关申请的交叉引用Cross-references to related applications
本申请要求于2019年12月13日提交的申请号为201911285858.6的中国申请的优先权,其在此出于所有目的通过引用将其全部内容并入本文。This application claims the priority of the Chinese application with the application number 201911285858.6 filed on December 13, 2019, which is hereby incorporated in its entirety by reference for all purposes.
技术领域Technical field
本申请涉及计算机技术领域,更具体地,涉及一种应用安装方法、装置、终端设备、服务器及存储介质。This application relates to the field of computer technology, and more specifically, to an application installation method, device, terminal device, server, and storage medium.
背景技术Background technique
终端设备,例如平板电脑、手机等,已经成为人们日常生活中最常用的消费型电子产品之一。人们通常于终端设备中安装各种应用程序,以满足不同的需求。在应用程序的使用中,通常将应用程序的使用频繁的方法或代码作为热点代码,并预先对热点代码编译为二进制机器码,编译得到的二进制机器码可以用于在下次运行应用程序时直接由处理器执行,从而提升应用程序的运行速度,但终端设备首次运行时的运行速度并未得到优化。Terminal devices, such as tablet computers and mobile phones, have become one of the most commonly used consumer electronic products in people's daily lives. People usually install various applications in terminal devices to meet different needs. In the use of applications, the frequently used methods or codes of the application are usually used as hot codes, and the hot codes are compiled into binary machine code in advance. The compiled binary machine code can be used directly by the next time the application is run. The processor executes, thereby improving the running speed of the application program, but the running speed of the terminal device when it first runs is not optimized.
发明内容Summary of the invention
鉴于上述问题,本申请提出了一种应用安装方法、装置、终端设备、服务器及存储介质。In view of the foregoing problems, this application proposes an application installation method, device, terminal device, server, and storage medium.
第一方面,本申请实施例提供了一种应用安装方法,应用于终端设备,所述方法包括:发送用于下载应用的下载请求至服务器;接收所述服务器根据所述下载请求返回的安装包以及编译文件,所述编译文件为对所述应用的热点代码进行编译后得到的代码文件;根据所述安装包对所述应用进行安装,并将所述编译文件进行存储,所述编译文件用于所述终端设备运行所述热点代码时直接运行所述编译文件。In the first aspect, an embodiment of the present application provides an application installation method applied to a terminal device. The method includes: sending a download request for downloading an application to a server; receiving an installation package returned by the server according to the download request And a compiled file, the compiled file is a code file obtained after compiling the hot code of the application; the application is installed according to the installation package, and the compiled file is stored, and the compiled file is used When the terminal device runs the hotspot code, the compiled file is directly run.
第二方面,本申请实施例提供了一种应用安装方法,应用于服务器,所述方法包括:接收终端设备发送的用于下载应用的下载请求;获取与所述下载请求对应的编译文件,所述编译文件为对所述应用的热点代码进行编译后得到的代码文件;将所述应用的安装包以及所述编译文件发送至所述终端设备,所述安装包用于所述终端设备对所述应用进行安装,所述编译文件用于所述终端设备运行所述热点代码时直接运行所述编译文件。In the second aspect, an embodiment of the present application provides an application installation method applied to a server. The method includes: receiving a download request for downloading an application sent by a terminal device; obtaining a compiled file corresponding to the download request, and The compiled file is a code file obtained by compiling the hot code of the application; the installation package of the application and the compiled file are sent to the terminal device, and the installation package is used by the terminal device to communicate with each other. The application is installed, and the compiled file is used to directly run the compiled file when the terminal device runs the hotspot code.
第三方面,本申请实施例提供了一种应用安装装置,应用于终端设备,所述装置包括:请求发送模块、文件接收模块以及安装执行模块,其中,所述请求发送模块用于发送下载请求至服务器,所述下载请求至少携带有所述终端设备的设备信息以及应用的应用信息;所述文件接收模块用于接收所述服务器根据所述下载请求返回的安装包以及编译文件,所述编译文件为对所述应用的热点代码进行编译后得到的代码文件,所述编译文件与所述设备信息以及所述应用信息对应;所述安装执行模块用于根据所述安装包对所述应用进行安装,并将所述编译文件进行存储,所述编译文件用于所述终端设备运行所述热点代码时直接运行所述编译文件。In a third aspect, an embodiment of the present application provides an application installation device applied to a terminal device. The device includes: a request sending module, a file receiving module, and an installation execution module, wherein the request sending module is used to send a download request To the server, the download request carries at least the device information of the terminal device and the application information of the application; the file receiving module is configured to receive the installation package and the compiled file returned by the server according to the download request, and the compilation The file is a code file obtained by compiling the hot code of the application, and the compiled file corresponds to the device information and the application information; the installation execution module is used to perform the operation on the application according to the installation package Install and store the compiled file, which is used to directly run the compiled file when the terminal device runs the hotspot code.
第四方面,本申请实施例提供了一种应用安装装置,应用于服务器,所述装置包括:请求接收模块、文件获取模块以及文件发送模块,其中,所述请求接收模块用于 接收终端设备发送的用于下载应用的下载请求;所述文件获取模块用于获取与所述下载请求对应的编译文件,所述编译文件为对所述应用的热点代码进行编译后得到的代码文件;所述文件发送模块用于将所述应用的安装包以及所述编译文件发送至所述终端设备,所述安装包用于所述终端设备对所述应用进行安装,所述编译文件用于所述终端设备运行所述热点代码时直接运行所述编译文件。In a fourth aspect, an embodiment of the present application provides an application installation device applied to a server. The device includes: a request receiving module, a file obtaining module, and a file sending module, wherein the request receiving module is used to receive a request from a terminal device. The download request for downloading the application; the file obtaining module is used to obtain a compiled file corresponding to the download request, and the compiled file is a code file obtained by compiling the hot code of the application; the file The sending module is configured to send an installation package of the application and the compiled file to the terminal device, the installation package is used for the terminal device to install the application, and the compiled file is used for the terminal device When running the hotspot code, run the compiled file directly.
第五方面,本申请实施例提供了一种应用安装系统,所述应用安装系统包括终端设备以及服务器,所述终端设备与所述服务器通信连接,其中,所述终端设备用于发送用于下载应用的下载请求至所述服务器;所述服务器用于接收所述下载请求,获取与所述下载请求对应的编译文件,并将所述应用的安装包以及所述编译文件发送至所述终端设备,所述编译文件为对所述应用的热点代码进行编译后得到的代码文件;所述终端设备还用于接收所述服务器返回的所述安装包以及所述编译文件,根据所述安装包对所述应用进行安装,并将所述编译文件进行存储,所述编译文件用于所述终端设备运行所述热点代码时直接运行所述编译文件。In a fifth aspect, an embodiment of the present application provides an application installation system. The application installation system includes a terminal device and a server, the terminal device is in communication connection with the server, and the terminal device is used to send data for downloading The download request of the application is sent to the server; the server is used to receive the download request, obtain the compiled file corresponding to the download request, and send the installation package of the application and the compiled file to the terminal device The compiled file is a code file obtained by compiling the hot code of the application; the terminal device is also used to receive the installation package and the compiled file returned by the server, and pair The application is installed, and the compiled file is stored, and the compiled file is used to directly run the compiled file when the terminal device runs the hotspot code.
第六方面,本申请实施例提供了终端设备,包括:一个或多个处理器;存储器;一个或多个应用程序,其中所述一个或多个应用程序被存储在所述存储器中并被配置为由所述一个或多个处理器执行,所述一个或多个程序配置用于执行上述第一方面提供的应用安装方法。In a sixth aspect, an embodiment of the present application provides a terminal device, including: one or more processors; a memory; one or more application programs, wherein the one or more application programs are stored in the memory and configured To be executed by the one or more processors, the one or more programs are configured to execute the application installation method provided in the above-mentioned first aspect.
第七方面,本申请实施例提供了服务器,包括:一个或多个处理器;存储器;一个或多个应用程序,其中所述一个或多个应用程序被存储在所述存储器中并被配置为由所述一个或多个处理器执行,所述一个或多个程序配置用于执行上述第二方面提供的应用安装方法。In a seventh aspect, an embodiment of the present application provides a server, including: one or more processors; a memory; one or more application programs, wherein the one or more application programs are stored in the memory and configured to Executed by the one or more processors, the one or more programs are configured to execute the application installation method provided in the second aspect described above.
第八方面,本申请实施例提供了一种计算机可读取存储介质,所述计算机可读取存储介质中存储有程序代码,所述程序代码可被处理器调用执行上述第一方面提供的应用安装方法。In an eighth aspect, an embodiment of the present application provides a computer-readable storage medium, the computer-readable storage medium stores program code, and the program code can be invoked by a processor to execute the application provided in the first aspect. installation method.
第九方面,本申请实施例提供了一种计算机可读取存储介质,所述计算机可读取存储介质中存储有程序代码,所述程序代码可被处理器调用执行上述第二方面提供的应用安装方法。In a ninth aspect, an embodiment of the present application provides a computer-readable storage medium. The computer-readable storage medium stores program code, and the program code can be invoked by a processor to execute the application provided in the second aspect. installation method.
附图说明Description of the drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly describe the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings that need to be used in the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
图1示出了根据本申请实施例提供的应用场景的一种示意图。Fig. 1 shows a schematic diagram of an application scenario provided according to an embodiment of the present application.
图2示出了根据本申请实施例提供的应用场景的另一种示意图。Fig. 2 shows another schematic diagram of an application scenario provided according to an embodiment of the present application.
图3示出了根据本申请一个实施例的应用安装方法流程图。Fig. 3 shows a flowchart of an application installation method according to an embodiment of the present application.
图4示出了根据本申请另一个实施例的应用安装方法流程图。Fig. 4 shows a flowchart of an application installation method according to another embodiment of the present application.
图5示出了根据本申请又一个实施例的应用安装方法流程图。Fig. 5 shows a flowchart of an application installation method according to another embodiment of the present application.
图6示出了根据本申请再一个实施例的应用安装方法流程图。Fig. 6 shows a flowchart of an application installation method according to still another embodiment of the present application.
图7示出了根据本申请又另一个实施例的应用安装方法流程图。Fig. 7 shows a flowchart of an application installation method according to yet another embodiment of the present application.
图8示出了根据本申请一个实施例的应用安装装置的一种框图。Fig. 8 shows a block diagram of an application installation device according to an embodiment of the present application.
图9示出了根据本申请另一个实施例的应用安装装置的一种框图。Fig. 9 shows a block diagram of an application installation device according to another embodiment of the present application.
图10是本申请实施例的用于执行根据本申请实施例的应用安装方法的终端设备的框图。FIG. 10 is a block diagram of a terminal device for executing the application installation method according to the embodiment of the present application according to an embodiment of the present application.
图11是本申请实施例的用于执行根据本申请实施例的应用安装方法的服务器的框图。Fig. 11 is a block diagram of a server for executing an application installation method according to an embodiment of the present application according to an embodiment of the present application.
图12是本申请实施例的用于保存或者携带实现根据本申请实施例的应用安装方法的程序代码的存储单元。FIG. 12 is a storage unit for storing or carrying program code for implementing the application installation method according to the embodiment of the present application according to an embodiment of the present application.
具体实施方式Detailed ways
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。In order to enable those skilled in the art to better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be described clearly and completely in conjunction with the accompanying drawings in the embodiments of the present application.
安卓(Android)有两种虚拟机执行环境:Dalvik虚拟机和Art虚拟机。在Dalvik虚拟机的执行环境下,应用每次运行的时候,字节码都需要通过即时编译器(Just In Time compilation,JIT编译器)转换为机器码,才能被设备运行,这样会拖慢应用的执行效率。在Android 4.4版本时,Art虚拟机开始替代Dalvik虚拟机,在最开始的Art虚拟机中,应用在第一次安装的时候,系统会通过一个名称为dex2oat的工具将APK中的dex文件编译成包含本地机器码的oat文件存放下来。这样做之后,在程序执行的时候,就可以直接使用已经编译好的机器码以加快效率,这种预先编译机器码的机制叫做运行前编译(Ahead Of Time,AOT)。AOT的缺点是应用安装和系统升级之后的应用优化过程比较耗时(需要重新将dex字节码编译成本地机器码),且优化后的文件会占用额外的存储空间。Android has two virtual machine execution environments: Dalvik virtual machine and Art virtual machine. In the execution environment of the Dalvik virtual machine, every time the application runs, the bytecode needs to be converted into machine code by a just-in-time compiler (JIT compiler) before it can be run by the device, which will slow down the application. Implementation efficiency. In the Android version 4.4, the Art virtual machine began to replace the Dalvik virtual machine. In the first Art virtual machine, when the application is first installed, the system will use a tool named dex2oat to compile the dex file in the APK into The oat file containing the local machine code is stored. After doing this, when the program is executed, you can directly use the compiled machine code to speed up efficiency. This mechanism of pre-compiling machine code is called Ahead Of Time (AOT). The disadvantage of AOT is that the application optimization process after application installation and system upgrade is relatively time-consuming (the dex bytecode needs to be recompiled into local machine code), and the optimized file will occupy additional storage space.
因此,后来对其做了相应的调整,在Art虚拟机的环境上,由原来的AOT变为解释器(Interpreter)+JIT+AOT混合编译。JAVA程序最初仅仅通过JAVA解释器(Interpreter)解释执行,即对字节码逐条解释执行,这种方式的执行速度相对会比较慢,尤其当某个方法或代码块运行特别频繁时,这种方式的执行效率就显得很低。于是后来在虚拟机中引入了JIT编译器,当虚拟机发现某个方法或者代码块运行特别频繁时,就会把这些代码认定为“hot spot code”(热点代码),将之记录下来保存到profile文件(配置文件),为了提高热点代码的执行效率,在运行时,虚拟机将会把这些代码编译成与本地平台相关的机器码,而正是由JIT编译器负责这项任务。简单而言,profile文件记录了应用频繁运行的方法或者代码块,经由JIT或者AOT编译后得到.odex/.oat文件,该文件存有这些热点代码编译而成的二进制机器码,可直接交由中央处理器(Central Processing Unit,CPU)执行,从而提高了运行速度。Therefore, the corresponding adjustment was made later. In the environment of the Art virtual machine, the original AOT was changed to a hybrid compilation of interpreter (Interpreter) + JIT + AOT. The JAVA program is initially only interpreted and executed by the JAVA interpreter (Interpreter), that is, the bytecode is interpreted and executed one by one. The execution speed of this method is relatively slow, especially when a method or code block is run very frequently. The execution efficiency is very low. So later, the JIT compiler was introduced into the virtual machine. When the virtual machine found that a certain method or code block was running very frequently, it would identify these codes as "hot spot code", and record it and save it to profile file (configuration file), in order to improve the execution efficiency of the hot code, at runtime, the virtual machine will compile these codes into machine code related to the local platform, and it is the JIT compiler that is responsible for this task. To put it simply, the profile file records the frequently run methods or code blocks of the application. After JIT or AOT compilation, the .odex/.oat file is obtained. The file contains the binary machine code compiled by these hot codes, which can be directly handed over The central processing unit (Central Processing Unit, CPU) executes, thereby improving the running speed.
在JIT架构中,oat文件由于包含的时程序运行的机器码,因此可以直接被Art虚拟机运行。而dex文件中,如果是cold code(非热点代码),则交由JAVA解释器执行,如果是hot code(热点代码)则交由JIT实时编译后存放在JIT CODE CACHE中,下次再次访问该热点,则可以直接从cache中执行对应的机器码。In the JIT architecture, the oat file can be directly run by the Art virtual machine because it contains the machine code that the program runs. In the dex file, if it is a cold code (non-hot code), it will be executed by the JAVA interpreter. If it is a hot code (hot code), it will be compiled by JIT in real time and stored in JIT CODE CACHE. You will visit it again next time. For hotspots, the corresponding machine code can be executed directly from the cache.
通常大部分厂商均采用上述的Interpreter+JIT+AOT混合编译模式,在该混合编译模式下,应用在安装的时候dex文件不会被编译,应用在运行时,dex文件先通过Interpreter被直接运行,经常运行的函数或者代码块会被识别为hot code,hot code被JIT编译后存储在JIT CODE CACHE中,生成profile文件以记录热点函数的信息,移动终端在进入IDLE(空闲)且Charging(充电)状态的时候,系统会扫描应用的目录下的profile文件并执行AOT过程进行编译,AOT编译后的二进制机器码可直接交由中央处理器(Central Processing Unit,CPU)执行,从而提高了运行速度。这种方式下,由于应用在安装时没有进行dex文件的编译,因此首次启动的速度没有得到任何优化,而且热点代码的编译依赖于设备在空闲维护模式下才会被触发,这意味着可能需要一段时间后才能享受到性能的提升。Generally, most manufacturers adopt the above-mentioned Interpreter+JIT+AOT mixed compilation mode. In this mixed compilation mode, the dex file will not be compiled when the application is installed. When the application is running, the dex file will be directly run through the Interpreter first. Frequently run functions or code blocks will be recognized as hot code. The hot code is compiled by JIT and stored in JIT CODE CACHE. A profile file is generated to record the information of the hot function. The mobile terminal is entering IDLE (idle) and charging (charging) In the state, the system scans the profile file in the application directory and executes the AOT process for compilation. The binary machine code after AOT compilation can be directly handed over to the Central Processing Unit (CPU) for execution, thereby improving the running speed. In this way, since the application does not compile the dex file during installation, the speed of the first startup is not optimized, and the compilation of the hotspot code depends on the device in the idle maintenance mode to be triggered, which means that it may be necessary It will take a while to enjoy the performance improvement.
当然,一些厂商从用户的移动终端收集应用的配置文件,上传到云端。当用户从商店下载应用时,同时将配置文件推送给用户,并在安装过程中进行编译,使得在安装完应用后,应用在运行时的速度获得提升,也就使得用户能体验到应用性能提升后的体验。但是这种方式,会使得应用在安装时的时长过长。Of course, some manufacturers collect application configuration files from users' mobile terminals and upload them to the cloud. When a user downloads an application from the store, the configuration file is pushed to the user at the same time, and compiled during the installation process, so that after the application is installed, the speed of the application at runtime is improved, and the user can experience the improvement in application performance After the experience. However, this method will make the application installation time too long.
针对上述问题,发明人提出了本申请实施例提供的应用安装方法、装置、终端设 备、服务器及存储介质,通过终端设备从服务器下载应用时,服务器同时向终端推送对该应用的热点代码进行编译后得到的代码文件,从而使得终端设备在首次运行时即可使用编译文件,而提升了首次运行的运行速度,另外也避免了终端设备在安装应用时对热点代码进行编译,而造成安装时长较长的问题。其中,具体的应用安装方法在后续的实施例中进行详细的说明。In response to the above problems, the inventor proposes the application installation method, device, terminal device, server, and storage medium provided by the embodiments of the application. When the application is downloaded from the server through the terminal device, the server pushes the hot code of the application to the terminal at the same time to compile The code file obtained afterwards, so that the terminal device can use the compiled file when it is run for the first time, which improves the running speed of the first run. In addition, it also avoids the terminal device from compiling the hot code when installing the application, resulting in a longer installation time. Long question. Among them, the specific application installation method is described in detail in the subsequent embodiments.
下面对本申请实施例提供的应用场景进行介绍。The following describes the application scenarios provided by the embodiments of the present application.
在一些实施方式中,请参阅图1,图1示出了本申请实施例提供的应用场景的一种示意图,该应用场景包括应用安装系统10,该应用安装系统10包括:终端设备100以及第一服务器200。其中,终端设备100与第一服务器200通过网络进行通信。终端设备100可以与第一服务器200进行数据交互,以从第一服务器200获取应用程序的安装包、编译文件等。In some implementation manners, please refer to FIG. 1. FIG. 1 shows a schematic diagram of an application scenario provided by an embodiment of the present application. The application scenario includes an application installation system 10, and the application installation system 10 includes: a terminal device 100 and a second One server 200. Wherein, the terminal device 100 communicates with the first server 200 through a network. The terminal device 100 may perform data interaction with the first server 200 to obtain the installation package, compiled file, etc. of the application program from the first server 200.
在另一些实施方式中,请参阅图2,图2示出了本申请实施例提供的应用场景的另一种示意图,应用安装系统10也可以包括:终端设备100、第一服务器200以及第二服务器300。其中,终端设备100与第一服务器200之间进行数据交互,第一服务器200与第二服务器300之间也可以进行数据交互。第一服务器200可以用于处理终端设备100的请求,第二服务器300可以用于存储和管理应用程序的编译文件、安装包等文件,当终端设备100从第一服务器200获取应用程序的文件时,第一服务器200可以从第二服务器300获取应用程序的文件,并将应用程序的文件发送至终端设备100。In other embodiments, please refer to FIG. 2. FIG. 2 shows another schematic diagram of an application scenario provided by an embodiment of the present application. The application installation system 10 may also include: a terminal device 100, a first server 200, and a second server. Server 300. Wherein, the terminal device 100 and the first server 200 exchange data, and the first server 200 and the second server 300 may also exchange data. The first server 200 can be used to process requests from the terminal device 100, and the second server 300 can be used to store and manage files such as compiled files and installation packages of the application program. When the terminal device 100 obtains the application program files from the first server 200 , The first server 200 may obtain the file of the application program from the second server 300, and send the file of the application program to the terminal device 100.
当然,应用安装系统10中也还可以包括其他的服务器。例如,应用安装系统10还可以包括第三服务器,第三服务器可以用于从用户的终端设备收集应用程序的编译文件,并将收集的编译文件传输至第二服务器200进行整理和存储等;又例如,应用安装系统也还可以包括第四服务器,第四服务器可以用于存储和管理应用程序的安装包等,该情况下,可以由第二服务器200存储和管理应用程序的编译文件,实现应用程序的安装包与编译文件的单独进行管理和存储。Of course, the application installation system 10 may also include other servers. For example, the application installation system 10 may also include a third server, which may be used to collect compiled files of the application from the user's terminal device, and transmit the collected compiled files to the second server 200 for sorting and storage; and For example, the application installation system may also include a fourth server. The fourth server may be used to store and manage application installation packages. In this case, the second server 200 may store and manage the compiled files of the application to implement the application. The installation package of the program and the compiled file are managed and stored separately.
在一些实施方式中,上述的终端设备100可以为智能手机、平板电脑、电子书、智能手表等设备;第一服务器200、第二服务器300等服务器可以为传统服务器,也可以为云服务器,在此不做限定。In some embodiments, the aforementioned terminal device 100 may be a smart phone, a tablet computer, an e-book, a smart watch, etc.; the first server 200, the second server 300 and other servers may be traditional servers or cloud servers. This is not limited.
下面对本申请实施例提供的应用安装方法进行详细介绍。The following describes in detail the application installation method provided by the embodiment of the present application.
请参阅图3,图3示出了本申请一个实施例提供的应用安装方法的流程示意图。该应用安装方法可以应用于上述应用安装系统中的终端设备。下面将以终端设备为例,说明本实施例的具体流程。下面将针对图3所示的流程进行详细的阐述,所述应用安装方法具体可以包括以下步骤:Please refer to FIG. 3, which shows a schematic flowchart of an application installation method provided by an embodiment of the present application. The application installation method can be applied to the terminal equipment in the above-mentioned application installation system. The following will take a terminal device as an example to illustrate the specific process of this embodiment. The following will elaborate on the process shown in FIG. 3, and the application installation method may specifically include the following steps:
步骤S110:发送用于下载应用的下载请求至服务器。Step S110: Send a download request for downloading the application to the server.
在本申请实施例中,下载请求可以由终端设备生成,该下载请求可以用于下载应用,从服务器获取该应用的安装文件等。其中,该应用可以是终端设备未安装过的应用,也可以为终端设备此前已安装而需要进行更新的应用,在此不做限定。In the embodiment of the present application, the download request may be generated by a terminal device, and the download request may be used to download an application, obtain an installation file of the application from a server, and so on. The application may be an application that has not been installed on the terminal device, or an application that has been installed on the terminal device before and needs to be updated, which is not limited here.
作为一种实施方式,终端设备可以根据用户的用户操作,生成下载请求,例如,终端设备检测到在软件商店的界面中对应用的下载操作,进而生成对该应用的下载请求。作为另一种实施方式,在开启了对应用自动更新的功能时,终端设备也可以根据自动更新的功能,生成下载请求,以从服务器获取该应用的安装文件,对应用进行更新。As an implementation manner, the terminal device may generate a download request according to a user operation of the user. For example, the terminal device detects a download operation of an application in an interface of a software store, and then generates a download request for the application. As another implementation manner, when the function of automatically updating the application is enabled, the terminal device may also generate a download request according to the function of automatic updating to obtain the installation file of the application from the server and update the application.
在一些实施方式中,终端设备在生成用于下载应用的下载请求后,则可以将下载请求发送至服务器。其中,该服务器可以至少能够对终端设备发送的下载请求、查询请求等进行响应,并与终端设备进行交互,也就是说,该服务器能够响应下载请求,获取应用的安装相关的文件,并向终端设备返回文件。例如,该服务器为软件商店的服务器,终端设备通过运行软件商店的应用,并检测到用户于软件商店中的操作,而 向软件商店的服务器发送下载请求。在上述的应用安装系统中,该服务器可以为上述应用安装系统中的第一服务器。当然,具体的服务器可以不作为限定,仅需服务器满足能响应终端设备的请求即可。In some embodiments, the terminal device may send the download request to the server after generating the download request for downloading the application. Among them, the server can at least respond to download requests, query requests, etc. sent by the terminal device, and interact with the terminal device, that is, the server can respond to the download request, obtain files related to the installation of the application, and send it to the terminal The device returns the file. For example, the server is a server of a software store, and the terminal device runs an application of the software store and detects a user's operation in the software store, and sends a download request to the server of the software store. In the above-mentioned application installation system, the server may be the first server in the above-mentioned application installation system. Of course, the specific server may not be a limitation, as long as the server meets the request of the terminal device.
步骤S120:接收所述服务器根据所述下载请求返回的安装包以及编译文件,所述编译文件为对所述应用的热点代码进行编译后得到的代码文件。Step S120: Receive the installation package and the compiled file returned by the server according to the download request, where the compiled file is a code file obtained by compiling the hot code of the application.
在一些实施方式中,终端设备在向服务器发送下载请求之后,服务器对下载请求进行响应,并根据下载请求获取应用的安装包以及编译文件。其中,安装包指的是应用程序的软件安装包,是可自行解压缩文件的集合,安装包中包括软件安装的所有文件,例如,安装包可以为Android安装包,Android安装包可以用于终端设备中的Android系统执行即可安装。编译文件可以为对该应用的热点代码(hot code)进行编译后得到的二进制的机器代码的文件,例如可以为oat文件,也可以为odex文件,热点代码可以指经常运行的函数或代码块。具体对热点代码进行编译的方式可以不作为限定,例如可以为JIT或者AOT编译后得到的二进制的机器代码文件。In some embodiments, after the terminal device sends the download request to the server, the server responds to the download request, and obtains the installation package and the compiled file of the application according to the download request. Among them, the installation package refers to the software installation package of the application, which is a collection of files that can be decompressed by itself. The installation package includes all files for software installation. For example, the installation package can be an Android installation package, and the Android installation package can be used in a terminal. The Android system in the device can be executed to install. The compiled file may be a binary machine code file obtained by compiling the hot code of the application, for example, it may be an oat file or an odex file, and the hot code may refer to a function or code block that is frequently run. The specific way of compiling the hotspot code is not limited, for example, it may be a binary machine code file obtained after JIT or AOT compilation.
作为一种实施方式,编译文件可以存储于上述服务器中,编译文件可以为该服务器从其他终端收集的该应用的编译文件,也可以为服务器从其他终端收集该应用的热点代码后,再对该热点代码进行编译后获得的。服务器可以从存储的编译文件中读取该应用的编译文件。As an implementation manner, the compiled file may be stored in the above-mentioned server. The compiled file may be a compiled file of the application collected by the server from other terminals, or it may be the server after collecting the hot code of the application from other terminals. The hotspot code is obtained after compilation. The server can read the compiled file of the application from the stored compiled file.
作为另一种实施方式,编译文件可以存储于其他服务器中,例如用于存储和管理应用的编译文件的云端。接收到下载请求的服务器,可以从其他服务器获取下载请求对应的应用的编译文件。As another implementation manner, the compiled file may be stored in another server, such as a cloud for storing and managing the compiled file of the application. The server that receives the download request can obtain the compiled file of the application corresponding to the download request from other servers.
在一些实施方式中,应用的安装包可以存储于接收到下载请求的服务器,服务器可以直接读取该应用的安装包。应用的安装包也可以存储于其他服务器中(例如用于存储应用的安装包的服务器),接收到下载请求的服务器可以从其他服务器获取下载请求对应的应用的安装包。In some embodiments, the installation package of the application may be stored in the server that receives the download request, and the server may directly read the installation package of the application. The installation package of the application may also be stored in another server (for example, a server for storing the installation package of the application), and the server that receives the download request may obtain the installation package of the application corresponding to the download request from the other server.
服务器在获取到下载请求对应的应用的安装包以及编译文件之后,则可以将安装包以及编译文件共同下发至终端设备。对应的,终端设备可以接收到服务器返回的安装包以及编译文件。After the server obtains the installation package and the compiled file of the application corresponding to the download request, it may jointly deliver the installation package and the compiled file to the terminal device. Correspondingly, the terminal device can receive the installation package and the compiled file returned by the server.
步骤S130:根据所述安装包对所述应用进行安装,并将所述编译文件进行存储,所述编译文件用于所述终端设备运行所述热点代码时直接运行所述编译文件。Step S130: Install the application according to the installation package, and store the compiled file, where the compiled file is used to directly run the compiled file when the terminal device runs the hot code.
在本申请实施例中,终端设备在向服务器发送用于下载应用的下载请求后,可以接收到服务器返回的该应用的安装包以及编译文件。终端设备在接收到应用的安装包以及编译文件之后,则可以运行安装包对应用进行安装,具体地,终端设备对安装包进行解压后,再执行解压后的文件,而对应用进行安装。另外,终端设备可以将接收到的编译文件进行存储,该应用的编译文件在被终端设备存储后,当终端设备运行该热点代码时,由于编译文件中是热点代码对应的编译后的二进制代码,因此,可以直接由处理器执行,从而可以提升运行速度。In the embodiment of the present application, after sending a download request for downloading an application to the server, the terminal device may receive the installation package and compiled file of the application returned by the server. After receiving the installation package and compiled file of the application, the terminal device can run the installation package to install the application. Specifically, the terminal device decompresses the installation package, and then executes the decompressed file to install the application. In addition, the terminal device can store the received compiled file. After the compiled file of the application is stored by the terminal device, when the terminal device runs the hot code, since the compiled file contains the compiled binary code corresponding to the hot code, Therefore, it can be directly executed by the processor, which can increase the running speed.
本申请实施例提供的应用安装方法,通过发送用于下载应用的下载请求至服务器,接收服务器根据下载请求返回的安装包以及编译文件,该编译文件为对该应用的热度代码进行编译后得到的代码文件,根据安装包对该应用进行安装,并将编译文件进行存储,该编译文件用于终端设备运行热点代码时直接运行编译文件,从而使得终端设备在首次运行时即可使用编译文件,而提升了首次运行的运行速度。另外也避免了终端设备在安装应用时对热点代码进行编译,而造成安装时长较长的问题。The application installation method provided by the embodiment of the application sends a download request for downloading the application to the server, and receives the installation package and the compiled file returned by the server according to the download request. The compiled file is obtained by compiling the heat code of the application Code file, install the application according to the installation package, and store the compiled file. The compiled file is used to run the compiled file directly when the terminal device runs the hot code, so that the terminal device can use the compiled file when it runs for the first time. Improved the running speed of the first run. In addition, it also avoids the problem that the terminal device compiles the hot code when installing the application, which causes a long installation time.
请参阅图4,图4示出了本申请另一个实施例提供的应用安装方法的流程示意图。该应用安装方法应用于上述终端设备,下面将针对图4所示的流程进行详细的阐述,所述应用安装方法具体可以包括以下步骤:Please refer to FIG. 4, which shows a schematic flowchart of an application installation method provided by another embodiment of the present application. The application installation method is applied to the above-mentioned terminal device. The process shown in FIG. 4 will be described in detail below. The application installation method may specifically include the following steps:
步骤S210:根据所述终端设备的设备信息以及应用的应用信息,生成下载请求并 将所述下载请求发送至服务器,所述下载请求携带有所述设备信息以及所述应用信息。Step S210: According to the device information of the terminal device and the application information of the application, generate a download request and send the download request to the server, the download request carries the device information and the application information.
在本申请实施例中,热点代码被编译后获得的编译文件与具体的设备、软件版本、系统版本等环境因素有关,因此不同的设备、系统版本或者软件版本,编译得到编译文件不同。因此,每个应用的编译文件均与设备信息以及应用信息相关联,其中,设备信息可以包括终端设备的设备厂商、设备机型、系统的版本等,应用信息可以包括:应用的版本号、应用的版本名、包名等信息,具体的设备信息及应用信息可以不作为限定,设备信息以及应用信息中可以包括更多的信息,以便终端设备获得的编译文件更加准确。In the embodiment of the present application, the compiled file obtained after the hotspot code is compiled is related to environmental factors such as specific equipment, software version, system version, etc. Therefore, different equipment, system versions, or software versions have different compiled files obtained by compilation. Therefore, the compiled files of each application are associated with device information and application information. The device information can include the device manufacturer, device model, and system version of the terminal device, and the application information can include: the version number of the application, the application The version name, package name and other information, specific device information and application information may not be limited. The device information and application information may include more information, so that the compiled file obtained by the terminal device is more accurate.
在一些实施方式中,终端设备在生成用于下载应用的下载请求时,则生成的下载请求中携带有该终端设备的设备信息以及应用的应用信息,以获取与设备信息以及应用信息对应的编译文件,以便获得的编译文件可以使用。In some embodiments, when a terminal device generates a download request for downloading an application, the generated download request carries the device information of the terminal device and the application information of the application, so as to obtain the compilation corresponding to the device information and the application information. File so that the obtained compiled file can be used.
步骤S220:接收所述服务器根据所述下载请求返回的安装包以及编译文件,所述编译文件为对所述应用的热点代码进行编译后得到的代码文件。Step S220: Receive the installation package and the compiled file returned by the server according to the download request, where the compiled file is a code file obtained by compiling the hot code of the application.
在本申请实施例中,由于终端设备向服务器发送的下载请求中携带有设备信息以及应用信息,因此服务器在接收到该下载请求后,可以获取与设备信息以及应用信息对应的编译文件。其中,应用的每个编译文件均与设备信息以及应用信息相关联的存储于该服务器,或者应用的每个编译文件均与设备信息以及应用信息相关联的存储于其他服务器。当编译文件存储于接收到下载请求的服务器时,则该服务器可以直接根据设备信息以及应用信息,读取与设备信息以及应用信息对应的编译文件;当编译文件存储于其他服务器时,则可以从其他服务器获取与设备信息以及应用信息对应的编译文件。服务器在获取到与下载请求中的设备信息以及应用信息对应的编译文件,并获取到应用的安装包以后,则可以将编译文件以及安装包同时返回至终端设备,对应的,终端设备可以接收到应用的安装包,与设备信息以及应用信息对应的编译文件。In the embodiment of the present application, since the download request sent by the terminal device to the server carries device information and application information, the server can obtain the compiled file corresponding to the device information and application information after receiving the download request. Wherein, each compiled file of the application is stored in the server in association with the device information and application information, or each compiled file of the application is stored in other servers in association with the device information and application information. When the compiled file is stored on the server that receives the download request, the server can directly read the compiled file corresponding to the device information and application information according to the device information and application information; when the compiled file is stored on other servers, it can be downloaded from Other servers obtain compiled files corresponding to device information and application information. After the server obtains the compiled file corresponding to the device information and application information in the download request, and obtains the installation package of the application, it can return the compiled file and installation package to the terminal device at the same time. Correspondingly, the terminal device can receive The installation package of the application, the compiled file corresponding to the device information and the application information.
步骤S230:根据所述安装包对所述应用进行安装。Step S230: Install the application according to the installation package.
在本申请实施例中,步骤S230可以参阅前述实施例的内容,在此不再赘述。In this embodiment of the present application, step S230 can refer to the content of the foregoing embodiment, and will not be repeated here.
步骤S240:对所述编译文件进行校验。Step S240: verify the compiled file.
在本申请实施例中,终端设备在根据安装包对应用进行安装时,在将编译文件进行存储之前,还可以对接收到的编译文件进行校验,以确定接收到的编译文件的完整性和一致性,即确定编译文件是否有被破坏和篡改。In the embodiment of the present application, when the terminal device installs the application according to the installation package, before storing the compiled file, it can also verify the received compiled file to determine the integrity and integrity of the received compiled file. Consistency, that is, to determine whether the compiled file has been damaged or tampered with.
在一些实施方式中,终端设备可以利用文件的哈希(hash)值进行校验。例如,终端设备可以利用MD5(Message Digest 5,信息摘要)值验证方法,对编译文件进行校验。具体的,终端设备可以获取编译文件的源文件的MD5值,再计算接收到的编译文件的MD5值,并将两者进行比较,如果两者一致,则表示接收到的编译文件的为完整的,与源文件是一致的,也就是未被破坏和篡改;如果两者不一致,则表示获取到的编译文件不完整,与源文件不一致。In some embodiments, the terminal device may use the hash value of the file for verification. For example, the terminal device can use the MD5 (Message Digest 5, message digest) value verification method to verify the compiled file. Specifically, the terminal device can obtain the MD5 value of the source file of the compiled file, calculate the MD5 value of the received compiled file, and compare the two. If the two are consistent, it means that the received compiled file is complete , Is consistent with the source file, that is, it has not been damaged or tampered with; if the two are inconsistent, it means that the compiled file obtained is incomplete and inconsistent with the source file.
步骤S250:当校验结果表征所述编译文件满足存储条件时,将所述编译文件存储到指定文件目录中,所述编译文件用于所述终端设备运行所述热点代码时直接运行所述编译文件。Step S250: When the verification result indicates that the compiled file meets the storage condition, the compiled file is stored in a designated file directory, and the compiled file is used to run the compilation directly when the terminal device runs the hot code file.
在本申请实施例中,终端设备在对获取到的编译文件进行校验后,可以根据校验结果,确定编译文件是否满足存储条件。其中,当校验结果为获取到的编译文件为完整,与源文件一致时,则校验结果可以表征编译文件满足存储条件,该情况下,终端设备则可以将编译文件存储到指定文件目录中;当校验结果为获取到的编译文件不完整,与源文件不一致时,则校验结果可以表征编译文件不满足存储条件,该情况下,终端设备不执行将获取到的编译文件存储到指定目录,以避免后续该编译文件不可用,而导致运行时的崩溃等。其中,指定目录可以为用于存储oat文件、dex文件等编译后的二进制机器代码的目录,从而在终端设备运行该应用的热点代码时,可以从指定目 录中读取编译文件执行。In the embodiment of the present application, after verifying the acquired compiled file, the terminal device may determine whether the compiled file meets the storage condition according to the verification result. Among them, when the verification result is that the obtained compiled file is complete and consistent with the source file, the verification result can indicate that the compiled file meets the storage conditions. In this case, the terminal device can store the compiled file in the specified file directory ; When the verification result is that the acquired compiled file is incomplete and inconsistent with the source file, the verification result can indicate that the compiled file does not meet the storage conditions. In this case, the terminal device does not execute the storage of the acquired compiled file to the specified The directory to avoid the subsequent unavailability of the compiled file, which may cause runtime crashes. Among them, the designated directory can be a directory for storing the compiled binary machine code such as oat files, dex files, etc., so that when the terminal device runs the hot code of the application, the compiled files can be read and executed from the designated directory.
在一些实施方式中,当校验结果表征编译文件不满足存储条件时,终端设备还可以多次从服务器获取该应用的编译文件,直至获取到校验后满足存储条件的编译文件,并将满足存储条件的编译文件进行存储。In some embodiments, when the verification result indicates that the compiled file does not meet the storage condition, the terminal device may also obtain the compiled file of the application from the server multiple times, until it obtains the compiled file that meets the storage condition after verification, and will satisfy the storage condition. The compiled file of the storage condition is stored.
在该实施方式下,终端设备在连续多次从服务器获取到的编译文件后,每次获得的编译文件的校验结果均不满足存储条件时,终端设备还可以从服务器获取配置文件,配置文件中包括应用的热点代码,终端设备在获得配置文件后,则可根据配置文件,对配置文件中的热点代码进行编译,并将编译后得到编译文件进行存储。可以理解的,当连续多次获得的编译文件的校验结果均不满足存储条件时,则可能是因为该终端设备与服务器之间传输编译文件容易出错,因此可以尝试获取配置文件,而对热点代码进行编译,从而获得编译文件,以提升应用运行时的运行速度。In this embodiment, after the terminal device obtains the compiled file from the server multiple times in succession, each time the check result of the obtained compiled file does not meet the storage condition, the terminal device may also obtain the configuration file from the server. It includes the hot code of the application. After obtaining the configuration file, the terminal device can compile the hot code in the configuration file according to the configuration file, and store the compiled file obtained after compilation. It is understandable that when the verification results of the compiled files obtained multiple times in a row do not meet the storage conditions, it may be because the transmission of the compiled files between the terminal device and the server is prone to errors. Therefore, you can try to obtain the configuration file, but the hot spot The code is compiled to obtain a compiled file to improve the running speed of the application when it is running.
在一些实施方式中,终端设备在安装完应用,并将编译文件进行存储之后,终端设备在第一次运行该应用的热点代码时,直接执行该编译文件而出错时,也可以从服务器获取配置文件,并对热点代码进行编译,以得编译文件并进行存储。可以理解的,当终端设备第一次运行该应用,直接执行编译文件中的机器代码出错时,表示可能此前已编译好的编译文件可能与设备信息等不符合,因此,可以由该终端设备对热点代码进行编译,以获得可用的编译文件。In some embodiments, after the terminal device installs the application and stores the compiled file, when the terminal device runs the hot code of the application for the first time, it directly executes the compiled file and an error occurs, it can also obtain the configuration from the server. File, and compile the hot code to get the compiled file and store it. It is understandable that when the terminal device runs the application for the first time and directly executes the machine code in the compiled file and makes an error, it means that the compiled file that has been compiled before may not match the device information. Therefore, the terminal device can Hotspot code is compiled to obtain available compiled files.
本申请实施例提供的应用安装方法,通过向服务器发送携带有设备信息和应用的应用信息的下载请求,从而可以接收到服务器返回的安装包和编译文件,并且编译文件与设备信息以及应用信息对应,然后根据安装包对应用进行安装,并对编译文件进行校验,当校验结果表征编译文件满足存储条件时,将编译文件进行存储,存储的编译文件由于与设备信息以及应用信息对应,因此终端设备在运行热点代码时可以直接运行编译文件中的机器代码,提升应用的运行效率。由于安装时即存储了编译文件,从而使得终端设备在首次运行时即可使用编译文件,而提升了首次运行的运行速度。另外也避免了终端设备在安装应用时对热点代码进行编译,而造成安装时长较长的问题。The application installation method provided in the embodiments of the present application sends a download request carrying device information and application information to the server, so that the installation package and compiled file returned by the server can be received, and the compiled file corresponds to the device information and application information , And then install the application according to the installation package, and verify the compiled file. When the verification result indicates that the compiled file meets the storage conditions, the compiled file is stored. The stored compiled file corresponds to the device information and application information, so The terminal device can directly run the machine code in the compiled file when running the hot code, which improves the running efficiency of the application. Since the compiled file is stored during installation, the terminal device can use the compiled file when it is run for the first time, which improves the running speed of the first run. In addition, it also avoids the problem that the terminal device compiles the hot code when installing the application, which causes a long installation time.
请参阅图5,图5示出了本申请又一个实施例提供的应用安装方法的流程示意图。该应用安装方法应用于上述应用安装系统中的终端设备,下面将针对图5所示的流程进行详细的阐述,所述应用安装方法具体可以包括以下步骤:Please refer to FIG. 5, which shows a schematic flowchart of an application installation method provided by another embodiment of the present application. The application installation method is applied to the terminal device in the above-mentioned application installation system. The process shown in FIG. 5 will be described in detail below. The application installation method may specifically include the following steps:
步骤S310:当所述终端设备的状态满足预设条件时,发送第一下载请求至服务器,所述第一下载请求用于至少获取所述应用的安装包以及编译文件。Step S310: When the state of the terminal device satisfies a preset condition, send a first download request to the server, where the first download request is used to obtain at least the installation package and the compiled file of the application.
在本申请实施例中,考虑到终端设备在下载应用时,服务器同时下发安装包和编译文件,会带来传输的数据量的增加,这样会使得下载速度、下载时间等受到影响,因此,终端设备在发送下载请求至服务器之前,还可以确定终端设备的状态是否满足预设条件,当满足预设条件时,才从服务器同时获取安装包和编译文件。其中,预设条件可以为表征终端设备在同时下载安装包和编译文件时,下载速度和下载时间正常的条件。In the embodiments of the present application, considering that when the terminal device is downloading an application, the server simultaneously issues the installation package and the compiled file, which will increase the amount of transmitted data, which will affect the download speed, download time, etc., therefore, Before sending the download request to the server, the terminal device can also determine whether the state of the terminal device meets the preset condition, and only when the preset condition is satisfied, the installation package and the compiled file are obtained from the server at the same time. Wherein, the preset condition may be a condition that characterizes that the download speed and download time are normal when the terminal device downloads the installation package and the compiled file at the same time.
在一些实施方式中,预设条件包括以下条件中的至少一种:终端设备连接的网络的网络速度大于第一速度;终端设备连接的网络的网络类型为指定类型;当前时间处于预设时间段。也就是说,预设条件可以为以上条件中的任意一个条件,也可以为以上条件中多个条件的组合,在此不做限定。其中,网络速度可以为终端设备利用当前连接的网络进行下载时的最大速度或者平均速度等;网络类型指的是网络所属的类型,例如数据网络、无线网络等,数据网络中还可以分为3G网络、4G网络、5G网络等。第一速度可以为表征可以在正常的下载时间内下载完安装包以及编译文件的速度,例如,第一速度可以为1Mb(兆)每秒,5Mb(兆)每秒等,具体数值可以不作为限定;指定类型可以为网络速度通常较高的网络的类型,例如网络速度大于第二速度的网络 类型,例如,指定网络可以为WIFI网络、5G网络等,具体网络的类型可以不作为限定;预设时间段可以为网络空闲的时间段或者网络速度较高(例如大于第三速度)的时间段,当处于预设时间段时,终端设备同时下载安装包以及编译文件,下载速度和下载时间通常不会处于异常。当然,具体的预设条件可以不作为限定,例如预设条件还可以是可分配至安装包和编译文件的下载任务的带宽大于指定带宽等。In some embodiments, the preset condition includes at least one of the following conditions: the network speed of the network to which the terminal device is connected is greater than the first speed; the network type of the network to which the terminal device is connected is a specified type; the current time is within a preset time period . That is to say, the preset condition can be any one of the above conditions, or a combination of multiple conditions in the above conditions, which is not limited here. Among them, the network speed can be the maximum or average speed when the terminal device uses the currently connected network to download; the network type refers to the type of the network, such as data network, wireless network, etc., data network can also be divided into 3G Network, 4G network, 5G network, etc. The first speed can be the speed at which the installation package and compiled files can be downloaded within the normal download time. For example, the first speed can be 1Mb (mega) per second, 5Mb (mega) per second, etc. The specific value can be omitted Limited; the designated type can be the type of the network with usually higher network speed, for example, the network type with the network speed greater than the second speed, for example, the designated network can be a WIFI network, a 5G network, etc. The specific network type may not be a limitation; The time period can be the time period when the network is idle or the time period when the network speed is higher (for example, greater than the third speed). When in the preset time period, the terminal device downloads the installation package and the compiled file at the same time. The download speed and download time are usually Will not be abnormal. Of course, the specific preset condition may not be a limitation. For example, the preset condition may also be that the bandwidth of the download task that can be allocated to the installation package and the compiled file is greater than the specified bandwidth.
可以理解的,当终端设备的状态满足预设条件时,则表示终端设备同时对安装包以及编译文件进行下载,不会出现异常的情况,因此,终端设备可以发送用于至少获取应用的安装包以及编译文件的第一下载请求至服务器,以从服务器获取安装包以及编译文件。反之,当终端设备的状态满足预设条件时,则终端设备不能同时从服务器获取安装包以及编译文件。It is understandable that when the state of the terminal device satisfies the preset condition, it means that the terminal device downloads the installation package and the compiled file at the same time, and there is no abnormal situation. Therefore, the terminal device can send at least the installation package used to obtain the application And the first download request of the compiled file is sent to the server to obtain the installation package and the compiled file from the server. Conversely, when the state of the terminal device meets the preset condition, the terminal device cannot simultaneously obtain the installation package and the compiled file from the server.
步骤S320:接收所述服务器根据所述下载请求返回的安装包以及编译文件,所述编译文件为对所述应用的热点代码进行编译后得到的代码文件。Step S320: Receive the installation package and the compiled file returned by the server according to the download request, where the compiled file is a code file obtained by compiling the hot code of the application.
在本申请实施例中,步骤S320可以参阅前述实施例的内容,在此不再赘述。In the embodiment of the present application, step S320 can refer to the content of the foregoing embodiment, which will not be repeated here.
在一些实施方式中,预设条件为终端设备连接的网络的网络速度大于第一速度时,上述下载请求还可以携带有网络速度,服务器向终端设备返回安装包以及编译文件时,还可以根据网络速度确定返回的编译文件中代码文件的数量,以使代码文件的数量能与网络速度对应,其中,代码文件的数量可以与网络速度呈正相关,以避免编译文件中代码数量过多时,造成下载时间过长。In some embodiments, when the preset condition is that the network speed of the network connected to the terminal device is greater than the first speed, the download request may also carry the network speed. When the server returns the installation package and compiled file to the terminal device, it can also be based on the network speed. Speed determines the number of code files in the compiled files returned, so that the number of code files can correspond to the network speed, where the number of code files can be positively correlated with the network speed to avoid downloading time when there are too many codes in the compiled files Too long.
步骤S330:根据所述安装包对所述应用进行安装,并将所述编译文件进行存储,所述编译文件用于所述终端设备运行所述热点代码时直接运行所述编译文件。Step S330: Install the application according to the installation package, and store the compiled file, where the compiled file is used to directly run the compiled file when the terminal device runs the hotspot code.
在本申请实施例中,步骤S330可以参阅前述实施例的内容,在此不再赘述。In this embodiment of the present application, step S330 can refer to the content of the foregoing embodiment, and will not be repeated here.
在一些实施方式中,预设条件为终端设备连接的网络的网络速度大于第一速度时。由于编译文件中的代码文件的数量与网络速度对应,服务器可能并非传输全部的热点代码对应的编译文件,因此,该应用安装方法还可以包括:确定该应用的所有热点代码的数量,其中,终端设备可以通过获取该应用的配置文件,并从配置文件中确定所有热点代码的数量;如果编译文件中的代码文件的数量小于所有热点代码对应的数量,则根据编译文件中的代码文件对应的热点代码,确定所有热点代码中未被编译的热点代码,作为第一热点代码;在终端设备的设备状态满足指定状态时,获取第一热点代码对应的编译文件,并将第一热点代码对应的热点文件进行存储。可以理解的,终端设备可以从服务器确定该应用的所有热点代码的数量,并确定编译文件中的代码文件数量是否小于所有热点代码的数量,以便确认服务器是否传输了全部的热点代码对应的编译文件。如果确定编译文件中的代码文件数量小于所有热点代码的数量,则表示服务器未传输全部的热点代码对应的编译文件,因此可以确定未获取到编译文件的热点代码,并在终端设备的设备状态满足指定状态时,获取第一热点代码对应的编译文件,以便获取到全部的热点代码对应的编译文件,从而方便该应用在后续运行时,能有效提升运行速度。该指定状态可以为网络速度大于指定速度的状态,指定速度可以为大于上述第一速度的网络速度;该指定状态也可以为终端设备处于休眠或者低功耗的状态,具体指定状态可以不作为限定。In some embodiments, the preset condition is when the network speed of the network to which the terminal device is connected is greater than the first speed. Since the number of code files in the compiled file corresponds to the network speed, the server may not transmit all the compiled files corresponding to the hotspot code. Therefore, the application installation method may also include: determining the number of all hotspot codes of the application, where the terminal The device can obtain the configuration file of the application and determine the number of all hot codes from the configuration file; if the number of code files in the compiled file is less than the number corresponding to all the hot codes, it will be based on the hotspot corresponding to the code file in the compiled file. Code, determine the uncompiled hotspot code among all hotspot codes as the first hotspot code; when the device status of the terminal device meets the specified state, obtain the compiled file corresponding to the first hotspot code, and set the hotspot corresponding to the first hotspot code Files are stored. It is understandable that the terminal device can determine the number of all hot codes of the application from the server, and determine whether the number of code files in the compiled file is less than the number of all hot codes, so as to confirm whether the server has transmitted all the compiled files corresponding to all the hot codes . If it is determined that the number of code files in the compiled file is less than the number of all hot codes, it means that the server has not transmitted all the compiled files corresponding to the hot codes. Therefore, it can be determined that the hot codes of the compiled files are not obtained, and the device status of the terminal device satisfies When the state is specified, the compiled file corresponding to the first hotspot code is obtained, so that the compiled files corresponding to all the hotspot codes can be obtained, so as to facilitate the subsequent operation of the application and effectively improve the running speed. The specified state may be a state where the network speed is greater than the specified speed, and the specified speed may be a network speed greater than the above-mentioned first speed; the specified state may also be a state where the terminal device is in a dormant or low power consumption state, and the specific specified state may not be a limitation .
作为一种实施方式,获取所述第一热点代码对应的编译文件,可以包括:从服务器获取第一热点代码对应的编译文件。也就是说,终端设备可以在安装该应用或者在安装过程中,设备状态满足指定状态时,从服务器再获取第一热点代码对应的编译文件,并将该编译文件进行存储。As an implementation manner, obtaining the compiled file corresponding to the first hotspot code may include: obtaining the compiled file corresponding to the first hotspot code from a server. In other words, the terminal device may obtain the compiled file corresponding to the first hotspot code from the server when the device state meets the specified state during the installation of the application or during the installation process, and store the compiled file.
作为另一种实施方式,获取第一热点代码对应的编译文件,可以包括:对第一热点代码进行编译,获得第一热点代码对应的编译文件。其中,终端设备可以直接从服务器获取第一热点代码对应的配置文件,再根据配置文件,对配置文件中的第一热点代码进行编译,从而得到第一热点代码对应的编译文件,并将该编译文件进行存储。As another implementation manner, obtaining the compiled file corresponding to the first hotspot code may include: compiling the first hotspot code to obtain the compiled file corresponding to the first hotspot code. Among them, the terminal device can directly obtain the configuration file corresponding to the first hotspot code from the server, and then compile the first hotspot code in the configuration file according to the configuration file, thereby obtaining the compiled file corresponding to the first hotspot code, and compile it Files are stored.
在一些实施方式中,该应用安装方法还可以包括:如果网络速度小于或者等于第一速度时,发送第二下载请求至服务器,第二下载请求用于至少获取应用的安装包以及配置文件;接收服务器返回的安装包以及配置文件;根据配置文件,确定应用的所有热点代码;根据所安装包对应用进行安装;对所有热点代码进行编译,并将编译后获得的编译文件进行存储。可以理解的,当网络速度小于或者等于第一速度时,表示终端设备同时对安装包以及编译文件进行下载,会出现异常的情况,因此终端设备可以发送用于获取安装包以及配置文件的第二下载请求,由于配置文件的大小通常小于编译文件的大小,因此,可以避免出现异常的情况。另外,还根据配置文件,对所有热点代码行编译,并将编译后得到的编译文件进行存储,从而方便该应用在后续运行时,能有效提升运行速度。In some embodiments, the application installation method may further include: if the network speed is less than or equal to the first speed, sending a second download request to the server, where the second download request is used to obtain at least the installation package and configuration file of the application; and receiving; The installation package and configuration file returned by the server; determine all the hot codes of the application according to the configuration file; install the application according to the installed package; compile all the hot codes and store the compiled files obtained after compilation. It is understandable that when the network speed is less than or equal to the first speed, it means that the terminal device downloads the installation package and the compiled file at the same time, and an abnormal situation will occur. Therefore, the terminal device can send the second data used to obtain the installation package and the configuration file. For download requests, because the size of the configuration file is usually smaller than the size of the compiled file, exceptions can be avoided. In addition, according to the configuration file, all hot code lines are compiled, and the compiled files obtained after compilation are stored, so as to facilitate the subsequent operation of the application and effectively improve the running speed.
步骤S340:获取在所述应用的运行过程中运行次数满足设定次数条件的代码,作为新的热点代码。Step S340: Obtain the code whose running times meets the set times condition during the running process of the application as a new hot code.
在本申请实施例中,终端设备还可以在安装完应用后,在后续根据该应用在运行过程中,确定新的热点代码,即当前存储的编译文件中对应的热点代码中不存在的热点代码。其中,新的热点代码满足:运行次数满足设定次数条件的代码,也就是说,可以将运行次数满足设定次数条件的代码,并且此前不存在的热点代码作为热点代码。In the embodiment of this application, the terminal device can also determine the new hotspot code after the application is installed, according to the running process of the application, that is, the hotspot code that does not exist in the corresponding hotspot code in the currently stored compiled file . Among them, the new hot code satisfies: the code whose running times meets the set times condition, that is, the code whose running times meets the set times condition, and the hot code that does not exist before can be used as the hot code.
步骤S350:对所述新的热点代码进行编译,并将编译后的编译文件进行存储。Step S350: Compile the new hot code, and store the compiled compiled file.
在本申请实施例中,终端设备在搜集到新的热点代码之后,则可以对新的热点代码进行编译。其中,终端设备可以在处于休眠模式或低功耗模式时,对新的热点代码进行编译。例如,终端设备可以在空闲状态且处于充电状态时,对新的热点代码进行编译。In the embodiment of the present application, after the terminal device collects the new hot code, it can compile the new hot code. Among them, the terminal device can compile the new hotspot code when it is in a sleep mode or a low power consumption mode. For example, the terminal device can compile the new hotspot code when it is in an idle state and in a charging state.
步骤S360:将所述新的热点代码对应的编译文件发送至所述服务器,所述服务器用于对所述应用的热点代码以及热点代码对应的编译文件进行更新。Step S360: Send the compiled file corresponding to the new hotspot code to the server, where the server is used to update the hotspot code of the application and the compiled file corresponding to the hotspot code.
在本申请实施例中,终端设备还可以将新的热点代码对应的编译文件发送至服务器,以便服务器对新的热点代码的编译文件进行搜集。需要说明的是,该服务器可以为供终端设备下载安装包的服务器,例如软件商城对应的服务器,也可以为专门用于搜集热点代码的编译文件的服务器,在此不做限定。In the embodiment of the present application, the terminal device may also send the compiled file corresponding to the new hot code to the server, so that the server can collect the compiled file of the new hot code. It should be noted that the server can be a server for terminal devices to download the installation package, such as a server corresponding to a software mall, or a server specifically used to collect compiled files of hotspot codes, which is not limited here.
本申请实施例提供的应用安装方法,通过当终端设备的状态满足预设条件时,向服务器发送携带有设备信息和应用的应用信息的第一下载请求,从而可以接收到服务器返回的安装包和编译文件,并且可以保证下载效率。然后根据安装包对应用进行安装,并对编译文件进行存储,因此终端设备在运行热点代码时可以直接运行编译文件中的机器代码,提升应用的运行效率。由于安装时即存储了编译文件,从而使得终端设备在首次运行时即可使用编译文件,而提升了首次运行的运行速度,也避免了终端设备在安装应用时对热点代码进行编译,而造成安装时长较长的问题。另外,对新的热点代码进行编译,可以搜集新的热点代码的编译文件,进一步提升应用的运行效率。The application installation method provided by the embodiments of the present application sends a first download request carrying device information and application information of the application to the server when the state of the terminal device meets a preset condition, so that the installation package and the application information returned by the server can be received. Compile files, and can ensure download efficiency. Then the application is installed according to the installation package, and the compiled file is stored, so the terminal device can directly run the machine code in the compiled file when running the hot code, which improves the running efficiency of the application. Since the compiled files are stored during installation, the compiled files can be used by the terminal device when it is first run, which improves the running speed of the first run and avoids the terminal device from compiling hot codes when installing applications, causing installation Longer issues. In addition, by compiling the new hot code, the compiled files of the new hot code can be collected to further improve the operating efficiency of the application.
请参阅图6,图6示出了本申请再一个实施例提供的应用安装方法的流程示意图。该应用安装方法可以应用于上述应用安装系统中的服务器,下面将针对图6所示的流程进行详细的阐述,所述应用安装方法具体可以包括以下步骤:Please refer to FIG. 6, which shows a schematic flowchart of an application installation method provided by still another embodiment of the present application. The application installation method can be applied to the server in the above-mentioned application installation system. The process shown in FIG. 6 will be described in detail below. The application installation method may specifically include the following steps:
步骤S410:接收终端设备发送的用于下载应用的下载请求。Step S410: Receive a download request for downloading an application sent by a terminal device.
步骤S420:获取与所述下载请求对应的编译文件,所述编译文件为对所述应用的热点代码进行编译后得到的代码文件。Step S420: Obtain a compiled file corresponding to the download request, where the compiled file is a code file obtained after compiling the hot code of the application.
步骤S430:将所述应用的安装包以及所述编译文件发送至所述终端设备,所述安装包用于所述终端设备对所述应用进行安装,所述编译文件用于所述终端设备运行所述热点代码时直接运行所述编译文件。Step S430: Send the installation package of the application and the compiled file to the terminal device, the installation package is used for the terminal device to install the application, and the compiled file is used for the terminal device to run When the hotspot code is used, the compiled file is directly run.
本申请实施例提供的应用安装方法,服务器可以根据接收到的下载请求,向终端设备返回应用的安装包的同时,返回对应用的热点代码进行编译后得到的代码文件, 安装包用于终端设备对应用进行安装,编译文件可以用于终端设备运行所述热点代码时直接运行,从而可以使终端设备在首次运行时即可使用编译文件,而提升了首次运行的运行速度,也避免了终端设备在安装应用时对热点代码进行编译,而造成安装时长较长的问题。According to the application installation method provided by the embodiment of the application, the server can return the application installation package to the terminal device according to the received download request, and at the same time return the code file obtained by compiling the hot code of the application, and the installation package is used for the terminal device Install the application, and the compiled file can be used to run directly when the terminal device runs the hot code, so that the terminal device can use the compiled file when it runs for the first time, which improves the running speed of the first run and avoids the terminal device. The hot code is compiled when the application is installed, which causes the problem of a long installation time.
请参阅图7,图7示出了本申请又另一个实施例提供的应用安装方法的流程示意图。该应用安装方法可以应用于上述应用安装系统中的服务器,下面将针对图7所示的流程进行详细的阐述,所述应用安装方法具体可以包括以下步骤:Please refer to FIG. 7, which shows a schematic flowchart of an application installation method according to yet another embodiment of the present application. The application installation method can be applied to the server in the above-mentioned application installation system. The process shown in FIG. 7 will be described in detail below. The application installation method may specifically include the following steps:
步骤S510:接收终端设备发送的用于下载应用的下载请求,所述下载请求携带有所述终端设备的设备信息以及所述应用的应用信息。Step S510: Receive a download request for downloading an application sent by a terminal device, where the download request carries the device information of the terminal device and the application information of the application.
在本申请实施例中,服务器可以预先对该应用的编译文件进行搜集和整合,并将该应用的编译文件与终端设备的设备信息以及应用的应用信息进行关联后存储。因此,服务器可以获取多个终端发送的应用的编译文件,与编译文件对应的设备信息以及应用信息;将编译文件,与编译文件对应的设备信息以及应用信息进行关联后并存储。In the embodiment of the present application, the server may collect and integrate the compiled file of the application in advance, and store the compiled file of the application in association with the device information of the terminal device and the application information of the application. Therefore, the server can obtain compiled files of applications sent by multiple terminals, device information and application information corresponding to the compiled files; associate the compiled files, device information and application information corresponding to the compiled files, and store them.
在一些实施方式中,服务器还可以对搜集的编译文件进行处理,当服务器中存储的编译文件为版本落后的应用对应的编译文件,可以将其删除,以节省存储空间In some embodiments, the server may also process the compiled files collected. When the compiled files stored in the server are compiled files corresponding to applications with outdated versions, they may be deleted to save storage space.
步骤S520:获取与所述设备信息以及所述应用信息对应的编译文件,所述编译文件为对所述应用的热点代码进行编译后得到的代码文件。Step S520: Obtain a compiled file corresponding to the device information and the application information, where the compiled file is a code file obtained by compiling the hot code of the application.
在本申请实施例中,当服务器的本地存储有应用的编译文件时,则可以直接从本地读取与设备信息以及应用信息对应的编译文件。当编译文件存储于云服务器时,服务器可以根据下载请求,向云服务器发送文件获取请求,该文件获取请求用于获取编译文件,然后接收云服务器返回的编译文件,从而获得到与设备信息以及应用信息对应的编译文件。In the embodiment of the present application, when the compiled file of the application is stored locally on the server, the compiled file corresponding to the device information and the application information can be directly read locally. When the compiled file is stored in the cloud server, the server can send a file acquisition request to the cloud server according to the download request. The file acquisition request is used to acquire the compiled file, and then receives the compiled file returned by the cloud server, so as to obtain information about the device and the application. The compiled file corresponding to the information.
步骤S530:根据所述网络速度,确定与所述网络速度对应的代码文件数量。Step S530: Determine the number of code files corresponding to the network speed according to the network speed.
步骤S540:从所述编译文件中获取所述代码文件数量的编译文件。Step S540: Obtain the compiled files of the number of code files from the compiled files.
步骤S550:将所述应用的安装包以及所述代码文件数量的编译文件发送至所述终端设备,所述安装包用于所述终端设备对所述应用进行安装,所述编译文件用于所述终端设备运行所述热点代码时直接运行所述编译文件。Step S550: Send the installation package of the application and the compiled files of the number of code files to the terminal device, where the installation package is used by the terminal device to install the application, and the compiled file is used for all When the terminal device runs the hotspot code, the compiled file is directly run.
在本申请实施例中,上述下载请求中还可以携带有网络速度。服务器向终端设备返回安装包以及编译文件时,可以根据网络速度确定返回的编译文件中代码文件的数量,以使代码文件的数量能与网络速度对应,其中,代码文件的数量可以与网络速度呈正相关,以避免编译文件中代码数量过多时,造成下载时间过长。In the embodiment of the present application, the above download request may also carry the network speed. When the server returns the installation package and the compiled file to the terminal device, it can determine the number of code files in the returned compiled file according to the network speed, so that the number of code files can correspond to the network speed, where the number of code files can be positive with the network speed Relevant to avoid excessive download time when the amount of code in the compiled file is too large.
本申请实施例提供的应用安装方法,通过接收携带有设备信息和应用的应用信息的下载请求,然后获取与设备信息以及应用信息对应的编译文件,再根据网络速度,从编译文件中获取代码文件数量的编译文件,然后将应用的安装包以及该代码文件数量的编译文件发送至终端设备,从而可以使终端设备在首次运行时即可使用编译文件,而提升了首次运行的运行速度,也避免了终端设备在安装应用时对热点代码进行编译,而造成安装时长较长的问题。The application installation method provided by the embodiment of the application receives a download request carrying device information and application information of the application, and then obtains a compiled file corresponding to the device information and application information, and then obtains a code file from the compiled file according to the network speed The number of compiled files, and then the application installation package and the number of compiled files of the code file are sent to the terminal device, so that the terminal device can use the compiled file when it runs for the first time, which improves the running speed of the first run and avoids Therefore, the terminal device compiles the hot code when installing the application, which causes the problem of a long installation time.
请参阅图8,其示出了本申请一个实施例提供的一种应用安装装置400的结构框图。该应用安装装置400可以应用于上述应用安装系统中的终端设备,该应用安装装置400包括:请求发送模块410、文件接收模块420以及安装执行模块430。其中,所述请求发送模块410用于发送下载请求至服务器,所述下载请求至少携带有所述终端设备的设备信息以及应用的应用信息;所述文件接收模块420用于接收所述服务器根据所述下载请求返回的安装包以及编译文件,所述编译文件为对所述应用的热点代码进行编译后得到的代码文件,所述编译文件与所述设备信息以及所述应用信息对应;所述安装执行模块430用于根据所述安装包对所述应用进行安装,并将所述编译文件进行存储,所述编译文件用于所述终端设备运行所述热点代码时直接运行所述编译文 件。Please refer to FIG. 8, which shows a structural block diagram of an application installation apparatus 400 provided by an embodiment of the present application. The application installation apparatus 400 can be applied to the terminal equipment in the above-mentioned application installation system. The application installation apparatus 400 includes a request sending module 410, a file receiving module 420, and an installation execution module 430. Wherein, the request sending module 410 is used to send a download request to the server, and the download request carries at least the device information of the terminal device and the application information of the application; the file receiving module 420 is used to receive The installation package and the compiled file returned by the download request, the compiled file is a code file obtained after the hot code of the application is compiled, and the compiled file corresponds to the device information and the application information; the installation The execution module 430 is configured to install the application according to the installation package and store the compiled file. The compiled file is used to directly run the compiled file when the terminal device runs the hotspot code.
在一些实施方式中,该应用安装装置400还可以包括:文件校验模块。文件校验模块用于在所述编译文件进行存储之前,对所述编译文件进行校验。安装执行模块430可以具体用于:当校验结果表征所述编译文件满足存储条件时,将所述编译文件存储到指定文件目录中。In some embodiments, the application installation device 400 may further include: a file verification module. The file verification module is used for verifying the compiled file before storing the compiled file. The installation execution module 430 may be specifically configured to store the compiled file in a designated file directory when the verification result indicates that the compiled file meets the storage condition.
在一些实施方式中,所述编译文件与所述终端设备的设备信息以及应用的应用信息对应。请求发送模块410可以具体用于:根据所述设备信息以及应用信息,生成下载请求并将所述下载请求发送至服务器,所述下载请求携带有所述设备信息以及所述应用信息。In some embodiments, the compiled file corresponds to the device information of the terminal device and the application information of the application. The request sending module 410 may be specifically configured to generate a download request according to the device information and application information and send the download request to the server, the download request carrying the device information and the application information.
在一些实施方式中,请求发送模块410可以具体用于:当所述终端设备的状态满足预设条件时,发送第一下载请求至服务器,所述第一下载请求用于至少获取所述应用的安装包以及编译文件。In some implementation manners, the request sending module 410 may be specifically configured to send a first download request to the server when the state of the terminal device satisfies a preset condition, and the first download request is used to obtain at least the information of the application. Installation package and compiled files.
在该实施方式下,所述预设条件包括以下条件中的至少一种:所述终端设备连接的网络的网络速度大于第一速度;所述终端设备连接的网络的网络类型为指定类型;当前时间处于预设时间段。In this embodiment, the preset condition includes at least one of the following conditions: the network speed of the network to which the terminal device is connected is greater than the first speed; the network type of the network to which the terminal device is connected is a specified type; currently The time is in the preset time period.
在一些实施方式中,该应用安装装置400还包括:代码获取模块以及代码编译模块。代码获取模块用于获取在所述应用的运行过程中运行次数满足设定次数条件的代码,作为新的热点代码;代码编译模块用于对所述新的热点代码进行编译,并将编译后的编译文件进行存储。In some embodiments, the application installation device 400 further includes: a code acquisition module and a code compilation module. The code acquisition module is used to acquire the code whose running times meet the set times condition during the running process of the application as the new hot code; the code compilation module is used to compile the new hot code and compile the compiled code. Compile the file for storage.
进一步的,该应用安装装置400还可以包括:文件发送模块。文件发送模块用于将所述新的热点代码对应的编译文件发送至所述服务器,所述服务器用于对所述应用的热点代码以及热点代码对应的编译文件进行更新。Further, the application installation device 400 may further include: a file sending module. The file sending module is used for sending the compiled file corresponding to the new hotspot code to the server, and the server is used for updating the hotspot code of the application and the compiled file corresponding to the hotspot code.
请参阅图9,其示出了本申请另一实施例提供的一种应用安装装置500的结构框图。该应用安装装置500可以应用于上述应用安装系统中的终端设备,该应用安装装置500包括:请求接收模块510、文件获取模块520以及文件发送模块530。其中,所述请求接收模块510用于接收终端设备发送的用于下载应用的下载请求;所述文件获取模块520用于获取与所述下载请求对应的编译文件,所述编译文件为对所述应用的热点代码进行编译后得到的代码文件;所述文件发送模块530用于将所述应用的安装包以及所述编译文件发送至所述终端设备,所述安装包用于所述终端设备对所述应用进行安装,所述编译文件用于所述终端设备运行所述热点代码时直接运行所述编译文件。Please refer to FIG. 9, which shows a structural block diagram of an application installation apparatus 500 provided by another embodiment of the present application. The application installation apparatus 500 may be applied to the terminal equipment in the above-mentioned application installation system. The application installation apparatus 500 includes a request receiving module 510, a file obtaining module 520, and a file sending module 530. Wherein, the request receiving module 510 is configured to receive a download request for downloading an application sent by a terminal device; the file obtaining module 520 is configured to obtain a compiled file corresponding to the download request, and the compiled file is a response to the The code file obtained by compiling the hot code of the application; the file sending module 530 is configured to send the installation package of the application and the compiled file to the terminal device, and the installation package is used by the terminal device to pair The application is installed, and the compiled file is used to directly run the compiled file when the terminal device runs the hotspot code.
在一些实施方式中,所述下载请求携带有所述终端设备的设备信息以及所述应用的应用信息。文件获取模块520可以具体用于:获取与所述设备信息以及所述应用信息对应的编译文件。In some embodiments, the download request carries device information of the terminal device and application information of the application. The file obtaining module 520 may be specifically configured to obtain a compiled file corresponding to the device information and the application information.
在一些实施方式中,文件获取模块520也可以具体用于:根据所述下载请求,向云服务器发送文件获取请求,所述文件获取请求用于获取所述编译文件;接收所述云服务器返回的所述编译文件。In some implementation manners, the file acquisition module 520 may also be specifically configured to: send a file acquisition request to a cloud server according to the download request, the file acquisition request is used to acquire the compiled file; The compiled file.
在一些实施方式中,所述下载请求还携带有网络速度。文件发送模块530可以包括:数量确定单元、文件筛选单元以及发送执行单元。数量确定单元用于根据所述网络速度,确定与所述网络速度对应的代码文件数量;文件筛选单元用于从所述编译文件中获取所述代码文件数量的编译文件;发送执行单元用于将所述应用的安装包以及所述代码文件数量的编译文件发送至所述终端设备。In some embodiments, the download request also carries network speed. The file sending module 530 may include: a quantity determining unit, a file screening unit, and a sending execution unit. The number determining unit is used to determine the number of code files corresponding to the network speed according to the network speed; the file screening unit is used to obtain the compiled files of the number of code files from the compiled files; the sending execution unit is used to transfer The installation package of the application and the compiled files of the number of code files are sent to the terminal device.
在一些实施方式中,该应用安装装置500还可以包括信息获取模块以及信息存储模块。信息获取模块用于获取多个终端发送的所述应用的编译文件,与所述编译文件对应的设备信息以及应用信息;信息存储模块用于将所述编译文件,与所述编译文件对应的设备信息以及应用信息进行存储。In some embodiments, the application installation device 500 may further include an information acquisition module and an information storage module. The information obtaining module is used to obtain compiled files of the application sent by multiple terminals, device information corresponding to the compiled files, and application information; the information storage module is used to convert the compiled files to the devices corresponding to the compiled files Information and application information are stored.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述装置和模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and conciseness of the description, the specific working process of the device and module described above can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here.
在本申请所提供的几个实施例中,模块相互之间的耦合可以是电性,机械或其它形式的耦合。In the several embodiments provided in this application, the coupling between the modules may be electrical, mechanical or other forms of coupling.
另外,在本申请各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。In addition, the functional modules in the various embodiments of the present application may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware or software functional modules.
本申请实施例还提供了一种应用安装系统,该应用安装系统包括终端设备以及服务器。终端设备与所述服务器通信连接,例如,请再次参阅图1,服务器可以为第一服务器200。其中,所述终端设备用于发送用于下载应用的下载请求至所述服务器;所述服务器用于接收所述下载请求,获取与所述下载请求对应的编译文件,并将所述应用的安装包以及所述编译文件发送至所述终端设备,所述编译文件为对所述应用的热点代码进行编译后得到的代码文件;所述终端设备还用于接收所述服务器返回的所述安装包以及所述编译文件,根据所述安装包对所述应用进行安装,并将所述编译文件进行存储,所述编译文件用于所述终端设备运行所述热点代码时直接运行所述编译文件。The embodiment of the present application also provides an application installation system. The application installation system includes a terminal device and a server. The terminal device communicates with the server. For example, referring to FIG. 1 again, the server may be the first server 200. Wherein, the terminal device is used to send a download request for downloading an application to the server; the server is used to receive the download request, obtain a compiled file corresponding to the download request, and install the application The package and the compiled file are sent to the terminal device, the compiled file is a code file obtained by compiling the hot code of the application; the terminal device is also used to receive the installation package returned by the server And the compiled file, install the application according to the installation package, and store the compiled file, and the compiled file is used to directly run the compiled file when the terminal device runs the hotspot code.
综上所述,本申请提供的方案,通过发送用于下载应用的下载请求至服务器,接收服务器根据下载请求返回的安装包以及编译文件,该编译文件为对该应用的热度代码进行编译后得到的代码文件,根据安装包对该应用进行安装,并将编译文件进行存储,该编译文件用于终端设备运行热点代码时直接运行编译文件,从而使得终端设备在首次运行时即可使用编译文件,而提升了首次运行的运行速度。In summary, the solution provided by this application sends a download request for downloading an application to the server, and receives the installation package and compiled file returned by the server according to the download request. The compiled file is obtained after compiling the application’s heat code Install the application according to the installation package, and store the compiled file. The compiled file is used to run the compiled file directly when the terminal device runs the hot code, so that the terminal device can use the compiled file when it runs for the first time. And improve the running speed of the first run.
请参考图10,其示出了本申请实施例提供的一种终端设备的结构框图。该终端设备100可以是智能手机、平板电脑、智能手表等能够运行应用程序的电子设备。本申请中的终端设备100可以包括一个或多个如下部件:处理器110、存储器120、以及一个或多个应用程序,其中一个或多个应用程序可以被存储在存储器120中并被配置为由一个或多个处理器110执行,一个或多个程序配置用于执行如前述方法实施例所描述的方法。Please refer to FIG. 10, which shows a structural block diagram of a terminal device provided by an embodiment of the present application. The terminal device 100 may be an electronic device capable of running application programs, such as a smart phone, a tablet computer, or a smart watch. The terminal device 100 in this application may include one or more of the following components: a processor 110, a memory 120, and one or more application programs, where one or more application programs may be stored in the memory 120 and configured to be configured by One or more processors 110 execute, and one or more programs are configured to execute the methods described in the foregoing method embodiments.
处理器110可以包括一个或者多个处理核。处理器110利用各种接口和线路连接整个终端设备100内的各个部分,通过运行或执行存储在存储器120内的指令、程序、代码集或指令集,以及调用存储在存储器120内的数据,执行终端设备100的各种功能和处理数据。可选地,处理器110可以采用数字信号处理(Digital Signal Processing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable Logic Array,PLA)中的至少一种硬件形式来实现。处理器110可集成中央处理器(Central Processing Unit,CPU)、图像处理器(Graphics Processing Unit,GPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作系统、用户界面和应用程序等;GPU用于负责显示内容的渲染和绘制;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器110中,单独通过一块通信芯片进行实现。The processor 110 may include one or more processing cores. The processor 110 uses various interfaces and lines to connect various parts of the entire terminal device 100, and executes by running or executing instructions, programs, code sets, or instruction sets stored in the memory 120, and calling data stored in the memory 120. Various functions and processing data of the terminal device 100. Optionally, the processor 110 may use at least one of digital signal processing (Digital Signal Processing, DSP), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), and Programmable Logic Array (Programmable Logic Array, PLA). A kind of hardware form to realize. The processor 110 may be integrated with one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), a modem, and the like. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is used for rendering and drawing of display content; the modem is used for processing wireless communication. It can be understood that the above-mentioned modem may not be integrated into the processor 110, but may be implemented by a communication chip alone.
存储器120可以包括随机存储器(Random Access Memory,RAM),也可以包括只读存储器(Read-Only Memory)。存储器120可用于存储指令、程序、代码、代码集或指令集。存储器120可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作系统的指令、用于实现至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现下述各个方法实施例的指令等。存储数据区还可以存储终端100在使用中所创建的数据(比如电话本、音视频数据、聊天记录数据)等。The memory 120 may include random access memory (RAM) or read-only memory (Read-Only Memory). The memory 120 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 120 may include a program storage area and a data storage area, where the program storage area may store instructions for implementing the operating system and instructions for implementing at least one function (such as touch function, sound playback function, image playback function, etc.) , Instructions used to implement the following various method embodiments, etc. The data storage area can also store data (such as phone book, audio and video data, chat record data) created by the terminal 100 during use.
请参考图11,其示出了本申请实施例提供的一种服务器的结构框图。该服务器600可以是传统服务器、云服务器等。本申请中的服务器600可以包括一个或多个如下部 件:处理器610、存储器620、以及一个或多个应用程序,其中一个或多个应用程序可以被存储在存储器620中并被配置为由一个或多个处理器610执行,一个或多个程序配置用于执行如前述方法实施例所描述的方法。Please refer to FIG. 11, which shows a structural block diagram of a server provided by an embodiment of the present application. The server 600 may be a traditional server, a cloud server, or the like. The server 600 in this application may include one or more of the following components: a processor 610, a memory 620, and one or more application programs, where one or more application programs may be stored in the memory 620 and configured to be operated by one Or multiple processors 610 execute, and one or more programs are configured to execute the method described in the foregoing method embodiment.
处理器610可以包括一个或者多个处理核。处理器610利用各种接口和线路连接整个服务器600内的各个部分,通过运行或执行存储在存储器620内的指令、程序、代码集或指令集,以及调用存储在存储器620内的数据,执行服务器600的各种功能和处理数据。可选地,处理器610可以采用数字信号处理(Digital Signal Processing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable Logic Array,PLA)中的至少一种硬件形式来实现。处理器610可集成中央处理器(Central Processing Unit,CPU)、图像处理器(Graphics Processing Unit,GPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作系统、用户界面和应用程序等;GPU用于负责显示内容的渲染和绘制;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器610中,单独通过一块通信芯片进行实现。The processor 610 may include one or more processing cores. The processor 610 uses various interfaces and lines to connect various parts of the entire server 600, and executes the server by running or executing instructions, programs, code sets, or instruction sets stored in the memory 620, and calling data stored in the memory 620. 600's various functions and processing data. Optionally, the processor 610 may adopt at least one of digital signal processing (Digital Signal Processing, DSP), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), and Programmable Logic Array (Programmable Logic Array, PLA). A kind of hardware form to realize. The processor 610 may integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), a modem, and the like. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is used for rendering and drawing of display content; the modem is used for processing wireless communication. It can be understood that the above-mentioned modem may not be integrated into the processor 610, but may be implemented by a communication chip alone.
存储器620可以包括随机存储器(Random Access Memory,RAM),也可以包括只读存储器(Read-Only Memory)。存储器620可用于存储指令、程序、代码、代码集或指令集。存储器620可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作系统的指令、用于实现至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现下述各个方法实施例的指令等。存储数据区还可以存储服务器600在使用中所创建的数据等。The memory 620 may include random access memory (RAM) or read-only memory (Read-Only Memory). The memory 620 may be used to store instructions, programs, codes, code sets, or instruction sets. The memory 620 may include a storage program area and a storage data area, where the storage program area may store instructions for implementing the operating system and instructions for implementing at least one function (such as touch function, sound playback function, image playback function, etc.) , Instructions used to implement the following various method embodiments, etc. The data storage area can also store data created by the server 600 in use, and the like.
请参考图12,其示出了本申请实施例提供的一种计算机可读存储介质的结构框图。该计算机可读介质800中存储有程序代码,所述程序代码可被处理器调用执行上述方法实施例中所描述的方法。Please refer to FIG. 12, which shows a structural block diagram of a computer-readable storage medium provided by an embodiment of the present application. The computer-readable medium 800 stores program code, and the program code can be invoked by a processor to execute the method described in the foregoing method embodiment.
计算机可读存储介质800可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。可选地,计算机可读存储介质800包括非易失性计算机可读介质(non-transitory computer-readable storage medium)。计算机可读存储介质800具有执行上述方法中的任何方法步骤的程序代码810的存储空间。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。程序代码810可以例如以适当形式进行压缩。The computer-readable storage medium 800 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk, or ROM. Optionally, the computer-readable storage medium 800 includes a non-transitory computer-readable storage medium. The computer-readable storage medium 800 has storage space for the program code 810 for executing any method steps in the above-mentioned methods. These program codes can be read from or written into one or more computer program products. The program code 810 may be compressed in a suitable form, for example.
最后应说明的是:以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不驱使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the application, not to limit them; although the application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: The technical solutions recorded in the foregoing embodiments are modified, or some of the technical features thereof are equivalently replaced; these modifications or replacements do not drive the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims (20)

  1. 一种应用安装方法,其特征在于,应用于终端设备,所述方法包括:An application installation method, characterized in that it is applied to a terminal device, and the method includes:
    发送用于下载应用的下载请求至服务器;Send a download request for downloading the application to the server;
    接收所述服务器根据所述下载请求返回的安装包以及编译文件,所述编译文件为对所述应用的热点代码进行编译后得到的代码文件;Receiving an installation package and a compiled file returned by the server according to the download request, where the compiled file is a code file obtained by compiling the hot code of the application;
    根据所述安装包对所述应用进行安装,并将所述编译文件进行存储,所述编译文件用于所述终端设备运行所述热点代码时直接运行所述编译文件。The application is installed according to the installation package, and the compiled file is stored, and the compiled file is used to directly run the compiled file when the terminal device runs the hotspot code.
  2. 根据权利要求1所述的方法,其特征在于,在所述编译文件进行存储之前,所述方法还包括:The method according to claim 1, characterized in that, before storing the compiled file, the method further comprises:
    对所述编译文件进行校验;Verifying the compiled file;
    所述将所述编译文件进行存储,包括:The storing the compiled file includes:
    当校验结果表征所述编译文件满足存储条件时,将所述编译文件存储到指定文件目录中。When the verification result indicates that the compiled file meets the storage condition, the compiled file is stored in a designated file directory.
  3. 根据权利要求1或2所述的方法,其特征在于,所述编译文件与所述终端设备的设备信息以及应用的应用信息对应;The method according to claim 1 or 2, wherein the compiled file corresponds to device information of the terminal device and application information of an application;
    所述发送用于下载应用的下载请求至服务器,包括:The sending a download request for downloading an application to a server includes:
    根据所述设备信息以及应用信息,生成下载请求并将所述下载请求发送至服务器,所述下载请求携带有所述设备信息以及所述应用信息。According to the device information and application information, generate a download request and send the download request to a server, the download request carries the device information and the application information.
  4. 根据权利要求1-3任一项所述的方法,其特征在于,所述发送下载请求至服务器,包括:The method according to any one of claims 1-3, wherein the sending a download request to a server comprises:
    当所述终端设备的状态满足预设条件时,发送第一下载请求至服务器,所述第一下载请求用于至少获取所述应用的安装包以及编译文件。When the state of the terminal device satisfies a preset condition, a first download request is sent to the server, where the first download request is used to obtain at least an installation package and a compiled file of the application.
  5. 根据权利要求4所述的方法,其特征在于,所述预设条件包括以下条件中的至少一种:The method according to claim 4, wherein the preset condition includes at least one of the following conditions:
    所述终端设备连接的网络的网络速度大于第一速度;The network speed of the network to which the terminal device is connected is greater than the first speed;
    所述终端设备连接的网络的网络类型为指定类型;The network type of the network to which the terminal device is connected is a specified type;
    当前时间处于预设时间段。The current time is in the preset time period.
  6. 根据权利要求5所述的方法,其特征在于,当所述预设条件为所述网络速度大于第一速度时,所述下载请求中携带有网络速度;The method according to claim 5, wherein when the preset condition is that the network speed is greater than a first speed, the download request carries the network speed;
    所述接收所述服务器根据所述下载请求返回的安装包以及编译文件,包括:The receiving the installation package and the compiled file returned by the server according to the download request includes:
    接收所述服务器根据所述下载请求返回的安装包以及接收所述服务器根据所述网络速度返回的编译文件,所述编译文件中代码文件的数量与所述网络速度呈正相关。Receiving the installation package returned by the server according to the download request and receiving the compiled file returned by the server according to the network speed, where the number of code files in the compiled file is positively correlated with the network speed.
  7. 根据权利要求6所述的方法,其特征在于,所述方法还包括:The method according to claim 6, wherein the method further comprises:
    确定所述应用的所有热点代码对应的数量;Determine the number corresponding to all hot codes of the application;
    如果所述编译文件中的代码文件的数量小于所述所有热点代码对应的数量,则根据所述编译文件中的代码文件对应的热点代码,确定所有热点代码中未被编译的热点代码,作为第一热点代码;If the number of code files in the compiled file is less than the number corresponding to all the hotspot codes, then according to the hotspot codes corresponding to the code files in the compiled files, determine the uncompiled hotspot codes in all hotspot codes as the A hot code;
    在所述终端设备的设备状态满足指定状态时,获取所述第一热点代码对应的编译文件,并将所述第一热点代码对应的热点文件进行存储。When the device state of the terminal device satisfies a specified state, the compiled file corresponding to the first hot spot code is acquired, and the hot spot file corresponding to the first hot spot code is stored.
  8. 根据权利要求1-7任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1-7, wherein the method further comprises:
    获取在所述应用的运行过程中运行次数满足设定次数条件的代码,作为新的热点代码;Acquiring the code whose running times meets the set times condition during the running process of the application as a new hot code;
    对所述新的热点代码进行编译,并将编译后的编译文件进行存储。The new hot code is compiled, and the compiled file after the compilation is stored.
  9. 根据权利要求8所述的方法,其特征在于,所述方法还包括:The method according to claim 8, wherein the method further comprises:
    将所述新的热点代码对应的编译文件发送至所述服务器,所述服务器用于对所述应用的热点代码以及热点代码对应的编译文件进行更新。The compiled file corresponding to the new hotspot code is sent to the server, and the server is used to update the hotspot code of the application and the compiled file corresponding to the hotspot code.
  10. 一种应用安装方法,其特征在于,应用于服务器,所述方法包括:An application installation method, characterized in that it is applied to a server, and the method includes:
    接收终端设备发送的用于下载应用的下载请求;Receiving a download request for downloading an application sent by a terminal device;
    获取与所述下载请求对应的编译文件,所述编译文件为对所述应用的热点代码进行编译后得到的代码文件;Obtaining a compiled file corresponding to the download request, where the compiled file is a code file obtained after compiling the hot code of the application;
    将所述应用的安装包以及所述编译文件发送至所述终端设备,所述安装包用于所述终端设备对所述应用进行安装,所述编译文件用于所述终端设备运行所述热点代码时直接运行所述编译文件。The installation package of the application and the compiled file are sent to the terminal device, the installation package is used by the terminal device to install the application, and the compiled file is used by the terminal device to run the hotspot Run the compiled file directly when you code.
  11. 根据权利要求10所述的方法,其特征在于,所述下载请求携带有所述终端设备的设备信息以及所述应用的应用信息,所述获取与所述下载请求对应的编译文件,包括:The method according to claim 10, wherein the download request carries device information of the terminal device and application information of the application, and the obtaining a compiled file corresponding to the download request comprises:
    获取与所述设备信息以及所述应用信息对应的编译文件。Obtain a compiled file corresponding to the device information and the application information.
  12. 根据权利要求10或11所述的方法,其特征在于,所述获取与所述下载请求对应的编译文件,包括:The method according to claim 10 or 11, wherein the obtaining a compiled file corresponding to the download request comprises:
    根据所述下载请求,向云服务器发送文件获取请求,所述文件获取请求用于获取所述编译文件;Sending a file acquisition request to a cloud server according to the download request, where the file acquisition request is used to acquire the compiled file;
    接收所述云服务器返回的所述编译文件。Receiving the compiled file returned by the cloud server.
  13. 根据权利要求10-12任一项所述的方法,其特征在于,所述下载请求还携带有网络速度,所述将所述应用的安装包以及所述编译文件发送至所述终端设备,包括:The method according to any one of claims 10-12, wherein the download request also carries network speed, and the sending the installation package of the application and the compiled file to the terminal device includes :
    根据所述网络速度,确定与所述网络速度对应的代码文件数量;Determine the number of code files corresponding to the network speed according to the network speed;
    从所述编译文件中获取所述代码文件数量的编译文件;Obtaining the compiled files of the number of code files from the compiled files;
    将所述应用的安装包以及所述代码文件数量的编译文件发送至所述终端设备。Sending the installation package of the application and the compiled files of the number of code files to the terminal device.
  14. 根据权利要求10-13任一项所述的方法,其特征在于,在所述接收终端设备发送的下载请求之前,所述方法还包括:The method according to any one of claims 10-13, wherein before the receiving the download request sent by the terminal device, the method further comprises:
    获取多个终端发送的所述应用的编译文件,与所述编译文件对应的设备信息以及应用信息;Acquiring compiled files of the application sent by multiple terminals, device information and application information corresponding to the compiled files;
    将所述编译文件,与所述编译文件对应的设备信息以及应用信息进行存储。Store the compiled file, device information and application information corresponding to the compiled file.
  15. 一种应用安装装置,其特征在于,应用于终端设备,所述装置包括:请求发送模块、文件接收模块以及安装执行模块,其中,An application installation device, characterized in that it is applied to a terminal device, the device includes: a request sending module, a file receiving module, and an installation execution module, wherein:
    所述请求发送模块用于发送下载请求至服务器,所述下载请求至少携带有所述终端设备的设备信息以及应用的应用信息;The request sending module is configured to send a download request to a server, and the download request carries at least the device information of the terminal device and the application information of the application;
    所述文件接收模块用于接收所述服务器根据所述下载请求返回的安装包以及编译文件,所述编译文件为对所述应用的热点代码进行编译后得到的代码文件,所述编译文件与所述设备信息以及所述应用信息对应;The file receiving module is configured to receive the installation package and the compiled file returned by the server according to the download request. The compiled file is a code file obtained by compiling the hot code of the application. The device information corresponds to the application information;
    所述安装执行模块用于根据所述安装包对所述应用进行安装,并将所述编译文件进行存储,所述编译文件用于所述终端设备运行所述热点代码时直接运行所述编译文件。The installation execution module is configured to install the application according to the installation package and store the compiled file, which is used to directly run the compiled file when the terminal device runs the hotspot code .
  16. 一种应用安装装置,其特征在于,应用于服务器,所述装置包括:请求接收模块、文件获取模块以及文件发送模块,其中,An application installation device, characterized in that it is applied to a server, the device includes: a request receiving module, a file obtaining module, and a file sending module, wherein:
    所述请求接收模块用于接收终端设备发送的用于下载应用的下载请求;The request receiving module is configured to receive a download request for downloading an application sent by a terminal device;
    所述文件获取模块用于获取与所述下载请求对应的编译文件,所述编译文件为对所述应用的热点代码进行编译后得到的代码文件;The file obtaining module is configured to obtain a compiled file corresponding to the download request, and the compiled file is a code file obtained after compiling the hot code of the application;
    所述文件发送模块用于将所述应用的安装包以及所述编译文件发送至所述终端设备,所述安装包用于所述终端设备对所述应用进行安装,所述编译文件用于所述终端 设备运行所述热点代码时直接运行所述编译文件。The file sending module is configured to send an installation package of the application and the compiled file to the terminal device, the installation package is used by the terminal device to install the application, and the compiled file is used for all When the terminal device runs the hotspot code, the compiled file is directly run.
  17. 一种应用安装系统,其特征在于,所述应用安装系统包括终端设备以及服务器,所述终端设备与所述服务器通信连接,其中,An application installation system, characterized in that the application installation system includes a terminal device and a server, the terminal device is in communication connection with the server, wherein:
    所述终端设备用于发送用于下载应用的下载请求至所述服务器;The terminal device is used to send a download request for downloading an application to the server;
    所述服务器用于接收所述下载请求,获取与所述下载请求对应的编译文件,并将所述应用的安装包以及所述编译文件发送至所述终端设备,所述编译文件为对所述应用的热点代码进行编译后得到的代码文件;The server is configured to receive the download request, obtain a compiled file corresponding to the download request, and send the installation package of the application and the compiled file to the terminal device, where the compiled file is The code file obtained after compiling the hot code of the application;
    所述终端设备还用于接收所述服务器返回的所述安装包以及所述编译文件,根据所述安装包对所述应用进行安装,并将所述编译文件进行存储,所述编译文件用于所述终端设备运行所述热点代码时直接运行所述编译文件。The terminal device is also configured to receive the installation package and the compiled file returned by the server, install the application according to the installation package, and store the compiled file, where the compiled file is used for When the terminal device runs the hotspot code, the compiled file is directly run.
  18. 一种终端设备,其特征在于,包括:A terminal device, characterized in that it comprises:
    一个或多个处理器;One or more processors;
    存储器;Memory
    一个或多个应用程序,其中所述一个或多个应用程序被存储在所述存储器中并被配置为由所述一个或多个处理器执行,所述一个或多个程序配置用于执行如权利要求1-9任一项所述的方法。One or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute such as The method of any one of claims 1-9.
  19. 一种服务器,其特征在于,包括:A server, characterized in that it comprises:
    一个或多个处理器;One or more processors;
    存储器;Memory
    一个或多个应用程序,其中所述一个或多个应用程序被存储在所述存储器中并被配置为由所述一个或多个处理器执行,所述一个或多个程序配置用于执行如权利要求10-14任一项所述的方法。One or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute such as The method of any one of claims 10-14.
  20. 一种计算机可读取存储介质,其特征在于,所述计算机可读取存储介质中存储有程序代码,所述程序代码可被处理器调用执行如权利要求1-9任一项所述的方法、或者执行如权利要求10-14任一项所述的方法。A computer-readable storage medium, wherein the computer-readable storage medium stores program code, and the program code can be called by a processor to execute the method according to any one of claims 1-9 , Or execute the method according to any one of claims 10-14.
PCT/CN2020/133391 2019-12-13 2020-12-02 Application installation method and apparatus, terminal device, server and storage medium WO2021115177A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911285858.6 2019-12-13
CN201911285858.6A CN112988169A (en) 2019-12-13 2019-12-13 Application installation method and device, terminal equipment, server and storage medium

Publications (1)

Publication Number Publication Date
WO2021115177A1 true WO2021115177A1 (en) 2021-06-17

Family

ID=76329515

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/133391 WO2021115177A1 (en) 2019-12-13 2020-12-02 Application installation method and apparatus, terminal device, server and storage medium

Country Status (2)

Country Link
CN (1) CN112988169A (en)
WO (1) WO2021115177A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113377378A (en) * 2021-07-02 2021-09-10 北京百度网讯科技有限公司 Processing method, device and equipment for small program and storage medium
CN115658184A (en) * 2022-12-26 2023-01-31 北京海誉动想科技股份有限公司 Method and device for quickly starting cloud application, storage medium and electronic equipment
WO2024104203A1 (en) * 2022-11-17 2024-05-23 蔚来移动科技有限公司 Method for acquiring configuration file of application and method for installing application

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114157656A (en) * 2021-11-29 2022-03-08 广东明创软件科技有限公司 Application program downloading method, device, server and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030182626A1 (en) * 2002-03-22 2003-09-25 Eran Davidov On-demand creation of MIDlets
CN106294171A (en) * 2016-08-17 2017-01-04 北京奇虎科技有限公司 The test system of product automatic deployment, method and apparatus
CN108292209A (en) * 2016-01-20 2018-07-17 谷歌有限责任公司 The method and apparatus that caching and the application currently compiled are selectively provided
CN109960507A (en) * 2017-12-14 2019-07-02 广东欧珀移动通信有限公司 Compile optimization method, device, storage medium, intelligent terminal and server

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030182626A1 (en) * 2002-03-22 2003-09-25 Eran Davidov On-demand creation of MIDlets
CN108292209A (en) * 2016-01-20 2018-07-17 谷歌有限责任公司 The method and apparatus that caching and the application currently compiled are selectively provided
CN106294171A (en) * 2016-08-17 2017-01-04 北京奇虎科技有限公司 The test system of product automatic deployment, method and apparatus
CN109960507A (en) * 2017-12-14 2019-07-02 广东欧珀移动通信有限公司 Compile optimization method, device, storage medium, intelligent terminal and server

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113377378A (en) * 2021-07-02 2021-09-10 北京百度网讯科技有限公司 Processing method, device and equipment for small program and storage medium
WO2024104203A1 (en) * 2022-11-17 2024-05-23 蔚来移动科技有限公司 Method for acquiring configuration file of application and method for installing application
CN115658184A (en) * 2022-12-26 2023-01-31 北京海誉动想科技股份有限公司 Method and device for quickly starting cloud application, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN112988169A (en) 2021-06-18

Similar Documents

Publication Publication Date Title
WO2021115177A1 (en) Application installation method and apparatus, terminal device, server and storage medium
CN111078318B (en) Processing method, device and system of configuration file and storage medium
US10742694B2 (en) Method for migrating data and terminal
US11853820B2 (en) Cross-process communication method, apparatus, and device
US11556348B2 (en) Bootstrapping profile-guided compilation and verification
WO2019228344A1 (en) Resource configuration method and apparatus, and terminal and storage medium
US20200404046A1 (en) Application Download Method and Apparatus, Application Sending Method and Apparatus, and System
CN112948026A (en) Hotspot code processing method and device, server, electronic equipment and storage medium
WO2020014926A1 (en) Patch package generation method and device
CN111352647A (en) Virtual machine upgrading method, device, equipment and storage medium
WO2018209843A1 (en) Method, device and terminal for executing hotpatch
CN111427596A (en) Software upgrading method and device and terminal equipment
CN110532016B (en) Version management method, version updating method and version management system
WO2021027772A1 (en) Method for switching running of application and device
WO2021135947A1 (en) Hotspot code processing method and apparatus, electronic device and storage medium
CN116643778A (en) Application program optimization method and electronic equipment
CN111090442B (en) Application updating method, device and storage medium
WO2021121188A1 (en) Configuration file processing method, apparatus and system, and storage medium
WO2021102849A1 (en) Resource acquisition method and apparatus, and electronic device
WO2021088686A1 (en) Compiler optimization information generating method and apparatus, and electronic device
CN112540768A (en) File processing method and device, server, electronic equipment and storage medium
CN109298880B (en) Multi-version code generation method and device and electronic device
WO2021223544A1 (en) Application starting method and related device
CN112445487A (en) Dex optimization method, system, intelligent terminal and storage medium
CN111054064A (en) Unity-based mobile phone game bag body optimization method and system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20899480

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20899480

Country of ref document: EP

Kind code of ref document: A1