Application program management and control method and device, electronic equipment and computer readable storage medium
By acquiring the power consumption parameters and dynamic weights of applications, identifying the current scenario, determining the power consumption level, and enabling fine-grained control over applications, this addresses the shortcomings of mobile device power consumption management and improves user experience and device energy efficiency.
Patent Information
- Application Number
- CN202511044981.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-28
- Publication Date
- 2025-11-14
AI Technical Summary
The power consumption issues caused by mobile applications running continuously in the background, coupled with the lack of granular monitoring and management of individual applications in existing technologies, negatively impact user experience.
By acquiring multiple power consumption parameters of the application, the current scenario is identified, the dynamic weight of the power consumption parameters in the current scenario is obtained, the power consumption level is determined, and fine-grained management is carried out based on the power consumption level, including reminders, restrictions, or uninstallation of the application.
It enables fine-grained power consumption management for individual applications, meets the control requirements of different scenarios, and improves user experience and device energy saving.
Smart Images

Figure CN120950330A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, specifically to a method, apparatus, electronic device, and computer-readable storage medium for managing applications. Background Technology
[0002] Battery life is a key concern for mobile device users, but advancements in battery technology have been relatively slow, failing to meet users' demands for extended use. The increasing complexity and diversity of applications have exacerbated power consumption issues, with many applications running continuously in the background, consuming significant amounts of power and severely impacting user experience. Current power management technologies primarily focus on the system level, lacking granular monitoring and management of the power consumption behavior of individual applications. Summary of the Invention
[0003] This application provides a method, apparatus, electronic device, and computer-readable storage medium for managing applications, which can finely manage the power consumption of individual applications.
[0004] In a first aspect, embodiments of this application provide a method for managing an application, including:
[0005] Obtain multiple power consumption parameters from the application;
[0006] Identify the current scene;
[0007] Obtain the dynamic weights of each of the power consumption parameters in the current scenario;
[0008] The power consumption level of the application is determined based on multiple power consumption parameters of the application and the dynamic weights corresponding to each of the multiple power consumption parameters in the current scenario.
[0009] The application is managed according to its power consumption level.
[0010] In one embodiment, identifying the current scene includes:
[0011] Obtain the parameters of the electronic device where the application is located; the parameters of the electronic device include any one or more of the following: device type, hardware parameters, and operating system parameters;
[0012] Identify the current usage mode of the electronic device; the usage mode includes any one or more of the following: night mode, game mode, and / or video mode;
[0013] The current scenario is identified based on the parameters of the electronic device where the application is located and the current usage pattern of the electronic device.
[0014] In one embodiment, controlling the application based on its power consumption level includes:
[0015] Obtain the power consumption level threshold;
[0016] When the power consumption level of the application exceeds the power consumption level threshold, query the list of applications that the user has set to ignore notifications;
[0017] When the power consumption level of the application is greater than the power consumption level threshold, and the application is not on the list of applications to ignore reminders, a reminder to control the application is sent.
[0018] When the power consumption level of the application exceeds the power consumption level threshold, and the application is on the list of applications to ignore reminders, a reminder to control the application is sent, and the option to ignore the reminder is displayed.
[0019] In one embodiment, the power consumption level threshold includes: a first power consumption level threshold and a second power consumption level threshold;
[0020] Sending the notification to control the application includes:
[0021] When the power consumption level of the application is greater than the first power consumption level threshold but not greater than the second power consumption level threshold, a first reminder suggesting limiting the operation of the application is sent.
[0022] When the power consumption level of the application exceeds the second power consumption level threshold, a second reminder suggesting that the application be uninstalled is sent.
[0023] In one embodiment, controlling the application based on its power consumption level includes:
[0024] Obtain the threshold for the third power consumption level;
[0025] When the power consumption level of the application exceeds the third power consumption level threshold, the application is prohibited from running.
[0026] In one embodiment, the method further includes:
[0027] Obtain the power consumption levels of multiple applications;
[0028] The power consumption levels of the multiple applications are sorted to obtain a power consumption ranking list;
[0029] The power consumption ranking list is displayed.
[0030] In one embodiment, the method further includes:
[0031] In response to the opening of the application's details page, the power consumption level of the application and / or multiple power consumption parameters of the application are displayed.
[0032] In one embodiment, the power consumption parameters of the application include any one or more of the following: CPU utilization, GPU utilization, memory utilization, Wake Lock usage, network request frequency, sensor usage, background service runtime, AlarmManager wake-up count, and screen wake-up count.
[0033] Secondly, embodiments of this application provide an application management device, including:
[0034] The parameter acquisition module is used to acquire multiple power consumption parameters of the application.
[0035] The recognition module is used to identify the current scene;
[0036] The weight acquisition module is used to acquire the dynamic weights of the multiple power consumption parameters in the current scenario.
[0037] The determination module is used to determine the power consumption level of the application based on multiple power consumption parameters of the application and the dynamic weights corresponding to each of the multiple power consumption parameters in the current scenario.
[0038] The control module is used to control the application based on its power consumption level.
[0039] In one embodiment, the identification module includes:
[0040] The parameter acquisition unit is used to acquire parameters of the electronic device where the application is located; the parameters of the electronic device include any one or more of the following: device type, hardware parameters, and operating system parameters;
[0041] A pattern recognition unit is used to identify the current usage mode of the electronic device; the usage mode includes any one or more of the following: night mode, game mode, and / or video mode;
[0042] The scene recognition unit is used to identify the current scene based on the parameters of the electronic device where the application is located and the current usage mode of the electronic device.
[0043] In one embodiment, the control module includes:
[0044] The first threshold acquisition unit is used to acquire the power consumption level threshold.
[0045] The query unit is used to query the list of applications whose notifications are ignored by the user when the power consumption level of the application is greater than the power consumption level threshold.
[0046] The first sending unit is configured to send a reminder to control the application when the power consumption level of the application is greater than the power consumption level threshold and the application is not in the list of applications to ignore reminders;
[0047] The second sending unit is configured to send a reminder to control the application when the power consumption level of the application is greater than the power consumption level threshold and the application is in the list of applications to ignore reminders, and to display the option to ignore the reminder.
[0048] In one embodiment, the power consumption level threshold includes: a first power consumption level threshold and a second power consumption level threshold; the first transmitting unit and / or the second transmitting unit includes:
[0049] The first sending subunit is configured to send a first reminder suggesting limiting the operation of the application when the power consumption level of the application is greater than the first power consumption level threshold and not greater than the second power consumption level threshold.
[0050] The second sending subunit is used to send a second reminder suggesting uninstalling the application when the power consumption level of the application is greater than the second power consumption level threshold.
[0051] In one embodiment, the control module includes:
[0052] The second threshold acquisition unit is used to acquire the third power consumption level threshold.
[0053] The disable unit is used to disable the application from running when the power consumption level of the application is greater than the third power consumption level threshold.
[0054] In one embodiment, the device further includes:
[0055] A power consumption level acquisition module is used to acquire the power consumption levels of multiple applications.
[0056] The sorting module is used to sort the power consumption levels of multiple applications to obtain a power consumption level ranking list;
[0057] The first display module is used to display the power consumption level ranking.
[0058] In one embodiment, the device further includes:
[0059] The second display module is used to display the power consumption level and / or multiple power consumption parameters of the application in response to the opening operation of the application's details page.
[0060] In one embodiment, the power consumption parameters of the application include any one or more of the following: CPU utilization, GPU utilization, memory utilization, Wake Lock usage, network request frequency, sensor usage, background service runtime, AlarmManager wake-up count, and screen wake-up count.
[0061] Thirdly, embodiments of this application also provide an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the steps in the above-described application control method.
[0062] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in the above-described application management method.
[0063] Fifthly, embodiments of this application also provide a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various optional implementations described in embodiments of this application.
[0064] The embodiments of this application have the following beneficial effects: the weights of multiple power consumption parameters of the application will be dynamically adjusted in different scenarios, thereby meeting the control requirements of the current scenario and accurately determining the power consumption level of the application in the current scenario; and the obtained power consumption parameters are the power consumption parameters of the application, and the determined power consumption level is the power consumption level of the application, so as to achieve fine-grained control of a single application based on the power consumption level of the application. Attached Figure Description
[0065] To more clearly illustrate the technical solutions in this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0066] Figure 1This is a schematic diagram illustrating the steps of an application management method according to an embodiment of this application;
[0067] Figure 2 This is a schematic diagram of the structure of a control device for an application provided in an embodiment of this application;
[0068] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0069] The technical solutions of this application will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0070] In one embodiment, such as Figure 1 As shown, an application management method is provided. Although the logical sequence is illustrated in the step diagram, in some cases, the steps shown or described may be performed in a different order than that shown in the diagram. Specifically, the application management method can be applied to a terminal, which may include, but is not limited to, one or more of smartphones, tablets, laptops, desktop computers, and in-vehicle computers.
[0071] The following sections provide detailed descriptions of each example. It should be noted that the order in which the embodiments are described is not intended to limit the priority of the embodiments.
[0072] according to Figure 1 The application control method shown includes at least steps S110 to S150, which are described in detail below:
[0073] In step S110, multiple power consumption parameters of the application are obtained.
[0074] Application power consumption parameters are metrics used to measure how much energy (such as electrical power) an application consumes during operation. Application power consumption parameters may include, but are not limited to, any one or more of the following: Central Processing Unit (CPU) utilization, Graphics Processing Unit (GPU) utilization, memory utilization, Wake Lock usage, network request frequency, sensor usage, background service runtime, Alarm Manager wake-up count, and screen wake-up count.
[0075] CPU utilization refers to the percentage of CPU time an application spends during its operation. For example, if an application uses the CPU for 30 seconds out of one minute to perform its tasks, then its CPU utilization is 50%.
[0076] Optionally, the application can obtain system process information through corresponding commands, parse the system process information, and extract the application's CPU usage. Optionally, the application's CPU usage can be obtained by reading the / proc / stat and / proc / pid / stat files and calculating the CPU time difference at different times.
[0077] GPU utilization refers to the percentage of time an application spends processing its graphics-related tasks during runtime. GPU utilization reflects the workload on the GPU when handling graphics tasks such as image rendering, video decoding, and 3D modeling. Optionally, you can use tools such as GPU rendering mode analysis in Android Developer Options, or third-party performance monitoring tools (such as GPU Spy) to obtain your application's GPU utilization.
[0078] Memory usage refers to the ratio of memory space used by an application to the total available memory space of the system. Memory usage reflects how much memory resources an application uses; excessively high memory usage can lead to insufficient system memory, affecting the operation of other applications and even causing system crashes. Optionally, system memory information and application memory usage can be obtained through the ActivityManager component.
[0079] Wake lock is a mechanism used to prevent a device from entering a sleep or low-power state, ensuring that the device remains awake while performing a specific task. Wake lock usage information mainly includes the duration of the wake lock holding, the type of wake lock, and the application or service currently holding the wake lock. Optionally, application usage of the wake lock can be determined by monitoring changes in screen wake attributes.
[0080] Network request frequency refers to the number of network requests an application sends per unit of time. It reflects the frequency of data interaction between the application and servers or other network devices. An excessively high network request frequency may consume too much network bandwidth, affecting the network connections of other applications and potentially increasing server load. Optionally, the number and amount of network requests initiated by the application in the background can be tracked; request logging logic can be added to the network library used to count the number of network requests made by the application per unit of time.
[0081] Sensor usage refers to the application's use of the device's sensors, including sensor type, frequency of use, and duration of use. For example, an application might use an accelerometer to detect device motion or a light sensor to automatically adjust screen brightness. Optionally, the frequency and duration of sensor usage by the application can be statistically analyzed; when using the sensor manager, the on / off times of sensors can be recorded to understand sensor usage.
[0082] Background service runtime refers to the duration for which an application's background services run in the background. Background services are those that continue to run in the system background even after the application is closed or switched to the background. They are used to perform tasks that require a long time to run, such as file downloads and data synchronization. Optionally, the duration of background service runtime can be calculated; this can be done by recording the start time when the application begins a background task and the end time when the task ends, and then calculating the time difference.
[0083] The alarm manager wake-up count refers to the number of times an alarm set by an application through the alarm manager wakes the device. An alarm manager is a mechanism for triggering events at specified times or time intervals. Applications can use it to implement scheduled tasks, such as updating data on a schedule or providing reminders. Optionally, the number of times an application wakes the device through the alarm manager can be counted; the number of alarm triggers can also be recorded when setting an alarm.
[0084] Screen wake-up counts refer to the number of times an application causes the device screen to wake up or turn on from a sleep or off state. Screen wake-up counts can reflect an application's responsiveness to user interaction and its impact on device battery life. Optionally, the number of times the application turns on the screen can be counted; or the screen wake-up count can be obtained by listening to relevant notification constants.
[0085] In step S120, the current scene is identified.
[0086] A scenario reflects the attributes of the electronic device on which the application resides and the state of that device. A scenario can be defined from multiple dimensions. For example, it can be determined from one or more dimensions such as the device type, hardware parameters, usage patterns, and the current time.
[0087] For example, one scenario could be a nighttime gaming scenario, which is defined from two dimensions: usage time (night) and usage mode (gaming mode); another scenario could be a low-end device video scenario, which is defined from two dimensions: device type (low-end device) and usage mode (video mode).
[0088] Multiple dimensions related to the scene definition can be preset, and information from these multiple dimensions can be obtained based on the preset multiple dimensions, thereby identifying the current scene.
[0089] In step S130, the dynamic weights of multiple power consumption parameters in the current scenario are obtained.
[0090] The system allows for the preset dynamic weights of multiple power consumption parameters for different scenarios. When the current scenario is determined, the system can query the preset relationships to obtain the dynamic weights of each power consumption parameter in the current scenario.
[0091] In step S140, the power consumption level of the application is determined based on multiple power consumption parameters of the application and their respective dynamic weights in the current scenario.
[0092] According to preset rules, multiple power consumption parameters are converted into power consumption scores. For example, when the CPU utilization rate is in the range of 0-5%, the corresponding power consumption score can be 1; when the CPU utilization rate is in the range of 5-10%, the corresponding power consumption score can also be 1. A higher power consumption score indicates higher power consumption.
[0093] Based on the dynamic weights of multiple power consumption parameters of the application in the current scenario, the power consumption scores corresponding to these parameters are weighted and summed to obtain the total power consumption score of the application. The power consumption level of the application is then determined based on this total power consumption score. This can be a one-to-one correspondence between the total power consumption score and the power consumption level, or multiple adjacent total power consumption scores can collectively correspond to a single power consumption level.
[0094] In step S150, the application is managed according to its power consumption level.
[0095] Once the power consumption level of an application is determined, it can be managed accordingly. Application management can include proactive and automatic management. Proactive management may involve issuing reminders to the user or receiving user commands and then managing the application based on those commands. Automatic management can directly manage the application based on its power consumption level, without requiring user commands.
[0096] By adopting the technical solution of this application embodiment, the weights of multiple power consumption parameters of the application will be dynamically adjusted in different scenarios, thereby meeting the control requirements of the current scenario and accurately determining the power consumption level of the application in the current scenario; and the obtained power consumption parameters are the power consumption parameters of the application, and the determined power consumption level is the power consumption level of the application, so as to achieve fine-grained control of a single application based on the power consumption level of the application.
[0097] Based on the above technical solution, as an example, identifying the current scenario may include: obtaining parameters of the electronic device where the application is located; identifying the current usage mode of the electronic device; and identifying the current scenario based on the parameters of the electronic device where the application is located and the current usage mode of the electronic device.
[0098] The parameters of the electronic device on which the application resides can include, but are not limited to, any one or more of the following: device type, hardware parameters, and operating system parameters.
[0099] Device types can include, but are not limited to: low-end devices, standard devices, and high-end devices. The hardware parameters of electronic devices can include, but are not limited to, any one or more of the following: processor parameters, memory parameters, storage parameters, graphics card parameters, and display parameters. Operating system parameters can include, but are not limited to, any one or more of the following: operating system version, system language, and system architecture. The parameters of electronic devices can be automatically obtained using the relevant tools and programming languages provided by different operating systems.
[0100] The usage modes of an electronic device can include, but are not limited to, any one or more of the following: night mode, game mode, and / or video mode. The current time can be obtained, and the system can determine whether night mode is active based on the current time. The current application on the electronic device can be used to identify whether the current usage mode is game mode or video mode. For example, if the current application on the electronic device is a video playback software, the current usage mode can be determined to be video mode.
[0101] The current scenario can be identified based on the parameters of the electronic device on which the application is located and the current usage pattern of the electronic device.
[0102] The dynamic weights of multiple power consumption parameters for applications vary depending on the scenario. Tables 1, 2, and 3 show the dynamic weights of multiple power consumption parameters for different scenarios.
[0103] Table 1. Dynamic weights of various power consumption parameters in nighttime scenarios
[0104]
[0105] In nighttime scenarios, electronic devices are in sleep mode, and CPU usage is reduced. Therefore, it is appropriate to increase the weight of Wake Lock usage and network request frequency.
[0106] Table 2. Dynamic weights of various power consumption parameters in game / video scenarios
[0107]
[0108]
[0109] In gaming / video scenarios, CPU, GPU, and memory are the main power consumers, so they are given a higher weighting.
[0110] Table 3 shows the dynamic weights of various power consumption parameters in low-end device scenarios.
[0111] Table 3. Dynamic weights of various power consumption parameters in low-end device scenarios
[0112]
[0113]
[0114] Low-end devices often operate at full capacity, so in this scenario, it is necessary to reduce the weight of CPU utilization, GPU utilization, and memory utilization.
[0115] The scenarios illustrated in the three tables above are all determined based on information from a single dimension. It's understandable that a scenario can be determined based on information from multiple dimensions. For example, a nighttime gaming scenario is determined from two dimensions. For scenarios determined from multiple dimensions, dynamic weights corresponding to each power consumption parameter in that scenario can also be preset.
[0116] The technical solution adopted in this application embodiment can identify the current scenario from multiple dimensions, thereby accurately determining the current scenario. Different dynamic weights can be determined for different scenarios to accurately determine the power consumption level under the current scenario, thus enabling accurate control of the application.
[0117] Based on the above technical solution, as an example, managing an application according to its power consumption level may include: obtaining a power consumption level threshold; querying a list of applications to ignore notifications set by the user when the application's power consumption level exceeds the power consumption level threshold; sending a notification to manage the application when the application's power consumption level exceeds the power consumption level threshold and the application is not on the list of applications to ignore notifications; and sending a notification to manage the application and displaying an option to ignore the notification when the application's power consumption level exceeds the power consumption level threshold and the application is on the list of applications to ignore notifications.
[0118] Power consumption level thresholds can be obtained, and these thresholds can be set based on big data or actual needs. When an application's power consumption level exceeds the threshold, a notification should be sent to manage the application. A higher power consumption level indicates that the application consumes more power.
[0119] Users can set a list of applications to ignore notifications; users can choose whether to add applications to the list of applications to ignore notifications by setting whether to include them in the settings page.
[0120] When an application's power consumption exceeds a certain threshold and the application is not on the list of applications to ignore alerts, a notification to manage the application is sent. This can be achieved by displaying a pop-up window that provides the user with quick access to management options. For example, the pop-up window may include controls to stop the application from running and / or uninstall the application.
[0121] When an application's power consumption exceeds a power consumption threshold and the application is on the list of applications to ignore alerts, a notification to manage the application is sent, along with an option to ignore the notification. This management notification can be sent via a pop-up window. The pop-up window can provide the user with quick options for managing the application and ignoring the notification. For example, the pop-up window may include controls for ignoring the notification, stopping the application, and / or uninstalling the application.
[0122] By adopting the technical solution of this application embodiment, by comparing whether the power consumption level of the application is greater than the power consumption level threshold, it can be determined whether to send a reminder to control the application, so as to remind the user to control the application with high power consumption; by ignoring the reminder to the list of applications, users can choose whether to allow the application to continue to run in a high power consumption state, thereby giving users more autonomy to meet different user needs.
[0123] Based on the above technical solution, as an embodiment, the power consumption level threshold may include: a first power consumption level threshold and a second power consumption level threshold; sending a reminder to control the application may include: when the power consumption level of the application is greater than the first power consumption level threshold but not greater than the second power consumption level threshold, sending a first reminder suggesting restricting the operation of the application; when the power consumption level of the application is greater than the second power consumption level threshold, sending a second reminder suggesting uninstalling the application.
[0124] The first power consumption level threshold is lower than the second power consumption level threshold. The first and second power consumption level thresholds can be set according to actual needs. Optionally, the first power consumption level threshold can be a power consumption level that affects the operation of other applications; the second power consumption level threshold can be a power consumption level that affects the normal operation of the electronic device.
[0125] If an application's power consumption level exceeds the first power consumption level threshold but does not exceed the second power consumption level threshold, it indicates that the application's power consumption level is somewhat high, but the impact is not particularly significant. In this case, a first reminder suggesting limiting the application's operation can be sent. This can be achieved by displaying a pop-up window suggesting limiting the application's operation. This pop-up window can provide the user with controls to limit the application's operation; when these controls are activated, the application can be forcibly terminated.
[0126] When an application's power consumption level exceeds the second power consumption level threshold, it indicates that the application is severely impacting the normal operation of the electronic device. In this case, a second reminder suggesting the application be uninstalled can be sent. This can be achieved by displaying a pop-up window suggesting the application be uninstalled. This pop-up window can provide the user with controls to uninstall the application; when these controls are activated, the application can be uninstalled directly.
[0127] By adopting the technical solution of this application embodiment, different power consumption level thresholds are set to send different reminders, which can cope with various power consumption situations and thus improve the user experience.
[0128] Based on the above technical solution, as an example, controlling the application according to its power consumption level may include: obtaining a third power consumption level threshold; and prohibiting the application from running when its power consumption level is greater than the third power consumption level threshold.
[0129] It allows for autonomous control of applications based on their power consumption levels without user intervention. A third power consumption level threshold can be obtained and set according to actual needs. This third power consumption level threshold can be the same as or different from the first or second power consumption level threshold.
[0130] When the power consumption level of an application exceeds the threshold of the third power consumption level, it indicates that the application is consuming too much power, and the application can be directly disabled.
[0131] Optionally, users can set a whitelist, which includes applications allowed to run in a high-power state. If an application's power consumption level exceeds the third power consumption level threshold and the application is not on the whitelist, the application can be directly prohibited from running. If an application's power consumption level exceeds the third power consumption level threshold and the application is on the whitelist, no control needs to be applied to that application.
[0132] The technical solution adopted in this application embodiment can automatically manage high-power applications without user operation, thereby achieving automatic management of applications without the user's awareness and effectively saving energy of electronic devices.
[0133] Based on the above technical solution, as an example, the control method of the application may further include: obtaining the power consumption levels of multiple applications; sorting the power consumption levels of the multiple applications to obtain a power consumption level ranking list; and displaying the power consumption level ranking list.
[0134] When multiple applications are present, their power consumption levels can be obtained separately. These power consumption levels are then sorted to create a power consumption ranking list. The power consumption levels of the applications in the ranking list can be arranged from low to high or from high to low.
[0135] It can display a power consumption ranking list; specifically, this can be displayed on the battery options page in system settings. When displaying the power consumption ranking list, the power consumption levels of individual applications can also be shown simultaneously.
[0136] By adopting the technical solution of this application embodiment, users can intuitively see high-power applications through the power consumption ranking list, and thus choose whether to uninstall the application to save the power of electronic devices.
[0137] Based on the above technical solution, as an example, the control method of the application may further include: in response to the opening operation of the application's details page, displaying the application's power consumption level and / or multiple power consumption parameters of the application.
[0138] An application's details page can be opened by clicking on the application's details in system settings, or by performing an action (such as long-pressing) on the application's icon on the home screen.
[0139] When you open the application's details page, you can display the application's power consumption level and / or multiple power consumption parameters.
[0140] By adopting the technical solution of this application embodiment, users can learn about the power consumption information of the application in detail on the application's details page, thereby determining whether the application needs to be processed accordingly.
[0141] To facilitate better implementation of the application management method of this application, this application also provides an application management device based on the above-described application management method. The meanings of the terms used are the same as in the application management method described above, and specific implementation details can be found in the descriptions of the method embodiments.
[0142] Please see Figure 2 , Figure 2 This is a schematic diagram of the structure of the application management device provided in this application embodiment. The application management device includes:
[0143] The parameter acquisition module 201 is used to acquire multiple power consumption parameters of the application.
[0144] Recognition module 202 is used to identify the current scene;
[0145] The weight acquisition module 203 is used to acquire the dynamic weights of the multiple power consumption parameters in the current scenario.
[0146] The determining module 204 is used to determine the power consumption level of the application based on multiple power consumption parameters of the application and the dynamic weights corresponding to each of the multiple power consumption parameters in the current scenario.
[0147] The control module 205 is used to control the application according to the power consumption level of the application.
[0148] In one embodiment, the identification module 202 includes:
[0149] The parameter acquisition unit is used to acquire parameters of the electronic device where the application is located; the parameters of the electronic device include any one or more of the following: device type, hardware parameters, and operating system parameters;
[0150] A pattern recognition unit is used to identify the current usage mode of the electronic device; the usage mode includes any one or more of the following: night mode, game mode, and / or video mode;
[0151] The scene recognition unit is used to identify the current scene based on the parameters of the electronic device where the application is located and the current usage mode of the electronic device.
[0152] In one embodiment, the control module 205 includes:
[0153] The first threshold acquisition unit is used to acquire the power consumption level threshold.
[0154] The query unit is used to query the list of applications whose notifications are ignored by the user when the power consumption level of the application is greater than the power consumption level threshold.
[0155] The first sending unit is configured to send a reminder to control the application when the power consumption level of the application is greater than the power consumption level threshold and the application is not in the list of applications to ignore reminders;
[0156] The second sending unit is configured to send a reminder to control the application when the power consumption level of the application is greater than the power consumption level threshold and the application is in the list of applications to ignore reminders, and to display the option to ignore the reminder.
[0157] In one embodiment, the power consumption level threshold includes: a first power consumption level threshold and a second power consumption level threshold; the first transmitting unit and / or the second transmitting unit includes:
[0158] The first sending subunit is configured to send a first reminder suggesting limiting the operation of the application when the power consumption level of the application is greater than the first power consumption level threshold and not greater than the second power consumption level threshold.
[0159] The second sending subunit is used to send a second reminder suggesting uninstalling the application when the power consumption level of the application is greater than the second power consumption level threshold.
[0160] In one embodiment, the control module 205 includes:
[0161] The second threshold acquisition unit is used to acquire the third power consumption level threshold.
[0162] The disable unit is used to disable the application from running when the power consumption level of the application is greater than the third power consumption level threshold.
[0163] In one embodiment, the device further includes:
[0164] A power consumption level acquisition module is used to acquire the power consumption levels of multiple applications.
[0165] The sorting module is used to sort the power consumption levels of multiple applications to obtain a power consumption level ranking list;
[0166] The first display module is used to display the power consumption level ranking.
[0167] In one embodiment, the device further includes:
[0168] The second display module is used to display the power consumption level and / or multiple power consumption parameters of the application in response to the opening operation of the application's details page.
[0169] In one embodiment, the power consumption parameters of the application include any one or more of the following: CPU utilization, GPU utilization, memory utilization, Wake Lock usage, network request frequency, sensor usage, background service runtime, AlarmManager wake-up count, and screen wake-up count.
[0170] By adopting the technical solution of this application embodiment, the weights of multiple power consumption parameters of the application will be dynamically adjusted in different scenarios, thereby meeting the control requirements of the current scenario and accurately determining the power consumption level of the application in the current scenario; and the obtained power consumption parameters are the power consumption parameters of the application, and the determined power consumption level is the power consumption level of the application, so as to achieve fine-grained control of a single application based on the power consumption level of the application.
[0171] Specific limitations regarding the application control device can be found in the limitations on application control methods described above, and will not be repeated here. Each module in the aforementioned application control device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0172] In addition, this application also provides an electronic device, such as Figure 3 As shown, it illustrates the structural diagram of the electronic device involved in this application, specifically:
[0173] The electronic device may include components such as a processor 301 with one or more processing cores and a memory 302 with one or more computer-readable storage media. Those skilled in the art will understand that... Figure 3 The electronic device structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein:
[0174] The processor 301 is the control center of the electronic device. It connects various parts of the electronic device via various interfaces and lines, and performs various functions and processes data by running or executing software programs and / or modules stored in the memory 302, and by calling data stored in the memory 302, thereby providing overall monitoring of the electronic device. Optionally, the processor 301 may include one or more processing cores; preferably, the processor 301 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 301.
[0175] The memory 302 can be used to store software programs and modules. The processor 301 executes various functional applications and data processing by running the software programs and modules stored in the memory 302. The memory 302 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 302 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 302 may also include a memory controller to provide the processor 301 with access to the memory 302.
[0176] In one embodiment, the electronic device further includes a power supply 303 for supplying power to the various components. Preferably, the power supply 303 can be logically connected to the processor 301 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. The power supply 303 may also include one or more DC or AC power supplies, recharging systems, power equipment debugging circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0177] In one embodiment, the electronic device may further include an input unit 304, which can be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
[0178] Although not shown, the electronic device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 301 in the electronic device loads the executable files corresponding to the processes of one or more applications into the memory 302 according to the following instructions, and the processor 301 runs the applications stored in the memory 302, thereby implementing the steps in any of the application management methods provided in the embodiments of this application.
[0179] Those skilled in the art will understand that Figure 3 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the electronic device to which the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.
[0180] In one embodiment, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the methods described in any embodiment of this application.
[0181] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method described in any embodiment of this application.
[0182] In some embodiments, a computer program product is also provided, including a computer program or instructions that, when executed by a processor, implement the methods described in any embodiment of this application.
[0183] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0184] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0185] Therefore, this application provides a computer-readable storage medium storing a computer program that can be loaded by a processor to execute the steps in any of the application control methods provided in this application.
[0186] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0187] The computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0188] Since the instructions stored in the computer-readable storage medium can execute the steps in any of the application management methods provided in this application, the beneficial effects that any of the application management methods provided in this application can achieve can be realized, as detailed in the preceding embodiments, and will not be repeated here.
[0189] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.
[0190] The foregoing has provided a detailed description of an application control method, apparatus, electronic device, and computer-readable storage medium provided in this application. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A method for managing an application, characterized in that, The method includes: Obtain multiple power consumption parameters from the application; Identify the current scene; Obtain the dynamic weights of each of the power consumption parameters in the current scenario; The power consumption level of the application is determined based on multiple power consumption parameters of the application and the dynamic weights corresponding to each of the multiple power consumption parameters in the current scenario. The application is managed according to its power consumption level.
2. The method according to claim 1, characterized in that, The identification of the current scene includes: Obtain the parameters of the electronic device where the application is located; the parameters of the electronic device include any one or more of the following: device type, hardware parameters, and operating system parameters; Identify the current usage mode of the electronic device; the usage mode includes any one or more of the following: night mode, game mode, and / or video mode; The current scenario is identified based on the parameters of the electronic device where the application is located and the current usage pattern of the electronic device.
3. The method according to claim 1, characterized in that, The step of controlling the application based on its power consumption level includes: Obtain the power consumption level threshold; When the power consumption level of the application exceeds the power consumption level threshold, query the list of applications that the user has set to ignore notifications; When the power consumption level of the application is greater than the power consumption level threshold, and the application is not on the list of applications to ignore reminders, a reminder to control the application is sent. When the power consumption level of the application exceeds the power consumption level threshold, and the application is on the list of applications to ignore reminders, a reminder to control the application is sent, and the option to ignore the reminder is displayed.
4. The method according to claim 3, characterized in that, The power consumption level thresholds include: a first power consumption level threshold and a second power consumption level threshold; Sending the notification to control the application includes: When the power consumption level of the application is greater than the first power consumption level threshold but not greater than the second power consumption level threshold, a first reminder suggesting limiting the operation of the application is sent. When the power consumption level of the application exceeds the second power consumption level threshold, a second reminder suggesting that the application be uninstalled is sent.
5. The method according to claim 1, characterized in that, The step of controlling the application based on its power consumption level includes: Obtain the threshold for the third power consumption level; When the power consumption level of the application exceeds the third power consumption level threshold, the application is prohibited from running.
6. The method according to claim 1, characterized in that, The method further includes: Obtain the power consumption levels of multiple applications; The power consumption levels of the multiple applications are sorted to obtain a power consumption ranking list; The power consumption ranking list is displayed.
7. The method according to claim 1, characterized in that, The method further includes: In response to the opening of the application's details page, the power consumption level of the application and / or multiple power consumption parameters of the application are displayed.
8. The method according to claim 1, characterized in that, The application's power consumption parameters include any one or more of the following: CPU utilization, GPU utilization, memory utilization, WakeLock usage, network request frequency, sensor usage, background service runtime, AlarmManager wake-up count, and screen wake-up count.
9. A control device for an application, characterized in that, The device includes: The parameter acquisition module is used to acquire multiple power consumption parameters of the application. The recognition module is used to identify the current scene; The weight acquisition module is used to acquire the dynamic weights of the multiple power consumption parameters in the current scenario. The determination module is used to determine the power consumption level of the application based on multiple power consumption parameters of the application and the dynamic weights corresponding to each of the multiple power consumption parameters in the current scenario. The control module is used to control the application based on its power consumption level.
10. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps in the application management method as described in any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the application control method as described in any one of claims 1 to 8.