Application control method, device and electronic device

By obtaining and installing the application package from the program download platform on an electronic device, and detecting the application interface status and preloading after installation, the problem of slow application startup is solved, and faster application startup is achieved.

CN119781782APending Publication Date: 2025-04-08GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311290576.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-07
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

The startup speed of applications in existing electronic devices is slow, making it difficult to meet users' needs for quickly starting applications.

Method used

An application control method is proposed, which is to obtain the package of the target application from the program download platform for installation, and preload the target application when the installation is completed and the application interface of the program download platform is displayed.

Benefits of technology

Through preloading technology, the startup speed of the application is significantly improved, allowing electronic devices to start up more quickly when they need to start the target application.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119781782A_ABST
    Figure CN119781782A_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses an application control method, device and electronic device. The method includes: in response to obtaining a program package of a target application from a program download platform, installing the program package; if the installation of the program package is completed and the application interface corresponding to the program download platform is in a display state, preloading the target application. Thus, through the above method, after the program package is completed from the program download platform, the program package can be directly installed, and after the installation is completed, it will further detect whether the application interface of the program download platform is still in a display state, and then when the application interface of the program download platform is in a display state, the target application is preloaded in advance, so that when the electronic device needs to start the target application, it can complete the startup of the target application more quickly.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] In electronic devices, specific functions can usually be realized through the applications installed therein. Moreover, with the development of technology, the types of applications installed in electronic devices are increasing. However, the startup speed of related applications needs to be improved. Summary of the invention

[0003] In view of the above problems, the present application proposes an application control method, device and electronic device to improve the above problems.

[0004] In a first aspect, the present application provides an application control method, which is applied to an electronic device, and the method comprises: in response to obtaining a program package of a target application from a program download platform, installing the program package; if the installation of the program package is completed and the application interface corresponding to the program download platform is in a display state, preloading the target application.

[0005] In a second aspect, the present application provides an application control device that runs on an electronic device, the device comprising: a program installation unit for installing a program package in response to obtaining a program package of a target application from a program download platform; a program preloading unit for preloading the target application if the installation of the program package is completed and the application interface corresponding to the program download platform is in a display state.

[0006] In a third aspect, the present application provides an electronic device comprising one or more processors and a memory; one or more programs are stored in the memory and configured to be executed by the one or more processors to implement the above method.

[0007] In a fourth aspect, the present application provides a computer-readable storage medium, in which program code is stored, wherein the above method is executed when the program code is executed by a processor.

[0008] The present application provides an application control method, device and electronic device, which, in response to obtaining a program package of a target application from a program download platform, installs the program package, and if the installation of the program package is completed and the application interface corresponding to the program download platform is in a display state, preloads the target application. Thus, through the above-mentioned method, after the program package is completed from the program download platform, the program package can be directly installed, and after the installation is completed, it will further detect whether the application interface of the program download platform is still in a display state, and then, when the application interface of the program download platform is in a display state, the target application is preloaded in advance, so that when the electronic device needs to start the target application, it can complete the startup of the target application more quickly. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. 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.

[0010] Figure 1 A schematic diagram showing an application scenario of an application control method proposed in an embodiment of the present application;

[0011] Figure 2 A schematic diagram showing an application interface of a program download platform proposed in an embodiment of the present application;

[0012] Figure 3 A flowchart of an application control method proposed in an embodiment of the present application is shown;

[0013] Figure 4 A schematic diagram of a program configuration interface proposed in an embodiment of the present application is shown;

[0014] Figure 5 A flowchart of an application control method proposed in another embodiment of the present application is shown;

[0015] Figure 6 A schematic diagram showing the division of memory regions in an embodiment of the present application is shown;

[0016] Figure 7 A structural block diagram of an application processing device proposed in an embodiment of the present application is shown;

[0017] Figure 8 A structural block diagram of an electronic device used to execute an application control method according to an embodiment of the present application is shown in the present application in real time;

[0018] Fig. 9 A storage unit in real time of the present application for storing or carrying program codes for implementing the application control method according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0019] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0020] Usually, users can realize their functional requirements through the applications installed in the electronic device. For example, image acquisition can be completed through the camera program, audio can be played through the audio player program, and location search can be performed through the map program. And with the development of technology, the types of applications installed in electronic devices will increase. However, the startup speed of related applications needs to be improved.

