WO2020077487A1 - Method and related apparatus for optimizing and running android application - Google Patents

Method and related apparatus for optimizing and running android application Download PDF

Info

Publication number
WO2020077487A1
WO2020077487A1 PCT/CN2018/110212 CN2018110212W WO2020077487A1 WO 2020077487 A1 WO2020077487 A1 WO 2020077487A1 CN 2018110212 W CN2018110212 W CN 2018110212W WO 2020077487 A1 WO2020077487 A1 WO 2020077487A1
Authority
WO
WIPO (PCT)
Prior art keywords
file
target
apk
optimized
android application
Prior art date
Application number
PCT/CN2018/110212
Other languages
French (fr)
Chinese (zh)
Inventor
程帅
王刚
陈辉
张魁
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2018/110212 priority Critical patent/WO2020077487A1/en
Priority to CN201880079787.1A priority patent/CN111492345A/en
Publication of WO2020077487A1 publication Critical patent/WO2020077487A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating

Definitions

  • This application relates to the field of application programs, and more specifically, to a method of optimizing an Android application (APP), a device for running an Android application, a server, a terminal device, and a computer-readable storage medium.
  • APP Android application
  • Android applications mainly include: developers submit Android installation packages (Android packages) of applications to the application market; users download APKs of Android applications from the application market through terminal devices.
  • the terminal device downloads the APK of the Android application, it can optimize the Android application when installing the Android application or running the Android application.
  • an Android virtual machine (Dalvik or ART) is installed on the terminal device, when the Android virtual machine starts running or installs Android applications, it will pass just-in-time (JIT) or ahead (ahead- of-time (AOT) and other technologies compile and convert the bytecode in the * .dex file in the APK of the Android application into machine code that can be quickly executed directly in the central processing unit (CPU) of the terminal device .
  • JIT just-in-time
  • AOT ahead- of-time
  • other technologies compile and convert the bytecode in the * .dex file in the APK of the Android application into machine code that can be quickly executed directly in the central processing unit (CPU) of the terminal device .
  • This application provides a method for optimizing an Android application, a method for running an Android application, a server, a terminal device, a computer-readable storage medium, a computer program product, and a chip system, which can reduce the operating burden of the terminal device, thereby improving the user experience.
  • a method for optimizing Android applications includes: the server optimizes the file to be optimized in the source APK of the Android application to obtain the target optimized file corresponding to the file to be optimized; the server sends the target APK of the Android application to the terminal device, and the target APK includes the target optimized file.
  • the APK of the Android application program is optimized by the server, so that the terminal device can download the optimized APK of the Android application program from the server.
  • the terminal device does not need to optimize the APK of the Android application program by itself, thereby reducing the operating burden of the terminal and thereby improving the user experience.
  • the Android application is optimized by the server, so that when the optimization is improved, it is only necessary to update the optimization tool on the server without upgrading the software version of the terminal device one by one.
  • the target APK further includes the file to be optimized.
  • This implementation method enables the terminal device to optimize the optimized file by itself and run the Android application according to the file optimized by itself when it cannot run the Android application according to the target optimized file or fails to run the Android application according to the target optimized file, which can improve The success rate of running Android applications.
  • the file to be optimized includes a dex file, and the dex file is an executable file in the Android virtual machine.
  • the file to be optimized includes a library file.
  • At least one of the following optimized tool chains is deployed on the server: Maple tool chain, underlying virtual machine LLVM tool chain, and AOT compilation Optimization tool chain; the server optimizes the files to be optimized in the source APK of the Android application, including: the server uses the optimization tool chain in the at least one optimization tool chain to optimize the files to be optimized in the source APK.
  • the server can use each of the deployed optimization tool chains to optimize the files to be optimized in the source APK, or use part of the deployed optimization tool chain to optimize the files to be optimized in the source APK, or can use deployment All or part of the optimization tool chain in turn optimizes the files to be optimized in the source APK.
  • the method before the server sends the target APK of the Android application to the terminal device, the method further includes: the server receives the Request message to download the Android application.
  • a method for running an Android application includes: the terminal device receives the target APK of the Android application from the server, and the target APK includes the first target optimization file obtained by optimizing the file to be optimized in the source APK of the Android application; the terminal device according to the target APK The first target optimization file runs the Android application.
  • the terminal device can run the optimized Android application without optimizing the Android application by itself. This can reduce the operating burden of the terminal device.
  • the target APK further includes a file to be optimized.
  • This implementation method enables the terminal device to optimize the optimized file by itself and run the Android application according to the file optimized by itself when it cannot run the Android application according to the target optimized file or fails to run the Android application according to the target optimized file, which can improve The success rate of running Android applications.
  • the method further includes: the terminal device determines whether it is necessary to run the Android according to the first target optimization file in the target APK Application; wherein the terminal device runs the Android application according to the first target optimization file in the target APK, including: the terminal device determines that the first target in the target APK needs to be determined When the optimized file runs the Android application, the Android application is run according to the first target optimized file in the target APK; the method further includes: the terminal device determines that it does not need to be based on the target APK When the first target optimization file runs the Android application, the terminal device optimizes the file to be optimized in the target APK to obtain a second target optimization file; the terminal device runs the Android according to the second target optimization file application.
  • the terminal device when the terminal device does not run the Android application according to the target optimization file or the terminal device fails to run the Android application according to the target optimization file in the target APK, the terminal device can optimize the file to be optimized and run the Android application according to the optimized file program.
  • the file to be optimized includes a dex file, and the dex file is an executable file in the Android virtual machine.
  • the file to be optimized includes a library file.
  • the method before the terminal device receives the target APK of the Android application from the server, the method further includes: the terminal device sends the Request message to download the Android application.
  • an apparatus for optimizing an Android application program includes a module for performing the method in the first aspect or any possible implementation manner of the first aspect.
  • An example of this device is a server.
  • an apparatus for running an Android application program includes a module for executing the method in the second aspect or any possible implementation manner of the second aspect.
  • An example of this device is a terminal device.
  • an apparatus for optimizing an Android application program includes a processor and a transmitter.
  • the processor is used to execute a program.
  • the processor and the transmitter implement the first aspect or the first aspect Method in any possible implementation.
  • the device may also include a memory.
  • the memory is used to store programs executed by the processor.
  • the device may also include a receiver.
  • the receiver is used to receive messages or data sent by other equipment or devices.
  • An example of this device is a server, such as a computer.
  • an apparatus for running an Android application program includes a processor and a receiver.
  • the processor is used to execute a program.
  • the processor and the receiver implement the second aspect or the second aspect.
  • the device may also include a memory.
  • the memory is used to store programs executed by the processor.
  • the device may also include a transmitter.
  • the transmitter is used to send messages or data to other devices or devices.
  • An example of this device is a terminal device.
  • a computer-readable storage medium stores program code for execution by a computing device, where the program code includes any possible implementation for implementing the first aspect or the first aspect Instruction of the method in the way.
  • a computer-readable storage medium stores program code for execution by a computing device, and the program code includes any possible implementation for implementing the second aspect or the second aspect Instruction of the method in the way.
  • a chip includes a processor and a communication interface.
  • the communication interface is used to communicate with an external device.
  • the processor is used to implement the first aspect or any possible implementation manner of the first aspect. Methods.
  • the chip may further include a memory that stores instructions, and the processor is used to execute the instructions stored in the memory.
  • the processor is used to implement the first aspect or any one of the first aspects Possible implementation methods.
  • the chip may be integrated on the server.
  • a chip is provided.
  • the chip includes a processor and a communication interface.
  • the communication interface is used to communicate with an external device.
  • the processor is used to implement the second aspect or any possible implementation manner of the second aspect. Methods.
  • the chip may further include a memory, the memory stores instructions, and the processor is used to execute the instructions stored in the memory, and when the instruction is executed, the processor is used to implement the second aspect or any one of the second aspect Possible implementation methods.
  • the chip may be integrated on the terminal device.
  • an embodiment of the present application provides a computer program product containing instructions, which when executed on a computing device or computing device, causes the computing device or computing device to execute the method described in the first aspect.
  • an embodiment of the present application provides a computer program product containing instructions, which when executed on a terminal device, causes a computing device or computing device to perform the method described in the second aspect.
  • Figure 1 is a schematic flow chart of Android application from development to operation
  • FIG. 2 is a schematic flowchart of a method for optimizing an Android application program according to an embodiment of the present application
  • FIG. 3 is a schematic composition diagram of an optimized APK according to an embodiment of this application.
  • FIG. 4 is a schematic flowchart of a method for running an Android application according to an embodiment of the present application
  • FIG. 5 is a schematic structural diagram of an apparatus for optimizing an Android application program according to an embodiment of the present application
  • FIG. 6 is a schematic structural diagram of an apparatus for running an Android application program according to another embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of an apparatus for optimizing an Android application according to an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of an apparatus for running an Android application according to another embodiment of the present application.
  • FIG. 1 is a schematic flowchart of Android application from development to operation. As shown in FIG. 1, after the developer develops the APK of the Android application, the APK can be published to the application market. The terminal device can download the APK of the Android application from the application market, and install the Android application and run the Android application according to the APK.
  • Android applications can also be referred to simply as Android applications.
  • the Android software development kit (SDK) tool is required to compile the Android application code together with any data and resource files into a file that can be recognized by the Android operating system.
  • the file format that can be recognized and run by the Android operating system is the APK.
  • the application market in the embodiments of the present application is also called an application store (APP STORE), which is an electronic application store that provides paid (or free) games or application download services for mobile devices, phones, and tablets.
  • APP STORE is an electronic application store that provides paid (or free) games or application download services for mobile devices, phones, and tablets.
  • the application market can perform operations such as storage, management, and detection of the APK, thereby providing an application developer or application development company with a way to publish the Android application channel.
  • the application market can be deployed on the server.
  • An example of a server is a computer.
  • the server may be a cloud server.
  • the cloud server can also be called the cloud, and the terminal device can be called the end.
  • the terminal devices in the embodiments of the present application may refer to user equipment, mobile devices, user terminals, terminals, wireless communication devices, handheld devices with communication functions, computing devices or vehicle-mounted devices, wearable devices, and routing devices.
  • the terminal device in the embodiment of the present application may be a smartphone, a netbook, a tablet computer, a personal computer, a notebook computer, a TV, a digital video conversion box (also called a set-top box), an e-book, an MP3 player, an MP4 player, a palm Game consoles, home game consoles, electronic watches, electronic radios, headphones, car equipment, navigators, DVD players, smart speakers, smart home equipment, and other devices.
  • the embodiment of the present application does not limit the specific form of the terminal device, as long as the device can run the Android application program, all fall within the scope of the terminal device of the embodiment of the present application.
  • the terminal device and the server can communicate in a wireless or wired manner.
  • the terminal device can optimize the Android application when installing the Android application or running the Android application.
  • an Android virtual machine (Dalvik or ART) is installed on the terminal device, when the Android virtual machine starts running or installs an Android application, it will use the technology such as JIT or AOT in the APK of the Android application *
  • the bytecode in the .dex file is compiled and converted into machine code that can be executed quickly on the CPU of the terminal device.
  • this application proposes a method for optimizing an Android application and a method for running an Android application, so as to reduce the operating burden of the terminal device, thereby improving the user experience.
  • a set of APK optimization frameworks deployed in the application market (server) can be constructed.
  • a variety of APK optimization tools or optimization tool chains can be inserted in the framework.
  • the method proposed in this application can optimize the Android application on the server side.
  • the optimization of the Android application may refer to the adjustment and improvement of the Android application (for example, the APK of the Android application) by using software tools. According to the focus of optimization, the optimization of Android applications can be divided into optimization of running speed and efficiency and optimization of code size.
  • Optimization of running speed and efficiency refers to the use of compiler front-end and back-end compilation optimization to reduce the number of codes or instructions required to complete specified tasks and improve the execution of specified tasks based on fully grasping the characteristics of software and hardware. Efficiency, or reduce the program running memory, or both. On the same processor, applications that have been optimized for running speed take less time to complete specified tasks than applications that have not been optimized, that is, the former has higher operating efficiency than the latter.
  • Code size optimization means that the application program compiles and optimizes through the compiler to reduce the code amount of the application program or the number of redundant instructions as much as possible under the premise that the required functions can be completed correctly, and reduces the final code volume occupation.
  • the optimized Android application has less code than the optimized Android application, and / or the optimized Android application has fewer instructions than the optimized instruction, and / Or, the optimized Android application consumes less memory when running.
  • the Maple tool chain optimized for the dex file in the APK can be inserted into the APK optimization framework on the server.
  • the Maple toolchain can directly compile and convert the dex bytecode in the APK into binary machine code executable by the target machine, and package it as a static SO file.
  • the Maple tool chain will reduce the number of instructions through a specific algorithm during compilation and conversion to improve the efficiency of the program.
  • the LLVM compiler tool chain (low level virtual machine, LLVM) can be deployed in the APK optimization framework on the server.
  • LLVM can optimize the SO library files in the APK, or, in conjunction with the Maple tool chain, optimize the intermediate representation (IR) for the dex files to reduce the number of instructions and improve the efficiency of the program.
  • IR intermediate representation
  • LLVM is a framework system that constructs a compiler, written in C ++, and is used to optimize the compile-time, link-time, and run-time of programs written in any programming language. time) and idle-time.
  • AOT Ahead-of-time compilation optimization tools
  • APK optimization framework in the server, such as: OpenJDK AOT, Angular AOT compiler, or Android ART.
  • the AOT compilation and optimization tool can perform AOT compilation and optimization on the programs or bytecodes in the APK to reduce the number of instructions, thereby improving the efficiency of the program.
  • the end-side can download the optimized Android application from the application market, and install the optimized Android application to the end-side device.
  • the end-side can download the optimized APK from the application market and install the optimized APK into the end-side device.
  • a runtime environment capable of executing the server-optimized Android application can be constructed on the end side.
  • the process of directly executing the optimized file in the APK can be added to the running process of the Android application on the side.
  • the optimized file can be loaded to run the optimized Android application.
  • a switch that switches the terminal device to execute the Android application before being optimized by the application market and the Android application after being optimized by the application market may also be built on the end side.
  • the end side can choose to execute the APK before optimization or the APK after optimization.
  • the end-side chooses to execute the APK before optimization
  • the APK can be optimized on the end-side, and the files optimized on the end-side can be executed, so as to achieve the purpose of improving operation efficiency.
  • the end can also be compatible with the original optimization mode.
  • FIG. 2 is a schematic flowchart of a method for optimizing an Android application program according to an embodiment of the present application. It should be understood that FIG. 2 shows steps or operations of the method, but these steps or operations are merely examples, and other operations or variations of the operations in FIG. 2 may be performed in the embodiments of the present application.
  • the server optimizes the file to be optimized in the source APK of the Android application to obtain the target optimized file corresponding to the file to be optimized.
  • the server can be understood as the application market, and the source APK of the Android application can refer to the APK released or uploaded by the developer to the server.
  • the source APK includes files to be optimized.
  • the file to be optimized may be understood as a file that needs to be optimized, such as a dex file and / or a library file.
  • the code size of the target optimization file is less than the code size of the file to be optimized, and / or the number of instructions corresponding to the target optimization file is less than the number of instructions corresponding to the file to be optimized.
  • the file to be optimized and the target optimized file may have a one-to-one correspondence.
  • the server sends the target APK of the Android application to the terminal device, and the target APK includes the target optimization file obtained by the server optimization.
  • the target APK of the Android application refers to an APK obtained by optimizing the source APK by the server.
  • the target APK includes the target optimization file obtained after the file to be optimized is optimized.
  • the target APK includes a target optimized file obtained by optimizing the dex file, and / or a target optimized file obtained after the library file is optimized.
  • the optimized Android application can consume less memory resources when running.
  • the server optimizes the source APK of the Android application and sends the optimized target APK to the terminal device, so that the terminal device does not need to optimize the Android application by itself, thereby reducing the operation of the terminal device
  • the burden can ultimately improve the user experience.
  • the source APK of the Android application has been published or uploaded to the server (or application market).
  • a software tool for optimizing the APK of the Android application should be deployed or installed on the server (or application market).
  • a series of software tools or software modules that optimize the APK of the Android application can be called an optimization tool chain.
  • the server optimizes the source APK of the Android application through the optimization tool chain, thereby obtaining the target APK of the Android application. Specifically, the server optimizes the file to be optimized in the source APK through the optimization tool chain, thereby obtaining the target optimized file in the target APK.
  • One or more optimization tool chains can be deployed in the server.
  • at least one optimization tool chain among the maple tool chain, the AOT compilation optimization tool chain, and the LLVM tool chain may be deployed on the server.
  • At least one type described herein may be understood as one or more types.
  • the server optimizing the source APK of the Android application may include: the server uses the optimization tool chain in the at least one optimization tool chain to optimize the file to be optimized in the source APK.
  • the server when the server optimizes the APK of the Android application, in some possible implementation manners, the server may use multiple optimization tool chains deployed on the server to optimize the APK of the Android application, Multiple target APKs are obtained, and the multiple optimization tool chains correspond to the multiple target APKs. Each target APK is obtained by optimizing the source APK with its corresponding optimization tool chain.
  • the server uses these four optimization toolchains to optimize the source APK of the Android application, and you can get Four target APKs, which correspond to these four optimization tool chains one by one.
  • the first of the four target APKs is obtained by the server using the maple tool chain to optimize the source APK; the second APK of the four APKs is the server using the Java tool chain to optimize the source APK To; the third of the four target APKs is obtained by the server using the AOT tool chain to optimize the source APK; the fourth APK of the four target APKs is obtained by the server using the LLVM tool chain to optimize the source APK of.
  • optimization tool chains can also be combined to optimize the source APK and finally generate a target APK.
  • the optimized file obtained by optimizing the Maple tool chain in the source APK can be used as the input of the LLVM tool chain, and the target optimized file can be obtained after the LLVM tool chain is optimized.
  • the server row may preset an optimization strategy, and select one or more optimization tool chains deployed on the server to optimize the source APK according to the optimization strategy.
  • the optimization strategy includes rules of which tool chains are called by the server application to optimize the files to be optimized in the source APK.
  • the optimization strategy may be input to the server after being specified by the optimizer, or may be a strategy generated by the machine through artificial intelligence (AI) algorithm as the server optimization strategy.
  • AI artificial intelligence
  • the server may add the path information of the target optimization file to the configuration file of the source APK to obtain a new configuration file, and include the new configuration file in the target APK, so that the terminal device can Path information acquisition target optimization file.
  • the server may configure a flag in the configuration file or other files of the target APK, and the flag indicates that the target APK is an optimized APK, including the target optimized file.
  • the obtained target APK may include files to be optimized in the source APK, files other than files to be optimized, and files to be optimized The target optimization file obtained after optimization.
  • the target APK may include all the files in the source APK and the optimized target files obtained after optimization.
  • the obtained target APK may include a resource file, a configuration file, a dex file, and a dex file after optimization Get the file.
  • the dex file is a file to be optimized, and the file obtained after the dex file is optimized is a target optimization file, and the target optimization file may include the optimized machine code.
  • the APK of the Android application released by the developer to the application market includes a resource file, a dex file, and a library file. It should be understood that the APK may also include other related files.
  • the target APK obtained may include resource files, configuration files, dex files, library files before optimization, files obtained after optimization of the dex files, and library files obtained after optimization .
  • the dex file is the file to be optimized
  • the file obtained after the optimization of the dex file and the library file obtained after the optimization are the target optimization file
  • the target optimization file may include the machine code obtained by the optimization
  • the library file obtained after the optimization and the optimization Compared with the library file, the number of instructions is less.
  • the target optimization file corresponding to the dex file and the target optimization file corresponding to the library file can be obtained.
  • the target APK sent by the application market to the terminal device may include a file in the source APK, a target optimization file corresponding to the dex file, and a target optimization file corresponding to the library file.
  • This implementation method enables the terminal device to optimize the files to be optimized in the source APK and execute the target optimized files obtained after optimization by itself even if the optimized files in the APK cannot be directly executed, so that the Android application can be normally started .
  • the obtained target APK may include only files other than the file to be optimized in the source APK and the file to be optimized after optimization Optimized files.
  • the target APK may not include the file to be optimized in the source APK.
  • the APK released by the developer to the server includes a resource file (resource), a configuration file, and a dex file.
  • the dex file is the file to be optimized.
  • the target APK obtained may include resources Target optimization files corresponding to files, configuration files and dex files.
  • this possible implementation manner can reduce the size of the target APK.
  • the method may further include: the server receives a message requesting to download the Android application from the terminal device. That is, the server sends the target APK of the Android application to the terminal device after receiving the request to download the Android application from the terminal device.
  • FIG. 4 is a schematic flowchart of a method for running an Android application according to an embodiment of the present application. It should be understood that FIG. 4 shows steps or operations of the method, but these steps or operations are only examples, and other operations or variations of the operations in FIG. 4 may be performed in the embodiments of the present application.
  • the terminal device receives the target APK of the Android application from the server, and the target APK includes the target optimization file obtained by optimizing the file to be optimized in the source APK of the Android application.
  • the terminal device downloads the target APK of the Android application from the server.
  • the server can be understood as an application market.
  • the source APK of an Android application can refer to an APK published or uploaded by a developer to the server.
  • the target APK of the Android application can refer to an APK obtained by optimizing the source APK by the server.
  • the source APK includes files to be optimized.
  • the file to be optimized may be understood as a file that needs to be optimized, such as a dex file and / or a library file.
  • the target APK includes the target optimized file obtained after the file to be optimized is optimized, for example, the file obtained after the optimization of the dex file and / or library file is the target optimized file.
  • the file to be optimized and the target optimized file may have a one-to-one correspondence.
  • the code size of the target optimization file is less than the code size of the file to be optimized, and / or the number of instructions corresponding to the target optimization file is less than the number of instructions corresponding to the file to be optimized.
  • the terminal device runs the Android application according to the target optimized file in the target APK.
  • a runtime environment capable of directly loading the target optimization file from the target APK should be deployed on the terminal device.
  • the terminal device since the APK downloaded from the server by the terminal device is optimized, the terminal device does not need to optimize the APK by itself, thereby reducing the burden on the terminal device and improving the user experience.
  • the target optimization file obtained by the server optimizing the file to be optimized in the source APK is referred to as the first target optimization file.
  • an implementation manner may include: reading the target optimization file according to the path information of the first target optimization file recorded in the configuration file, and then running the first Target optimization files.
  • the terminal device may first determine whether the APK downloaded by the terminal device from the application market is an optimized target APK, or, the terminal device may first determine whether the APK downloaded by the terminal device from the application market includes the first target optimization file . If so, you can read the first target optimization file and run the first target optimization file.
  • the terminal device may choose to start the Android application according to the target optimization file in the target APK; or the terminal device may choose to optimize the file to be optimized in the source APK by itself, and optimize it according to its own Get the file to start the Android application.
  • the terminal device can optimize the files to be optimized in the APK by itself, and according to Start the Android application with the optimized file.
  • This implementation mode enables the terminal device to normally start the Android application even if it is downloaded from the application market without an optimized source APK.
  • the terminal device may determine to start the Android application according to the target optimization file in the target APK, or may determine that it has optimized the source APK To optimize the file, and start the Android application according to the file obtained after optimization.
  • the terminal device may be pre-configured with an execution strategy or downloaded from the server, and the terminal device may determine whether to start the Android application according to the target optimization file in the target APK or optimize the file to be optimized in the source APK by itself. , And start the Android application based on the files you have optimized.
  • the execution strategy may include the following: the terminal device defaults to start the Android application according to the target optimization file in the target APK; in the case of failing to start or run the Android application according to the target optimization file in the target APK, the terminal device optimization The files to be optimized in the source APK, and start the Android application according to the files obtained after optimization.
  • the target APK may include only files other than the file to be optimized in the source APK and the target optimized file obtained through optimization of the file to be optimized. In other words, the target APK may not include the file to be optimized in the source APK.
  • the APK released by the developer to the server includes a resource file (resource), a configuration file, and a dex file, and the dex file is a file to be optimized.
  • the target APK obtained may include the resource file, Target optimization file obtained by optimizing configuration file and dex file.
  • the download volume of the terminal device is relatively small, so that the download speed can be improved, thereby improving the user experience.
  • the target APK may include a file to be optimized in the source APK, a file other than the file to be optimized, and a first target optimization obtained through optimization of the file to be optimized file.
  • the target APK may include all files in the source APK and the first target optimized file obtained by optimization of the file to be optimized.
  • the target APK may include a resource target, a configuration file, a dex file, and a first target optimized file obtained by optimization .
  • the APK of the Android application released by the developer to the application market includes resource files, dex files, and library files.
  • the target APK downloaded from the application market by the terminal device may include the file in the source APK, the first target optimized file obtained by optimizing the dex file, and the first target optimized file obtained by optimizing the library file.
  • the terminal device may determine that the Android application needs to be started according to the first target optimization file in the target APK; or determine that the file to be optimized in the target APK needs to be optimized by itself, and start Android based on the file obtained after optimization application.
  • the file optimized by the terminal device itself may be referred to as a second target optimization file.
  • the terminal device determines that the Android application needs to be run according to the first target optimization file in the target APK, it can run the Android application according to the first target optimization file in the target APK; if the terminal device determines that it does not need to run according to the first target in the target APK If the target optimized file runs the Android application, the terminal device can optimize the file to be optimized in the target APK to obtain the second target optimized file, and run the Android application according to the second target optimized file.
  • the method may further include: the terminal device sends a request message for downloading the Android application to the server, so that the server can respond to the request The message sends the APK of the Android application to the terminal device.
  • FIG. 5 is a schematic block diagram of an apparatus 500 for optimizing an Android running program according to an embodiment of the present application. It should be understood that the device 500 is only an example. The device in the embodiment of the present application may further include other modules or units, or include modules with similar functions to the modules in FIG. 5, or not necessarily include all modules in FIG. 5.
  • the optimization module 510 is used for optimizing the files to be optimized in the source Android installation package APK of the Android application to obtain the target optimization file corresponding to the files to be optimized.
  • the sending module 520 is configured to send a target APK of the Android application to a terminal device, where the target APK includes the target optimization file.
  • the target APK further includes the file to be optimized.
  • the file to be optimized includes a dex file
  • the dex file is an executable file in an Android virtual machine.
  • the file to be optimized includes a library file.
  • At least one of the following optimization tool chains is deployed on the server: the Maple tool chain, the underlying virtual machine LLVM tool chain, and the AOT compilation optimization tool chain in advance.
  • the optimization module is specifically configured to: use the optimization tool chain in the at least one optimization tool chain to optimize the files to be optimized in the source APK.
  • the apparatus further includes a receiving module 530, configured to: before the optimization module optimizes the file to be optimized in the source APK of the Android application, receive a request from the terminal device to download the Android Application request message.
  • a receiving module 530 configured to: before the optimization module optimizes the file to be optimized in the source APK of the Android application, receive a request from the terminal device to download the Android Application request message.
  • the apparatus 500 may be used to perform the steps of the method described in FIG. 2, and for the sake of brevity, details are not described here.
  • FIG. 6 is a schematic block diagram of an apparatus 600 for running an Android application program according to an embodiment of the present application. It should be understood that the device 600 is only an example. The device in the embodiment of the present application may further include other modules or units, or include modules with similar functions to the modules in FIG. 6, or not necessarily include all modules in FIG. 6.
  • the receiving module 610 is configured to receive the target Android installation package APK of the Android application from the server, where the target APK includes the first target optimized file obtained by optimizing the file to be optimized in the source APK of the Android application.
  • the running module 620 is configured to run the Android application according to the first target optimization file in the target APK.
  • the target APK further includes the file to be optimized.
  • the device further includes: a determining module, configured to determine whether the Android application needs to be run according to the first target optimization file in the target APK.
  • the running module is specifically configured to: according to the first in the target APK when the determining module determines that the Android application needs to be run according to the first target optimization file in the target APK
  • the target optimization file runs the Android application.
  • the device further includes an optimization module 630 for optimizing the file to be optimized when the determination module determines that it is not necessary to run the Android application according to the first target optimization file in the target APK, A second target optimization file is obtained; at this time, the running module is also used to run the Android application according to the second target optimization file.
  • the file to be optimized includes a dex file
  • the dex file is an executable file in an Android virtual machine.
  • the file to be optimized includes a library file.
  • the device further includes a sending module 640, which is configured to: before the download module receives the target APK of the Android application from the server, send a request message for requesting download of the Android application to the server.
  • a sending module 640 which is configured to: before the download module receives the target APK of the Android application from the server, send a request message for requesting download of the Android application to the server.
  • the apparatus 600 may be used to perform the steps of the method described in FIG. 4, and for the sake of brevity, details are not described here.
  • An example of the device 600 is a terminal device.
  • FIG. 7 is a schematic structural diagram of an apparatus for running an Android application program according to another embodiment of the present application. It should be understood that the apparatus 700 shown in FIG. 7 is only an example, and the apparatus in the embodiment of the present application may further include other modules or units, or include modules with similar functions as the modules in FIG. 7.
  • the apparatus 700 may include one or more processors 710, one or more memories 720, and a transmitter 740.
  • the memory 720 is used to store program codes executed by the processor 710.
  • the processor 710 is used to retrieve instructions in the memory 720.
  • the transmitter 740 is used to transmit information.
  • the processor 710 may be integrated with a memory 720, or the processor 710 is coupled to one or more memories 720.
  • the apparatus 700 may further include a receiver 730.
  • the receiver 730 and the transmitter 740 may be integrated together, called a transceiver.
  • the processor 710 may be used to implement operations or steps that the optimization module 510 in FIG. 5 can implement; the transmitter 740 may be used to implement operations or steps that the transmission module 520 in FIG. 5 may implement; The operations or steps that the receiving module 530 in 5 can implement.
  • An example of the device 700 is a server.
  • FIG. 8 is a schematic structural diagram of an apparatus for running an Android application according to another embodiment of the present application. It should be understood that the apparatus 800 shown in FIG. 8 is only an example, and the apparatus in the embodiment of the present application may further include other modules or units, or include modules with similar functions as the modules in FIG.
  • the device 800 may include one or more processors 810, one or more memories 820, and a receiver 830.
  • the memory 820 is used to store program codes executed by the processor 810.
  • the processor 810 is used to retrieve instructions in the memory 820.
  • the transmitter 840 is used to transmit information.
  • the processor 810 may be integrated with a memory 820, or the processor 810 is coupled to one or more memories 720.
  • the device 800 may further include a transmitter 840.
  • the receiver 830 and the transmitter 840 may be integrated together, called a transceiver.
  • the processor 810 may be used to implement operations or steps that can be implemented by the running module 620 and the optimization module 630 in FIG. 6; the receiver 830 may be used to implement operations or steps that can be implemented by the receiving module 610 in FIG. It is used to implement operations or steps that can be implemented by the sending module 640 in FIG. 6.
  • An example of the device 800 is a terminal device.
  • the disclosed system, device, and method may be implemented in other ways.
  • the device embodiments described above are only schematic.
  • the division of the units is only a division of logical functions.
  • there may be other divisions for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
  • the function is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a computer-readable storage medium.
  • the technical solution of the present application essentially or part of the contribution to the existing technology or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to enable a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program code .
  • the processor in the embodiments of the present application may be an integrated circuit chip, which has signal processing capabilities.
  • each step of the foregoing method embodiment may be completed by an integrated logic circuit of hardware in a processor or instructions in the form of software.
  • the aforementioned processor may be a general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other available Programming logic devices, discrete gates or transistor logic devices, discrete hardware components.
  • DSP digital signal processor
  • ASIC application specific integrated circuit
  • FPGA field programmable gate array
  • the methods, steps, and logical block diagrams disclosed in the embodiments of the present application may be implemented or executed.
  • the general-purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
  • the steps of the method disclosed in conjunction with the embodiments of the present application may be directly embodied and executed by a hardware decoding processor, or may be executed and completed by a combination of hardware and software modules in the decoding processor.
  • the software module may be located in a mature storage medium in the art, such as a random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, and register.
  • the storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

