Application component management method and device, electronic equipment and computer program product

By controlling the delayed execution of tasks by application components under target usage scenarios, the problems of lag and overheating caused by resource usage pressure on electronic devices are solved, achieving more efficient resource management and improved user experience.

CN121957784APending Publication Date: 2026-05-01SHENZHEN HEYTAP TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN HEYTAP TECHNOLOGY CO LTD
Filing Date
2024-10-29
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

When electronic devices run multiple applications, the pressure on resource usage leads to problems such as lag and overheating, which are difficult to alleviate effectively with existing technologies.

Method used

By identifying target usage scenarios where electronic devices are in situations where resource demands exceed a threshold, the execution of tasks by target application components can be flexibly delayed to alleviate resource pressure.

Benefits of technology

While improving the flexibility of application component management, it reduces the probability of electronic devices lagging and overheating, thus improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121957784A_ABST
    Figure CN121957784A_ABST
Patent Text Reader

Abstract

The invention provides an application component management method and device, electronic equipment and a computer program product, realizes a high-flexibility management method for an application component, can effectively relieve the resource pressure of the electronic equipment in a heavy resource use scene, and reduces the situations of jamming, heating and the like of the electronic equipment. The method comprises the following steps: determining that the electronic equipment is in a target use scene; the target use scene is a scene in which the resource demand is greater than a resource threshold value; and based on the target usage scene, controlling the target application component to delay execution of the target task.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a method and apparatus for managing application components, electronic devices, and computer program products. Background Technology

[0002] As users' demands for electronic device performance continue to increase, the types and number of applications running on these devices are also growing. When multiple applications run simultaneously, while meeting diverse user needs, this also increases the processing load on the device, potentially leading to issues like lag and overheating. Therefore, alleviating the resource consumption pressure on electronic devices to reduce lag and overheating has become a pressing issue that needs to be addressed. Summary of the Invention

[0003] This application provides a method and apparatus for managing application components, an electronic device, and a computer program product. It realizes a highly flexible method for managing application components, which can effectively alleviate the resource pressure on electronic devices in resource-intensive usage scenarios and reduce issues such as lag and overheating in electronic devices.

[0004] In a first aspect, a method for managing application components is provided, which applies to electronic devices. The method includes: determining that the electronic device is in a target usage scenario; the target usage scenario is a scenario where the demand for resources is greater than a resource threshold; and based on the target usage scenario, controlling the target application component to delay the execution of a target task.

[0005] In this application, an electronic device, upon determining that it is in a target usage scenario, can flexibly control the target application component to delay the execution of a target task based on that target usage scenario. The target usage scenario is one where the resource demand exceeds a resource threshold. This allows the electronic device to alleviate resource pressure in resource-intensive scenarios by controlling the delayed execution of target application components within that scenario. This improves the management flexibility of application components while reducing the probability of the electronic device experiencing lag, overheating, or other issues.

[0006] Secondly, an application component management device is provided, including a scenario determination module and a delay control module. The scenario determination module is used to determine that the electronic device is in a target usage scenario; the target usage scenario is a scenario where the resource demand exceeds a resource threshold; the delay control module is used to control the target application component to delay the execution of the target task based on the target usage scenario.

[0007] Thirdly, another electronic device is provided, including a processor coupled to a memory for executing instructions in the memory to implement the methods in any of the possible implementations of the first aspect described above. Optionally, the electronic device also includes a memory. Optionally, the electronic device also includes a communication interface to which the processor is coupled.

[0008] Fourthly, a processor is provided, comprising: an input circuit, an output circuit, and a processing circuit. The processing circuit is used to receive signals through the input circuit and transmit signals through the output circuit, causing the processor to execute the method in any possible implementation of the first aspect described above.

[0009] In specific implementation, the processor can be a chip, the input circuit can be an input pin, the output circuit can be an output pin, and the processing circuit can be a transistor, gate circuit, flip-flop, and various logic circuits. The input signal received by the input circuit can be received and input by, for example, but not limited to, a receiver, and the signal output by the output circuit can be output to, for example, but not limited to, a transmitter and transmitted by the transmitter. Furthermore, the input circuit and the output circuit can be the same circuit, which is used as the input circuit and the output circuit at different times. This application does not limit the specific implementation of the processor and various circuits.

[0010] Fifthly, a processing apparatus is provided, including a processor and a memory. The processor is used to read instructions stored in the memory and to receive signals via a receiver and transmit signals via a transmitter to execute the method in any of the possible implementations of the first aspect described above.

[0011] Optionally, there may be one or more processors and one or more memories.

[0012] Alternatively, the memory can be integrated with the processor, or the memory can be set separately from the processor.

[0013] In specific implementation, the memory can be a non-transitory memory, such as read-only memory (ROM), which can be integrated with the processor on the same chip or set on different chips. The embodiments of this application do not limit the type of memory or the way the memory and processor are set.

[0014] It should be understood that the relevant data interaction process, such as sending indication information, can be the process of outputting indication information from the processor, and receiving capability information can be the process of the processor receiving input capability information. Specifically, the processed output data can be output to the transmitter, and the input data received by the processor can come from the receiver. Here, the transmitter and receiver can be collectively referred to as a transceiver.

[0015] The processing device in the fifth aspect above can be a chip. The processor can be implemented in hardware or software. When implemented in hardware, the processor can be a logic circuit, integrated circuit, etc. When implemented in software, the processor can be a general-purpose processor that reads software code stored in memory. The memory can be integrated into the processor or located outside the processor and exist independently.

[0016] In a sixth aspect, a computer program product is provided, the computer program product comprising: a computer program (also referred to as code or instructions), which, when run, causes a computer to perform the method in any of the possible implementations of the first aspect described above.

[0017] In a seventh aspect, a computer-readable storage medium is provided that stores a computer program (also referred to as code or instructions) that, when executed on a computer, causes the computer to perform the methods in any of the possible implementations of the first aspect described above. Attached Figure Description

[0018] Figure 1 This is a schematic diagram of the system architecture of the electronic device provided in the embodiments of this application;

[0019] Figure 2 This is a schematic flowchart illustrating an application component management method provided in an embodiment of this application;

[0020] Figure 3 This is a schematic flowchart illustrating a first specific example of the application component management method provided in the embodiments of this application;

[0021] Figure 4 This is a schematic flowchart illustrating a second specific example of the application component management method provided in the embodiments of this application;

[0022] Figure 5 This is a schematic flowchart illustrating a third specific example of the application component management method provided in the embodiments of this application;

[0023] Figure 6 This is a schematic flowchart illustrating the fourth specific example of the application component management method provided in the embodiments of this application;

[0024] Figure 7 This is a schematic flowchart illustrating the fifth specific example of the application component management method provided in the embodiments of this application;

[0025] Figure 8 This is a schematic diagram of the management architecture of the application components provided in the embodiments of this application;

[0026] Figure 9This is a schematic flowchart illustrating the sixth specific example of the application component management method provided in the embodiments of this application;

[0027] Figure 10 This is a schematic diagram of the job component management method provided in the embodiments of this application;

[0028] Figure 11 This is a schematic flowchart illustrating the seventh specific example of the application component management method provided in the embodiments of this application;

[0029] Figure 12 This is a schematic diagram of the alarm component management method provided in an embodiment of this application;

[0030] Figure 13 This is a schematic flowchart illustrating the eighth specific example of the application component management method provided in the embodiments of this application;

[0031] Figure 14 This is a schematic diagram of the management method of the broadcast component provided in the embodiments of this application;

