Application optimization method and device

By obtaining the hotspot function statistics files of other electronic devices that match the current electronic devices, the problem of degradation of APP performance after system update is solved, and the hotspot function statistics files are quickly rebuilt or optimized, improving the user experience and APP operation efficiency.

CN119440563APending Publication Date: 2025-02-14SAMSUNG GUANGZHOU MOBILE R&D CENT +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310947584.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-28
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

After the system is updated, users have to endure the performance degradation caused by the APP running in an interpreted manner, which affects the user experience.

Method used

Quickly reconstruct or optimize the hotspot function statistics file for the current electronic device by obtaining the hotspot function statistics file for the target application of other electronic devices that match the current electronic device.

Benefits of technology

It effectively improves the user experience, reduces the time for performance degradation after system updates, and improves the operation efficiency of the APP.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119440563A_ABST
    Figure CN119440563A_ABST
Patent Text Reader

Abstract

The invention provides an application optimization method and device. The application optimization method comprises the steps that under the condition that an optimization triggering condition of a target application is met, at least one reference file is obtained, and the at least one reference file is a hotspot function statistical file of the target application of at least one matched electronic device of a target electronic device; generating a target file based on the at least one reference file; and taking the target file as a hotspot function statistical file of the target application of the target electronic equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure generally relates to the field of electronic technology, and more specifically, to an application optimization method and device. Background Art

[0002] Modern smart mobile terminals, especially those using the Android system, generally use a combination of Just-in-Time (JIT) and Ahead-of-Time (AOT) technologies to selectively compile some of the APP code, thereby greatly improving the performance of the APP. The key bridge between these technologies is the statistical file, also known as the profile in English. By tracking hot functions, the profile records the user's historical experience data. And it is these experience data that determine which functions in the APP are suitable for interpretation and execution (interpret, that is, uncompiled code that needs to be interpreted and run), which are suitable for cached compilation and execution (JIT), and which are suitable for stored compilation and execution (AOT).

[0003] The profile formed by the above experience data guides the system to screen the APP code and record it in different hot function sets (such as JIT hot function set, AOT hot function set). When the commonly used functions in the user's APP belong to the AOT hot function set, the system will compile and store them at a specific time, so that when the function is encountered during the next run, the compiled result can be loaded from the memory and run directly. This mode can greatly improve the running efficiency of the APP.

[0004] However, every time the system undergoes a major update, a large number of users will report system freezes. The reason is that the profile will be cleared after the system update, causing users to have to endure the performance degradation caused by running apps in interpreted execution mode for a long time, which seriously affects the user experience. Summary of the invention

[0005] An exemplary embodiment of the present disclosure is to provide an application optimization method and device, which can quickly rebuild a profile or optimize an existing profile to improve user experience.

[0006] According to a first aspect of an embodiment of the present disclosure, there is provided an application optimization method, comprising: obtaining at least one reference file when an optimization trigger condition of a target application is met, wherein the at least one reference file is a hotspot function statistics file of the target application of at least one matching electronic device of a target electronic device; generating a target file based on the at least one reference file; and using the target file as a hotspot function statistics file of the target application of the target electronic device.

[0007] Optionally, the step of obtaining at least one reference file includes: determining at least one matching electronic device from all associated electronic devices based on attribute information of the target application of the target electronic device and all associated electronic devices; and obtaining a hotspot function statistics file of the target application of the at least one matching electronic device.

[0008] Optionally, all associated electronic devices include electronic devices that meet at least one of the following conditions: the user is associated with the user of the target electronic device; is in the same preset type of network as the target electronic device; is no more than a preset distance threshold away from the target electronic device; and allows sharing of hotspot function statistics files of the target application.

[0009] Optionally, the step of determining the at least one matching electronic device from all associated electronic devices based on the attribute information of the target application of the target electronic device and all associated electronic devices includes: sending the attribute information of the target application of the target electronic device to all associated electronic devices, and determining the at least one matching electronic device based on the matching result between the attribute information of the target application received from each associated electronic device and the attribute information of the target application of the target electronic device; or, receiving the attribute information of the target application sent by each associated electronic device, and determining the at least one matching electronic device based on the matching result between the attribute information of the target application received and the attribute information of the target application of the target electronic device.

[0010] Optionally, the step of generating a target file based on the at least one reference file includes: when the target electronic device does not have the hotspot function statistics file of the target application and the number of the at least one matching electronic device is single, using the reference file of the single matching electronic device as the target file; when the target electronic device does not have the hotspot function statistics file of the target application and the number of the at least one matching electronic device is multiple, merging multiple reference files of multiple matching electronic devices to obtain the target file; when the target electronic device has the hotspot function statistics file of the target application, merging the contents of the at least one reference file into the original hotspot function statistics file of the target application of the target electronic device to obtain the target file.

[0011] Optionally, the step of merging multiple reference files of multiple matching electronic devices to obtain the target file includes: adding hotspot functions appearing in the multiple reference files to the target file; or, adding hotspot functions whose number of reference files appearing meets a preset condition to the target file; or, adding hotspot functions appearing in the multiple reference files to the target file, and recording the number of accesses of the hotspot function in the target file based on the number of accesses recorded in each reference file.

