CN113126994A - Hotspot code processing method and device, electronic equipment and storage medium - Google Patents

Hotspot code processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113126994A
CN113126994A CN201911408505.0A CN201911408505A CN113126994A CN 113126994 A CN113126994 A CN 113126994A CN 201911408505 A CN201911408505 A CN 201911408505A CN 113126994 A CN113126994 A CN 113126994A
Authority
CN
China
Prior art keywords
file
hotspot
application program
code
hot spot
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
CN201911408505.0A
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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201911408505.0A priority Critical patent/CN113126994A/en
Priority to PCT/CN2020/136878 priority patent/WO2021135947A1/en
Publication of CN113126994A publication Critical patent/CN113126994A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The application discloses a hotspot code processing method and device, electronic equipment and a storage medium. The target terminal device may obtain a kernel file of the target terminal device, where the kernel file includes a hotspot configuration file of a system application program, and the hotspot configuration file includes a hotspot code of the system application program. When the target terminal device installs the system application program through the kernel file, the hot spot codes in the hot spot configuration file of the system application program can be compiled into machine codes, the hot spot compiled file of the system application program is obtained, and the hot spot compiled file is stored, so that the target terminal device can have good performance even under the condition that the hot spot codes are not generated in the system application program.

Description

Hotspot code processing method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a hotspot code processing method and apparatus, an electronic device, and a storage medium.
Background
In the electronic device, in order to improve the execution efficiency of the application program and improve the performance of the application program, the virtual machine compiles hot spot code in the code of the application program into machine code related to a local platform during running. However, for an application program, it is necessary to run for a certain period of time to determine which codes are hot spot codes, and at the initial stage of installation of the application program, the performance of the application program cannot be improved through compiling the hot spot codes.
Disclosure of Invention
The application provides a hotspot code processing method and device, electronic equipment and a storage medium, so as to solve the problems.
In a first aspect, an embodiment of the present application provides a hotspot code processing method, where the method includes: acquiring a kernel file of target terminal equipment, wherein the kernel file comprises a hotspot configuration file of a system application program, and the hotspot configuration file comprises a hotspot code of the system application program; when the target terminal equipment installs the system application program through the kernel file, compiling the hot spot codes in the hot spot configuration file of the system application program into machine codes to obtain a hot spot compiling file of the system application program; and the target terminal equipment stores the hotspot compiling file.
In a second aspect, an embodiment of the present application provides a hotspot code processing method, where the method includes: acquiring a plurality of hot spot code files of a target application program, wherein the target application program is a system application program in target terminal equipment, and the hot spot code files are from the terminal equipment running the target application program; generating a hot spot configuration file according to the hot spot code files; and returning the hotspot configuration file when receiving a hotspot code acquisition request of a system application program in the target terminal equipment.
In a third aspect, an embodiment of the present application provides a hotspot code processing device, where the device includes: the system comprises a kernel file acquisition module, a kernel file acquisition module and a kernel file processing module, wherein the kernel file acquisition module is used for acquiring a kernel file of target terminal equipment, the kernel file comprises a hot spot configuration file of a system application program, and the hot spot configuration file comprises a hot spot code of the system application program; the installation module is used for compiling the hot spot codes in the hot spot configuration file of the system application program into machine codes when the target terminal equipment installs the system application program through the kernel file, and obtaining the hot spot compiling file of the system application program; and the storage module is used for storing the hotspot compiling file by the target terminal equipment.
In a fourth aspect, an embodiment of the present application provides a hotspot code processing device, where the device includes: the system comprises a first file acquisition module, a second file acquisition module and a third file acquisition module, wherein the first file acquisition module is used for acquiring a plurality of hot spot code files of a target application program, the target application program is a system application program in target terminal equipment, and the hot spot code files are from the terminal equipment running the target application program; the second file acquisition module is used for generating a hot spot configuration file according to the hot spot code files; and the return module is used for returning the hotspot configuration file when receiving a hotspot code acquisition request of a system application program in the target terminal equipment.
In a fifth aspect, embodiments of the present application provide an electronic device, which includes one or more processors; a memory electrically connected with the one or more processors; one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the methods as described above.
In a sixth aspect, the present application provides a computer-readable storage medium having a program code stored therein, where the program code executes to perform the above-mentioned method.
The hotspot code processing method and device, the electronic device and the storage medium can acquire the kernel file comprising the hotspot configuration file. When the system application program is installed through the kernel file, the hotspot codes in the hotspot configuration file of the system application program can be compiled into machine codes for storage, so that the service performance of the system application program can be improved when the hotspot codes are not generated through the system application program.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, 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 only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 illustrates a JIT architecture diagram provided by an embodiment of the present application.
Fig. 2 shows a flowchart of a hotspot code processing method according to an embodiment of the present application.
Fig. 3 is a flowchart illustrating a hotspot code processing method according to another embodiment of the present application.
Fig. 4 shows an interaction diagram of a server and a terminal device provided by an embodiment of the application.
Fig. 5 shows another interaction diagram of a server and a terminal device provided by the embodiment of the application.
Fig. 6 is a flowchart illustrating a hotspot code processing method according to another embodiment of the present application.
Fig. 7 is a flowchart illustrating a hotspot code processing method according to still another embodiment of the present application.
Fig. 8 is a functional block diagram of a hotspot code processing device according to an embodiment of the present application.
Fig. 9 is a functional block diagram of a hot spot code processing apparatus according to another embodiment of the present application.
Fig. 10 shows a block diagram of an electronic device for executing a hot spot code processing method according to an embodiment of the present application.
Fig. 11 illustrates a storage medium provided in an embodiment of the present application and used for storing or carrying program codes for implementing a hot spot code processing method according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
In a virtual machine execution environment of a terminal device, if a certain code block runs frequently and the running times exceed the set times, the code block is determined as a hot code (hot code), and the hot code is recorded and stored in a hot code file (profile). Wherein it is understood that the code block may be a set of codes or a method (method) in the codes.
In order to improve the operating efficiency of the hot spot code, the hot spot code In the hot spot code file may be compiled by a Just-In-Time Compiler (JIT) to obtain an odex file or compiled by an Ahead-of-Time (AOT) to obtain an oat file, where the odex file and the oat file after the hot spot code is compiled include binary machine codes and may be directly submitted to a bottom layer processor (CPU) for execution, and when the hot spot code needs to be executed again, the odex file or the oat file after the hot spot code is compiled may be directly executed, thereby improving the operating efficiency.
Taking the JIT architecture in the Android system as shown in fig. 1 as an example, since the machine code of the program run is contained in the oat file, the oat file can be directly run by an Android Runtime (ART). And in the dex file, if the CODE is a non-hot CODE (cold CODE), the CODE is handed to a java Interpreter (Interpreter), if the CODE is a hot CODE, the CODE is handed to JIT for real-time compilation and then stored in a JIT CODE CACHE (JIT CODE CACHE), and the hot CODE is accessed again next time, so that the corresponding machine CODE can be directly executed from the CACHE. And putting the hotspot code into a hotspot code file, and when the terminal equipment enters an IDLE (IDLE) and charging state, performing an AOT (active object transform) process on the hotspot code in the hotspot code file to compile and generate an oat file.
Because the number of times of running the code block exceeds the set number of times, the code block is determined to be the hotspot code, and for the newly installed application program, the terminal device needs to run in the terminal device for a period of time, and the terminal device can determine the hotspot code according to the number of times of running the code in the application program. And for the system application program of the terminal equipment, the system application program is installed in the system before the terminal equipment leaves the factory, and when a user uses new terminal equipment, the system application program in the terminal equipment is not determined to have a hot spot code, so that the performance is poor.
An embodiment of the present application provides a hot spot code processing method, where a kernel file obtained by kernel compiling includes a hot spot configuration file of a system application program, when the system application program is installed through the kernel file, the hot spot code in the hot spot configuration file of the system application program is compiled, and the compiled hot spot compilation file is stored, so as to improve performance when the system application program is used, please refer to fig. 2, where the method includes:
step S110: the method comprises the steps of obtaining a kernel file of a target terminal device, wherein the kernel file comprises a hot spot configuration file of a system application program, and the hot spot configuration file comprises a hot spot code of the system application program.
And performing kernel compiling on the kernel source code of the target terminal device to obtain a kernel file of the target terminal device, for example, the obtained kernel file is a mirror image file after kernel compiling. Therefore, the target terminal device may obtain a kernel file of the target terminal device, where the kernel file may include a hotspot code of a system application of the target terminal device, and the hotspot code may be stored in a hotspot configuration file. In the embodiment of the application, the target terminal device may obtain the kernel file for system installation before delivery. Of course, in this embodiment of the application, the system installation through the kernel file is not limited to before factory shipment, and the system installation may also be performed by a user at other times of flashing and upgrading the system.
Step S120: when the target terminal device installs the system application program through the kernel file, the hotspot codes in the hotspot configuration file of the system application program are compiled into machine codes, and a hotspot compilation file of the system application program is obtained.
When the system is installed through the kernel file, the system application program can be installed.
In the kernel file, the hot spot configuration file of the system application program is included, and when the system application program is installed through the kernel file, the hot spot code in the hot spot configuration file of the system application program is compiled, and specifically, the hot spot code can be compiled into the machine code of the target device. And compiling the hot spot codes in the hot spot configuration file to obtain a hot spot compiling file.
Step S130: and the target terminal equipment stores the hotspot compiling file.
And storing the compiled hotspot compiling file, so that when the target terminal equipment runs the system application program and the system application program runs for the first time after the system is installed, because the hotspot codes are compiled into machine codes, the running speed is higher, and the performance of the system application program is better.
In the embodiment of the application, the kernel file of the target terminal device includes a hot spot configuration file of the system application program, and when the system application program is installed through the kernel file, a hot spot code in the hot spot configuration file is compiled into a machine code and stored, so that the system application program can obtain good running performance after being installed.
The present application further provides an embodiment, which includes storing the hotspot configuration file. Specifically, referring to fig. 3, the method provided in this embodiment includes:
step S210: and performing kernel compiling on the kernel source code of the target terminal equipment.
Step S220: and storing the hot spot configuration file of the system application program into the compiled kernel file.
Before kernel compiling is performed on the target terminal device, a hotspot configuration file of a system application program of the target terminal device can be obtained, and the hotspot configuration file is used for performing hotspot compiling to obtain a hotspot compiling file.
In the embodiment of the application, the hotspot configuration file of each system application program in the target terminal device can be obtained from the server, and the hotspot configuration file of each system application program comprises a hotspot code of the system application program. The hot spot configuration file of each system application program can be obtained according to a plurality of hot spot code files from a plurality of terminal devices running the system application program, so that the hot spot codes in the hot spot configuration files can obtain a good running effect.
Of course, in the embodiment of the present application, the hotspot configuration file is not limited to be obtained from a server, and may also be obtained from other electronic devices. The generation method of the hotspot configuration file is not limited, and for example, a developer may select a code according to the operation characteristics of the system application program as a hotspot code in the hotspot configuration file
In the embodiment of the application, the hotspot configuration file obtained from the server may be the target terminal device or other electronic devices.
In this embodiment of the present application, a time for placing the hotspot configuration file into the kernel file is not limited, and an execution device for compiling the kernel source code to obtain the kernel file is also not limited.
In an embodiment, the kernel source code may be compiled to obtain a kernel file, and then the hotspot configuration file is stored in the kernel file. That is, in this embodiment, step S210 is performed prior to step S220.
Optionally, in this embodiment, the target terminal device may perform kernel compilation on the kernel source code to obtain a kernel file, and then store the hotspot configuration file in the kernel file by the target terminal device.
Optionally, in this embodiment, other devices may perform kernel compilation on the kernel source code to obtain the kernel file, such as a terminal device or another device operated by a developer, or a server. The target terminal device can acquire the kernel file from other devices and then store the hotspot configuration file in the kernel file.
Optionally, in this embodiment, the kernel source code may also be subjected to kernel compilation by another device to obtain a kernel file, and the other device stores the hotspot configuration file in the kernel file. The target terminal device may obtain the kernel file including the hotspot configuration file from the other device.
In another embodiment, steps S210 and S220 may be performed in parallel. That is, in this embodiment, when kernel source code of the target terminal device is kernel-compiled, a hotspot configuration file of a system application program may be stored in a kernel file after the compiling.
Specifically, in this embodiment, after obtaining the hotspot configuration file, the hotspot configuration file may be stored in an appointed directory, and when performing kernel compilation on the kernel source code of the target terminal device, the hotspot configuration file of the system application program in the appointed directory is stored in the compiled kernel file.
In this embodiment, a specified directory for storing hotspot profiles of system applications may be created. In the kernel source code, an instruction code may be added, where the instruction code is used to instruct, when kernel compiling is performed, to acquire a newly-created hotspot configuration file in a specified directory and store the hotspot configuration file in a compiled kernel file. The specified directory may be created in advance in the kernel source code, or may be newly created based on the instruction code.
Optionally, the hotspot configuration files of all the system applications may be stored in the designated directory, and each hotspot configuration file includes unique identity information indicating which system application hotspot configuration file is the hotspot configuration file of each hotspot configuration file. When the hotspot configuration files under the specified directory are stored in the compiled kernel files, the hotspot configuration files are identified according to the unique identity information of the hotspot configuration files.
Optionally, the specified directories are respectively created corresponding to different system applications, and the hotspot configuration files of the different system applications are stored in the corresponding specified directories. And when the hotspot configuration files under the specified directory are stored in the compiled kernel file, identifying each hotspot configuration file according to the specified directory.
In this embodiment of the present application, the kernel file may include a target file, where the target file is a file used for storing a hot code of a system application program in the kernel file, and different system application programs correspond to different target files. The target file may be a file automatically generated when the kernel compiles the obtained kernel file, or may be a file generated when the kernel compiles the obtained kernel file by using an instruction code added to the kernel source code to instruct the kernel to generate the target file.
When the hotspot configuration file is stored in the kernel file, the target file can be stored in the kernel file. For example, in another embodiment, when performing kernel compilation on the kernel source code of the target terminal device, the hot spot configuration file of the system application program under the specified directory is stored in the target file in the kernel file. Or, in the process of compiling the kernel source code of the target terminal device to form the kernel file, storing the hotspot configuration file in the specified directory into the generated target file.
Step S230: when the target terminal device installs the system application program through the kernel file, the hotspot codes in the hotspot configuration file of the system application program are compiled into machine codes, and a hotspot compilation file of the system application program is obtained.
After the kernel file is obtained, the kernel file can be used for flashing the target terminal device, that is, the system installation can be performed on the target terminal device through the kernel file. The kernel file includes an installation code of the system application program, and the system application program is installed when the system is installed through the kernel file.
When the system application program is installed, compiling of the hot spot codes is triggered, and the hot spot codes in the hot spot configuration file of the system application program are compiled. Specifically, if the hotspot configuration file is stored in the object file, when the system application program is executed, the hotspot code in the object file is compiled to obtain a hotspot compiled file, wherein the hotspot compiled file comprises a binary machine code obtained after hotspot code compilation.
In this embodiment of the present application, the hot spot code may be compiled by AOT, and the hot spot compiled file after compiling may be an oat file.
Step S240: and the target terminal equipment stores the hotspot compiling file.
And storing the hot spot compiling file. The hotspot compiled files of the system applications can be stored in the directory of each application program for storing the hotspot compiled files. When the system application program runs, the machine code in the hotspot compiling file can directly run, and the running speed can be improved.
In the embodiment of the application, a hot spot configuration file is added in a kernel file obtained by kernel compiling, and when the system is installed through the kernel file, the installation code of the system application program in the kernel file is installed with the system application program. When the system application program is installed, the hot spot codes in the hot spot configuration file can be compiled into machine codes, so that the machine codes compiled by the hot spot codes can be directly operated when the system application program is operated, and the performance of the system application program is improved.
In addition, in the embodiment of the present application, a kernel file that does not include the hotspot configuration file may also be obtained, and the hotspot configuration file of each system application program may be obtained and stored after the target terminal device performs system installation through the kernel file. The hotspot configuration files of different system applications may be stored in a directory dedicated to storing hotspot codes by the relevant system applications. After the hotspot configuration file is stored, compiling can be triggered, and hotspot codes in the hotspot configuration file of each system application program are compiled to obtain a hotspot compiling file. The compiling may be triggered before the target terminal device leaves the factory, before the system application is used, or at other times before the system application itself generates the hot spot code.
The embodiment of the application provides a hotspot code processing method, which can acquire hotspot configuration files of a system application program in target terminal equipment from a plurality of terminal equipment, and improve the performance of the system application program in the target terminal equipment. As shown in fig. 4, a server 101 is network-connected with a plurality of terminal apparatuses 102. The terminal device can be an intelligent device which can run an application program, such as a smart phone, a tablet computer, an electronic book, an intelligent wearable device and the like. The target terminal device may be the same type of smart device as the terminal device 102 or a different type of smart device from the terminal device 102.
The server may obtain a hotspot code file from a plurality of terminal devices that have already generated a hotspot code file of a system application of the target terminal device, and then select a hotspot code from the obtained hotspot code file to generate a hotspot configuration file. And returning the hotspot configuration file when receiving a hotspot code acquisition request of the system application program in the target terminal equipment.
In the embodiment of the application, the server generating the hotspot configuration file and the server returning the hotspot configuration file to the terminal device may be the same server or different servers. When the server is the same server, as shown in fig. 4, the server 101 may generate a hotspot configuration file, and return the hotspot configuration file to the terminal device 102 after receiving an acquisition request of a hotspot code sent by the terminal device 102.
When the server that generates the hotspot configuration file and the server that returns the hotspot configuration file to the terminal device are different servers, as shown in fig. 5, the server 1011 may generate the hotspot configuration file, and the server 1012 may receive an acquisition request of a hotspot code sent by the terminal device 102, and request the hotspot code configuration file from the server 1011 after receiving the acquisition request of the hotspot code sent by the terminal device 102. When receiving a request for acquiring a hotspot code sent by the server 1012, the server 1011 returns the hotspot configuration file to the server 1012. The server 1012 then sends the acquired hotspot configuration file to the terminal device 102 requesting the hotspot code. In fig. 5, each terminal device 102 may be network-connected to a server 1012 and a server 1011, and only a partial network connection illustration is shown in fig. 5.
The following will describe embodiments of the present application in detail.
Referring to fig. 6, a hotspot code processing method provided by the embodiment of the present application is shown, where the method is applicable to a server. Specifically, the method may include:
step S310: the method comprises the steps of obtaining a plurality of hot spot code files of a target application program, wherein the target application program is a system application program in target terminal equipment, and the hot spot code files are from the terminal equipment running the target application program.
After the terminal device runs the application program for a period of time, the running times of some code blocks reach the set times and are determined as the hotspot codes, so that a hotspot code file comprising the hotspot codes can be stored in the terminal device.
The server can acquire the hot spot code of the application program from the terminal equipment, wherein the server can acquire the hot spot code of the application program generated in the terminal equipment in a mode of acquiring the hot spot code file in the terminal equipment.
In the embodiment of the application, the server can acquire the hotspot code of the system application program in the target terminal device. For convenience and description, the system application in the target terminal device is defined as the target application.
The server can acquire the hotspot code files of the target application program from a plurality of terminal devices connected with the network, and then acquire a plurality of hotspot code files from a plurality of electronic devices.
Step S320: and generating a hot spot configuration file according to the hot spot code files.
Each hotspot code file comprises one or more hotspot codes in a plurality of hotspot code files acquired by the server. A hotspot code may be selected from the plurality of hotspot code files to generate a hotspot profile.
Step S330: and returning the hotspot configuration file when receiving a hotspot code acquisition request of a system application program in the target terminal equipment.
When the server receives a hotspot code acquisition request for a system application program in the target terminal device, the generated hotspot configuration file can be returned to the requester.
In the embodiment of the application, the server may obtain a hot spot code file of a system application program in the target terminal device from the plurality of terminal devices, and select a hot spot code from the obtained hot spot code file to generate a hot spot configuration file. The target terminal device can acquire the hotspot configuration file, and the hotspot configuration file is compiled to acquire a hotspot compiling file before delivery, so that the performance of a system application program is improved.
The application also provides an embodiment describing a specific way of obtaining the hotspot configuration file of the system application program. Referring to fig. 7, the hot spot code processing method according to this embodiment includes:
step S410: the method comprises the steps of obtaining a plurality of hot spot code files of a target application program, wherein the target application program is a system application program in target terminal equipment, and the hot spot code files are from the terminal equipment running the target application program.
In the embodiment of the application, the plurality of terminal devices which generate the hotspot code file and are used for acquiring the hotspot code file may be terminal devices with the same model as the target terminal device or terminal devices with different models from the target terminal device. Optionally, all or part of the terminal device connected to the server network may be used as the terminal device for acquiring the hotspot code file by the server.
The target terminal device may be a terminal device of some manufacturer, a terminal device of some model, etc. Specifically, which terminal devices are used as target terminal devices are not limited in the embodiment of the present application, and which types of terminal devices are used as target terminal devices may be set in the server according to requirements. For example, the server may obtain a terminal device list from an electronic device, where the terminal device list includes terminal devices that need to obtain the system application, that is, the terminal devices in the terminal device list are target terminal devices.
The system application of the target terminal device may be an application installed in the system before shipment, or an application including an installation code in the kernel file. Which applications are system applications in the target terminal device may be set in the server, or there is a target terminal device or a developer background to notify the server which applications are system applications in the target terminal device. For example, optionally, the terminal device list may correspond to terminal devices of various models, and a system program list may also be used, where the system program list corresponding to each model of terminal device includes various system applications in the terminal device.
In one embodiment, the server may obtain hotspot code files of multiple applications from multiple terminal devices, for example, obtain hotspot code files of all applications in each terminal device. And determining the hot spot code file of the system application program in the target terminal equipment from the acquired hot spot code file.
In another embodiment, the server may obtain only the hotspot code files of the target application from the plurality of terminal devices.
Optionally, in this embodiment, the server may store an application program list, where the application program list includes a plurality of application programs. The server can judge whether each application program in the stored application program list is a system application program of the target terminal equipment; and if so, acquiring the hot spot code file of the system application program from a plurality of terminal devices.
Optionally, in this embodiment, the server may also store a system application list of the target terminal device, where the system application list includes the system application of the target terminal device. And sequentially acquiring the hot spot code files of the system application programs in the system application program list.
The manner in which the server obtains the hot spot code of the application program from the plurality of terminal devices is not limited in the embodiment of the present application.
In a specific implementation manner, when the server acquires a hotspot code file of an application program from a plurality of terminal devices, a hotspot code file acquisition request may be initiated to the terminal device, and the hotspot code file acquisition request carries a program identifier of the application program that needs to acquire the hotspot code file. The terminal device can return the hot spot code file of the application program corresponding to the program identifier to the server according to the hot spot code file acquisition request, and the server acquires the hot spot code file returned by the terminal device.
In this embodiment, the server may update the hot spot code file of the application program according to the set frequency, that is, the server may send a hot spot code file acquisition request to all or part of the terminal devices installed with the corresponding application program at preset intervals, so as to acquire the hot spot code file. When the server sends the hotspot code file acquisition request, if some terminal equipment is not connected with the server network, the hotspot code file acquisition request can be sent to the terminal equipment when the terminal equipment is connected with the server network.
In another embodiment, the server and the terminal device may negotiate in advance, and the terminal device periodically sends the hotspot code file of the application program that the server has a demand to the server, so that the server may obtain the hotspot code file of the application program sent in the terminal device. In this embodiment, optionally, the negotiation between the server and the terminal device may be a negotiation with a manufacturer of the terminal device, and the sending setting of the hotspot code file is performed in the terminal device; optionally, the negotiation between the server and the terminal device may also be a negotiation between the server and a related application program in advance, and when the application program is installed in the terminal device, the client installed in the terminal device by the application program sends the hotspot code file to the server.
In addition to the hotspot code of the application program, the hotspot code file acquired by the server may also include other information related to the application program, such as unique identity information of the application program, where the unique identity information may include a name of the application program, a version number of the application program, and the like, so as to accurately locate the identity of the hotspot code file and determine hotspot code files of different application programs.
In the embodiment of the present application, the applications with different identity information may be regarded as different applications. Alternatively, because of different versions of the application program with the same name, the program code may be different, and the hot spot code may be generated differently. In the embodiment of the present application, the application programs with the same name and the same version are treated as the same application program, the application programs with different names are treated as different application programs, and the application programs with the same name and different versions are treated as different application programs, that is, the application programs with the same program code when online are treated as the same application program.
Step S420: and selecting the hot spot codes meeting preset conditions from the plurality of hot spot code files, and generating a hot spot configuration file.
For each system application program of the target terminal device, a plurality of hotspot code files can be obtained from a plurality of terminal devices, and the hotspot code files are obtained from different terminal devices. And generating a hot spot configuration file of the system application program according to the plurality of hot spot code files of the system application program. The embodiments of the present application are described with an example of acquiring a plurality of hot spot code files of a system application program and generating a hot spot configuration file according to the plurality of hot spot code files. The manner of obtaining hotspot configuration files of various system applications can be referred to.
When the server generates the hot spot configuration file according to the plurality of hot spot code files, the hot spot code production hot spot configuration file meeting the preset conditions can be selected from the plurality of hot spot code files. For example, if the hotspot code file of the target application obtained by the server includes a and B, and a hotspot code a1, a2 and a3 is selected from a, and a hotspot code B1 is selected from B, a hotspot configuration file including hotspot codes a1, a2, a3 and B1 can be generated. The hotspot profile may include only the selected hotspot code, or may include other information, such as unique identity information of the target application. The target application is a system application in the target terminal device.
In the embodiment of the application, the preset condition may be set according to a requirement, so that the hot spot codes included in the generated hot spot configuration file cover code blocks that a target user may frequently run when using a target application program as much as possible. The target user is a user using the hotspot profile.
Since the hot code is more hot, the hot code is more likely to be a code that runs frequently in the electronic device that acquires the hot configuration file. In the embodiment of the present application, the preset condition may include a hot degree of the hot spot code. The hot code hot degree can be determined by the number of users who often use the function corresponding to the hot code, or measured by the number of occurrences of the hot code in a plurality of hot code files.
In the embodiment of the present application, the number of occurrences of a hotspot code in a plurality of hotspot code files, that is, the number of hotspot code files including the hotspot code, is obtained. For example, if 5 hotspot code files in the obtained multiple hotspot code files all include a certain hotspot code c, it may be determined that the number of occurrences of the hotspot code c is 5.
In this embodiment of the present application, for different hotspot codes in the multiple hotspot code files, the occurrence frequency of each hotspot code in the multiple hotspot code files may be counted; and selecting a plurality of hot spot codes according to the occurrence frequency of each hot spot code. The occurrence frequency of the selected hot spot codes is advanced, namely the occurrence frequency of the selected hot spot codes is not less than the occurrence frequency of the unselected hot spot codes.
For example, the hotspot code file obtained by the server to the target application includes A, B, C, D and E. The hotspot code file A comprises hotspot codes c1, c2, c3 and c 4; the hotspot code file B comprises hotspot codes c1, c2 and c 4; the hotspot code file C comprises hotspot codes C1 and C5; hotspot codes c1, c4, c5 and c6 are included in the hotspot code file D.
Different hotspot codes in the plurality of hotspot code files acquired by the server comprise c1, c2, c3, c4, c5 and c6, wherein the number of hotspot code files comprising hotspot codes c1 is 4, and the occurrence frequency of hotspot codes c1 is 4; the number of hotspot code files comprising hotspot code c2 is 2, and the occurrence frequency of hotspot code c2 is 2; the number of hot code files including the hot code c3 is 1, and the occurrence frequency of the hot code c3 is 1; the number of hotspot code files including hotspot code c4 is 3, and the occurrence frequency of hotspot code c4 is 3; the number of hotspot code files comprising hotspot code c5 is 2, and the occurrence frequency of hotspot code c5 is 2; the number of hotspot code files including hotspot code c6 is 1, and the number of occurrences of hotspot code c6 is 1.
The hot spot codes with different occurrence times are respectively c1, c4, c2, c5, c6 and c3, wherein the hot spot files corresponding to c5 and c2 are the same in number and are all 2; the number of the hot spot files corresponding to c6 and c3 is the same and is 1.
When a hotspot code is selected from a plurality of different hotspot codes c1, c2, c3, c4, c5 and c6 which are arranged in sequence, the hotspot code at the front of c1, c4, c2, c5, c6 and c3 is selected, wherein the positions of c2 and c5 can be interchanged, and the positions of c6 and c3 can be interchanged. The front indicates that the selected hotspot codes are selected from front to back, or in other words, when the front hotspot codes are not selected, the unselected hotspot codes are not selected, so that the occurrence frequency of the selected hotspot codes is not less than that of the unselected hotspot codes.
As a specific embodiment, all hotspot codes may be used to produce a hotspot profile. For example, in the foregoing example, hot spot codes c1, c2, c3, c4, c5 and c6 are selected to generate a hot spot configuration file, and the generated hot spot configuration file includes c1, c2, c3, c4, c5 and c 6.
In order to reduce the total data amount of the selected hot spot codes, in the embodiment of the present application, a part of the hot spot codes may be selected from all the hot spot codes, and used to generate a hot spot profile.
As a specific implementation manner, the generated hotspot configuration file may be set to include a preset number of hotspot codes, and when a plurality of hotspot codes are selected according to the occurrence frequency of each hotspot code, the preset number of hotspot codes are selected according to the decrease of the occurrence frequency.
For example, in the foregoing example, if the preset number is 2, since the occurrence times of c1 and c4 are greater than the occurrence times of c2, c5, c3 and c6, c1 and c4 are selected, and a hotspot profile including c1 and c4 is generated.
In this embodiment of the application, the specific numerical value of the preset number is not specifically limited, for example, the preset number may be determined by determining a usage duration range, acquiring a hotspot code file generated by a target application program with usage duration within the usage duration range, calculating an average hotspot code number of the acquired hotspot code file, and rounding up or rounding down as the preset number. For example, the usage duration range is 3 months, 4 hotspot code files generated by the target application program with the usage duration of 3 months are obtained, the 4 hotspot code files have different hotspot codes 17 in total, the average hotspot code number is 17/4, 4 is obtained by rounding down, and 4 is used as the preset number. The usage duration range may be a duration range in which the target application may generate most of the hot spot codes. For a user who has just started using the target application, the majority of hot spot code may already substantially represent a block of code that may run frequently.
The preset number can also be calculated according to a preset proportion, specifically, the product of the number and the proportion of different hot spot codes can be calculated to obtain the preset number. If the product of the number and the proportion of the different hot spot codes is not an integer, rounding up or rounding down can be performed according to requirements. For example, in the foregoing example, if the preset ratio is 0.3, since the product of the number of different hotspot codes and the ratio is 6 × 0.3 — 1.8, rounding up to obtain the preset number of 2, and selecting c1 and c4 for generating the hotspot profile.
As an implementation manner, hot spot codes can be selected according to the occurrence times from large to small, so that the total data volume of the selected hot spot codes is smaller than the preset data volume and reaches the maximum selectable number. In this embodiment, the data volumes of the hot spot codes may be sequentially accumulated from large to small according to the occurrence frequency, and when the data volume accumulated to the hot spot codes is greater than or equal to the preset data volume, the last one of the accumulated hot spot codes is discarded to obtain the selected hot spot code. The data amount may be one byte number, and the unit may be B, KB, MB, GB, and the like.
For example, in the foregoing example, the hotspot codes are sequentially selected by accumulating from c1, c4, c2, c5, c6 and c3, and if the data amount of c1 and c4 is smaller than the preset data amount, and the total data amount of c1, c4 and c2 is larger than the preset data amount, c1 and c4 are selected for generating the hotspot profile.
Optionally, in this embodiment of the application, when hot spot codes are selected according to a descending order of the occurrence times, the hot spot codes with the same occurrence times may be ranked in parallel. And when the data volume accumulated to the hot spot codes is larger than or equal to the preset data volume, discarding the last one of the accumulated hot spot codes, if the last one of the accumulated hot spot codes has hot spot codes with parallel sequences, selecting the hot spot codes with parallel sequences, and calculating the total accumulated data volume.
For example, in the foregoing example, the hotspot codes are cumulatively selected in sequence from c1, c4, c2, c5, c6 and c3, if the data amount of c1 and c4 is smaller than the preset data amount, the total data amount of c1, c4 and c2 is larger than the preset data amount, and since the occurrence times of c2 and c5 are the same, it is calculated whether the total data amount of c1, c4 and c5 is larger than the preset data amount. If the total data volume of c1, c4 and c5 is larger than the preset data volume, selecting c1 and c4 for generating a hotspot configuration file; if the total data amount of c1, c4 and c5 is less than the preset data amount, c1, c4 and c5 are selected, and whether the total data amount of c1, c4, c5 and c6 is larger than the preset data amount is continuously calculated; if the total data volume of c1, c4 and c5 is equal to the preset data volume, c1, c4 and c5 are selected for generating the hotspot configuration file, and whether the total data volume of c1, c4, c5 and c6 is larger than the preset data volume is not calculated any more.
In this embodiment of the application, the specific numerical value of the preset data amount is not specifically limited, for example, the preset data amount may be determined by determining a usage duration range, acquiring a hot spot code file generated by a target application program having a usage duration within the usage duration range, calculating an average data amount of the acquired hot spot code file, and rounding up or rounding down as the preset data amount. For example, the usage duration range is 3 months, 4 hotspot code files generated by the target application program with the usage duration of 3 months are obtained, the 4 hotspot code files have different hotspot codes 1200kb in total, the average data size of the hotspot code files is 1200 kb/4-300 kb, and 300kb is used as the preset data size.
As an embodiment, the hot spot codes may be selected according to their hot degree, that is, the hot spot codes with the hot degree greater than or equal to a certain hot degree are selected. The hot code hot degree can be represented by the hot code occurrence number, and then the hot codes with the occurrence number larger than or equal to the specified number can be selected.
For example, in the foregoing example, if the specified number is 2, since the occurrence number of c1, c4, c2, and c5 is greater than or equal to 2, c1, c4, c2, and c5 are selected for generating the hotspot profile.
In one embodiment, the target application may have too short a runtime and may produce insufficient or non-representative hot spot code, and after the target application has been running for a period of time, a large portion of the hot spot code may be generated. For a user who has just started using the target application, the majority of hot spot code may already substantially represent a block of code that may run frequently. Therefore, in this embodiment, a hot spot code file with the target application program usage time reaching the preset time length is selected from the plurality of hot spot code files as the target code file. For example, the plurality of hotspot code files obtained by the server include a hotspot code file a, a hotspot code file B, a hotspot code file C and a hotspot code file D, wherein the use duration of the target application program generating the hotspot code file B and the hotspot code file C reaches a preset duration, and the use duration of the target application program generating the hotspot code file a and the hotspot code file D does not reach the preset duration, and then the hotspot code file B and the hotspot code file C are selected as target code files.
And selecting the hot spot codes from the target code file by taking the target code file as a hot spot code file for selecting the hot spot codes according to the occurrence frequency of each hot spot code, so that the occurrence frequency of the selected hot spot codes is not less than the corresponding occurrence frequency of the unselected hot spot codes.
In this embodiment, according to the number of occurrences corresponding to each hot spot code, the selection manner for selecting the hot spot code from the target code file may refer to the foregoing embodiment, such as selecting all the hot spot codes in the target code file; or if the number of the hot spot codes is reduced from large to small according to the occurrence frequency, selecting a preset number of hot spot codes; or selecting hot spot codes with the occurrence times larger than or equal to the specified number; or if the total data amount of the selected hot spot codes is smaller than the preset data amount, the details are not repeated here.
Optionally, in this embodiment, the number of the selected object code files may be further limited by a specified time duration. Specifically, the specified duration is longer than the preset duration, and a hotspot code file with the use duration of the target application program reaching the preset duration and being shorter than the specified duration is selected from the plurality of hotspot code files as a target code file.
Optionally, in this embodiment of the application, after the hot spot codes are selected according to the number of the corresponding hot spot files from large to small, if there are unselected hot spot codes and the selected hot spot codes have the same occurrence frequency, the unselected hot spot codes having the same occurrence frequency may also be selected to be used for generating the hot spot configuration file.
In addition, in the embodiment of the present application, if the target terminal device includes multiple models, system applications of different models of target terminal devices may be different. The server may obtain the hotspot configuration file of its system application for each model of target terminal device. The obtaining manner may refer to the obtaining manner described above.
Optionally, for target terminal devices of different models, if there is the same system application program, the same system application program may be reused. For example, the target terminal device of model H1 has the system application P1, the target terminal device of model H2 also has the system application P1, and when the hotspot configuration file of the system application P1 of the target terminal device of model H1 is acquired, the hotspot configuration file may also be used as the hotspot configuration file of the system application P1 of the target terminal device of model H2.
Step S430: and returning the hotspot configuration file when receiving a hotspot code acquisition request of a system application program in the target terminal equipment.
And when receiving an acquisition request for the hotspot code of the target application program, the server selects a hotspot configuration file according to the acquisition request and returns the hotspot configuration file to the requester.
It can be understood that, in the embodiment of the present application, the server may generate hotspot configuration files of different system applications in the target terminal device. When receiving the hotspot code acquisition request, the server can determine which system application hotspot configuration file is returned to the requesting party according to the unique application program identity information carried by the hotspot code acquisition request.
In some embodiments, if the terminal device 102 requests the server 101 that generates the hotspot profile for the target application from the hotspot profile, as shown in fig. 4, the server 101 may return the hotspot profile that selects the target application to the terminal device.
In some embodiments, as shown in fig. 5, other servers may also initiate a request for acquiring the hotspot code of the target application. I.e. the server that generates the hotspot profile may be a different server that sends the hotspot profile to the target terminal device. As shown in fig. 5, the server 1011 generates the hotspot configuration file, the terminal device 102 requests the server 1012 for the hotspot configuration file of the target application program, the hotspot configuration file is generated at the server 1011, and the server 1012 requests the server 1011 to obtain the hotspot configuration file. The server 1011 selects a hot spot configuration file of a target application program and sends the hot spot configuration file to the server 1012, and the server 1012 acquires the hot spot configuration file from the server 1011 and sends the hot spot configuration file to the terminal device 102. In the embodiment of the present application, the server is described as the server 1011 or the server 101 that generates the hot spot profile, unless otherwise specified.
In this embodiment of the application, the terminal device that requests the hotspot configuration file from the server may be a target terminal device, or may be another terminal device. If other terminal equipment requests to obtain the hotspot configuration file from the server, and if the target terminal equipment needs to obtain the hotspot configuration file, the target terminal equipment can obtain the hotspot configuration file from the other terminal equipment.
In the embodiment of the application, the server selects the hot spot code of the target application program according to the heat degree to generate the hot spot configuration file, so that the generated hot spot configuration file more possibly comprises the code blocks which are frequently run when a new user uses the target application program, and after the hot spot compiling file of the target application program is generated according to the hot spot configuration file, the execution efficiency of the target application program is improved, and the performance of the target application program is improved.
An embodiment of the present application further provides a hotspot code processing apparatus 500, please refer to fig. 8, where the apparatus 500 includes: a first file obtaining module 510, configured to obtain multiple hotspot code files of a target application, where the target application is a system application in a target terminal device, and the multiple hotspot code files are from multiple terminal devices that have run the target application; a second file obtaining module 520, configured to generate a hot spot configuration file according to the plurality of hot spot code files; a returning module 530, configured to return the hotspot configuration file when receiving a hotspot code acquisition request for a system application program in the target terminal device.
Optionally, the first file obtaining module 510 may be configured to determine whether each application in the application list is a system application of the target terminal device; and if so, acquiring the hot spot code file of the system application program from a plurality of terminal devices.
Optionally, the first file obtaining module 510 may be configured to obtain a hot spot code file of an application program in the plurality of terminal devices; and determining the hot spot code file of the system application program in the target terminal equipment from the acquired hot spot code file.
An embodiment of the present application further provides a hot spot code processing apparatus 600, please refer to fig. 9, where the apparatus 600 includes: a kernel file obtaining module 610, configured to obtain a kernel file of a target terminal device, where the kernel file includes a hotspot configuration file of a system application program, and the hotspot configuration file includes a hotspot code of the system application program; the installation module 620 is configured to compile a hotspot code in a hotspot configuration file of a system application into a machine code to obtain a hotspot compilation file of the system application when the target terminal device installs the system application through the kernel file; a storage module 630, configured to store the hotspot compiled file by the target terminal device.
Optionally, the kernel file obtaining module 610 may be configured to store the hot configuration file of the system application program in the specified directory into the compiled kernel file when performing kernel compilation on the kernel source code of the target terminal device.
Optionally, the apparatus 600 may further include a file obtaining module, configured to obtain, from a server, a hotspot configuration file of the system application program in the target terminal device, where the hotspot configuration file is obtained according to a plurality of hotspot code files, and the hotspot code files are from a plurality of terminal devices running the system application program; and the storage module is used for storing the hotspot configuration file in the specified directory.
Optionally, the apparatus 600 may further include a directory creation module, configured to create a specified directory for storing the hotspot configuration file of the system application.
Optionally, the kernel file obtaining module 610 may be further configured to store the hotspot configuration file of the system application program in a specified directory in a target file in a kernel file, where the target file is a file in the kernel file, where the hotspot configuration file is used to store a hotspot code of the system application program.
Optionally, the installation module 620 may be configured to install the system application program when performing system installation through the kernel file; and compiling the hot spot codes in the target file into machine codes when the system application program is installed.
It should be noted that, as will be clear to those skilled in the art, for convenience and brevity of description, the specific working processes of the above-described apparatuses and modules may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. In addition, various implementation manners in the method embodiment may correspond to corresponding modules, and are not described in detail in this application embodiment.
In the several embodiments provided in the present application, the coupling or direct coupling or communication connection between the modules shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or modules may be in an electrical, mechanical or other form.
In addition, functional modules in the embodiments of the present application may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
Referring to fig. 10, a block diagram of an electronic device 700 according to an embodiment of the present disclosure is shown. The electronic device 700 in the present application may be a server or a terminal device, that is, may be a server, a target terminal device or other terminal devices.
The electronic device 700 may include one or more of the following components: a processor 710, a memory 720, and one or more programs, wherein the one or more programs may be stored in the memory 720 and configured to be executed by the one or more processors 710, the one or more programs configured to perform a method as described in the aforementioned method embodiments.
Processor 710 may include one or more processing cores. The processor 710 interfaces with various components throughout the electronic device 700 using various interfaces and circuitry to perform various functions of the electronic device 700 and process data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 720 and invoking data stored in the memory 720. Alternatively, the processor 710 may be implemented in hardware using at least one of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 710 may integrate one or more of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. Wherein, the CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing display content; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 710, but may be implemented by a communication chip.
The Memory 720 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). The memory 720 may be used to store instructions, programs, code sets, or instruction sets. The memory 720 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing various method embodiments described below, and the like. The storage data area may also store data created during use by the electronic device 700, and the like.
Referring to fig. 11, a block diagram of a computer-readable storage medium according to an embodiment of the present application is shown. The computer-readable storage medium 800 has stored therein program code that can be called by a processor to execute the methods described in the above-described method embodiments.
The computer-readable storage medium 800 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. Alternatively, the computer-readable storage medium 800 includes a non-transitory computer-readable storage medium. The computer readable storage medium 800 has storage space for program code 810 to perform any of the method steps of the method described above. The program code can be read from or written to one or more computer program products. The program code 810 may be compressed, for example, in a suitable form.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not necessarily depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (13)