[0021] Therefore, the inventors proposed the application control method, device and electronic device in the present application, which, in response to obtaining the program package of the target application from the program download platform, installs the program package, and if the installation of the program package is completed and the application interface corresponding to the program download platform is in a display state, preloads the target application. Thus, through the above method, after the program package is completed from the program download platform, the program package can be directly installed, and after the installation is completed, it will further detect whether the application interface of the program download platform is still in a display state, and then, when the application interface of the program download platform is in a display state, the target application is preloaded in advance, so that when the electronic device needs to start the target application, it can complete the startup of the target application more quickly.

[0022] The following first introduces an application scenario of an application control method provided by an embodiment of the present application.

[0023] See also Figure 1 ,exist Figure 1 The application scenario shown includes an electronic device 100 and a server 200. The server 200 can be used as a program download platform. A client corresponding to the program download platform (e.g., an application store) can be installed in the electronic device 100. When the client is started, the electronic device can display an application interface corresponding to the program download platform, through which the user can select the application to be updated or downloaded.

[0024] like Figure 2As shown, an application interface 10 of a program download platform is shown. In the application interface 10, an application and a corresponding operation control may be displayed. The operation content corresponding to the operation control may be download or update. If the user clicks on update, the program download platform may send the update package of the application to be updated to the electronic device 100 for installation. If the user clicks on download, the program download platform may send the installation package of the application to be downloaded to the electronic device 100 for installation.

[0025] It should be noted that the electronic device 100 is Figure 1 In addition to the smartphone shown in , it can also be a tablet computer, a smart watch, an intelligent voice assistant and other devices. Server 200 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud computing, cloud storage, network services, cloud communications, middleware services, CDN (Content Delivery Network), and artificial intelligence platforms. Among them, in the case where the image recognition method provided in the embodiment of the present application is executed by a server cluster or a distributed system composed of multiple physical servers, different steps in the image recognition method can be executed by different physical servers respectively, or can be executed in a distributed manner by a server built based on a distributed system.

[0026] The embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0027] See also Figure 3 , an application control method provided by an embodiment of the present application is applied to an electronic device, the method comprising:

[0028] S110: In response to obtaining a program package of a target application from a program download platform, installing the program package.

[0029] In an embodiment of the present application, the program download platform may be a platform that provides users with various application download services. The program download platform may be an online store or website where users can browse, search, and download various applications. These applications may include games, tools, social media, productivity software, and the like.

[0030] In the embodiment of the present application, the target application can be understood as an application that can preload resources in advance. There are many ways to determine the target application.

[0031] As a method, the target application can be determined based on the historical startup parameters of the application. Optionally, the historical startup parameters of the application may include the startup frequency of the application and / or the running time after startup. Among them, the startup frequency of the application can be understood as the ratio of the number of times the application is started within a period of time (for example, the last week, or the last month) to the length of the period of time. In this case, the higher the startup frequency of the application, the more frequently the user uses the application, which means that after the program package of the application is installed, the user is more likely to use the application subsequently. Correspondingly, the running time of the application can be understood as the total running time of the application after installation. The longer the running time of the application, the greater the probability that the application is used by the user.

[0032] In this way, after detecting that an application is started, the electronic device can start to count the startup frequency and running time of the application to determine the target application. The electronic device can periodically obtain the startup frequency and / or running time after startup of the installed application to select the application whose startup frequency and / or running time after startup meets the first target condition as the target application.

[0033] As another method, the target application can be manually configured by the user of the electronic device according to his / her needs. In this method, a program configuration interface can be configured in the electronic device, in which the user can select an application from candidate programs as the target application according to his / her needs. The candidate programs may include all the applications installed in the electronic device, or may be part of the applications in the electronic device. For example, Figure 4 As shown, in Figure 4 The program configuration interface shown includes a target application display area 11 and a candidate program display area 12. If the user moves application A4 from the candidate program display area 12 to the target application display area 11, the electronic device will identify application A4 as the target application.

[0034] Optionally, in an embodiment of the present application, the electronic device may store the target application in a whitelist to facilitate identification by the electronic device.

[0035] After the electronic device obtains the program package of the target application from the program download platform, it can start to install the program package. In the embodiment of the present application, the program package can be an update package or an installation package.

[0036] The update package may include upgrades or repairs for the application, which may include new features, performance improvements, or fixes for certain vulnerabilities or problems in previous versions.