[0032] Figure 15 This is a schematic flowchart illustrating the ninth specific example of the application component management method provided in the embodiments of this application;

[0033] Figure 16 This is a schematic diagram of the management method of the service restart component provided in the embodiments of this application;

[0034] Figure 17 This is a schematic block diagram of an application component management device provided in an embodiment of this application;

[0035] Figure 18 This is a schematic block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0036] The technical solutions in this application will now be described with reference to the accompanying drawings.

[0037] To facilitate a clear description of the technical solutions in the embodiments of this application, the terms "first" and "second" are used in the embodiments of this application to distinguish identical or similar items with essentially the same function and effect. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and the terms "first" and "second" are not necessarily different.

[0038] It should be noted that, in this application, the words "exemplarily" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplarily" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of words such as "exemplarily" or "for example" is intended to present the relevant concepts in a specific manner.

[0039] Furthermore, "at least one" refers to one or more, while "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, and c can mean: a, or b, or c, or a and b, or a and c, or b and c, or a, b, and c, where a, b, and c can be single or multiple.

[0040] To make the objectives and technical solutions of this application clearer and more intuitive, the management methods and apparatuses, electronic devices, and computer program products of the application components provided in the embodiments of this application will be described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.

[0041] This application provides a method and apparatus for managing application components, an electronic device, and a computer program product. When the electronic device is determined to be in a target usage scenario, it can flexibly control the delayed execution of target application components based on that scenario. The target usage scenario is one where resource demand exceeds a resource threshold. This allows the electronic device to delay the execution of target tasks by target application components within that scenario, alleviating resource pressure on the electronic device under resource-intensive usage. This improves the flexibility of application component management while reducing the probability of lag, overheating, and other issues with the electronic device.

[0042] The application components involved in the embodiments of this application can be the basic building blocks of an application. An application can be composed of multiple application components, each of which can perform a specific function. The application components work together to form a complete application.

[0043] The electronic devices involved in the embodiments of this application may be mobile phones, watches, laptops, handheld computers, mobile internet devices (MIDs), personal computers (PCs), wearable devices, virtual reality (VR) devices, augmented reality (AR) devices, wireless terminals in self-driving vehicles, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, personal digital assistants (PDAs), etc., but the embodiments of this application are not limited to these.

[0044] For example, Figure 1 This is a schematic diagram of the system architecture of an electronic device provided in an embodiment of this application.

[0045] like Figure 1 As shown, the electronic device includes a processor 110, a transceiver 120, and a display unit 170. The display unit 170 may include a display screen.

[0046] Optionally, the electronic device may also include a memory 130. The processor 110, transceiver 120, and memory 130 can communicate with each other via internal connections to transfer data. The memory 130 stores computer programs, and the processor 110 retrieves and runs the computer programs from the memory 130. The processor 110 and memory 130 can be combined into a single processing device, but more commonly they are independent components. The processor 110 executes the program code stored in the memory 130 to achieve the aforementioned functions. In specific implementations, the memory 130 can be integrated into the processor 110, or it can be independent of the processor 110.

[0047] In addition, to further enhance the functionality of the electronic device, it may also include one or more of an input unit 160, an audio circuit 180, and a sensor 101.

[0048] Optionally, the above-mentioned electronic device may also include a power supply 150 for providing power to various devices or circuits in the electronic device.

[0049] Understandable Figure 1The operation and / or function of each module in the illustrated electronic device are respectively for implementing the corresponding processes in the following method embodiments. For details, please refer to the descriptions in the following method embodiments; detailed descriptions are omitted here to avoid repetition.

[0050] Understandable Figure 1 The processor 110 in the illustrated electronic device may include one or more processing units, such as an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). These different processing units may be independent devices or integrated into one or more processors.

