Movatterモバイル変換


[0]ホーム

URL:


CN107302633A - application control method, device, storage medium and electronic equipment - Google Patents

application control method, device, storage medium and electronic equipment
Download PDF

Info

Publication number
CN107302633A
CN107302633ACN201710526364.7ACN201710526364ACN107302633ACN 107302633 ACN107302633 ACN 107302633ACN 201710526364 ACN201710526364 ACN 201710526364ACN 107302633 ACN107302633 ACN 107302633A
Authority
CN
China
Prior art keywords
application
remaining
electronic equipment
electronic device
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201710526364.7A
Other languages
Chinese (zh)
Other versions
CN107302633B (en
Inventor
梁昆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp LtdfiledCriticalGuangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201710526364.7ApriorityCriticalpatent/CN107302633B/en
Publication of CN107302633ApublicationCriticalpatent/CN107302633A/en
Application grantedgrantedCritical
Publication of CN107302633BpublicationCriticalpatent/CN107302633B/en
Expired - Fee Relatedlegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

Translated fromChinese

本发明公开了一种应用控制方法、装置、存储介质以及电子设备,该应用控制方法包括:当检测到电子设备中已设置闹钟时,获取该电子设备的当前电量值;根据当前电量值获取该闹钟的剩余触发时长、以及该电子设备当前运行的所有第一应用;根据该第一应用和当前电量值确定该电子设备的剩余工作时长;根据该剩余触发时长和剩余工作时长对该第一应用进行控制。上述应用控制方法能避免设置好的闹钟因电子设备电量低而发生失灵的现象,方法简单,灵活性高,用户体验感好。

The invention discloses an application control method, device, storage medium and electronic equipment. The application control method includes: when it is detected that an alarm clock has been set in the electronic equipment, acquiring the current power value of the electronic equipment; The remaining trigger time of the alarm clock, and all first applications currently running on the electronic device; determine the remaining working time of the electronic device according to the first application and the current battery value; Take control. The above application control method can avoid the failure of the set alarm clock due to the low power of the electronic device, and has a simple method, high flexibility, and good user experience.

Description

Translated fromChinese
应用控制方法、装置、存储介质以及电子设备Application control method, device, storage medium and electronic device

技术领域technical field

本发明涉及计算机技术领域,尤其涉及一种应用控制方法、装置、存储介质以及电子设备。The present invention relates to the field of computer technology, in particular to an application control method, device, storage medium and electronic equipment.

背景技术Background technique

随着智能终端技术的发展,具有各种功能的移动终端日渐成为人们的生活必需品之一。With the development of smart terminal technology, mobile terminals with various functions have gradually become one of people's daily necessities.

以手机为例,闹钟是必不可少的提醒功能,手机闹钟能够在用户设置的特定时刻通过响铃和/或震动等方式提示用户,以避免用户遗漏重要事宜,例如,对上班族来说,早晨的起床闹钟尤为重要。但是,众所周知的,手机闹钟的响铃或震动操作需要电池供电才能实现,若电池电量不足,则难以保证手机电量能维持到闹钟的设定时间,从而经常发生闹钟失灵的现象。Taking a mobile phone as an example, the alarm clock is an essential reminder function. The mobile phone alarm clock can remind the user by ringing and/or vibrating at a specific time set by the user to prevent the user from missing important matters. For example, for office workers, An alarm clock for waking up in the morning is especially important. But, as everyone knows, the ringing or vibrating operation of the mobile phone alarm clock needs battery power to realize. If the battery power is insufficient, it is difficult to ensure that the power of the mobile phone can be maintained to the set time of the alarm clock, so that the alarm clock malfunction often occurs.

发明内容Contents of the invention

本发明提供一种应用控制方法、装置、存储介质以及电子设备,能减少闹钟失灵现象的产生,提高闹钟的工作稳定性。The invention provides an application control method, device, storage medium and electronic equipment, which can reduce the alarm clock malfunction and improve the working stability of the alarm clock.

本发明实施例提供了一种应用控制方法,包括:An embodiment of the present invention provides an application control method, including:

当检测到电子设备中已设置闹钟时,获取所述电子设备的当前电量值;When it is detected that an alarm clock has been set in the electronic device, obtain the current power value of the electronic device;

获取所述闹钟的剩余触发时长、以及所述电子设备当前运行的所有第一应用;Obtaining the remaining trigger duration of the alarm clock and all first applications currently running on the electronic device;

根据所述第一应用和当前电量值确定所述电子设备的剩余工作时长;determining the remaining working time of the electronic device according to the first application and the current power value;

根据所述剩余触发时长和剩余工作时长对所述第一应用进行控制。The first application is controlled according to the remaining trigger duration and the remaining working duration.

本发明实施例还提供了一种应用控制装置,包括:The embodiment of the present invention also provides an application control device, including:

第一获取模块,用于当检测到电子设备中已设置闹钟时,获取所述电子设备的当前电量值;The first obtaining module is used to obtain the current power value of the electronic device when it is detected that an alarm clock has been set in the electronic device;

第二获取模块,用于根据当前电量值获取所述闹钟的剩余触发时长、以及所述电子设备当前运行的所有第一应用;The second acquiring module is configured to acquire the remaining trigger duration of the alarm clock and all first applications currently running on the electronic device according to the current power value;

确定模块,用于根据所述第一应用和当前电量值确定所述电子设备的剩余工作时长;A determining module, configured to determine the remaining working time of the electronic device according to the first application and the current power value;

控制模块,用于根据所述剩余触发时长和剩余工作时长对所述第一应用进行控制。A control module, configured to control the first application according to the remaining trigger duration and remaining working duration.

本发明实施例还提供了一种存储介质,所述存储介质中存储有多条指令,所述指令适于由处理器加载以执行上述任一项应用控制方法。An embodiment of the present invention also provides a storage medium, wherein a plurality of instructions are stored in the storage medium, and the instructions are adapted to be loaded by a processor to execute any one of the above application control methods.

本发明实施例还提供了一种电子设备,包括处理器和存储器,所述处理器与所述存储器电性连接,所述存储器用于存储指令和数据,所述处理器用于执行以下步骤:An embodiment of the present invention also provides an electronic device, including a processor and a memory, the processor is electrically connected to the memory, the memory is used to store instructions and data, and the processor is used to perform the following steps:

当检测到电子设备中已设置闹钟时,获取所述电子设备的当前电量值;When it is detected that an alarm clock has been set in the electronic device, obtain the current power value of the electronic device;

根据当前电量值获取所述闹钟的剩余触发时长、以及所述电子设备当前运行的所有第一应用;Obtaining the remaining trigger duration of the alarm clock and all first applications currently running on the electronic device according to the current power value;

根据所述第一应用和当前电量值确定所述电子设备的剩余工作时长;determining the remaining working time of the electronic device according to the first application and the current power value;

根据所述剩余触发时长和剩余工作时长对所述第一应用进行控制。The first application is controlled according to the remaining trigger duration and the remaining working duration.

本发明该的应用控制方法、装置、存储介质以及电子设备,通过当检测到电子设备中已设置闹钟时,获取该电子设备的当前电量值,并根据当前电量值获取该闹钟的剩余触发时长、以及该电子设备当前运行的所有第一应用,之后,根据该第一应用和当前电量值确定该电子设备的剩余工作时长,并根据该剩余触发时长和剩余工作时长对该第一应用进行控制,从而能避免设置好的闹钟因电子设备电量低而发生失灵的现象,方法简单,灵活性高,用户体验感好。According to the application control method, device, storage medium and electronic device of the present invention, when it is detected that an alarm clock has been set in the electronic device, the current power value of the electronic device is obtained, and the remaining triggering time of the alarm clock is obtained according to the current power value. and all the first applications currently running on the electronic device, and then determine the remaining working time of the electronic device according to the first application and the current power value, and control the first application according to the remaining triggering time and the remaining working time, Therefore, it is possible to avoid the failure of the set alarm clock due to low power of the electronic device, the method is simple, the flexibility is high, and the user experience is good.

附图说明Description of drawings

下面结合附图,通过对本发明的具体实施方式详细描述,将使本发明的技术方案及其它有益效果显而易见。The technical solutions and other beneficial effects of the present invention will be apparent through the detailed description of specific embodiments of the present invention in conjunction with the accompanying drawings.

图1为本发明实施例提供的应用控制系统的应用场景示意图;FIG. 1 is a schematic diagram of an application scenario of an application control system provided by an embodiment of the present invention;

图2为本发明实施例提供的应用控制方法的流程示意图;FIG. 2 is a schematic flowchart of an application control method provided by an embodiment of the present invention;

图3为本发明实施例提供的另一应用控制方法的流程示意图;FIG. 3 is a schematic flowchart of another application control method provided by an embodiment of the present invention;

图4为本发明实施例提供的应用控制装置的结构示意图;FIG. 4 is a schematic structural diagram of an application control device provided by an embodiment of the present invention;

图5为本发明实施例提供的控制模块的结构示意图;5 is a schematic structural diagram of a control module provided by an embodiment of the present invention;

图6为本发明实施例提供的另一应用控制装置的结构示意图;FIG. 6 is a schematic structural diagram of another application control device provided by an embodiment of the present invention;

图7为本发明实施例提供的电子设备的结构示意图。FIG. 7 is a schematic structural diagram of an electronic device provided by an embodiment of the present invention.

具体实施方式detailed description

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative efforts fall within the protection scope of the present invention.

本发明实施例提供一种应用控制方法、装置、存储介质、电子设备以及系统。Embodiments of the present invention provide an application control method, device, storage medium, electronic equipment, and system.

请参阅图1,图1为应用控制系统的应用场景图,该应用控制系统可以包括本发明提供的任一种电子设备。Please refer to FIG. 1 . FIG. 1 is an application scenario diagram of an application control system, and the application control system may include any electronic device provided by the present invention.

其中,电子设备可以当检测到已设置闹钟时,获取当前电量值;获取该闹钟的剩余触发时长、以及该电子设备当前运行的所有第一应用;根据该第一应用和当前电量值确定该电子设备的剩余工作时长;根据该剩余触发时长和剩余工作时长对该第一应用进行控制。Among them, when the electronic device detects that the alarm clock has been set, it can obtain the current power value; obtain the remaining trigger time of the alarm clock and all first applications currently running on the electronic device; determine the electronic power level according to the first application and the current power value The remaining working time of the device; the first application is controlled according to the remaining triggering time and the remaining working time.

比如,在图1中,若手机检测到用户设置了一个7:30的闹钟,则手机可以获取当前电量值、当前运行的所有第一应用、以及该闹钟的剩余触发时长T1,譬如,该第一应用可以包括微信、QQ、浏览器、短信等,当前电量值可以为15%,接着,可以根据这些第一应用和当前电量值预估手机距离自动关机的时间T2(也即剩余工作时长),之后,可以根据预估的时间T2和剩余工作时长T1判断是否需要从第一应用中选取全部或者部分进行关闭,比如可以关闭浏览器。For example, in Figure 1, if the mobile phone detects that the user has set an alarm clock at 7:30, the mobile phone can obtain the current battery level, all the first applications currently running, and the remaining trigger time T1 of the alarm clock, for example, the first application An application can include WeChat, QQ, browser, SMS, etc., and the current power value can be 15%. Then, the time T2 (that is, the remaining working time) before the mobile phone can be automatically shut down can be estimated based on these first applications and the current power value. , and then, it can be judged according to the estimated time T2 and the remaining working time T1 whether it is necessary to select all or part of the first application to close, for example, the browser can be closed.

本实施例将从应用控制装置的角度进行描述,该应用控制装置具体可以作为独立的实体来实现,也可以集成在其他的电子设备,比如终端中来实现,该终端可以包括手机、平板电脑以及个人计算机等。This embodiment will be described from the perspective of an application control device. The application control device can be implemented as an independent entity, or can be integrated into other electronic devices, such as a terminal. The terminal can include a mobile phone, a tablet computer, and personal computer, etc.

如图2所示,该应用控制方法的具体流程可以如下:As shown in Figure 2, the specific flow of the application control method may be as follows:

S101、当检测到电子设备中已设置闹钟时,获取该电子设备的当前电量值。S101. Acquire a current power value of the electronic device when it is detected that an alarm clock has been set in the electronic device.

本实施例中,该闹钟主要指可以在设定时间通过响铃和/或震动等形式给予用户提示功能的触发事件。In this embodiment, the alarm clock mainly refers to a trigger event that can give the user a reminder function by ringing and/or vibrating at a set time.

S102、根据当前电量值获取该闹钟的剩余触发时长、以及该电子设备当前运行的所有第一应用。S102. Obtain the remaining trigger duration of the alarm clock and all first applications currently running on the electronic device according to the current power value.

本实施例中,当检测到用户设置了闹钟时,可以同时获取当前电量值、剩余触发时长和第一应用,也可以分步获取,具体可以根据实际需求而定。In this embodiment, when it is detected that the user has set an alarm clock, the current power value, the remaining trigger duration, and the first application can be acquired at the same time, or can be acquired step by step, which can be determined according to actual needs.

例如,当为分步获取时,上述步骤S102具体可以包括:For example, when acquiring in steps, the above step S102 may specifically include:

判断当前电量值是否小于预设阈值;Determine whether the current power value is less than the preset threshold;

若是,则获取该闹钟的剩余触发时长、以及该电子设备当前运行的所有第一应用。If yes, acquire the remaining trigger duration of the alarm clock and all first applications currently running on the electronic device.

本实施例中,该预设阈值是用于界定电量处于低电量状态的临界值,其可以是用户自行设定的,比如20%电量。由于只有在低电量的情况下,才需要担心电子设备能否支撑到闹钟的设定时间,而电量充足的时候电子设备完全可以等待用户下一次充电,无需进行其他处理,故通过先判断当前电量值的高低状态,并在当前电量值较低时,才获取剩余触发时长和第一应用,可以尽量避免电子设备执行无用的操作,节省耗电量。In this embodiment, the preset threshold is a critical value for defining the low battery state, which can be set by the user, such as 20% battery. Since only in the case of low power, you need to worry about whether the electronic device can support the alarm clock setting time, and when the power is sufficient, the electronic device can completely wait for the user to charge the next time without other processing, so by first judging the current power The high and low state of the value, and only when the current power value is low, the remaining trigger duration and the first application can be obtained, which can prevent electronic devices from performing useless operations as much as possible and save power consumption.

S103、根据该第一应用和当前电量值确定该电子设备的剩余工作时长。S103. Determine the remaining working time of the electronic device according to the first application and the current power value.

本实施例中,该剩余工作时长的确定方法可以根据实际情况而定,其可以是根据该电子设备当前的实际耗电速度预估出的,比如可以检测当前电子设备电量值发生变化时所耗费的时长以及变化量来确定该电子设备的实际耗电速度,之后根据电量值和实际耗电速度计算该剩余工作时长,当然,该剩余工作时长也可以是根据每个应用设定好了的耗电速度预估出的,此时,上述步骤S103具体可以包括:In this embodiment, the method for determining the remaining working time can be determined according to the actual situation, which can be estimated based on the current actual power consumption speed of the electronic device, for example, it can detect the power consumption of the current electronic device when the power value changes. The actual power consumption speed of the electronic device is determined based on the duration and the amount of change, and then the remaining working time is calculated according to the power value and the actual power consumption speed. Of course, the remaining working time can also be set according to the power consumption of each application. The electrical speed is estimated. At this time, the above step S103 may specifically include:

获取每一个第一应用的预设耗电速度;Acquiring the preset power consumption speed of each first application;

将获取的所有预设耗电速度进行相加,得到总耗电速度;Add up all the obtained preset power consumption speeds to obtain the total power consumption speed;

根据当前电量值和总耗电速度计算该电子设备的剩余工作时长。Calculate the remaining working time of the electronic device according to the current power value and the total power consumption speed.

本实施例中,该预设耗电速度可以根据实际应用而定,比如可以根据每个应用的CPU占用率来定,通常,CPU占用率越高,该应用对应的预设耗电速度可以设定的越大。通过计算电子设备中所有运行应用的预设耗电速度之和,可以预估该电子设备的总耗电速度,然后计算当前电量值和总耗电速度的商值,得到该电子设备的剩余工作时长。In this embodiment, the preset power consumption speed can be determined according to the actual application, for example, it can be determined according to the CPU usage rate of each application. Generally, the higher the CPU usage rate, the preset power consumption speed corresponding to the application can be set to Set the bigger. By calculating the sum of the preset power consumption speeds of all running applications in the electronic device, the total power consumption speed of the electronic device can be estimated, and then the quotient of the current power value and the total power consumption speed can be calculated to obtain the remaining work of the electronic device duration.

S104、根据该剩余触发时长和剩余工作时长对该第一应用进行控制。S104. Control the first application according to the remaining trigger duration and the remaining working duration.

例如,上述步骤S104具体可以包括:For example, the above step S104 may specifically include:

1-1、判断该剩余触发时长是否大于剩余工作时长。1-1. Determine whether the remaining trigger duration is greater than the remaining working duration.

1-2、若该剩余触发时长大于剩余工作时长,则关闭所有第一应用。1-2. If the remaining trigger duration is greater than the remaining working duration, close all first applications.

本实施例中,当剩余触发时长大于剩余工作时长时,说明当前电子设备的电量值处于很低的状态,以至于在闹钟启动之前,电子设备已经由于低电量而自动关机了,为此,可以采取最大力度的省电措施,也即关闭当前运行的所有第一应用。In this embodiment, when the remaining triggering duration is greater than the remaining working duration, it means that the power value of the current electronic device is in a very low state, so that the electronic device has automatically shut down due to low power before the alarm clock is activated. Therefore, you can Take maximum power saving measures, i.e. close all currently running #1 apps.

1-3、若该剩余触发时长小于或等于剩余工作时长,则根据当前电量值确定目标电量区间;根据该目标电量区间对该第一应用进行控制。1-3. If the remaining trigger duration is less than or equal to the remaining working duration, then determine the target power range according to the current power value; and control the first application according to the target power range.

本实施例中,当剩余触发时长小于或等于剩余工作时长时,说明当前电子设备的电量虽然低,但勉强可以维持到闹钟的启动时间,而由于闹钟在启动的过程中也需要消耗一定的电量,为此,还是需要采取一定的省电措施,比如关闭一部分运行应用,才能保证闹钟能正常工作,当然,这部分运行应用的选择可以根据当前的具体电量值而定,此时,上述步骤“根据当前电量值确定目标电量区间”具体可以包括:In this embodiment, when the remaining triggering time is less than or equal to the remaining working time, it means that although the power of the current electronic device is low, it can barely last until the start time of the alarm clock, and because the alarm clock also needs to consume a certain amount of power during the start-up process , for this reason, it is still necessary to take certain power-saving measures, such as closing some running applications, to ensure that the alarm clock can work normally. Of course, the selection of these running applications can be determined according to the current specific power value. At this time, the above steps " "Determine the target power range based on the current power value" may specifically include:

从存储的所有预设电量区间中查找包含当前电量值的预设电量区间;Find the preset power range containing the current power value from all stored preset power ranges;

将查找到的预设电量区间确定为目标电量区间。The found preset power range is determined as the target power range.

本实施例中,该预设电量区间可以根据实际需求而定,比如可以包括5%-10%电量、10%-15%电量以及15%-20%电量等。In this embodiment, the preset power interval can be determined according to actual needs, for example, it can include 5%-10% power, 10%-15% power, and 15%-20% power.

与此同时,上述步骤“根据该目标电量区间对该第一应用进行控制”具体可以包括:At the same time, the above step of "controlling the first application according to the target power range" may specifically include:

从应用数据库中获取与该目标电量区间对应的第二应用集,作为目标第二应用集;Acquiring a second application set corresponding to the target power range from the application database as the target second application set;

获取与该目标第二应用集中第二应用相同的第一应用,作为目标第一应用;Obtain the first application identical to the second application in the target second application set as the target first application;

关闭该目标第一应用。Close the target first application.

本实施例中,不同的预设电量区间可以对应不同的第二应用集,每一第二应用集中包括至少一个第二应用,其可以是用户根据喜好自行设定的,也可以是系统根据用户以往在低电量情况下主动关闭的应用进行分析得到的,这些数据可以提前存储在应用数据库中,也即,在从应用数据库中获取与该目标电量区间对应的第二应用集之前,还可以包括:In this embodiment, different preset power intervals may correspond to different second application sets, and each second application set includes at least one second application, which may be set by the user according to preferences, or the system may These data can be stored in the application database in advance, that is, before obtaining the second application set corresponding to the target battery range from the application database, it can also include :

获取预设时间范围内用户关闭的所有第二应用、以及每一个第二应用关闭时电子设备的剩余电量值;Obtaining all second applications closed by the user within a preset time range, and the remaining power value of the electronic device when each second application is closed;

获取至少一个预设电量区间;Obtain at least one preset power range;

根据该预设电量区间、剩余电量值和第二应用创建应用数据库。An application database is created according to the preset power range, the remaining power value and the second application.

本实施例中,该预设时间范围可以根据实际需求而定,比如可以为一个月或者半年等。在该预设时间范围内,用户在低电量情况下手动关闭应用时,系统都可以记录此时的剩余电量值,然后根据每次记录的剩余电量值和关闭应用创建应用数据库。In this embodiment, the preset time range may be determined according to actual needs, for example, it may be one month or half a year. Within the preset time range, when the user manually closes the application when the battery is low, the system can record the remaining battery value at this time, and then create an application database according to the remaining battery value recorded each time and close the application.

例如,上述步骤“根据该预设电量区间、剩余电量值和第二应用创建应用数据库”具体可以包括:For example, the above step of "creating an application database according to the preset power interval, the remaining power value and the second application" may specifically include:

根据该剩余电量值确定每一个第二应用对应的预设电量区间;determining a preset power range corresponding to each second application according to the remaining power value;

将属于同一预设电量区间的所有第二应用进行聚合,得到第二应用集,每一预设电量区间对应一个第二应用集。All the second applications belonging to the same preset power range are aggregated to obtain a second application set, and each preset power range corresponds to a second application set.

将该第二应用集存储在应用数据库中,以创建该应用数据库。The second set of applications is stored in an application database to create the application database.

本实施例中,该第二应用集可以是一次性建立的,比如到达预设时间时才开始对记录的所有关闭应用进行统计,也可以是多次建立的,比如当每次记录了新的关闭应用时,可以将其添入对应的第二应用集中,直至到达预设时间,当然,还可以是其他建立方式,等等。该应用数据库中存储的数据是通过对用户的历史行为数据进行分析学习得到的,每一第二应用集合都代表用户以往在对应预设电量区间所关闭的应用,故后续电子设备可以根据实际电量值自动关闭最符合用户行为习惯的运行应用,无需用户手动进行,方法简单,灵活性高,用户体验感好。In this embodiment, the second application set can be established once, for example, when the preset time is reached, it will start to count all the closed applications recorded, or it can be established multiple times, for example, when a new application is recorded each time When the application is closed, it can be added to the corresponding second application set until the preset time is reached. Of course, other establishment methods can also be used, and so on. The data stored in the application database is obtained by analyzing and learning the user's historical behavior data. Each second application set represents the applications that the user has previously closed in the corresponding preset power interval, so subsequent electronic devices can be based on the actual power. The value automatically closes the running application that is most in line with the user's behavior habits, without the user's manual operation, the method is simple, the flexibility is high, and the user experience is good.

由上述可知,本实施例提供的应用控制方法,当检测到电子设备中已设置闹钟时,通过获取该电子设备的当前电量值,并根据当前电量值获取该闹钟的剩余触发时长、以及该电子设备当前运行的所有第一应用,之后,根据该第一应用和当前电量值确定该电子设备的剩余工作时长,并根据该剩余触发时长和剩余工作时长对该第一应用进行控制,从而能避免设置好的闹钟因电子设备电量低而发生失灵的现象,方法简单,灵活性高,用户体验感好。As can be seen from the above, the application control method provided in this embodiment, when detecting that an alarm clock has been set in the electronic device, obtains the current power value of the electronic device, and obtains the remaining triggering time of the alarm clock and the electronic device according to the current power value. All the first applications currently running on the device, and then determine the remaining working time of the electronic device according to the first application and the current power value, and control the first application according to the remaining triggering time and remaining working time, so as to avoid The set alarm clock fails due to low power of the electronic device, the method is simple, the flexibility is high, and the user experience is good.

在本实施例中,将以该应用控制装置具体集成在电子设备中为例进行详细说明。In this embodiment, it will be described in detail by taking the application control apparatus specifically integrated in an electronic device as an example.

请参见图3,一种应用控制方法,具体流程可以如下:Please refer to Figure 3, an application control method, the specific process can be as follows:

S201、电子设备获取预设时间范围内用户关闭的所有第二应用、以及每一个第二应用关闭时该电子设备的剩余电量值。S201. The electronic device acquires all second applications closed by a user within a preset time range, and a remaining power value of the electronic device when each second application is closed.

譬如,该预设时间范围可以是半年,电子设备可以记录半年内用户手动关闭的所有第二应用、以及每一次关闭时电子设备的剩余电量值。For example, the preset time range may be half a year, and the electronic device may record all second applications manually closed by the user within half a year, and the remaining power value of the electronic device at each close.

S202、电子设备获取至少一个预设电量区间,并根据该剩余电量值确定每一个第二应用对应的预设电量区间。S202. The electronic device obtains at least one preset power range, and determines a preset power range corresponding to each second application according to the remaining power value.

譬如,该预设电量区间可以包括5%-10%、10%-15%以及15%-20%,若剩余电量值包括{19%、8%、9%…12%},且对应的第二应用依次包括{音乐播放器、短信、QQ、微信…浏览器},则微信应用和短信应用对应的预设电量区间为5%-10%,浏览器应用和QQ应用对应的预设电量区间均为10%-15%,音乐播放器对应的预设电量区间均为15%-20%。For example, the preset power range may include 5%-10%, 10%-15%, and 15%-20%. If the remaining power value includes {19%, 8%, 9%...12%}, and the corresponding The second application includes {music player, text message, QQ, WeChat...browser} in turn, and the default power range corresponding to WeChat application and SMS application is 5%-10%, and the default power range corresponding to browser application and QQ application Both are 10%-15%, and the preset power range corresponding to the music player is 15%-20%.

S203、电子设备将属于同一预设电量区间的所有第二应用进行聚合,得到第二应用集,每一预设电量区间对应一个第二应用集。S203. The electronic device aggregates all second applications belonging to the same preset power range to obtain a second application set, and each preset power range corresponds to a second application set.

譬如,电子设备可以分别将5%-10%、10%-15%以及15%-20%对应的第二应用合并到对应第二应用集,比如浏览器应用和QQ应用均在预设电量区间10%-15%对应的第二应用集中。For example, the electronic device can respectively merge the second application corresponding to 5%-10%, 10%-15% and 15%-20% into the corresponding second application set. 10%-15% corresponds to the second application concentration.

S204、电子设备将该第二应用集存储在应用数据库中,以创建该应用数据库。S204. The electronic device stores the second application set in an application database to create the application database.

譬如,该应用数据库中可以存储半年内用户在预设电量区间5%-10%、10%-15%以及15%-20%手动关闭的所有第二应用,并且,这些第二应用是以集合的方式与对应的预设电量区间进行关联存储的。For example, the application database can store all the second applications manually closed by the user within half a year within the preset power intervals of 5%-10%, 10%-15%, and 15%-20%, and these second applications are grouped The method is stored in association with the corresponding preset power range.

S205、当检测到已设置闹钟时,电子设备获取当前电量值。S205. When detecting that the alarm clock has been set, the electronic device acquires the current power value.

譬如,当用户设置了一个7:30闹钟时,由于不确定电子设备的电量能否支撑到闹钟启动的时候,故需要获取当前电量值进行分析。For example, when the user sets an alarm clock at 7:30, because it is uncertain whether the power of the electronic device can last until the alarm clock starts, it is necessary to obtain the current power value for analysis.

S206、电子设备判断当前电量值是否小于预设阈值,若是,则执行下述步骤S207,若否,则电子设备可以返回执行上述步骤S205。S206. The electronic device judges whether the current power value is smaller than the preset threshold value. If yes, execute the following step S207. If not, the electronic device may return to execute the above step S205.

譬如,该预设阈值可以为20%,此时,若当前电量值为15%,则判定结果为是,若当前电量值为40%,则判定结果为否。For example, the preset threshold may be 20%. At this time, if the current power value is 15%, the determination result is yes, and if the current power value is 40%, the determination result is no.

S207、电子设备获取该闹钟的剩余触发时长、以及当前运行的所有第一应用。S207. The electronic device acquires the remaining trigger duration of the alarm clock and all first applications currently running.

譬如,该闹钟的剩余触发时长可以为T,当前运行的第一应用可以包括QQ、微信、浏览器和短信。For example, the remaining triggering time of the alarm clock can be Talarm , and the currently running first application can include QQ, WeChat, browser and short message.

S208、电子设备获取每一个第一应用的预设耗电速度,并将获取的所有预设耗电速度进行相加,得到总耗电速度。S208. The electronic device obtains the preset power consumption speed of each first application, and adds up all the preset power consumption speeds obtained to obtain a total power consumption speed.

譬如,可以将QQ、微信、浏览器和短信应用的预设耗电速度进行相加,得到总耗电速度。For example, the preset power consumption speeds of QQ, WeChat, browser and SMS applications can be added to obtain the total power consumption speed.

S209、电子设备根据当前电量值和总耗电速度计算剩余工作时长。S209. The electronic device calculates the remaining working time according to the current power value and the total power consumption speed.

譬如,可以计算当前电量值和总耗电速度的商值,将该商值作为剩余工作时长TFor example, the quotient of the current power value and the total power consumption speed can be calculated, and the quotient can be used as the remainingworking time T .

S210、电子设备判断该剩余触发时长是否大于剩余工作时长,若是,则可以关闭所有第一应用,若否,则可以执行下述步骤S211-S213。S210. The electronic device judges whether the remaining trigger duration is greater than the remaining working duration. If yes, close all the first applications. If not, execute the following steps S211-S213.

譬如,若T>T,则说明当前电量已无法支撑到闹钟的启动时间,此时,可以关闭QQ、微信、浏览器和短信应用,以最大限度的节省设备电量,若T≤T,则说明当前电量虽然低,但勉强可以维持到闹钟的启动时间,此时,可以对当前电量做进一步地分析。For example, if Talarm > T alarm, it means that the current battery can no longer support the start time of the alarm clock. At this time, you can close QQ, WeChat, browser and SMS applications to save the power of the device to the greatest extent. If Talarm ≤ T If it isworking , it means that although the current power is low, it can barely last until the start time of the alarm clock. At this time, the current power can be further analyzed.

S211、电子设备从该预设电量区间中查找包含当前电量值的预设电量区间,作为目标电量区间,并从该应用数据库中获取与该目标电量区间对应的第二应用集,作为目标第二应用集。S211. The electronic device searches for a preset power range containing the current power value from the preset power range as the target power range, and obtains the second application set corresponding to the target power range from the application database as the target second application set.

譬如,若当前电量值为14%,则确定的目标电量区间可以为10%-15%,从应用数据库中获取的第二应用集可以为{浏览器、QQ…}。For example, if the current power value is 14%, the determined target power range may be 10%-15%, and the second application set obtained from the application database may be {browser, QQ...}.

S212、电子设备获取与该目标第二应用集中第二应用相同的第一应用进行关闭。S212. The electronic device obtains and closes the first application that is the same as the second application in the target second application set.

譬如,若第一应用包括QQ、微信、浏览器和短信应用,第二应用集为{浏览器、QQ…},则关闭的第一应用可以为QQ和浏览器。For example, if the first application includes QQ, WeChat, browser and short message application, and the second application set is {browser, QQ...}, then the closed first application may be QQ and browser.

由上述可知,本实施例提供的应用控制方法,其中电子设备可以获取预设时间范围内用户关闭的所有第二应用、以及每一个第二应用关闭时该电子设备的剩余电量值,接着,获取至少一个预设电量区间,并根据该剩余电量值确定每一个第二应用对应的预设电量区间,接着,将属于同一预设电量区间的所有第二应用进行聚合,得到第二应用集,每一预设电量区间对应一个第二应用集,接着,将该第二应用集存储在应用数据库中,以创建该应用数据库,从而可以根据用户的历史行为习惯创建需关闭的应用库,之后,当检测到已设置闹钟时,电子设备可以获取当前电量值,并判断当前电量值是否小于预设阈值,若是,则获取该闹钟的剩余触发时长、以及当前运行的所有第一应用,接着,获取每一个第一应用的预设耗电速度,并将获取的所有预设耗电速度进行相加,得到总耗电速度,接着,根据当前电量值和总耗电速度计算该电子设备的剩余工作时长,并判断该剩余触发时长是否大于剩余工作时长,若是,则可以关闭所有第一应用,若否,则可以从该预设电量区间中查找包含当前电量值的预设电量区间,作为目标电量区间,并从该应用数据库中获取与该目标电量区间对应的第二应用集,作为目标第二应用集,之后,获取与该目标第二应用集中第二应用相同的第一应用进行关闭,能避免设置好的闹钟因电子设备电量低而发生失灵的现象,方法简单,灵活性高,用户体验感好。As can be seen from the above, in the application control method provided by this embodiment, the electronic device can obtain all second applications closed by the user within a preset time range, and the remaining power value of the electronic device when each second application is closed, and then obtain at least one preset power range, and determine the preset power range corresponding to each second application according to the remaining power value, and then aggregate all second applications belonging to the same preset power range to obtain a second application set, each A preset power range corresponds to a second application set, and then, store the second application set in the application database to create the application database, so that the application library to be closed can be created according to the user's historical behavior habits, and then, when When it is detected that the alarm clock has been set, the electronic device can obtain the current power value, and determine whether the current power value is less than the preset threshold value, and if so, obtain the remaining trigger time of the alarm clock and all the first applications currently running, and then obtain each A preset power consumption speed of the first application, and adding all the obtained preset power consumption speeds to obtain the total power consumption speed, and then calculate the remaining working time of the electronic device according to the current power value and the total power consumption speed , and judge whether the remaining trigger duration is greater than the remaining working duration, if yes, all the first applications can be closed, if not, then the preset power interval including the current power value can be searched from the preset power interval as the target power interval , and obtain the second application set corresponding to the target power range from the application database as the target second application set, and then obtain the same first application as the second application in the target second application set to close, which can avoid The set alarm clock fails due to low power of the electronic device, the method is simple, the flexibility is high, and the user experience is good.

根据上述实施例所描述的方法,本实施例将从应用控制装置的角度进一步进行描述,该应用控制装置可以集成在电子设备中。According to the methods described in the above embodiments, this embodiment will be further described from the perspective of an application control device, and the application control device may be integrated in an electronic device.

请参阅图4,图4具体描述了本发明实施例提供的应用控制装置,其可以包括:第一获取模块10、第二获取模块20、确定模块30和控制模块40,其中:Please refer to FIG. 4. FIG. 4 specifically describes the application control device provided by the embodiment of the present invention, which may include: a first acquisition module 10, a second acquisition module 20, a determination module 30, and a control module 40, wherein:

(1)第一获取模块10(1) The first acquisition module 10

第一获取模块10,用于当检测到电子设备中已设置闹钟时,获取该电子设备的当前电量值。The first obtaining module 10 is configured to obtain the current power value of the electronic device when it is detected that an alarm clock has been set in the electronic device.

本实施例中,该闹钟主要指可以在设定时间通过响铃和/或震动等形式给予用户提示功能的触发事件。In this embodiment, the alarm clock mainly refers to a trigger event that can give the user a reminder function by ringing and/or vibrating at a set time.

(2)第二获取模块20(2) The second acquisition module 20

第二获取模块20,用于根据当前电量值获取该闹钟的剩余触发时长、以及该电子设备当前运行的所有第一应用。The second acquiring module 20 is configured to acquire the remaining trigger duration of the alarm clock and all the first applications currently running on the electronic device according to the current power value.

本实施例中,当检测到用户设置了闹钟时,可以同时获取当前电量值、剩余触发时长和第一应用,也可以分步获取,具体可以根据实际需求而定。In this embodiment, when it is detected that the user has set an alarm clock, the current power value, the remaining trigger duration, and the first application can be acquired at the same time, or can be acquired step by step, which can be determined according to actual needs.

例如,当为分步获取时,该第二获取模块20具体可以用于:For example, when obtaining in steps, the second obtaining module 20 can specifically be used for:

判断当前电量值是否小于预设阈值;Determine whether the current power value is less than the preset threshold;

若是,则获取该闹钟的剩余触发时长、以及该电子设备当前运行的所有第一应用。If yes, acquire the remaining trigger duration of the alarm clock and all first applications currently running on the electronic device.

本实施例中,该预设阈值是用于界定电量处于低电量状态的临界值,其可以是用户自行设定的,比如20%电量。由于只有在低电量的情况下,才需要担心电子设备能否支撑到闹钟的设定时间,而电量充足的时候电子设备完全可以等待用户下一次充电,无需进行其他处理,故第二获取模块20通过先判断当前电量值的高低状态,并在当前电量值较低时,才获取剩余触发时长和第一应用,可以尽量避免电子设备执行无用的操作,节省耗电量。In this embodiment, the preset threshold is a critical value for defining the low battery state, which can be set by the user, such as 20% battery. Because only in the case of low power, it is necessary to worry about whether the electronic device can support the alarm clock setting time, and when the power is sufficient, the electronic device can completely wait for the user to charge the next time without other processing, so the second acquisition module 20 By first judging the high or low state of the current power value, and only obtaining the remaining trigger duration and the first application when the current power value is low, it is possible to avoid unnecessary operations of the electronic device and save power consumption.

(3)确定模块30(3) Determination module 30

确定模块30,用于根据该第一应用和当前电量值确定该电子设备的剩余工作时长。A determining module 30, configured to determine the remaining working time of the electronic device according to the first application and the current power value.

本实施例中,该剩余工作时长的确定方法可以根据实际情况而定,其可以是根据该电子设备当前的实际耗电速度预估出的,比如可以检测当前电子设备电量值发生变化时所耗费的时长以及变化量来确定该电子设备的实际耗电速度,之后根据电量值和实际耗电速度计算该剩余工作时长,当然,该剩余工作时长也可以是根据每个应用设定好了的耗电速度预估出的,此时,该确定模块30具体可以用于:In this embodiment, the method for determining the remaining working time can be determined according to the actual situation, which can be estimated based on the current actual power consumption speed of the electronic device, for example, it can detect the power consumption of the current electronic device when the power value changes. The actual power consumption speed of the electronic device is determined based on the duration and the amount of change, and then the remaining working time is calculated according to the power value and the actual power consumption speed. Of course, the remaining working time can also be set according to the power consumption of each application. The electrical speed is estimated, at this time, the determination module 30 can be specifically used for:

获取每一个第一应用的预设耗电速度;Acquiring the preset power consumption speed of each first application;

将获取的所有预设耗电速度进行相加,得到总耗电速度;Add up all the obtained preset power consumption speeds to obtain the total power consumption speed;

根据当前电量值和总耗电速度计算该电子设备的剩余工作时长。Calculate the remaining working time of the electronic device according to the current power value and the total power consumption speed.

本实施例中,该预设耗电速度可以根据实际应用而定,比如可以根据每个应用的CPU占用率来定,通常,CPU占用率越高,该应用对应的预设耗电速度可以设定的越大。通过计算电子设备中所有运行应用的预设耗电速度之和,可以预估该电子设备的总耗电速度,然后计算当前电量值和总耗电速度的商值,得到该电子设备的剩余工作时长。In this embodiment, the preset power consumption speed can be determined according to the actual application, for example, it can be determined according to the CPU usage rate of each application. Generally, the higher the CPU usage rate, the preset power consumption speed corresponding to the application can be set to Set the bigger. By calculating the sum of the preset power consumption speeds of all running applications in the electronic device, the total power consumption speed of the electronic device can be estimated, and then the quotient of the current power value and the total power consumption speed can be calculated to obtain the remaining work of the electronic device duration.

(4)控制模块40(4) Control module 40

控制模块40,用于根据该剩余触发时长和剩余工作时长对该第一应用进行控制。The control module 40 is configured to control the first application according to the remaining trigger duration and the remaining working duration.

例如,请参见图5,该控制模块40具体可以包括判断子模块41、关闭子模块42和控制子模块43,其中:For example, referring to FIG. 5, the control module 40 may specifically include a judging submodule 41, a closing submodule 42 and a control submodule 43, wherein:

判断子模块41,用于判断该剩余触发时长是否大于剩余工作时长。The judging sub-module 41 is used to judge whether the remaining trigger duration is greater than the remaining working duration.

关闭子模块42,用于若该剩余触发时长大于剩余工作时长,则关闭所有第一应用。The closing sub-module 42 is configured to close all first applications if the remaining triggering time is greater than the remaining working time.

本实施例中,当剩余触发时长大于剩余工作时长时,说明当前电子设备的电量值处于很低的状态,以至于在闹钟启动之前,电子设备已经由于低电量而自动关机了,为此,可以采取最大力度的省电措施,也即关闭当前运行的所有第一应用。In this embodiment, when the remaining triggering duration is greater than the remaining working duration, it means that the power value of the current electronic device is in a very low state, so that the electronic device has automatically shut down due to low power before the alarm clock is activated. Therefore, you can Take maximum power saving measures, i.e. close all currently running #1 apps.

控制子模块43,用于若该剩余触发时长小于或等于剩余工作时长,则根据当前电量值确定目标电量区间;根据该目标电量区间对该第一应用进行控制。The control sub-module 43 is configured to determine the target power range according to the current power value if the remaining trigger time is less than or equal to the remaining working time; and control the first application according to the target power range.

本实施例中,当剩余触发时长小于或等于剩余工作时长时,说明当前电子设备的电量虽然低,但勉强可以维持到闹钟的启动时间,而由于闹钟在启动的过程中也需要消耗一定的电量,为此,还是需要采取一定的省电措施,比如关闭一部分运行应用,才能保证闹钟能正常工作,当然,这部分运行应用的选择可以根据当前的具体电量值而定,此时,该控制子模块43进一步可以用于:In this embodiment, when the remaining triggering time is less than or equal to the remaining working time, it means that although the power of the current electronic device is low, it can barely last until the start time of the alarm clock, and because the alarm clock also needs to consume a certain amount of power during the start-up process , for this reason, it is still necessary to take certain power-saving measures, such as closing some running applications, to ensure that the alarm clock can work normally. Of course, the selection of these running applications can be determined according to the current specific power value. At this time, the control sub Module 43 can further be used to:

从存储的所有预设电量区间中查找包含当前电量值的预设电量区间;Find the preset power range containing the current power value from all stored preset power ranges;

将查找到的预设电量区间确定为目标电量区间。The found preset power range is determined as the target power range.

本实施例中,该预设电量区间可以根据实际需求而定,比如可以包括5%-10%电量、10%-15%电量以及15%-20%电量等。In this embodiment, the preset power interval can be determined according to actual needs, for example, it can include 5%-10% power, 10%-15% power, and 15%-20% power.

与此同时,该控制子模块43还可以用于:At the same time, the control submodule 43 can also be used for:

从应用数据库中获取与该目标电量区间对应的第二应用集,作为目标第二应用集;Acquiring a second application set corresponding to the target power range from the application database as the target second application set;

获取与该目标第二应用集中第二应用相同的第一应用,作为目标第一应用;Obtain the first application identical to the second application in the target second application set as the target first application;

关闭该目标第一应用。Close the target first application.

本实施例中,不同的预设电量区间可以对应不同的第二应用集,每一第二应用集中包括至少一个第二应用,其可以是用户根据喜好自行设定的,也可以是系统根据用户以往在低电量情况下主动关闭的应用进行分析得到的,这些数据可以提前存储在应用数据库中,也即,请参见图6,该应用控制装置还可以包括创建模块50,用于:In this embodiment, different preset power intervals may correspond to different second application sets, and each second application set includes at least one second application, which may be set by the user according to preferences, or the system may In the past, the data obtained from the analysis of applications that were actively shut down under low battery conditions can be stored in the application database in advance, that is, referring to FIG. 6 , the application control device can also include a creation module 50 for:

在该控制子模块43从应用数据库中获取与该目标电量区间对应的第二应用集之前,获取预设时间范围内用户关闭的所有第二应用、以及每一个第二应用关闭时电子设备的剩余电量值;Before the control sub-module 43 obtains the second application set corresponding to the target power interval from the application database, obtain all the second applications closed by the user within the preset time range, and the remaining power of the electronic device when each second application is closed. power value;

获取至少一个预设电量区间;Obtain at least one preset power range;

根据该预设电量区间、剩余电量值和第二应用创建应用数据库。An application database is created according to the preset power range, the remaining power value and the second application.

本实施例中,该预设时间范围可以根据实际需求而定,比如可以为一个月或者半年等。在该预设时间范围内,用户在低电量情况下手动关闭应用时,系统都可以记录此时的剩余电量值,然后根据每次记录的剩余电量值和关闭应用创建应用数据库。In this embodiment, the preset time range may be determined according to actual needs, for example, it may be one month or half a year. Within the preset time range, when the user manually closes the application when the battery is low, the system can record the remaining battery value at this time, and then create an application database according to the remaining battery value recorded each time and close the application.

例如,该创建模块50具体可以用于:For example, the creation module 50 can specifically be used for:

根据该剩余电量值确定每一个第二应用对应的预设电量区间;determining a preset power range corresponding to each second application according to the remaining power value;

将属于同一预设电量区间的所有第二应用进行聚合,得到第二应用集,每一预设电量区间对应一个第二应用集;Aggregating all second applications belonging to the same preset power range to obtain a second application set, each preset power range corresponds to a second application set;

将该第二应用集存储在应用数据库中,以创建该应用数据库。The second set of applications is stored in an application database to create the application database.

本实施例中,该第二应用集可以是一次性建立的,比如到达预设时间时才开始对记录的所有关闭应用进行统计,也可以是多次建立的,比如当每次记录了新的关闭应用时,可以将其添入对应的第二应用集中,直至到达预设时间,当然,还可以是其他建立方式,等等。该应用数据库中存储的数据是通过对用户的历史行为数据进行分析学习得到的,每一第二应用集合都代表用户以往在对应预设电量区间所关闭的应用,故后续电子设备可以根据实际电量值自动关闭最符合用户行为习惯的运行应用,无需用户手动进行,方法简单,灵活性高,用户体验感好。In this embodiment, the second application set can be established once, for example, when the preset time is reached, it will start to count all the closed applications recorded, or it can be established multiple times, for example, when a new application is recorded each time When the application is closed, it can be added to the corresponding second application set until the preset time is reached. Of course, other establishment methods can also be used, and so on. The data stored in the application database is obtained by analyzing and learning the user's historical behavior data. Each second application set represents the applications that the user has previously closed in the corresponding preset power interval, so subsequent electronic devices can be based on the actual power. The value automatically closes the running application that is most in line with the user's behavior habits, without the user's manual operation, the method is simple, the flexibility is high, and the user experience is good.

具体实施时,以上各个单元可以作为独立的实体来实现,也可以进行任意组合,作为同一或若干个实体来实现,以上各个单元的具体实施可参见前面的方法实施例,在此不再赘述。During specific implementation, each of the above units may be implemented as an independent entity, or may be combined arbitrarily as the same or several entities. The specific implementation of each of the above units may refer to the previous method embodiments, and will not be repeated here.

由上述可知,本实施例提供的应用控制装置,第一获取模块10当检测到电子设备中已设置闹钟时,获取该电子设备的当前电量值,第二获取模块20根据当前电量值获取该闹钟的剩余触发时长、以及该电子设备当前运行的所有第一应用,之后,确定模块30根据该第一应用和当前电量值确定该电子设备的剩余工作时长,控制模块40根据该剩余触发时长和剩余工作时长对该第一应用进行控制,从而能避免设置好的闹钟因电子设备电量低而发生失灵的现象,方法简单,灵活性高,用户体验感好。As can be seen from the above, in the application control device provided in this embodiment, when the first acquisition module 10 detects that an alarm clock has been set in the electronic device, it acquires the current power value of the electronic device, and the second acquisition module 20 acquires the alarm clock according to the current power value. The remaining trigger duration of the electronic device and all the first applications currently running on the electronic device. Afterwards, the determination module 30 determines the remaining working duration of the electronic device according to the first application and the current power value. The control module 40 determines the remaining working duration of the electronic device according to the remaining trigger duration and remaining The working hours are controlled by the first application, thereby avoiding the failure of the set alarm clock due to low power of the electronic device, the method is simple, the flexibility is high, and the user experience is good.

此外,本发明实施例还提供了一种存储介质,其中,该存储介质中存储有多条指令,该指令适于由处理器加载以执行以下步骤:In addition, an embodiment of the present invention also provides a storage medium, wherein a plurality of instructions are stored in the storage medium, and the instructions are suitable for being loaded by a processor to perform the following steps:

当检测到电子设备中已设置闹钟时,获取该电子设备的当前电量值;When it is detected that an alarm clock has been set in the electronic device, obtain the current power value of the electronic device;

根据当前电量值获取该闹钟的剩余触发时长、以及该电子设备当前运行的所有第一应用;Acquiring the remaining trigger duration of the alarm clock and all the first applications currently running on the electronic device according to the current power value;

根据该第一应用和当前电量值确定该电子设备的剩余工作时长;determining the remaining working time of the electronic device according to the first application and the current power value;

根据该剩余触发时长和剩余工作时长对该第一应用进行控制。The first application is controlled according to the remaining trigger duration and the remaining working duration.

另外,本发明实施例还提供了一种电子设备,该电子设备可以是智能手机、平板电脑等设备。图7所示,电子设备600包括处理器601、存储器602、显示屏603以及控制电路604。其中,处理器601分别与存储器602、显示屏603、控制电路604电性连接。In addition, an embodiment of the present invention also provides an electronic device, and the electronic device may be a smart phone, a tablet computer, or the like. As shown in FIG. 7 , an electronic device 600 includes a processor 601 , a memory 602 , a display screen 603 and a control circuit 604 . Wherein, the processor 601 is electrically connected to the memory 602, the display screen 603, and the control circuit 604, respectively.

处理器601是电子设备600的控制中心,利用各种接口和线路连接整个电子设备的各个部分,通过运行或加载存储在存储器602内的应用程序,以及调用存储在存储器602内的数据,执行电子设备的各种功能和处理数据,从而对电子设备进行整体监控。The processor 601 is the control center of the electronic device 600. It uses various interfaces and lines to connect various parts of the entire electronic device. By running or loading the application program stored in the memory 602 and calling the data stored in the memory 602, the processor 601 executes the electronic Various functions and processing data of the equipment, so as to monitor the electronic equipment as a whole.

在本实施例中,电子设备600中的处理器601会按照如下的步骤,将一个或一个以上的应用程序的进程对应的指令加载到存储器602中,并由处理器601来运行存储在存储器602中的应用程序,从而实现各种功能:In this embodiment, the processor 601 in the electronic device 600 will follow the steps below to load the instructions corresponding to the process of one or more application programs into the memory 602, and the instructions stored in the memory 602 will be executed by the processor 601. in the application, so as to realize various functions:

当检测到电子设备中已设置闹钟时,获取该电子设备的当前电量值;When it is detected that an alarm clock has been set in the electronic device, obtain the current power value of the electronic device;

根据当前电量值获取该闹钟的剩余触发时长、以及该电子设备当前运行的所有第一应用;Acquiring the remaining trigger duration of the alarm clock and all the first applications currently running on the electronic device according to the current power value;

根据该第一应用和当前电量值确定该电子设备的剩余工作时长;determining the remaining working time of the electronic device according to the first application and the current power value;

根据该剩余触发时长和剩余工作时长对该第一应用进行控制。The first application is controlled according to the remaining trigger duration and the remaining working duration.

在一些实施例中,在根据该剩余触发时长和剩余工作时长对该第一应用进行控制时,该处理器用于执行以下步骤:In some embodiments, when controlling the first application according to the remaining trigger duration and the remaining working duration, the processor is configured to perform the following steps:

判断该剩余触发时长是否大于剩余工作时长;Determine whether the remaining trigger duration is greater than the remaining working duration;

若该剩余触发时长大于剩余工作时长,则关闭所有第一应用;If the remaining trigger duration is greater than the remaining working duration, all first applications are closed;

若该剩余触发时长小于或等于剩余工作时长,则根据当前电量值确定目标电量区间;根据该目标电量区间对该第一应用进行控制。If the remaining trigger duration is less than or equal to the remaining working duration, the target power range is determined according to the current power value; and the first application is controlled according to the target power range.

在一些实施例中,在根据该目标电量区间对该第一应用进行控制时,该处理器用于执行以下步骤:In some embodiments, when controlling the first application according to the target power range, the processor is configured to perform the following steps:

从应用数据库中获取与该目标电量区间对应的第二应用集,作为目标第二应用集;Acquiring a second application set corresponding to the target power range from the application database as the target second application set;

获取与该目标第二应用集中第二应用相同的第一应用,作为目标第一应用;Obtain the first application identical to the second application in the target second application set as the target first application;

关闭该目标第一应用。Close the target first application.

在一些实施例中,在从应用数据库中获取与该目标电量区间对应的第二应用集之前,该处理器还用于执行以下步骤:In some embodiments, before acquiring the second application set corresponding to the target power range from the application database, the processor is further configured to perform the following steps:

获取预设时间范围内用户关闭的所有第二应用、以及每一个第二应用关闭时电子设备的剩余电量值;Obtaining all second applications closed by the user within a preset time range, and the remaining power value of the electronic device when each second application is closed;

获取至少一个预设电量区间;Obtain at least one preset power range;

根据该预设电量区间、剩余电量值和第二应用创建应用数据库。An application database is created according to the preset power range, the remaining power value and the second application.

在一些实施例中,在根据该预设电量区间、剩余电量值和第二应用创建应用数据库时,该处理器用于执行以下步骤:In some embodiments, when creating the application database according to the preset power interval, the remaining power value and the second application, the processor is configured to perform the following steps:

根据该剩余电量值确定每一个第二应用对应的预设电量区间;determining a preset power range corresponding to each second application according to the remaining power value;

将属于同一预设电量区间的所有第二应用进行聚合,得到第二应用集,每一预设电量区间对应一个第二应用集;Aggregating all second applications belonging to the same preset power range to obtain a second application set, each preset power range corresponds to a second application set;

将该第二应用集存储在应用数据库中,以创建该应用数据库。The second set of applications is stored in an application database to create the application database.

在一些实施例中,在根据该第一应用和当前电量值确定该电子设备的剩余工作时长时,该处理器用于执行以下步骤:In some embodiments, when determining the remaining working time of the electronic device according to the first application and the current power value, the processor is configured to perform the following steps:

获取每一个第一应用的预设耗电速度;Acquiring the preset power consumption speed of each first application;

将获取的所有预设耗电速度进行相加,得到总耗电速度;Add up all the obtained preset power consumption speeds to obtain the total power consumption speed;

根据当前电量值和总耗电速度计算该电子设备的剩余工作时长。Calculate the remaining working time of the electronic device according to the current power value and the total power consumption speed.

存储器602可用于存储应用程序和数据。存储器602存储的应用程序中包含有可在处理器中执行的指令。应用程序可以组成各种功能模块。处理器601通过运行存储在存储器602的应用程序,从而执行各种功能应用以及数据处理。Memory 602 may be used to store applications and data. The application programs stored in the memory 602 include instructions executable by the processor. Applications can be composed of various functional modules. The processor 601 executes various functional applications and data processing by running the application programs stored in the memory 602 .

显示屏603可用于显示由用户输入的信息或提供给用户的信息以及终端的各种图形用户接口,这些图形用户接口可以由图像、文本、图标、视频和其任意组合来构成。The display screen 603 may be used to display information input by or provided to the user and various graphical user interfaces of the terminal. These graphical user interfaces may be composed of images, texts, icons, videos and any combination thereof.

控制电路604与显示屏603电性连接,用于控制显示屏603显示信息。The control circuit 604 is electrically connected to the display screen 603 for controlling the display screen 603 to display information.

在一些实施例中,如图7所示,电子设备600还包括:射频电路605、输入单元606、音频电路607、传感器608以及电源609。其中,处理器601分别与射频电路605、输入单元606、音频电路607、传感器608以及电源609电性连接。In some embodiments, as shown in FIG. 7 , the electronic device 600 further includes: a radio frequency circuit 605 , an input unit 606 , an audio circuit 607 , a sensor 608 and a power supply 609 . Wherein, the processor 601 is electrically connected to the radio frequency circuit 605 , the input unit 606 , the audio circuit 607 , the sensor 608 and the power supply 609 .

射频电路605用于收发射频信号,以通过无线通信与网络设备或其他电子设备建立无线通讯,与网络设备或其他电子设备之间收发信号。The radio frequency circuit 605 is used to send and receive radio frequency signals to establish wireless communication with network equipment or other electronic equipment through wireless communication, and to send and receive signals with network equipment or other electronic equipment.

输入单元606可用于接收输入的数字、字符信息或用户特征信息(例如指纹),以及产生与用户设置以及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入。其中,输入单元606可以包括指纹识别模组。The input unit 606 can be used to receive input numbers, character information or user characteristic information (such as fingerprints), and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control. Wherein, the input unit 606 may include a fingerprint identification module.

音频电路607可通过扬声器、传声器提供用户与终端之间的音频接口。The audio circuit 607 can provide an audio interface between the user and the terminal through a speaker or a microphone.

电子设备600还可以包括至少一种传感器608,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板的亮度,接近传感器可在终端移动到耳边时,关闭显示面板和/或背光。作为运动传感器的一种,重力加速度传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于终端还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。The electronic device 600 may also include at least one sensor 608, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel according to the brightness of the ambient light, and the proximity sensor may turn off the display panel and/or the backlight when the terminal moves to the ear . As a kind of motion sensor, the gravitational acceleration sensor can detect the magnitude of acceleration in various directions (generally three axes), and can detect the magnitude and direction of gravity when it is stationary, and can be used for applications that recognize the attitude of mobile phones (such as horizontal and vertical screen switching, related Games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tap), etc.; as for other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor, etc. repeat.

电源609用于给电子设备600的各个部件供电。在一些实施例中,电源609可以通过电源管理系统与处理器601逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。The power supply 609 is used to supply power to various components of the electronic device 600 . In some embodiments, the power supply 609 may be logically connected to the processor 601 through a power management system, so that functions such as charging, discharging, and power consumption management may be implemented through the power management system.

尽管图7中未示出,电子设备600还可以包括摄像头、蓝牙模块等,在此不再赘述。Although not shown in FIG. 7 , the electronic device 600 may also include a camera, a Bluetooth module, etc., which will not be repeated here.

本发明实施例提供的电子设备,当检测到电子设备中已设置闹钟时,通过获取该电子设备的当前电量值,并根据当前电量值获取该闹钟的剩余触发时长、以及该电子设备当前运行的所有第一应用,之后,根据该第一应用和当前电量值确定该电子设备的剩余工作时长,并根据该剩余触发时长和剩余工作时长对该第一应用进行控制,从而能避免设置好的闹钟因电子设备电量低而发生失灵的现象,方法简单,灵活性高,用户体验感好。The electronic device provided by the embodiment of the present invention, when detecting that an alarm clock has been set in the electronic device, obtains the current power value of the electronic device, and obtains the remaining trigger time of the alarm clock and the current running time of the electronic device according to the current power value. All the first applications, after that, determine the remaining working time of the electronic device according to the first application and the current power value, and control the first application according to the remaining triggering time and remaining working time, so as to avoid setting the alarm clock The phenomenon of failure due to low power of electronic equipment has a simple method, high flexibility, and good user experience.

需要说明的是,本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储介质中,存储介质可以包括:只读存储器(ROM,Read Only Memory)、随机存取记忆体(RAM,Random Access Memory)、磁盘或光盘等。It should be noted that those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, The storage medium may include: a read only memory (ROM, Read Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and the like.

综上所述,虽然本发明已以优选实施例揭露如上,但上述优选实施例并非用以限制本发明,本领域的普通技术人员,在不脱离本发明的精神和范围内,均可作各种更动与润饰,因此本发明的保护范围以权利要求界定的范围为准。In summary, although the present invention has been disclosed above with preferred embodiments, the above preferred embodiments are not intended to limit the present invention, and those of ordinary skill in the art can make various modifications without departing from the spirit and scope of the present invention. Therefore, the protection scope of the present invention shall be determined by the scope defined in the claims.

Claims (14)

CN201710526364.7A2017-06-302017-06-30Application control method, device, storage medium and electronic equipmentExpired - Fee RelatedCN107302633B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201710526364.7ACN107302633B (en)2017-06-302017-06-30Application control method, device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201710526364.7ACN107302633B (en)2017-06-302017-06-30Application control method, device, storage medium and electronic equipment

Publications (2)

Publication NumberPublication Date
CN107302633Atrue CN107302633A (en)2017-10-27
CN107302633B CN107302633B (en)2020-05-12

Family

ID=60135201

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201710526364.7AExpired - Fee RelatedCN107302633B (en)2017-06-302017-06-30Application control method, device, storage medium and electronic equipment

Country Status (1)

CountryLink
CN (1)CN107302633B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN107832147A (en)*2017-10-302018-03-23努比亚技术有限公司A kind of browser execution method of adjustment, terminal and computer-readable recording medium
CN107832132A (en)*2017-11-142018-03-23广东欧珀移动通信有限公司Application control method, apparatus, storage medium and electronic equipment
CN110209060A (en)*2019-05-232019-09-06无锡小天鹅电器有限公司A kind of control method and device, equipment and computer storage medium
CN111954356A (en)*2020-07-232020-11-17宁夏万泰照明科技股份有限公司Intelligent light adjusting method and system
CN113315872A (en)*2021-05-202021-08-27中国联合网络通信集团有限公司Mobile terminal control method and device and mobile terminal
CN115033304A (en)*2022-06-272022-09-09维沃移动通信有限公司Application program control method and device and electronic equipment
CN116632389A (en)*2023-06-192023-08-22国广顺能(上海)能源科技有限公司Charging method of mobile charging equipment, electronic equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN1980430A (en)*2005-12-052007-06-13乐金电子(中国)研究开发中心有限公司Mobile terminal alarm-clock power supply management method and system
CN101783824A (en)*2010-01-192010-07-21宇龙计算机通信科技(深圳)有限公司Method, system and mobile terminal for detecting alarm clock setting effectiveness
US20150077127A1 (en)*2013-09-162015-03-19Shell Internet (Beijing) Security Technology Co., Ltd.Method for determining remaining service time of battery, client device and mobile terminal
CN105530384A (en)*2014-09-282016-04-27小米科技有限责任公司Method and device for power reminding based on alarm clock
CN106034182A (en)*2015-03-132016-10-19深圳酷派技术有限公司Method, device and terminal for controlling electric quantity loss
CN106293445A (en)*2015-06-292017-01-04腾讯科技(深圳)有限公司Application program uses the acquisition methods of data, device and terminal unit
CN106896894A (en)*2015-12-212017-06-27北京奇虎科技有限公司Terminal power management method and terminal

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN1980430A (en)*2005-12-052007-06-13乐金电子(中国)研究开发中心有限公司Mobile terminal alarm-clock power supply management method and system
CN101783824A (en)*2010-01-192010-07-21宇龙计算机通信科技(深圳)有限公司Method, system and mobile terminal for detecting alarm clock setting effectiveness
US20150077127A1 (en)*2013-09-162015-03-19Shell Internet (Beijing) Security Technology Co., Ltd.Method for determining remaining service time of battery, client device and mobile terminal
CN105530384A (en)*2014-09-282016-04-27小米科技有限责任公司Method and device for power reminding based on alarm clock
CN106034182A (en)*2015-03-132016-10-19深圳酷派技术有限公司Method, device and terminal for controlling electric quantity loss
CN106293445A (en)*2015-06-292017-01-04腾讯科技(深圳)有限公司Application program uses the acquisition methods of data, device and terminal unit
CN106896894A (en)*2015-12-212017-06-27北京奇虎科技有限公司Terminal power management method and terminal

Cited By (10)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN107832147A (en)*2017-10-302018-03-23努比亚技术有限公司A kind of browser execution method of adjustment, terminal and computer-readable recording medium
CN107832132A (en)*2017-11-142018-03-23广东欧珀移动通信有限公司Application control method, apparatus, storage medium and electronic equipment
CN107832132B (en)*2017-11-142020-08-04Oppo广东移动通信有限公司 Application control method, device, storage medium and electronic device
CN110209060A (en)*2019-05-232019-09-06无锡小天鹅电器有限公司A kind of control method and device, equipment and computer storage medium
CN110209060B (en)*2019-05-232022-03-11无锡小天鹅电器有限公司Control method, control device, control equipment and computer storage medium
CN111954356A (en)*2020-07-232020-11-17宁夏万泰照明科技股份有限公司Intelligent light adjusting method and system
CN111954356B (en)*2020-07-232023-02-24宁夏万泰照明科技股份有限公司Intelligent light adjusting method and system
CN113315872A (en)*2021-05-202021-08-27中国联合网络通信集团有限公司Mobile terminal control method and device and mobile terminal
CN115033304A (en)*2022-06-272022-09-09维沃移动通信有限公司Application program control method and device and electronic equipment
CN116632389A (en)*2023-06-192023-08-22国广顺能(上海)能源科技有限公司Charging method of mobile charging equipment, electronic equipment and storage medium

Also Published As

Publication numberPublication date
CN107302633B (en)2020-05-12

Similar Documents

PublicationPublication DateTitle
CN107302633A (en)application control method, device, storage medium and electronic equipment
EP3502880A1 (en)Method for preloading application, storage medium, and terminal device
WO2019024642A1 (en)Process control method and apparatus, storage medium, and electronic device
KR101477179B1 (en)Method And Mobile Terminal For Determining and Displaying Power Efficiency of Application
CN107800651A (en)Closing application program method, apparatus, storage medium and electronic equipment
US10559273B2 (en)Display screen control method and apparatus and terminal
CN107463436B (en) Process control method, device, storage medium and electronic device
CN108733298B (en)Touch information processing method and device, storage medium and electronic equipment
CN106951850B (en)A kind of method and mobile terminal controlling fingerprint recognition mould group
CN107465737A (en)Data synchronization method, device, storage medium and electronic equipment
CN104460935A (en)Information processing method and electronic equipment
CN106292991A (en) A method and device for reducing power consumption of terminal equipment
CN108196482A (en)Power consumption control method, device, storage medium and electronic equipment
CN102890628A (en)Method and device for displaying target object
CN107704876A (en) Application control method, device, storage medium and electronic device
CN107295183A (en) An alarm clock reminder method, device, storage medium and terminal
CN107402808A (en)process management method, device, storage medium and electronic equipment
CN107832131B (en) Application closing method, device, storage medium and electronic device
CN107734618B (en)Application program closing method and device, storage medium and electronic equipment
CN106791170B (en) Network processing method, device and terminal
CN107277906B (en)Mode selection method, device, terminal and computer readable storage medium
CN108038050A (en)Performance adjusting method and device, storage medium and electronic equipment
CN107291213A (en) Mode Selection Method, Device, Terminal, and Computer-Readable Storage Medium
CN108958607B (en)Split screen display starting method and device, storage medium and electronic equipment
CN111404242A (en)Charging method, charging device, storage medium and mobile terminal

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
CB02Change of applicant information

Address after:Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant after:GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before:Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant before:GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

CB02Change of applicant information
GR01Patent grant
GR01Patent grant
CF01Termination of patent right due to non-payment of annual fee

Granted publication date:20200512

CF01Termination of patent right due to non-payment of annual fee

[8]ページ先頭

©2009-2025 Movatter.jp