1. A hotspot code processing method is characterized by comprising the following steps:
acquiring a kernel file of target terminal equipment, wherein the kernel file comprises a hotspot configuration file of a system application program, and the hotspot configuration file comprises a hotspot code of the system application program;
when the target terminal equipment installs the system application program through the kernel file, compiling the hot spot codes in the hot spot configuration file of the system application program into machine codes to obtain a hot spot compiling file of the system application program;
and the target terminal equipment stores the hotspot compiling file.
2. The method of claim 1, wherein the obtaining the kernel file of the target terminal device comprises:
and when kernel source codes of the target terminal equipment are subjected to kernel compiling, storing the hot spot configuration file of the system application program under the specified directory into the compiled kernel file.
3. The method according to claim 2, wherein before storing the hotspot configuration file of the system application program under the specified directory into the compiled kernel file when performing kernel compilation on the kernel source code of the target terminal device, the method further comprises:
acquiring a hotspot configuration file of a system application program in the target terminal equipment from a server, wherein the hotspot configuration file is acquired according to a plurality of hotspot code files from a plurality of terminal equipment running the system application program;
and storing the hotspot configuration file in the specified directory.
4. The method of claim 3, wherein before depositing the hotspot profile under the specified directory, further comprising:
and creating a specified directory for storing the hotspot configuration file of the system application program.
5. The method of claim 2, wherein storing the hotspot configuration file of the system application under the specified directory into the compiled kernel file comprises:
and storing the hot spot configuration file of the system application program under the specified directory in a target file in a kernel file, wherein the target file is a file used for storing a hot spot code of the system application program in the kernel file.
6. The method of claim 5, wherein the target terminal device compiles the hotspot code in the hotspot configuration file of the system application into machine code when the system application is installed through the kernel file, and the compiling comprises:
when the system is installed through the kernel file, installing the system application program;
and compiling the hot spot codes in the target file into machine codes when the system application program is installed.
7. A hotspot code processing method is characterized by comprising the following steps:
acquiring a plurality of hot spot code files of a target application program, wherein the target application program is a system application program in target terminal equipment, and the hot spot code files are from the terminal equipment running the target application program;
generating a hot spot configuration file according to the hot spot code files;
and returning the hotspot configuration file when receiving a hotspot code acquisition request of a system application program in the target terminal equipment.
8. The method of claim 7, wherein obtaining the plurality of hotspot code files of the target application comprises:
judging whether each application program in the application program list is a system application program of the target terminal equipment or not;
and if so, acquiring the hot spot code file of the system application program from the plurality of terminal devices.
9. The method of claim 7, wherein obtaining the plurality of hotspot code files of the target application comprises:
acquiring hot spot code files of application programs in the plurality of terminal devices;
and determining the hot spot code file of the system application program in the target terminal equipment from the acquired hot spot code file.
10. An apparatus for hotspot code processing, the apparatus comprising:
the system comprises a kernel file acquisition module, a kernel file acquisition module and a kernel file processing module, wherein the kernel file acquisition module is used for acquiring a kernel file of target terminal equipment, the kernel file comprises a hot spot configuration file of a system application program, and the hot spot configuration file comprises a hot spot code of the system application program;
the installation module is used for compiling the hot spot codes in the hot spot configuration file of the system application program into machine codes when the target terminal equipment installs the system application program through the kernel file, and obtaining the hot spot compiling file of the system application program;
and the storage module is used for storing the hotspot compiling file by the target terminal equipment.
11. An apparatus for hotspot code processing, the apparatus comprising:
the system comprises a first file acquisition module, a second file acquisition module and a third file acquisition module, wherein the first file acquisition module is used for acquiring a plurality of hot spot code files of a target application program, the target application program is a system application program in target terminal equipment, and the hot spot code files are from the terminal equipment running the target application program;
the second file acquisition module is used for generating a hot spot configuration file according to the hot spot code files;
and the return module is used for returning the hotspot configuration file when receiving a hotspot code acquisition request of a system application program in the target terminal equipment.
12. An electronic device, characterized in that the electronic device comprises:
one or more processors;
a memory electrically connected with the one or more processors;
one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the method of any of claims 1-9.
13. A computer-readable storage medium, having stored thereon program code that can be invoked by a processor to perform the method according to any one of claims 1 to 9.
CN201911408505.0A 2019-12-31 2019-12-31 Hotspot code processing method and device, electronic equipment and storage medium Pending CN113126994A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201911408505.0A CN113126994A (en) 2019-12-31 2019-12-31 Hotspot code processing method and device, electronic equipment and storage medium
PCT/CN2020/136878 WO2021135947A1 (en) 2019-12-31 2020-12-16 Hotspot code processing method and apparatus, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911408505.0A CN113126994A (en) 2019-12-31 2019-12-31 Hotspot code processing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113126994A true CN113126994A (en) 2021-07-16