[0037] S120: If the installation of the program package is completed and the application interface corresponding to the program download platform is in a display state, the target application is preloaded.

[0038] The program download platform may start sending the program package to the electronic device in response to the user's operation in the application interface corresponding to the program download platform. In this case, if the electronic device still displays the application interface corresponding to the program download platform after the electronic device completes the installation of the program package, it indicates that the user may still be browsing the content in the program download platform, and the target application may be preloaded.

[0039] Preloading the target application can be understood as preloading the resources included in the target application. In addition, the preloaded resources can also be understood as the resources required by the target application during operation. For example, text, images or codes required by the target application during operation. Preloading resources can be understood as loading resources from areas outside the memory such as the hard disk into the memory.

[0040] As one approach, in the process of preloading resources of the target application, all resources required by the target application during its operation may be preloaded.

[0041] As another way, resources whose calling frequency is greater than the specified frequency during the operation of the target application can be preloaded. It should be noted that during the operation of the application, the required resources are usually related to the currently displayed application interface or the currently executed task. For example, when displaying an application interface of an application, the required resources may include a description file of the application interface and text or images that will be displayed in the application interface. The description file can then be used to describe the display position or display style of each content in the application interface. In this case, the resources corresponding to some frequently run tasks or some frequently displayed application interfaces are more likely to be used. Therefore, preloading resources whose calling frequency is greater than the specified frequency is conducive to prompting the effectiveness of resource preloading.

[0042] As another way, based on the historical operation status of the target application and / or the device operation status of the electronic device, the resources to be preloaded are determined, and the determined resources are preloaded. Optionally, the device operation status includes at least one of the following: the number of applications currently running on the electronic device; the remaining power of the electronic device; the remaining processing resources of the electronic device; the location of the electronic device.

[0043] It should be noted that when the number of applications running on the electronic device is large, the demand for the memory of the electronic device will be greater. As shown in the above content, preloading the resources of the target application is actually preloading the resources into the memory. Therefore, if the number of applications running on the electronic device is large, preloading too many resources into the memory may affect the currently running application, and then affect the operation of the electronic device. Therefore, as a way, when the number of applications running on the electronic device is large, the fewer resources are determined to be preloaded.

[0044] Similarly, when more content is loaded into the memory, the electronic device needs to consume more power to maintain the storage capacity of the memory. In this case, when the remaining power of the electronic device is lower, the determined resources for preloading are fewer.

[0045] The processing resources of the electronic device can be understood as the hardware resources that data processing relies on, such as the CPU or GPU of the electronic device. When the remaining processing resources of the electronic device are smaller, the resources determined to be preloaded are smaller.

[0046] Among them, when the electronic device is in some positions, the probability of the user using the target application that has just been downloaded or updated is not very high. However, when the electronic device is in other positions, the probability of the user using the target application that has just been downloaded or updated is relatively higher. In this case, the number of preloaded resources can be determined according to the pre-marked target position.

[0047] It should be noted that, when there are multiple ways to determine the resources to be preloaded, the electronic device can also determine the specific way to determine the resources to be preloaded based on actual conditions.

[0048] As a way, the electronic device can determine the resources to be preloaded according to the size of the memory. It should be noted that, in the case where the memory of the electronic device is relatively large, even if all the resources required by the target application during operation are loaded into the memory, it will not have a significant impact on the electronic device. Optionally, the electronic device can compare the size of the memory with the first memory threshold. If the size of the memory of the electronic device is greater than the first memory threshold, it indicates that the memory of the electronic device is relatively large, and then all the resources required by the target application during operation can be selected to be loaded into the memory. Correspondingly, if the size of the memory of the electronic device is not greater than the first memory threshold, it indicates that the memory of the electronic device is relatively small, and then some of the resources required by the target application during operation can be selected to be preloaded into the memory. For example, resources whose call frequency is greater than a specified frequency can be selected to be preloaded into the memory.

