Application compilation method and apparatus, storage medium, and electronic device
By prioritizing the basic information of the device and user during the application compilation process, and filtering target applications with dynamic compilation impact information, the problems of CPU resource blocking and storage waste are solved, and the reliability and device performance of application compilation are improved.
Patent Information
- Application Number
- PCT/CN2024/130016
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-02-05
- Filing Date
- 2024-11-05
- Publication Date
- 2025-08-14
AI Technical Summary
The existing application compilation method can easily lead to CPU resource blockage and storage resource waste when installing multiple applications in a short time, affecting device performance.
By sorting application compilation priorities based on device basic information and user basic information, and correcting it with dynamic compilation impact information, filtering out the target application, and requesting configuration files from the predetermined server for machine code compilation.
Effectively alleviates resource blocking and storage waste problems, and improves application compilation reliability and device performance.
Smart Images

Figure CN2024130016_14082025_PF_FP_ABST
Abstract
Description
Application compilation method, device, storage medium and electronic device
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on February 5, 2024, with application number 202410171792.2 and application name “Application compilation method, device, storage medium and electronic device”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of computer technology, and in particular to an application compilation method, device, storage medium, and electronic device. Background Art
[0003] When an application is compiled, there is a need to further compile the precompiled instructions (dex instructions) generated by the precompiled code into executable machine code.
[0004] Currently, there is a cloud-based configuration file compilation method (CloudProfile method) related to application compilation. In this method, compilation configuration files (Profile files) are collected while the user is using the device. When the user downloads the corresponding application on other devices, the cloud can send the application installation package and the configuration file together to the device. In this way, the user's newly installed application has a ready-made configuration file that can be used to directly complete the application compilation on the device side (profile-speed compilation). Technical issues
[0005] Under the current method, if a user installs multiple applications in a short period of time, it is easy for the CPU resources to be blocked due to a large amount of compilation. In addition, compiling unnecessary applications in the device and storing the corresponding machine code can easily cause a waste of storage resources, resulting in the current application compilation method having poor compilation reliability and affecting device performance. Technical Solutions
[0006] The embodiments of the present application provide an application compilation solution that can reliably alleviate resource blocking and storage waste problems during application compilation, improve the reliability of application compilation, and enhance device performance.
[0007] The embodiments of this application provide the following technical solutions:
[0008] According to one embodiment of the present application, an application compilation method includes: performing application compilation priority sorting according to device basic information and user basic information corresponding to the device to obtain a first compilation priority sorting; correcting the first compilation priority sorting according to dynamic compilation impact information to obtain a second compilation priority sorting; screening the applications to be compiled according to the second compilation priority sorting to obtain a target application; sending a compilation request to a predetermined server, the compilation request being used to trigger the predetermined server to send a configuration file, and the configuration file being used by the device to perform machine code compiling on the target application.
[0009] In some embodiments of the present application, the dynamic compilation impact information includes device storage information; the correction of the first compilation priority sorting according to the dynamic compilation impact information to obtain the second compilation priority sorting includes: obtaining the device storage information of the device; adjusting the compilation priority of each application in the first compilation priority sorting according to the device storage information to obtain the adjusted compilation priority sorting; and obtaining the second compilation priority sorting according to the adjusted compilation priority sorting.
[0010] In some embodiments of the present application, the dynamic compilation impact information also includes at least one of device computing resource information and user compilation setting information; the second compilation priority sorting is obtained according to the adjusted compilation priority sorting, including: obtaining the device computing resource information and at least one of the user compilation setting information corresponding to the device; according to the device computing resource information and at least one of the user compilation setting information, the adjusted compilation priority sorting is corrected to obtain the second compilation priority sorting.
[0011] In some embodiments of the present application, before performing application compilation priority sorting according to the device basic information and user basic information corresponding to the device to obtain the first compilation priority sorting, the method further includes: obtaining the regional setting information, language setting information and application installation list of the device to obtain the device basic information; obtaining the gender information, age information and occupation information corresponding to the user of the device to obtain the user basic information.
[0012] In some embodiments of the present application, before screening the applications to be compiled according to the second compilation priority sorting to obtain the target application, the method further includes: obtaining at least one of the uncompiled applications and the applications being installed in the device to obtain a candidate application set; and obtaining the application to be compiled based on the candidate application set.
[0013] In some embodiments of the present application, obtaining the application to be compiled based on the candidate application set includes one of the following methods: using an application in the candidate application set as the application to be compiled; or removing applications of a predetermined type from the applications in the candidate application set to obtain the application to be compiled.
[0014] In some embodiments of the present application, the screening of the applications to be compiled according to the second compilation priority ranking to obtain the target application includes: obtaining the compilation priority corresponding to each application to be compiled according to the second compilation priority ranking; determining the applications to be compiled corresponding to the compilation priorities within a predetermined level range or the applications to be compiled whose priority ranking is before a predetermined ranking as pre-compiled applications; and obtaining the target application based on the pre-compiled applications.
[0015] In some embodiments of the present application, obtaining the target application based on the precompiled application includes one of the following methods: using the precompiled application as the target application; and performing application screening based on the application combination relationship between the precompiled applications to obtain the target application.
[0016] In some embodiments of the present application, after sending the compilation request to the predetermined server, the method further includes: determining pre-compilation instructions corresponding to the target application according to the configuration file; and compiling the pre-compilation instructions into machine code.
[0017] According to one embodiment of the present application, an application compilation device includes: a first sorting module, used to sort the application compilation priority according to device basic information and user basic information corresponding to the device, to obtain a first compilation priority ranking; a second sorting module, used to correct the first compilation priority ranking according to dynamic compilation impact information, to obtain a second compilation priority ranking; a screening module, used to screen the to-be-compiled applications according to the second compilation priority ranking, to obtain a target application; and a request module, used to send a compilation request to a predetermined server, the compilation request being used to trigger the predetermined server to send a configuration file, the configuration file being used by the device to perform machine code compilation on the target application.
[0018] In some embodiments of the present application, the dynamic compilation impact information includes device storage information; the second sorting module is used to: obtain the device storage information of the device; adjust the compilation priority of each application in the first compilation priority sorting according to the device storage information to obtain an adjusted compilation priority sorting; and obtain the second compilation priority sorting according to the adjusted compilation priority sorting.
[0019] In some embodiments of the present application, the dynamic compilation impact information also includes at least one of device computing resource information and user compilation setting information; the second sorting module is used to: obtain at least one of the device computing resource information and user compilation setting information corresponding to the device; and correct the adjusted compilation priority sorting based on at least one of the device computing resource information and user compilation setting information to obtain the second compilation priority sorting.
[0020] In some embodiments of the present application, before performing application compilation priority sorting according to the device basic information and user basic information corresponding to the device to obtain the first compilation priority sorting, the device also includes an information acquisition module for: obtaining the regional setting information, language setting information and application installation list of the device to obtain the device basic information; obtaining the gender information, age information and occupation information corresponding to the user of the device to obtain the user basic information.
[0021] In some embodiments of the present application, before screening the applications to be compiled according to the second compilation priority sorting to obtain the target application, the device also includes an application determination module, which is used to: obtain at least one of the uncompiled applications and the applications being installed in the device to obtain a candidate application set; and obtain the application to be compiled based on the candidate application set.
[0022] In some embodiments of the present application, the application determination module is used to implement one of the following methods: using an application in the candidate application set as the application to be compiled; and removing applications of a predetermined type from the applications in the candidate application set to obtain the application to be compiled.
[0023] In some embodiments of the present application, the screening module is used to: obtain the compilation priority corresponding to each to-be-compiled application according to the second compilation priority ranking; determine the to-be-compiled applications corresponding to the compilation priority within a predetermined level range or the to-be-compiled applications whose priority ranking is before a predetermined ranking as pre-compiled applications; and obtain the target application based on the pre-compiled applications.
[0024] In some embodiments of the present application, the screening module is used to implement one of the following methods: using the precompiled application as the target application; and performing application screening according to the application combination relationship between the precompiled applications to obtain the target application.
[0025] In some embodiments of the present application, after sending the compilation request to the predetermined server, the device further includes a compilation module for: determining pre-compilation instructions corresponding to the target application according to the configuration file; and compiling the pre-compilation instructions into machine code.
[0026] According to another embodiment of the present application, a storage medium stores a computer program thereon, and when the computer program is executed by a processor of a computer, the computer is caused to execute the method described in the embodiment of the present application.
[0027] According to another embodiment of the present application, an electronic device may include: a memory storing a computer program; and a processor reading the computer program stored in the memory to execute the method described in the embodiment of the present application.
[0028] According to another embodiment of the present application, a computer program product or computer program includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in various optional implementations described in the embodiments of the present application. Beneficial effects
[0029] In an embodiment of the present application, application compilation priority is sorted according to device basic information and user basic information corresponding to the device to obtain a first compilation priority sorting; the first compilation priority sorting is corrected according to dynamic compilation impact information to obtain a second compilation priority sorting; the applications to be compiled are screened according to the second compilation priority sorting to obtain a target application; and a compilation request is sent to a predetermined server, the compilation request being used to trigger the predetermined server to send a configuration file, and the configuration file is used by the device to perform machine code compiling on the target application.
[0030] In this way, the application compilation priority is sorted according to the device basic information and user basic information corresponding to the device to obtain a first compilation priority sorting, and the first compilation priority sorting is corrected by dynamically compiling the impact information to obtain a second compilation priority sorting. Then, according to the second compilation priority sorting, the target application that meets the actual compilation requirements can be reliably screened out from the applications to be compiled, and then the corresponding configuration file is requested from the predetermined server, so that the machine code can be reliably compiled, reducing the CPU resource congestion caused by a large number of compilations when installing multiple applications in a short period of time, and reducing the waste of storage resources caused by unnecessary compiled applications in the device. Overall, it can reliably alleviate the resource congestion and storage waste problems during application compilation, improve the reliability of application compilation, and improve device performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0032] FIG1 shows a flowchart of an application compilation method according to an embodiment of the present application.
[0033] FIG2 shows a flowchart of application compilation priority sorting according to an embodiment of the present application.
[0034] FIG3 shows a flowchart of application compilation according to an embodiment of the present application.
[0035] FIG4 shows a block diagram of an application compiling device according to an embodiment of the present application.
[0036] FIG5 shows a block diagram of an electronic device according to an embodiment of the present application.
[0037] Implementation Methods of the Application
[0038] The present disclosure will be further described in detail below in conjunction with the accompanying drawings and examples. It should be understood that the examples provided herein are merely for explaining the present disclosure and are not intended to limit the present disclosure. In addition, the examples provided below are partial examples for implementing the present disclosure, rather than providing all examples for implementing the present disclosure. In the absence of conflict, the technical solutions described in the examples of the present disclosure may be implemented in any combination.
[0039] It should be noted that, in the embodiments of the present disclosure, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a method or apparatus comprising a series of elements includes not only the elements explicitly stated, but also other elements not explicitly listed, or also includes elements inherent to the implementation of the method or apparatus. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other related elements (such as steps in the method or units in the apparatus, for example, a unit may be part of a circuit, part of a processor, part of a program or software, etc.) in the method or apparatus comprising the element.
[0040] For example, the application compilation method provided by the embodiment of the present disclosure includes a series of steps, but the application compilation method provided by the embodiment of the present disclosure is not limited to the recorded steps. Similarly, the application compilation device provided by the embodiment of the present disclosure includes a series of units, but the device provided by the embodiment of the present disclosure is not limited to including the units explicitly recorded, and can also include units that need to be set up to obtain relevant information or perform processing based on the information.
[0041] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which the present disclosure pertains. The terms used herein are for the purpose of describing specific embodiments only and are not intended to limit the present disclosure.
[0042] Figure 1 schematically shows a flow chart of an application compilation method according to an embodiment of the present application. The execution subject of the application compilation method can be any device with processing capabilities, such as a TV, computer, mobile phone, smart watch, and home appliance.
[0043] In one embodiment of the present application, the device serving as the execution subject is specifically a television (TV). Since most televisions (TVs) have limited storage and computing resources, the embodiments of the present application can effectively improve the application compilation reliability of the television (TV) and improve the performance of the TV.
[0044] As shown in FIG. 1 , the application compiling method may include steps S110 to S140 .
[0045] Step S110, sorting the application compilation priority according to the device basic information and user basic information corresponding to the device to obtain a first compilation priority sorting; step S120, correcting the first compilation priority sorting according to the dynamic compilation impact information to obtain a second compilation priority sorting; step S130, screening the applications to be compiled according to the second compilation priority sorting to obtain a target application; step S140, sending a compilation request to a predetermined server, the compilation request is used to trigger the predetermined server to send a configuration file, and the configuration file is used by the device to compile the machine code of the target application.
[0046] For a device, corresponding device basic information and user basic information can be obtained. The device basic information is the device-related information specified as the basis for priority sorting, and the user basic information is the user-related information specified as the basis for priority sorting.
[0047] Device basic information and user basic information are usually relatively stable and change less frequently. Therefore, the compilation priority of applications in the target application set (such as applications in the application store) can be sorted in advance or in real time based on the device basic information and user basic information corresponding to the device to obtain a first compilation priority sorting.
[0048] The applications in the target application set (e.g., applications in an app store) are sorted by compilation priority. Specifically, the compilation priority ranking may be performed by sorting by application type and then by subdividing the application type into subdivisions to obtain a first compilation priority ranking. For example, the first compilation priority ranking may be "game type (application A > application B) > social communication (application C > application D) and so on."
[0049] Furthermore, by obtaining dynamic compilation impact information (ie, information that changes dynamically and has an impact on application compilation), the first compilation priority ranking is modified according to the dynamic compilation impact information, and dynamic modification can be performed in real time to obtain a second compilation priority ranking.
[0050] The applications to be compiled are screened according to the second compilation priority sorting to obtain a target application; a compilation request is sent to a predetermined server, and the compilation request can trigger the predetermined server to send a configuration file corresponding to the target application, and the configuration file can be used by the device to compile the machine code of the target application.
[0051] In this way, based on steps S110 to S140, the application compilation priority is sorted according to the device basic information and user basic information corresponding to the device to obtain a first compilation priority sorting, and the first compilation priority sorting is corrected by dynamically compiling the impact information to obtain a second compilation priority sorting. Then, according to the second compilation priority sorting, the target application that meets the actual compilation requirements can be reliably screened out from the applications to be compiled, and then the corresponding configuration file is requested from the predetermined server, so that the machine code can be reliably compiled, reducing the CPU resource congestion caused by a large number of compilations when installing multiple applications in a short period of time, and reducing the waste of storage resources caused by unnecessary compiled applications in the device. Overall, it can reliably alleviate the resource congestion and storage waste problems during application compilation, improve the reliability of application compilation, and improve device performance.
[0052] The following describes further optional specific embodiments of each step performed when the application is compiled under the embodiment of Figure 1.
[0053] In one embodiment, before performing application compilation priority sorting based on the device basic information and user basic information corresponding to the device to obtain the first compilation priority sorting, the method further includes: obtaining the device's regional setting information, language setting information, and application installation list to obtain the device basic information; obtaining the gender information, age information, and occupation information corresponding to the user using the device to obtain the user basic information.
[0054] By collecting the device's regional settings information, language settings information, and application installation list as device basic information, and collecting the device user's corresponding gender information, age information, and occupation information as user basic information, this information is generally stable and can reflect the basic situation of the device and user. Based on this information, application compilation priority can be reliably sorted in advance.
[0055] The locale information may specifically be the region where the device is located, the language setting information may specifically be the language type used by the device, and the application installation list may specifically be a list of applications installed on the device. This information can be obtained directly from the device. Gender, age, and occupation information can be obtained through user input and identified based on information in the device.
[0056] In some embodiments, referring to Figure 2, the dynamic compilation impact information includes device storage information; the first compilation priority sorting is corrected according to the dynamic compilation impact information to obtain the second compilation priority sorting, including: step S210, obtaining the device storage information of the device; adjusting the compilation priority of each application in the first compilation priority sorting according to the device storage information to obtain the adjusted compilation priority sorting; step S220, obtaining the second compilation priority sorting according to the adjusted compilation priority sorting.
[0057] The device storage information may include information such as the current storage usage of the device and / or the maximum storage usage set by the user for application compilation. The compilation priority of each application in the first compilation priority ranking is adjusted based on the device storage information to obtain an adjusted compilation priority ranking; and the second compilation priority ranking is obtained based on the adjusted compilation priority ranking.
[0058] Furthermore, based on the second compilation priority ranking obtained in this embodiment, application compilation can further meet the storage usage requirements of the device, further improving the reliability of application compilation.
[0059] In some embodiments, the dynamic compilation impact information also includes at least one of device computing resource information, application usage data in the device, and user compilation setting information; the second compilation priority sorting is obtained based on the adjusted compilation priority sorting, including: obtaining the device computing resource information, application usage data in the device, and at least one of the user compilation setting information corresponding to the device; based on the device computing resource information and at least one of the user compilation setting information, the adjusted compilation priority sorting is corrected to obtain the second compilation priority sorting.
[0060] Device computing resource information refers to information related to computing resources within the device. Specifically, device computing resource information may include information such as the device's CPU resource usage. User compilation setting information refers to application editing information set by the user based on their needs. User compilation setting information may include information such as the user-set application editing priority and application importance. Device application usage data refers to application usage data such as the number of times and duration of application usage within the device. Specifically, device application usage data may include application usage data within a predetermined time period prior to the current moment. The predetermined time period may be set based on actual circumstances.
[0061] In this embodiment, at least one of the device computing resource information corresponding to the device, the application usage data in the device, and the user compilation setting information is obtained; based on the device computing resource information and at least one of the user compilation setting information, the adjusted compilation priority ranking is corrected to obtain a second compilation priority ranking.
[0062] The second compilation priority ranking obtained based on this embodiment can make application compilation further conform to the computing resources in the device and user settings, and further improve the reliability of application compilation.
[0063] It can be understood that in other embodiments, obtaining the second compilation priority ranking according to the adjusted compilation priority ranking may include: using the adjusted compilation priority ranking as the obtained second compilation priority ranking.
[0064] In some embodiments, before screening the applications to be compiled according to the second compilation priority sorting to obtain the target application, the method further includes: obtaining at least one of the uncompiled applications and the applications being installed in the device to obtain a candidate application set; and obtaining the application to be compiled based on the candidate application set.
[0065] Obtain at least one of the uncompiled applications in the device (i.e., applications that have been installed but not compiled according to the application compilation method of this application) and the applications being installed (i.e., applications that are being downloaded and installed in real time in the device) to form a candidate application set, and obtain the application to be compiled from the candidate application set. Then, the application to be compiled is the application that has not been compiled in the device, avoiding the compilation of unnecessary applications.
[0066] In some embodiments, obtaining the application to be compiled based on the candidate application set includes one of the following methods:
[0067] The first method is to use an application in the candidate application set as the application to be compiled;
[0068] The second method is to remove applications of a predetermined type from the candidate application set to obtain the application to be compiled.
[0069] In the first method, applications in the candidate application set are directly used as applications to be compiled, that is, at least one of the uncompiled applications in the device and the applications being installed is directly used as the application to be compiled, and in subsequent steps, the target application that needs to be compiled is screened out from the applications to be compiled.
[0070] In the second method, applications of a predetermined type are removed from the candidate application set, and the remaining applications are used as the applications to be compiled. In subsequent steps, the target application that ultimately needs to be compiled is screened from the applications to be compiled, which can further avoid unreliable application compilation.
[0071] The predetermined type of applications can be specifically determined based on the user basic information. Corresponding predetermined types of applications can be pre-specified for different user basic information. Thus, the corresponding predetermined types of applications can be determined based on the current user basic information and eliminated.
[0072] In some embodiments, the screening of the applications to be compiled according to the second compilation priority ranking to obtain the target application includes: obtaining the compilation priority corresponding to each application to be compiled according to the second compilation priority ranking; determining the applications to be compiled corresponding to the compilation priorities within a predetermined level range or the applications to be compiled whose priority ranking is before a predetermined ranking as precompiled applications; and obtaining the target application based on the precompiled applications.
[0073] The compilation priority corresponding to each to-be-compiled application can be obtained from the second compilation priority ranking, and the to-be-compiled applications corresponding to the compilation priorities within a predetermined level range or the to-be-compiled applications whose priority ranking is higher than the predetermined ranking can be determined as pre-compiled applications. The predetermined level range and the predetermined ranking can be set according to actual circumstances.
[0074] Furthermore, a target application can be obtained based on the precompiled application, and compiled for the target application to ensure the reliability of application compilation in the device.
[0075] The obtaining of the target application based on the precompiled application may specifically include one of the following methods: first, using the precompiled application as the target application; second, performing application screening based on the application combination relationship between the precompiled applications to obtain the target application.
[0076] In the first approach, precompiled applications are used as target applications, that is, all precompiled applications are directly determined as target applications, which can ensure the reliability of application compilation.
[0077] In the second method, applications are screened based on the application combination relationship between pre-compiled applications to obtain target applications, thereby further improving the reliability of application compilation.
[0078] Among them, different application combination relationships can be set in advance, each application combination relationship includes multiple applications, and then, the application combination relationship to which each precompiled application belongs can be determined, so that all precompiled applications are divided into multiple groups of application combinations, and further, the precompiled applications in one or more groups of application combinations with the largest number of applications can be used as target applications.
[0079] In some embodiments, referring to FIG3 , after sending the compilation request to the predetermined server, the method further includes: step S310 , determining precompilation instructions corresponding to the target application according to the configuration file; and step S320 , compiling the precompilation instructions into machine code.
[0080] The precompiled instructions corresponding to the target application specifically refer to the dex instructions obtained after the code is preliminarily compiled. However, dex execution is not truly executable machine code. Therefore, in the current related technologies, during the application running process, the virtual machine needs to read the dex instructions first, and then the virtual machine calls the function corresponding to the dex instructions in advance in C++ / assembly and compiled into machine code according to the content of the dex instructions. This running mode of reading the dex instructions while the virtual machine calls the corresponding function for execution is also called interpreted running.
[0081] In the embodiment of the present application, the pre-compiled instructions (dex instructions) corresponding to the target application can be determined according to the configuration file, and the pre-compiled instructions can be compiled into machine code. Therefore, when the application is running, it no longer needs to be executed by a virtual machine in the form of function calls as in the related art, but can be run directly in machine code, thereby improving application operation efficiency and user experience.
[0082] To facilitate better implementation of the application compilation method provided in the embodiments of this application, the embodiments of this application also provide an application compilation device based on the aforementioned application compilation method. The meanings of the terms herein are the same as those in the aforementioned application compilation method. For specific implementation details, please refer to the description in the method embodiments. Figure 4 shows a block diagram of the application compilation device according to one embodiment of the present application.
[0083] As shown in Figure 4, the application compilation device 400 may include: a first sorting module 410 can be used to sort the application compilation priority according to the device basic information and user basic information corresponding to the device, and obtain a first compilation priority ranking; a second sorting module 420 can be used to correct the first compilation priority ranking according to dynamic compilation impact information, and obtain a second compilation priority ranking; a screening module 430 can be used to screen the to-be-compiled applications according to the second compilation priority ranking, and obtain a target application; a request module 440 can be used to send a compilation request to a predetermined server, and the compilation request is used to trigger the predetermined server to send a configuration file, and the configuration file is used by the device to perform machine code compilation on the target application.
[0084] In some embodiments of the present application, the dynamic compilation impact information includes device storage information; the second sorting module is used to: obtain the device storage information of the device; adjust the compilation priority of each application in the first compilation priority sorting according to the device storage information to obtain an adjusted compilation priority sorting; and obtain the second compilation priority sorting according to the adjusted compilation priority sorting.
[0085] In some embodiments of the present application, the dynamic compilation impact information also includes at least one of device computing resource information and user compilation setting information; the second sorting module is used to: obtain at least one of the device computing resource information and user compilation setting information corresponding to the device; and correct the adjusted compilation priority sorting based on at least one of the device computing resource information and user compilation setting information to obtain the second compilation priority sorting.
[0086] In some embodiments of the present application, before performing application compilation priority sorting according to the device basic information and user basic information corresponding to the device to obtain the first compilation priority sorting, the device also includes an information acquisition module for: obtaining the regional setting information, language setting information and application installation list of the device to obtain the device basic information; obtaining the gender information, age information and occupation information corresponding to the user of the device to obtain the user basic information.
[0087] In some embodiments of the present application, before screening the applications to be compiled according to the second compilation priority sorting to obtain the target application, the device also includes an application determination module, which is used to: obtain at least one of the uncompiled applications and the applications being installed in the device to obtain a candidate application set; and obtain the application to be compiled based on the candidate application set.
[0088] In some embodiments of the present application, the application determination module is used to implement one of the following methods: using an application in the candidate application set as the application to be compiled; and removing applications of a predetermined type from the applications in the candidate application set to obtain the application to be compiled.
[0089] In some embodiments of the present application, the screening module is used to: obtain the compilation priority corresponding to each to-be-compiled application according to the second compilation priority ranking; determine the to-be-compiled applications corresponding to the compilation priority within a predetermined level range or the to-be-compiled applications whose priority ranking is before a predetermined ranking as pre-compiled applications; and obtain the target application based on the pre-compiled applications.
[0090] In some embodiments of the present application, the screening module is used to implement one of the following methods: using the precompiled application as the target application; and performing application screening according to the application combination relationship between the precompiled applications to obtain the target application.
[0091] In some embodiments of the present application, after sending the compilation request to the predetermined server, the device further includes a compilation module for: determining pre-compilation instructions corresponding to the target application according to the configuration file; and compiling the pre-compilation instructions into machine code.
[0092] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiment of the application, the features and functions of two or more modules or units described above can be concretized in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be concretized.
[0093] In addition, an embodiment of the present application further provides an electronic device, as shown in FIG5 . FIG5 shows a block diagram of an electronic device according to an embodiment of the present application. Specifically:
[0094] The electronic device may include components such as a processor 501 with one or more processing cores, a memory 502 with one or more computer-readable storage media, a power supply 503, and an input unit 504. Those skilled in the art will appreciate that the electronic device structure shown in FIG5 does not limit the electronic device and may include more or fewer components than shown, or combine certain components, or arrange the components differently.
[0095] Processor 501 is the control center of the electronic device. It utilizes various interfaces and circuits to connect the various components of the entire computer device. By running or executing software programs and / or modules stored in memory 502 and accessing data stored in memory 502, it performs various computer device functions and processes data, thereby providing overall monitoring of the electronic device. Optionally, processor 501 may include one or more processing cores; preferably, processor 501 may integrate an application processor and a modem processor, wherein the application processor primarily processes the operating system, user interfaces, and application programs, while the modem processor primarily handles wireless communications. It is understood that the modem processor may not be integrated into processor 501.
[0096] The memory 502 can be used to store software programs and modules. The processor 501 executes various functional applications and data processing by running the software programs and modules stored in the memory 502. The memory 502 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, at least one application required for a function (such as a sound playback function, an image playback function, etc.); the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 502 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage device. Accordingly, the memory 502 may also include a memory controller to provide the processor 501 with access to the memory 502.
[0097] The electronic device also includes a power supply 503 for supplying power to various components. Preferably, the power supply 503 can be logically connected to the processor 501 via a power management system, thereby enabling the power management system to manage charging, discharging, and power consumption. The power supply 503 can also include one or more DC or AC power supplies, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and other arbitrary components.
[0098] The electronic device may further include an input unit 504, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
[0099] Although not shown, the electronic device may further include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 501 in the electronic device will load the executable files corresponding to one or more computer program processes into the memory 502 according to the following instructions, and the processor 501 will run the computer program stored in the memory 502, thereby realizing the various functions of the aforementioned embodiments of the present application. For example, the processor 501 may perform the following steps:
[0100] The application compilation priority is sorted according to the device basic information and user basic information corresponding to the device to obtain a first compilation priority sorting; the first compilation priority sorting is modified according to the dynamic compilation impact information to obtain a second compilation priority sorting; the applications to be compiled are screened according to the second compilation priority sorting to obtain a target application; and a compilation request is sent to a predetermined server, where the compilation request is used to trigger the predetermined server to send a configuration file, and the configuration file is used by the device to compile the machine code of the target application.
[0101] In some embodiments of the present application, the dynamic compilation impact information includes device storage information; the correction of the first compilation priority sorting according to the dynamic compilation impact information to obtain the second compilation priority sorting includes: obtaining the device storage information of the device; adjusting the compilation priority of each application in the first compilation priority sorting according to the device storage information to obtain the adjusted compilation priority sorting; and obtaining the second compilation priority sorting according to the adjusted compilation priority sorting.
[0102] In some embodiments of the present application, the dynamic compilation impact information also includes at least one of device computing resource information and user compilation setting information; the second compilation priority sorting is obtained according to the adjusted compilation priority sorting, including: obtaining the device computing resource information and at least one of the user compilation setting information corresponding to the device; according to the device computing resource information and at least one of the user compilation setting information, the adjusted compilation priority sorting is corrected to obtain the second compilation priority sorting.
[0103] In some embodiments of the present application, before performing application compilation priority sorting according to the device basic information and user basic information corresponding to the device to obtain the first compilation priority sorting, it also includes: obtaining the regional setting information, language setting information and application installation list of the device to obtain the device basic information; obtaining the gender information, age information and occupation information corresponding to the user of the device to obtain the user basic information.
[0104] In some embodiments of the present application, before screening the applications to be compiled according to the second compilation priority sorting to obtain the target application, the method further includes: obtaining at least one of the uncompiled applications and the applications being installed in the device to obtain a candidate application set; and obtaining the application to be compiled based on the candidate application set.
[0105] In some embodiments of the present application, obtaining the application to be compiled based on the candidate application set includes one of the following methods: using an application in the candidate application set as the application to be compiled; or removing applications of a predetermined type from the applications in the candidate application set to obtain the application to be compiled.
[0106] In some embodiments of the present application, the screening of the applications to be compiled according to the second compilation priority ranking to obtain the target application includes: obtaining the compilation priority corresponding to each application to be compiled according to the second compilation priority ranking; determining the applications to be compiled corresponding to the compilation priorities within a predetermined level range or the applications to be compiled whose priority ranking is before a predetermined ranking as pre-compiled applications; and obtaining the target application based on the pre-compiled applications.
[0107] In some embodiments of the present application, obtaining the target application based on the precompiled application includes one of the following methods: using the precompiled application as the target application; and performing application screening based on the application combination relationship between the precompiled applications to obtain the target application.
[0108] In some embodiments of the present application, after sending the compilation request to the predetermined server, the method further includes: determining pre-compilation instructions corresponding to the target application according to the configuration file; and compiling the pre-compilation instructions into machine code.
[0109] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be accomplished by a computer program, or by controlling related hardware through a computer program. The computer program may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0110] To this end, an embodiment of the present application further provides a storage medium storing a computer program, which can be loaded by a processor to execute the steps of any method provided in the embodiment of the present application.
[0111] The storage medium may be a computer-readable storage medium, and the storage medium may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0112] Since the computer program stored in the storage medium can execute the steps of any method provided in the embodiments of the present application, the beneficial effects that can be achieved by the method provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.
[0113] Those skilled in the art will readily conceive of other embodiments of the present application after considering the specification and practicing the embodiments disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present application that follow the general principles of this application and include common knowledge or customary techniques in the art that are not disclosed herein.
[0114] It should be understood that the present application is not limited to the embodiments that have been described above and shown in the accompanying drawings, but various modifications and changes may be made without departing from the scope thereof.
Claims
1. A method for compiling an application, wherein: include: Sort the application compilation priorities according to the device basic information and user basic information corresponding to the device to obtain a first compilation priority ranking; Modifying the first compilation priority ranking according to the dynamic compilation impact information to obtain a second compilation priority ranking; Filtering the applications to be compiled according to the second compilation priority ranking to obtain a target application; A compilation request is sent to a predetermined server, where the compilation request is used to trigger the predetermined server to send a configuration file, where the configuration file is used by the device to perform machine code compilation on the target application.
2. The method according to claim 1, wherein The dynamic compilation impact information includes device storage information; and the modifying the first compilation priority ranking according to the dynamic compilation impact information to obtain a second compilation priority ranking includes: Obtaining device storage information of the device; Adjusting the compilation priority of each application in the first compilation priority ranking according to the device storage information to obtain an adjusted compilation priority ranking; The second compilation priority ranking is obtained according to the adjusted compilation priority ranking.
3. The method according to claim 2, wherein: The dynamic compilation impact information further includes at least one of device computing resource information and user compilation setting information; and obtaining the second compilation priority ranking according to the adjusted compilation priority ranking includes: Obtaining at least one of the device computing resource information and the user compilation setting information corresponding to the device; The adjusted compilation priority ranking is modified according to at least one of the device computing resource information, the application usage data in the device, and the user compilation setting information to obtain the second compilation priority ranking.
4. The method according to claim 1, wherein Before performing application compilation priority sorting according to the device basic information and user basic information corresponding to the device to obtain the first compilation priority sorting, the method further includes: Obtaining the device's regional setting information, language setting information, and application installation list to obtain basic device information; Obtain the gender information, age information and occupation information corresponding to the user of the device to obtain the user basic information.
5. The method according to claim 1, wherein Before screening the applications to be compiled according to the second compilation priority sorting to obtain the target application, the method further includes: Obtaining at least one of an uncompiled application and an application being installed in the device to obtain a candidate application set; The application to be compiled is obtained according to the candidate application set.
6. The method according to claim 5, wherein: Obtaining the application to be compiled according to the candidate application set includes one of the following methods: Selecting an application from the candidate application set as the application to be compiled; Eliminate applications of a predetermined type from the applications in the candidate application set to obtain the application to be compiled.
7. The method according to claim 1, wherein The filtering of the applications to be compiled according to the second compilation priority sorting to obtain the target application includes: Obtaining a compilation priority corresponding to each to-be-compiled application according to the second compilation priority sorting; Determine as precompiled applications the applications to be compiled corresponding to the compilation priority within the predetermined level range or the applications to be compiled whose priority is ranked before the predetermined ranking; The target application is obtained according to the precompiled application.
8. The method according to claim 7, wherein: Obtaining the target application according to the precompiled application includes one of the following methods: Using the precompiled application as the target application; Application screening is performed according to the application combination relationship between the precompiled applications to obtain the target application.
9. The method according to claim 1, wherein After sending the compilation request to the predetermined server, the method further includes: Determining the pre-compiled instructions corresponding to the target application according to the configuration file; Compile the precompiled instructions into machine code.
10. The method according to claim 2, wherein: Obtaining the second compilation priority ranking according to the adjusted compilation priority ranking includes: using the adjusted compilation priority ranking as the obtained second compilation priority ranking.
11. The method according to claim 2, wherein: The acquiring device storage information of the device includes: acquiring a current storage usage of the device and / or a maximum storage occupancy used by application compilation set by a user as the device storage information.
12. The method according to claim 6, wherein: Eliminating applications of a predetermined type from the candidate application set to obtain the application to be compiled includes: Obtain basic user information; Determining a reservation type corresponding to the user basic information; Eliminate applications of the predetermined type from the applications in the candidate application set to obtain the application to be compiled.
13. An application compilation device, wherein: include: A first sorting module is configured to sort the application compilation priorities according to the basic device information and user basic information corresponding to the device, to obtain a first compilation priority sorting; a second sorting module, configured to modify the first compilation priority sorting according to the dynamic compilation impact information to obtain a second compilation priority sorting; A screening module, configured to screen the applications to be compiled according to the second compilation priority sorting to obtain a target application; The request module is used to send a compilation request to a predetermined server, wherein the compilation request is used to trigger the predetermined server to send a configuration file, and the configuration file is used by the device to perform machine code compilation on the target application.
14. The device according to claim 13, wherein The dynamic compilation impact information includes device storage information; the second sorting module is used to: obtain the device storage information of the device; adjust the compilation priority of each application in the first compilation priority sorting according to the device storage information to obtain the adjusted compilation priority sorting; and obtain the second compilation priority sorting according to the adjusted compilation priority sorting.
15. The device according to claim 14, wherein The dynamic compilation impact information also includes at least one of device computing resource information and user compilation setting information; the second sorting module is used to: obtain at least one of the device computing resource information and user compilation setting information corresponding to the device; according to at least one of the device computing resource information and user compilation setting information, correct the adjusted compilation priority sorting to obtain the second compilation priority sorting.
16. The device according to claim 13, wherein Before performing application compilation priority sorting according to the device basic information and user basic information corresponding to the device to obtain the first compilation priority sorting, the device also includes an information acquisition module, which is used to: obtain the regional setting information, language setting information and application installation list of the device to obtain the device basic information; obtain the gender information, age information and occupation information corresponding to the user of the device to obtain the user basic information.
17. The device according to claim 13, wherein Before screening the applications to be compiled according to the second compilation priority sorting to obtain a target application, the apparatus further includes an application determination module configured to: obtain at least one of uncompiled applications and applications being installed in the device to obtain a candidate application set; and obtain the application to be compiled based on the candidate application set.
18. The device according to claim 17, wherein The application determination module is configured to implement one of the following methods: using an application in the candidate application set as the application to be compiled; and removing applications of a predetermined type from the applications in the candidate application set to obtain the application to be compiled.
19. A storage medium, wherein: A computer program is stored thereon, which, when executed by a processor of a computer, causes the computer to execute the method according to any one of claims 1 to 12.
20. An electronic device, wherein: include: a memory storing a computer program; A processor reads a computer program stored in a memory to execute the method according to any one of claims 1 to 12.
Citation Information
Patent Citations
Compiling optimization method and device, storage medium, intelligent terminal and server
CN109960507A
Configuration file pushing method and device, server and storage medium
CN112948012A
Compilation optimization method, electronic equipment and storage medium
CN116521180A
Method and device for compiling application program
CN117130617A
Application compiling method and device, storage medium and electronic equipment
CN117992064A