[0012] Optionally, the step of merging the contents of the at least one reference file into the original hotspot function statistics file of the target application of the target electronic device to obtain the target file includes: adding the hotspot functions that appear in the at least one reference file and do not appear in the original hotspot function statistics file to the original hotspot function statistics file, and using the added original hotspot function statistics file as the target file; or, adding the hotspot functions that appear in the reference files whose number meets a preset condition and do not appear in the original hotspot function statistics file to the original hotspot function statistics file, and using the added original hotspot function statistics file as the target file; or, A hotspot function that appears in the file but does not appear in the original hotspot function statistics file is added to the original hotspot function statistics file, and based on the number of accesses recorded for the hotspot function in each reference file, the number of accesses of the hotspot function is recorded in the original hotspot function statistics file, and the recorded original hotspot function statistics file is used as the target file; and / or, for a hotspot function that appears in at least one reference file and appears in the original hotspot function statistics file, based on the number of accesses recorded for the hotspot function in each reference file, the number of accesses recorded in the original hotspot function statistics file is updated, and the updated original hotspot function statistics file is used as the target file.

[0013] Optionally, the step of recording the number of accesses of the hotspot function in the target file based on the number of accesses recorded in each reference file includes: performing a weighted sum of the number of accesses recorded in each reference file of the hotspot function, and recording the number of accesses of the hotspot function in the target file as the result of the weighted summation.

[0014] Optionally, the step of recording the number of accesses of the hotspot function in the original hotspot function statistics file based on the number of accesses recorded in each reference file includes: performing a weighted summation on the number of accesses recorded in each reference file of the hotspot function, and recording the number of accesses of the hotspot function in the original hotspot function statistics file as the result of the weighted summation; and / or, the step of updating the number of accesses of the hotspot function recorded in the original hotspot function statistics file based on the number of accesses recorded in each reference file of the hotspot function includes: performing a weighted summation on the number of accesses recorded in each reference file of the hotspot function, and updating the number of accesses of the hotspot function recorded in the original hotspot function statistics file based on the result of the weighted summation.

[0015] Optionally, the optimization trigger condition of the target application includes at least one of the following items: system update of the target electronic device; system upgrade of the target electronic device; upgrade of the target application; update of the target application; optimization trigger operation of the target application by the user of the target electronic device.

[0016] According to a second aspect of an embodiment of the present disclosure, an application optimization device is provided, comprising: a reference file acquisition unit, configured to acquire at least one reference file when an optimization trigger condition of a target application is met, wherein the at least one reference file is a hotspot function statistics file of the target application of at least one matching electronic device of a target electronic device; a target file generation unit, configured to generate a target file based on the at least one reference file; and a statistics file determination unit, configured to use the target file as a hotspot function statistics file of the target application of the target electronic device.

[0017] Optionally, the reference file acquisition unit is configured to: determine at least one matching electronic device from all associated electronic devices based on the attribute information of the target application of the target electronic device and all associated electronic devices; and acquire a hotspot function statistics file of the target application of the at least one matching electronic device.

[0018] Optionally, all associated electronic devices include electronic devices that meet at least one of the following conditions: the user is associated with the user of the target electronic device; is in the same preset type of network as the target electronic device; is no more than a preset distance threshold away from the target electronic device; and allows sharing of hotspot function statistics files of the target application.

[0019] Optionally, the reference file acquisition unit is configured to: send the attribute information of the target application of the target electronic device to all the associated electronic devices, and determine the at least one matching electronic device based on the matching result of the attribute information of the target application received from each associated electronic device and the attribute information of the target application of the target electronic device; or, receive the attribute information of the target application sent by each associated electronic device, and determine the at least one matching electronic device based on the matching result of the attribute information of the target application received and the attribute information of the target application of the target electronic device.

[0020] Optionally, the target file generation unit is configured to: when the target electronic device does not have the hotspot function statistics file of the target application and the number of the at least one matching electronic device is single, use the reference file of the single matching electronic device as the target file; when the target electronic device does not have the hotspot function statistics file of the target application and the number of the at least one matching electronic device is multiple, merge multiple reference files of multiple matching electronic devices to obtain the target file; when the target electronic device has the hotspot function statistics file of the target application, merge the content of the at least one reference file into the original hotspot function statistics file of the target application of the target electronic device to obtain the target file.

[0021] Optionally, the target file generation unit is configured to: add the hotspot functions appearing in the multiple reference files to the target file; or, add the hotspot functions whose number of reference files appearing meets a preset condition to the target file; or, add the hotspot functions appearing in the multiple reference files to the target file, and based on the number of accesses recorded for the hotspot function in each reference file, record the number of accesses of the hotspot function in the target file.

[0022] Optionally, the target file generation unit is configured to: add the hotspot function that appears in the at least one reference file and does not appear in the original hotspot function statistics file to the original hotspot function statistics file, and use the added original hotspot function statistics file as the target file; or, add the hotspot function whose number of reference files meets a preset condition and does not appear in the original hotspot function statistics file to the original hotspot function statistics file, and use the added original hotspot function statistics file as the target file; or, add the hotspot function that appears in the at least one reference file and does not appear in the original hotspot function statistics file to the original hotspot function statistics file, and based on the number of accesses recorded for the hotspot function in each reference file, record the number of accesses of the hotspot function in the original hotspot function statistics file, and use the recorded original hotspot function statistics file as the target file; and / or, for the hotspot function that appears in the at least one reference file and appears in the original hotspot function statistics file, based on the number of accesses recorded for the hotspot function in each reference file, update the number of accesses of the hotspot function recorded in the original hotspot function statistics file, and use the updated original hotspot function statistics file as the target file.

[0023] Optionally, the target file generation unit is configured to: perform a weighted sum of the number of accesses to the hotspot function recorded in each reference file, and record the number of accesses to the hotspot function in the target file as a result of the weighted sum.

[0024] Optionally, the target file generation unit is configured to: perform a weighted sum of the number of accesses recorded in each reference file to the hotspot function, and record the number of accesses of the hotspot function as the result of the weighted sum in the original hotspot function statistics file; and / or, the target file generation unit is configured to: perform a weighted sum of the number of accesses recorded in each reference file to the hotspot function, and update the number of accesses of the hotspot function recorded in the original hotspot function statistics file based on the result of the weighted sum.