[0049] It should be noted that whether the memory of the electronic device is sufficient is related to the number of applications installed in the electronic device. For example, for some electronic devices, although the memory itself is relatively small, the number of applications installed may be small. In this case, the memory of the electronic device is still sufficient. For another example, for some electronic devices, although the memory itself is large, the number of applications installed may be large. In this case, the memory of the electronic device may not be sufficient. Therefore, the electronic device can determine the amount of resources preloaded into the memory in combination with the size of the memory and the number of applications installed. Optionally, the electronic device can obtain the ratio of the number of installed applications to the size of the memory. If the ratio is greater than the second memory threshold, it can be selected to preload some of the resources required by the target application during operation into the memory. For example, it can be selected to preload resources with a call frequency greater than a specified frequency into the memory. If the ratio is not greater than the second memory threshold, it can be that all resources required by the target application during operation are preloaded. In this way, the balance between the number of preloaded resources and the operating performance of the electronic device can be better achieved.

[0050] As another way, the electronic device can determine the amount of resources that can be preloaded based on the maximum memory usage allocated to the target application. It should be noted that the maximum memory usage represents the maximum amount of memory that can be used by the application, and the maximum memory usage configured for different applications may be different. Optionally, the larger the maximum memory usage corresponding to the application, the more resources can be preloaded.

[0051] Optionally, in an embodiment of the present application, the maximum memory usage of each application may be determined in a variety of ways.

[0052] As a configuration method, the corresponding maximum memory usage can be determined according to the memory access delay requirement of the application. In an embodiment of the present application, the memory access delay requirement represents the timeliness requirement of the program when performing memory access. For example, some programs expect that the access request can be responded to quickly when performing memory access, wherein the quick response to the access request can be understood as the data requested to be accessed can be returned to the program quickly, or the quick response to the access request can be understood as the calculation performed in the memory requested, and the calculation result can be returned quickly. Optionally, the meaning represented by the memory access delay requirement can be: the maximum delay time that the program can accept. Or, optionally, the meaning represented by the memory access delay requirement can be: the maximum number of memory access delays that the program can accept within a specified time length. In this way, the application whose memory access delay requirement meets the specified requirement conditions can be used as the first target application. Optionally, the specified requirement conditions can be: the maximum delay time is less than the specified time length, or the maximum number of memory access delays is less than the specified number.

[0053] The present embodiment provides an application control method, in response to obtaining a program package of a target application from a program download platform, installing the program package, and if the installation of the program package is completed and the application interface corresponding to the program download platform is in a display state, preloading the target application. Thus, through the above method, after the program package is completed from the program download platform, the program package can be directly installed, and after the installation is completed, it will further detect whether the application interface of the program download platform is still in a display state, and then in the case that the application interface of the program download platform is in a display state, the target application is preloaded in advance, so that when the electronic device needs to start the target application, it can complete the startup of the target application more quickly.

[0054] See also Figure 5 , an application control method provided by an embodiment of the present application is applied to an electronic device, the method comprising:

[0055] S210: In response to obtaining a program package of a target application from a program download platform, installing the program package.

[0056] S220: If the installation of the program package is completed and the application interface corresponding to the program download platform is in a display state, the target application is preloaded.

[0057] S230: If the installation of the program package is completed and the application interface corresponding to the program download platform is in a display state, it is detected whether the target application has been started in the past.

[0058] S240: If the target application has been started before, create at least part of the interface included in the target application in the background.

[0059] As a method, if the target application has been started historically, at least part of the application interface included in the target application is created in the background, including: if the target application has been started historically, obtaining the historical startup parameters of the target application; based on the historical startup parameters, determining the target application interface corresponding to the target application, and creating the target application interface in the background. Optionally, the historical startup parameters include the startup frequency or the running time after startup.

[0060] As a method, the detecting whether the target application has been historically launched includes: detecting whether the target application has been historically launched within a recent specified period of time; if the target application has been historically launched, creating at least part of the interface included in the target application in the background, including: if the target application has been historically launched within a recent specified period of time, creating at least part of the interface included in the target application in the background.

[0061] As a method, the memory of an electronic device can be divided into an uncompressed area and a compressed memory area. Among them, the resources in the uncompressed area are not compressed, while the resources in the compressed memory area are compressed. In this case, the memory pages in the uncompressed area can be used directly by the application, but if the resources in the compressed memory area are needed, the resources in the compressed memory area can be decompressed first, and then loaded into the uncompressed area for use. Among them, replacing the resources in the memory into the compressed memory area can be understood as compressing the resources in the uncompressed memory area and then replacing them into the compressed memory area. For example, Figure 6 As shown, the memory of the electronic device is divided into an uncompressed area and a memory compression area, wherein resources P1 and P2 in the uncompressed area are uncompressed resources, and resources P4 and P5 in the memory compression area are compressed memory pages.

