CN114489698A - Application program installation method and device - Google Patents

Application program installation method and device Download PDF

Info

Publication number
CN114489698A
CN114489698A CN202210036342.3A CN202210036342A CN114489698A CN 114489698 A CN114489698 A CN 114489698A CN 202210036342 A CN202210036342 A CN 202210036342A CN 114489698 A CN114489698 A CN 114489698A
Authority
CN
China
Prior art keywords
file
target
application program
installation
download
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210036342.3A
Other languages
Chinese (zh)
Inventor
陈文斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN202210036342.3A priority Critical patent/CN114489698A/en
Publication of CN114489698A publication Critical patent/CN114489698A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 

Abstract

The application discloses an application program installation method and device, and belongs to the field of internet. The method is applied to a first electronic device and comprises the following steps: receiving a first input of a user, wherein the first input is used for sending a downloading request aiming at a target application program to a target server; executing installation operation according to the download file under the condition of receiving the download file corresponding to the target application program; the download file comprises a target installation file and a target compiling file, the target compiling file comprises compiled target codes, and the target codes are obtained by compiling a method or codes with execution frequency higher than a threshold value.

Description

Application program installation method and device
Technical Field
The application belongs to the field of internet, and particularly relates to an application program installation method and device.
Background
With the rapid development of the internet, Application programs (apps) have been increasingly widely used in mobile payment, web shopping, online chatting, and the like.
The application is installed prior to use. Taking an application program on an Android (Android) system as an example, at present, a default installation mode of the Android system is to check the legitimacy of classes in an installation package (apk) only during installation, and codes in the installation package cannot be compiled. Therefore, codes need to be compiled and then executed when the subsequent application program runs each time, so that the application program occupies a large amount of resources of the electronic equipment in the running process, and the use smoothness is influenced.
Disclosure of Invention
The embodiment of the application program installation method and device can solve the problem that the installation mode of the application program in the related technology can cause the application program to occupy a large number of resources of electronic equipment in the operation process and influence the use smoothness.
In a first aspect, an embodiment of the present application provides an application program installation method, which is applied to a first electronic device, and includes:
receiving a first input of a user, wherein the first input is used for sending a downloading request aiming at a target application program to a target server;
executing installation operation according to the download file under the condition of receiving the download file corresponding to the target application program; the download file comprises an object installation file and an object compiling file, the object compiling file comprises compiled object codes, and the object codes are obtained by compiling a method or a code with execution frequency higher than a threshold value.
In a second aspect, an embodiment of the present application provides an application program installation method, which is applied to a target server, and includes:
receiving a downloading request of a first electronic device for a target application program;
according to the downloading request, acquiring a downloading file corresponding to the target application program, wherein the downloading file comprises a target installation file and a target compiling file, the target compiling file comprises a compiled target code, and the target code is obtained by compiling a method or a code with the execution frequency higher than a threshold value;
and sending the download file to the first electronic equipment, so that the first electronic equipment executes installation operation according to the download file.
In a third aspect, an embodiment of the present application provides an application installation apparatus, including:
the system comprises a first receiving module, a first processing module and a second receiving module, wherein the first receiving module is used for receiving first input of a user, and the first input is used for sending a downloading request aiming at a target application program to a target server;
the first processing module is used for executing installation operation according to the download file under the condition of receiving the download file corresponding to the target application program;
the download file comprises an object installation file and an object compiling file, the object compiling file comprises compiled object codes, and the object codes are obtained by compiling a method or a code with execution frequency higher than a threshold value.
In a fourth aspect, an embodiment of the present application provides an application installation apparatus, including:
the second receiving module is used for receiving a downloading request of the first electronic equipment for the target application program;
a second obtaining module, configured to obtain, according to the download request, a download file corresponding to the target application program, where the download file includes a target installation file and a target compilation file, the target compilation file includes a compiled target code, and the target code is obtained by compiling a method or code whose execution frequency is higher than a threshold;
and the second sending module is used for sending the download file to the first electronic equipment, so that the first electronic equipment executes installation operation according to the download file.
In a fifth aspect, the present application provides an electronic device, which includes a processor and a memory, where the memory stores a program or instructions running on the processor, and the program or instructions, when executed by the processor, implement the steps of the method according to the first aspect or the second aspect.
In a sixth aspect, embodiments of the present application provide a readable storage medium, on which a program or instructions are stored, which when executed by a processor implement the steps of the method according to the first or second aspect.
In a seventh aspect, an embodiment of the present application provides a chip, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and the processor is configured to execute a program or instructions to implement the method according to the first aspect or the second aspect.
In an eighth aspect, embodiments of the present application provide a computer program product, stored on a storage medium, for execution by at least one processor to implement a method according to the first or second aspect.
In the embodiment of the application, the target installation file and the target compilation file corresponding to the target application program are obtained, the target compilation file comprises a compiled target code, and the target code is obtained by compiling a method or a code with an execution frequency higher than a threshold value, so that the target application program can be quickly installed in the installation operation process of the electronic equipment, the compiled target code can be directly executed in the running process of the target application program, and the method or the code with the execution frequency higher than the threshold value does not need to be recompiled, so that the resource occupation in the running process of the target application program can be reduced, the running smoothness of the electronic equipment is improved, and the problems that the application program occupies a large number of resources of the electronic equipment in the running process and affects the use smoothness are solved.
Drawings
Fig. 1-1 is a schematic diagram of an implementation environment of a network system according to an embodiment of the present application;
fig. 1-2 are schematic diagrams of an implementation environment of another network system provided by an embodiment of the present application;
fig. 2 is a flowchart of an application installation method provided in an embodiment of the present application:
fig. 3 is a flowchart of an application installation method provided in an embodiment of the present application;
FIG. 4 is a flowchart of an application installation method provided in an embodiment of the present application;
fig. 5 is a block diagram illustrating an application installation apparatus according to an embodiment of the present disclosure;
fig. 6 is a block diagram illustrating an application installation apparatus according to an embodiment of the present disclosure;
fig. 7 is a schematic diagram of an electronic device provided in an embodiment of the present application;
fig. 8 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described clearly below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments that can be derived by one of ordinary skill in the art from the embodiments given herein are intended to be within the scope of the present disclosure.
The terms first, second and the like in the description and in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that embodiments of the application may be practiced in sequences other than those illustrated or described herein, and that the terms "first," "second," and the like are generally used herein in a generic sense and do not limit the number of terms, e.g., the first term can be one or more than one. In addition, "and/or" in the specification and claims means at least one of connected objects, a character "/" generally means that a preceding and succeeding related objects are in an "or" relationship.
The following describes in detail an application installation method provided in the embodiments of the present application through specific embodiments and application scenarios thereof with reference to the accompanying drawings.
Fig. 1-1 is a schematic diagram of a network system according to an embodiment of the present application. As shown in fig. 1-1, a network system provided by the embodiment of the present application may include a first electronic device 110 and a target server 120. The first electronic device 110 may be any device with a storage medium, such as a mobile phone, a tablet computer, a personal digital assistant, a mobile internet electronic device, a wearable device, and the like. The target server 120 may include at least one server. In the case where the target server 120 comprises a server, the first electronic device 110 may receive a first input from a user and send a download request for the target application to the target server 120. The target server 120 may obtain a download file corresponding to the target application after receiving the download request, and then send the download file to the first electronic device, where the download file includes a target installation file and a target compilation file. So that the first electronic device 110 can receive the download file and perform an installation operation according to the download file.
Fig. 1-2 are schematic diagrams of an implementation environment of another network system provided in an embodiment of the present application. As shown in fig. 1-2, in a case that the target server 120 may include a plurality of servers (e.g., a compiling server and a downloading server), the network system provided by the embodiment of the present application may include the first electronic device 110, the downloading server 1201 and the compiling server 1202. The compiling server 1202 may obtain an installation package of an application program and a configuration file (profile file) generated during an operation process of the application program from different electronic devices (e.g., mobile phones), compile the configuration file, and send the compiled configuration file to the download server 1201. The download server 1201 may store various application installation packages and target compiled files, and receive a download request of the first electronic device for a target application. The first electronic device 110 may send a download request for the target application to the download server 1201 according to the first input. Accordingly, after receiving the download request sent by the first electronic device 110, the download server 1201 may obtain the target installation file and the target compilation file corresponding to the target application, and send the target installation file and the target compilation file to the first electronic device 110, so that the first electronic device performs an installation operation according to the target installation file and the target compilation file.
It should be noted that the aforementioned target servers may be cloud servers, and the target servers including the compiling server and the downloading server are only an example and are not considered to limit the number of the target servers. Meanwhile, the target server may include a greater number of servers corresponding to the functions depending on the functions exerted by the target server.
It should be noted that the application installation method provided in the embodiment of the present application may be applicable to different operating systems, such as an android operating system and an ios operating system, and for convenience of understanding, the android operating system is taken as an example for explanation.
Fig. 2 is a flowchart of an application installation method according to an embodiment of the present application. Referring to fig. 2, the method provided by the embodiment of the present application may be applied to a first electronic device, and may include:
step 210, receiving a first input of a user, wherein the first input is used for sending a downloading request aiming at a target application program to a target server;
in the embodiment of the application, the first electronic device may send a download request for the target application to the target server according to a first input of a user. The first input may be various inputs made by the user on the screen of the first electronic device, such as a click input, a long press input, a swipe input, and the like. The download request may be used to obtain a download file for the target application from the target server. The target application program may be an application that is not installed on the first electronic device, or may be an application that is installed on the first electronic device but is not updated.
It should be noted that, in the embodiment of the present application, the first electronic device is an execution subject of the application installation method shown in fig. 2.
In this embodiment, specifically, there may be application software for installing a target application in the first electronic device, for example, an application store, after the user starts the application software, information of various applications may be displayed in an application store interface, and the user may trigger generation of a download request through a first input (e.g., a click operation for the target application) and send the download request for the target application to the target server.
In one embodiment, before the first electronic device receives the download file corresponding to the target application, the first electronic device may first obtain system information of the first electronic device and installation version information of the target application, and then may send a download request for the target application to the target server, where the download request may include the system information of the first electronic device and the installation version information of the target application. Therefore, a receiver (for example, a target server) of the download request can acquire the download file matched with the system information and the installation version information according to the download request and send the download file to the first electronic device, and then the first electronic device can acquire the installation file matched with the first electronic device, so that the situation that the target application program cannot normally run due to the problems of the operating system and/or the installation version is avoided.
In this embodiment of the application, the system information of the first electronic device may be used to represent an operating system of the first electronic device, for example, an Android system 8.0. The installation version information of the target application program may include a target application name and target application version information, etc., such as App1 v 3.0. For example, the first electronic device may obtain system information Android system 8.0 of the first electronic device and installation version information App1 v3.0 of the target application program, and further may generate a download request including the system information of the first electronic device and the installation version information of the target application program, and then send the download request to the target server. The target server may acquire a download file matching the system information and the installation version information after receiving the download request, and transmit the download file to the first electronic device.
It should be appreciated that in some cases, for example, in a case where the target server already knows some information in advance, the information included in the download request sent by the first electronic device to the target server may be reduced accordingly. For example, when the target server already knows the system information of the first electronic device in advance, the download request sent by the first electronic device to the target server may also include only the installation version information of the target application. Similarly, in the case where the server has previously learned the installation version information of the target application program, the download request sent by the first electronic device to the target server may also include only the system information of the first electronic device.
Step 220, in the case of receiving a download file corresponding to the target application program, executing installation operation according to the download file; the download file comprises an object installation file and an object compiling file, the object compiling file comprises compiled object codes, and the object codes are obtained by compiling a method or a code with execution frequency higher than a threshold value.
In the embodiment of the application, the first electronic device may receive a download file corresponding to the target application program, which is sent by the target server. The target installation file may be an apk corresponding to the target application. The target compilation file may include files obtained after compilation according to the apk and a configuration file (profile file), such as a vdex file, an odex file, an art file, and the like. The object compiling file comprises compiled object codes, and the object codes can be obtained by compiling codes or methods with execution frequency higher than a threshold value. The method or code with the execution frequency higher than the threshold may indicate that the method or code is frequently executed more than a certain number of times, i.e. the threshold, during the running process of the App, and the threshold may be set as required, for example, 5, 8, or 11.
In the embodiment of the present application, the method or the code with the execution frequency higher than the threshold may be a hot code in a profile file. The object code in the object compilation file may include compiled hot spot code.
Before the target server sends the download file to the first electronic device, the target server may first acquire a profile file generated in the App running process from each of the other electronic devices, acquire an apk corresponding to the App, obtain various compilation files by compiling the apk and the profile file, and store the compilation files. It should be noted that, an operating system to which a code interpretation specification is applicable is generally provided in the apk, and a code related to the operating system can be compiled simultaneously in the compiling process, so that it is ensured that a compiled file obtained after compiling can be applicable to a corresponding operating system.
According to the embodiment of the application, the plurality of profile files are obtained from the plurality of electronic devices, and the compiled files obtained according to the profile files can be suitable for different operating systems. Taking the first electronic device system information as the Android system 8.0 and the installation version information App1 v3.0 of the target application as an example, after the first electronic device sends a download request for the target application to the target server, the first electronic device may receive an App1 v3.0 version apk and a target compilation file applicable to the Android system 8.0, so that installation operation may be performed according to the apk and the target compilation file.
In one embodiment, the step 220 of performing an installation operation according to the download file may include: checking the target compilation file; and under the condition that the target compiling file is successfully verified, migrating the target compiling file to an installation directory of the target application program. Therefore, the code legality can be determined through verification, the target compiling file is migrated to the installation directory of the target application program, the target code can be directly operated according to the target compiling file in the subsequent operation process of the target application program, a method or a code with the execution frequency higher than a threshold value does not need to be compiled again, and the operation smoothness of equipment is further improved.
In this embodiment of the present application, the target compiled file may include a vdex file, an odex file, an art file, and the like. The vdex file may be obtained after compiling according to the apk and profile files, and the vdex file may include metadata for verification. The target compilation file can be verified according to the metadata in the vdex file, and under the condition that the verification of the target compilation file is successful, the target installation file can be installed and the target compilation file (the vdex file and the like) can be migrated to the installation directory of the target application program.
It can be appreciated that in the event of a verification failure, the target compilation file may not be available, at which point the target installation file may be compiled locally during the installation process. The local compilation may be a pre-runtime compilation (AOT). In addition, under the condition of failed verification, only the legality of the class can be verified, and the java code is not compiled.
In the embodiment of the application, by acquiring the target installation file and the target compilation file corresponding to the target application program, the target compilation file includes a compiled target code, and the target code is obtained by compiling a method or a code with an execution frequency higher than a threshold, so that the first electronic device can not only quickly install the target application program, but also directly execute the compiled target code when the target application program runs without recompiling the method or the code with the execution frequency higher than the threshold, thereby reducing resource occupation when the target application program runs and improving running smoothness of the first electronic device, and thus solving the problem that the application program occupies a large amount of resources of the first electronic device in the running process and affects use smoothness.
Fig. 3 is a flowchart of an application installation method according to an embodiment of the present application. The application installation method provided by the embodiment of the application is applied to the target server, that is, the target server may be an execution subject of the application installation method shown in fig. 3. Referring to fig. 3, an application installation method provided in an embodiment of the present application may include:
step 310, receiving a downloading request of a first electronic device for a target application program;
in the embodiment of the application, the first electronic device may send a download request for the target application to the target server according to a first input of a user. The download request may be used to obtain a download file for the target application from the target server. The target application program may be an application that is not installed on the first electronic device, or may be an application that is installed on the first electronic device but is not updated.
In this embodiment, specifically, an application software for installing a target application program may be installed in the first electronic device, for example, an application store, and after the user starts the application software, information of various application programs may be displayed in an application store interface. The user may trigger generation of a download request by a first input (e.g., a click operation for a target application) and send the download request for the target application to the target server. In this manner, the target server may receive a download request from the first electronic device.
In an embodiment of the application, the download request received by the target server may include at least one of system information of the first electronic device and installation version information of the target application. The system information of the first electronic device may be used to represent an operating system of the first electronic device, for example, an Android system 8.0. The installation version information of the target application program may include a target application name and target application version information, etc., such as App1 v 3.0.
In one embodiment, the target server receives a download request including system information of the first electronic device and installation version information of the target application program. It should be appreciated that in some cases, for example, where the target server already knows some information in advance, the information contained in the download request received by the target server may be reduced accordingly. For example, in a case where the target server already knows the system information of the first electronic device in advance, the download request received by the target server may also include only the installation version information of the target application. Similarly, in the case where the target server has learned the installation version information of the target application in advance, the download request received by the target server may also include only the system information of the first electronic device.
After the target server receives the download request of the first electronic device for the target application program, the subsequent step 320 may be performed.
Step 320, obtaining a download file corresponding to the target application program according to the download request, where the download file includes a target installation file and a target compilation file, the target compilation file includes a compiled target code, and the target code is obtained by compiling a method or code whose execution frequency is higher than a threshold;
in one embodiment, the download request from the first electronic device may include system information of the first electronic device and installation version information of the target application. In this case, step 320 may include: and under the condition that the downloading request comprises the system information of the first electronic equipment and the installation version information of the target application program, acquiring a downloading file corresponding to the target application program according to the system information and the installation version information. Therefore, the download file acquired by the target server can be better matched with the specific configuration information of the first electronic device, and the target application program can be guaranteed to run on the first electronic device with better performance.
In this embodiment of the present application, the target compilation file may include a file obtained by compiling according to the apk and a configuration file (profile file), such as a vdex file, an odex file, an art file, and the like. The object compiling file comprises compiled object codes, and the object codes are obtained by compiling the methods or codes with execution frequency higher than a threshold value. The method or code with the execution frequency higher than the threshold may indicate that the method or code is frequently executed more than a certain number of times, i.e. the threshold, during the running process of the App, and the threshold may be set as required, for example, 5, 8, or 11.
In the embodiment of the present application, the method or the code with the execution frequency higher than the threshold may be a hot code in a profile file. That is, the object code in the object compilation file may include compiled hot spot code.
In this embodiment of the application, before the download file corresponding to the target application is obtained in step 320, the target server may obtain a profile file generated in the running process of the target application from other electronic devices, obtain an apk corresponding to the target application, obtain various compiled files by compiling the apk and the profile file, and store the compiled files. It should be noted that, an operating system to which a code interpretation specification is applicable is generally provided in the apk, and a code related to the operating system can be compiled simultaneously in the compiling process, so that it can be ensured that a compiled file obtained after compiling can be applicable to a corresponding operating system.
According to the method and the device, the plurality of profile files are obtained from various different electronic devices, and the compiled files obtained according to the profile files can be suitable for various different operating systems. Taking the system information of the first electronic device as the Android system 8.0 and the installation version information App1 v3.0 of the target application as an example, after the target server receives a download request for the target application sent by the first electronic device, the target server may search for a corresponding download file in the local database according to information included in the download request (i.e., the Android system 8.0 and the installation version information App1 v3.0 of the target application), so as to obtain an App1 v3.0 version apk and a target compiled file applicable to the Android system 8.0. After the target server obtains the download file, the subsequent step 330 may be executed.
Step 330, sending the download file to the first electronic device, so that the first electronic device executes an installation operation according to the download file.
In the embodiment of the application, by obtaining an object installation file and an object compilation file corresponding to an object application program, the object compilation file includes a compiled object code, and the object code is obtained by compiling a method or a code with an execution frequency higher than a threshold, so that a first electronic device can quickly install the object application program and directly execute the compiled object code when the object application program runs in the process of executing installation operation, and the method or the code with the execution frequency higher than the threshold does not need to be recompiled, so that resource occupation in the running of the object application program can be reduced, the running smoothness of the first electronic device can be improved, and the problem that the application program occupies a large amount of resources of the first electronic device in the running process and affects the use smoothness is solved.
Fig. 4 is a flowchart of an application installation method according to an embodiment of the present application. Referring to fig. 4, the application installation method provided by the embodiment of the present application is applied to a target server, and may include:
step 410, acquiring a first file;
in this embodiment of the application, the first file may be a file generated during the process of running the target application on the second electronic device, and the first file may include a method or code with an execution frequency higher than a preset value. The preset value can be set as required, for example, 5, 8, or 11. Wherein the preset value may be the same as or different from the threshold mentioned before. In case the preset value is different from the aforementioned threshold value, for example, the preset value may be smaller than the aforementioned threshold value.
In the embodiment of the present application, the target server is an execution subject of the application installation method shown in fig. 4. The target server may retrieve the first file from the second electronic device. The second electronic device may be different from the first electronic device described above.
In the embodiment of the application, the target application program can be installed on the second electronic equipment. In this way, the first file may be generated during the running of the target application by the second electronic device. Specifically, taking the target application program as App1 as an example, in the process of running App1 by the second electronic device, the second electronic device may identify a method or code with an execution frequency higher than a preset value as a hot code (hot code), and record the hot code and store the hot code in the first file. The subsequent second electronic device may actively upload the first file to the target server, or the second electronic device may upload the first file to the target server upon a request of the target server. Thus, the target server can obtain the first file.
It should be understood that, in the embodiment of the present application, the second electronic device may also be a type of electronic device, and not necessarily one electronic device, and a device different from the aforementioned first electronic device may also be the second electronic device. Similarly, the first file may be a type of file, not necessarily a file. The file generated by running the target application on the second electronic device and including the method or code having the execution frequency higher than the preset value may be the first file.
In the embodiment of the present application, the first file generated on the second electronic device may correspond to the operation information of the second electronic device and/or the installation version information of the target application. For example, a first file generated on a second electronic device may be matched with operational information of the second electronic device and installation version information of a target application.
Step 420, compiling the first file to obtain a compiled second file;
in this embodiment of the application, the target server may obtain an apk of the target application program and obtain a first file from the second electronic device, and the target server may compile the apk and the corresponding first file to obtain a compiled second file, where the second file may include a vdex file, an odex file, or an art file.
In the embodiment of the application, the first file generated on the second electronic device may correspond to the operation information of the second electronic device and the installation version information of the target application program. Similarly, the second file may also have a corresponding relationship with the operation information of the second electronic device and the installation version information of the target application program. Since the target server may obtain the first files from a plurality of second electronic devices, the number of the second files obtained in step 420 may also be multiple. One second file may be a file for a specific operation information and an installation version information of a specific target application.
It should be noted that, as described above with reference to fig. 1-1 and fig. 1-2, the same server may be used to obtain the first file and compile the first file to obtain the compiled second file, or multiple different servers may be used to perform corresponding operations, for example, obtaining the first file by using the first server, compiling the first file by using the second server to obtain the compiled second file, and the second server may be configured to receive a download request of the first electronic device for the target application.
Step 430, receiving a downloading request of the first electronic device for the target application program;
see step 310 for a specific implementation of step 430.
Step 440, according to the download request, obtaining a target compilation file corresponding to the target application program from the compiled second file, and simultaneously obtaining a target installation file corresponding to the target application program;
in this embodiment, the target server may store the second file and the corresponding target installation file. The target server may search in the database according to the download request, obtain the target compiled file from the compiled second file, and obtain the corresponding target installation file at the same time.
In one embodiment, the number of the second files is multiple, and the target compiled file is a file that matches the system information of the first electronic device and matches the installation version information in the multiple second files. Therefore, the target compiled file matched with the system information and the installation version information can be obtained from the plurality of second files, the target compiled file can be suitable for the first electronic equipment, and the situation of incompatibility is avoided.
For example, the target server may store a plurality of second files for the target application, for example, a second file (for example, the number 1) corresponding to App1 v2.0 and applicable to android7.0, a second file (for example, the number 2) corresponding to App1 v3.0 and applicable to android8.0, a second file (for example, the number 3) corresponding to App1 v4.0 and applicable to android9.0, and the like. In the case where the download request from the first electronic device includes the system information (e.g., android8.0) of the first electronic device and the installation version information (e.g., App1 v3.0) of the target application program, the target server may acquire a second file (i.e., second file numbered 2) that matches the system information and the installation version information as a target compiled file according to the download request.
Step 450, sending the object installation file and the object compilation file to the first electronic device, so that the first electronic device executes installation operation according to the object installation file and the object compilation file.
After the target server obtains the target installation file and the target compilation file according to the downloading request of the target application program, the target installation file and the target compilation file can be sent to the first electronic device, so that the first electronic device can execute installation operation according to the target installation file and the target compilation file.
In the embodiment of the application, by acquiring the first file generated in the process of running the target application program on the second electronic device and compiling the first file into the second file on the target server in advance, the first electronic device can directly acquire the target compiled file containing the target code from the compiled second file without a method or a code with the recompilation execution frequency higher than a threshold value, so that the resource occupation of the running of the target application program can be reduced, and the running smoothness of the first electronic device is improved.
An embodiment of the present application further provides an application installation apparatus, as shown in fig. 5, the application installation apparatus 500 includes:
a first receiving module 510, configured to receive a first input of a user, where the first input is used to send a download request for a target application to a target server;
a first processing module 520, configured to, in a case where a download file corresponding to the target application is received, perform an installation operation according to the download file;
the download file comprises an object installation file and an object compiling file, the object compiling file comprises compiled object codes, and the object codes are obtained by compiling a method or a code with execution frequency higher than a threshold value.
In the embodiment of the application, by acquiring the target installation file and the target compilation file corresponding to the target application program, the target compilation file comprises a compiled target code, and the target code is obtained by compiling a method or a code with an execution frequency higher than a threshold value, so that the application program installation device can quickly install the target application program and directly execute the compiled target code when the target application program runs in the installation operation process, and the method or the code with the execution frequency higher than the threshold value does not need to be recompiled, so that the resource occupation of the target application program when the target application program runs can be reduced, the running smoothness is improved, and the problems that the application program occupies a large amount of resources in the running process and affects the use smoothness are solved.
In an embodiment, in the process of executing the installation operation according to the downloaded file, the first processing module 520 is specifically configured to: checking the target compilation file; and under the condition that the target compiling file is successfully verified, migrating the target compiling file to an installation directory of the target application program. Therefore, code legality can be determined through verification, the target compiling file is migrated to the installation directory of the target application program, the target code can be directly operated according to the target compiling file in the subsequent operation process of the target application program, a method or a code with execution frequency higher than a threshold value does not need to be compiled again, and operation smoothness is improved.
In one embodiment, the apparatus further comprises: the device comprises a first acquisition module and a first sending module, wherein the first acquisition module is used for acquiring system information of the device and installation version information of the target application program before receiving a download file corresponding to the target application program; the first sending module is configured to send a download request for a target application to a target server, where the download request includes the system information and the installation version information. Thus, the application installation apparatus shown in fig. 5 can obtain the download file matched with the system information and the installation version information according to the download request, thereby avoiding the situation that the target application cannot normally run due to the problem of the operating system and/or the installation version.
An embodiment of the present application further provides an application installation apparatus, as shown in fig. 6, where the application installation apparatus 600 includes:
a second receiving module 610, configured to receive a download request of the first electronic device for the target application;
a second obtaining module 620, configured to obtain, according to the download request, a download file corresponding to the target application program, where the download file includes a target installation file and a target compilation file, and the target compilation file includes a compiled target code, where the target code is obtained by compiling a code or a method whose execution frequency is higher than a threshold;
a second sending module 630, configured to send the download file to the first electronic device, so that the first electronic device executes an installation operation according to the download file.
In the embodiment of the application, the target installation file and the target compilation file corresponding to the target application program are obtained, the target compilation file comprises a compiled target code, and the target code is obtained by compiling a method or a code with an execution frequency higher than a threshold value, so that the electronic equipment can quickly install the target application program and directly execute the compiled target code when the target application program runs in the installation operation process, and the method or the code with the execution frequency higher than the threshold value does not need to be recompiled, so that the resource occupation of the target application program when the target application program runs can be reduced, the running smoothness is improved, and the problems that the application program occupies a large amount of resources in the running process and affects the use smoothness are solved.
In an embodiment, in the process of acquiring the download file corresponding to the target application according to the download request, the second acquiring module 620 is specifically configured to: and under the condition that the downloading request comprises the system information of the first electronic equipment and the installation version information of the target application program, acquiring a downloading file corresponding to the target application program according to the system information and the installation version information. Therefore, the acquired download file can be ensured to be matched with the specific configuration information of the first electronic device, and the target application program can be ensured to run on the first electronic device with better performance.
In one embodiment, the second obtaining module 620 is further configured to: before a download file corresponding to the target application program is acquired, acquiring a first file, wherein the first file is generated in the process of running the target application program on second electronic equipment and comprises a method or a code with execution frequency higher than a preset value; the device also comprises a second processing module, wherein the second processing module is used for compiling the first file to obtain a compiled second file; in the process of acquiring the download file corresponding to the target application program according to the download request, the second acquisition module is specifically configured to: and acquiring a target compiling file corresponding to the target application program from the compiled second file according to the downloading request. In this way, by acquiring the first file generated in the process of running the target application program on the second electronic device, and compiling the first file into the second file in advance on the application program installation apparatus shown in fig. 6, the first electronic device can directly acquire the target compiled file containing the target code from the compiled second file, without a method or a code having an execution frequency higher than a threshold value for recompilation, so that the resource occupation of the target application program during running can be reduced, and the running smoothness of the first electronic device can be improved.
In one embodiment, the number of the second files is multiple, and the target compiled file is a file that is matched with the system information of the first electronic device and is matched with the installation version information in the multiple second files. Therefore, the target compiled file matched with the system information and the installation version information can be obtained from the second file, the target compiled file can be suitable for the first electronic equipment, and the situation of incompatibility is avoided.
The application installation device in the embodiment of the present application may be an electronic device, and may also be a component in the electronic device, such as an integrated circuit or a chip. The electronic device may be a terminal, or may be a device other than a terminal. The electronic Device may be, for example, a Mobile phone, a tablet computer, a notebook computer, a palm top computer, a vehicle-mounted electronic Device, a Mobile Internet Device (MID), an Augmented Reality (AR)/Virtual Reality (VR) Device, a robot, a wearable Device, an ultra-Mobile personal computer (UMPC), a netbook or a Personal Digital Assistant (PDA), and the like, and may also be a server, a Network Attached Storage (NAS), a Personal Computer (PC), a Television (TV), a teller machine, a self-service machine, and the like, and the embodiments of the present application are not particularly limited.
The application installation device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, and embodiments of the present application are not limited specifically.
The application installation device provided in the embodiment of the present application can implement each process implemented by the method embodiments of fig. 2 to fig. 4, and is not described here again to avoid repetition.
Optionally, as shown in fig. 7, an electronic device 700 is further provided in an embodiment of the present application, and includes a processor 710 and a memory 720, where the memory 710 stores a program or an instruction that can be executed on the processor 720, and when the program or the instruction is executed by the processor 710, the steps of the embodiment of the application installation method are implemented, and the same technical effects can be achieved, and are not described again to avoid repetition.
It should be noted that the electronic device in the embodiment of the present application includes the mobile electronic device and the non-mobile electronic device described above.
Fig. 8 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
The electronic device 800 includes, but is not limited to: a radio frequency unit 801, a network module 802, an audio output unit 803, an input unit 804, a sensor 805, a display unit 806, a user input unit 807, an interface unit 808, a memory 809, and a processor 810.
Those skilled in the art will appreciate that the electronic device 800 may further comprise a power source (e.g., a battery) for supplying power to the various components, and the power source may be logically connected to the processor 810 via a power management system, so as to manage charging, discharging, and power consumption management functions via the power management system. The electronic device structure shown in fig. 8 does not constitute a limitation of the electronic device, and the electronic device may include more or less components than those shown, or combine some components, or arrange different components, and thus, the description is omitted here.
Wherein, the user input unit 807 is configured to receive a first input of a user, the first input being used to send a download request for a target application to a target server.
A processor 810, configured to, in a case where a download file corresponding to the target application is received, perform an installation operation according to the download file; the download file comprises an object installation file and an object compiling file, the object compiling file comprises compiled object codes, and the object codes are obtained by compiling a method or a code with execution frequency higher than a threshold value.
In the embodiment of the application, the target installation file and the target compilation file corresponding to the target application program are obtained, the target compilation file comprises a compiled target code, and the target code is obtained by compiling a method or a code with an execution frequency higher than a threshold value, so that the target application program can be quickly installed in the installation operation process of the electronic equipment, the compiled target code can be directly executed in the running process of the target application program, and the method or the code with the execution frequency higher than the threshold value does not need to be recompiled, so that the resource occupation in the running process of the target application program can be reduced, the running smoothness of the electronic equipment is improved, and the problems that the application program occupies a large number of resources of the electronic equipment in the running process and affects the use smoothness are solved.
Optionally, in the process of executing the installation operation according to the target installation file and the target compilation file, the processing module 810 is specifically configured to: checking the target compilation file; and under the condition that the target compiling file is successfully verified, migrating the target compiling file to an installation directory of the target application program. Therefore, the code legality can be determined through verification, the target compiling file is migrated to the installation directory of the target application program, the target code can be directly operated according to the target compiling file in the subsequent operation process of the target application program, a method or a code with the execution frequency higher than a threshold value does not need to be compiled again, and the operation smoothness of equipment is further improved.
Optionally, the processing module 810 is further configured to, before receiving the download file corresponding to the target application program, obtain system information of the electronic device and installation version information of the target application program; and sending a downloading request aiming at the target application program to a target server, wherein the downloading request comprises the system information and the installation version information. Therefore, the electronic equipment can acquire the download file matched with the system information and the installation version information according to the download request, and the situation that the target application program cannot normally run due to the problems of the operating system and/or the installation version is avoided.
It should be understood that, in the embodiment of the present application, the input Unit 804 may include a Graphics Processing Unit (GPU) 8041 and a microphone 8042, and the Graphics Processing Unit 8041 processes image data of a still picture or a video obtained by an image capturing device (such as a camera) in a video capturing mode or an image capturing mode. The display unit 806 may include a display panel 8061, and the display panel 8061 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 807 includes at least one of a touch panel 8071 and other input devices 8072. A touch panel 8071, also referred to as a touch screen. The touch panel 8071 may include two portions of a touch detection device and a touch controller. Other input devices 8072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail herein.
The memory 809 may be used to store software programs as well as various data. The memory 809 may mainly include a first storage area storing programs or instructions and a second storage area storing data, wherein the first storage area may store an operating system, application programs or instructions required for at least one function (such as a sound playing function, an image playing function, and the like), and the like. Further, the memory 809 can include volatile memory or nonvolatile memory, or the memory 809 can include both volatile and nonvolatile memory. The non-volatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash Memory. The volatile Memory may be a Random Access Memory (RAM), a Static Random Access Memory (Static RAM, SRAM), a Dynamic Random Access Memory (Dynamic RAM, DRAM), a Synchronous Dynamic Random Access Memory (Synchronous DRAM, SDRAM), a Double Data Rate Synchronous Dynamic Random Access Memory (Double Data Rate SDRAM, ddr SDRAM), an Enhanced Synchronous SDRAM (ESDRAM), a Synchronous Link DRAM (SLDRAM), and a Direct Memory bus RAM (DRRAM). The memory 809 in the present embodiment of the application includes, but is not limited to, these and any other suitable types of memory.
Processor 810 may include one or more processing units; optionally, the processor 810 integrates an application processor, which primarily handles operations related to the operating system, user interface, and applications, and a modem processor, which primarily handles wireless communication signals, such as a baseband processor. It will be appreciated that the modem processor described above may not be integrated into processor 810.
The embodiment of the present application further provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or the instruction is executed by a processor, the program or the instruction implements each process of the above-mentioned application program installation method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read only memory ROM, a random access memory RAM, a magnetic or optical disk, and the like.
The embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction to implement each process of the above embodiment of the application program installation method, and can achieve the same technical effect, and in order to avoid repetition, the details are not repeated here.
It should be understood that the chips mentioned in the embodiments of the present application may also be referred to as system-on-chip, system-on-chip or system-on-chip, etc.
The embodiments of the present application provide a computer program product, where the program product is stored in a storage medium, and the program product is executed by at least one processor to implement the processes of the foregoing application program installation method embodiments, and can achieve the same technical effects, and in order to avoid repetition, details are not described here again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. Further, it should be noted that the scope of the methods and apparatus of the embodiments of the present application is not limited to performing the functions in the order illustrated or discussed, but may include performing the functions in a substantially simultaneous manner or in a reverse order based on the functions involved, e.g., the methods described may be performed in an order different than that described, and various steps may be added, omitted, or combined. In addition, features described with reference to certain examples may be combined in other examples.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present application.
While the present embodiments have been described with reference to the accompanying drawings, it is to be understood that the present embodiments are not limited to those precise embodiments, which are intended to be illustrative rather than restrictive, and that various changes and modifications may be effected therein by one skilled in the art without departing from the scope of the appended claims.