[0025] Optionally, the optimization trigger condition of the target application includes at least one of the following items: system update of the target electronic device; system upgrade of the target electronic device; upgrade of the target application; update of the target application; optimization trigger operation of the target application by the user of the target electronic device.

[0026] According to a third aspect of an embodiment of the present disclosure, a computer-readable storage medium storing a computer program is provided, and when the computer program is executed by a processor, the application optimization method as described above is implemented.

[0027] According to a fourth aspect of an embodiment of the present disclosure, an electronic device is provided, comprising: a processor; and a memory storing a computer program, wherein when the computer program is executed by the processor, the application optimization method as described above is implemented.

[0028] According to the application optimization method and device of the exemplary embodiments of the present disclosure, it is possible to conveniently rebuild or optimize the hotspot function statistics file of the target application of the current electronic device based on the hotspot function statistics file of the target application of other electronic devices matching the current electronic device, so as to improve the user experience.

[0029] Additional aspects and / or advantages of the present general inventive concept will be set forth in part in the following description and in part will be apparent from the description or may be learned through practice of the present general inventive concept. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] The above and other objects and features of the exemplary embodiments of the present disclosure will become more apparent through the following description in conjunction with the accompanying drawings which exemplarily illustrate the embodiments, in which:

[0031] Figure 1 A flowchart showing an application optimization method according to an exemplary embodiment of the present disclosure;

[0032] Figure 2 An example of determining a matching electronic device according to an exemplary embodiment of the present disclosure is shown;

[0033] Figure 3 An example of generating a target file according to an exemplary embodiment of the present disclosure is shown;

[0034] Figure 4 Another example of generating a target file according to an exemplary embodiment of the present disclosure is shown;

[0035] Figure 5 Another example of generating a target file according to an exemplary embodiment of the present disclosure is shown;

[0036] Figure 6 An example of an application optimization method according to an exemplary embodiment of the present disclosure is shown;

[0037] Figure 7 A structural block diagram of an application optimization device according to an exemplary embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0038] Reference will now be made in detail to the embodiments of the present disclosure, examples of which are illustrated in the accompanying drawings, wherein like reference numerals refer to like parts throughout. The embodiments will be described below with reference to the drawings in order to explain the present disclosure.

[0039] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0040] It should be noted that the phrase "at least one of the items" in the present disclosure includes three types of parallel situations: "any one of the items", "a combination of any number of the items", and "all of the items". For example, "including at least one of A and B" includes the following three parallel situations: (1) including A; (2) including B; (3) including A and B. Another example is "executing at least one of step 1 and step 2" which means the following three parallel situations: (1) executing step 1; (2) executing step 2; (3) executing step 1 and step 2.

[0041] The present disclosure takes into account: taking system upgrade as an example, after the system is upgraded, due to the modification of API and the change of function index, the profile of APP and the corresponding compilation results are all invalid, so they have to be cleared, that is, all relevant historical data are lost. This will result in the system needing to sample and count user habits again for a considerable period of time to rebuild the profile. During this adaptation period, only a very small number of functions will be recorded by the profile (others require long-term use of cumulative statistics), and most functions cannot get enough runs in a short period of time to be recorded by the profile, thus losing the opportunity to be compiled, making it impossible to load its compilation results and run directly. Although this profile clearing behavior is a necessary measure to ensure the security of the system, it also causes irreparable loss of user experience data, thereby reducing the operating efficiency of the APP.

[0042] Therefore, the exemplary embodiments of the present disclosure propose a distributed multiplexing profile method to solve the above problems. Specifically, the hot function statistics files of the target applications of other electronic devices that match the current electronic device (hereinafter, also referred to as the target electronic device) are collected, and the hot function statistics files of the target applications of the current electronic device are rebuilt or optimized based on these files. For example, when the profile of the APP on the current electronic device is lost due to system upgrades and other reasons, the profile set of the APP of the electronic device of the user group similar to the user of the current electronic device is collected and merged, so as to quickly and effectively rebuild the new profile of the APP of the current electronic device. In other words, since the user's own experience data is lost, the experience data of other users in the user environment becomes an important data source. By reusing the group experience data, the missing user experience data can be rebuilt to a certain extent. According to the exemplary embodiments of the present disclosure, not only can the profile be rebuilt or optimized conveniently and effectively, but also it has strong robustness.

[0043] According to the exemplary embodiments of the present disclosure, on the one hand, not only is the demand for a central server low, but also the specific data of the user environment is fully utilized. As long as the "user environment" is reasonably defined, the source of the profile can be flexibly controlled. For example, the simplest user environment can be defined as: a limited spatial range, that is, an environment composed of all electronic devices that are less than a certain distance in physical location. This definition can be extended to accommodate other "user environments". For example, a "shared acceleration" switch control can be provided, and all electronic devices that turn on the switch and can be accessed by the current electronic device are regarded as the "user environment" where the current electronic device is located.

[0044] On the other hand, although the user's historical experience is irreversible, "birds of a feather flock together", and users and their environment are highly correlated. For example, game players often have their own similar user circles, and short video users usually have their own similar user circles. Other similar users in the user environment often have similar usage habits, and the extremely valuable information contained in this similarity can be used to generate profiles with common characteristics.

[0045] Figure 1 A flow chart of an application optimization method according to an exemplary embodiment of the present disclosure is shown.

[0046] As an example, the application optimization method according to the exemplary embodiment of the present disclosure can be implemented by a computer program. For example, the application optimization method can be executed by an application installed in an electronic device, or by a function program implemented in an operating system of the electronic device.