Landscapes

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

Abstract

The present application provides a method and a related apparatus for optimizing and running an android application. In the technical solution provided in the present application, a server optimizes a file to be optimized in a source APK of the android application, and sends a target APK to a terminal device, the target APK comprising a target optimization file obtained by optimizing the file to be optimized; after the terminal device receives the target APK, the android application is run according to the target optimization file in the target APK. According to the technical solution of the present application, the server optimizes the APK, the terminal device can not only run the optimized android application so as to improve running efficiency of the android application, but also can reduce a running burden of the terminal device, so as to improve user experience.

Description

优化和运行安卓应用程序的方法以及相关装置Method and related device for optimizing and running Android application program 技术领域Technical field
本申请涉及应用程序领域,并且更具体地,涉及优化安卓(android)应用程序(application,APP)的方法、运行安卓应用程序的装置、服务器、终端设备和计算机可读存储介质。This application relates to the field of application programs, and more specifically, to a method of optimizing an Android application (APP), a device for running an Android application, a server, a terminal device, and a computer-readable storage medium.
背景技术Background technique
目前,安卓应用程序的发布和安装方式主要包括:开发者向应用市场提交应用程序的安卓安装包(android package,APK);用户通过终端设备从应用市场下载安卓应用程序的APK。Currently, the release and installation methods of Android applications mainly include: developers submit Android installation packages (Android packages) of applications to the application market; users download APKs of Android applications from the application market through terminal devices.
终端设备下载安卓应用程序的APK后,可以在安装该安卓应用程序或运行该安卓应用程序时,对该安卓应用程序进行优化。After the terminal device downloads the APK of the Android application, it can optimize the Android application when installing the Android application or running the Android application.
例如,若终端设备上安装了安卓虚拟机(Dalvik或ART),则该安卓虚拟机在启动运行或者安装安卓应用程序的时候,会通过即时(just-in-time,JIT)或提前(ahead-of-time,AOT)等技术将该安卓应用程序的APK中的*.dex文件中的字节码编译转换成能够直接在终端设备的中央处理器(central processing unit,CPU)快速执行的机器码。For example, if an Android virtual machine (Dalvik or ART) is installed on the terminal device, when the Android virtual machine starts running or installs Android applications, it will pass just-in-time (JIT) or ahead (ahead- of-time (AOT) and other technologies compile and convert the bytecode in the * .dex file in the APK of the Android application into machine code that can be quickly executed directly in the central processing unit (CPU) of the terminal device .
但是,终端设备对安卓应用程序进行优化会增加终端设备的运行负担,从而影响用户体验。因此,如何减轻终端设备的运行负担,是一个亟需解决的技术问题。However, the optimization of the Android application by the terminal device will increase the operating burden of the terminal device, thereby affecting the user experience. Therefore, how to reduce the operating burden of the terminal equipment is a technical problem that needs to be solved urgently.
发明内容Summary of the invention
本申请提供优化安卓应用程序的方法、运行安卓应用程序的方法、服务器、终端设备、计算机可读存储介质、计算机程序产品和芯片系统,可以减轻终端设备的运行负担,从而可以提高用户体验。This application provides a method for optimizing an Android application, a method for running an Android application, a server, a terminal device, a computer-readable storage medium, a computer program product, and a chip system, which can reduce the operating burden of the terminal device, thereby improving the user experience.
第一方面,提供一种优化安卓应用程序的方法。该方法包括:服务器对安卓应用程序的源APK中的待优化文件进行优化,得到待优化文件对应的目标优化文件;服务器向终端设备发送安卓应用程序的目标APK,目标APK中包括目标优化文件。In the first aspect, a method for optimizing Android applications is provided. The method includes: the server optimizes the file to be optimized in the source APK of the Android application to obtain the target optimized file corresponding to the file to be optimized; the server sends the target APK of the Android application to the terminal device, and the target APK includes the target optimized file.
该方法中,由服务器来对安卓应用程序的APK进行优化,可以使得终端设备从服务器下载该安卓应用程序的优化后的APK。这样,终端设备可以不用自己对安卓应用程序的APK进行优化,从而减轻终端的运行负担,进而可以提升用户体验。In this method, the APK of the Android application program is optimized by the server, so that the terminal device can download the optimized APK of the Android application program from the server. In this way, the terminal device does not need to optimize the APK of the Android application program by itself, thereby reducing the operating burden of the terminal and thereby improving the user experience.
而且,由服务器来对安卓应用程序进行优化,使得对优化进行改进时,仅需更新服务器上的优化工具即可,而不用挨个升级终端设备的软件版本。Moreover, the Android application is optimized by the server, so that when the optimization is improved, it is only necessary to update the optimization tool on the server without upgrading the software version of the terminal device one by one.
结合第一方面,在第一种可能的实现方式中,该目标APK中还包括该待优化文件。With reference to the first aspect, in a first possible implementation manner, the target APK further includes the file to be optimized.
这种实现方式使得终端设备在不能根据目标优化文件运行安卓应用程序或根据目标优化文件运行安卓应用程序失败时,可以自行优化该优化文件并根据自己优化得到的文件运行安卓应用程序,从而可以提高安卓应用程序的运行成功率。This implementation method enables the terminal device to optimize the optimized file by itself and run the Android application according to the file optimized by itself when it cannot run the Android application according to the target optimized file or fails to run the Android application according to the target optimized file, which can improve The success rate of running Android applications.
结合第一方面或第一种可能的实现方式,在第二种可能的实现方式中,待优化文件包括dex文件,dex文件为安卓虚拟机中的可执行文件。With reference to the first aspect or the first possible implementation manner, in the second possible implementation manner, the file to be optimized includes a dex file, and the dex file is an executable file in the Android virtual machine.
结合第一方面或第一种或第二种可能的实现方式,在第三种可能的实现方式中,待优化文件包括库文件。With reference to the first aspect or the first or second possible implementation manner, in a third possible implementation manner, the file to be optimized includes a library file.
结合第一方面或上述任意一种可能的实现方式,在第四种可能的实现方式中,服务器上部署有以下至少一种优化工具链:Maple工具链、底层虚拟机LLVM工具链、提前AOT编译优化工具链;服务器对安卓应用程序的源APK中的待优化文件进行优化,包括:服务器使用所述至少一种优化工具链中的优化工具链对源APK中的待优化文件进行优化。With reference to the first aspect or any one of the above possible implementation manners, in the fourth possible implementation manner, at least one of the following optimized tool chains is deployed on the server: Maple tool chain, underlying virtual machine LLVM tool chain, and AOT compilation Optimization tool chain; the server optimizes the files to be optimized in the source APK of the Android application, including: the server uses the optimization tool chain in the at least one optimization tool chain to optimize the files to be optimized in the source APK.
其中,服务器可以使用部署的每一种优化工具链分别对源APK中的待优化文件进行优化,也可以使用部署的部分优化工具链分别对源APK中的待优化文件进行优化,或可以使用部署的所有或部分优化工具链依次对源APK中的待优化文件进行优化。Among them, the server can use each of the deployed optimization tool chains to optimize the files to be optimized in the source APK, or use part of the deployed optimization tool chain to optimize the files to be optimized in the source APK, or can use deployment All or part of the optimization tool chain in turn optimizes the files to be optimized in the source APK.
结合第一方面或上述任意一种可能的实现方式,在第五种可能的实现方式中,服务器向终端设备发送安卓应用程序的目标APK之前,所述方法还包括:服务器从终端设备接收用于请求下载安卓应用程序的请求消息。With reference to the first aspect or any one of the foregoing possible implementation manners, in a fifth possible implementation manner, before the server sends the target APK of the Android application to the terminal device, the method further includes: the server receives the Request message to download the Android application.
第二方面,提供一种运行安卓应用程序的方法。该方法包括:终端设备从服务器接收安卓应用程序的目标APK,目标APK中包括安卓应用程序的源APK中的待优化文件经过优化得到的第一目标优化文件;终端设备根据目标APK中的所述第一目标优化文件运行安卓应用程序。In the second aspect, a method for running an Android application is provided. The method includes: the terminal device receives the target APK of the Android application from the server, and the target APK includes the first target optimization file obtained by optimizing the file to be optimized in the source APK of the Android application; the terminal device according to the target APK The first target optimization file runs the Android application.
该方法中,因为终端设备从服务器下载的APK为安卓应用程序的优化后的APK,因此终端设备可以不用自己对安卓应用程序进行优化,就可以运行优化后的安卓应用程序了。这样可以减轻终端设备的运行负担。In this method, because the APK downloaded from the server by the terminal device is the optimized APK of the Android application, the terminal device can run the optimized Android application without optimizing the Android application by itself. This can reduce the operating burden of the terminal device.
结合第二方面,在第一种可能的实现方式中,目标APK中还包括待优化文件。With reference to the second aspect, in a first possible implementation manner, the target APK further includes a file to be optimized.
这种实现方式使得终端设备在不能根据目标优化文件运行安卓应用程序或根据目标优化文件运行安卓应用程序失败时,可以自行优化该优化文件并根据自己优化得到的文件运行安卓应用程序,从而可以提高安卓应用程序的运行成功率。This implementation method enables the terminal device to optimize the optimized file by itself and run the Android application according to the file optimized by itself when it cannot run the Android application according to the target optimized file or fails to run the Android application according to the target optimized file, which can improve The success rate of running Android applications.
结合第一种可能的实现方式,在第二种可能的实现方式中,所述方法还包括:所述终端设备确定是否需要根据所述目标APK中的所述第一目标优化文件运行所述安卓应用程序;其中,所述终端设备根据所述目标APK中的所述第一目标优化文件运行所述安卓应用程序,包括:所述终端设备确定需要根据所述目标APK中的所述第一目标优化文件运行所述安卓应用程序时,根据所述目标APK中的所述第一目标优化文件运行所述安卓应用程序;所述方法还包括:所述终端设备确定不需要根据所述目标APK中的所述第一目标优化文件运行所述安卓应用程序时,终端设备对目标APK中的待优化文件进行优化,得到第二目标优化文件;终端设备根据所述第二目标优化文件运行所述安卓应用程序。With reference to the first possible implementation manner, in a second possible implementation manner, the method further includes: the terminal device determines whether it is necessary to run the Android according to the first target optimization file in the target APK Application; wherein the terminal device runs the Android application according to the first target optimization file in the target APK, including: the terminal device determines that the first target in the target APK needs to be determined When the optimized file runs the Android application, the Android application is run according to the first target optimized file in the target APK; the method further includes: the terminal device determines that it does not need to be based on the target APK When the first target optimization file runs the Android application, the terminal device optimizes the file to be optimized in the target APK to obtain a second target optimization file; the terminal device runs the Android according to the second target optimization file application.
例如,终端设备没有根据目标优化文件运行安卓应用程序,或终端设备根据目标APK中的目标优化文件运行安卓应用程序失败时,终端设备可以自行优化待优化文件,并根据优化得到的文件运行安卓应用程序。For example, when the terminal device does not run the Android application according to the target optimization file or the terminal device fails to run the Android application according to the target optimization file in the target APK, the terminal device can optimize the file to be optimized and run the Android application according to the optimized file program.
这样,可以提高安卓应用程序的运行成功率。In this way, the operating success rate of the Android application can be improved.
结合第二方面或上述任意一种可能的实现方式,在第三种可能的实现方式中,待优化文件包括dex文件,dex文件为安卓虚拟机中的可执行文件。With reference to the second aspect or any one of the foregoing possible implementation manners, in a third possible implementation manner, the file to be optimized includes a dex file, and the dex file is an executable file in the Android virtual machine.
结合第二方面或上述任意一种可能的实现方式,在第四种可能的实现方式中,待优化文件包括库文件。With reference to the second aspect or any one of the foregoing possible implementation manners, in a fourth possible implementation manner, the file to be optimized includes a library file.
结合第二方面或上述任意一种可能的实现方式,在第五种可能的实现方式中,终端设备从服务器接收安卓应用程序的目标APK之前,所述方法还包括:终端设备向服务器发送用于请求下载安卓应用程序的请求消息。With reference to the second aspect or any one of the foregoing possible implementation manners, in a fifth possible implementation manner, before the terminal device receives the target APK of the Android application from the server, the method further includes: the terminal device sends the Request message to download the Android application.
第三方面,提供了一种优化安卓应用程序的装置,该装置包括用于执行第一方面或第一方面的任意一种可能的实现方式中的方法的模块。In a third aspect, an apparatus for optimizing an Android application program is provided. The apparatus includes a module for performing the method in the first aspect or any possible implementation manner of the first aspect.
该装置的一种示例为服务器。An example of this device is a server.
第四方面,提供了一种运行安卓应用程序的装置,该装置包括用于执行第二方面或第二方面的任意一种可能的实现方式中的方法的模块。According to a fourth aspect, an apparatus for running an Android application program is provided, and the apparatus includes a module for executing the method in the second aspect or any possible implementation manner of the second aspect.
该装置的一种示例为终端设备。An example of this device is a terminal device.
第五方面,提供了一种优化安卓应用程序的装置,该装置包括处理器和发送器,处理器用于执行程序,当处理器执行程序时,处理器和发送器实现第一方面或第一方面的任意一种可能的实现方式中的方法。In a fifth aspect, an apparatus for optimizing an Android application program is provided. The apparatus includes a processor and a transmitter. The processor is used to execute a program. When the processor executes the program, the processor and the transmitter implement the first aspect or the first aspect Method in any possible implementation.
可选地,该装置还可以包括存储器。存储器用于存储处理器执行的程序。Optionally, the device may also include a memory. The memory is used to store programs executed by the processor.
可选地,该装置还可以包括接收器。接收器用于接收其他设备或装置发送的消息或数据。Optionally, the device may also include a receiver. The receiver is used to receive messages or data sent by other equipment or devices.
该装置的一种示例为服务器,例如计算机。An example of this device is a server, such as a computer.
第六方面,提供了一种运行安卓应用程序的装置,该装置包括处理器和接收器,处理器用于执行程序,当处理器执行程序时,处理器和接收器实现第二方面或第二方面的任意一种可能的实现方式中的方法。According to a sixth aspect, an apparatus for running an Android application program is provided. The apparatus includes a processor and a receiver. The processor is used to execute a program. When the processor executes the program, the processor and the receiver implement the second aspect or the second aspect. Method in any possible implementation.
可选地,该装置还可以包括存储器。存储器用于存储处理器执行的程序。Optionally, the device may also include a memory. The memory is used to store programs executed by the processor.
可选地,该装置还可以包括发送器。发送器用于向其他设备或装置发送消息或数据。Optionally, the device may also include a transmitter. The transmitter is used to send messages or data to other devices or devices.
该装置的一种示例为终端设备。An example of this device is a terminal device.
第七方面,提供一种计算机可读存储介质,该计算机可读存储介质存储用于计算装置执行的程序代码,该程序代码包括用于实现第一方面或第一方面的任意一种可能的实现方式中的方法的指令。According to a seventh aspect, a computer-readable storage medium is provided, and the computer-readable storage medium stores program code for execution by a computing device, where the program code includes any possible implementation for implementing the first aspect or the first aspect Instruction of the method in the way.
第八方面,提供一种计算机可读存储介质,该计算机可读存储介质存储用于计算装置执行的程序代码,该程序代码包括用于实现第二方面或第二方面的任意一种可能的实现方式中的方法的指令。In an eighth aspect, a computer-readable storage medium is provided. The computer-readable storage medium stores program code for execution by a computing device, and the program code includes any possible implementation for implementing the second aspect or the second aspect Instruction of the method in the way.
第九方面,提供一种芯片,该芯片包括处理器和通信接口,该通信接口用于与外部器件进行通信,该处理器用于实现第一方面或第一方面的任意一种可能的实现方式中的方法。According to a ninth aspect, a chip is provided. The chip includes a processor and a communication interface. The communication interface is used to communicate with an external device. The processor is used to implement the first aspect or any possible implementation manner of the first aspect. Methods.
可选地,该芯片还可以包括存储器,该存储器中存储有指令,处理器用于执行存储器中存储的指令,当该指令被执行时,处理器用于实现第一方面或第一方面的任意一种可能的实现方式中的方法。Optionally, the chip may further include a memory that stores instructions, and the processor is used to execute the instructions stored in the memory. When the instructions are executed, the processor is used to implement the first aspect or any one of the first aspects Possible implementation methods.
可选地,该芯片可以集成在服务器上。Alternatively, the chip may be integrated on the server.
第十方面,提供一种芯片,该芯片包括处理器和通信接口,该通信接口用于与外部器件进行通信,该处理器用于实现第二方面或第二方面的任意一种可能的实现方式中的方 法。According to a tenth aspect, a chip is provided. The chip includes a processor and a communication interface. The communication interface is used to communicate with an external device. The processor is used to implement the second aspect or any possible implementation manner of the second aspect. Methods.
可选地,该芯片还可以包括存储器,该存储器中存储有指令,处理器用于执行存储器中存储的指令,当该指令被执行时,处理器用于实现第二方面或第二方面的任意一种可能的实现方式中的方法。Optionally, the chip may further include a memory, the memory stores instructions, and the processor is used to execute the instructions stored in the memory, and when the instruction is executed, the processor is used to implement the second aspect or any one of the second aspect Possible implementation methods.
可选地,该芯片可以集成在终端设备上。Alternatively, the chip may be integrated on the terminal device.
第十一方面,本申请实施例提供了一种包含指令的计算机程序产品,当其在计算装置或计算设备上运行时,使得计算装置或计算设备执行第一方面所述的方法。In an eleventh aspect, an embodiment of the present application provides a computer program product containing instructions, which when executed on a computing device or computing device, causes the computing device or computing device to execute the method described in the first aspect.
第十二方面,本申请实施例提供了一种包含指令的计算机程序产品,当其在终端设备上运行时,使得计算装置或计算设备执行第二方面所述的方法。In a twelfth aspect, an embodiment of the present application provides a computer program product containing instructions, which when executed on a terminal device, causes a computing device or computing device to perform the method described in the second aspect.
附图说明BRIEF DESCRIPTION
图1是安卓应用程序从开发至运行的示意性流程图;Figure 1 is a schematic flow chart of Android application from development to operation;
图2是本申请实施例的优化安卓应用程序的方法的示意性流程图;2 is a schematic flowchart of a method for optimizing an Android application program according to an embodiment of the present application;
图3是本申请实施例的优化后的APK的示意性组成图;FIG. 3 is a schematic composition diagram of an optimized APK according to an embodiment of this application;
图4是本申请一个实施例的运行安卓应用程序的方法的示意性流程图;4 is a schematic flowchart of a method for running an Android application according to an embodiment of the present application;
图5是本申请一个实施例的优化安卓应用程序的装置的示意性结构图;5 is a schematic structural diagram of an apparatus for optimizing an Android application program according to an embodiment of the present application;
图6是本申请另一个实施例的运行安卓应用程序的装置的示意性结构图;6 is a schematic structural diagram of an apparatus for running an Android application program according to another embodiment of the present application;
图7是本申请一个实施例的优化安卓应用程序的装置的示意性结构图;7 is a schematic structural diagram of an apparatus for optimizing an Android application according to an embodiment of the present application;
图8是本申请另一个实施例的运行安卓应用程序的装置的示意性结构图。FIG. 8 is a schematic structural diagram of an apparatus for running an Android application according to another embodiment of the present application.
具体实施方式detailed description
下面将结合附图,对本申请中的技术方案进行描述。The technical solutions in this application will be described below with reference to the drawings.
图1是安卓应用程序从开发至运行的示意性流程图。如图1所示,开发者在开发设备开发得到安卓应用程序的APK后,可以将该APK发布到应用市场。终端设备可以从应用市场下载安卓应用程序的APK,并根据该APK安装该安卓应用程序和运行该安卓应用程序。FIG. 1 is a schematic flowchart of Android application from development to operation. As shown in FIG. 1, after the developer develops the APK of the Android application, the APK can be published to the application market. The terminal device can download the APK of the Android application from the application market, and install the Android application and run the Android application according to the APK.
安卓应用程序也可以简称为安卓应用。开发者编写好安卓应用程序后,需要通过安卓软件开发工具包(software development kit,SDK)工具,将安卓应用程序的代码连同任何数据和资源文件,编译成能够被安卓操作系统识别的文件。这种能被安卓操作系统识别并运行的文件格式便是APK。Android applications can also be referred to simply as Android applications. After the developer writes the Android application, the Android software development kit (SDK) tool is required to compile the Android application code together with any data and resource files into a file that can be recognized by the Android operating system. The file format that can be recognized and run by the Android operating system is the APK.
本申请实施例中的应用市场亦称应用商店(APP STORE),是专门为移动设备手机,平板电脑等提供收费(或免费)游戏或应用下载服务的电子应用商店。当安卓应用程序的开发者将安卓应用程序的APK发布到应用市场后,应用市场可以对该APK进行存储、管理和检测等操作,从而为应用开发者或应用开发公司提供一个发布安卓应用程序的渠道。应用市场可以部署在服务器上。服务器的一种示例为计算机。服务器可以是云服务器。云服务器又可以称为云端,终端设备可以称为端侧。The application market in the embodiments of the present application is also called an application store (APP STORE), which is an electronic application store that provides paid (or free) games or application download services for mobile devices, phones, and tablets. After the developer of the Android application releases the APK of the Android application to the application market, the application market can perform operations such as storage, management, and detection of the APK, thereby providing an application developer or application development company with a way to publish the Android application channel. The application market can be deployed on the server. An example of a server is a computer. The server may be a cloud server. The cloud server can also be called the cloud, and the terminal device can be called the end.
本申请实施例中的终端设备可以指用户设备、移动设备、用户终端、终端、无线通信设备、具有通信功能的手持设备、计算设备或车载设备、可穿戴设备、路由设备。The terminal devices in the embodiments of the present application may refer to user equipment, mobile devices, user terminals, terminals, wireless communication devices, handheld devices with communication functions, computing devices or vehicle-mounted devices, wearable devices, and routing devices.
例如,本申请实施例中的终端设备可以是智能手机、上网本、平板电脑、个人电脑、 笔记本电脑、电视、数字视频转换盒(又称机顶盒)、电子书、MP3播放器、MP4播放器、掌上游戏机、家用游戏机、电子手表、电子收音机、耳机、汽车设备、导航仪、DVD机、智能音箱、智能家居设备以及其他设备等。本申请实施例对终端设备的具体形式并不限定,只要是能够运行安卓应用程序的设备均落入本申请实施例的终端设备的范围。For example, the terminal device in the embodiment of the present application may be a smartphone, a netbook, a tablet computer, a personal computer, a notebook computer, a TV, a digital video conversion box (also called a set-top box), an e-book, an MP3 player, an MP4 player, a palm Game consoles, home game consoles, electronic watches, electronic radios, headphones, car equipment, navigators, DVD players, smart speakers, smart home equipment, and other devices. The embodiment of the present application does not limit the specific form of the terminal device, as long as the device can run the Android application program, all fall within the scope of the terminal device of the embodiment of the present application.
终端设备与服务器(即应用市场)之间可以通过无线或有线的方式进行通信。The terminal device and the server (that is, the application market) can communicate in a wireless or wired manner.
终端设备在安装安卓应用程序或运行安卓应用程序时,可以对该安卓应用程序进行优化。The terminal device can optimize the Android application when installing the Android application or running the Android application.
例如,若终端设备上安装了安卓虚拟机(Dalvik或ART),则该安卓虚拟机在启动运行或者安装安卓应用程序的时候,会通过JIT或AOT等技术将该安卓应用程序的APK中的*.dex文件中的字节码编译转换成能够直接在终端设备的CPU快速执行的机器码。For example, if an Android virtual machine (Dalvik or ART) is installed on the terminal device, when the Android virtual machine starts running or installs an Android application, it will use the technology such as JIT or AOT in the APK of the Android application * The bytecode in the .dex file is compiled and converted into machine code that can be executed quickly on the CPU of the terminal device.
终端设备对安卓应用程序进行优化会增加终端设备的运行负担。针对此问题,本申请提出了一种优化安卓应用程序的方法和运行安卓应用程序的方法,以减轻终端设备的运行负担,从而提高用户体验。The optimization of the Android application by the terminal device will increase the operating burden of the terminal device. In response to this problem, this application proposes a method for optimizing an Android application and a method for running an Android application, so as to reduce the operating burden of the terminal device, thereby improving the user experience.
在本申请提出的优化安卓应用程序的方法中,可以构建一套部署在应用市场(服务器)的APK优化框架。该框架中能够插入各种APK的优化工具或优化工具链。或者可以说,本申请提出的方法可以在服务器侧对安卓应用程序进行优化。In the method for optimizing Android applications proposed in this application, a set of APK optimization frameworks deployed in the application market (server) can be constructed. A variety of APK optimization tools or optimization tool chains can be inserted in the framework. Or it can be said that the method proposed in this application can optimize the Android application on the server side.
本申请实施例中,对安卓应用程序的优化,可以指利用软件工具对该安卓应用程序(例如对安卓应用程序的APK)进行调整和改进。按照优化的侧重点不同,安卓应用程序的优化可分为运行速度和效率优化以及代码尺寸优化。In the embodiment of the present application, the optimization of the Android application may refer to the adjustment and improvement of the Android application (for example, the APK of the Android application) by using software tools. According to the focus of optimization, the optimization of Android applications can be divided into optimization of running speed and efficiency and optimization of code size.
运行速度和效率优化是指在充分掌握软硬件特性的基础上,通过使用编译器的前端和后端编译优化等手段来降低完成指定任务所需执行的代码或者指令数,提升完成指定任务的执行效率,或者降低程序运行内存,或者二者兼顾。在同一个处理器上,经过运行速度优化的应用程序比未经优化的应用程序在完成指定任务时所需的时间更短,即前者比后者具有更高的运行效率。Optimization of running speed and efficiency refers to the use of compiler front-end and back-end compilation optimization to reduce the number of codes or instructions required to complete specified tasks and improve the execution of specified tasks based on fully grasping the characteristics of software and hardware. Efficiency, or reduce the program running memory, or both. On the same processor, applications that have been optimized for running speed take less time to complete specified tasks than applications that have not been optimized, that is, the former has higher operating efficiency than the latter.
代码尺寸优化是指,应用程序在能够正确完成所需功能的前提下,通过编译器编译优化尽可能减少应用程序的代码量或者冗余指令数,降低最终的代码体积占用。Code size optimization means that the application program compiles and optimizes through the compiler to reduce the code amount of the application program or the number of redundant instructions as much as possible under the premise that the required functions can be completed correctly, and reduces the final code volume occupation.
也就是说,优化后的安卓应用程序的代码量少于优化前的安卓应用程序的代码量,和/或,优化后的安卓应用程序对应的指令数少于优化前的对应的指令数,和/或,优化后的安卓应用程序运行时消耗更少的内存。That is, the optimized Android application has less code than the optimized Android application, and / or the optimized Android application has fewer instructions than the optimized instruction, and / Or, the optimized Android application consumes less memory when running.
例如,服务器上的APK优化框架中可以插入针对APK中的dex文件进行优化的Maple工具链。Maple工具链可以直接将APK中的dex字节码编译转换为目标机器可执行的二进制机器码,并打包为静态SO文件。并且Maple工具链在编译转换时会通过特定算法减少指令数,以提升程序运行效率。For example, the Maple tool chain optimized for the dex file in the APK can be inserted into the APK optimization framework on the server. The Maple toolchain can directly compile and convert the dex bytecode in the APK into binary machine code executable by the target machine, and package it as a static SO file. And the Maple tool chain will reduce the number of instructions through a specific algorithm during compilation and conversion to improve the efficiency of the program.
又例如,服务器上的APK优化框架中可以部署LLVM编译器工具链(low level virtual machine,LLVM)。LLVM可以对APK中的SO库文件进行优化,或者,联合Maple工具链,针对dex文件进行中介码(intermediate representation,IR)优化,以减少指令数,从而提升程序运行效率。For another example, the LLVM compiler tool chain (low level virtual machine, LLVM) can be deployed in the APK optimization framework on the server. LLVM can optimize the SO library files in the APK, or, in conjunction with the Maple tool chain, optimize the intermediate representation (IR) for the dex files to reduce the number of instructions and improve the efficiency of the program.
LLVM是构架编译器(compiler)的框架系统,以C++编写而成,用于优化以任意程序语言编写的程序的编译时间(compile-time)、链接时间(link-time)、运行时间(run-time)以及 空闲时间(idle-time)。LLVM is a framework system that constructs a compiler, written in C ++, and is used to optimize the compile-time, link-time, and run-time of programs written in any programming language. time) and idle-time.
又例如,服务器中的APK优化框架中可以部署各类AOT(Ahead-of-time)编译优化工具,例如:OpenJDK AOT、Angular AOT compiler或Android ART。AOT编译优化工具可以对APK中的程序或者字节码进行AOT编译优化,以减少指令数,从而提升程序运行效率。For another example, various types of AOT (Ahead-of-time) compilation optimization tools can be deployed in the APK optimization framework in the server, such as: OpenJDK AOT, Angular AOT compiler, or Android ART. The AOT compilation and optimization tool can perform AOT compilation and optimization on the programs or bytecodes in the APK to reduce the number of instructions, thereby improving the efficiency of the program.
上述各种优化应用程序的工具或工具链仅是示例,服务器上的APK优化框架中还可以根据APK的发展需求部署其他的优化工具或优化工具链。The above-mentioned various tools or tool chains for optimizing application programs are just examples, and other optimization tools or tool chains can be deployed in the APK optimization framework on the server according to the development needs of the APK.
本申请提出的运行安卓应用程序的方法中,端侧可以从应用市场下载优化后的安卓应用程序后,并将优化后的安卓应用程序安装到端侧设备中。In the method for running an Android application proposed in this application, the end-side can download the optimized Android application from the application market, and install the optimized Android application to the end-side device.
例如,端侧可以从应用市场下载优化后的APK后,并将优化后的APK安装到端侧设备中。For example, the end-side can download the optimized APK from the application market and install the optimized APK into the end-side device.
本申请提出的运行安卓应用程序的方法中,可以在端侧上构建一个能执行服务器优化后的安卓应用程序的运行时环境。例如,可以在端侧的安卓应用程序运行流程中,添加直接执行APK中优化后得到的文件的流程。这样,端侧启动应用程序时,可以加载优化后的文件,以运行优化后的安卓应用程序。In the method for running an Android application proposed in this application, a runtime environment capable of executing the server-optimized Android application can be constructed on the end side. For example, the process of directly executing the optimized file in the APK can be added to the running process of the Android application on the side. In this way, when the application is started on the side, the optimized file can be loaded to run the optimized Android application.
可选地,在端侧上还可以构建一个切换终端设备执行被应用市场优化前的安卓应用程序和被应用市场优化后的安卓应用程序的开关。这样,端侧可以选择执行未优化前的APK或选择执行优化后的APK。Optionally, a switch that switches the terminal device to execute the Android application before being optimized by the application market and the Android application after being optimized by the application market may also be built on the end side. In this way, the end side can choose to execute the APK before optimization or the APK after optimization.
端侧选择执行未优化前的APK时,可以在端侧对APK进行优化,并执行在端侧优化得到的文件,从而达到提高运行效率的目的。也就是说,端侧还可以兼容原有的优化模式。When the end-side chooses to execute the APK before optimization, the APK can be optimized on the end-side, and the files optimized on the end-side can be executed, so as to achieve the purpose of improving operation efficiency. In other words, the end can also be compatible with the original optimization mode.
图2是本申请一个实施例的优化安卓应用程序的方法的示意性流程图。应理解,图2示出了该方法的步骤或操作,但这些步骤或操作仅是示例,本申请实施例还可以执行其他操作或者图2中的各个操作的变形。FIG. 2 is a schematic flowchart of a method for optimizing an Android application program according to an embodiment of the present application. It should be understood that FIG. 2 shows steps or operations of the method, but these steps or operations are merely examples, and other operations or variations of the operations in FIG. 2 may be performed in the embodiments of the present application.
S202,服务器对安卓应用程序的源APK中的待优化文件进行优化,得到待优化文件对应的目标优化文件。S202. The server optimizes the file to be optimized in the source APK of the Android application to obtain the target optimized file corresponding to the file to be optimized.
其中,服务器可以理解为应用市场,安卓应用程序的源APK可以指开发者向服务器发布或上传的APK。The server can be understood as the application market, and the source APK of the Android application can refer to the APK released or uploaded by the developer to the server.
源APK中包括待优化文件。待优化文件可以理解为需要被优化的文件,例如dex文件和/或库文件(library)。The source APK includes files to be optimized. The file to be optimized may be understood as a file that needs to be optimized, such as a dex file and / or a library file.
其中,目标优化文件的代码量少于待优化文件的代码量,和/或,目标优化文件对应的指令数少于待优化文件对应的指令数。The code size of the target optimization file is less than the code size of the file to be optimized, and / or the number of instructions corresponding to the target optimization file is less than the number of instructions corresponding to the file to be optimized.
待优化文件和目标优化文件可以是一一对应的。The file to be optimized and the target optimized file may have a one-to-one correspondence.
S204,服务器向终端设备发送该安卓应用程序的目标APK,目标APK中包括服务器优化得到的目标优化文件。S204, the server sends the target APK of the Android application to the terminal device, and the target APK includes the target optimization file obtained by the server optimization.
该安卓应用程序的目标APK是指服务器对源APK进行优化得到的APK。目标APK中包括待优化文件进行优化后得到的目标优化文件。例如,目标APK中包括dex文件经过优化得到的目标优化文件,和/或,包括库文件经过优化后得到的目标优化文件。The target APK of the Android application refers to an APK obtained by optimizing the source APK by the server. The target APK includes the target optimization file obtained after the file to be optimized is optimized. For example, the target APK includes a target optimized file obtained by optimizing the dex file, and / or a target optimized file obtained after the library file is optimized.
优化后的安卓应用程序运行时可以消耗更少的内存资源。The optimized Android application can consume less memory resources when running.
本申请实施例中,由服务器来对安卓应用程序的源APK进行优化,并向终端设备发 送优化后的目标APK,从而可以使得终端设备不需要自己优化安卓应用程序,进而可以减轻终端设备的运行负担,最终可以提高用户体验。In the embodiment of the present application, the server optimizes the source APK of the Android application and sends the optimized target APK to the terminal device, so that the terminal device does not need to optimize the Android application by itself, thereby reducing the operation of the terminal device The burden can ultimately improve the user experience.
在执行图2所示的方法前,安卓应用程序的源APK已经发布或者上传到该服务器(或者说应用市场)上。Before performing the method shown in FIG. 2, the source APK of the Android application has been published or uploaded to the server (or application market).
在执行图2所示的方法前,该服务器(或者说应用市场)上应部署或安装有用于对安卓应用程序的APK进行优化的软件工具。对安卓应用程序的APK进行优化的一系列软件工具或者软件模块可以称为优化工具链。Before executing the method shown in FIG. 2, a software tool for optimizing the APK of the Android application should be deployed or installed on the server (or application market). A series of software tools or software modules that optimize the APK of the Android application can be called an optimization tool chain.
也就是说,S202中,服务器是通过优化工具链对安卓应用程序的源APK进行优化,从而得到该安卓应用程序的目标APK的。具体地,服务器是通过优化工具链对源APK中的待优化文件进行优化,从而得到目标APK中的目标优化文件的。That is to say, in S202, the server optimizes the source APK of the Android application through the optimization tool chain, thereby obtaining the target APK of the Android application. Specifically, the server optimizes the file to be optimized in the source APK through the optimization tool chain, thereby obtaining the target optimized file in the target APK.
服务器中可以部署有一种或多种优化工具链。例如,该服务器上可以部署有maple工具链、AOT编译优化工具链和LLVM工具链中的至少一种优化工具链。此处所述的至少一种可以理解为一种或多种。这种情况下,服务器对安卓应用程序的源APK进行优化可以包括:服务器使用这至少一种优化工具链中的优化工具链来对源APK中的待优化文件进行优化。One or more optimization tool chains can be deployed in the server. For example, at least one optimization tool chain among the maple tool chain, the AOT compilation optimization tool chain, and the LLVM tool chain may be deployed on the server. At least one type described herein may be understood as one or more types. In this case, the server optimizing the source APK of the Android application may include: the server uses the optimization tool chain in the at least one optimization tool chain to optimize the file to be optimized in the source APK.
本申请实施例的优化方法中,服务器对安卓应用程序的APK进行优化时,在一些可能的实现方式中,服务器可以使用服务器上部署的多个优化工具链对该安卓应用程序的APK进行优化,得到多个目标APK,这多个优化工具链与这多个目标APK一一对应,每个目标APK是与其对应的优化工具链对源APK进行优化得到的。In the optimization method of the embodiment of the present application, when the server optimizes the APK of the Android application, in some possible implementation manners, the server may use multiple optimization tool chains deployed on the server to optimize the APK of the Android application, Multiple target APKs are obtained, and the multiple optimization tool chains correspond to the multiple target APKs. Each target APK is obtained by optimizing the source APK with its corresponding optimization tool chain.
例如,若服务器上部署有maple工具链、Java工具链、AOT工具链和LLVM工具链四种优化工具链,则服务器使用这四种优化工具链对安卓应用程序的源APK进行优化后,可以得到四个目标APK,这四个目标APK与这四种优化工具链一一对应。For example, if four optimization toolchains, maple toolchain, Java toolchain, AOT toolchain, and LLVM toolchain, are deployed on the server, the server uses these four optimization toolchains to optimize the source APK of the Android application, and you can get Four target APKs, which correspond to these four optimization tool chains one by one.
例如,这四个目标APK中的第一个目标APK是服务器使用maple工具链对源APK进行优化得到的;这四个APK中的第二个APK是服务器使用Java工具链对源APK进行优化的到;这四个目标APK中的第三个APK是服务器使用AOT工具链对源APK进行优化得到的;这四个目标APK中的第四个APK是服务器使用LLVM工具链对源APK进行优化得到的。For example, the first of the four target APKs is obtained by the server using the maple tool chain to optimize the source APK; the second APK of the four APKs is the server using the Java tool chain to optimize the source APK To; the third of the four target APKs is obtained by the server using the AOT tool chain to optimize the source APK; the fourth APK of the four target APKs is obtained by the server using the LLVM tool chain to optimize the source APK of.
服务器对APK进行优化时,在另一些可能的实现方式中,也可以多种优化工具链组合起来对源APK进行优化,最终生成一个目标APK。When the server optimizes the APK, in other possible implementation manners, a variety of optimization tool chains can also be combined to optimize the source APK and finally generate a target APK.
例如,源APK中的待优化文件经Maple工具链优化后得到的优化文件,可以作为LLVM工具链的输入,经LLVM工具链优化后得到目标优化文件。For example, the optimized file obtained by optimizing the Maple tool chain in the source APK can be used as the input of the LLVM tool chain, and the target optimized file can be obtained after the LLVM tool chain is optimized.
服务器对APK进行优化时,在另一些可能的实现方式中,服务器行可以预设优化策略,并根据该优化策略选择服务器上部署的一种或多种优化工具链来优化源APK。该优化策略中包括服务器应用调用哪些工具链来来优化源APK中的待优化文件的规则。该优化策略可以是优化策略制定者指定后输入到服务器的,也可以是机器通过人工智能(artificial intelligence,AI)算法生成的策略,作为服务器优化策略。When the server optimizes the APK, in some other possible implementation manners, the server row may preset an optimization strategy, and select one or more optimization tool chains deployed on the server to optimize the source APK according to the optimization strategy. The optimization strategy includes rules of which tool chains are called by the server application to optimize the files to be optimized in the source APK. The optimization strategy may be input to the server after being specified by the optimizer, or may be a strategy generated by the machine through artificial intelligence (AI) algorithm as the server optimization strategy.
本申请实施例的优化方法中,服务器可以在源APK的配置文件中添加目标优化文件的路径信息,得到新的配置文件,并在目标APK中包含该新配置文件,以使得终端设备可以根据该路径信息获取目标优化文件。In the optimization method of the embodiment of the present application, the server may add the path information of the target optimization file to the configuration file of the source APK to obtain a new configuration file, and include the new configuration file in the target APK, so that the terminal device can Path information acquisition target optimization file.
可选地,服务器可以在目标APK的配置文件或者其他文件中配置一个标志,通过该标志指示目标APK中为优化后的APK,其中包括目标优化文件。Optionally, the server may configure a flag in the configuration file or other files of the target APK, and the flag indicates that the target APK is an optimized APK, including the target optimized file.
本申请实施例的方法中,在一些可能的实现方式中,服务器对源APK进行优化后,得到的目标APK中可以包括源APK中的待优化文件、待优化文件之外的文件和待优化文件经过优化得到的目标优化文件。也就是说,目标APK中可以包括源APK中所有的文件和优化后得到的目标优化文件。In the method of the embodiment of the present application, in some possible implementation manners, after the server optimizes the source APK, the obtained target APK may include files to be optimized in the source APK, files other than files to be optimized, and files to be optimized The target optimization file obtained after optimization. In other words, the target APK may include all the files in the source APK and the optimized target files obtained after optimization.
例如,若源APK中包括资源文件(resource)、配置文件和dex文件,则服务器对该dex文件进行优化后,得到的目标APK中可以包括资源文件、配置文件、dex文件和dex文件经过优化后得到的文件。其中,dex文件为待优化文件,dex文件经过优化后得到的文件为目标优化文件,目标优化文件中可以包括优化得到的机器码。For example, if the source APK includes a resource file (resource), a configuration file, and a dex file, after the server optimizes the dex file, the obtained target APK may include a resource file, a configuration file, a dex file, and a dex file after optimization Get the file. The dex file is a file to be optimized, and the file obtained after the dex file is optimized is a target optimization file, and the target optimization file may include the optimized machine code.
例如,如图3所示,开发者向应用市场发布的安卓应用程序的APK中包括资源文件、dex文件和库文件(library)。应理解,该APK中还可以包括其他相关文件。For example, as shown in FIG. 3, the APK of the Android application released by the developer to the application market includes a resource file, a dex file, and a library file. It should be understood that the APK may also include other related files.
则服务器对该dex文件和库文件进行优化后,得到的目标APK中可以包括资源文件、配置文件、dex文件、优化前的库文件、dex文件经过优化后得到的文件和优化后得到的库文件。其中,dex文件为待优化文件,dex文件经过优化后得到的文件和优化后得到的库文件为目标优化文件,目标优化文件中可以包括优化得到的机器码,优化后得到的库文件与优化前的库文件相比,指令数较少。After the server optimizes the dex file and the library file, the target APK obtained may include resource files, configuration files, dex files, library files before optimization, files obtained after optimization of the dex files, and library files obtained after optimization . Among them, the dex file is the file to be optimized, the file obtained after the optimization of the dex file and the library file obtained after the optimization are the target optimization file, the target optimization file may include the machine code obtained by the optimization, the library file obtained after the optimization and the optimization Compared with the library file, the number of instructions is less.
若dex文件和库文件为待优化文件,则应用市场中的优化工具链对dex文件和库文件均进行优化后,可以得到dex文件对应的目标优化文件和库文件对应的目标优化文件。If the dex file and the library file are files to be optimized, after the optimization tool chain in the application market optimizes both the dex file and the library file, the target optimization file corresponding to the dex file and the target optimization file corresponding to the library file can be obtained.
这种情况下,应用市场向终端设备发送的目标APK中可以包括源APK中的文件、dex文件对应的目标优化文件和库文件对应的目标优化文件。In this case, the target APK sent by the application market to the terminal device may include a file in the source APK, a target optimization file corresponding to the dex file, and a target optimization file corresponding to the library file.
该实现方式使得终端设备即使不能直接执行APK中优化后的文件时,也可以自己对源APK中的待优化文件进行优化并执行自己优化后得到的目标优化文件,从而可以正常启动该安卓应用程序。This implementation method enables the terminal device to optimize the files to be optimized in the source APK and execute the target optimized files obtained after optimization by itself even if the optimized files in the APK cannot be directly executed, so that the Android application can be normally started .
本申请实施例的方法中,在另一些可能的实现方式中,服务器对源APK进行优化后,得到的目标APK中可以仅包括源APK中待优化文件之外的文件和待优化文件经过优化得到的目标优化文件。也就是说,目标APK中可以不包括源APK中的待优化文件。In the method of the embodiment of the present application, in some other possible implementation manners, after the server optimizes the source APK, the obtained target APK may include only files other than the file to be optimized in the source APK and the file to be optimized after optimization Optimized files. In other words, the target APK may not include the file to be optimized in the source APK.
例如,开发者向服务器发布的APK中包括资源文件(resource)、配置文件和dex文件,其中,dex文件即为待优化文件,则服务器对dex文件进行优化后,得到的目标APK中可以包括资源文件、配置文件和dex文件对应的目标优化文件。For example, the APK released by the developer to the server includes a resource file (resource), a configuration file, and a dex file. Among them, the dex file is the file to be optimized. After the server optimizes the dex file, the target APK obtained may include resources Target optimization files corresponding to files, configuration files and dex files.
该可能的实现方式与前一种可能的实现方式相比,可以减小目标APK的大小。Compared with the previous possible implementation manner, this possible implementation manner can reduce the size of the target APK.
本申请实施例的方法中,可选地,在S201之前,还可以包括:服务器从终端设备接收用于请求下载安卓应用程序的消息。即服务器在接收到终端设备发送的下载安卓应用程序请求后,才向终端设备发送该安卓应用程序的目标APK。In the method of the embodiment of the present application, optionally, before S201, the method may further include: the server receives a message requesting to download the Android application from the terminal device. That is, the server sends the target APK of the Android application to the terminal device after receiving the request to download the Android application from the terminal device.
图4是本申请一个实施例的运行安卓应用程序的方法的示意性流程图。应理解,图4示出了该方法的步骤或操作,但这些步骤或操作仅是示例,本申请实施例还可以执行其他操作或者图4中的各个操作的变形。4 is a schematic flowchart of a method for running an Android application according to an embodiment of the present application. It should be understood that FIG. 4 shows steps or operations of the method, but these steps or operations are only examples, and other operations or variations of the operations in FIG. 4 may be performed in the embodiments of the present application.
S402,终端设备从服务器接收安卓应用程序的目标APK,该目标APK中包括安卓应用程序的源APK中的待优化文件经过优化得到的目标优化文件。S402. The terminal device receives the target APK of the Android application from the server, and the target APK includes the target optimization file obtained by optimizing the file to be optimized in the source APK of the Android application.
或者可以说,终端设备从服务器下载安卓应用程序的目标APK。Or it can be said that the terminal device downloads the target APK of the Android application from the server.
其中,服务器可以理解为应用市场,安卓应用程序的源APK可以指开发者向服务器发布或上传的APK,该安卓应用程序的目标APK可以指服务器对该源APK进行优化得到的APK。The server can be understood as an application market. The source APK of an Android application can refer to an APK published or uploaded by a developer to the server. The target APK of the Android application can refer to an APK obtained by optimizing the source APK by the server.
源APK中包括待优化文件。待优化文件可以理解为需要被优化的文件,例如dex文件和/或库文件(library)。目标APK中包括待优化文件进行优化后得到的目标优化文件,例如dex文件和/或库文件经过优化后得到的文件为目标优化文件。待优化文件和目标优化文件可以是一一对应的。The source APK includes files to be optimized. The file to be optimized may be understood as a file that needs to be optimized, such as a dex file and / or a library file. The target APK includes the target optimized file obtained after the file to be optimized is optimized, for example, the file obtained after the optimization of the dex file and / or library file is the target optimized file. The file to be optimized and the target optimized file may have a one-to-one correspondence.
其中,目标优化文件的代码量少于待优化文件的代码量,和/或,目标优化文件对应的指令数少于待优化文件对应的指令数。The code size of the target optimization file is less than the code size of the file to be optimized, and / or the number of instructions corresponding to the target optimization file is less than the number of instructions corresponding to the file to be optimized.
S404,终端设备根据目标APK中的目标优化文件运行安卓应用程序。S404, the terminal device runs the Android application according to the target optimized file in the target APK.
终端设备根据该目标APK运行该安卓应用程序之前,该终端设备上应已部署了能够从目标APK中直接加载目标优化文件的运行时环境。Before the terminal device runs the Android application according to the target APK, a runtime environment capable of directly loading the target optimization file from the target APK should be deployed on the terminal device.
本申请实施例的方法中,由于终端设备从服务器下载的APK是经过优化的,因此,终端设备可以不用自己对APK进行优化,从而可以减轻终端设备的负担,进而可以提高用户体验。In the method of the embodiment of the present application, since the APK downloaded from the server by the terminal device is optimized, the terminal device does not need to optimize the APK by itself, thereby reducing the burden on the terminal device and improving the user experience.
为了方便描述,本申请实施例中,将服务器对源APK中的待优化文件优化得到的目标优化文件称为第一目标优化文件。For convenience of description, in the embodiment of the present application, the target optimization file obtained by the server optimizing the file to be optimized in the source APK is referred to as the first target optimization file.
终端设备根据目标APK中的第一目标优化文件运行安卓应用程序时,一种实现方式可以包括:根据配置文件中记录的第一目标优化文件的路径信息读取目标优化文件,然后运行该第一目标优化文件。When the terminal device runs the Android application according to the first target optimization file in the target APK, an implementation manner may include: reading the target optimization file according to the path information of the first target optimization file recorded in the configuration file, and then running the first Target optimization files.
可选地,终端设备可以先判断终端设备从应用市场下载的APK中是否是优化后的目标APK,或者说,终端设备可以先判断终端设备从应用市场下载的APK中是否包括第一目标优化文件。若包括,则可以读取第一目标优化文件,并运行第一目标优化文件。Optionally, the terminal device may first determine whether the APK downloaded by the terminal device from the application market is an optimized target APK, or, the terminal device may first determine whether the APK downloaded by the terminal device from the application market includes the first target optimization file . If so, you can read the first target optimization file and run the first target optimization file.
本申请实施例的方法中,可选地,终端设备可以选择根据目标APK中的目标优化文件来启动安卓应用程序;或终端设备可选择自己优化源APK中的待优化文件,并根据自己优化后得到的文件来启动安卓应用程序。In the method of the embodiment of the present application, optionally, the terminal device may choose to start the Android application according to the target optimization file in the target APK; or the terminal device may choose to optimize the file to be optimized in the source APK by itself, and optimize it according to its own Get the file to start the Android application.
例如,终端设备从服务器接收安卓应用程序的APK后,若该APK是没有优化过的APK,即是开发者发布到服务器的源APK,则终端设备可以自己优化APK中的待优化文件,并根据自己优化后得到的文件来启动安卓应用程序。该实现方式使得终端设备即使从应用市场下载的是没有优化的源APK,也可以正常启动该安卓应用程序。For example, after the terminal device receives the APK of the Android application from the server, if the APK is an APK that has not been optimized, that is, the source APK released by the developer to the server, the terminal device can optimize the files to be optimized in the APK by itself, and according to Start the Android application with the optimized file. This implementation mode enables the terminal device to normally start the Android application even if it is downloaded from the application market without an optimized source APK.
在一些实现方式中,即使终端设备从服务器下载的是优化后的目标APK,终端设备也可以确定是根据目标APK中的目标优化文件来启动安卓应用程序,或,可以确定自己优化源APK中的待优化文件,并根据自己优化后得到的文件来启动安卓应用程序。In some implementations, even if the terminal device downloads the optimized target APK from the server, the terminal device may determine to start the Android application according to the target optimization file in the target APK, or may determine that it has optimized the source APK To optimize the file, and start the Android application according to the file obtained after optimization.
例如,终端设备上可以预先配置有执行策略或从服务器下载执行策略,终端设备可以根据该执行策略确定是根据目标APK中的目标优化文件启动安卓应用程序,还是自己优化源APK中的待优化文件,并根据自己优化后得到的文件来启动安卓应用程序。For example, the terminal device may be pre-configured with an execution strategy or downloaded from the server, and the terminal device may determine whether to start the Android application according to the target optimization file in the target APK or optimize the file to be optimized in the source APK by itself. , And start the Android application based on the files you have optimized.
例如,执行策略中可以包括如下内容:终端设备默认根据目标APK中的目标优化文件来启动安卓应用程序;在根据目标APK中的目标优化文件启动或运行安卓应用程序失 败的情况下,终端设备优化源APK中的待优化文件,并根据自己优化后得到的文件来启动安卓应用程序。For example, the execution strategy may include the following: the terminal device defaults to start the Android application according to the target optimization file in the target APK; in the case of failing to start or run the Android application according to the target optimization file in the target APK, the terminal device optimization The files to be optimized in the source APK, and start the Android application according to the files obtained after optimization.
本申请实施例的运行方法中,在一些可能的实现方式中,目标APK中可以仅包括源APK中待优化文件之外的文件和待优化文件经过优化得到的目标优化文件。也就是说,目标APK中可以不包括源APK中的待优化文件。In the running method of the embodiment of the present application, in some possible implementation manners, the target APK may include only files other than the file to be optimized in the source APK and the target optimized file obtained through optimization of the file to be optimized. In other words, the target APK may not include the file to be optimized in the source APK.
例如,开发者向服务器发布的APK中包括资源文件(resource)、配置文件和dex文件,且dex文件为待优化文件,则服务器对dex文件进行优化后,得到的目标APK中可以包括资源文件、配置文件和dex文件经过优化得到的目标优化文件。For example, the APK released by the developer to the server includes a resource file (resource), a configuration file, and a dex file, and the dex file is a file to be optimized. After the server optimizes the dex file, the target APK obtained may include the resource file, Target optimization file obtained by optimizing configuration file and dex file.
该实现方式中,终端设备的下载量较小,从而可以提高下载速度,进而提高用户体验。In this implementation manner, the download volume of the terminal device is relatively small, so that the download speed can be improved, thereby improving the user experience.
本申请实施例的运行方法中,在另一些可能的实现方式中,目标APK中可以包括源APK中的待优化文件、待优化文件之外的文件和待优化文件经过优化得到的第一目标优化文件。也就是说,目标APK中可以包括源APK中所有的文件和待优化文件经过优化得到的第一目标优化文件。In the running method of the embodiment of the present application, in some other possible implementation manners, the target APK may include a file to be optimized in the source APK, a file other than the file to be optimized, and a first target optimization obtained through optimization of the file to be optimized file. In other words, the target APK may include all files in the source APK and the first target optimized file obtained by optimization of the file to be optimized.
例如,若源APK中包括资源文件、配置文件和dex文件,且dex文件为待优化文件,则目标APK中可以包括资源文件、配置文件、dex文件和dex文件经过优化得到的第一目标优化文件。For example, if the source APK includes a resource file, a configuration file, and a dex file, and the dex file is a file to be optimized, the target APK may include a resource target, a configuration file, a dex file, and a first target optimized file obtained by optimization .
例如,如图3所示,开发者向应用市场发布的安卓应用程序的APK中包括资源文件、dex文件和库文件。终端设备从应用市场下载的目标APK中可以包括源APK中的文件、dex文件经过优化得到的第一目标优化文件和库文件经过优化得到的第一目标优化文件。For example, as shown in FIG. 3, the APK of the Android application released by the developer to the application market includes resource files, dex files, and library files. The target APK downloaded from the application market by the terminal device may include the file in the source APK, the first target optimized file obtained by optimizing the dex file, and the first target optimized file obtained by optimizing the library file.
这种情况下,终端设备可以确定需要根据目标APK中的第一目标优化文件来启动安卓应用程序;或确定需要自己优化目标APK中的待优化文件,并根据自己优化后得到的文件来启动安卓应用程序。为了描述方便,可以将终端设备自己优化得到的文件称为第二目标优化文件。In this case, the terminal device may determine that the Android application needs to be started according to the first target optimization file in the target APK; or determine that the file to be optimized in the target APK needs to be optimized by itself, and start Android based on the file obtained after optimization application. For convenience of description, the file optimized by the terminal device itself may be referred to as a second target optimization file.
若终端设备确定需要根据目标APK中的第一目标优化文件运行安卓应用程序,则可以根据目标APK中的第一目标优化文件运行安卓应用程序;若终端设备确定不需要根据目标APK中的第一目标优化文件运行安卓应用程序,则终端设备可以对目标APK中的待优化文件进行优化,得到第二目标优化文件,并根据第二目标优化文件运行安卓应用程序。If the terminal device determines that the Android application needs to be run according to the first target optimization file in the target APK, it can run the Android application according to the first target optimization file in the target APK; if the terminal device determines that it does not need to run according to the first target in the target APK If the target optimized file runs the Android application, the terminal device can optimize the file to be optimized in the target APK to obtain the second target optimized file, and run the Android application according to the second target optimized file.
本申请实施例的运行方法中,可选地,在终端设备从服务器接收安卓应用程序的目标APK之前,还可以包括:终端设备向服务器发送下载安卓应用程序的请求消息,以便于服务器根据该请求消息向终端设备发送安卓应用程序的APK。In the operation method of the embodiment of the present application, optionally, before the terminal device receives the target APK of the Android application from the server, the method may further include: the terminal device sends a request message for downloading the Android application to the server, so that the server can respond to the request The message sends the APK of the Android application to the terminal device.
图5是本申请实施例的优化安卓运行程序的装置500的示意性框图。应理解,装置500仅是一种示例。本申请实施例的装置还可包括其他模块或单元,或者包括与图5中的各个模块的功能相似的模块,或者并非要包括图5中的所有模块。FIG. 5 is a schematic block diagram of an apparatus 500 for optimizing an Android running program according to an embodiment of the present application. It should be understood that the device 500 is only an example. The device in the embodiment of the present application may further include other modules or units, or include modules with similar functions to the modules in FIG. 5, or not necessarily include all modules in FIG. 5.
优化模块510,用于对安卓应用程序的源安卓安装包APK中的待优化文件进行优化,得到所述待优化文件对应的目标优化文件。The optimization module 510 is used for optimizing the files to be optimized in the source Android installation package APK of the Android application to obtain the target optimization file corresponding to the files to be optimized.
发送模块520,用于向终端设备发送所述安卓应用程序的目标APK,所述目标APK中包括所述目标优化文件。The sending module 520 is configured to send a target APK of the Android application to a terminal device, where the target APK includes the target optimization file.
可选地,所述目标APK中还包括所述待优化文件。Optionally, the target APK further includes the file to be optimized.
可选地,所述待优化文件包括dex文件,所述dex文件为安卓虚拟机中的可执行文件。Optionally, the file to be optimized includes a dex file, and the dex file is an executable file in an Android virtual machine.
可选地,所述待优化文件包括库文件。Optionally, the file to be optimized includes a library file.
可选地,所述服务器上部署有以下至少一种优化工具链:Maple工具链、底层虚拟机LLVM工具链、提前AOT编译优化工具链。Optionally, at least one of the following optimization tool chains is deployed on the server: the Maple tool chain, the underlying virtual machine LLVM tool chain, and the AOT compilation optimization tool chain in advance.
其中,所述优化模块具体用于:使用所述至少一种优化工具链中的优化工具链对所述源APK中的待优化文件进行优化。The optimization module is specifically configured to: use the optimization tool chain in the at least one optimization tool chain to optimize the files to be optimized in the source APK.
可选地,所述装置还包括接收模块530,用于:在所述优化模块对安卓应用程序的源APK中的待优化文件进行优化之前,从所述终端设备接收用于请求下载所述安卓应用程序的请求消息。Optionally, the apparatus further includes a receiving module 530, configured to: before the optimization module optimizes the file to be optimized in the source APK of the Android application, receive a request from the terminal device to download the Android Application request message.
装置500可以用于执行图2描述的方法的步骤,为了简洁,此处不再赘述。The apparatus 500 may be used to perform the steps of the method described in FIG. 2, and for the sake of brevity, details are not described here.
图6是本申请实施例的运行安卓应用程序的装置600的示意性框图。应理解,装置600仅是一种示例。本申请实施例的装置还可包括其他模块或单元,或者包括与图6中的各个模块的功能相似的模块,或者并非要包括图6中的所有模块。FIG. 6 is a schematic block diagram of an apparatus 600 for running an Android application program according to an embodiment of the present application. It should be understood that the device 600 is only an example. The device in the embodiment of the present application may further include other modules or units, or include modules with similar functions to the modules in FIG. 6, or not necessarily include all modules in FIG. 6.
接收模块610,用于从服务器接收安卓应用程序的目标安卓安装包APK,所述目标APK中包括所述安卓应用程序的源APK中的待优化文件经过优化得到的第一目标优化文件。The receiving module 610 is configured to receive the target Android installation package APK of the Android application from the server, where the target APK includes the first target optimized file obtained by optimizing the file to be optimized in the source APK of the Android application.
运行模块620,用于根据所述目标APK中的所述第一目标优化文件运行所述安卓应用程序。The running module 620 is configured to run the Android application according to the first target optimization file in the target APK.
可选地,所述目标APK中还包括所述待优化文件。Optionally, the target APK further includes the file to be optimized.
可选地,所述装置还包括:确定模块,用于确定是否需要根据所述目标APK中的所述第一目标优化文件运行所述安卓应用程序。其中,所述运行模块具体用于:在所述确定模块确定需要根据所述目标APK中的所述第一目标优化文件运行所述安卓应用程序时,根据所述目标APK中的所述第一目标优化文件运行所述安卓应用程序。所述装置还包括优化模块630,用于在所述确定模块确定不需要根据所述目标APK中的所述第一目标优化文件运行所述安卓应用程序时,对所述待优化文件进行优化,得到第二目标优化文件;此时,所述运行模块还用于根据所述第二目标优化文件运行所述安卓应用程序。Optionally, the device further includes: a determining module, configured to determine whether the Android application needs to be run according to the first target optimization file in the target APK. Wherein, the running module is specifically configured to: according to the first in the target APK when the determining module determines that the Android application needs to be run according to the first target optimization file in the target APK The target optimization file runs the Android application. The device further includes an optimization module 630 for optimizing the file to be optimized when the determination module determines that it is not necessary to run the Android application according to the first target optimization file in the target APK, A second target optimization file is obtained; at this time, the running module is also used to run the Android application according to the second target optimization file.
可选地,所述待优化文件包括dex文件,所述dex文件为安卓虚拟机中的可执行文件。Optionally, the file to be optimized includes a dex file, and the dex file is an executable file in an Android virtual machine.
可选地,所述待优化文件包括库文件。Optionally, the file to be optimized includes a library file.
可选地,所述装置还包括发送模块640,用于:在所述下载模块从服务器接收安卓应用程序的目标APK之前,向所述服务器发送用于请求下载所述安卓应用程序的请求消息。Optionally, the device further includes a sending module 640, which is configured to: before the download module receives the target APK of the Android application from the server, send a request message for requesting download of the Android application to the server.
装置600可以用于执行图4描述的方法的步骤,为了简洁,此处不再赘述。The apparatus 600 may be used to perform the steps of the method described in FIG. 4, and for the sake of brevity, details are not described here.
装置600的一种示例为终端设备。An example of the device 600 is a terminal device.
图7是本申请另一个实施例的运行安卓应用程序的装置的示意性结构图。应理解,图7示出的装置700仅是示例,本申请实施例的装置还可包括其他模块或单元,或者包括与图7中的各个模块的功能相似的模块。7 is a schematic structural diagram of an apparatus for running an Android application program according to another embodiment of the present application. It should be understood that the apparatus 700 shown in FIG. 7 is only an example, and the apparatus in the embodiment of the present application may further include other modules or units, or include modules with similar functions as the modules in FIG. 7.
装置700可以包括一个或多个处理器710,一个或多个存储器720,发送器740。存储器720用于存储处理器710执行的程序代码。处理器710用于调取存储器720中的指令。发送器740用于发送信息。The apparatus 700 may include one or more processors 710, one or more memories 720, and a transmitter 740. The memory 720 is used to store program codes executed by the processor 710. The processor 710 is used to retrieve instructions in the memory 720. The transmitter 740 is used to transmit information.
其中,处理器710中可以集成有存储器720,或者处理器710耦合到一个或多个存储器720。The processor 710 may be integrated with a memory 720, or the processor 710 is coupled to one or more memories 720.
可选地,装置700还可以包括接收器730。接收器730和发送器740可以集成在一起,称为收发器。Optionally, the apparatus 700 may further include a receiver 730. The receiver 730 and the transmitter 740 may be integrated together, called a transceiver.
处理器710可以用于实现图5中的优化模块510能够实现的操作或步骤;发送器740可以用于实现图5中的发送模块520能够实现的操作或步骤;接收器730可以用于实现图5中的接收模块530能够实现的操作或步骤。The processor 710 may be used to implement operations or steps that the optimization module 510 in FIG. 5 can implement; the transmitter 740 may be used to implement operations or steps that the transmission module 520 in FIG. 5 may implement; The operations or steps that the receiving module 530 in 5 can implement.
装置700的一种示例为服务器。An example of the device 700 is a server.
图8是本申请另一个实施例的运行安卓应用程序的装置的示意性结构图。应理解,图8示出的装置800仅是示例,本申请实施例的装置还可包括其他模块或单元,或者包括与图8中的各个模块的功能相似的模块。FIG. 8 is a schematic structural diagram of an apparatus for running an Android application according to another embodiment of the present application. It should be understood that the apparatus 800 shown in FIG. 8 is only an example, and the apparatus in the embodiment of the present application may further include other modules or units, or include modules with similar functions as the modules in FIG.
装置800可以包括一个或多个处理器810,一个或多个存储器820,接收器830。存储器820用于存储处理器810执行的程序代码。处理器810用于调取存储器820中的指令。发送器840用于发送信息。The device 800 may include one or more processors 810, one or more memories 820, and a receiver 830. The memory 820 is used to store program codes executed by the processor 810. The processor 810 is used to retrieve instructions in the memory 820. The transmitter 840 is used to transmit information.
其中,处理器810中可以集成有存储器820,或者处理器810耦合到一个或多个存储器720。The processor 810 may be integrated with a memory 820, or the processor 810 is coupled to one or more memories 720.
可选地,装置800还可以包括发送器840。接收器830和发送器840可以集成在一起,称为收发器。Optionally, the device 800 may further include a transmitter 840. The receiver 830 and the transmitter 840 may be integrated together, called a transceiver.
处理器810可以用于实现图6中的运行模块620和优化模块630能够实现的操作或步骤;接收器830可以用于实现图6中的接收模块610能够实现的操作或步骤;发送器840可以用于实现图6中的发送模块640能够实现的操作或步骤。The processor 810 may be used to implement operations or steps that can be implemented by the running module 620 and the optimization module 630 in FIG. 6; the receiver 830 may be used to implement operations or steps that can be implemented by the receiving module 610 in FIG. It is used to implement operations or steps that can be implemented by the sending module 640 in FIG. 6.
装置800的一种示例为终端设备。An example of the device 800 is a terminal device.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art may realize that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in hardware or software depends on the specific application of the technical solution and design constraints. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and conciseness of the description, the specific working process of the system, device and unit described above can refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed system, device, and method may be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a division of logical functions. In actual implementation, there may be other divisions, for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储 在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only Memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the function is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present application essentially or part of the contribution to the existing technology or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to enable a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program code .
应理解,本申请实施例中的处理器可以是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法实施例的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器可以是通用处理器、数字信号处理器(digital signal processor,DSP)、专用集成电路(application specific integrated circuit,ASIC)、现场可编程门阵列(field programmable gate array,FPGA)或者其它可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请各实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法的步骤。It should be understood that the processor in the embodiments of the present application may be an integrated circuit chip, which has signal processing capabilities. In the implementation process, each step of the foregoing method embodiment may be completed by an integrated logic circuit of hardware in a processor or instructions in the form of software. The aforementioned processor may be a general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other available Programming logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps, and logical block diagrams disclosed in the embodiments of the present application may be implemented or executed. The general-purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in conjunction with the embodiments of the present application may be directly embodied and executed by a hardware decoding processor, or may be executed and completed by a combination of hardware and software modules in the decoding processor. The software module may be located in a mature storage medium in the art, such as a random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, and register. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above is only the specific implementation of this application, but the scope of protection of this application is not limited to this, any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in this application. It should be covered by the scope of protection of this application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (24)

  1. 一种优化安卓应用程序的方法,其特征在于,包括:A method for optimizing Android applications, which is characterized by including:
    服务器对安卓应用程序的源安卓安装包APK中的待优化文件进行优化,得到所述待优化文件对应的目标优化文件;The server optimizes the files to be optimized in the source Android installation package APK of the Android application to obtain the target optimization files corresponding to the files to be optimized;
    所述服务器向终端设备发送所述安卓应用程序的目标APK,所述目标APK中包括所述目标优化文件。The server sends a target APK of the Android application to a terminal device, where the target APK includes the target optimization file.
  2. 如权利要求1所述的方法,其特征在于,所述目标APK中还包括所述待优化文件。The method of claim 1, wherein the target APK further includes the file to be optimized.
  3. 如权利要求1或2所述的方法,其特征在于,所述待优化文件包括dex文件,所述dex文件为安卓虚拟机中的可执行文件。The method according to claim 1 or 2, wherein the file to be optimized includes a dex file, and the dex file is an executable file in an Android virtual machine.
  4. 如权利要求1至3中任一项所述的方法,其特征在于,所述待优化文件包括库文件。The method according to any one of claims 1 to 3, wherein the file to be optimized includes a library file.
  5. 如权利要求1至4中任一项所述的方法,其特征在于,所述服务器上部署有以下至少一种优化工具链:Maple工具链、底层虚拟机LLVM工具链、提前AOT编译优化工具链;The method according to any one of claims 1 to 4, wherein at least one of the following optimization tool chains is deployed on the server: Maple tool chain, underlying virtual machine LLVM tool chain, and AOT compilation optimization tool chain ;
    其中,所述服务器对安卓应用程序的源APK中的待优化文件进行优化,包括:Wherein, the server optimizes the files to be optimized in the source APK of the Android application, including:
    所述服务器使用所述至少一种优化工具链中的优化工具链对所述源APK中的待优化文件进行优化。The server uses an optimization tool chain in the at least one optimization tool chain to optimize files to be optimized in the source APK.
  6. 如权利要求1至5中任一项所述的方法,其特征在于,所述服务器对安卓应用程序的源APK中的待优化文件进行优化之前,所述方法还包括:The method according to any one of claims 1 to 5, wherein before the server optimizes the file to be optimized in the source APK of the Android application, the method further comprises:
    所述服务器从所述终端设备接收用于请求下载所述安卓应用程序的请求消息。The server receives a request message for requesting to download the Android application program from the terminal device.
  7. 一种运行安卓应用程序的方法,其特征在于,包括:A method for running an Android application program, characterized in that it includes:
    终端设备从服务器接收安卓应用程序的目标安卓安装包APK,所述目标APK中包括所述安卓应用程序的源APK中的待优化文件经过优化得到的第一目标优化文件;The terminal device receives the target Android installation package APK of the Android application from the server, and the target APK includes the first target optimization file obtained by optimizing the file to be optimized in the source APK of the Android application;
    所述终端设备根据所述目标APK中的所述第一目标优化文件运行所述安卓应用程序。The terminal device runs the Android application according to the first target optimization file in the target APK.
  8. 如权利要求7所述的方法,其特征在于,所述目标APK中还包括所述源APK中的所述待优化文件。The method according to claim 7, wherein the target APK further includes the file to be optimized in the source APK.
  9. 如权利要求8所述的方法,其特征在于,所述方法还包括:The method of claim 8, wherein the method further comprises:
    所述终端设备确定是否需要根据所述目标APK中的所述第一目标优化文件运行所述安卓应用程序;The terminal device determines whether it is necessary to run the Android application according to the first target optimization file in the target APK;
    其中,所述终端设备根据所述目标APK中的所述第一目标优化文件运行所述安卓应用程序,包括:Wherein, the terminal device running the Android application according to the first target optimization file in the target APK includes:
    所述终端设备确定需要根据所述目标APK中的所述第一目标优化文件运行所述安卓应用程序时,根据所述目标APK中的所述第一目标优化文件运行所述安卓应用程序;When the terminal device determines that the Android application needs to be run according to the first target optimization file in the target APK, the Android application is run according to the first target optimization file in the target APK;
    所述方法还包括:The method also includes:
    所述终端设备确定不需要根据所述目标APK中的所述第一目标优化文件运行所述安卓应用程序时,对所述目标APK中的所述待优化文件进行优化,得到第二目标优化文件;When the terminal device determines that it is not necessary to run the Android application according to the first target optimization file in the target APK, optimize the file to be optimized in the target APK to obtain a second target optimization file ;
    所述终端设备根据所述第二目标优化文件运行所述安卓应用程序。The terminal device runs the Android application according to the second target optimization file.
  10. 如权利要求7至9中任一项所述的方法,其特征在于,所述待优化文件包括dex文件,所述dex文件为安卓虚拟机中的可执行文件。The method according to any one of claims 7 to 9, wherein the file to be optimized includes a dex file, and the dex file is an executable file in an Android virtual machine.
  11. 如权利要求7至10中任一项所述的方法,其特征在于,所述待优化文件包括库文件。The method according to any one of claims 7 to 10, wherein the file to be optimized includes a library file.
  12. 如权利要求7至11中任一项所述的方法,其特征在于,所述终端设备从服务器接收安卓应用程序的目标APK之前,所述方法还包括:The method according to any one of claims 7 to 11, wherein before the terminal device receives the target APK of the Android application from the server, the method further comprises:
    所述终端设备向所述服务器发送用于请求下载所述安卓应用程序的请求消息。The terminal device sends a request message for downloading the Android application to the server.
  13. 一种优化安卓应用程序的装置,其特征在于,包括:An apparatus for optimizing an Android application program is characterized in that it includes:
    处理器,用于对安卓应用程序的源安卓安装包APK中的待优化文件进行优化,得到所述待优化文件对应的目标优化文件;A processor, configured to optimize the file to be optimized in the source Android installation package APK of the Android application, to obtain a target optimization file corresponding to the file to be optimized;
    发送器,用于向终端设备发送所述安卓应用程序的目标APK,所述目标APK中包括所述目标优化文件。The transmitter is used to send a target APK of the Android application to a terminal device, where the target APK includes the target optimization file.
  14. 如权利要求13所述的装置,其特征在于,所述目标APK中还包括所述待优化文件。The apparatus according to claim 13, wherein the target APK further includes the file to be optimized.
  15. 如权利要求13或14所述的装置,其特征在于,所述待优化文件包括dex文件,所述dex文件为安卓虚拟机中的可执行文件。The apparatus according to claim 13 or 14, wherein the file to be optimized includes a dex file, and the dex file is an executable file in an Android virtual machine.
  16. 如权利要求13至15中任一项所述的装置,其特征在于,所述待优化文件包括库文件。The device according to any one of claims 13 to 15, wherein the file to be optimized includes a library file.
  17. 如权利要求13至16中任一项所述的装置,其特征在于,所述服务器上部署有以下至少一种优化工具链:Maple工具链、底层虚拟机LLVM工具链、提前AOT编译优化工具链;The device according to any one of claims 13 to 16, wherein at least one of the following optimization tool chains is deployed on the server: Maple tool chain, underlying virtual machine LLVM tool chain, and advance AOT compilation optimization tool chain ;
    其中,所述处理器具体用于:使用所述至少一种优化工具链中的优化工具链对所述源APK中的待优化文件进行优化。The processor is specifically configured to: use the optimization tool chain in the at least one optimization tool chain to optimize the files to be optimized in the source APK.
  18. 如权利要求13至17中任一项所述的装置,其特征在于,所述装置还包括接收器,用于:在所述处理器对安卓应用程序的源APK中的待优化文件进行优化之前,从所述终端设备接收用于请求下载所述安卓应用程序的请求消息。The device according to any one of claims 13 to 17, wherein the device further comprises a receiver for: before the processor optimizes the file to be optimized in the source APK of the Android application Receiving a request message for downloading the Android application from the terminal device.
  19. 一种运行安卓应用程序的装置,其特征在于,包括:An apparatus for running an Android application program is characterized by comprising:
    接收器,用于从服务器接收安卓应用程序的目标安卓安装包APK,所述目标APK中包括所述安卓应用程序的源APK中的待优化文件经过优化得到的目标优化文件;The receiver is used to receive the target Android installation package APK of the Android application from the server, and the target APK includes the target optimization file obtained by optimizing the file to be optimized in the source APK of the Android application;
    处理器,用于根据所述目标APK中的所述目标优化文件运行所述安卓应用程序。The processor is configured to run the Android application according to the target optimization file in the target APK.
  20. 如权利要求19所述的装置,其特征在于,所述目标APK中还包括所述源APK中的所述待优化文件。The apparatus of claim 19, wherein the target APK further includes the file to be optimized in the source APK.
  21. 如权利要求20所述的装置,其特征在于,所述处理器还用于:确定是否需要根据所述目标APK中的所述第一目标优化文件运行所述安卓应用程序;The apparatus of claim 20, wherein the processor is further configured to: determine whether it is necessary to run the Android application according to the first target optimization file in the target APK;
    其中,所述处理器具体用于:确定需要根据所述目标APK中的所述第一目标优化文件运行所述安卓应用程序时,根据所述目标APK中的所述目标优化文件运行所述安卓应用程序;Wherein, the processor is specifically configured to: when determining that the Android application needs to be run according to the first target optimization file in the target APK, run the Android according to the target optimization file in the target APK application;
    所述处理器还用于:确定不需要根据所述目标APK中的所述第一目标优化文件运行 所述安卓应用程序时,对所述目标APK中的待优化文件进行优化,得到第二目标优化文件;根据所述第二目标优化文件运行所述安卓应用程序。The processor is further configured to: when it is not necessary to run the Android application according to the first target optimization file in the target APK, optimize the file to be optimized in the target APK to obtain a second target Optimize the file; run the Android application according to the second target optimized file.
  22. 如权利要求19至21中任一项所述的装置,其特征在于,所述待优化文件包括dex文件,所述dex文件为安卓虚拟机中的可执行文件。The device according to any one of claims 19 to 21, wherein the file to be optimized includes a dex file, and the dex file is an executable file in an Android virtual machine.
  23. 如权利要求19至22中任一项所述的装置,其特征在于,所述待优化文件包括库文件。The device according to any one of claims 19 to 22, wherein the file to be optimized includes a library file.
    发送器,用于:在所述接收器从服务器接收安卓应用程序的目标APK之前,向所述服务器发送用于请求下载所述安卓应用程序的请求消息。The transmitter is configured to: before the receiver receives the target APK of the Android application from the server, send a request message for requesting download of the Android application to the server.
  24. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有程序,当所述程序运行时,实现如权利要求1至12中任一项所述的方法。A computer-readable storage medium, characterized in that a program is stored on the computer-readable storage medium, and when the program is run, the method according to any one of claims 1 to 12 is implemented.