[0062] Optionally, a memory compression area can be established through zram. Among them, the resources replaced in the memory compression area will be compressed to reduce the storage space occupied. It should be noted that the resources replaced from the memory may be reused, and then need to be loaded back into the memory. Among them, the resources replaced in the memory compression area can be loaded back into the memory more quickly than the resources replaced to the location outside the memory. However, the size of the memory compression area is limited, and therefore, in some cases, the resources in the memory compression area need to be replaced to the location outside the memory so that there is enough space for the memory compression area to be used.

[0063] In this case, when preloading the resources of the target application, you can choose to preload the resources of the target application into a memory compression area, or you can choose to preload the resources of the target application into an uncompressed area. Optionally, you can determine the area where the resources of the target application are preloaded based on the memory access latency requirements of the target application.

[0064] As another way, the memory of the electronic device can be divided into a first memory area and a second memory area. In the embodiment of the present application, the first storage area can be understood as an active linked list, and the second storage area can be understood as an inactive linked list. Exemplarily, the resources loaded into the memory can be transferred between the active linked list and the inactive linked list.

[0065] Optionally, the active linked list and the inactive linked list can be implemented based on the LRU (Least Recently Used) strategy. In this case, it can be understood that the LRU linked list is divided into an active linked list and an inactive linked list. Optionally, the LRU linked list is managed at the node granularity, and each node has an LRU management structure, which contains information such as the address, size, and number of uses of the node. That is, the node represents a memory page that can store resources, and operating the node can be understood as operating the memory page corresponding to the interface. The LRU linked list manages active and inactive nodes through active linked lists and inactive linked lists. When a resource is accessed, if the resource is in the active linked list, the node corresponding to the resource can be moved to the head of the active linked list; if the resource is in the inactive linked list, the node of the resource can be moved to the head of the active linked list, and the node corresponding to the resource can be deleted from the inactive linked list. When the system memory is insufficient, the electronic device can recycle nodes (memory pages) starting from the tail of the inactive linked list.

[0066] In this way, when preloading the resources of the target application, the resources of the target application can be preloaded into the first memory area or the second memory area. Optionally, the area to which the resources of the target application are preloaded can be determined based on the memory access latency requirement of the target application.

[0067] In addition, when determining the amount of resources that need to be preloaded, the amount of resources that can be preloaded may also be determined based on the current time.

[0068] Optionally, in an embodiment of the present application, time can be divided into an idle time period and a busy time period based on the operation of the electronic device. The idle time period can be understood as a time period when the electronic device has relatively fewer tasks to process, and the busy time period can be understood as a time period when the electronic device has relatively more tasks to process.

[0069] In the embodiment of the present application, the idle time period and the busy time period can be divided according to the historical operation status of the electronic device.

[0070] As one approach, the idle time period and the busy time period may be divided according to the number of programs running on the electronic device.

[0071] Optionally, multiple time periods may be pre-divided, and then the number of programs running in each time period may be counted, and each time period may be further divided into an idle time period or a busy time period according to the number of programs running in each time period. For example, a time period in which the number of programs running is less than a first number threshold may be determined as an idle time period, and a time period in which the number of programs running is not less than the first number threshold may be determined as a busy time period. For another example, a time period in which the occupancy rate of the processor is less than a first occupancy threshold may be determined as an idle time period, and a time period in which the occupancy rate of the processor is not less than the first occupancy threshold may be determined as a busy time period.

[0072] The length of each pre-divided time period may be of various types, for example, the length of each time period may be 1 hour, 2 hours, or 3 hours.

[0073] Optionally, the time period can be divided by counting the running conditions of the programs in the electronic device, and it is simultaneously determined whether the divided time period is an idle time period or a busy time period. In this way, the moment when the number of running programs changes compared to the first number threshold can be used as the moment when the idle time period and the busy time period intersect. After the electronic device is started, the number of currently running programs can be detected, and the moment of startup can be used as the starting time of the idle time period. If it is detected that the number of running programs is greater than the first number threshold, the moment when the number of programs is detected to be greater than the first number threshold can be used as the starting time of the busy time period, and the starting time is also the end time of an idle time period before the busy time period. If it is detected that the number of running programs is greater than the first number threshold, it is detected that the number of programs is not greater than the first number threshold after the number of running programs is greater than the first number threshold, the moment when the number of programs is detected to be less than the first number threshold will be used as the end time of the current busy time period, and the end time is also the start time of a new idle time period entered. In this way, the electronic device does not need to divide multiple time periods in advance, and thus has better flexibility.