[0051] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0052] Understandable Figure 1The power supply 150 shown provides power to the processor 110, memory 130, display unit 170, input unit 160, and transceiver 120. The transceiver 120 provides solutions for wireless communication applications in electronic devices, including wireless local area networks (WLANs) (such as Wireless Fidelity (Wi-Fi) networks), Bluetooth (BT), Global Navigation Satellite System (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The transceiver 120 can be one or more devices integrating at least one communication processing module. The display unit 170 is used to display images, videos, etc. The display unit 170 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a mini-LED, a micro-OLED, a quantum dot light-emitting diode (QLED), etc. The memory 130 can be used to store computer executable program code, which includes instructions. The memory 130 can include a program storage area and a data storage area. The program storage area can store the operating system, at least one application program required for a function, etc. The data storage area can store data created during the use of the electronic device, etc. Furthermore, the memory 130 can include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the electronic device by running instructions stored in the memory 130 and / or instructions stored in the memory configured within the processor. The electronic device can implement audio functions, such as music playback and recording, through the audio circuit 180 and the application processor.

[0053] Figure 2 This is a schematic flowchart of an application component management method 200 provided in an embodiment of this application. Figure 2 As shown, the method 200 may include the following steps:

[0054] S201, Determine that the electronic device is in a target usage scenario; the target usage scenario is a scenario where the demand for resources is greater than the resource threshold.

[0055] In some embodiments, an electronic device can determine whether it is currently in a scenario where its resource requirements exceed a resource threshold by monitoring its operational status information. The operational status information characterizes the resource requirements of the electronic device, which refers to resources available for the electronic device to operate, including but not limited to one or more of CPU resources, memory resources, and network resources.

[0056] For example, the operating status information can be information that describes the state of an electronic device during operation, such as battery level, device temperature, running applications, screen display status, resource usage information, etc.

[0057] For example, when the status information is the battery level of an electronic device, the faster the battery power is consumed within the same time period, the greater the current resource demand of the electronic device. That is, by monitoring battery usage, if the battery power is consumed too quickly, it is highly likely that many applications are running on the device, thus indicating a scenario where resource demand exceeds a certain threshold.

[0058] When the status information is the device temperature of an electronic device, the higher the temperature rises within the same time period, the greater the current resource demand of the electronic device. In other words, if the electronic device can monitor temperature changes, a rapid rise in temperature suggests a high probability of numerous applications running on the device, indicating a scenario with high resource demand.

[0059] Optionally, in addition to the battery temperature and device temperature shown above, the target usage scenario of the electronic device can also be determined based on other state information, which is not limited in this application.

[0060] The target usage scenario refers to a scenario where the demand for resources exceeds the resource threshold, i.e., a resource-intensive scenario. Under such a scenario, electronic devices experience significant resource pressure, which can easily lead to lag and overheating. For example, the target usage scenario may include, but is not limited to, one or more of the following: scenarios where a preset application is running in the foreground, scenarios where multiple applications are launched, split-screen scenarios, and multi-window usage scenarios (such as multi-window scenarios).

[0061] Split-screen scenarios involve electronic devices dividing their display screen into multiple virtual screens to display different application interfaces on different virtual screens.

[0062] Multi-window use cases involve electronic devices displaying multiple floating windows on the same interface to show different application content.

[0063] S202, based on the target use scenario, control the target application component to delay the execution of the target task.

[0064] In some embodiments, the target application component here may be at least one of a plurality of application components in an electronic device.

[0065] For example, the target application component may include one or more of the following: a distributed task (job) component, a timer (alarm) component, a broadcast (broadcast) component, and a service restart (service restart) component.

[0066] The job component can select different scheduling strategies based on the application programming interface version of the electronic device, and execute distributed tasks based on the corresponding scheduling strategies.

[0067] The alarm component can wake up the CPU when it enters sleep mode to perform scheduled tasks.

[0068] The broadcast component can be used for inter-thread communication, such as sending broadcasts when various system events occur (system startup or when electronic devices start charging), or sending custom broadcasts from the application to notify other applications.

[0069] The service restart component can be used to restart applications.

[0070] In one possible implementation, the electronic device can determine the target application components based on the target usage scenario. There is a correspondence between the target application components and the target usage scenarios (such as a first correspondence). Different target usage scenarios can correspond to the same or different target application components. Different target usage scenarios have different resource requirements, and target usage scenarios with higher resource requirements can correspond to a greater number of target application components.

[0071] For example, electronic devices can control different target application components to delay the execution of target tasks based on the first correspondence mentioned above under different target usage scenarios, thereby alleviating the resource pressure caused by the target application components executing tasks under the corresponding target usage scenarios and reducing the probability of electronic devices experiencing problems such as lag and overheating.

[0072] The target task refers to at least one task that the target application component needs to execute at present. Controlling the target application component to delay the execution of the target task means delegating the target application component, that is, managing the target application component so that it does not execute the target task temporarily, or it can execute other tasks other than the target task.

[0073] For example, when the target application component is a job component, the target task can be at least one of multiple distributed tasks.

[0074] For example, if the target application component is an alarm component, the target task can be at least one of multiple scheduled tasks.

[0075] For example, if the target application component is a broadcast component, the target task can be at least one of multiple broadcast tasks.

[0076] For example, if the target application component is a service restart component, the target task can be at least one of multiple application restart tasks.

[0077] In another possible implementation, the electronic device can determine the target application component based on applications running in the background (such as background applications). Different background applications can correspond to different target application components (such as a second correspondence), so that the electronic device can determine the target application component based on applications running in the background.

[0078] For example, an electronic device can determine the target application component to be managed based on a background application and a second correspondence, so as to control the target application component to delay the execution of the target task, thereby alleviating the resource pressure caused by the target application component corresponding to the background application in the electronic device executing the target task.

[0079] In some embodiments, the background application for determining the target application component can be at least one of multiple background applications in an electronic device, so that the electronic device can flexibly control the target application component corresponding to different numbers of background applications to delay the execution of the target task.

[0080] In one possible implementation, different background applications correspond to different running priorities. Based on this background priority, the electronic device can prioritize delaying the execution of the target application component corresponding to the background application with the lower running priority among the multiple background applications. This can alleviate the pressure on the electronic device while avoiding affecting the user's continuity of use of the background application with the higher running priority.

[0081] In some embodiments, the running priority of background applications can be determined by user settings. For example, a user can set the running priority of a music application to be higher than that of a camera application. This is to avoid delaying the execution of the target application component corresponding to the music application with higher running priority in resource-intensive scenarios to alleviate the pressure on the electronic device. This would increase the probability of the music application running in the background malfunctioning, which may affect the user's audio listening experience through the background music application.

[0082] In some embodiments, the running priority of background applications can also be determined based on historical antivirus data of the background applications. For example, if historical antivirus data shows that the probability of a music application being manually killed by the user is much lower than that of a camera application while running in the background, then based on user needs, the running priority of the music application can be determined to be higher than that of the camera application. In resource-intensive scenarios, to alleviate the pressure on electronic devices, the execution of the target application component corresponding to the lower-priority camera application can be delayed, reducing the probability of functional abnormalities in the higher-priority music application and ensuring the user's audio listening experience through the background music application.

[0083] In one possible implementation, the electronic device can further determine the number of background applications based on the target usage scenario. Different target usage scenarios have different resource requirements; in target usage scenarios with higher resource requirements, the number of background applications can be increased. This allows the electronic device to control the delay of target application components corresponding to different numbers of background applications in target usage scenarios with varying resource requirements, effectively alleviating the resource pressure on the electronic device under different target usage scenarios.

[0084] For example, in target use scenarios with higher resource demands, electronic devices can control a greater number of background applications to delay the execution of target tasks, effectively alleviating resource pressure on the electronic device in such scenarios. Alternatively, in target use scenarios with lower resource demands, the number of background applications can be reduced accordingly, allowing the electronic device to control a smaller number of background applications to delay the execution of target tasks. This effectively alleviates resource pressure on the electronic device in such scenarios while reducing the probability of malfunction due to excessive delays in executing target tasks.

[0085] In some embodiments, the target task here can be at least one task of the target application component. The electronic device can control the target application component to delay the execution of different numbers of tasks in order to alleviate different levels of resource pressure on the electronic device.

[0086] In one possible implementation, the electronic device can also determine the number of target tasks based on the target usage scenario. Different target usage scenarios correspond to different resource requirements. In target usage scenarios with higher resource requirements, the electronic device can control the target application components to delay the execution of a larger number of target tasks. This alleviates the resource pressure on the electronic device in that target usage scenario while effectively avoiding the problem of blindly delaying the execution of a large number of target tasks, which could lead to abnormal application functionality on the electronic device.

[0087] In one possible implementation, the electronic device can also determine the number of target tasks based on background applications. Specifically, as the number of background applications increases, the electronic device can control the target applications to delay the execution of a larger number of target tasks, thereby alleviating the resource pressure on the electronic device running background applications. In other words, determining the number of target tasks to be delayed based on the number of different background applications alleviates the resource pressure on the electronic device while avoiding the probability of malfunctions caused by blindly delaying the execution of a large number of target tasks.

[0088] In some embodiments, when the electronic device is in a target usage scenario and the triggering conditions of the target application component are met, it controls the target application component to delay the execution of the target task.

[0089] In one possible scenario, electronic devices can determine whether the triggering conditions of the target application component are met under the target usage scenario. If the triggering conditions are met, the electronic device can efficiently control the target application component to delay the execution of the target task, thereby alleviating the resource pressure under the target usage scenario.

[0090] It should be understood that the triggering condition here refers to the condition that triggers the target application component to work (such as executing a target task). That is, in this embodiment of the application, when the target application component is triggered, it can be determined that there is a target task that needs to be executed. In order to avoid increasing the resource usage pressure of the electronic device due to the execution of the target task, the electronic device can control the target application component to temporarily not execute the target task, so as to alleviate the resource pressure.

[0091] In another possible scenario, the electronic device can also determine whether it is in the target usage scenario if the triggering conditions of the target application component are met. If it is in the target usage scenario, it can control the target application component to delay the execution of the target task in order to accurately alleviate the resource pressure in the required usage scenario.

[0092] In this application, an electronic device, upon determining that it is in a target usage scenario, can flexibly control the target application component to delay the execution of a target task based on that target usage scenario. The target usage scenario is one where the resource demand exceeds a resource threshold. This allows the electronic device to alleviate resource pressure in resource-intensive scenarios by controlling the delayed execution of target application components within that scenario. This improves the management flexibility of application components while reducing the probability of the electronic device experiencing lag, overheating, or other issues.

[0093] In some embodiments, the electronic device may also, upon detecting that the triggering conditions of the target application component are met, control the target application component to delay the execution of the target task corresponding to the background application, based on the target usage scenario.

[0094] Figure 3 This is a schematic flowchart of an application component management method 300 provided in an embodiment of this application. Figure 3 As shown, the method 300 may include the following steps:

[0095] S301, determine that the above-mentioned electronic device is in a target usage scenario; the target usage scenario is a scenario where the demand for resources is greater than the resource threshold.

[0096] S303, based on the target use scenario, when the triggering conditions of the target application component are detected, control the target application component to delay the execution of the target task corresponding to the background application.

[0097] In some embodiments, the electronic device may, based on the target usage scenario, control the target application component to delay the execution of the target task corresponding to all background applications in the electronic device when it detects that the triggering conditions of the target application component are met.

[0098] In other embodiments, the electronic device may, based on the target usage scenario, control the target application component to delay the execution of a target task corresponding to a background application when it detects that the triggering conditions of the target application component are met.

[0099] In one possible scenario, some of the background applications here could be preset applications among the background applications of an electronic device.

[0100] For example, the preset application may be determined by the user through a setting operation, so as to avoid delaying the execution of the target task corresponding to the non-preset application by the target application component in the process of alleviating the resource pressure of the electronic device, thereby affecting the user's experience of using the non-preset application.

[0101] In this embodiment, the electronic device can flexibly choose to delay the execution of tasks corresponding to background applications in resource-intensive scenarios. This alleviates the resource pressure brought about by the running of background applications on the electronic device, while also ensuring that the foreground application can obtain sufficient resources during operation. This reduces the probability of the electronic device experiencing lag, overheating, and other problems, and improves the user experience.

[0102] In some embodiments, an electronic device can obtain application running information of the electronic device, determine that the electronic device is in a target usage scenario based on the application running information, and control the target application component to delay the execution of the target task based on the target usage scenario.

[0103] Figure 4 This is a schematic flowchart of an application component management method 400 provided in an embodiment of this application. Figure 4 As shown, the method 400 may include the following steps:

[0104] S401, Obtain application operation information of electronic devices.

[0105] In some embodiments, the application running information includes the number of applications running, with different numbers of applications used to characterize the different resource requirements of electronic devices.

[0106] In one possible scenario, the number of applications can be the number of foreground applications, representing the resource requirements of an electronic device when running that number of foreground applications.

[0107] In another possible scenario, the number of applications could also be the number of background applications, representing the resource requirements of an electronic device when running that number of background applications.

[0108] In another possible scenario, the number of applications may also include the number of foreground and background applications, to characterize the resource requirements of an electronic device when running that number of foreground and background applications.

[0109] In another embodiment, the application running information also includes the application identifier of the running application, with different application identifiers used to characterize the electronic device's demand for different amounts of resources.

[0110] In one possible scenario, the application identifier can be the application identifier of a foreground application, representing the resource requirements of the electronic device when running the foreground application corresponding to that application identifier.

[0111] In another possible scenario, the application identifier can also be the application identifier of a background application, to represent the resource requirements of the electronic device when the background application corresponding to the application identifier is running.

[0112] In another possible scenario, the application identifier may also include application identifiers for foreground and background applications to characterize the resource requirements of the electronic device when running the foreground and background applications corresponding to the application identifier.

[0113] In some embodiments, the different application identifiers mentioned above are used to characterize the electronic device's demand for different amounts of resources. They may be determined by testing in scenarios where different application identifiers are run in advance, or they may be determined based on the resource usage of the electronic device in the past when the application corresponding to the application identifier was run.

[0114] S402, based on the above application operation information, it is determined that the above electronic device is in a target usage scenario; the target usage scenario is a scenario where the demand for resources is greater than the resource threshold.

[0115] In some embodiments, the target usage scenario may include at least one of the following: a scenario where a preset application is running in the foreground, a multi-application launch scenario, a split-screen scenario, and a multi-window usage scenario (such as a multi-window scenario). The electronic device can determine whether it is in at least one of these scenarios based on the application running information described above.

[0116] For example, if the number of applications in the application running information is greater than 1, the electronic device can determine that the electronic device is in at least one of the multi-application launch scenario, split-screen scenario, and multi-window usage scenario.

[0117] For example, if the application identifier in the application running information is a preset application identifier, it can be determined that the electronic device is in a scenario where a preset application is running in the foreground, such as a scenario where a game application is running in the foreground (game scenario) or a scenario where a camera application is running in the foreground (camera scenario).

[0118] S403, based on the target use scenario, controls the target application component to delay the execution of the target task.

[0119] In this embodiment of the application, the target usage scenario of the electronic device can be accurately determined based on the application running information. This allows the electronic device to flexibly control the target application components to delay the execution of target tasks in resource-intensive usage scenarios, thereby alleviating the resource pressure on the electronic device in the current usage scenario, reducing the probability of the electronic device experiencing lag, overheating, and other problems, and improving the user experience.

[0120] In some embodiments, the resource usage information of the electronic device can be determined, and based on the resource usage information, the electronic device can be determined to be in a target usage scenario. Based on the target usage scenario, the target application component can be controlled to delay the execution of the target task, thereby realizing a method for managing application components.

[0121] Figure 5 This is a schematic flowchart of an application component management method 500 provided in an embodiment of this application. Figure 5 As shown, the method 500 may include the following steps:

[0122] S501, determine the resource usage information of the electronic device.

[0123] In some embodiments, the resource usage information may be at least one of the following: memory information, processor information, and temperature information of the electronic device.

[0124] For example, the memory information may specifically include memory availability, memory usage rate, etc.; the processor information may include the number of working processors, processor power consumption, etc.; and the temperature information may include temperature rise rate, current temperature, etc.

[0125] Optionally, the resource usage information shown above is merely exemplary and is not intended to limit the scope of this application.

[0126] S502, based on the resource usage information, determine that the above-mentioned electronic device is in a target usage scenario; the target usage scenario is a scenario where the demand for resources is greater than the resource threshold.

[0127] In some embodiments, different resource usage information can characterize the different resource requirements of electronic devices.

[0128] For example, when the resource usage information is memory information, if the memory balance is small and the memory usage rate is large, it can be determined that the electronic device has a large demand for resources, that is, the electronic device is in the target usage scenario.

[0129] For example, when the resource usage information is processor information, if there are a large number of processors working, it can be determined that the electronic device has a large demand for resources and is in the target usage scenario.

[0130] For example, when the resource usage information is temperature information, it can be determined that the electronic device has a large demand for resources and is in the target usage scenario when the temperature rise rate is large.

[0131] S503, based on the target use scenario, controls the target application component to delay the execution of the target task.

[0132] In this embodiment, the target usage scenario of the electronic device can be accurately and efficiently determined based on resource usage information. This allows the electronic device to flexibly control the delay of target application components in the execution of target tasks under heavy resource usage scenarios, thereby alleviating the resource pressure on the electronic device in the corresponding usage scenario, reducing the probability of the electronic device experiencing problems such as lag and overheating, and improving the user experience.

[0133] In some embodiments, the electronic device may also control the target application component to perform the aforementioned target task after a delay of a target time period, or when it is detected that the electronic device has exited the target usage scenario.

[0134] Figure 6 This is a schematic flowchart of an application component management method 600 provided in an embodiment of this application. Figure 6 As shown, the method 600 may include the following steps:

[0135] S601, determine that the electronic device is in a target usage scenario; the target usage scenario is a scenario where the demand for resources is greater than the resource threshold.

[0136] S602, based on the target use scenario, when the triggering conditions of the target application component are detected, control the target application component to delay the execution of the target task corresponding to the background application.

[0137] S603, after a target time delay, or when the electronic device is detected to have exited the target usage scenario, control the target application component to perform the aforementioned target task.

[0138] In one possible implementation, the electronic device can determine when to exit a target usage scenario based on the resource usage information or application operation information.

[0139] For example, in scenarios where the electronic device is not running a preset application in the foreground based on application running information, in multi-application startup scenarios, in split-screen scenarios, and in multi-window usage scenarios, the target component is controlled to perform the target task.

[0140] For example, if it is determined based on resource usage information that the electronic device is not in the target usage scenario, the electronic device can control the target application component to perform the target task.

[0141] In some embodiments, the target time periods corresponding to different target application components are different.

[0142] For example, an electronic device may control a first application component to perform a first target task after a first target time period is delayed.

[0143] For example, the electronic device can control the second application component to perform the second target task after a second target time delay.

[0144] In some embodiments, different target application components may also correspond to the same target time period (such as a third target time period).

[0145] For example, the electronic device can control the corresponding target application component to execute the delayed target task after the target task of any target application component in the first component, second component, third component, and fourth component is delayed by a third target time, so as to avoid the target task to be executed being delayed for too long or not executed, which would cause abnormal functioning of the electronic device and affect the user experience.

[0146] In this embodiment, in addition to controlling the target application component to delay the execution of the target task according to the target usage scenario, the electronic device can also accurately control the target application component to execute the target task after the target time period is delayed, or when the electronic device is detected to have exited the target usage scenario. This can alleviate the resource pressure on the electronic device and effectively reduce the probability of functional problems caused by the target task being delayed for too long or not executed.

[0147] In some embodiments, the electronic device may also control the target application components to execute the target task in batches.

[0148] Figure 7 This is a schematic flowchart of an application component management method 700 provided in an embodiment of this application. Figure 7 As shown, the method 700 may include the following steps:

[0149] S701, based on the target use scenario, when the triggering conditions of the target application component are detected, control the target application component to delay the execution of the target task corresponding to the background application.

[0150] S702, after determining the target delay time period, or after detecting that the electronic device has exited the target usage scenario.

[0151] S703, determine whether the number of target tasks to be executed by the target application component is greater than or equal to the task number threshold.

[0152] S704, if the number of target tasks to be executed by the target application component is greater than or equal to the task number threshold, the target tasks to be executed are divided into multiple groups of tasks, and the target application component is controlled to execute the multiple groups of tasks in sequence.

[0153] In some embodiments, the multiple groups of tasks can each correspond to a different execution time, in order to avoid the problem of electronic devices malfunctioning due to the execution of a large number of target tasks at the same time.

[0154] When there is only one target application component, each of the multiple task groups can include different target tasks to be executed by the target application component.

[0155] For example, when the target application component is a first component, if it is determined that the number of first target tasks to be executed by the first component exceeds the task number threshold, the electronic device can divide the first target task component to be executed into at least two groups, such as a first group of tasks and a second group of tasks, and control the first component to execute the first target tasks in the at least two groups of tasks in sequence at different times, such as executing the first target tasks in the first group of tasks in sequence in a first time, and executing the first target tasks in the second group of tasks in sequence in a second time.

[0156] When there are multiple target application components, each group of tasks in the multiple task groups may also include the target tasks to be executed for each of the target application components.

[0157] In one possible scenario, the task quantity threshold is the threshold number of tasks corresponding to the target tasks to be executed by the multiple target application components.

[0158] For example, when the target application components are a first component and a second component, if the total number of first target tasks to be executed by the first component and the second target tasks to be executed by the second component is greater than or equal to a task number threshold, the first target tasks to be executed by the first component and the second target tasks to be executed by the second component are divided into at least two groups, such as a third group of tasks and a fourth group of tasks. Both the third group of tasks and the fourth group of tasks include the first target tasks and the second target tasks to be executed. The electronic device can control the first component and the second component to execute the target tasks in the at least two groups of tasks sequentially at different times. For example, the first target tasks and the second target tasks in the third group of tasks are executed sequentially during a third time period, and the first target tasks and the second target tasks in the fourth group of tasks are executed sequentially during a fourth time period.

[0159] Optionally, the aforementioned task quantity threshold can also be the task quantity threshold corresponding to the target tasks to be executed by each target application component. For example, if the electronic device determines that the first target task to be executed by the first component is greater than or equal to the first task quantity threshold, and the second target task to be executed by the second component is greater than or equal to the second task quantity threshold, the electronic device divides the first target task to be executed by the first component and the second target task to be executed by the second component into at least two groups, such as a third group of tasks and a fourth group of tasks, and controls the first component and the second component to execute the target tasks in the at least two groups of tasks sequentially at different times.

[0160] Optionally, when there are multiple target application components, each group of tasks in the multiple groups of tasks may also include target tasks to be executed for different target application components.

[0161] For example, when the target application components are the first component and the second component, if the total number of tasks of the first target task to be executed by the first component and the second target task to be executed by the second component is greater than or equal to the task number threshold, the first target task to be executed by the first component can be divided into a fifth group of tasks, the second target task to be executed by the second component can be divided into a sixth group of tasks, and the first component can be controlled to execute the fifth group of tasks at a fifth time, and the second component can be controlled to execute the sixth group of tasks at a sixth time.

[0162] Optionally, upon receiving the above 703, if it is determined that the number of target tasks to be executed by the target application component is not greater than or equal to the task number threshold, the electronic device may further perform the following steps:

[0163] S705, control the target application component to perform the above-mentioned target task.

[0164] In this embodiment, in addition to accurately controlling the target application component to execute the aforementioned target task after a delay of the target time period or when the electronic device is detected to have exited the target usage scenario, the electronic device can also control the target application component to execute a large number of target tasks in batches according to the number of target tasks to be executed. This reduces the probability of functional problems caused by the failure to execute target tasks and also avoids the probability of functional problems caused by the execution of a large number of target tasks in a short period of time.

[0165] Figure 8 This is a schematic diagram of a management architecture 800 for an application component provided in this application. (See diagram below.) Figure 8 As shown, the management architecture 800 includes a scenario center 801, a decision center 802, and a strategy center 803. The scenario center 801 can be used to identify the usage scenarios of electronic devices, such as... Figure 8 The diagram illustrates game scenario 1, application launch scenario 2, split-screen scenario 3, and multi-window scenario 4. The decision center 802 can determine whether the resource requirements of the electronic device's usage scenario exceed the resource threshold. The strategy center 803, upon determining that the current scenario is resource-intensive, can manage the delayed execution of at least one target application component's corresponding target task to alleviate the resource pressure on the electronic device.

[0166] like Figure 8As shown, the strategy center 803 includes multiple target application components, such as component 1 (job component), component 2 (service restart component), component 3 (alarm component), and component 4 (broadcast component). Component 1 includes a distributed task module 11 (i.e., job module), component 2 includes a service module 21 (i.e., service module), component 3 includes a timer module 31 (i.e., alarm module), and component 4 includes a broadcast module 41 (i.e., broadcast module).

[0167] like Figure 8 As shown, the distributed task module 11 includes a delay module 81 (delay job module) and a rescheduling module 82 (reschedule job module). The distributed task module 11 can delay the target task of component 1 through the delay module 81 and execute the pending target task of component 1 through the rescheduling module 82. See below for details. Figure 9 and Figure 10 .

[0168] like Figure 8 As shown, service module 21 includes a service restart module 83 and a reschedule service module 84. Service module 21 can delay the execution of the target task of component 2 through service restart module 83, and execute the pending target task of component 2 through reschedule module 84. See below for details. Figure 15 and Figure 16 .

[0169] like Figure 8 As shown, the timer module 31 includes a delay module 85 (delay alarm module) and a reschedule module 86 (reschedule alarm module). The timer module 31 can delay the execution of the target task of component 3 through the delay module 85, and execute the pending target task of component 3 through the reschedule module 86. See below for details. Figure 11 and Figure 12 .

[0170] like Figure 8 As shown, the broadcast module 41 includes a broadcast proxy module 87 and an unproxy broadcast module 88. The broadcast module 41 can delay the execution of the target task of component 4 through the broadcast proxy module 87, and execute the pending target task of component 4 through the unproxy module 88. See below for details. Figure 13 and Figure 14 .

[0171] In the embodiments of this application, when the electronic device is determined to be in a target usage scenario, it can flexibly control different target application components to delay the execution of target tasks based on the target usage scenario. In different resource-intensive usage scenarios, by controlling different target application components, different types and quantities of target tasks can be delayed to alleviate the resource pressure of the electronic device to varying degrees. This reduces the probability of the electronic device experiencing problems such as lag and overheating, while also further improving the flexibility of application component management.

[0172] The following describes the management method of the application components provided in this application, taking as an example that the target application components include distributed task job components and the target task corresponding to the background application is executed with a delay.

[0173] Figure 9 This is a schematic flowchart of an application component management method 900 provided in an embodiment of this application. Figure 9 As shown, the method 900 may include the following steps:

[0174] S901, determine that the above-mentioned electronic device is in a target usage scenario; the target usage scenario is a scenario where the demand for resources is greater than the resource threshold.

[0175] S902, based on this target use case, when it is detected that the distributed task execution conditions corresponding to the job component are met, the distributed task corresponding to the background application is added to the restriction list, so that the job component delays the execution of the distributed task in the restriction list.

[0176] Figure 10 This is a schematic diagram illustrating the management of the job component provided in an embodiment of this application. For example... Figure 10 As shown, based on this target use case, when the conditions for executing the distributed task corresponding to the job component are met, the distributed task corresponding to the background application can be added to the restriction list 102 through the delay module 81, so that the job component delays the execution of the distributed task in the restriction list 102.

[0177] In one possible implementation, the entry and exit of the target scene can be monitored by adding a new restrictor class (CustomJobRestriction).

[0178] like Figure 10 As shown, the delay module 81 can listen to the target usage scenario through the limiter class and, if the distributed task execution conditions corresponding to the job component are met, control the task scheduling service module 101 (JobSchedulerService) to add the distributed task corresponding to the background application to the limit list 102.

[0179] like Figure 10 As shown, the rescheduling module 82 can control the task scheduling service module 101 (JobSchedulerService) to execute the distributed tasks in the restriction list 102 when the restriction class detects that the target usage scenario has been exited.

[0180] For example, when the limiter class detects scenarios such as the electronic device exiting the foreground to run a preset application, multiple application startup scenarios, split-screen scenarios, and multi-window usage scenarios, the rescheduling module 82 can control the task scheduling service module 101 (JobSchedulerService) to execute the distributed tasks in the limit list 102.

[0181] In this embodiment, when the electronic device is determined to be in a target usage scenario, it can flexibly control the job component to delay the execution of the distributed tasks corresponding to the background application based on the target usage scenario. This can alleviate the resource pressure brought about by the job component in the electronic device processing the target tasks corresponding to the background application, while also controlling the job component to execute the distributed tasks corresponding to the foreground application normally. This ensures that the foreground application obtains sufficient resources, reduces the probability of affecting the user's normal use of the electronic device, and reduces phenomena such as electronic device lag and overheating.

[0182] The following describes the application component management method provided in this application, taking as an example a target application component that includes a timer alarm component and delays the execution of the target task corresponding to the background application.

[0183] Figure 11 This is a schematic flowchart of an application component management method 1100 provided in an embodiment of this application. Figure 11 As shown, the method 1100 may include the following steps:

[0184] S1101, determine that the above-mentioned electronic device is in a target usage scenario; the target usage scenario is a scenario where the demand for resources is greater than the resource threshold.

[0185] S1102, based on the target use case, when it is detected that the execution conditions of the timed task corresponding to the alarm component are met, the trigger time of the timed task corresponding to the background application in the alarm component is adjusted to the target trigger time. The target trigger time is later than the initial trigger time of the timed task, so that the alarm component delays the execution of the timed task corresponding to the background application based on the target trigger time.

[0186] Figure 12 This is a schematic diagram illustrating the management of the alarm component provided in an embodiment of this application. Figure 12As shown, in the Android system, the electronic device can provide a timing service to the application layer module 121 through the timing service module 122 (AlarmManagerService), so that the application layer module 121 can set a timing task (i.e., the initial trigger time mentioned above). The trigger time of each timing task is a window interval. The beginning of the window is the expected time (whenElapsed) set by the user through the application layer module 121, and the end of the window is the latest trigger time (maxWhenElapsed). The timing service module 122 sets the trigger time of the timing task to the kernel through the first interface 123 (Java Native Interface, JNI), and sets and manages it through the timer interface (timerfd) and the real time clock (RTC) driver in the kernel.

[0187] like Figure 12 As shown, the scheduled service module 122 includes a native strategy module 1221, which can adjust the trigger time of scheduled tasks through native strategies (such as BatterySaver, AppStandby, Doze).

[0188] like Figure 12 As shown, when the electronic device is in the target usage scenario and the execution conditions of the timed task corresponding to the alarm component are met, the delay module 85 can adjust the trigger time of the timed task corresponding to the background application in the alarm component to the target trigger time. The target trigger time is later than the initial trigger time of the timed task, so that the alarm component delays the execution of the timed task corresponding to the background application based on the target trigger time.

[0189] In this embodiment, when the electronic device is determined to be in a target usage scenario, it can flexibly adjust the trigger time of the timed task corresponding to the background application in the alarm component to the target trigger time based on the target usage scenario. This allows the alarm component to delay the execution of the timed task corresponding to the background application based on the target trigger time, thereby alleviating the resource pressure on the electronic device. At the same time, it can also control the alarm component to execute the timed task corresponding to the foreground application normally, ensuring that the foreground application obtains sufficient resources and reducing phenomena such as lag and overheating of the electronic device.

[0190] The following describes the application component management method provided in this application, taking as an example that the target application component includes a broadcast component and the target task corresponding to the background application is executed with a delay.

[0191] Figure 13 This is a schematic flowchart of an application component management method 1300 provided in an embodiment of this application. Figure 13 As shown, the method 1300 may include the following steps:

[0192] S1301, determine that the above-mentioned electronic device is in a target usage scenario; the target usage scenario is a scenario where the demand for resources is greater than the resource threshold.

[0193] S1302, based on the target use case, when it is detected that the execution conditions of the broadcast distribution task corresponding to the broadcast component are met, the broadcast information corresponding to the background application is added to the proxy list so that the broadcast component delays sending the broadcast information in the proxy list.

[0194] Figure 14 This is a schematic diagram illustrating the management of the broadcast component provided in an embodiment of this application. Figure 14 As shown, when the broadcast component starts broadcasting, it can add the broadcast information corresponding to the background application to the proxy list (pending list) in the target usage scenario (such as application startup scenario, split-screen scenario, game scenario, multi-window scenario) so that the broadcast component delays sending the broadcast information in the proxy list.

[0195] like Figure 14 As shown, after determining the target delay time period, or when it is detected that the electronic device has exited the target usage scenario, the proxy module 88 can be used to determine whether there is a proxy list, so as to determine whether there is broadcast information to be executed by the broadcast component.

[0196] For example, if there is no proxy list, it can be determined that there is no broadcast information to be executed by the broadcast component, and the cancel proxy module 88 can do nothing.

[0197] For example, if a proxy list exists, it can be determined that there is broadcast information to be executed by the broadcast component, and the broadcast information in the proxy list can be sent by canceling the proxy module 88.

[0198] like Figure 14 In order to prevent the receiver of the broadcast information in the proxy list from being killed, that is, the background application corresponding to the broadcast information is cleaned up, resulting in invalid broadcast information and increasing the resource pressure of electronic devices, the proxy module 88 can also determine whether the background application corresponding to the broadcast information is in a keep-alive state.

[0199] For example, if the background application is killed, it means that the recipient of the broadcast message no longer exists, so the cancellation agent module 88 can do nothing.

[0200] For example, if the background application is not killed, in order to avoid the background application malfunctioning due to a long delay in sending the broadcast information corresponding to the background application, the cancel proxy module 88 can send the broadcast information in the proxy list in a timely manner.

[0201] like Figure 14 As shown, in the target use case, during the process of adding broadcast information to the broadcast list, the broadcast proxy module 87 updates the number of broadcast information in the broadcast list until the number of broadcast information in the proxy list is greater than or equal to the number threshold. Then, all or part of the broadcast information in the proxy list can be canceled and the broadcast information in the proxy list can be sent through the cancellation proxy module 88.

[0202] In the cancellation agent section, broadcast information exceeding the quantity threshold in the agent list can be sent by the cancellation agent module 88, so as to realize the batch processing of broadcast information, such as delaying the sending of broadcast information exceeding the quantity threshold, and sending broadcast information exceeding the quantity threshold immediately.

[0203] In the case of canceling all broadcast messages from the proxy, all broadcast messages in the proxy list can be sent by canceling proxy module 88.

[0204] like Figure 14 The broadcast proxy module 87 can also update the broadcast records so that the proxy list contains only the target broadcast information from the most recent broadcast record, in order to avoid storing multiple identical target broadcast information in the proxy list.

[0205] In this embodiment, when the electronic device is determined to be in a target usage scenario, it can control the broadcast component to delay sending the broadcast information in the proxy list based on the target usage scenario. This can alleviate the resource pressure on the electronic device while also controlling the broadcast component to execute the broadcast information corresponding to the foreground application normally, ensuring that the foreground application obtains sufficient resources and reducing phenomena such as lag and overheating of the electronic device.

[0206] The following describes the application component management method provided in this application, taking the target application component including the service restart component and the delayed execution of the target task corresponding to the background application as an example.

[0207] Figure 15 This is a schematic flowchart illustrating an application component management method 1500 provided in an embodiment of this application. Figure 15 As shown, the method 1500 may include the following steps:

[0208] S1501, determine that the above-mentioned electronic device is in a target usage scenario; the target usage scenario is a scenario where the demand for resources is greater than the resource threshold.

[0209] S1502, based on the target use case, when it is detected that the execution conditions of the restart task corresponding to the service restart component are met, the target restart time of the restart task corresponding to the background application is set. The target restart time is later than the current time. The restart task corresponding to the background application and the target trigger restart time are added to the delayed restart list so that the service restart component delays the execution of the restart task in the delayed restart list.

[0210] Figure 16 This is a schematic diagram illustrating the management of the service restart component provided in an embodiment of this application. For example... Figure 16 As shown, when the conditions for executing the restart task corresponding to the service restart component are met, such as the application crashing and the electronic device entering the target usage scenario, the service restart module 83 sets the delay of the restart task corresponding to the application through the delay module 831 and sets the target restart time of the restart task corresponding to the application through the time module 832. The target restart time is later than the current time. The restart task corresponding to the application and the target trigger restart time are added to the delayed restart list so that the service restart component delays the execution of the restart tasks in the delayed restart list.

[0211] In one possible implementation, such as Figure 16 As shown, the rescheduling module 84 can also execute the restart task in the delayed restart list through the restart module 841 when it detects that the electronic device has exited the target usage scenario.

[0212] In another possible implementation, the rescheduling module 84 can execute the restart tasks in the delayed restart list through the restart module 841 if the target time period is delayed to the target restart time mentioned above.

[0213] In this embodiment, when the electronic device is determined to be in a target usage scenario, it can control the service restart component to delay the execution of the restart tasks corresponding to the background applications in the delayed restart list based on the target usage scenario. This can alleviate the resource pressure on the electronic device caused by starting background applications, while also controlling the servicerestart component to normally execute the restart tasks corresponding to the foreground applications, ensuring that the foreground applications obtain sufficient resources and reducing phenomena such as electronic device lag and overheating.

[0214] It should also be understood that the various embodiments described above can be coupled to each other, and this application does not limit this. Furthermore, the sequence number of each process does not imply the order of execution; the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0215] The above text combines Figures 1 to 16 The present application describes in detail the management method of application components according to embodiments of the present application. The following will be combined with... Figure 17 and Figure 18 This application describes in detail the management device for application components in its embodiments.