PCT/CN2018/110212 2018-10-15 2018-10-15 Method and related apparatus for optimizing and running android application WO2020077487A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2018/110212 WO2020077487A1 (en) 2018-10-15 2018-10-15 Method and related apparatus for optimizing and running android application
CN201880079787.1A CN111492345A (en) 2018-10-15 2018-10-15 Method for optimizing and running android application program and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/110212 WO2020077487A1 (en) 2018-10-15 2018-10-15 Method and related apparatus for optimizing and running android application

Publications (1)

Publication Number Publication Date
WO2020077487A1 true WO2020077487A1 (en) 2020-04-23

Family

ID=70283370

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/110212 WO2020077487A1 (en) 2018-10-15 2018-10-15 Method and related apparatus for optimizing and running android application

Country Status (2)

Country Link
CN (1) CN111492345A (en)
WO (1) WO2020077487A1 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112506519A (en) * 2020-12-15 2021-03-16 Oppo广东移动通信有限公司 Compiling method of application program, mobile terminal and server
CN113031957A (en) * 2020-12-16 2021-06-25 深圳市欢太科技有限公司 Application program installation method, client, terminal, server and storage medium
CN112540768A (en) * 2020-12-29 2021-03-23 Oppo广东移动通信有限公司 File processing method and device, server, electronic equipment and storage medium
CN112596751B (en) * 2020-12-29 2024-05-17 Oppo广东移动通信有限公司 Compiling method, terminal, server and storage medium of application program installation package
CN113568634B (en) * 2021-06-28 2022-05-17 荣耀终端有限公司 Processing method and processing device for application optimization

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104182255A (en) * 2014-08-20 2014-12-03 青岛海信宽带多媒体技术有限公司 Method and terminal for upgrading library files of system application
CN105100191A (en) * 2015-05-22 2015-11-25 华为技术有限公司 Method, device and system for realizing Java application installation via cloud compilation
CN107168742A (en) * 2017-05-19 2017-09-15 中南大学 Application quick deployment method based on customization Android platform

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB201405755D0 (en) * 2014-03-31 2014-05-14 Irdeto Bv Optimizing and protecting software
CN104462959B (en) * 2014-12-04 2017-09-01 北京奇虎科技有限公司 A kind of method for reinforcing and protecting, server and the system of Android application
CN105391763B (en) * 2015-10-13 2019-01-04 北京奇虎科技有限公司 The method and server reinforced to multiple apk files
CN106933610B (en) * 2015-12-30 2021-07-30 北京金山安全软件有限公司 Application program installation package generation method and device and electronic equipment
CN105915623A (en) * 2016-05-20 2016-08-31 努比亚技术有限公司 Device and method of processing application installation package
CN106775893B (en) * 2016-12-30 2020-03-17 北京小米移动软件有限公司 Method and device for pre-compiling program
CN107220083B (en) * 2017-05-22 2020-12-18 南京航空航天大学 Method and system for installation-free operation of application program in android system
CN107766061A (en) * 2017-11-20 2018-03-06 烽火通信科技股份有限公司 The installation method and installation system of a kind of Android application program
CN108536488B (en) * 2018-04-17 2021-12-07 Oppo广东移动通信有限公司 Application starting optimization method and device, storage medium and terminal equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104182255A (en) * 2014-08-20 2014-12-03 青岛海信宽带多媒体技术有限公司 Method and terminal for upgrading library files of system application
CN105100191A (en) * 2015-05-22 2015-11-25 华为技术有限公司 Method, device and system for realizing Java application installation via cloud compilation
CN107168742A (en) * 2017-05-19 2017-09-15 中南大学 Application quick deployment method based on customization Android platform