Claims (14)

1. An application program installation method applied to a first electronic device includes:
receiving a first input of a user, wherein the first input is used for sending a downloading request aiming at a target application program to a target server;
executing installation operation according to the download file under the condition of receiving the download file corresponding to the target application program;
the download file comprises an object installation file and an object compiling file, the object compiling file comprises compiled object codes, and the object codes are obtained by compiling a method or a code with execution frequency higher than a threshold value.
2. The method of claim 1, wherein the performing an installation operation according to the download file comprises:
checking the target compilation file;
and under the condition that the target compiling file is successfully verified, migrating the target compiling file to an installation directory of the target application program.
3. The method of claim 1, wherein prior to said receiving the download file corresponding to the target application, the method further comprises:
acquiring system information of the first electronic equipment and installation version information of the target application program;
and sending a downloading request aiming at the target application program to a target server, wherein the downloading request comprises the system information and the installation version information.
4. An application program installation method is applied to a target server and comprises the following steps:
receiving a downloading request of a first electronic device for a target application program;
according to the downloading request, acquiring a downloading file corresponding to the target application program, wherein the downloading file comprises a target installation file and a target compiling file, the target compiling file comprises a compiled target code, and the target code is obtained by compiling a method or a code with the execution frequency higher than a threshold value;
and sending the download file to the first electronic equipment, so that the first electronic equipment executes installation operation according to the download file.
5. The method of claim 4, wherein obtaining the download file corresponding to the target application according to the download request comprises:
and under the condition that the downloading request comprises the system information of the first electronic equipment and the installation version information of the target application program, acquiring a downloading file corresponding to the target application program according to the system information and the installation version information.
6. The method of claim 4, wherein prior to said obtaining the download file corresponding to the target application, the method further comprises:
acquiring a first file, wherein the first file is generated in the process of running the target application program on second electronic equipment, and the first file comprises a method or a code with execution frequency higher than a preset value;
compiling the first file to obtain a compiled second file;
the obtaining of the download file corresponding to the target application program according to the download request includes:
and acquiring a target compiling file corresponding to the target application program from the compiled second file according to the downloading request.
7. The method according to claim 6, wherein the number of the second files is plural, and the target compilation file is a file that matches the system information of the first electronic device and matches the installation version information among the plural second files.
8. An application installation apparatus, comprising:
the system comprises a first receiving module, a first processing module and a second receiving module, wherein the first receiving module is used for receiving first input of a user, and the first input is used for sending a downloading request aiming at a target application program to a target server;
the first processing module is used for executing installation operation according to the download file under the condition of receiving the download file corresponding to the target application program;
the download file comprises an object installation file and an object compiling file, the object compiling file comprises compiled object codes, and the object codes are obtained by compiling a method or a code with execution frequency higher than a threshold value.
9. The apparatus according to claim 8, wherein in the process of executing the installation operation according to the download file, the first processing module is specifically configured to:
checking the target compilation file;
and under the condition that the target compiling file is successfully verified, migrating the target compiling file to an installation directory of the target application program.
10. The apparatus of claim 8, further comprising a first obtaining module and a first sending module,
the first obtaining module is used for obtaining the system information of the device and the installation version information of the target application program before receiving the download file corresponding to the target application program;
the first sending module is configured to send a download request for a target application to a target server, where the download request includes the system information and the installation version information.
11. An application installation apparatus, comprising:
the second receiving module is used for receiving a downloading request of the first electronic equipment for the target application program;
a second obtaining module, configured to obtain, according to the download request, a download file corresponding to the target application program, where the download file includes a target installation file and a target compilation file, the target compilation file includes a compiled target code, and the target code is obtained by compiling a method or code whose execution frequency is higher than a threshold;
and the second sending module is used for sending the download file to the first electronic equipment, so that the first electronic equipment executes installation operation according to the download file.
12. The apparatus according to claim 11, wherein in the process of acquiring the download file corresponding to the target application according to the download request, the second acquiring module is specifically configured to:
and under the condition that the downloading request comprises the system information of the first electronic equipment and the installation version information of the target application program, acquiring a downloading file corresponding to the target application program according to the system information and the installation version information.
13. The apparatus of claim 11, wherein the second obtaining module is further configured to:
before a download file corresponding to the target application program is acquired, acquiring a first file, wherein the first file is generated in the process of running the target application program on second electronic equipment and comprises a method or a code with execution frequency higher than a preset value;
the device also comprises a second processing module, wherein the second processing module is used for compiling the first file to obtain a compiled second file;
in the process of acquiring the download file corresponding to the target application program according to the download request, the second acquisition module is specifically configured to:
and acquiring a target compiling file corresponding to the target application program from the compiled second file according to the downloading request.
14. The apparatus according to claim 13, wherein the second file is plural in number, and the target compiled file is a file that matches the system information of the first electronic device and matches the installation version information among the plural second files.
CN202210036342.3A 2022-01-13 2022-01-13 Application program installation method and device Pending CN114489698A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210036342.3A CN114489698A (en) 2022-01-13 2022-01-13 Application program installation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210036342.3A CN114489698A (en) 2022-01-13 2022-01-13 Application program installation method and device