Family

ID=76685872

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911408505.0A Pending CN113126994A (en) 2019-12-31 2019-12-31 Hotspot code processing method and device, electronic equipment and storage medium

Country Status (2)

Country Link
CN (1) CN113126994A (en)
WO (1) WO2021135947A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116088888A (en) * 2022-07-22 2023-05-09 荣耀终端有限公司 Application program updating method and related device
CN116627426A (en) * 2023-05-29 2023-08-22 合芯科技有限公司 Hardware description language increment compiling method and device
WO2024104203A1 (en) * 2022-11-17 2024-05-23 蔚来移动科技有限公司 Method for acquiring configuration file of application and method for installing application

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040073904A1 (en) * 2002-10-15 2004-04-15 Nokia Corporation Method and apparatus for accelerating program execution in platform-independent virtual machines
CN106775893A (en) * 2016-12-30 2017-05-31 北京小米移动软件有限公司 To the method and device of program precompile
CN109960507A (en) * 2017-12-14 2019-07-02 广东欧珀移动通信有限公司 Compile optimization method, device, storage medium, intelligent terminal and server
CN110543338A (en) * 2019-09-09 2019-12-06 北京安云世纪科技有限公司 dynamic loading method and device for files
CN110609689A (en) * 2019-08-23 2019-12-24 北京安云世纪科技有限公司 Application installation and operation method and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104598274B (en) * 2015-01-13 2017-07-18 北京京东尚科信息技术有限公司 A kind of automatically instrument compiling installation method and system
CN105468428B (en) * 2015-12-04 2018-07-06 上海斐讯数据通信技术有限公司 A kind of Android compilation of source code method and system
US10338932B2 (en) * 2016-11-15 2019-07-02 Google Llc Bootstrapping profile-guided compilation and verification

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040073904A1 (en) * 2002-10-15 2004-04-15 Nokia Corporation Method and apparatus for accelerating program execution in platform-independent virtual machines
CN106775893A (en) * 2016-12-30 2017-05-31 北京小米移动软件有限公司 To the method and device of program precompile
CN109960507A (en) * 2017-12-14 2019-07-02 广东欧珀移动通信有限公司 Compile optimization method, device, storage medium, intelligent terminal and server
CN110609689A (en) * 2019-08-23 2019-12-24 北京安云世纪科技有限公司 Application installation and operation method and device
CN110543338A (en) * 2019-09-09 2019-12-06 北京安云世纪科技有限公司 dynamic loading method and device for files

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116088888A (en) * 2022-07-22 2023-05-09 荣耀终端有限公司 Application program updating method and related device
CN116088888B (en) * 2022-07-22 2023-10-31 荣耀终端有限公司 Application program updating method and related device
WO2024104203A1 (en) * 2022-11-17 2024-05-23 蔚来移动科技有限公司 Method for acquiring configuration file of application and method for installing application
CN116627426A (en) * 2023-05-29 2023-08-22 合芯科技有限公司 Hardware description language increment compiling method and device
CN116627426B (en) * 2023-05-29 2023-11-24 合芯科技有限公司 Hardware description language increment compiling method and device