[0216] Figure 17 An application component management device 1700 according to an embodiment of this application is shown. The application component management device 1700 includes a scenario determination module 1701 and a delay control module 1702. The scenario determination module 1701 is used to: determine that the electronic device is in a target usage scenario; the target usage scenario is a scenario where the resource demand is greater than a resource threshold; the delay control module 1702 is used to: control the target application component to delay the execution of a target task based on the target usage scenario.

[0217] Optionally, the scenario determination module 1701 is used to: obtain application operation information of the above-mentioned electronic device; and determine that the above-mentioned electronic device is in a target usage scenario based on the above-mentioned application operation information.

[0218] Optionally, the scenario determination module 1701 is used to: determine the resource usage information of the aforementioned electronic device; and determine, based on the aforementioned resource usage information, that the aforementioned electronic device is in a target usage scenario.

[0219] Optionally, the delay control module 1702 is used to: control the target application component to delay the execution of the target task corresponding to the background application when the triggering conditions of the target application component are detected.

[0220] Optionally, the target application components mentioned above include at least one of the following: a distributed task (job) component, a timer (alarm) component, a broadcast (broadcast) component, and a service restart (service restart) component.

[0221] Optionally, the target application component includes a distributed task job component. The delay control module 1702 is used to: add the distributed task corresponding to the background application to the restriction list when the execution conditions of the distributed task corresponding to the job component are met, so that the job component delays the execution of the distributed task in the restriction list.