[0074] Optionally, the time period can be divided by counting the occupancy of the processor in the electronic device, and synchronously determining whether the divided time period is an idle time period or a busy time period. In this way, the moment when the current occupancy of the processor changes compared to the first occupancy threshold can be used as the moment when the idle time period and the busy time period intersect. Among them, after the electronic device is started, the current occupancy of the processor can be detected, and the moment of startup can be used as the starting moment of the idle time period. If the occupancy of the processor is detected to be greater than the first occupancy threshold, the moment when the occupancy is detected to be greater than the first occupancy threshold can be used as the starting moment of the busy time period, and the starting moment is also the end moment of an idle time period before the busy time period. If after detecting that the occupancy is greater than the first occupancy threshold, it is detected that the occupancy is not greater than the first occupancy threshold, the moment when the occupancy is detected to be less than the first occupancy threshold will be used as the end moment of the current busy time period, and the end moment is also the start moment of a new idle time period entered.

[0075] In the case where there are multiple ways to divide the idle time period and the busy time period, the electronic device can flexibly determine which division method is currently used.

[0076] As a determination method, the user of the electronic device may determine the specific method of dividing the idle time period and the busy time period. As another method, the electronic device may determine the specific method of dividing the idle time period and the busy time period according to actual conditions.

[0077] Optionally, the method of dividing the idle time period and the busy time period may be determined according to the total running time of the electronic device after the electronic device is first started. Moreover, different division methods may result in different idle time periods and busy time periods.

[0078] It should be noted that in the early stage of using electronic devices, the user's program usage habits are relatively unstable. If the time periods are directly divided by counting the running status of the programs in the electronic devices, and the divided time periods are simultaneously determined to be idle time periods or busy time periods, the divided idle time periods and busy time periods may be inaccurate. Correspondingly, after the user has used the electronic device for a period of time, the running rules of the programs in the electronic device will be relatively fixed. In this case, it will be relatively more accurate to divide the idle time periods or busy time periods in real time based on the running status.

[0079] Furthermore, when the total running time of the electronic device after the first startup is less than the first specified time, multiple time periods can be pre-divided, and then the number of programs running in each time period can be counted, and then each time period can be divided into an idle time period or a busy time period according to the number of programs running in each time period. Correspondingly, when the total running time of the electronic device after the first startup is not less than the first specified time, the time period can be divided by counting the running status of the programs in the electronic device, and simultaneously determining whether the divided time period is an idle time period or a busy time period.

[0080] Wherein, in the case where time can be divided into idle time periods and busy time periods based on the operation of the electronic device, if it is determined that the current time period is an idle time period, more resources can be preloaded, and if the current time period is a busy time period, relatively fewer resources can be preloaded. For example, if it is determined that the current time period is an idle time period, a first quantity (or a first capacity) of resources can be preloaded into the memory, and if it is determined that the current time period is a busy time period, a second quantity (or a second capacity) of resources can be preloaded into the memory. The first quantity is greater than the second quantity, and the first capacity is greater than the second capacity.

[0081] The present embodiment provides an application control method, so that after the program package is completed from the program download platform, the program package can be directly installed through the above method, and after the installation is completed, it will further detect whether the application interface of the program download platform is still in the display state, and then when the application interface of the program download platform is in the display state, the target application is preloaded in advance, so that when the electronic device needs to start the target application, it can complete the startup of the target application more quickly. Moreover, in this embodiment, when the target application is a program that has been started historically, part of the application interface can be created in the background in advance, so that when the part of the application interface needs to be displayed, it can be directly switched from the background to the foreground for display, without having to display it after the application interface is created in real time, thereby further improving the efficiency of opening the application interface.

[0082] See also Figure 7 , an application control device 300 provided in an embodiment of the present application runs on an electronic device, and the device 300 includes:

[0083] The program installation unit 310 is used to install the program package in response to obtaining the program package of the target application from the program download platform.

[0084] The program preloading unit 320 is used to preload the target application program if the installation of the program package is completed and the application interface corresponding to the program download platform is in a display state.