Publications (1)

Publication Number Publication Date
CN114489698A true CN114489698A (en) 2022-05-13

Family

ID=81511417

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210036342.3A Pending CN114489698A (en) 2022-01-13 2022-01-13 Application program installation method and device

Country Status (1)

Country Link
CN (1) CN114489698A (en)

Similar Documents

Publication Publication Date Title
CN107992308B (en) Plug-in management method for android terminal application program
CN110866198B (en) Static resource caching method, system, device, computer equipment and storage medium
WO2017166447A1 (en) Method and device for loading kernel module
CN103443763A (en) ISA bridging including support for call to overidding virtual functions
CN103544434A (en) Method and terminal used for ensuring safe operation of application program
CN110765394A (en) So file loading method and device, storage medium and terminal equipment
US9185513B1 (en) Method and system for compilation with profiling feedback from client
CN111506904B (en) Method and device for online bug repair
CN112527416A (en) Task processing method and device, computer equipment and storage medium
CN110489138B (en) Application updating method, device and storage medium
CN110908882A (en) Performance analysis method and device of application program, terminal equipment and medium
CN114489698A (en) Application program installation method and device
CN113010179B (en) Independent application running method based on real-time operating system
CN115599669A (en) Debugging method and device of microservice, electronic equipment and readable storage medium
CN113282363A (en) Method and device for optimizing hybrid APP
CN109840156B (en) Data caching method and equipment, storage medium and terminal thereof
CN111488286A (en) Method and device for independently developing Android module
CN108345461B (en) Application updating method and device and computer readable storage medium
CN111124627A (en) Method, device, terminal and storage medium for determining application program caller
CN113590166B (en) Application program updating method and device and computer readable storage medium
CN113722011B (en) Application interface starting method, device, equipment and storage medium
JP2018005915A (en) Method and system for providing application package, and method and system for executing application
CN116661844A (en) Configuration file processing method, application program updating method, device and server
CN116360824A (en) Hot update method of application program, terminal device and storage medium
CN116775356A (en) Application program operation control method, device, equipment and medium

Legal Events

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