Information processing method, device, equipment and storage medium
By obtaining and replacing configuration files during the application installation process, the problem that the application cannot be optimized in the early stage of installation is solved, the execution speed of the application is optimized, and the performance of the mobile device is improved.
Patent Information
- Application Number
- CN202110136267.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-02-01
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2041-02-01
AI Technical Summary
In the early stage of application installation, due to the small amount of user usage data, the configuration file cannot be obtained, resulting in the inability to optimize the execution speed of the application.
During the application installation process, the original configuration file is obtained and replaced with a configuration file marked with commonly used code fragments, and is optimized when the operating system meets the optimization opportunity to improve the execution speed of the application.
The execution speed of the application can be optimized in the early stage of application installation, which overcomes the problem of inability to optimize in the existing technology and improves the performance of the mobile device.
Smart Images

Figure CN112799690B
Abstract
Description
Technical Field
[0001] The present application relates to the field of information processing technology, and more specifically, to an information processing method, device, electronic device and storage medium. Background Art
[0002] In order to improve the running efficiency of an application (for the sake of convenience, referred to as application P) in a mobile device (such as a smart phone, tablet computer, etc.), an optional implementation method is that the mobile device optimizes the execution speed of application P. In some scenarios, the mobile device (for the sake of convenience, referred to as mobile device S) optimizes the execution speed of application P by referring to a configuration file corresponding to application P (the configuration file is determined by mobile device S according to the usage of application P in mobile device S), determining the object to be optimized in application P through the configuration file, and optimizing the object to be optimized in application P to achieve the purpose of optimizing the execution speed of application P. However, in the early stage of the installation of application P, due to the small amount of user usage data, the configuration file cannot be obtained, and the optimization of application P cannot be achieved. Summary of the invention
[0003] The purpose of this application is to provide an information processing method, device, electronic device and storage medium, including the following technical solutions:
[0004] An information processing method, applied to a target mobile device, comprising:
[0005] Obtaining an installation package of a target application and a configuration file corresponding to the target application, wherein the configuration file is used to mark common code snippets of the target application;
[0006] Installing the target application based on the operating system and the installation package; wherein the target application includes an original configuration file;
[0007] During the process of installing the target application, the original configuration file is replaced by the configuration file, so as to associate the configuration file with the target application and store the configuration file;
[0008] If the operating system meets the optimization timing, optimization processing is performed based on the configuration file so that the execution speed of the target application is optimized.
[0009] In the above method, preferably, the step of obtaining the installation package of the target application and the configuration file corresponding to the target application includes:
[0010] Obtain the installation package of the target application from the network server;
[0011] If the target application belongs to the application whitelist, a configuration file corresponding to the target application is obtained in the process of obtaining the installation package of the target application from the network server.
[0012] In the above method, preferably, the configuration file corresponding to the target application is generated by the network server based on the target application in the application whitelist and statistics of usage configuration files from multiple different mobile devices; wherein the usage configuration file is used to characterize the commonly used code snippets of the target application marked and accumulated by the mobile device corresponding to the usage configuration file during use.
[0013] In the above method, preferably, the configuration file corresponding to the target application is determined by the network server counting the number of times each commonly used code snippet is marked using configuration files from multiple different mobile devices, and the number of times each commonly used code snippet is marked is greater than the number of times any uncommonly used code snippet of the target application is marked.
[0014] The above method preferably further comprises:
[0015] Marking and accumulating commonly used code snippets of the target application during use, and obtaining a usage configuration file corresponding to the target mobile device;
[0016] If any common code snippet marked by the configuration file corresponding to the target mobile device is not in the configuration file, the configuration file is updated so that the common code snippet is added to the common code snippets marked by the configuration file.
[0017] The above method preferably further comprises:
[0018] In the case that the target application is in the application whitelist, if the target application is used for a time period greater than a threshold in the target mobile device, a usage configuration file of the target application is uploaded to a network server.
[0019] The above method, preferably, if the operating system meets the optimization opportunity, performing optimization processing based on the configuration file so that the execution speed of the target application is optimized, includes:
[0020] If the operating system meets the optimization timing, the optimization processing based on the configuration file is performed by single-thread scheduling corresponding to the optimization timing, so that the execution speed of the target application is optimized and the power consumption of the target mobile device is reduced.
[0021] An information processing device, comprising:
[0022] An acquisition module, used to obtain an installation package of a target application and a configuration file corresponding to the target application, wherein the configuration file is used to mark common code snippets of the target application;
[0023] An installation module, used to install the target application based on the operating system and the installation package; wherein the target application includes an original configuration file;
[0024] a replacement module, used to replace the original configuration file with the configuration file during the installation of the target application, so as to associate the configuration file with the target application and store it;
[0025] If the operating system meets the optimization timing, optimization processing is performed based on the configuration file so that the execution speed of the target application is optimized.
[0026] An information processing device, comprising:
[0027] Memory for storing computer programs;
[0028] The processor is used to call and execute the computer program to implement each step of the information processing method as described in any one of the above items.
[0029] A readable storage medium stores a computer program, and when the computer program is executed by a processor, the computer program implements the steps of any of the above information processing methods.
[0030] Through the above scheme, it can be known that the information processing method, device, equipment and storage medium provided by the present application, when obtaining the installation package of the target application, also obtains a configuration file corresponding to the target application, and the configuration file is used to mark the commonly used code snippets of the target application; installs the target application based on the operating system and the installation package; wherein the target application includes the original configuration file; replaces the original configuration file with the configuration file during the installation of the target application to store the configuration file in association with the target application; wherein, if the operating system meets the optimization timing, the optimization processing is performed based on the configuration file so that the execution speed of the target application is optimized. Since the configuration file for marking the commonly used code snippets of the target application is obtained during the installation of the target application, the target application can be optimized during the installation of the application or in the early use stage after the installation of the application (i.e., the initial installation stage), which overcomes the problem in the prior art that the application cannot be optimized in the early stage of the application installation. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0032] Figure 1 A flowchart of an implementation of the information processing method provided in the embodiment of the present application;
[0033] Figure 2 A flowchart for obtaining an installation package of a target application and a configuration file corresponding to the target application provided in an embodiment of the present application;
[0034] Figure 3 A flow chart of the optimization scheme provided in the embodiment of the present application;
[0035] Figure 4 A schematic diagram of the structure of an information processing device provided in an embodiment of the present application;
[0036] Figure 5 This is a block diagram of the hardware structure of the information processing device provided in the embodiment of the present application.
[0037] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims and the above drawings are used to distinguish similar parts, and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated herein. DETAILED DESCRIPTION
[0038] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0039] The information processing method provided in the present application can be used in a mobile device (referred to as a target mobile device for easy distinction), and the target mobile device can install applications and can also optimize the installed applications.
[0040] An implementation flow chart of the information processing method provided in the embodiment of the present application is as follows Figure 1 As shown, this may include:
[0041] Step S101: obtaining an installation package of an application (referred to as a target application for easy distinction) and a configuration file corresponding to the target application, wherein the configuration file is used to mark common code snippets of the target application.
[0042] The target application may be any application that can be installed in the target mobile device.
[0043] Since the target application can be installed in multiple mobile devices, the target application may have been installed in several other mobile devices and used by users before being installed in the target mobile device. Therefore, the common code snippets of the target application marked in the configuration file can be the common code snippets of the target application determined according to the use process of the target application in multiple mobile devices.
[0044] The code snippet of the target application refers to a class or method in the code that implements the target application. The commonly used code snippet of the target application refers to a commonly used class or method of the target application.
[0045] Step S102: installing a target application based on the operating system and the installation package; wherein the target application includes an original configuration file.
[0046] The original configuration file is an empty file. In the prior art, the original configuration file is used to mark the commonly used code snippets of the target application in the target mobile device when the user of the target mobile device uses the target application, and can be used to optimize the execution speed of the target application.
[0047] Step S103: during the process of installing the target application, the original configuration file is replaced with the configuration file, so as to store the configuration file in association with the target application.
[0048] In the embodiment of the present application, instead of using the original configuration file to mark the commonly used code snippets of the target application in the target mobile device, the configuration file obtained in step S101 that has marked the commonly used code snippets of the target application is used to replace the original configuration file in the target application. Then, based on the configuration file that has marked the commonly used code snippets of the target application, the commonly used code snippets of the target application in the target mobile device can be marked while the user of the target mobile device is using the target application.
[0049] If the operating system meets the optimization timing, optimization processing is performed based on the configuration file so that the execution speed of the target application is optimized.
[0050] The optimization timing may include but is not limited to any of the following: when the device is turned on, when the application is installed, when the system is updated, when the device is charging and idle, etc. Optimizing at these times will not affect the operation of the foreground application in the mobile device.
[0051] Optionally, the optimization processing based on the configuration file may include: compiling at least some of the commonly used code snippets of the target application marked in the configuration file into machine codes that are easy to execute. For example, the code of the application is usually stored in the form of a dex file, and the dex file can be compiled to obtain an oat file that is easy for a processor (usually a virtual machine) to execute. The speed at which the virtual machine executes the oat file is faster than the speed at which the dex file is run, thereby improving the execution speed of the target application.
[0052] The information processing method provided in the embodiment of the present application obtains the configuration file for marking the commonly used code snippets of the target application during the process of installing the target application. That is to say, based on the present application, the configuration file is no longer empty after the application is installed. Therefore, the target application can be optimized during the process of installing the application or in the early use stage after the application is installed (i.e., the initial installation stage), thereby overcoming the problem in the prior art that the application cannot be optimized in the early stage of application installation.
[0053] In an optional embodiment, a flowchart for implementing the above-mentioned obtaining the installation package of the target application and the configuration file corresponding to the target application is as follows: Figure 2 As shown, this may include:
[0054] Step S201: Obtain the installation package of the target application from a network server.
[0055] Optionally, the network server may be a server corresponding to the application center, or may be a server of a provider of the target application.
[0056] Step S202: If the target application belongs to the application whitelist, a configuration file corresponding to the target application is obtained in the process of obtaining the installation package of the target application from the network server.
[0057] Optionally, a user usage rate of an application in the application whitelist is higher than a user usage rate of an application not in the application whitelist.
[0058] Optionally, the application whitelist may be formed by collecting user usage behavior data of each application among a plurality of applications, and screening out a preset number of applications with the highest user usage rates from the plurality of applications according to the user usage behavior data.
[0059] The user usage behavior data of the application (for ease of description, recorded as application A) may include but is not limited to: the duration and frequency of each user using application A, the user conversion rate and retention rate of application A, etc.
[0060] Optionally, the user usage rate of application A can be calculated based on the preset correlation between the user usage behavior data and the user usage rate of the application. In the correlation between the user usage behavior data and the user usage rate of the application, the user usage rate is positively correlated with the duration and frequency of each user using the application, and is positively correlated with the user conversion rate and retention rate of the application. That is to say, for application A, the longer the duration of each user using application A, the higher the user usage rate of application A, the higher the frequency of each user using application A, the higher the user usage rate of application A, the higher the user conversion rate of application A, the higher the user usage rate of application A, the higher the user retention rate of application A, and the higher the user usage rate of application A.
[0061] That is to say, in this application, the configuration file corresponding to the target application is obtained only if the target application belongs to the application whitelist, thereby ensuring that the commonly used code snippets marked in the configuration file after the target application is installed are closer to the user's actual use of the target application.
[0062] Optionally, the application whitelist can be generated by a cloud device, which can be the above-mentioned network server or not, that is, a server independent of the network server. The mobile device can upload the user behavior data such as the installation information, usage time, and usage frequency of each application to the cloud device, and the cloud device can obtain the user usage behavior data such as the usage time and usage frequency of each application, and the user conversion rate and retention rate of each application based on the statistical analysis of the information uploaded by each mobile device. Then, the user usage rate of each application is determined based on the user usage behavior data of each application.
[0063] In the case where the cloud device and the network server are independent servers, the application whitelist may be stored in the cloud device, or may be downloaded from the cloud device by the network server and then stored in the network server.
[0064] Optionally, the mobile device may download the application whitelist from the cloud device and store it locally on the mobile device.
[0065] Optionally, in the process of the target mobile device obtaining the installation package of the target application from the network server, the network server may query the locally stored application whitelist to determine whether the target application belongs to the application whitelist, or the target mobile device may send a query request to the network server to trigger the network server to query the locally stored application whitelist to determine whether the target application belongs to the application whitelist, or the network server does not store the application whitelist locally, but requests the cloud device to query whether the target application belongs to the application whitelist. After the network server determines that the target application belongs to the application whitelist, the configuration file corresponding to the target application is sent to the target mobile device.
[0066] Optionally, when the target mobile device obtains the installation package of the target application from the network server, the target mobile device can query the locally stored application whitelist, and when it is determined that the target application belongs to the application whitelist, download the configuration file corresponding to the target application from the network server.
[0067] In an optional embodiment, the configuration file corresponding to the target application is generated by a network server based on the target application in the application whitelist and statistics of usage configuration files from multiple different mobile devices; wherein the usage configuration file is used to characterize the commonly used code snippets of the target application marked and accumulated by the mobile device corresponding to the usage configuration file during use.
[0068] That is to say, for any application in the application whitelist (for the sake of convenience, it is recorded as application B), the usage profile of application B is determined according to the usage of application B by multiple different mobile devices that install application B. For example, multiple different mobile devices that install application B all mark and accumulate common code snippets of application B during use to obtain a usage profile corresponding to application B. The usage profile corresponding to application B in each mobile device that installs application B represents the common code snippets of application B in the mobile device that installs application B. Multiple different mobile devices that install application B upload the obtained usage profiles to the network server, so that the network server can obtain the usage profiles from multiple different mobile devices.
[0069] Optionally, the network server can count the number of times each commonly used code snippet is marked using configuration files from multiple different mobile devices, and determine the configuration file corresponding to the target application according to the number of times each commonly used code snippet is marked; wherein the number of times each commonly used code snippet is marked in the configuration file corresponding to the target application is greater than the number of times any uncommonly used code snippet of the target application is marked. Optionally, commonly used code snippets with a number of marks greater than a threshold are marked in the configuration file corresponding to the target application, or the commonly used code snippets ranked in the top M in terms of the number of marks are marked in the configuration file corresponding to the target application.
[0070] In an optional embodiment, the information processing method provided in the embodiment of the present application may also include:
[0071] Mark and accumulate the commonly used code snippets of the target application during use to obtain the usage profile corresponding to the target mobile device.
[0072] If any commonly used code snippet marked by the usage configuration file corresponding to the target mobile device (referred to as commonly used code snippet C for ease of description) is not in the configuration file corresponding to the target application, the configuration file corresponding to the target application is updated so that the above-mentioned commonly used code snippet C is added to the commonly used code snippets marked by the configuration file corresponding to the target application.
[0073] That is to say, in addition to associating a configuration file with the target application when the target application is installed, the present application also marks and accumulates the actual commonly used code snippets of the target application in the target mobile device during the use of the target application, and adds information associated with the commonly used code snippet C in the configuration file corresponding to the target application, where the information represents the commonly used code snippet C. In this way, the commonly used code snippets marked in the configuration file corresponding to the target application include, in addition to the commonly used code snippets determined based on the usage of the target application by multiple different mobile devices, commonly used code snippets determined based on the long-term usage of the target application in the target mobile device.
[0074] By marking the commonly used code snippets determined by the long-term usage of the target application in the target mobile device into the configuration file, the execution speed of the target application can be further optimized after optimization processing based on the configuration file.
[0075] In an optional embodiment, when the target application is in the application whitelist, if the target application is used in the target mobile device for a time period greater than a threshold, a usage profile of the target application is uploaded to a network server.
[0076] That is to say, in the embodiment of the present application, the target application usage configuration file is uploaded to the network server only when the target application is used in the target mobile device for a time period greater than a threshold. On the one hand, the data storage and data processing volume of the network server is reduced, and on the other hand, it can ensure that the network server can more accurately determine the commonly used code snippets of the target application in multiple mobile devices based on the configuration file determined by the usage configuration file, thereby optimizing the execution speed of the target application in the early stage of the application installation.
[0077] In an optional embodiment, if the operating system meets the optimization opportunity, an optimization process is performed based on the configuration file so that the execution speed of the target application is optimized. One implementation method may be:
[0078] If the operating system meets the optimization timing, the optimization process based on the configuration file is performed by single-thread scheduling corresponding to the optimization timing, so that the execution speed of the target application is optimized and the power consumption of the target mobile device is reduced.
[0079] In addition, during the optimization process based on the configuration file, if the optimization process is multi-threaded, the multiple threads will occupy more memory, which will not only consume a lot of power but also cause the mobile device to heat up. In order to reduce the memory usage of the optimization process, in the embodiment of the present application, the optimization process is single-threaded and scheduled corresponding to the optimization time, so that the execution speed of the target application is optimized while reducing the memory occupied by the optimization process, thereby reducing the power consumption and heating of the target mobile device. Different optimization times have different single-thread scheduling for the optimization process.
[0080] The embodiments of the present application are exemplarily described below in conjunction with specific scenarios.
[0081] In this example, the optimization process based on the configuration file is performed by compiling at least part of the common code snippets of the target application program marked by the configuration file into machine codes that are easy to execute.
[0082] like Figure 3 As shown, it is a flow chart of the optimization solution provided by the embodiment of the present application. In this example, the application center (i.e., the network server) pre-downloads the application whitelist (i.e., Figure 3 The mobile device downloads the installation package of application A from the application center, and the application center determines whether application A is in the whitelist:
[0083] If application A is not in the whitelist, the mobile device will not obtain the configuration file corresponding to application A (i.e. Figure 3The core profile file in the mobile device is used to mark the commonly used code snippets of application A). After the mobile device obtains the installation package of application A, the PackageManagerService in the mobile device executes the normal installation process. After application A is installed, the commonly used code snippets are continuously accumulated according to the user's use of application A (recorded in the profile file). The PackageDexOptimizer in the mobile device performs a small amount of optimization based on the commonly used code snippets accumulated locally. During the optimization process, the commonly used code snippets are compiled with dex2oat using a dedicated CPU channel (that is, the dex2oat compilation is scheduled with a single thread corresponding to the optimization timing) to obtain an oat file (that is, Figure 3 oat files in the . When ART native on the mobile device executes the code of application A, only a small number of oat files can be executed using AOT (Ahead-Of-Time), and other files (i.e., uncommon code snippets) are executed using JIT (Just-In-Time) (i.e., compiled execution) or interpreted execution. The speed of AOT execution is higher than that of JIT execution and interpreted execution.
[0084] If application A is in the whitelist, the mobile device obtains the configuration file corresponding to application A (i.e. Figure 3 After the mobile device obtains the installation package of application A, the PackageManagerService in the mobile device replaces the original empty profile file of application A with the coreprofile file during the installation of application A. After application A is installed, common code snippets are continuously accumulated according to the user's usage of application A. The PackageDexOptimizer in the mobile device optimizes the common code snippets based on the coreprofile file and the locally accumulated common code snippets. During the optimization process, the dedicated CPU channel is used to perform dex2oat compilation on the common code snippets (that is, single-threaded scheduling of the dex2oat compilation corresponding to the optimization timing) to obtain the oat file (that is, Figure 3 oat files in . When ART native on the mobile device executes the code of application A, more oat files can be executed using AOT (Ahead-Of-Time), and other files (i.e., uncommon code snippets) can be executed using JIT (Just-In-Time) (i.e., compiled execution) or interpreted execution. As more files can be executed using AOT, the execution speed of application A is optimized.
[0085] In addition, single-thread scheduling of dex2oat compilation will not affect the compilation effect. Therefore, based on this application, the execution speed of the target application can be optimized without affecting the compilation effect and foreground application, while reducing the memory occupied by the optimization process, thereby reducing the power consumption and heat generation problems of the target mobile device.
[0086] Corresponding to the method embodiment, the embodiment of the present application further provides an information processing device. A structural schematic diagram of the information processing device provided by the embodiment of the present application is as follows: Figure 4 As shown, this may include:
[0087] Obtain module 401, install module 402 and replace module 403; wherein,
[0088] The obtaining module 401 is used to obtain an installation package of a target application and a configuration file corresponding to the target application, wherein the configuration file is used to mark common code snippets of the target application;
[0089] The installation module 402 is used to install the target application based on the operating system and the installation package; wherein the target application includes an original configuration file;
[0090] The replacement module 403 is used to replace the original configuration file with the configuration file during the installation of the target application program, so as to associate the configuration file with the target application program for storage;
[0091] If the operating system meets the optimization timing, optimization processing is performed based on the configuration file so that the execution speed of the target application is optimized.
[0092] The information processing device provided in the embodiment of the present application obtains a configuration file for marking commonly used code snippets of the target application during the process of installing the target application. That is to say, based on the present application, the configuration file is no longer empty after the application is installed. Therefore, the target application can be optimized during the process of installing the application or in the early use stage after the application is installed (i.e., the initial installation stage), thereby overcoming the problem in the prior art that the application cannot be optimized in the early stage of application installation.
[0093] In an optional embodiment, the obtaining module 401 includes:
[0094] A first obtaining module obtains an installation package of a target application from a network server;
[0095] The second obtaining module is used to obtain a configuration file corresponding to the target application in the process of obtaining the installation package of the target application from the network server if the target application belongs to the application whitelist.
[0096] In an optional embodiment, the configuration file corresponding to the target application is generated by the network server based on the target application in the application whitelist and statistics of usage configuration files from multiple different mobile devices; wherein the usage configuration file is used to characterize the commonly used code snippets of the target application during use that are marked and accumulated by the mobile device corresponding to the usage configuration file.
[0097] In an optional embodiment, the configuration file corresponding to the target application is determined by the network server counting the number of times each commonly used code snippet is marked using configuration files from multiple different mobile devices, and the number of times each commonly used code snippet is marked is greater than the number of times any uncommonly used code snippet of the target application is marked.
[0098] In an optional embodiment, the device further comprises:
[0099] A marking accumulation module, used to mark and accumulate common code snippets of the target application during use, and obtain a usage configuration file corresponding to the target mobile device;
[0100] The updating module is used for updating the configuration file if any common code snippet marked by the configuration file corresponding to the target mobile device is not in the configuration file, so as to add the common code snippet to the common code snippets marked by the configuration file.
[0101] In an optional embodiment, the device further comprises:
[0102] In the case that the target application is in the application whitelist, if the target application is used for a time period greater than a threshold in the target mobile device, a usage configuration file of the target application is uploaded to a network server.
[0103] In an optional embodiment, if the operating system meets the optimization opportunity, performing optimization processing based on the configuration file so that the execution speed of the target application is optimized includes:
[0104] If the operating system meets the optimization timing, the optimization processing based on the configuration file is performed by single-thread scheduling corresponding to the optimization timing, so that the execution speed of the target application is optimized and the power consumption of the target mobile device is reduced.
[0105] Corresponding to the method embodiment, the present application also provides an information processing device, such as a terminal, a server, etc. Among them, the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc., but is not limited to this.
[0106] An example of a hardware structure block diagram of an information processing device provided in an embodiment of the present application is shown in FIG. Figure 5 As shown, this may include:
[0107] Processor 1, communication interface 2, memory 3 and communication bus 4;
[0108] The processor 1, the communication interface 2, and the memory 3 communicate with each other via the communication bus 4;
[0109] Optionally, the communication interface 2 may be an interface of a communication module, such as an interface of a GSM module;
[0110] The processor 1 may be a central processing unit CPU, or an application-specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present application.
[0111] The memory 3 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0112] The processor 1 is specifically used to execute the computer program stored in the memory 3 to perform the following steps:
[0113] Obtaining an installation package of a target application and a configuration file corresponding to the target application, wherein the configuration file is used to mark common code snippets of the target application;
[0114] Installing the target application based on the operating system and the installation package; wherein the target application includes an original configuration file;
[0115] During the process of installing the target application, the original configuration file is replaced by the configuration file, so as to associate the configuration file with the target application and store the configuration file;
[0116] If the operating system meets the optimization timing, optimization processing is performed based on the configuration file so that the execution speed of the target application is optimized.
[0117] Optionally, the detailed functions and extended functions of the computer program may refer to the above description.
[0118] The present application also provides a readable storage medium, which may store a computer program suitable for execution by a processor, wherein the computer program is used to:
[0119] Obtaining an installation package of a target application and a configuration file corresponding to the target application, wherein the configuration file is used to mark common code snippets of the target application;
[0120] Installing the target application based on the operating system and the installation package; wherein the target application includes an original configuration file;
[0121] During the process of installing the target application, the original configuration file is replaced by the configuration file, so as to associate the configuration file with the target application and store the configuration file;
[0122] If the operating system meets the optimization timing, optimization processing is performed based on the configuration file so that the execution speed of the target application is optimized.
[0123] Optionally, the detailed functions and extended functions of the computer program may refer to the above description.
[0124] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0125] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.
[0126] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0127] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0128] It should be understood that in the embodiments of the present application, the various embodiments and features can be combined with each other to solve the aforementioned technical problems.
[0129] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0130] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. An information processing method, applied to a target mobile device, the method comprising: Obtaining an installation package of a target application and a configuration file corresponding to the target application, wherein the configuration file is used to mark common code snippets of the target application; wherein the target application belongs to an application whitelist, and a user usage rate of an application in the application whitelist is higher than a user usage rate of an application not in the application whitelist; Installing the target application based on the operating system and the installation package; wherein the target application includes an original configuration file; During the process of installing the target application, the original configuration file is replaced by the configuration file, so as to associate the configuration file with the target application and store the configuration file; Wherein, if the operating system meets the optimization timing, optimization processing is performed based on the configuration file, including: based on single-thread scheduling, compiling the commonly used code snippets of the target application indicated by the configuration file into an oat file, so that when the target mobile device executes the code of the target application, the oat file is executed using AOT, and the uncommon code snippets are executed in one of the following ways: The uncommon code snippet is executed in a compiled execution manner, wherein the AOT execution speed is higher than the compiled execution speed; Or, the uncommon code snippet is executed in an interpreted execution manner, and the speed of the AOT execution is higher than the speed of the interpreted execution.
2. According to the method of claim 1, the step of obtaining the installation package of the target application and the configuration file corresponding to the target application comprises: Obtaining an installation package of the target application from a network server; If the target application belongs to the application whitelist, a configuration file corresponding to the target application is obtained in the process of obtaining the installation package of the target application from the network server.
3. According to the method of claim 2, the configuration file corresponding to the target application is generated by the network server according to the target application in the application whitelist by counting usage configuration files from multiple different mobile devices; wherein, The usage profile is used to represent the commonly used code snippets of the target application program during use that are marked and accumulated by the mobile device corresponding to the usage profile.
4. According to the method of claim 3, the configuration file corresponding to the target application is determined by the network server counting the number of times each commonly used code snippet is marked using the configuration files from multiple different mobile devices, and is determined according to the number of times each commonly used code snippet is marked; wherein, The number of times each commonly used code snippet is marked in the configuration file corresponding to the target application is greater than the number of times any uncommonly used code snippet is marked in the target application.
5. The method according to any one of claims 1 to 4, further comprising: Marking and accumulating commonly used code snippets of the target application during use, and obtaining a usage configuration file corresponding to the target mobile device; If any common code snippet marked by the configuration file corresponding to the target mobile device is not in the configuration file, the configuration file is updated so that the common code snippet is added to the common code snippets marked by the configuration file.
6. The method according to claim 5, further comprising: In the case that the target application is in the application whitelist, if the target application is used in the target mobile device for a time period greater than a threshold, a usage configuration file of the target application is uploaded to a network server.
7. An information processing device, comprising: an obtaining module, used to obtain an installation package of a target application and a configuration file corresponding to the target application, wherein the configuration file is used to mark common code snippets of the target application; wherein the target application belongs to an application whitelist, and a user usage rate of an application in the application whitelist is higher than a user usage rate of an application not in the application whitelist; An installation module, used to install the target application based on the operating system and the installation package; wherein the target application includes an original configuration file; a replacement module, used to replace the original configuration file with the configuration file during the installation of the target application, so as to associate the configuration file with the target application and store it; Wherein, if the operating system meets the optimization timing, optimization processing is performed based on the configuration file, including: based on single-thread scheduling, compiling the commonly used code snippets of the target application indicated by the configuration file into an oat file, so that when the target mobile device executes the code of the target application, the oat file is executed using AOT, and the uncommon code snippets are executed in one of the following ways: The uncommon code snippet is executed in a compiled execution manner, wherein the AOT execution speed is higher than the compiled execution speed; Or, the uncommon code snippet is executed in an interpreted execution manner, and the speed of the AOT execution is higher than the speed of the interpreted execution.
8. An information processing device, comprising: Memory for storing computer programs; A processor is used to call and execute the computer program to implement each step of the information processing method according to any one of claims 1 to 6.
9. A readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps of the information processing method according to any one of claims 1 to 6 are implemented.