[0085] As a mode, the program package is an update package. In this mode, the program preloading unit 320 is also used to detect whether the target application has been launched historically if the installation of the program package is completed and the application interface corresponding to the program download platform is in a display state; if the target application has been launched historically, at least part of the interface included in the target application is created in the background.

[0086] Optionally, the program preloading unit 320 is further specifically used to obtain historical startup parameters of the target application if the target application has been started historically; based on the historical startup parameters, determine the target application interface corresponding to the target application, and create the target application interface in the background.

[0087] As a method, the program preloading unit 320 is also specifically used to detect whether the target application has been historically started within the last specified time. If the target application has been historically started within the last specified time, at least part of the interface included in the target application is created in the background.

[0088] As one mode, the program preloading unit 320 is specifically used to preload resources whose calling frequency is greater than a specified frequency during the operation of the target application. As another mode, the program preloading unit 320 is specifically used to determine the resources to be preloaded based on the historical operation status of the target application and / or the device operation status of the electronic device, and preload the determined resources.

[0089] An application control device provided by the present application allows the program package to be directly installed after it is completed from a program download platform, and after the installation is completed, it will further detect whether the application interface of the program download platform is still in a display state, and then, when the application interface of the program download platform is in a display state, the target application is preloaded in advance, so that the electronic device can complete the startup of the target application more quickly when it needs to start the target application.

[0090] It should be noted that the device embodiment in the present application corresponds to the aforementioned method embodiment. The specific principles in the device embodiment can be found in the contents of the aforementioned method embodiment and will not be repeated here.

[0091] The following will be combined Figure 8 An electronic device provided by the present application is described.

[0092] See also Figure 8 Based on the above application control method and device, the embodiment of the present application also provides another electronic device 2000 that can execute the above application control method. The electronic device 2000 includes one or more (only one is shown in the figure) processors 202, a memory 204, a network module 206, a sensor module 208 and an audio acquisition device 210 that are coupled to each other. Among them, the memory 204 stores a program that can execute the content of the above embodiment, and the processor 202 can execute the program stored in the memory 204.

[0093] Among them, the processor 202 may include one or more processing cores. The processor 202 uses various interfaces and lines to connect various parts within the entire electronic device 2000, and executes various functions and processes data of the electronic device 2000 by running or executing instructions, programs, code sets or instruction sets stored in the memory 204, and calling data stored in the memory 204. Optionally, the processor 202 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 202 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 202, but may be implemented separately through a communication chip.

[0094] The memory 204 may include a random access memory (RAM) or a read-only memory (ROM). The memory 204 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 204 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the following various method embodiments, etc.

[0095] The network module 206 is used to implement information interaction between the electronic device 2000 and other devices, for example, transmission of device control instructions, operation request instructions, and status information acquisition instructions, etc. When the electronic device 2000 is specifically a different device, the corresponding network module 206 may be different.

[0096] The sensor module 208 may include at least one sensor. Specifically, the sensor module 208 may include but is not limited to: a light sensor, a motion sensor, a pressure sensor, an infrared heat sensor, a distance sensor, an acceleration sensor, and other sensors.

[0097] Among them, the pressure sensor can be a sensor that detects the pressure generated by pressing on the electronic device 2000. That is, the pressure sensor detects the pressure generated by the contact or pressing between the user and the electronic device, such as the pressure generated by the contact or pressing between the user's ear and the mobile terminal. Therefore, the pressure sensor can be used to determine whether contact or pressing occurs between the user and the electronic device 2000, and the magnitude of the pressure.

