CN110609689A - Application installation and operation method and device - Google Patents
Application installation and operation method and device Download PDFInfo
- Publication number
- CN110609689A CN110609689A CN201910785663.1A CN201910785663A CN110609689A CN 110609689 A CN110609689 A CN 110609689A CN 201910785663 A CN201910785663 A CN 201910785663A CN 110609689 A CN110609689 A CN 110609689A
- Authority
- CN
- China
- Prior art keywords
- hot spot
- code file
- application
- application program
- codes
- 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.)
- Withdrawn
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/61—Installation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44505—Configuring for program initiating, e.g. using registry, configuration files
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The invention discloses an installation and operation method of an application, which comprises the following steps: when an application program is installed, acquiring a hot spot code file, wherein a hot spot code of the application program is recorded in the hot spot code file; prefabricating the hot spot code file to a specified storage path; after the application program is installed, starting the application program, and finding the hot spot code file based on the specified storage path; and reading the hot spot codes from the hot spot code file by using a just-in-time compiling engine, and compiling the hot spot codes. The invention realizes the technical effects of improving the application running speed and improving the system experience in the early stage of application use. Meanwhile, the invention also discloses an installation and operation device of the application, electronic equipment and a computer readable storage medium.
Description
Technical Field
The invention relates to the technical field of computers, in particular to an application installation and operation method and device.
Background
Android (Android), a Linux-based operating system with free and open source code. The mobile phone is mainly used for mobile devices such as smart phones and tablet computers, and is led and developed by Google corporation and the open cell phone alliance.
An ART (Android runtime) mode is an application running mode of an Android system, and is different from a traditional Dalvik mode, execution efficiency of application codes in the ART mode is higher, and smoother system experience can be realized.
However, the ART mode needs to improve the execution efficiency of the code after the application is installed and run for a period of time (for example, after running for one week), and a user feels that the application is "faster to use", and before that (i.e., before the application is used), the execution efficiency of the code cannot be improved, the application running speed is slow, and the system experience is poor.
Disclosure of Invention
The embodiment of the application installation and operation method and device solve the technical problems that in the prior art, in the early stage of application use, the application operation speed is low and the system experience is poor, and achieve the technical effects that in the early stage of application use, the application operation speed is increased and the system experience is improved.
In a first aspect, the present application provides the following technical solutions through an embodiment of the present application:
an installation and running method of an application comprises the following steps:
when an application program is installed, acquiring a hot spot code file, wherein a hot spot code of the application program is recorded in the hot spot code file;
prefabricating the hot spot code file to a specified storage path;
after the application program is installed, starting the application program, and finding the hot spot code file based on the specified storage path;
and reading the hot spot codes from the hot spot code file by using a just-in-time compiling engine, and compiling the hot spot codes.
Preferably, the acquiring the hotspot code file includes:
downloading the hotspot code file from a designated server; or
And extracting the hot spot code file from the installation package file of the application program.
Preferably, the hotspot code is obtained by human statistics or by machine model statistics.
Preferably, the hotspot code file is a prof file in an android system, and the just-in-time compilation engine is a JIT compiler in the android system.
Preferably, the method for installing and running the application further includes:
compiling other codes through an interpretation execution engine in the running process of the application program, wherein the other codes are codes except the hot spot codes in the application program;
counting the execution times of each section of code in the other codes, and taking the code sections with the execution times larger than the preset times as new hot spot codes;
and saving the new hot spot code into the hot spot code file.
In a second aspect, based on the same inventive concept, the present application provides the following technical solutions through an embodiment of the present application:
an installation and operation device of an application, comprising:
the acquisition module is used for acquiring an installation package file of the application program when the application program is installed;
the analysis module is used for analyzing the installation package file and extracting a hot spot code file from the installation package file, wherein the hot spot code file records a hot spot code of the application program;
the configuration module is used for prefabricating the hot spot code file to a specified storage path;
the starting module is used for starting the application program after the application program is installed;
the searching module is used for finding the hot spot code file based on the specified storage path;
and the first compiling module is used for reading the hot spot code from the hot spot code file by utilizing a just-in-time compiling engine and compiling the hot spot code.
Preferably, the obtaining module is specifically configured to:
downloading the hotspot code file from a designated server; or
And extracting the hot spot code file from the installation package file of the application program.
Preferably, the hotspot code is obtained by human statistics or by machine model statistics.
Preferably, the hotspot code file is a prof file in an android system, and the just-in-time compilation engine is a JIT compiler in the android system.
Preferably, the installation and running device of the application further includes:
the second compiling module is used for compiling other codes through an interpretation execution engine in the running process of the application program, wherein the other codes are codes except the hot spot codes in the application program;
the statistical module is used for counting the execution times of each section of code in the other codes and taking the code sections with the execution times larger than the preset times as new hot spot codes;
and the storage module is used for storing the new hot spot code into the hot spot code file.
In a third aspect, based on the same inventive concept, the present application provides the following technical solutions through an embodiment of the present application:
an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method steps of any of the above-mentioned embodiments of the first aspect when executing the program.
In a fourth aspect, based on the same inventive concept, the present application provides the following technical solutions through an embodiment of the present application:
a computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, is adapted to carry out the method steps of any of the embodiments of the first aspect.
One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:
in the embodiment of the application, an installation and operation method of an application is disclosed, which comprises the following steps: when an application program is installed, acquiring a hot spot code file, wherein a hot spot code of the application program is recorded in the hot spot code file; prefabricating the hot spot code file to a specified storage path; after the application program is installed, starting the application program, and finding the hot spot code file based on the specified storage path; and reading the hot spot codes from the hot spot code file by using a just-in-time compiling engine, and compiling the hot spot codes. In the application installation stage, the hot spot code file recorded with the hot spot code can be obtained, and the hot spot code file is prefabricated to the specified storage path, so that the hot spot code file can be found based on the specified storage path after the application program is started, and the hot spot code in the hot spot code file is compiled by using the just-in-time compiling engine. Therefore, the technical effects of improving the application running speed and the system experience in the early stage of application use are achieved, and the technical problems that in the prior art, in the early stage of application use, the application running speed is low and the system experience is poor are solved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on the drawings without creative efforts.
Fig. 1 is a flowchart of an installation and operation method of an application in an embodiment of the present application;
FIG. 2 is a block diagram of an installation and operation device of an application in an embodiment of the present application;
FIG. 3 is a block diagram of an electronic device according to an embodiment of the present disclosure;
fig. 4 is a block diagram of a computer-readable storage medium according to an embodiment of the present application.
Detailed Description
The embodiment of the application installation and operation method and device solve the technical problems that in the prior art, in the early stage of application use, the application operation speed is low and the system experience is poor, and achieve the technical effects that in the early stage of application use, the application operation speed is increased and the system experience is improved.
In order to solve the technical problems, the general idea of the embodiment of the application is as follows:
an installation and running method of an application comprises the following steps: when an application program is installed, acquiring a hot spot code file, wherein a hot spot code of the application program is recorded in the hot spot code file; prefabricating the hot spot code file to a specified storage path; after the application program is installed, starting the application program, and finding the hot spot code file based on the specified storage path; and reading the hot spot codes from the hot spot code file by using a just-in-time compiling engine, and compiling the hot spot codes. In the application installation stage, the hot spot code file recorded with the hot spot code can be obtained, and the hot spot code file is prefabricated to the specified storage path, so that the hot spot code file can be found based on the specified storage path after the application program is started, and the hot spot code in the hot spot code file is compiled by using the just-in-time compiling engine. Therefore, the technical effects of improving the application running speed and the system experience in the early stage of application use are achieved, and the technical problems that in the prior art, in the early stage of application use, the application running speed is low and the system experience is poor are solved.
In order to better understand the technical solution, the technical solution will be described in detail with reference to the drawings and the specific embodiments.
First, it is stated that the term "and/or" appearing herein is merely one type of associative relationship that describes an associated object, meaning that three types of relationships may exist, e.g., a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
Next, in the Android native ART mode, the execution policy of the virtual machine is as follows: after the Apk (android package) is installed, the system defaults to use an interpretation execution mode to run the code, and the running efficiency of the code is low and the running speed of the application is low in the mode. In order to improve the running speed of the application, the system counts the hot spot codes and stores the hot spot codes into the prof file In the application using process of the user, and then the system carries out JIT (Just In Time) compiling according to the prof file every Time the application is started, so that the running speed of the application is improved. However, since the system can count the hot spot codes only after the user uses the application for a period of time (for example, after one week), the execution efficiency of the codes cannot be significantly improved, the application running speed is slow, and the system experience is poor.
Example one
The embodiment provides an installation and operation method of an application, which is applied to electronic equipment, where the electronic equipment may be: a smart phone, or a tablet computer, or a smart television, or a game console, or a digital camera, or a web server, etc. Here, the electronic device is not particularly limited in the embodiment as to what kind of device is. Moreover, an operating system is installed in the electronic device, and the operating system specifically refers to an Android (Android) system.
As shown in fig. 1, the method for installing and running the application includes:
step S101: when the application program is installed, a hot spot code file is obtained, and the hot spot code of the application program is recorded in the hot spot code file.
In a specific implementation, the Application program may be any type of App (Application). For example: music type App, video type App, social type App, photographing type App, stock-frying type App, shopping type App, safety type App, office type App, payment type App, financing type App, travel type App, game type App, and the like. Here, the application program is specifically what App, and this embodiment is not particularly limited.
In a specific implementation process, when an application is installed, an application Apk (android package) file needs to be acquired.
In a specific implementation process, when the electronic device installs an application program based on an Apk file, a corresponding hotspot code file may be acquired, where a hotspot code of the application program is stored. The "hot spot code" refers to code (or code segments) that is executed frequently during the running process of an application, and the executed number of times exceeds a preset number of times, or the executed frequency exceeds a preset frequency.
For example, an application a includes: function 01, function 02, function 03, function 04, and so on, wherein function 01 is a main function and is often used by a user, and other functions are auxiliary functions and are rarely used by the user, so that a code (or code segment) corresponding to function 01 can be marked as a hot spot code and stored in a hot spot code file.
As an optional embodiment, the obtaining the hotspot code file includes:
downloading the hotspot code file from a designated server; or
And extracting the hot spot code file from the installation package file of the application program.
In a specific implementation process, a designated server can be accessed in the process of installing the application program, the designated server stores the hot spot code file, and the hot spot code file is uploaded and downloaded from the designated server.
Or, the hot spot code file is pre-stored in the installation package file, and the hot spot code file can be extracted from the installation package file when the installation package file is analyzed.
As an alternative embodiment, the hotspot code is obtained by human statistics or by machine model statistics.
In a specific implementation process, in an application development stage, a software engineer can count codes in an application, estimate the execution times of each section of codes when the application is used by a user, mark codes (or code sections) with the execution times exceeding a preset time as hot spot codes, and store the hot spot codes in a hot spot code file. Or after the application program is released, the software engineer may periodically count the hot spot codes, store the hot spot codes in the hot spot code file, and then release the hot spot code file to the designated server, so that when the application program is installed on the electronic device, the hot spot code file may be downloaded from the designated server. Of course, the hot spot code of the application program can also be obtained by machine model analysis. In the specific implementation process, hot spot codes account for less than 20% of all codes.
As an alternative embodiment, the hotspot code file may be: a prof file or other designated file in the android system. Here, a prof file is preferred, which may be better compatible with the current android system.
Step S102: and prefabricating the hot spot code file to a specified storage path.
In a specific implementation process, the hot spot code file corresponds to a storage path, and the hot spot code file can be pre-manufactured to the specified storage path in the installation process of the application program.
Taking the 'WeChat' as an example, the specified storage path of the prof file is generally "/data/misc/profiles/current/0/com.
Step S103: and after the application program is installed, starting the application program, and finding the hot spot code file based on the specified storage path.
In a specific implementation process, after the application program is installed, when the application is started, the system can find the hot spot code file based on the specified storage path.
Taking "WeChat" as an example, the specified storage path of the prof file is generally "/data/misc/profiles/current/0/com.intent.mm/primary.prof", and the system can find the hotspot code file (i.e., the prof file) based on the storage path.
Step S104: and reading the hot spot codes from the hot spot code file by using a just-in-time compiling engine, and compiling the hot spot codes.
As an alternative embodiment, the just-in-time compilation engine may be: JIT (Just In Time) compiler In android system. The JIT compiler belongs to a high-speed compiler that can efficiently convert a code into a machine code (binary code) and directly transmit the machine code to a processor, thereby improving program execution efficiency.
In the specific implementation process, when the application program is started each time, the system reads the hot spot code from the hot spot code file (for example, the prof file) by using a just-in-time compilation engine (for example, a JIT compiler), and compiles the hot spot code.
In this embodiment, when the application is installed, the hotspot code file recorded with the hotspot code can be acquired, and the hotspot code file is pre-manufactured to the specified storage path. Therefore, after the application program is started (particularly, the application program is started for the first time), the system can find the hot spot code file based on the specified storage path, and then compile the hot spot codes in the hot spot code file by using the just-in-time compilation engine. The link of counting the hotspot codes in the early stage of application use is omitted, so that the application running speed can be increased in the early stage of application use, and the system experience is improved, and therefore the technical problems that in the early stage of application use, the application running speed is low, and the system experience is poor in the prior art are solved.
As an alternative embodiment, the method further comprises:
compiling other codes through an interpretation execution engine in the running process of the application program, wherein the other codes are codes in the application program except the hot spot codes; counting the execution times of each section of code in other codes, and taking the code sections with the execution times larger than the preset times as new hot spot codes; and saving the new hot spot code into the hot spot code file.
In the specific implementation process, although the just-in-time compilation engine has a high compilation efficiency, it occupies a large amount of system resources and consumes a large amount of energy for the electronic device, and the proportion of the hot spot codes is generally not high in order to balance the system resources and the energy consumption (for example, the proportion of the hot spot codes in all the codes can be controlled to be less than 20%). And for other codes (namely, codes except the hot spot codes in the application program), the interpretation and execution engine is used for compiling and running, and the interpretation and execution engine occupies less system resources and consumes less energy.
In addition, in the running process of the application program, the execution times of each section of code in other codes can be counted (the execution times can refer to the times of accumulated execution from the installation of the application to the current moment), a code section of which the execution times is greater than a preset number (for example, greater than 10000 times or greater than 20000 times) is used as a new hot spot code, and the new hot spot code is stored in a hot spot code file, so that the hot spot code is updated additionally. When the application program is started next time, the just-in-time compiling engine can be used for compiling the new hot spot code. Therefore, the execution efficiency of the hotspot codes is further improved, the application running speed is improved, and the technical effect of system experience is improved.
The technical scheme in the embodiment of the application at least has the following technical effects or advantages:
in the embodiment of the application, an installation and operation method of an application is disclosed, which comprises the following steps: when an application program is installed, acquiring a hot spot code file, wherein a hot spot code of the application program is recorded in the hot spot code file; prefabricating the hot spot code file to a specified storage path; after the application program is installed, starting the application program, and finding the hot spot code file based on the specified storage path; and reading the hot spot codes from the hot spot code file by using a just-in-time compiling engine, and compiling the hot spot codes. In the application installation stage, the hot spot code file recorded with the hot spot code can be obtained, and the hot spot code file is prefabricated to the specified storage path, so that the hot spot code file can be found based on the specified storage path after the application program is started, and the hot spot code in the hot spot code file is compiled by using the just-in-time compiling engine. Therefore, the technical effects of improving the application running speed and the system experience in the early stage of application use are achieved, and the technical problems that in the prior art, in the early stage of application use, the application running speed is low and the system experience is poor are solved.
Example two
Based on the same inventive concept, as shown in fig. 2, the present embodiment provides an installation and operation apparatus 200 for an application, including:
an obtaining module 201, configured to obtain a hot spot code file when an application program is installed, where a hot spot code of the application program is recorded in the hot spot code file;
the configuration module 202 is configured to pre-prepare the hotspot code file to a specified storage path;
the starting module 203 is configured to start the application program after the application program is installed;
the searching module 204 is configured to find the hotspot code file based on the specified storage path;
a first compiling module 205, configured to read the hot spot code from the hot spot code file by using a just-in-time compiling engine, and compile the hot spot code.
As an optional embodiment, the obtaining module 201 is specifically configured to:
downloading the hotspot code file from a designated server; or
And extracting the hot spot code file from the installation package file of the application program.
As an alternative embodiment, the hotspot code is obtained by human statistics or by machine model statistics.
As an optional embodiment, the hotspot code file is a prof file in an android system, and the just-in-time compilation engine is a JIT compiler in the android system.
As an alternative embodiment, the apparatus 200 further comprises:
the second compiling module is used for compiling other codes through an interpretation execution engine in the running process of the application program, wherein the other codes are codes except the hot spot codes in the application program;
the statistical module is used for counting the execution times of each section of code in the other codes and taking the code sections with the execution times larger than the preset times as new hot spot codes;
and the storage module is used for storing the new hot spot code into the hot spot code file.
Since the installation and operation device of the application described in this embodiment is a device used for implementing the installation and operation method of the application in this embodiment, based on the installation and operation method of the application described in this embodiment, a person skilled in the art can understand a specific implementation manner of the installation and operation device of the application of this embodiment and various variations thereof, and therefore, a detailed description of how the installation and operation device of the application implements the method in this embodiment is not provided here. The device used by those skilled in the art to implement the installation and operation method applied in the embodiments of the present application is within the scope of the protection of the present application.
The technical scheme in the embodiment of the application at least has the following technical effects or advantages:
in an embodiment of the present application, an installation and operation device for an application is disclosed, including: the system comprises an acquisition module, a storage module and a control module, wherein the acquisition module is used for acquiring a hot spot code file when an application program is installed, and the hot spot code file records a hot spot code of the application program; the configuration module is used for prefabricating the hot spot code file to a specified storage path; the starting module is used for starting the application program after the application program is installed; the searching module is used for finding the hot spot code file based on the specified storage path; and the first compiling module is used for reading the hot spot code from the hot spot code file by utilizing a just-in-time compiling engine and compiling the hot spot code. In the application installation stage, the hot spot code file recorded with the hot spot code can be obtained, and the hot spot code file is prefabricated to the specified storage path, so that the hot spot code file can be found based on the specified storage path after the application program is started, and the hot spot code in the hot spot code file is compiled by using the just-in-time compiling engine. Therefore, the technical effects of improving the application running speed and the system experience in the early stage of application use are achieved, and the technical problems that in the prior art, in the early stage of application use, the application running speed is low and the system experience is poor are solved.
EXAMPLE III
Based on the same inventive concept, as shown in fig. 3, the present embodiment provides an electronic device 300, which includes a memory 310, a processor 320, and a computer program 311 stored in the memory 310 and executable on the processor 320, wherein the processor 320 executes the computer program 311 to implement the following method steps:
when an application program is installed, acquiring a hot spot code file, wherein a hot spot code of the application program is recorded in the hot spot code file; prefabricating the hot spot code file to a specified storage path; after the application program is installed, starting the application program, and finding the hot spot code file based on the specified storage path; and reading the hot spot codes from the hot spot code file by using a just-in-time compiling engine, and compiling the hot spot codes.
In a specific implementation process, when the processor 320 executes the program 311, any manner steps in the first embodiment may also be implemented.
Example four
Based on the same inventive concept, as shown in fig. 4, the present embodiment provides a computer-readable storage medium 400, on which a computer program 411 is stored, which program 411, when executed by a processor, may implement the following method steps.
When an application program is installed, acquiring a hot spot code file, wherein a hot spot code of the application program is recorded in the hot spot code file; prefabricating the hot spot code file to a specified storage path; after the application program is installed, starting the application program, and finding the hot spot code file based on the specified storage path; and reading the hot spot codes from the hot spot code file by using a just-in-time compiling engine, and compiling the hot spot codes.
In a specific implementation, when the program 411 is executed by a processor, any method steps in the first embodiment may also be implemented.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
The various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It will be appreciated by those skilled in the art that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components in an installation operating device, electronic device, and applications according to embodiments of the present invention. The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
The invention discloses an A1 application installation and operation method, which is characterized by comprising the following steps:
when an application program is installed, acquiring a hot spot code file, wherein a hot spot code of the application program is recorded in the hot spot code file;
prefabricating the hot spot code file to a specified storage path;
after the application program is installed, starting the application program, and finding the hot spot code file based on the specified storage path;
and reading the hot spot codes from the hot spot code file by using a just-in-time compiling engine, and compiling the hot spot codes.
A2, the method for installing and running the application according to A1, wherein the obtaining the hotspot code file comprises:
downloading the hotspot code file from a designated server; or
And extracting the hot spot code file from the installation package file of the application program.
A3, the method for installing and running the application, A1, wherein the hotspot code is obtained by human statistics or machine model statistics.
A4, the method for installing and running the application according to a1, wherein the hotspot code file is a prof file in an android system, and the just-in-time compilation engine is a JIT compiler in the android system.
A5, the method for installing and operating an application as defined in any one of a1 to a4, further comprising:
compiling other codes through an interpretation execution engine in the running process of the application program, wherein the other codes are codes except the hot spot codes in the application program;
counting the execution times of each section of code in the other codes, and taking the code sections with the execution times larger than the preset times as new hot spot codes;
and saving the new hot spot code into the hot spot code file.
B6, an installation and operation device for an application, comprising:
the system comprises an acquisition module, a storage module and a control module, wherein the acquisition module is used for acquiring a hot spot code file when an application program is installed, and the hot spot code file records a hot spot code of the application program;
the configuration module is used for prefabricating the hot spot code file to a specified storage path;
the starting module is used for starting the application program after the application program is installed;
the searching module is used for finding the hot spot code file based on the specified storage path;
and the first compiling module is used for reading the hot spot code from the hot spot code file by utilizing a just-in-time compiling engine and compiling the hot spot code.
B7, the apparatus for installing and running an application according to B6, wherein the obtaining module is specifically configured to:
downloading the hotspot code file from a designated server; or
And extracting the hot spot code file from the installation package file of the application program.
B8, installation running device of application according to B6, wherein the hotspot code is obtained by human statistics or machine model statistics.
B9, the installation and running device of the application according to B6, wherein the hotspot code file is a prof file in an android system, and the just-in-time compilation engine is a JIT compiler in the android system.
B10, the installation and operation device for an application according to any one of B6 to B9, further comprising:
the second compiling module is used for compiling other codes through an interpretation execution engine in the running process of the application program, wherein the other codes are codes except the hot spot codes in the application program;
the statistical module is used for counting the execution times of each section of code in the other codes and taking the code sections with the execution times larger than the preset times as new hot spot codes;
and the storage module is used for storing the new hot spot code into the hot spot code file.
C11, an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor, when executing the program, is adapted to carry out the method steps of any of claims a1 to a 5.
D12, a computer-readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, is adapted to carry out the method steps of any of the methods a 1-a 5.
Claims (10)
1. An installation and operation method of an application, comprising:
when an application program is installed, acquiring a hot spot code file, wherein a hot spot code of the application program is recorded in the hot spot code file;
prefabricating the hot spot code file to a specified storage path;
after the application program is installed, starting the application program, and finding the hot spot code file based on the specified storage path;
and reading the hot spot codes from the hot spot code file by using a just-in-time compiling engine, and compiling the hot spot codes.
2. The method for installing and running an application according to claim 1, wherein the obtaining the hotspot code file comprises:
downloading the hotspot code file from a designated server; or
And extracting the hot spot code file from the installation package file of the application program.
3. The method for installing and running an application according to claim 1, wherein the hotspot code is obtained by human statistics or machine model statistics.
4. The method for installing and running the application according to claim 1, wherein the hotspot code file is a prof file in an android system, and the just-in-time compilation engine is a JIT compiler in the android system.
5. The application installation and operation method according to any one of claims 1 to 4, further comprising:
compiling other codes through an interpretation execution engine in the running process of the application program, wherein the other codes are codes except the hot spot codes in the application program;
counting the execution times of each section of code in the other codes, and taking the code sections with the execution times larger than the preset times as new hot spot codes;
and saving the new hot spot code into the hot spot code file.
6. An installation and operation device for an application, comprising:
the system comprises an acquisition module, a storage module and a control module, wherein the acquisition module is used for acquiring a hot spot code file when an application program is installed, and the hot spot code file records a hot spot code of the application program;
the configuration module is used for prefabricating the hot spot code file to a specified storage path;
the starting module is used for starting the application program after the application program is installed;
the searching module is used for finding the hot spot code file based on the specified storage path;
and the first compiling module is used for reading the hot spot code from the hot spot code file by utilizing a just-in-time compiling engine and compiling the hot spot code.
7. The application installation and execution device of claim 6, wherein the obtaining module is specifically configured to:
downloading the hotspot code file from a designated server; or
And extracting the hot spot code file from the installation package file of the application program.
8. The installation running means of an application according to claim 6, wherein the hotspot code is obtained by human statistics or by machine model statistics.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor, when executing the program, is adapted to carry out the method steps of any of claims 1 to 5.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, is adapted to carry out the method steps of any of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910785663.1A CN110609689A (en) | 2019-08-23 | 2019-08-23 | Application installation and operation method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910785663.1A CN110609689A (en) | 2019-08-23 | 2019-08-23 | Application installation and operation method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110609689A true CN110609689A (en) | 2019-12-24 |
Family
ID=68890483
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910785663.1A Withdrawn CN110609689A (en) | 2019-08-23 | 2019-08-23 | Application installation and operation method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110609689A (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111770113A (en) * | 2020-08-31 | 2020-10-13 | 支付宝(杭州)信息技术有限公司 | Method for executing intelligent contract, block chain node and node equipment |
CN112631608A (en) * | 2021-01-05 | 2021-04-09 | 北京字节跳动网络技术有限公司 | Compiling method, device, terminal and storage medium |
WO2021136012A1 (en) * | 2019-12-31 | 2021-07-08 | Oppo广东移动通信有限公司 | Hotspot code processing method and apparatus, server and storage medium |
WO2021135988A1 (en) * | 2019-12-31 | 2021-07-08 | Oppo广东移动通信有限公司 | Hotspot code processing method, request method, apparatus, and electronic device |
CN113126994A (en) * | 2019-12-31 | 2021-07-16 | Oppo广东移动通信有限公司 | Hotspot code processing method and device, electronic equipment and storage medium |
CN113296826A (en) * | 2020-07-30 | 2021-08-24 | 阿里巴巴集团控股有限公司 | Generation method of application installation package, loading method and device thereof, and electronic equipment |
WO2022083316A1 (en) * | 2020-10-21 | 2022-04-28 | 北京字节跳动网络技术有限公司 | Application running method and apparatus, and computer storage medium |
-
2019
- 2019-08-23 CN CN201910785663.1A patent/CN110609689A/en not_active Withdrawn
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2021136012A1 (en) * | 2019-12-31 | 2021-07-08 | Oppo广东移动通信有限公司 | Hotspot code processing method and apparatus, server and storage medium |
WO2021135988A1 (en) * | 2019-12-31 | 2021-07-08 | Oppo广东移动通信有限公司 | Hotspot code processing method, request method, apparatus, and electronic device |
CN113127047A (en) * | 2019-12-31 | 2021-07-16 | Oppo广东移动通信有限公司 | Hot spot code processing method and device, server and storage medium |
CN113126995A (en) * | 2019-12-31 | 2021-07-16 | Oppo广东移动通信有限公司 | Hotspot code processing method, request method and device and electronic equipment |
CN113126994A (en) * | 2019-12-31 | 2021-07-16 | Oppo广东移动通信有限公司 | Hotspot code processing method and device, electronic equipment and storage medium |
CN113296826A (en) * | 2020-07-30 | 2021-08-24 | 阿里巴巴集团控股有限公司 | Generation method of application installation package, loading method and device thereof, and electronic equipment |
CN111770113A (en) * | 2020-08-31 | 2020-10-13 | 支付宝(杭州)信息技术有限公司 | Method for executing intelligent contract, block chain node and node equipment |
US11366677B2 (en) | 2020-08-31 | 2022-06-21 | Alipay (Hangzhou) Information Technology Co., Ltd. | Methods, blockchain nodes, and node devices for executing smart contract |
WO2022083316A1 (en) * | 2020-10-21 | 2022-04-28 | 北京字节跳动网络技术有限公司 | Application running method and apparatus, and computer storage medium |
CN112631608A (en) * | 2021-01-05 | 2021-04-09 | 北京字节跳动网络技术有限公司 | Compiling method, device, terminal and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110609689A (en) | Application installation and operation method and device | |
CN111061484B (en) | Code compiling method, device, server, user terminal and readable medium | |
CN103797436B (en) | For the dynamic power optimization of calculation element | |
KR102112081B1 (en) | Method and device for identifying high-use intermediate code in a language virtual machine | |
CN102520972B (en) | Video game development system and method thereof | |
CN110990019B (en) | Java class analysis method and device, storage medium and electronic equipment | |
CN103729235A (en) | Java virtual machine (JVM) and compiling method thereof | |
CN106648755B (en) | Method and device for dynamically loading dex in android art environment | |
US9792132B2 (en) | Code generator and method for generating extra code for a virtual machine | |
CN105849698B (en) | Protection is executed in dynamic programming | |
US20190266094A1 (en) | Data Prefetching Method, Apparatus, And System | |
Blunck et al. | On heterogeneity in mobile sensing applications aiming at representative data collection | |
CN107220160B (en) | Method and device for determining electric quantity consumption of application program | |
CN116643778A (en) | Application program optimization method and electronic equipment | |
CN107423093B (en) | Control method and apparatus, computer apparatus, and computer-readable storage medium | |
CN108536514B (en) | Hot spot method identification method and device | |
CN117762423A (en) | Java intelligent contract compiling method and device, storage medium and electronic equipment | |
CN107450937B (en) | Application program running method and running device | |
CN117555548A (en) | Code generation method and device and electronic equipment | |
US9262186B2 (en) | Code rearranger and method for rearranging code for a virtual machine | |
CN112799690B (en) | Information processing method, apparatus, device and storage medium | |
CN113031953A (en) | Application program pre-compiling method and device, electronic equipment and server | |
CN107861807B (en) | Optimization method and device for program call | |
CN106569799B (en) | Program processing method and apparatus thereof | |
CN110333870B (en) | Simulink model variable distribution processing method, device and equipment |
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 | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20191224 |
|
WW01 | Invention patent application withdrawn after publication |