[0047] As an example, the electronic device may be a mobile communication terminal (eg, a smart phone), a smart wearable device (eg, a smart watch), a personal computer, a tablet computer, a game console, a digital multimedia player, or other electronic device.

[0048] Reference Figure 1 In step S10, when the optimization trigger condition of the target application is met, at least one reference file is obtained.

[0049] The at least one reference file is a hotspot function statistics file of the target application of at least one matching electronic device of the target electronic device. The at least one reference file corresponds one-to-one with the at least one matching electronic device. The hotspot function statistics file is a Profile file, and each application in the electronic device corresponds to a hotspot function statistics file, which is used to record the call count statistics information (i.e., heat statistics information) of the hotspot function when the application is run on the electronic device.

[0050] The target electronic device is an electronic device that currently executes the application optimization method according to the exemplary embodiment of the present disclosure, and the target application is an application whose hot function statistics file is to be generated or updated.

[0051] As an example, the optimization triggering condition of the target application may include, but is not limited to, at least one of the following items: system update of the target electronic device; system upgrade of the target electronic device; target application upgrade; target application update; optimization triggering operation of the target application by the user of the target electronic device. For example, any one of the system update of the target electronic device, the system upgrade of the target electronic device, the target application upgrade, and the target application update may cause the hot function statistics file of the target application to be lost. The optimization triggering condition of the target application may also include other events that can cause the hot function statistics file of the target application to be cleared (lost). When the hot function statistics file of the target application is cleared (lost), the hot function statistics file of the target application needs to be rebuilt. In addition, when the user needs to optimize (update) the hot function statistics file of the target application (for example, the user wants to improve the operating efficiency of the APP), the optimization of the hot function statistics file of the target application can also be manually triggered.

[0052] As an example, step S10 may include: when the optimization trigger condition of the target application is met, based on the attribute information of the target application of the target electronic device and all its associated electronic devices, determining at least one matching electronic device from all associated electronic devices; and obtaining a hotspot function statistics file of the target application of the at least one matching electronic device.

[0053] As an example, all associated electronic devices may include electronic devices that meet at least one of the following conditions: the user is associated with the user of the target electronic device; is in the same preset type of network as the target electronic device; is not more than a preset distance threshold from the target electronic device; and allows the sharing of the hotspot function statistics file of the target application. For example, all associated electronic devices may include: electronic devices that are not more than a preset distance threshold from the target electronic device and allow the sharing of the hotspot function statistics file of the target application. For example, all associated electronic devices may include: electronic devices of users who allow the sharing of the hotspot function statistics file of the target application and are associated with the user of the target electronic device.

[0054] For example, users associated with the user of the target electronic device may include: users similar to the user of the target electronic device, for example, users with the same user profile / same preferences / belonging to the same user circle / same usage habits may be called similar users. For example, users similar to the user of the target electronic device may be known from the central server. In addition, when two electronic devices use the same user account, the users of the two electronic devices may also be considered to be associated.

[0055] For example, the preset type of network may include but is not limited to: wifi or bluetooth. For example, all other electronic devices in the same wifi network may be searched as associated electronic devices. For example, a bluetooth pairing object may be used as an associated electronic device.

[0056] It should be understood that all associated electronic devices may also include: other types of electronic devices that have commonalities with the target electronic device in some aspects, can support the target electronic device to reconstruct the profile file of the target application, and the reconstructed profile file can be as close as possible to the actual profile file of the target electronic device. The present disclosure does not impose any restrictions on this.

[0057] As an example, at least one matching electronic device whose attribute information of the target application matches (eg, is the same as) the attribute information of the target application of the target electronic device may be determined from among all associated electronic devices associated with the target electronic device.

[0058] In one example, the attribute information of the target application of the target electronic device can be sent to all associated electronic devices, and the at least one matching electronic device can be determined based on the matching result between the attribute information of the target application received from each associated electronic device and the attribute information of the target application of the target electronic device.

[0059] In another example, the attribute information of the target application sent by each associated electronic device may be received, and the at least one matching electronic device may be determined based on a matching result between the received attribute information of the target application and the attribute information of the target application of the target electronic device.

[0060] As an example, the attribute information of the application may include, but is not limited to, at least one of the following items: version, signature.

[0061] Reference Figure 2 , when the optimization trigger conditions of the target application are met, the current electronic device enters the profile collection mode and searches for all associated electronic devices that meet the user environment. After authentication (i.e., whether the user of the associated electronic device agrees to provide the profile file to the target electronic device) and comparison with the APP, the associated electronic device that agrees to provide the APP with the same signature and version as the target electronic device is found as the matching electronic device, and the profile file of the matching electronic device is obtained to enter the profile merging mode.

[0062] As an example, the target electronic device's own APP attribute information can be encrypted through broadcasting and then notified to all associated electronic devices. All associated electronic devices cache the broadcast results, and match the cached results with their own information after the broadcast, including APP version, signature, etc. If there is a matching electronic device, a secure channel is established with it to complete the preparations for obtaining the profile file of the matching electronic device. In addition, all associated electronic devices can be requested to feedback their own APP attribute information through broadcasting, and the target electronic device matches the feedback information with its own information. By determining the matching electronic devices, it can be ensured that profile files of APPs with inconsistent versions will not be merged, and the function indexes of profile files of different versions of APPs may be different.

[0063] In step S20, a target file is generated based on the at least one reference file.

[0064] In step S30, the target file is used as a hotspot function statistics file of the target application of the target electronic device.