[0098] Among them, the acceleration sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when stationary, and can be used for applications that recognize the posture of the electronic device 2000 (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc. In addition, the electronic device 2000 can also be equipped with other sensors such as gyroscopes, barometers, hygrometers, thermometers, etc., which will not be repeated here.

[0099] The audio acquisition device 210 is used to collect audio signals. Optionally, the audio acquisition device 210 includes a plurality of audio acquisition devices. The audio acquisition device may be a microphone. For example, in one embodiment, the audio acquisition device 210 may include two microphones, in which one of the microphones may correspond to an analog-to-digital converter, and the other microphone may correspond to an analog-to-digital converter with two different analog gains. In another embodiment, the audio acquisition device 210 may include three microphones. In this embodiment, two of the microphones (e.g., a main microphone and a secondary microphone) may each correspond to an analog-to-digital converter, and the other microphone (e.g., a camera microphone) may correspond to an analog-to-digital converter with two different analog gains.

[0100] As a method, the network module of the electronic device 2000 is a radio frequency module, which is used to receive and send electromagnetic waves, realize the mutual conversion between electromagnetic waves and electrical signals, and thus communicate with a communication network or other devices. The radio frequency module may include various existing circuit elements for performing these functions, such as antennas, radio frequency transceivers, digital signal processors, encryption / decryption chips, user identity modules (SIM) cards, memories, etc. For example, the radio frequency module can exchange information with an external device through the electromagnetic waves sent or received, and then receive audio signals sent by the external device.

[0101] Furthermore, the electronic device 2000 may also include an image acquisition device for image acquisition, for example, a video, a static picture or a dynamic picture may be taken by the image acquisition device.

[0102] Please refer to Fig. 9, which shows a structural block diagram of a computer-readable storage medium provided in an embodiment of the present application. The computer-readable medium 800 stores program codes, which can be called by a processor to execute the method described in the above method embodiment.

[0103] The computer readable storage medium 800 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk, or a ROM. Optionally, the computer readable storage medium 800 includes a non-transitory computer-readable storage medium. The computer readable storage medium 800 has storage space for program code 810 that performs any method step in the above method. These program codes can be read from or written to one or more computer program products. The program code 810 can be compressed, for example, in an appropriate form.

[0104] The present application provides an application control method, device and electronic device, which, in response to obtaining a program package of a target application from a program download platform, installs the program package, and if the installation of the program package is completed and the application interface corresponding to the program download platform is in a display state, preloads the target application. Thus, through the above-mentioned method, after the program package is completed from the program download platform, the program package can be directly installed, and after the installation is completed, it will further detect whether the application interface of the program download platform is still in a display state, and then, when the application interface of the program download platform is in a display state, the target application is preloaded in advance, so that when the electronic device needs to start the target application, it can complete the startup of the target application more quickly.

[0105] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. An application control method, characterized in that: Applied to electronic equipment, the method comprises: In response to obtaining a program package of a target application from a program download platform, installing the program package; If the installation of the program package is completed and the application interface corresponding to the program download platform is in a display state, the target application is preloaded.

2. The method according to claim 1, characterized in that The program package is an update package, and the method further includes: If the installation of the program package is completed and the application interface corresponding to the program download platform is in a display state, detecting whether the target application has been started in the past; If the target application has been started before, at least a portion of the interface included in the target application is created in the background.

3. The method according to claim 2, characterized in that If the target application has been started before, creating at least part of the application interface included in the target application in the background, including: If the target application has been started in the past, obtaining the historical startup parameters of the target application; Based on the historical startup parameters, a target application interface corresponding to the target application is determined, and the target application interface is created in the background.

4. The method according to claim 3, characterized in that The historical startup parameters include the startup frequency and / or the running time after startup.

5. The method according to claim 2, characterized in that: The detecting whether the target application has been started historically includes: Detecting whether the target application has been historically started within a recent specified period of time; If the target application has been started before, creating at least part of the interface of the target application in the background, including: If the target application has been historically started within a recently specified period of time, at least a portion of the interface included in the target application is created in the background.

6. The method according to claim 1, characterized in that The preloading of the target application comprises: Preload resources whose calling frequency is greater than a specified frequency during the running of the target application.

7. The method according to claim 1, characterized in that The preloading of the target application comprises: Based on the historical operation status of the target application and / or the device operation status of the electronic device, the resources to be preloaded are determined, and the determined resources are preloaded.

8. The method according to claim 7, characterized in that The equipment operation condition includes at least one of the following conditions: The number of applications currently running on the electronic device; the remaining power of the electronic device; remaining processing resources of the electronic device; The location of the electronic device.

9. An application control device, characterized in that: Running on an electronic device, the device comprises: A program installation unit, configured to install the program package in response to obtaining the program package of the target application from the program download platform; The program preloading unit is used to preload the target application program if the installation of the program package is completed and the application interface corresponding to the program download platform is in a display state.

10. An electronic device, characterized in that: The method comprises one or more processors and a memory; one or more programs are stored in the memory and are configured so that the one or more processors execute the method according to any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program code, wherein when the program code is executed by a processor, the method according to any one of claims 1 to 8 is executed.