[0222] Optionally, the target application component includes a timer alarm component. The delay control module 1702 is used to: when the execution conditions of the timed task corresponding to the alarm component are met, adjust the trigger time of the timed task corresponding to the background application in the alarm component to a target trigger time. The target trigger time is later than the initial trigger time of the timed task, so that the alarm component delays the execution of the timed task corresponding to the background application based on the target trigger time.

[0223] Optionally, the target application component includes a broadcast component, and the delay control module 1702 is used to: add the broadcast information corresponding to the background application to the proxy list when it is detected that the broadcast distribution task execution conditions corresponding to the broadcast component are met, so that the broadcast component delays sending the broadcast information in the proxy list.

[0224] Optionally, the delay control module 1702 is used to: control the broadcast component to send the broadcast information in the proxy list if the number of broadcast information in the proxy list is greater than or equal to the number threshold.

[0225] Optionally, the target application component includes a service restart component. The delay control module 1702 is used to: when the execution conditions of the restart task corresponding to the service restart component are met, set a target restart time for the restart task corresponding to the background application, wherein the target restart time is later than the current time; and add the restart task corresponding to the background application and the target restart time to the delayed restart list, so that the service restart component delays the execution of the restart tasks in the delayed restart list.

[0226] Optionally, the delay control module 1702 is used to: control the target application component to perform the target task after a target delay period; or, control the target application component to perform the target task when it is detected that the electronic device has exited the target usage scenario.