[0065] In one example, when the target electronic device has a hot function statistics file of a target application (hereinafter also referred to as an original hot function statistics file), a target file is generated based on the original hot function statistics file and the at least one reference file, and the target file is used as the hot function statistics file of the target application of the target electronic device, that is, the original hot function statistics file is optimized to (i.e., updated to) the target file.

[0066] In another example, when the target electronic device does not have the hotspot function statistics file of the target application (i.e., the hotspot function statistics file of the target application is lost), a target file is generated based on the at least one reference file, and the target file is used as the hotspot function statistics file of the target application of the target electronic device, i.e., the old hotspot function statistics file is lost and a new hotspot function statistics file is rebuilt.

[0067] As an example, one or more of the preset methods may be used to select hotspot functions of the target application that meet the conditions from the at least one reference file, and obtain the target file based on the selected hotspot functions so that the target file at least includes the selected hotspot functions.

[0068] In a first embodiment, step S20 may include: when the target electronic device does not have a hotspot function statistics file of the target application and the number of the at least one matching electronic device is single, taking a reference file of the single matching electronic device as the target file.

[0069] In a second embodiment, step S20 may include: when the target electronic device does not have a hotspot function statistics file of the target application and the number of the at least one matching electronic device is multiple, merging multiple reference files of multiple matching electronic devices to obtain the target file.

[0070] As an example, the step of merging multiple reference files of multiple matching electronic devices to obtain a target file may include: adding the hotspot functions appearing in the multiple reference files to the target file. Specifically, as long as the hotspot function appears in any reference file, it is added to the target file, and the same hotspot function is not repeatedly added to the target file. In addition, based on the heat statistics information (for example, access frequency or hotspot count) recorded in the reference file of the hotspot function added to the target file, the heat statistics information of the hotspot function can be recorded in the target file.

[0071] As an example, the step of merging multiple reference files of multiple matching electronic devices to obtain a target file may include: adding hotspot functions that meet certain conditions and appear in the multiple reference files to the target file. For example, hotspot functions that appear in reference files in a number that meet a preset condition may be added to the target file. For example, the preset condition may include, but is not limited to: more than half of the total number of all reference files.

[0072] As an example, the step of merging multiple reference files of multiple matching electronic devices to obtain a target file may include: adding hot spot functions appearing in the multiple reference files to the target file, and recording the number of accesses of the hot spot function in the target file based on the number of accesses recorded in each reference file of the hot spot function.

[0073] As an example, based on the number of accesses recorded in each reference file of the hotspot function, the step of recording the number of accesses of the hotspot function in the target file may include: performing a weighted sum of the number of accesses recorded in each reference file of the hotspot function, and recording the number of accesses of the hotspot function in the target file as the result of the weighted sum. In addition, the maximum value of the number of accesses recorded in each reference file of the hotspot function may be taken, and the number of accesses of the hotspot function may be recorded as the maximum value in the target file.

[0074] In a third embodiment, step S20 may include: when the target electronic device has a hotspot function statistics file of the target application, merging the content of the at least one reference file into the original hotspot function statistics file of the target application of the target electronic device to obtain the target file.

[0075] As an example, the step of merging the contents of the at least one reference file into the original hotspot function statistics file of the target application of the target electronic device to obtain the target file may include: Method 1, adding the hotspot functions that appear in the at least one reference file and do not appear in the original hotspot function statistics file to the original hotspot function statistics file, and using the added original hotspot function statistics file as the target file. Specifically, as long as there is a hotspot function that appears in any reference file and does not appear in the original hotspot function statistics file, it will be added to the original hotspot function statistics file, and it is necessary to ensure that the hotspot functions in the original hotspot function statistics file after addition are different from each other.

[0076] Method 1 is to directly merge the at least one reference file and the original hot function statistics file to obtain a target file. As an example, method 1 is applicable to the case where the original hot function statistics file is sparse, that is, the proportion of hot functions in the original hot function statistics file to the functions of the target application is low.

[0077] like Figure 3 As shown, each grid represents a function, and the color of the grid represents the access frequency. Gray means that the function is frequently accessed, and black means that the function is not accessed or has a very low access frequency. Figure (a) shows the hot functions in the original hot function statistics file; Figure (b) shows the hot functions in each reference file; Figure (c) shows the hot functions in the target file obtained by merging the hot functions in each reference file with the hot functions in the original hot function statistics file.

[0078] As an example, the step of merging the contents of the at least one reference file into the original hotspot function statistics file of the target application of the target electronic device to obtain the target file may include: method two, adding the hotspot functions whose number of appearances in the reference files meets the preset conditions and which do not appear in the original hotspot function statistics file to the original hotspot function statistics file, and using the added original hotspot function statistics file as the target file.

[0079] As an example, the preset condition may include but is not limited to: more than half of the total number of all reference files. Method 2 is a voting method. Specifically, for each hot function that appears in the at least one reference file and does not appear in the original hot function statistical file, vote on the hot function. If the hot function appears in more than half of the reference files, the hot function is added (that is, marked) to the original hot function statistical file.

[0080] As an example, the second method is applicable to the case where the original hotspot function statistics file is relatively sparse or has no function hotspot count (ie, reaches a certain threshold and is classified into a corresponding access frequency level).

[0081] like Figure 4 As shown, each grid represents a function, and the color of the grid represents the access frequency. Gray means that the function is frequently accessed, and black means that the function is not accessed or has a very low access frequency. Figure (a) shows the hot functions in the original hot function statistics file; Figure (b) shows the hot functions in each reference file; Figure (c) shows the voting results of the total number of times the hot functions appear in reference files A and B; Figure (d) shows the hot functions that appear in more than half of the reference files; Figure (e) shows the hot functions in the target file obtained by merging the hot functions that appear in more than half of the reference files with the hot functions in the original hot function statistics file.