Also Published As

Publication number Publication date
WO2021135947A1 (en) 2021-07-08

Similar Documents

Publication Publication Date Title
CN111078318B (en) Processing method, device and system of configuration file and storage medium
WO2021135947A1 (en) Hotspot code processing method and apparatus, electronic device and storage medium
CN111061484B (en) Code compiling method, device, server, user terminal and readable medium
CN110618922B (en) Performance test method and related equipment
CN110968331B (en) Method and device for running application program
CN106648755B (en) Method and device for dynamically loading dex in android art environment
WO2021115177A1 (en) Application installation method and apparatus, terminal device, server and storage medium
CN109756533B (en) Mirror image acceleration method and device and server
CN110543324B (en) Plug-in increment updating method and device for application program
CN112667405B (en) Information processing method, device, equipment and storage medium
CN110941424A (en) Compiling parameter optimization method and device and electronic equipment
EP3534266B1 (en) Method, apparatus and system for prefetching data
CN109840096A (en) The installation method and device of operating system
CN110888658A (en) Dynamic method and device for functional module in application program and storage medium
CN112506584A (en) Resource file loading method, device, equipment, storage medium and product
CN111865676B (en) Method, device, server and storage medium for updating and checking configuration file
WO2021115178A1 (en) Application program pre-compilation method and apparatus, server and storage medium
CN114185550A (en) Distributed compiling method, device and storage medium
CN110286996A (en) Container instance IP switching method, device, computer equipment and storage medium
CN113010172B (en) Processing method, device and system of configuration file and storage medium
CN115858007A (en) Loading method and device of extension assembly, storage medium and electronic device
CN113127047A (en) Hot spot code processing method and device, server and storage medium
CN112783500B (en) Method and device for generating compiling optimization information and electronic equipment
CN110333870B (en) Simulink model variable distribution processing method, device and equipment
CN115756723A (en) Code preheating method and device, electronic equipment and computer readable 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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210716