Also Published As

Publication number Publication date
CN111492345A (en) 2020-08-04

Similar Documents

Publication Publication Date Title
WO2020077487A1 (en) Method and related apparatus for optimizing and running android application
CN111078318B (en) Processing method, device and system of configuration file and storage medium
WO2017185606A1 (en) Overlay mechanism-based apk development method and system
RU2486579C2 (en) Terminal design comprising level structure based on virtual machine (vm) for performance of heterogeneous applications
CN104991793A (en) Method, device and system used for application program subpackage
CN110569106A (en) Code loading method and device, electronic equipment and computer readable medium
CN104781785A (en) Generating native code from intermediate language code for an application
US9392051B2 (en) Application distribution supplying a dedicated application to a terminal from an application deposited by the developer
US11327739B2 (en) Method and apparatus for improving runtime performance after application update in electronic device
WO2021115177A1 (en) Application installation method and apparatus, terminal device, server and storage medium
CN101937356B (en) Method for compiling WebKit browser and device thereof
CN111290740B (en) Application program development method and device, computer equipment and storage medium
CN106020882A (en) Application upgrading method, intelligent terminal and upgrading system
KR20220016704A (en) Method for installing application and electronic device supporting the same
CN106775916B (en) Method and device for reducing application installation packages and electronic equipment
CN116643778A (en) Application program optimization method and electronic equipment
CN110032425B (en) Dynamic link library file virtualization method, system and storage medium
CN111427617B (en) Data processing method, device and equipment
CN112650665A (en) Wireless debugger and wireless debugging system
CN107423093B (en) Control method and apparatus, computer apparatus, and computer-readable storage medium
WO2023226720A1 (en) Resource file transmission method and apparatus, and device and storage medium
KR102663196B1 (en) User terminal device, server, control method of user terminal device and control method of server
TWI640869B (en) Method of configuring an integrated-circuit radiocommunication device and integrated-circuit radiocommunication device
JP6001199B2 (en) Method for automatic conversion of package for taizen installation of android application and computer-readable recording medium therefor
KR101412614B1 (en) METHOD, TERMINAL AND COMPUTER-READABLE RECORDING MEDIA FOR COMPILING JAVASCRIPT INCLUDED IN WEB APPLICATION USING AOT (Ahead Of Time)

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: 18937455

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: 18937455

Country of ref document: EP

Kind code of ref document: A1