[0082] As an example, the step of merging the contents of the at least one reference file into the original hotspot function statistics file of the target application of the target electronic device to obtain the target file may include: method three, adding the hotspot function that appears in the at least one reference file and does not appear in the original hotspot function statistics file to the original hotspot function statistics file, and based on the number of accesses recorded for the hotspot function in each reference file, recording the number of accesses of the hotspot function in the original hotspot function statistics file, and using the recorded original hotspot function statistics file as the target file.

[0083] As an example, a weighted sum may be performed on the number of accesses to the hotspot function recorded in each reference file, and the number of accesses to the hotspot function may be recorded as the result of the weighted sum in the original hotspot function statistics file.

[0084] If the function has heat statistics, such as the number of times the function is accessed (i.e., hot spot count), for each hot spot function that appears in the at least one reference file and does not appear in the original hot spot function statistics file, a weighted sum of the number of accesses recorded in each reference file for the hot spot function can be performed, and the hot spot function and its corresponding weighted summation result can be recorded in the original hot spot function statistics file.

[0085] As an example, the step of merging the contents of the at least one reference file into the original hotspot function statistics file of the target application of the target electronic device to obtain the target file may include: Method four, for the hotspot function that appears in the at least one reference file and in the original hotspot function statistics file, based on the number of accesses recorded for the hotspot function in each reference file, the number of accesses of the hotspot function recorded in the original hotspot function statistics file is updated, and the updated original hotspot function statistics file is used as the target file.

[0086] As an example, the number of accesses to the hotspot function recorded in each reference file may be weighted and summed, and based on the result of the weighted summation, the number of accesses to the hotspot function recorded in the original hotspot function statistics file may be updated. For example, the number of accesses to the hotspot function may be updated to the sum of the original value of the number of accesses to the hotspot function (i.e., the value before this update) and the result of the weighted summation.

[0087] As an example, method 4 is applicable to the case where the original hotspot function statistical files are dense, that is, the hotspot functions in the original hotspot function statistical files account for a high proportion of the functions of the target application.

[0088] If the function has heat statistics, such as the number of times the function is accessed, for each hot function that appears in the at least one reference file and in the original hot function statistics file, a weighted sum of the number of accesses recorded in each reference file for the hot function can be performed, and the number of accesses recorded in the original hot function statistics file can be updated based on the result of the weighted sum. For example, the counting formula can be as follows:

[0089]

[0090] Among them, c func Represents the function f in the target file unc The final hotspot count (i.e., heat statistics), c user.func Indicates the function f in the original hot function statistics file unc The function hotspot count before update, w user[i] represents the weight of the i-th reference file, c user[i].func Represents the function f in the i-th reference fileunc The hotspot count.

[0091] As an example, the weights of different reference files may be the same or different. For example, all reference files may be set to have equal weights. If a certain hotspot function exists in n reference files, the weight of each reference file in the n reference files is 1 / n. In addition, the weight of each reference file may be set according to relevant information. For example, the weight of the reference file of the electronic device of the user who is closer to the user profile of the user of the target electronic device is higher.

[0092] like Figure 5 As shown, each grid represents a function, and the color of the grid represents the hotspot count. Figure (a) shows the hotspot functions in the original hotspot function statistics file; Figure (b) shows the hotspot functions in each reference file; Figure (c) shows the hotspot functions in the target file obtained by updating the access count of the hotspot functions recorded in the original hotspot function statistics file based on the result of weighted summation.

[0093] As an example, a suitable method can be selected to generate the target file according to the current situation. For example, if the target electronic device does not have a hot function statistics file of the target application, method 1 can be used to speed up profile generation. When the system has a hot function statistics file of the target application after running for a period of time, at least one of methods 2 to 4 can be used as needed.

[0094] In addition, as an example, the application optimization method according to the exemplary embodiment of the present disclosure may also include: generating the compilation results of the hotspot functions of the target application based on the target file, so that when the hotspot functions of the target application are called, the compilation results can be directly loaded to improve the operating efficiency of the application.

[0095] Figure 6An example of an application optimization method according to an exemplary embodiment of the present disclosure is shown. Taking the case of system upgrade as an example, according to an exemplary embodiment of the present disclosure, when the system upgrade is completed, the profile corresponding to at least part of the APP of the electronic device is lost. Under normal circumstances, the system will re-count the usage of the APP according to the user's usage. After 1 to 2 weeks, the statistical information of a part of the hot function can be obtained and recorded in the profile. However, according to the distributed profile synchronization method proposed in the exemplary embodiment of the present disclosure, there is no need to wait for such a long time. The electronic device can determine the matching electronic device from all associated electronic devices, and obtain a reference profile from each matching electronic device, and cache it in the current electronic device. After measures such as signature matching, if a profile with the same APP signature is found, one of the several merging methods mentioned above can be used to merge all the cached profiles corresponding to this APP to obtain a new profile (i.e., target file) that can be used to replace the lost profile to help compile. The system will quickly generate the compilation result of the hot function of the APP based on the newly generated profile. When the APP is cold-started again, you can enjoy the smoothness brought by the compilation optimization.

[0096] Figure 7 A structural block diagram of an application optimization device according to an exemplary embodiment of the present disclosure is shown.

[0097] Reference Figure 7 According to an exemplary embodiment of the present disclosure, the application optimization device includes: a reference file acquisition unit 10, a target file generation unit 20, and a statistical file determination unit 30.

[0098] Specifically, the reference file acquisition unit 10 is configured to acquire at least one reference file when an optimization trigger condition of the target application is met.

[0099] The at least one reference file is a hotspot function statistics file of the target application of at least one matching electronic device of the target electronic device;