[0227] Optionally, the delay control module 1702 is used to: divide the target tasks to be executed into multiple groups of tasks when the number of target tasks to be executed by the target application component is greater than or equal to the task number threshold, and control the target application component to execute the multiple groups of tasks in sequence.

[0228] It should be understood that the application component management device 1700 here is embodied in the form of a functional module. The term "module" here can refer to an application-specific integrated circuit (ASIC), electronic circuitry, a processor (e.g., a shared processor, a proprietary processor, or a group processor, etc.) and memory for executing one or more software or firmware programs, integrated logic circuitry, and / or other suitable components supporting the described functions. In an alternative example, those skilled in the art will understand that the application component management device 1700 can be specifically the electronic device in the above embodiments, or the functions of the electronic device in the above embodiments can be integrated into the application component management device 1700. The application component management device 1700 can be used to execute the various processes and / or steps corresponding to the electronic device in the above method embodiments; to avoid repetition, these will not be described again here. The application component management device 1700 has the function of implementing the corresponding steps executed by the electronic device in the above method; the above functions can be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions. In the embodiments of this application, Figure 17 The application component management device 1700 can also be a chip or a chip system, such as a system on chip (SoC).

[0229] Figure 18 An electronic device 1800 according to an embodiment of this application is shown. The electronic device 1800 includes a processor 1801, a memory 1802, a communication interface 1803, and a bus 1804. The memory 1802 stores instructions, and the processor 1801 executes the instructions stored in the memory 1802. The processor 1801, memory 1802, and communication interface 1803 are interconnected via the bus 1804.

