Application installation method, application installation device and storage medium
By completing the verification of the application installation package file in the cloud in advance and obtaining the verification file, the terminal quickly completes the verification through the verification file when installing the application, solving the problem of too long installation of terminal applications, improving the user experience and reducing power consumption.
Patent Information
- Application Number
- CN202311370296.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-20
- Publication Date
- 2025-04-22
AI Technical Summary
When the terminal installs the application, it needs to verify the application's installation package file, which leads to an increase in the verification process and affects the user experience.
Complete the verification of the application installation package file in the cloud in advance, and obtain the verification file containing the verification results of the application installation package file. During the installation process, the terminal quickly obtains the verification results through the obtained verification files.
It shortens the time to verify applications on the terminal, thereby shortens the time to install applications, reduces the consumption of terminal processors, and reduces the power consumption of application installation.
Smart Images

Figure CN119861936A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of application installation, and in particular to an application installation method, an application installation device, and a storage medium. Background Art
[0002] When a terminal installs an application, it needs to verify the application's installation package file to complete the installation of the application. In the related art, when the terminal verifies the application's installation package file, it needs to verify all executable (Dex) files contained in the application installation package (APK) file. As the functions of terminal applications become more and more abundant, the amount of application code also increases, and the executable files in the installation package file increase synchronously, resulting in a longer and longer verification process for the application, which in turn leads to a longer and longer application installation time, which seriously affects the user experience. Summary of the invention
[0003] In order to overcome the problems existing in the related art, the present disclosure provides an application installation method, an application installation device and a storage medium.
[0004] According to a first aspect of an embodiment of the present disclosure, there is provided an application installation method, comprising: in response to an application installation instruction, issuing a request to a cloud to obtain an installation package file of a target application, and obtaining an installation file issued by the cloud based on the request, wherein the installation file comprises an installation package file and a verification file of the target application; during the installation process of the installation package file, verifying the installation package file by using the verification file to complete the installation of the target application.
[0005] In one embodiment, verifying the installation package file through the verification file includes: performing a first verification on the installation package file through the verification file; entering the installation process of the installation package file based on the verification result of the first verification, and performing a second verification on multiple sub-files included in the installation package file during the installation process.
[0006] In one embodiment, the verification file includes a first verification file, and the first verification of the installation package file through the verification file includes: extracting the first verification file from the verification file, and verifying the version information and package name information of the installation package file through the first verification file, wherein the first verification file includes the version information and package name information of the target application.
[0007] In one embodiment, based on the verification result of the first verification, a second verification is performed on the multiple sub-files included in the installation package file in the installation process, including: in response to the installation package file passing the first verification, a second verification is performed on the multiple sub-files of the installation package file in the installation process according to the verification file; in response to the installation package file failing the first verification, in the installation process, the terminal accesses the multiple sub-files included in the installation package file one by one and performs a second verification.
[0008] In one embodiment, the verification file includes a second verification file, and the second verification file is the verification result of the target application function information; in response to the installation package file passing the first verification, a second verification is performed on the multiple sub-files included in the installation package file in the installation process according to the verification file, including: in response to the version information of the installation package file matching the version information included in the first verification file, and the package name information of the installation package file matching the package name information included in the first verification file, extracting the second verification file in the verification file in the installation process, obtaining the verification result of the target application function information, and completing the second verification of the multiple sub-files included in the installation package file.
[0009] In one embodiment, in response to the installation package file passing the first verification, the terminal accesses the multiple sub-files contained in the installation package file one by one in the installation process, and performs a second verification, including: in response to the version information of the installation package file not matching the version information contained in the first verification file, and / or the package name information of the installation package file not matching the package name information contained in the first verification file, during the installation process of the installation package file, the terminal accesses the multiple sub-files contained in the installation package file one by one, obtains the functional information of the target application, completes the verification of the functional information, obtains the verification result of the target application functional information, and completes the second verification of the multiple sub-files contained in the installation package file.
[0010] According to a second aspect of an embodiment of the present disclosure, there is provided an application installation method, comprising: in response to receiving a request from a terminal to obtain an installation package file of a target application, sending an installation file to the terminal, the installation file comprising the installation package file of the target application and a verification file, the verification file comprising a second verification file, and the second verification file being a verification result of functional information of the target application.
[0011] In one implementation, the installation file is generated in the following manner: receiving an installation package file of the target application, parsing and compiling the installation package file, and obtaining the verification file; and determining the installation package file and the verification file as the installation file.
[0012] In one embodiment, parsing and compiling the installation package file to obtain the verification file includes: parsing the installation package file to obtain a first verification file containing version information and package name information of the target application; compiling the installation package file to obtain a verification result of the functional information of the target application, and determining the verification result as a second verification file; and packaging and compressing the first verification file and the second verification file into the verification file.
[0013] According to a third aspect of an embodiment of the present disclosure, an application installation device is provided, comprising: an acquisition unit, for sending a request to the cloud for acquiring an installation package file of a target application in response to an application installation instruction, and acquiring an installation file sent by the cloud based on the request, wherein the installation file comprises an installation package file and a verification file of the target application; and a verification unit, for verifying the installation package file by the verification file during the installation process of the installation package file, thereby completing the installation of the target application.
[0014] In one embodiment, the verification unit verifies the installation package file through the verification file in the following manner: performing a first verification on the installation package file through the verification file; based on the verification result of the first verification, entering the installation process of the installation package file, and performing a second verification on multiple sub-files contained in the installation package file during the installation process.
[0015] In one embodiment, the verification file includes a first verification file, and the verification unit performs a first verification on the installation package file through the verification file in the following manner: extracting the first verification file from the verification file, and verifying the version information and package name information of the installation package file through the first verification file, wherein the first verification file includes the version information and package name information of the target application.
[0016] In one embodiment, the verification unit performs a second verification on the multiple sub-files included in the installation package file in the installation process according to the verification result of the first verification in the following manner: in response to the installation package file passing the first verification, a second verification is performed on the multiple sub-files of the installation package file in the installation process according to the verification file; in response to the installation package file failing the first verification, in the installation process the terminal accesses the multiple sub-files included in the installation package file one by one and performs a second verification.
[0017] In one embodiment, the verification file includes a second verification file, and the second verification file is the verification result of the target application function information; the verification unit adopts the following method in response to the installation package file passing the first verification, and performs a second verification on the multiple sub-files included in the installation package file in the installation process according to the verification file: in response to the version information of the installation package file matching the version information included in the first verification file, and the package name information of the installation package file matching the package name information included in the first verification file, extract the second verification file in the verification file in the installation process, obtain the verification result of the target application function information, and complete the second verification of the multiple sub-files included in the installation package file.
[0018] In one embodiment, the verification unit adopts the following method in response to the installation package file passing the first verification, in the installation process, the terminal accesses multiple sub-files contained in the installation package file one by one, and performs a second verification: in response to the version information of the installation package file not matching the version information contained in the first verification file, and / or the package name information of the installation package file not matching the package name information contained in the first verification file, during the installation process of the installation package file, the terminal accesses multiple sub-files contained in the installation package file one by one, obtains the functional information of the target application, and completes the verification of the functional information, obtains the verification result of the target application functional information, and completes the second verification of the multiple sub-files contained in the installation package file.
[0019] According to a fourth aspect of an embodiment of the present disclosure, an application installation device is provided, comprising: a processing unit, for sending an installation file to a terminal in response to receiving a request for obtaining an installation package file of a target application from the terminal, the installation file comprising the installation package file of the target application and a verification file, the verification file comprising a second verification file, and the second verification file being a verification result of functional information of the target application.
[0020] In one implementation, the installation file is generated by a processing unit in the following manner: receiving an installation package file of the target application, parsing and compiling the installation package file, and obtaining the verification file;
[0021] The installation package file and the verification file are determined as the installation files.
[0022] In one embodiment, the processing unit parses and compiles the installation package file to obtain the verification file in the following manner: parses the installation package file to obtain a first verification file containing version information and package name information of the target application; compiles the installation package file to obtain a verification result of the functional information of the target application, and determines the verification result as a second verification file; and packages and compresses the first verification file and the second verification file into the verification file.
[0023] According to the fifth aspect of an embodiment of the present disclosure, an application installation device is provided, comprising: a processor; and a memory for storing processor executable instructions; wherein the processor is configured to: execute the application installation method described in the first aspect or any one of the embodiments of the first aspect, or execute the application installation method described in the second aspect or any one of the embodiments of the second aspect.
[0024] According to the sixth aspect of an embodiment of the present disclosure, a storage medium is provided, in which instructions are stored. When the instructions in the storage medium are executed by a processor, the processor is enabled to execute the application installation method described in the first aspect or any one of the embodiments of the first aspect, or to execute the application installation method described in the second aspect or any one of the embodiments of the second aspect.
[0025] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: when installing an application, the terminal obtains the installation package file and verification file of the target application from the cloud. During the installation process of the installation package file, the installation package file is verified by the verification file to complete the installation of the target application. Through the present disclosure, the terminal synchronously obtains the installation package file and verification file of the application, and by verifying the application installation package, the time consumed for verification on the terminal is shortened, thereby shortening the time consumed for application installation, reducing the consumption of the terminal processor, and reducing the power consumption of the terminal for application installation.
[0026] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0028] Figure 1 The figure is a flowchart of a method for installing an application according to an exemplary embodiment.
[0029] Figure 2 The present invention is a flowchart showing a method for verifying an installation package file by using a verification file according to an exemplary embodiment.
[0030] Figure 3 The flowchart of a method for performing a first verification on an installation package file by using a verification file is shown according to yet another exemplary embodiment.
[0031] Figure 4 The present invention is a flowchart showing a method for performing a second verification on a plurality of sub-files included in an installation package file in an installation process according to an exemplary embodiment.
[0032] Figure 5 The present invention is a flowchart showing a method for performing a second verification on a plurality of sub-files included in an installation package file in an installation process according to an exemplary embodiment.
[0033] Figure 6 The present invention is a flowchart showing a method in which a terminal accesses multiple sub-files included in an installation package file one by one and performs a second verification method in an installation process according to an exemplary embodiment.
[0034] Figure 7 The figure is a flowchart of a method for installing an application according to an exemplary embodiment.
[0035] Figure 8 The figure is a flowchart of a method for generating an installation file according to an exemplary embodiment.
[0036] Fig. 9 The figure is a flow chart showing a method for obtaining a verification file according to an exemplary embodiment.
[0037] Fig.10 The figure is a schematic diagram showing installation speed statistics of applications installed on different terminals according to an exemplary embodiment of the present disclosure.
[0038] Fig.11 The figure is a schematic diagram showing installation energy consumption statistics of applications installed on the same terminal before and after optimization according to an exemplary embodiment of the present disclosure.
[0039] Fig.12 It is a block diagram showing an application installation method according to an exemplary embodiment of the present disclosure.
[0040] Fig.13 The figure is a block diagram showing an application installation device according to an exemplary embodiment.
[0041] Fig.14 The figure is a block diagram showing an application installation device according to an exemplary embodiment.
[0042] Fig.15 The invention is a block diagram showing a device for installing an application according to an exemplary embodiment. DETAILED DESCRIPTION
[0043] Here, exemplary embodiments will be described in detail, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present disclosure.
[0044] The application installation method provided by the embodiment of the present disclosure is applied to the scenario where a terminal installs an application based on a user instruction.
[0045] When the terminal installs an application, it is necessary to verify the installation package file of the application before the installation of the application can be completed. In the related art, when the terminal verifies the application installation package, the terminal needs to perform compilation optimization actions on the application through the compilation optimization tool (dex2oat). By disassembling the time-consuming information of each stage of the compilation process, it can be found that during the application installation process, it is necessary to verify the rationality of the application method. That is, for all executable (Dex) files contained in the installation package file of the application, each method is accessed by traversing layer by layer, and each instruction contained in the method is verified for rationality. As the functions of terminal applications become more and more abundant, the amount of code of the application is also increasing, the executable files in the installation package file increase synchronously, and the methods that need to be accessed and verified also increase and decrease accordingly, resulting in the verification process of the application taking longer and longer, and then the application installation time is also longer and longer, which seriously affects the user experience. In addition, due to the increase in the time-consuming installation of the application, the consumption of the terminal processor during the installation of the application will also increase, which will lead to an increase in the power consumption of the installed application.
[0046] In view of this, the present disclosure proposes an application installation method, which completes the verification process of the application installation package file in the cloud in advance, and obtains a verification file containing the verification result of the application installation package file. When the terminal requests to download and install the application, the installation package file and the verification file of the application to be installed are obtained. When the terminal verifies the installation package file during the installation process, the verification result can be quickly obtained through the obtained verification file, thereby shortening the time spent on verifying the application on the terminal, and ultimately shortening the time spent on application installation, reducing the consumption of the terminal processor, and reducing the power consumption of application installation.
[0047] Figure 1 FIG. 1 is a flow chart of an application installation method according to an exemplary embodiment. Figure 1 As shown, the method includes step S101 to step S102.
[0048] In step S101, in response to an application installation instruction, a request for obtaining an installation package file of a target application is sent to the cloud, and the installation file sent by the cloud based on the request is obtained.
[0049] The installation file includes the installation package file and verification file of the target application.
[0050] In step S102, during the installation process of the installation package file, the installation package file is verified by using a verification file to complete the installation of the target application.
[0051] In the disclosed embodiment, the user selects the target application to be downloaded in the application store of the terminal, and issues an instruction to download the application (such as clicking "Install" under the icon of the target application in the display interface of the application store). After receiving the instruction, the terminal application store sends a request to the cloud to obtain the installation package of the target application, and receives the installation file including the verification file and the installation package file issued by the cloud.
[0052] In the disclosed embodiment, when installing an application, the installation package file is verified using the downloaded verification file, without the need for the terminal processor to call a compilation optimization tool (such as dex2oat) for verification, thereby shortening the time spent on verifying the application on the terminal, ultimately shortening the time spent on application installation, reducing the consumption of the terminal processor, and reducing the power consumption of application installation.
[0053] In the embodiment of the present disclosure, verifying the installation package file by verifying the file includes verifying the entire file before installing the installation package file, and verifying the installed sub-files during the installation of the installation package file. The following embodiment of the present disclosure describes the method for verifying the installation package file.
[0054] Figure 2 FIG. 1 is a flow chart showing a method for verifying an installation package file by verifying a file according to an exemplary embodiment. Figure 2 As shown, the method includes step S201 to step S202.
[0055] In step S201, a first verification is performed on the installation package file by using a verification file.
[0056] In step S202, according to the verification result of the first verification, the installation process of the installation package file is entered, and a second verification is performed on the multiple sub-files included in the installation package file during the installation process.
[0057] In the disclosed embodiment, when the terminal obtains the installation package file from the cloud, due to cloud problems (such as the developer uploads a new version of the installation package, but the verification text is not updated accordingly) or errors in the download of the installation package file, the downloaded verification file may not be applicable to the downloaded installation package file. Therefore, the entire file should be verified before the installation package file is installed to determine whether the downloaded verification file is applicable to the downloaded installation package file, and then decide whether to use the verification file to verify the installed file during the application installation process.
[0058] In the disclosed embodiment, the first verification is performed on the entire installation package file before installation, and different verification strategies are adopted for multiple sub-files included in the installation package file during the installation process based on the verification results. It is ensured that the verification results of the multiple sub-files included in the installation package file during the installation process are consistent with the actual situation of the installation package file, and it is ensured that the target application can run normally after installation.
[0059] In the embodiment of the present disclosure, the purpose of performing the first check on the installation package file is to determine whether the check file is applicable to the installation package file (whether the version and package name match). The following embodiment of the present disclosure describes the method for performing the first check.
[0060] Figure 3 FIG. 1 is a flowchart of a method for performing a first verification on an installation package file by using a verification file according to another exemplary embodiment. Figure 3 As shown, the method includes step S301 to step S302.
[0061] In step S301, a first verification file among verification files is extracted.
[0062] In step S302, the version information and package name information of the installation package file are verified using the first verification file.
[0063] The first verification file includes version information and package name information of the target application.
[0064] It is understandable that there are differences in the installation package files of different applications, and there will be differences in the verification process and verification results of the installation package files of different applications. There will also be differences in the installation packages of different versions of the same application, and there will also be differences in the verification process and verification results of the installation package files of different versions of the same application. Therefore, the verification file in the present disclosure is targeted and is only for the installation package files of the feature version of a specific application. The present disclosure verifies the version information and package name information of the installation package file to ensure that the downloaded verification file is a verification file suitable for the downloaded installation package file. The accuracy of the verification result is guaranteed to ensure that the target application can run normally after installation.
[0065] In the embodiments of the present disclosure, different verification strategies are adopted for multiple sub-files included in the installation package file during the installation process according to the verification result of the first verification of the entire file before the installation package file is installed. The following embodiments of the present disclosure further illustrate the method of performing the second verification on multiple sub-files included in the installation package file during the installation process.
[0066] Figure 4 FIG. 1 is a flow chart showing a method for performing a second check on multiple sub-files included in an installation package file during an installation process according to an exemplary embodiment. Figure 4As shown, the method includes step S401, step S402A and step S402B.
[0067] In step S401, a first verification is performed on the installation package file by using a verification file.
[0068] In step S402A, in response to the installation package file passing the first verification, a second verification is performed on multiple sub-files of the installation package file in the installation process according to the verification file.
[0069] In step S402B, in response to the installation package file failing the first verification, the terminal accesses multiple sub-files included in the installation package file one by one during the installation process and performs a second verification.
[0070] In the disclosed embodiment, the installation package file passes the first verification, indicating that the downloaded verification file is applicable to the downloaded installation package file. Based on the verification file, multiple sub-files of the installation package file can be verified during the installation of the installation package file, and the verification result can be directly obtained from the verification file to achieve fast verification. The time spent on verifying the application on the terminal is shortened, and the time spent on application installation is ultimately shortened, and the consumption of the terminal processor is reduced, thereby reducing the power consumption of application installation.
[0071] In the disclosed embodiment, if the installation package file fails the first verification, it indicates that the downloaded verification file is not applicable to the downloaded installation package file. In the installation process of the installation package file, the multiple sub-files of the installation package file are verified in a traditional manner, and the processor of the terminal parses the sub-files to obtain the verification result, thereby ensuring that the verification of the installation package file can be completed even if the downloaded verification file is invalid, so that the target application can be installed and run normally.
[0072] In the embodiment of the present disclosure, the verification file includes a second verification file, which is the verification result of the target application function information. When the downloaded verification file is applicable to the downloaded installation package file, it can be directly used as the verification result for the installed sub-files during the installation process. The following embodiment of the present disclosure further describes the method of performing a second verification on multiple sub-files included in the installation package file during the installation process.
[0073] Figure 5 FIG. 1 is a flow chart showing a method for performing a second check on multiple sub-files included in an installation package file during an installation process according to an exemplary embodiment. Figure 5 As shown, the method includes step S501 to step S502.
[0074] In step S501, in response to the version information of the installation package file matching the version information included in the first verification file, the package name information of the installation package file matches the package name information included in the first verification file.
[0075] In step S502, a second verification file is extracted from the verification file in the installation process, the verification result of the target application function information is obtained, and a second verification of multiple sub-files included in the installation package file is completed.
[0076] In the disclosed embodiment, if the terminal detects that the package name information and version information of the application recorded in the manifest file (first verification file) in the verification file matches the current application installation package information, the descriptor (fd) of the verification file is used as the installation input parameter during the installation of the installation package file and is passed to the compilation and installation process of the installation package. When the descriptor is used to trigger the compilation of the application, the decompiled file (second verification file) containing the verification result information can be decompressed and extracted from the verification file, and the verification result information can be read, so as to use it to implement fast verification (Fast Verify) of the application and improve the application installation speed.
[0077] The following embodiments of the present disclosure further illustrate a method for performing a second verification on a plurality of sub-files included in an installation package file during an installation process.
[0078] Figure 6 FIG. 1 is a flowchart showing a method for performing a second verification by accessing multiple sub-files contained in an installation package file one by one by a terminal in an installation process according to an exemplary embodiment. Figure 6 As shown, the method includes step S601 to step S602.
[0079] In step S601, in response to the version information of the installation package file not matching the version information included in the first verification file, and / or the package name information of the installation package file not matching the package name information included in the first verification file.
[0080] In step S602, during the installation process of the installation package file, the terminal accesses the multiple sub-files contained in the installation package file one by one, obtains the functional information of the target application, and completes the verification of the functional information, obtains the verification result of the target application functional information, and completes the second verification of the multiple sub-files contained in the installation package file.
[0081] In the disclosed embodiment, if the terminal detects that any one of the package name information and version information of the application recorded in the manifest file (first verification file) in the verification file does not match the current application installation package information. Then the decompiled file (second verification file) containing the verification result information in the representation verification file is not applicable to the installation process of this installation package file. At this time, the terminal processor (CPU) uses a general method to complete the verification during the compilation and installation of the installation package file: that is, for all executable (Dex) files contained in the installation package file of the application, each method therein is accessed by traversing layer by layer, and each instruction contained in the method is checked for rationality to obtain the verification result, ensuring that the verification of the installation package file can be completed even if the downloaded verification file is invalid, so that the target application can be installed and run normally.
[0082] In the disclosed embodiment, the cloud completes the verification process of the application installation package file in advance and obtains a verification file containing the verification result of the application installation package file. When the terminal requests to download and install the application, the cloud sends the installation package file and the verification file of the application to be installed to the terminal. The disclosed embodiment describes the application installation method applied to the cloud.
[0083] Figure 7 FIG. 1 is a flow chart of an application installation method according to an exemplary embodiment. Figure 7 As shown, the method includes step S701 to step S702.
[0084] In step S701, in response to receiving a request from a terminal for obtaining an installation package file of a target application.
[0085] In step S702, the installation file is sent to the terminal.
[0086] The installation file includes an installation package file and a verification file of the target application, the verification file includes a second verification file, and the second verification file is a verification result of the target application function information.
[0087] In the disclosed embodiment, after the cloud receives a request from the terminal to obtain the target application installation package, it sends the installation package file to the cloud and also sends a verification file corresponding to the installation package file to the terminal. The verification file includes a second verification file, which is the verification result of the target application function information, so that the terminal can quickly complete the verification and installation based on the verification file.
[0088] In the embodiment of the present disclosure, after the application developer completes the development of the application, he uploads the application installation package file to a platform that supports downloading (i.e., the cloud), and the cloud obtains the corresponding verification file based on the installation package file uploaded by the developer. The following embodiment of the present disclosure describes the installation file generation method.
[0089] Figure 8 FIG. 1 is a flow chart of a method for generating an installation file according to an exemplary embodiment. Figure 8 As shown, the method includes step S801 to step S802.
[0090] In step S801, the installation package file of the target application is received, the installation package file is parsed and compiled, and a verification file is obtained.
[0091] In step S802, the installation package file and the verification file are determined as installation files.
[0092] In the disclosed embodiment, after an application developer wants to upload an installation package file of an application to the cloud, the cloud uses compilation optimization tools and parsing tools to compile, install and parse the application installation package file uploaded by the application developer, obtains the verification file corresponding to the installation package file, and associates the installation package file and verification file of the same application as the installation file of the application, so that when the cloud receives a request from the terminal to obtain the installation package file, it can synchronously send the installation package file and verification file of the same application to the terminal.
[0093] In the embodiment of the present disclosure, when obtaining the verification file, it is necessary to obtain a first verification file for determining whether the verification file is applicable to the installation package file, and obtain a second verification file representing the verification result of the functional information of the installation package file. The following embodiment of the present disclosure describes the method for obtaining the verification file.
[0094] Fig. 9 FIG. 1 is a flow chart showing a method for obtaining a verification file according to an exemplary embodiment. Fig. 9 As shown, the method includes steps S901 to S903.
[0095] In step S901, the installation package file is parsed to obtain a first verification file including version information and package name information of the target application.
[0096] In step S902, the installation package file is compiled, the verification result of the function information of the target application is obtained, and the verification result is determined as the second verification file.
[0097] In step S903, the first verification file and the second verification file are packaged and compressed into a verification file.
[0098] In the disclosed embodiment, a compilation optimization tool is called to compile and install the application installation package file uploaded by the application developer, and a second verification file containing only verification result information is generated by controlling the compilation parameters. The installation package file is parsed using a parsing tool to obtain the version information and package name information of the application, which are written into the first verification piece in a specific format, and the second verification file containing the verification result information and the first verification file containing the version information and package name information are packaged to generate a verification file. The terminal quickly obtains the verification result through the obtained verification file, thereby shortening the time spent on verifying the application on the terminal, and ultimately shortening the time spent on application installation, reducing the consumption of the terminal processor, and reducing the power consumption of application installation.
[0099] In the disclosed embodiment, when obtaining the verification file, a first verification file is obtained for determining whether the verification file is applicable to the installation package file, and the second verification file is effective when it is applicable to the installation package file, so as to ensure that the verification result during the installation of the installation file is accurate, so that the target application can be installed and run normally. A second verification file representing the verification result of the functional information of the installation package file is obtained.
[0100] In an exemplary embodiment of the present disclosure, Fig.10 The statistical diagram of the installation speed of applications installed on different terminals is shown in the figure. Among them, terminal 3 is a terminal using the application installation method disclosed in the present invention, terminal 1 and terminal 2 are terminals using a general application installation method, and terminal 1, terminal 2 and terminal 3 use the same processor. The time taken by terminal 1 to install application A, application B, application C, application D and application E are 16025ms, 14835ms, 9075ms, 8445ms and 6470ms respectively; the time taken by terminal 2 to install application A, application B, application C, application D and application E are 12880ms, 12570ms, 6030ms, 5585ms and 4440ms respectively; the time taken by terminal 3 to install application A, application B, application C, application D and application E are 5307ms, 4781ms, 3362ms, 2701ms and 2267ms respectively. As Fig.10 As shown, the application installation speed of the terminal 3 using the application installation method of the present disclosure is significantly higher than that of the terminals 1 and 2 using the general application installation method.
[0101] In an exemplary embodiment of the present disclosure, Fig.11The energy consumption statistics of installed applications before and after the same terminal is optimized are shown in the figure. Before the terminal is optimized, the general application installation method is used, and after the terminal is optimized, the application installation method proposed in the present disclosure is used. Before the terminal is optimized, the energy consumption of application A, application B, application C, application D and application E are 5.06mAh, 4.36mAh, 2.33mAh, 2.13mAh and 1.64mAh respectively; after the terminal is optimized, the energy consumption of application A, application B, application C, application D and application E are 2.24mAh, 2.40mAh, 1.52mAh, 1.12mAh and 0.95mAh respectively. Fig.10 As shown, the installation energy consumption of the same terminal after optimization using the application installation method disclosed in the present invention is significantly lower than the installation energy consumption of the same terminal before optimization using the general application installation method.
[0102] In an exemplary embodiment of the present disclosure, Fig.12 As shown in the block diagram of the application installation method, the cloud generates the verification file corresponding to the installation package file in the following manner, and sends the installation package file and the verification file to the terminal upon receiving the download request from the terminal:
[0103] 1. After the application developer uploads the application installation package file (application.apk), call the compilation optimization tool (dex2oat) to compile and install the application installation package file uploaded by the application developer, and generate a decompiled file (primary.vdex) that does not contain the original executable (dex) file but only contains the verification result information (VerifierDeps) by controlling the compilation parameters.
[0104] 2. Use the parsing tool (aapt) to parse the installation package file to obtain the application's version information (versionCode) and package name information (packageName), and write them into the manifest file (manifest.json) in json format; package the decompiled file containing the verification result information and the manifest file containing the version information and package name information to generate a verification file (application.dm).
[0105] 3. When the user tries to download and install the application, upon receiving a request to download the application, the application installation package file and the corresponding verification file are sent to the end user's mobile phone together.
[0106] In an exemplary embodiment of the present disclosure, Fig.12 As shown in the block diagram of the application installation method, the terminal uses the following method to request the cloud to obtain the installation package file, and completes the verification and installation of the installation package file after obtaining the installation package file:
[0107] 1. The user issues an instruction to download and install the target application in the terminal's application store. The application store application on the terminal sends a request to the cloud to obtain the application installation package file, and receives and downloads the installation package file and the corresponding verification file sent by the cloud. By calling the software framework's interface (openWrite), the installation package file and the verification file are all written to the file stream (session) and submitted to the framework for installation.
[0108] 2. When processing the application installation request, the framework package installation management service will first extract the manifest file containing the package name and version information from the verification file (base.dm, i.e. application.dm, only the file name is modified). The package name and version information of the application recorded in the manifest file will be read to determine whether it matches the current application installation package information (including package name and version information). If it does not match, the downloaded verification file will be abandoned, and the terminal processor will parse the installation package file to complete the verification of the installation package file.
[0109] 3. If the package name and version information of the application recorded in the manifest file matches the current application installation package information, the descriptor (fd) of the verification file is passed to the compilation and installation process of the installation package as the installation input parameter; thereby triggering the compilation of the application to decompress and extract the decompiled file containing the verification result information from the verification file, and read the verification result information, so as to use it to implement fast verification (Fast Verify) of the application and improve the application installation speed.
[0110] In the disclosed embodiment, after the application developer uploads the installation package file of the application to the cloud, the cloud completes the verification process of the application installation package file, and obtains the verification file containing the verification result of the application installation package file. When the terminal requests to download and install the application, the installation package file and the verification file of the application to be installed are obtained synchronously. When the terminal verifies the installation package file during the installation process, the verification result is quickly obtained through the obtained verification file, thereby shortening the time spent on verifying the application on the terminal, and ultimately shortening the time spent on application installation, reducing the consumption of the terminal processor, and reducing the power consumption of application installation.
[0111] Based on the same concept, the embodiment of the present disclosure also provides an application installation device 100 and an application installation device 200 .
[0112] It is understandable that, in order to realize the above functions, the application installation device 100 and the application installation device 200 provided in the embodiments of the present disclosure include hardware structures and / or software modules corresponding to the execution of each function. In combination with the units and algorithm steps of each example disclosed in the embodiments of the present disclosure, the embodiments of the present disclosure can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the technical solution of the embodiments of the present disclosure.
[0113] Fig.13 FIG. 1 is a block diagram of an application installation device 100 according to an exemplary embodiment. Fig.13 The device includes an acquisition unit 101 and a verification unit 102.
[0114] The acquisition unit 101 is used to send a request to the cloud to obtain the installation package file of the target application in response to the application installation instruction, and obtain the installation file sent by the cloud based on the request.
[0115] The installation file includes the installation package file and verification file of the target application.
[0116] The verification unit 102 is used to verify the installation package file through the verification file during the installation process of the installation package file to complete the installation of the target application.
[0117] In one embodiment, the verification unit 102 verifies the installation package file through the verification file in the following manner: a first verification is performed on the installation package file through the verification file; based on the verification result of the first verification, the installation process of the installation package file is entered; during the installation process, a second verification is performed on multiple sub-files contained in the installation package file.
[0118] In one embodiment, the verification file includes a first verification file, and the verification unit 102 performs a first verification on the installation package file through the verification file in the following manner: extract the first verification file in the verification file, and verify the version information and package name information of the installation package file through the first verification file, wherein the first verification file includes the version information and package name information of the target application.
[0119] In one embodiment, the verification unit 102 performs a second verification on multiple sub-files included in the installation package file in the installation process according to the verification result of the first verification in the following manner: in response to the installation package file passing the first verification, a second verification is performed on the multiple sub-files of the installation package file in the installation process according to the verification file; in response to the installation package file failing the first verification, in the installation process the terminal accesses the multiple sub-files included in the installation package file one by one and performs a second verification.
[0120] In one embodiment, the verification file includes a second verification file, and the second verification file is the verification result of the target application function information. The verification unit 102 performs a second verification on multiple sub-files contained in the installation package file according to the verification file in the installation process in response to the installation package file passing the first verification in the following manner: in response to the version information of the installation package file matching the version information contained in the first verification file, and the package name information of the installation package file matching the package name information contained in the first verification file, extract the second verification file in the verification file in the installation process, obtain the verification result of the target application function information, and complete the second verification of the multiple sub-files contained in the installation package file.
[0121] In one embodiment, the verification unit 102 adopts the following method in response to the installation package file passing the first verification, and the terminal accesses multiple sub-files contained in the installation package file one by one during the installation process, and performs a second verification: in response to the version information of the installation package file not matching the version information contained in the first verification file, and / or the package name information of the installation package file not matching the package name information contained in the first verification file, during the installation process of the installation package file, the terminal accesses multiple sub-files contained in the installation package file one by one, obtains functional information of the target application, and completes the verification of the functional information, obtains the verification result of the functional information of the target application, and completes the second verification of the multiple sub-files contained in the installation package file.
[0122] Fig.14 FIG. 2 is a block diagram of an application installation device 200 according to an exemplary embodiment. Fig.14 The device includes a processing unit 201, which is used to send the installation file to the terminal in response to receiving a request for obtaining the installation package file of the target application from the terminal. The installation file includes the installation package file of the target application and a verification file, the verification file includes a second verification file, and the second verification file is the verification result of the target application function information.
[0123] In one implementation, the installation file is generated by the processing unit 201 in the following manner: receiving the installation package file of the target application, parsing and compiling the installation package file, obtaining the verification file, and determining the installation package file and the verification file as the installation file.
[0124] In one embodiment, the processing unit 201 parses and compiles the installation package file in the following manner to obtain a verification file: parse the installation package file, obtain a first verification file containing version information and package name information of the target application, compile the installation package file, obtain the verification result of the functional information of the target application, and determine the verification result as a second verification file; package and compress the first verification file and the second verification file into a verification file.
[0125] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0126] Fig.15 1 is a block diagram of a device 300 for application installation according to an exemplary embodiment. The device 300 may be provided as a terminal. For example, the device 300 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0127] Reference Fig.15 , the device 300 may include one or more of the following components: a processing component 302 , a memory 304 , a power component 306 , a multimedia component 308 , an audio component 310 , an input / output (I / O) interface 312 , a sensor component 314 , and a communication component 316 .
[0128] The processing component 302 generally controls the overall operation of the device 300, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 302 may include one or more processors 320 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 302 may include one or more modules to facilitate the interaction between the processing component 302 and other components. For example, the processing component 302 may include a multimedia module to facilitate the interaction between the multimedia component 308 and the processing component 302.
[0129] The memory 304 is configured to store various types of data to support operations on the device 300. Examples of such data include instructions for any application or method operating on the device 300, contact data, phone book data, messages, pictures, videos, etc. The memory 304 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0130] The power component 306 provides power to the various components of the device 300. The power component 306 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 300.
[0131] The multimedia component 308 includes a screen that provides an output interface between the device 300 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 308 includes a front camera and / or a rear camera. When the device 300 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0132] The audio component 310 is configured to output and / or input audio signals. For example, the audio component 310 includes a microphone (MIC), and when the device 300 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 304 or sent via the communication component 316. In some embodiments, the audio component 310 also includes a speaker for outputting audio signals.
[0133] I / O interface 312 provides an interface between processing component 302 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0134] The sensor assembly 314 includes one or more sensors for providing various aspects of the status assessment of the device 300. For example, the sensor assembly 314 can detect the open / closed state of the device 300, the relative positioning of components, such as the display and keypad of the device 300, the sensor assembly 314 can also detect the position change of the device 300 or a component of the device 300, the presence or absence of user contact with the device 300, the orientation or acceleration / deceleration of the device 300, and the temperature change of the device 300. The sensor assembly 314 can include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 314 can also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 314 can also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0135] The communication component 316 is configured to facilitate wired or wireless communication between the device 300 and other devices. The device 300 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 316 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 316 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0136] In an exemplary embodiment, the apparatus 300 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above method.
[0137] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 304 including instructions, and the instructions can be executed by the processor 320 of the device 300 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0138] It is to be understood that in the present disclosure, "plurality" refers to two or more than two, and other quantifiers are similar. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. The singular forms "a", "the" and "the" are also intended to include plural forms, unless the context clearly indicates other meanings.
[0139] It is further understood that the terms "first", "second", etc. are used to describe various information, but such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other, and do not indicate a specific order or degree of importance. In fact, the expressions "first", "second", etc. can be used interchangeably. For example, without departing from the scope of the present disclosure, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as the first information.
[0140] It will be further understood that the terms “center”, “longitudinal”, “lateral”, “front”, “back”, “up”, “down”, “left”, “right”, “vertical”, “horizontal”, “top”, “bottom”, “inside”, “outside”, etc., indicating orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, are only for the convenience of describing the present embodiment and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation.
[0141] It can be further understood that, unless otherwise specified, “connection” includes a direct connection without other components between the two, and also includes an indirect connection with other components between the two.
[0142] It is further understood that, although the operations are described in a specific order in the drawings in the embodiments of the present disclosure, it should not be understood as requiring the operations to be performed in the specific order shown or in a serial order, or requiring the execution of all the operations shown to obtain the desired results. In certain environments, multitasking and parallel processing may be advantageous.
[0143] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present solution, which follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure.
[0144] It should be understood that the present disclosure is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the scope of the appended claims.
Claims
1. An application installation method, characterized in that: include: In response to the application installation instruction, a request is sent to the cloud to obtain the installation package file of the target application, and the installation file sent by the cloud based on the request is obtained, wherein the installation file includes the installation package file of the target application and a verification file; During the installation process of the installation package file, the installation package file is verified by using the verification file to complete the installation of the target application.
2. The method according to claim 1, characterized in that The verifying the installation package file by using the verification file includes: Performing a first verification on the installation package file using the verification file; According to the verification result of the first verification, the installation process of the installation package file is entered, and in the installation process, a second verification is performed on the multiple sub-files included in the installation package file.
3. The method according to claim 2, characterized in that The verification file includes a first verification file, The first verification of the installation package file by using the verification file includes: Extracting a first verification file from the verification file, and verifying the version information and package name information of the installation package file through the first verification file, The first verification file includes version information and package name information of the target application.
4. The method according to claim 2, characterized in that: The step of performing a second check on the plurality of sub-files included in the installation package file in the installation process according to the check result of the first check comprises: In response to the installation package file passing the first verification, performing a second verification on a plurality of sub-files of the installation package file in the installation process according to the verification file; In response to the installation package file failing the first verification, the terminal accesses multiple sub-files included in the installation package file one by one in the installation process and performs a second verification.
5. The method according to claim 4, characterized in that The verification file includes a second verification file, and the second verification file is a verification result of the target application function information; In response to the installation package file passing the first verification, performing a second verification on a plurality of sub-files included in the installation package file in the installation process according to the verification file includes: In response to the version information of the installation package file matching the version information contained in the first verification file, and the package name information of the installation package file matching the package name information contained in the first verification file, a second verification file is extracted from the verification file in the installation process, the verification result of the target application function information is obtained, and a second verification of multiple sub-files contained in the installation package file is completed.
6. The method according to claim 4, characterized in that In response to the installation package file passing the first verification, the terminal accesses multiple sub-files included in the installation package file one by one in the installation process and performs a second verification, including: In response to the fact that the version information of the installation package file does not match the version information contained in the first verification file, and / or the package name information of the installation package file does not match the package name information contained in the first verification file, during the installation process of the installation package file, the terminal accesses multiple sub-files contained in the installation package file one by one, obtains the functional information of the target application, completes the verification of the functional information, obtains the verification result of the target application functional information, and completes the second verification of the multiple sub-files contained in the installation package file.
7. An application installation method, characterized in that: include: In response to receiving a request from a terminal to obtain an installation package file of a target application, the installation file is sent to the terminal. The installation file includes an installation package file and a verification file of the target application, and the verification file includes a second verification file, and the second verification file is a verification result of the target application function information.
8. The method according to claim 7, characterized in that The installation file is generated in the following way: Receiving the installation package file of the target application, parsing and compiling the installation package file, and obtaining the verification file; The installation package file and the verification file are determined as the installation files.
9. The method according to claim 8, characterized in that The parsing and compiling the installation package file to obtain the verification file includes: Parsing the installation package file to obtain a first verification file containing version information and package name information of the target application; Compile the installation package file, obtain the verification result of the function information of the target application, and determine the verification result as the second verification file; The first verification file and the second verification file are packaged and compressed into the verification file.
10. An application installation device, characterized in that: include: an acquisition unit, configured to send a request to the cloud to obtain an installation package file of a target application in response to an application installation instruction, and obtain an installation file sent by the cloud based on the request, wherein the installation file includes the installation package file of the target application and a verification file; The verification unit is used to verify the installation package file through the verification file during the installation process of the installation package file to complete the installation of the target application.
11. An application installation device, characterized in that: include: a processing unit, configured to, in response to receiving a request from a terminal for obtaining an installation package file of a target application, send the installation file to the terminal; The installation file includes an installation package file and a verification file of the target application, and the verification file includes a second verification file, and the second verification file is a verification result of the target application function information.
12. An application installation device, characterized in that: include: processor: a memory for storing processor-executable instructions; The processor is configured to: execute the application installation method according to any one of claims 1 to 6 or execute the application installation method according to any one of claims 7 to 9.
13. A storage medium, characterized in that: The storage medium stores instructions. When the instructions in the storage medium are executed by a processor, the processor is enabled to execute the application installation method according to any one of claims 1 to 6 or the application installation method according to any one of claims 7 to 9.