[0100] The target file generating unit 20 is configured to generate a target file based on the at least one reference file.

[0101] The statistical file determination unit 30 is configured to use the target file as a hotspot function statistical file of the target application of the target electronic device.

[0102] As an example, the reference file acquisition unit 10 can be configured to: determine the at least one matching electronic device from all associated electronic devices based on the attribute information of the target application of the target electronic device and all its associated electronic devices; and obtain the hotspot function statistics file of the target application of the at least one matching electronic device.

[0103] As an example, all associated electronic devices may include electronic devices that meet at least one of the following conditions: the user is associated with the user of the target electronic device; is in the same preset type of network as the target electronic device; is no more than a preset distance threshold away from the target electronic device; and allows sharing of hotspot function statistics files of the target application.

[0104] As an example, the reference file acquisition unit 10 may be configured to: send the attribute information of the target application of the target electronic device to all the associated electronic devices, and determine the at least one matching electronic device based on the matching result between the attribute information of the target application received from each associated electronic device and the attribute information of the target application of the target electronic device; or, receive the attribute information of the target application sent by each associated electronic device, and determine the at least one matching electronic device based on the matching result between the attribute information of the target application received and the attribute information of the target application of the target electronic device.

[0105] As an example, the target file generation unit 20 can be configured to: when the target electronic device does not have the hotspot function statistics file of the target application and the number of the at least one matching electronic device is single, use the reference file of the single matching electronic device as the target file; when the target electronic device does not have the hotspot function statistics file of the target application and the number of the at least one matching electronic device is multiple, merge multiple reference files of multiple matching electronic devices to obtain the target file; when the target electronic device has the hotspot function statistics file of the target application, merge the content of the at least one reference file into the original hotspot function statistics file of the target application of the target electronic device to obtain the target file.

[0106] As an example, the target file generation unit 20 may be configured to: add the hotspot functions appearing in the multiple reference files to the target file; or, add the hotspot functions appearing in the reference files whose number satisfies a preset condition to the target file; or, add the hotspot functions appearing in the multiple reference files to the target file, and based on the number of accesses recorded for the hotspot function in each reference file, record the number of accesses to the hotspot function in the target file.

[0107] As an example, the target file generation unit 20 may be configured to: add a hotspot function that appears in the at least one reference file and does not appear in the original hotspot function statistics file to the original hotspot function statistics file, and use the added original hotspot function statistics file as the target file; or, add a hotspot function that appears in a number of reference files that meets a preset condition and does not appear in the original hotspot function statistics file to the original hotspot function statistics file, and use the added original hotspot function statistics file as the target file; or, add a hotspot function that appears in the at least one reference file and does not appear in the original hotspot function statistics file to the original hotspot function statistics file, and based on the number of accesses recorded for the hotspot function in each reference file, record the number of accesses of the hotspot function in the original hotspot function statistics file, and use the recorded original hotspot function statistics file as the target file; and / or, for a hotspot function that appears in the at least one reference file and appears in the original hotspot function statistics file, based on the number of accesses recorded for the hotspot function in each reference file, update the number of accesses of the hotspot function recorded in the original hotspot function statistics file, and use the updated original hotspot function statistics file as the target file.

[0108] As an example, the target file generation unit 20 may be configured to perform a weighted summation on the number of accesses to the hotspot function recorded in each reference file, and record the number of accesses to the hotspot function in the target file as the result of the weighted summation.

[0109] As an example, the target file generation unit 20 may be configured to perform a weighted summation on the number of accesses to the hotspot function recorded in each reference file, and record the number of accesses to the hotspot function as the result of the weighted summation in the original hotspot function statistics file.

[0110] As an example, the target file generation unit 20 may be configured to perform a weighted summation of the number of accesses to the hotspot function recorded in each reference file, and update the number of accesses to the hotspot function recorded in the original hotspot function statistics file based on the result of the weighted summation.

[0111] As an example, the optimization trigger condition of the target application may include at least one of the following items: system update of the target electronic device; system upgrade of the target electronic device; upgrade of the target application; update of the target application; optimization trigger operation of the target application by the user of the target electronic device.

[0112] It should be understood that the specific processing performed by the application optimization device according to the exemplary embodiment of the present disclosure has been referred to. Figures 1 to 6The details have been described in detail and will not be repeated here.

[0113] In addition, it should be understood that the various units in the application optimization device according to the exemplary embodiments of the present disclosure can be implemented as hardware components and / or software components. Those skilled in the art can implement the various units, for example, using a field programmable gate array (FPGA) or an application specific integrated circuit (ASIC), according to the processing performed by the various units defined.

[0114] According to the computer-readable storage medium of the exemplary embodiment of the present disclosure, a computer program is stored that causes the processor to perform the application optimization method as described in the above exemplary embodiment when executed by the processor. The computer-readable storage medium can be any data storage device that can store data read by the computer system. Examples of computer-readable storage media may include: read-only memory, random access memory, read-only optical disk, magnetic tape, floppy disk, optical data storage device, and carrier wave (such as data transmission through the Internet via a wired or wireless transmission path).

[0115] An electronic device according to an exemplary embodiment of the present disclosure includes: a processor (not shown) and a memory (not shown), wherein the memory stores a computer program, and when the computer program is executed by the processor, the application optimization method as described in the above exemplary embodiment is implemented.

[0116] Although some exemplary embodiments of the present disclosure have been shown and described, it will be appreciated by those skilled in the art that modifications may be made to these embodiments without departing from the principles and spirit of the present disclosure, the scope of which is defined by the claims and their equivalents.

Claims