[0230] The processor 1801 is configured to: determine that the electronic device is in a target usage scenario; the target usage scenario is a scenario in which the demand for resources is greater than a resource threshold; and, based on the target usage scenario, control the target application component to delay the execution of the target task.

[0231] It should be understood that the electronic device 1800 may specifically be the electronic device in the above embodiments, or the functions of the electronic device in the above embodiments may be integrated into the electronic device 1800. The electronic device 1800 may be used to execute the various steps and / or processes corresponding to the electronic device in the above method embodiments. Optionally, the memory 1802 may include read-only memory and random access memory, and provide instructions and data to the processor 1801. A portion of the memory 1802 may also include non-volatile random access memory. For example, the memory 1802 may also store device type information. The processor 1801 may be used to execute instructions stored in the memory, and when the processor executes the instructions, the processor 1801 may execute the various steps and / or processes corresponding to the electronic device in the above method embodiments. It should be understood that in the embodiments of this application, the processor may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor. In implementation, the steps of the above methods can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The steps of the methods disclosed in the embodiments of this application can be directly implemented by a hardware processor, or by a combination of hardware and software modules in the processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory, and the processor executes the instructions in the memory, combining with its hardware to complete the steps of the above methods. To avoid repetition, detailed descriptions are not provided here. Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application. Those skilled in the art will readily understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood from the several embodiments provided in this application that the disclosed systems, devices, and methods can be implemented in other ways.For example, the device embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some interfaces, indirect couplings, or communication connections between devices or units, and may be electrical, mechanical, or other forms. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs. Additionally, the functional units in the various embodiments of this application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. If the function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk. The above descriptions are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for managing application components, characterized in that, Applied to electronic devices, the method includes: The electronic device is determined to be in a target usage scenario; the target usage scenario is a scenario where the demand for resources is greater than a resource threshold. Based on the target use case, control the target application components to delay the execution of the target task.