1. An application optimization method, characterized in that: include: When the optimization trigger condition of the target application is met, obtaining at least one reference file, wherein the at least one reference file is a hotspot function statistics file of the target application of at least one matching electronic device of the target electronic device; generating a target file based on the at least one reference file; The target file is used as a hotspot function statistics file of the target application of the target electronic device.

2. The application optimization method according to claim 1, characterized in that: The step of obtaining at least one reference file comprises: Based on the attribute information of the target application of the target electronic device and all its associated electronic devices, determining the at least one matching electronic device from all the associated electronic devices; Obtain a hotspot function statistics file of the target application of the at least one matching electronic device.

3. The application optimization method according to claim 2, characterized in that: All the associated electronic devices include electronic devices that meet at least one of the following conditions: A user is associated with a user of the target electronic device; Being in the same preset type of network as the target electronic device; The distance from the target electronic device does not exceed a preset distance threshold; Allows sharing of hot function statistics files of the target application.

4. The application optimization method according to claim 2, characterized in that: The step of determining the at least one matching electronic device from all associated electronic devices based on the attribute information of the target application of the target electronic device and all associated electronic devices includes: Sending the attribute information of the target application of the target electronic device to all the associated electronic devices, and determining the at least one matching electronic device based on the matching results of the attribute information of the target application fed back by the respective associated electronic devices and the attribute information of the target application of the target electronic device; Alternatively, the attribute information of the target application sent by each associated electronic device is received, and the at least one matching electronic device is determined based on a matching result between the received attribute information of the target application and the attribute information of the target application of the target electronic device.

5. The application optimization method according to claim 1, characterized in that: The step of generating a target file based on the at least one reference file comprises: In the case that the target electronic device does not have the hotspot function statistics file of the target application and the number of the at least one matching electronic device is single, taking the reference file of the single matching electronic device as the target file; In a case where the target electronic device does not have a hotspot function statistics file of the target application and the number of the at least one matching electronic device is multiple, merging multiple reference files of multiple matching electronic devices to obtain the target file; In the case that the target electronic device has the hotspot function statistics file of the target application, the content of the at least one reference file is merged into the original hotspot function statistics file of the target application of the target electronic device to obtain the target file.

6. The application optimization method according to claim 5, characterized in that: The step of merging a plurality of reference files of a plurality of matching electronic devices to obtain the target file comprises: Adding hotspot functions appearing in the multiple reference files to the target file; Alternatively, a hotspot function whose number of reference files meets a preset condition is added to the target file; Alternatively, the hotspot functions appearing in the multiple reference files are added to the target file, and based on the access times recorded for the hotspot functions in the respective reference files, the access times for the hotspot functions are recorded in the target file.

7. The application optimization method according to claim 5, characterized in that: The step of merging the content of the at least one reference file into the original hotspot function statistics file of the target application of the target electronic device to obtain the target file comprises: Add the hotspot function that appears in the at least one reference file and does not appear in the original hotspot function statistics file to the original hotspot function statistics file, and use the added original hotspot function statistics file as the target file; Alternatively, a hotspot function whose number of reference files meets a preset condition and does not appear in the original hotspot function statistical file is added to the original hotspot function statistical file, and the added original hotspot function statistical file is used as the target file; Alternatively, a hotspot function that appears in the at least one reference file and does not appear in the original hotspot function statistics file is added to the original hotspot function statistics file, and based on the number of accesses recorded for the hotspot function in each reference file, the number of accesses of the hotspot function is recorded in the original hotspot function statistics file, and the recorded original hotspot function statistics file is used as the target file; And / or, for a hotspot function that appears in at least one reference file and in the original hotspot function statistics file, based on the number of accesses recorded in each reference file for the hotspot function, the number of accesses of the hotspot function recorded in the original hotspot function statistics file is updated, and the updated original hotspot function statistics file is used as the target file.

8. The application optimization method according to claim 6, characterized in that: The step of recording the number of accesses of the hotspot function in the target file based on the number of accesses recorded in each reference file includes: performing a weighted summation on the number of accesses recorded in each reference file of the hotspot function, and recording the number of accesses of the hotspot function in the target file as the result of the weighted summation.

9. The application optimization method according to claim 7, characterized in that: The step of recording the number of accesses of the hotspot function in the original hotspot function statistics file based on the number of accesses of the hotspot function recorded in each reference file comprises: performing a weighted summation on the number of accesses of the hotspot function recorded in each reference file, and recording the number of accesses of the hotspot function in the original hotspot function statistics file as the result of the weighted summation; And / or, the step of updating the number of accesses to the hotspot function recorded in the original hotspot function statistics file based on the number of accesses to the hotspot function recorded in each reference file includes: performing a weighted summation on the number of accesses to the hotspot function recorded in each reference file, and updating the number of accesses to the hotspot function recorded in the original hotspot function statistics file based on the result of the weighted summation.

10. The application optimization method according to claim 1, characterized in that: The optimization trigger condition of the target application includes at least one of the following items: System update of the target electronic device; System upgrade of the target electronic device; The target application is upgraded; The target application is updated; The user of the target electronic device triggers an optimization operation on the target application.

11. An application optimization device, characterized in that: include: A reference file acquisition unit is configured to acquire at least one reference file when an optimization trigger condition of a target application is met, wherein the at least one reference file is a hotspot function statistics file of the target application of at least one matching electronic device of the target electronic device; a target file generating unit, configured to generate a target file based on the at least one reference file; The statistical file determination unit is configured to use the target file as a hotspot function statistical file of the target application of the target electronic device.

12. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the application optimization method according to any one of claims 1 to 10 is implemented.

13. An electronic device, characterized in that: The electronic device comprises: processor; A memory storing a computer program, which, when executed by a processor, implements the application optimization method according to any one of claims 1 to 10.