2. The method according to claim 1, characterized in that, Determining that the electronic device is in a target usage scenario includes: Obtain the application operation information of the electronic device; Based on the application's runtime information, it is determined that the electronic device is in the target usage scenario.

3. The method according to claim 1, characterized in that, Determining that the electronic device is in a target usage scenario includes: Determine the resource usage information of the electronic device; Based on the resource usage information, it is determined that the electronic device is in the target usage scenario.

4. The method according to claim 1, characterized in that, The control target application component delays the execution of the target task, including: If the triggering condition of the target application component is detected, the target application component is controlled to delay the execution of the target task corresponding to the background application.

5. The method according to any one of claims 1 to 4, characterized in that, The target application components include at least one of the following: a distributed task (job) component, a timer (alarm) component, a broadcast (broadcast) component, and a service restart (service restart) component.

6. The method according to claim 4, characterized in that, The target application component includes a distributed task job component. The step of controlling the target application component to delay the execution of the target task corresponding to the background application when the triggering condition of the target application component is detected to be met includes: If the conditions for executing the distributed task corresponding to the job component are met, the distributed task corresponding to the background application is added to the restriction list so that the job component delays the execution of the distributed task in the restriction list.

7. The method according to claim 4, characterized in that, The target application component includes a timer alarm component. The step of controlling the target application component to delay the execution of the target task corresponding to the background application when a trigger condition of the target application component is detected includes: If the execution conditions of the scheduled task corresponding to the alarm component are met, the trigger time of the scheduled task in the alarm component corresponding to the background application is adjusted to the target trigger time. The target trigger time is later than the initial trigger time of the scheduled task, so that the alarm component delays the execution of the scheduled task corresponding to the background application based on the target trigger time.

8. The method according to claim 4, characterized in that, The target application component includes a broadcast component. The step of controlling the target application component to delay the execution of the target task corresponding to the background application when a triggering condition for the target application component is detected includes: If the conditions for executing the broadcast distribution task corresponding to the broadcast component are met, the broadcast information corresponding to the background application is added to the proxy list so that the broadcast component delays sending the broadcast information in the proxy list.

9. The method according to claim 8, characterized in that, The method further includes: If the number of broadcast messages in the proxy list is greater than or equal to the number threshold, then the broadcast component is controlled to send the broadcast messages in the proxy list.

10. The method according to claim 4, characterized in that, The target application component includes a service restart component. The step of controlling the application component to delay the execution of the target task corresponding to the background application when the triggering condition of the target application component is detected to be met includes: If the execution conditions of the restart task corresponding to the service restart component are met, the target restart time of the restart task corresponding to the background application is set, and the target restart time is later than the current time. The restart task corresponding to the background application and the target restart time are added to the delayed restart list so that the service restart component delays the execution of the restart task in the delayed restart list.

11. The method according to any one of claims 1 to 4, characterized in that, The method further includes: After a target time delay, control the target application component to execute the target task; or... If the electronic device is detected to have exited the target usage scenario, the target application component is controlled to execute the target task.

12. The method according to claim 11, characterized in that, The control of the target application component to execute the target task includes: If the number of target tasks to be executed by the target application component is greater than or equal to the task number threshold, the target tasks to be executed are divided into multiple groups of tasks, and the target application component is controlled to execute the multiple groups of tasks in sequence.

13. A management device for application components, applied to electronic devices, characterized in that, include: A scenario determination module is used to determine that the electronic device is in a target usage scenario; the target usage scenario is a scenario where the demand for resources is greater than a resource threshold. The delay control module is used to control the target application component to delay the execution of the target task based on the target use scenario.

14. An electronic device, characterized in that, It includes a processor and a memory, the memory being used to store code instructions; the processor being used to execute the code instructions to perform the method as described in any one of claims 1 to 12.

15. A computer program product, said computer program product comprising computer program code, characterized in that, When the computer program code is run on a computer, it causes the computer to implement the method as described in any one of claims 1 to 12.