技术领域technical field
本公开涉及电子技术领域,尤其涉及一种设备控制方法及装置。The present disclosure relates to the field of electronic technology, and in particular, to an equipment control method and device.
背景技术Background technique
随着互联网技术的快速发展,用户常在移动设备,例如智能手机、平板电脑中安装各种应用(Application,APP)以实现各种应用功能,随之而来的问题是即使用户关闭设备屏幕,不对设备执行任何操作,移动设备的电量也会因为有APP需要推送消息而申请唤醒锁,进而导致系统不能休眠,电量消耗也会很快,大大缩短了设备的续航时间。With the rapid development of Internet technology, users often install various applications (Application, APP) in mobile devices, such as smart phones and tablet computers, to realize various application functions. The ensuing problem is that even if the user turns off the device screen, If you do not perform any operations on the device, the power of the mobile device will also apply for a wake lock because an APP needs to push a message, which will cause the system to fail to sleep, and the power consumption will be very fast, which greatly shortens the battery life of the device.
发明内容Contents of the invention
为克服相关技术中存在的问题,本公开实施例提供一种设备控制方法及装置,用以延长移动设备的续航时间。In order to overcome the problems existing in the related technologies, the embodiments of the present disclosure provide a device control method and device for prolonging the battery life of the mobile device.
根据本公开实施例的第一方面,提供一种设备控制方法,包括:According to a first aspect of an embodiment of the present disclosure, a device control method is provided, including:
确定在屏幕关闭超过预设时间阈值时需要停止运行的程序;Identify programs that need to stop running when the screen is turned off for more than a preset time threshold;
执行停止运行所述程序的操作。Perform an action to stop running the program in question.
在一实施例中,确定在屏幕关闭超过预设时间阈值时需要停止运行的程序,包括:In an embodiment, determining that the program that needs to stop running when the screen is turned off exceeds a preset time threshold includes:
通过查询程序黑名单,确定需要停止运行的第一类程序,所述第一类程序为具有申请唤醒锁的第一权限的程序,所述程序黑名单用于记录所述第一类程序的标识信息;以及,Determine the first type of program that needs to stop running by querying the program blacklist, the first type of program is a program with the first authority to apply for a wake lock, and the program blacklist is used to record the identification of the first type of program information; and,
确定需要停止运行的第二类程序,所述第二类程序为具有申请唤醒锁的第二权限的程序。A second type of program that needs to be stopped is determined, and the second type of program is a program with a second permission to apply for a wake lock.
在一实施例中,方法还包括:In one embodiment, the method also includes:
向服务器发送黑名单更新请求消息,所述请求消息中包括所述需要停止运行的第二类程序的标识信息;Sending a blacklist update request message to the server, where the request message includes identification information of the second type of program that needs to be stopped;
接收所述服务器根据接收到的所有设备发送的黑名单更新请求消息确定的程序黑名单;receiving the program blacklist determined by the server according to the received blacklist update request messages sent by all devices;
基于所述接收到的所述程序黑名单更新本地存储的程序黑名单。Updating a locally stored program blacklist based on the received program blacklist.
在一实施例中,方法还包括:In one embodiment, the method also includes:
生成唤醒锁应用提示信息,所述唤醒锁应用提示信息包括所述需要停止运行的第二类程序的标识信息;Generate wake lock application prompt information, where the wake lock application prompt information includes identification information of the second type of program that needs to stop running;
接收用户根据所述唤醒锁应用提示信息输入的反馈信息;receiving feedback information input by the user according to the prompt information of the wake lock application;
根据所述反馈信息,更新所述程序黑名单。The program blacklist is updated according to the feedback information.
在一实施例中,确定需要停止运行的第二类程序,包括:In one embodiment, determining the second type of program that needs to stop running includes:
获取从屏幕关闭时起的预设时间阈值内第二类程序的唤醒锁申请数量;Obtain the number of wake lock applications of the second type of program within the preset time threshold from when the screen is turned off;
确定所述申请数量是否大于预设数量;determining whether the number of applications is greater than a preset number;
如果所述申请数量大于预设数量,则基于所述每一个程序对应的唤醒锁申请数量,将所述每一个程序按照申请数量进行从大到小的排序;If the number of applications is greater than the preset number, then based on the number of wake lock applications corresponding to each program, sort each program according to the number of applications from large to small;
将排名最前的预设个数的程序确定为需要停止运行的第二类程序。The top preset number of programs are determined as the second type of programs that need to be stopped.
在一实施例中,方法还包括:In one embodiment, the method also includes:
确定需要停止运行的第二类程序,包括:Identify the second category of programs that need to be stopped, including:
获取从屏幕关闭时起的预设时间阈值内第二类程序的唤醒锁持有时间;Obtain the wake lock holding time of the second type of program within a preset time threshold from when the screen is turned off;
确定所述持有时间是否大于预设时间;determining whether the holding time is greater than a preset time;
如果所述持有时间大于预设时间,则基于所述每一个程序对应的唤醒锁持有时间,将所述每一个程序按照持有时间进行从大到小的排序;If the holding time is greater than the preset time, then based on the wake lock holding time corresponding to each program, sort each program according to the holding time from large to small;
将排名最前的预设个数的程序确定为需要停止运行的第二类程序。The top preset number of programs are determined as the second type of programs that need to be stopped.
在一实施例中,方法还包括:In one embodiment, the method also includes:
确定所述预设时间阈值内申请唤醒锁的非内核层的程序的标识信息;Determine the identification information of the non-kernel layer program that applies for the wake lock within the preset time threshold;
通过查询程序白名单和程序黑名单确定申请唤醒锁的非内核层的程序是否为第一类程序或者第三类程序,所述程序白名单用于记录第三类程序的标识信息,所述第三类程序为具有申请唤醒锁的第三权限的程序;By querying the program whitelist and the program blacklist, it is determined whether the non-kernel layer program applying for the wake lock is the first type program or the third type program, the program white list is used to record the identification information of the third type program, and the first type program The third type of program is a program with the third permission to apply for a wake lock;
如果所述申请唤醒锁的非内核层的程序不是第三类程序和所述第一类程序,则确定所述申请唤醒锁的程序为第二类程序,基于所述第二类程序执行所述确定需要停止运行的第二类程序的操作。If the program of the non-kernel layer applying for the wake lock is not the third type of program and the first type of program, it is determined that the program of the application for the wake lock is the second type of program, and the program is executed based on the second type of program Determine the operation of the second class of programs that need to be stopped.
在一实施例中,方法还包括:In one embodiment, the method also includes:
在屏幕关闭时,设置一个预设时间阈值长度的定时器;Set a timer with a preset time threshold length when the screen is turned off;
通过确定所述定时器是否超时确定所述关闭屏幕的时间是否超过预设时间阈值。Whether the time for turning off the screen exceeds a preset time threshold is determined by determining whether the timer times out.
根据本公开实施例的第二方面,提供一种设备控制装置,可包括:According to a second aspect of an embodiment of the present disclosure, there is provided an apparatus control device, which may include:
程序确定模块,被配置为确定在屏幕关闭超过预设时间阈值时需要停止运行的程序;a program determining module configured to determine a program that needs to stop running when the screen is turned off for more than a preset time threshold;
停止运行模块,被配置为执行停止运行所述程序确定模块确定的所述程序的操作。a stop running module configured to perform an operation of stopping running the program determined by the program determining module.
在一实施例中,程序确定模块包括:In one embodiment, the program determination module includes:
查询子模块,被配置为通过查询程序黑名单,确定需要停止运行的第一类程序,所述第一类程序为具有申请唤醒锁的第一权限的程序,所述程序黑名单用于记录所述第一类程序的标识信息;以及,The query submodule is configured to determine the first type of program that needs to stop running by querying the program blacklist, the first type of program is a program with the first authority to apply for a wake lock, and the program blacklist is used to record all identification information for the first type of program; and,
第一确定子模块,被配置为确定需要停止运行的第二类程序,所述第二类程序为具有申请唤醒锁的第二权限的程序。The first determining submodule is configured to determine a second type of program that needs to stop running, and the second type of program is a program with a second permission to apply for a wake lock.
在一实施例中,装置还包括:In one embodiment, the device further includes:
发送模块,被配置为向服务器发送黑名单更新请求消息,所述请求消息中包括所述需要停止运行的第二类程序的标识信息;The sending module is configured to send a blacklist update request message to the server, where the request message includes the identification information of the second type of program that needs to stop running;
第一接收模块,被配置为接收所述服务器根据接收到的所有设备发送的黑名单更新请求消息确定的程序黑名单;The first receiving module is configured to receive the program blacklist determined by the server according to the received blacklist update request message sent by all devices;
第一更新模块,被配置为基于所述第一接收模块接收到的所述程序黑名单更新本地存储的程序黑名单。A first updating module configured to update a locally stored program blacklist based on the program blacklist received by the first receiving module.
在一实施例中,装置还包括:In one embodiment, the device further includes:
提示模块,被配置为生成唤醒锁应用提示信息,所述唤醒锁应用提示信息包括所述需要停止运行的第二类程序的标识信息;The prompt module is configured to generate wake lock application prompt information, where the wake lock application prompt information includes the identification information of the second type of program that needs to stop running;
第二接收模块,被配置为接收用户根据所述提示模块生成的所述唤醒锁应用提示信息输入的反馈信息;The second receiving module is configured to receive feedback information input by the user according to the wake lock application prompt information generated by the prompt module;
第二更新模块,被配置为根据所述第二接收模块接收到的所述反馈信息,更新所述程序黑名单。The second updating module is configured to update the program blacklist according to the feedback information received by the second receiving module.
在一实施例中,第一确定子模块包括:In one embodiment, the first determining submodule includes:
第一获取子模块,被配置为获取从屏幕关闭时起的预设时间阈值内第二类程序的唤醒锁申请数量;The first obtaining submodule is configured to obtain the number of wake-up lock applications of the second type of program within the preset time threshold from when the screen is turned off;
第二确定子模块,被配置为确定所述第一获取子模块获取的所述申请数量是否大于预设数量;The second determination submodule is configured to determine whether the number of applications acquired by the first acquisition submodule is greater than a preset number;
第一排序子模块,被配置为在所述申请数量大于预设数量时,基于所述每一个程序对应的唤醒锁申请数量,将所述每一个程序按照申请数量进行从大到小的排序;The first sorting submodule is configured to sort each program according to the number of applications from large to small based on the number of wake lock applications corresponding to each program when the number of applications is greater than the preset number;
第三确定子模块,被配置为将所述第一排序子模块排序后的所述排名最前的预设个数的程序确定为需要停止运行的第二类程序,所述第一确定子模块基于所述第二类程序执行所述确定需要停止运行的第二类程序的操作。The third determining submodule is configured to determine the top preset number of programs sorted by the first sorting submodule as the second type of programs that need to stop running, and the first determining submodule is based on The second type of program executes the operation of the second type of program determined to be stopped.
在一实施例中,第一确定子模块包括:In one embodiment, the first determining submodule includes:
第二获取子模块,被配置为获取从屏幕关闭时起的预设时间阈值内第二类程序的唤醒锁持有时间;The second obtaining submodule is configured to obtain the wake lock holding time of the second type of program within the preset time threshold from when the screen is turned off;
第四确定子模块,被配置为确定所述第二获取子模块获取的所述持有时间是否大于预设时间;The fourth determining submodule is configured to determine whether the holding time obtained by the second obtaining submodule is greater than a preset time;
第二排序子模块,被配置为在所述持有时间大于预设时间时,基于所述每一个程序对应的唤醒锁持有时间,将所述每一个程序按照持有时间进行从大到小的排序;The second sorting submodule is configured to, when the holding time is greater than a preset time, based on the wake lock holding time corresponding to each program, sort each program according to the holding time from largest to smallest sorting;
第五确定子模块,被配置为将所述第二排序子模块排序后的排名最前的预设个数的程序确定为需要停止运行的第二类程序。The fifth determining submodule is configured to determine the top preset number of programs sorted by the second sorting submodule as the second type of programs that need to stop running.
在一实施例中,装置还包括:In one embodiment, the device further includes:
程序标识确定模块,被配置为确定所述预设时间阈值内申请唤醒锁的非内核层的程序的标识信息;The program identification determination module is configured to determine the identification information of the non-kernel layer program that applies for the wake lock within the preset time threshold;
查询模块,被配置为通过查询程序白名单和程序黑名单确定申请唤醒锁的非内核层的程序是否为第一类程序或者第三类程序,所述程序白名单用于记录第三类程序的标识信息,所述第三类程序为具有申请唤醒锁的第三权限的程序;The query module is configured to determine whether the program at the non-kernel layer that applies for the wake lock is a program of the first type or a program of the third type by querying the program white list and the program black list, and the program white list is used to record the third type of program identification information, the third type of program is a program with the third permission to apply for a wake lock;
第一确定模块,被配置为在所述查询模块确定所述申请唤醒锁的非内核层的程序不是第三类程序和所述第一类程序时,确定所述申请唤醒锁的程序为第二类程序。The first determining module is configured to determine that the program applying for the wake lock is the second program when the query module determines that the non-kernel layer program applying for the wake lock is not the third type program and the first type program. class program.
在一实施例中,装置还包括:In one embodiment, the device further includes:
设置模块,被配置为在屏幕关闭时,设置一个预设时间阈值长度的定时器;The setting module is configured to set a timer with a preset time threshold length when the screen is turned off;
第二确定模块,被配置为通过确定所述设置模块设置的所述定时器是否超时确定所述关闭屏幕的时间是否超过预设时间阈值。The second determination module is configured to determine whether the time for turning off the screen exceeds a preset time threshold by determining whether the timer set by the setting module times out.
根据本公开实施例的第三方面,提供一种设备控制装置,包括:According to a third aspect of the embodiments of the present disclosure, there is provided a device control device, including:
处理器;processor;
用于存储处理器可执行指令的存储器;memory for storing processor-executable instructions;
其中,所述处理器被配置为:Wherein, the processor is configured as:
确定在屏幕关闭超过预设时间阈值时需要停止运行的程序;Identify programs that need to stop running when the screen is turned off for more than a preset time threshold;
执行停止运行所述程序的操作。Perform an action to stop running the program in question.
本公开的实施例提供的技术方案可以包括以下有益效果:The technical solutions provided by the embodiments of the present disclosure may include the following beneficial effects:
通过确定在屏幕关闭超过预设时间阈值时需要停止运行的程序可以减少在屏幕关闭超过预设时间阈值时申请唤醒锁的程序的数量和持有时间,由此可以大大降低屏幕关闭时的设备功耗,延长设备续航时间。By determining the programs that need to stop running when the screen is off for more than a preset time threshold, the number and holding time of programs that apply for wake locks when the screen is off for more than a preset time threshold can be reduced, thereby greatly reducing device performance when the screen is off. consumption, prolonging the battery life of the device.
并且,通过查询程序黑名单,确定需要停止运行的第一类程序,第一类程序为具有申请唤醒锁的第一权限的程序,其中第一权限为不能在屏幕关闭时申请唤醒锁的权限,可以实现限制一些不必要的程序申请唤醒锁,进而延长续航时间。And, by querying the program blacklist, determine the first type of program that needs to stop running. The first type of program is a program with the first permission to apply for a wake lock, wherein the first permission is the right not to apply for a wake lock when the screen is turned off. It is possible to restrict some unnecessary programs from applying for wake locks, thereby prolonging battery life.
通过向服务器推送需要停止运行的第二类程序,可以让服务器结合所有设备需要停止运行的第二类程序确定程序黑名单,结合多个设备的申请唤醒锁的次数和持有唤醒锁的时间所确定的程序黑名单的参考性更强。By pushing the second type of program that needs to stop running to the server, the server can determine the blacklist of the program combined with the second type of program that needs to be stopped running on all devices, and combine the number of wake lock applications of multiple devices and the time of holding wake locks. The determined program blacklist is more informative.
通过将每一个程序申请唤醒锁的次数和持有唤醒锁的时间推送给用户,可以由用户确定程序黑名单中包括哪些程序,提高了用户的体验。By pushing the number of times each program applies for a wake lock and the time it holds the wake lock to the user, the user can determine which programs are included in the program blacklist, which improves user experience.
通过在第二类程序的申请数量超过预设数量时,将第二类程序中每一个程序按照唤醒锁申请数量进行排序,并且停止运行排序最前的预设个数的程序,可以减少唤醒锁的申请数量,降低屏幕关闭时的设备功耗,延长设备续航时间。By sorting each program in the second type of program according to the number of wake lock applications when the number of applications for the second type of program exceeds the preset number, and stopping the running of the top preset number of programs, the wakeup lock can be reduced. The number of applications reduces the power consumption of the device when the screen is off and extends the battery life of the device.
通过在第二类程序的唤醒锁持有时间超过预设时间时,将第二类程序中每一个程序按照唤醒锁持有时间进行排序,并且停止运行排序最前的预设个数的程序,可以缩短唤醒锁持有时间,降低屏幕关闭时的设备功耗,延长设备续航时间。By sorting each program in the second type of program according to the wake-up lock holding time when the wake-up lock holding time of the second type of program exceeds the preset time, and stopping running the top preset number of programs sorted, it is possible Shorten the hold time of the wake lock, reduce the power consumption of the device when the screen is off, and extend the battery life of the device.
通过查询程序白名单和程序黑名单可以确定申请唤醒锁的非内核层的程序是否为第二类程序,由此可以实现确定需要停止运行的第二类程序的操作,进而实现通过对第二类程序进行唤醒锁的申请限制来降低屏幕关闭时的设备功耗。By querying the program whitelist and program blacklist, it can be determined whether the non-kernel layer program applying for the wake lock is the second type of program, so that the operation of determining the second type of program that needs to stop running can be realized, and then the second type The program restricts the application of wake locks to reduce the power consumption of the device when the screen is turned off.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure.
附图说明Description of drawings
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本发明的实施例,并与说明书一起用于解释本发明的原理。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description serve to explain the principles of the invention.
图1是根据一示例性实施例示出的设备控制方法的流程图。Fig. 1 is a flow chart of a device control method according to an exemplary embodiment.
图2A是根据一示例性实施例一示出的确定需要停止运行的第二类程序的方法的流程图一。Fig. 2A is a flowchart 1 of a method for determining a second type of program that needs to be stopped according to a first exemplary embodiment.
图2B是根据一示例性实施例二示出的确定需要停止运行的第二类程序的方法的流程图二。Fig. 2B is a second flow chart of a method for determining a second type of program that needs to be stopped according to a second exemplary embodiment.
图3是根据一示例性实施例三示出的确定程序是否为第二类程序的流程图。Fig. 3 is a flow chart of determining whether a program is a program of the second type according to a third exemplary embodiment.
图4A是根据一示例性实施例四示出的更新程序黑名单的方法的流程图一。Fig. 4A is a flowchart 1 of a method for updating a program blacklist according to a fourth exemplary embodiment.
图4B是根据一示例性实施例四示出的更新程序黑名单的方法的示意图。Fig. 4B is a schematic diagram of a method for updating a program blacklist according to a fourth exemplary embodiment.
图5是根据一示例性实施例五示出的更新程序黑名单的方法的流程图二。Fig. 5 is a second flowchart of a method for updating a program blacklist according to a fifth exemplary embodiment.
图6是根据一示例性实施例示出的一种设备控制装置的框图。Fig. 6 is a block diagram showing a device control device according to an exemplary embodiment.
图7是根据一示例性实施例示出的另一种设备控制装置的框图。Fig. 7 is a block diagram of another device control device according to an exemplary embodiment.
图8是根据一示例性实施例示出的又一种设备控制装置的框图。Fig. 8 is a block diagram of another device control device according to an exemplary embodiment.
图9是根据一示例性实施例示出的一种适用于设备控制装置的框图。Fig. 9 is a block diagram showing a device suitable for controlling equipment according to an exemplary embodiment.
具体实施方式Detailed ways
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本发明相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本发明的一些方面相一致的装置和方法的例子。Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numerals in different drawings refer to the same or similar elements unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the present invention. Rather, they are merely examples of apparatuses and methods consistent with aspects of the invention as recited in the appended claims.
图1是根据一示例性实施例示出的设备控制方法的流程图;该设备控制方法可以应用在移动设备,如智能手机、平板电脑上,如图1所示,该设备控制方法包括以下步骤101-102:Fig. 1 is a flowchart of a device control method shown according to an exemplary embodiment; the device control method can be applied to mobile devices, such as smart phones and tablet computers, as shown in Fig. 1 , the device control method includes the following steps 101 -102:
在步骤101中,确定在屏幕关闭超过预设时间阈值时需要停止运行的程序。In step 101, it is determined that the running program needs to be stopped when the screen is turned off for more than a preset time threshold.
在一实施例中,需要停止运行的程序包括所有的第一类程序,以及部分第二类程序。In an embodiment, the programs that need to be stopped include all programs of the first category and some programs of the second category.
在一实施例中,第一类程序为具有申请唤醒锁的第一权限的程序,第一权限为不被允许申请唤醒锁的权限,第一类程序可以通过查询程序黑名单获得,程序黑名单用于记录第一类程序的标识信息。In one embodiment, the first type of program is a program with the first permission to apply for a wake lock, and the first permission is a permission that is not allowed to apply for a wake lock. The first type of program can be obtained by querying the program blacklist, and the program blacklist It is used to record the identification information of the first type of program.
在一实施例中,第二类程序为具有申请唤醒锁的第二权限的程序,第二权限为在一些情况下可以被允许申请唤醒锁而在另一些情况下不被允许申请唤醒锁的权限,例如,在设备后台运行的第二类程序比较少,因此第二类程序的唤醒锁申请数量比较少的情况下被允许申请唤醒锁,而在设备后台运行的第二类程序比较多,第二类程序的唤醒锁申请数量比较多并且这个程序申请唤醒锁的数量比较多的情况下不被允许申请唤醒锁。In one embodiment, the second type of program is a program with a second permission to apply for a wake lock, and the second permission is a permission that can be allowed to apply for a wake lock in some cases and not allowed to apply for a wake lock in other cases , for example, there are relatively few second-type programs running in the background of the device, so the second-type programs are allowed to apply for wake-up locks when the number of wake-up lock applications is relatively small, and there are more second-type programs running in the device background. The second type of program has a large number of wake lock applications and the program is not allowed to apply for wake locks if the number of wake lock applications is relatively large.
在一实施例中,确定需要停止运行的第二类程序的方法可以参见图2A和图2B所示实施例,这里先不详述。In an embodiment, the method for determining the second type of program that needs to be stopped may refer to the embodiment shown in FIG. 2A and FIG. 2B , which will not be described in detail here.
在一实施例中,可以通过在屏幕关闭时设置一个预设时间阈值长度的定时器,如果定时器超时,则可确定关闭屏幕的时间超过预设时间阈值。In an embodiment, a timer with a preset time threshold length may be set when the screen is turned off, and if the timer expires, it may be determined that the time for turning off the screen exceeds the preset time threshold.
在一实施例中,预设时间阈值可以为一个30秒钟、1分钟等的时间间隔,预设时间阈值可以由系统设定。In an embodiment, the preset time threshold may be a time interval of 30 seconds, 1 minute, etc., and the preset time threshold may be set by the system.
在一实施例中,可以由用户按关机的物理按键触发关闭屏幕;在又一实施例中,还可以在长时间没有接收到用户的操作时自动关闭屏幕。In one embodiment, the screen may be turned off by the user pressing a physical button to turn off the power; in yet another embodiment, the screen may be automatically turned off when no user operation is received for a long time.
在步骤102中,执行停止运行程序的操作。In step 102, an operation of stopping the running program is performed.
本实施例中,通过确定在屏幕关闭超过预设时间阈值时需要停止运行的程序可以减少在屏幕关闭超过预设时间阈值时申请唤醒锁的程序的数量和持有时间,由此可以大大降低屏幕关闭时的设备功耗,延长设备续航时间。In this embodiment, by determining the programs that need to stop running when the screen is turned off for more than the preset time threshold, the number and holding time of the programs that apply for wake locks when the screen is turned off for more than the preset time threshold can be reduced, thereby greatly reducing the screen time. The power consumption of the device when it is turned off prolongs the battery life of the device.
在一实施例中,确定在屏幕关闭超过预设时间阈值时需要停止运行的程序,包括:In an embodiment, determining that the program that needs to stop running when the screen is turned off exceeds a preset time threshold includes:
通过查询程序黑名单,确定需要停止运行的第一类程序,第一类程序为具有申请唤醒锁的第一权限的程序,程序黑名单用于记录第一类程序的标识信息;以及,Determine the first type of program that needs to stop running by querying the program blacklist, the first type of program is a program with the first authority to apply for a wake lock, and the program blacklist is used to record the identification information of the first type of program; and,
确定需要停止运行的第二类程序,第二类程序为具有申请唤醒锁的第二权限的程序。A second type of program that needs to be stopped is determined, and the second type of program is a program with a second permission to apply for a wake lock.
在一实施例中,方法还包括:In one embodiment, the method also includes:
向服务器发送黑名单更新请求消息,请求消息中包括需要停止运行的第二类程序的标识信息;Sending a blacklist update request message to the server, where the request message includes identification information of the second type of program that needs to be stopped;
接收服务器根据接收到的所有设备发送的黑名单更新请求消息确定的程序黑名单;Receiving the program blacklist determined by the server according to the received blacklist update request messages sent by all devices;
基于接收到的程序黑名单更新本地存储的程序黑名单。A locally stored program blacklist is updated based on the received program blacklist.
在一实施例中,方法还包括:In one embodiment, the method also includes:
生成唤醒锁应用提示信息,唤醒锁应用提示信息包括需要停止运行的第二类程序的标识信息;Generate wake lock application prompt information, where the wake lock application prompt information includes identification information of the second type of program that needs to stop running;
接收用户根据唤醒锁应用提示信息输入的反馈信息;Receive feedback information input by the user according to the prompt information of the wake lock application;
根据反馈信息,更新程序黑名单。According to the feedback information, update the program blacklist.
在一实施例中,确定需要停止运行的第二类程序,包括:In one embodiment, determining the second type of program that needs to stop running includes:
获取从屏幕关闭时起的预设时间阈值内第二类程序的唤醒锁申请数量;Obtain the number of wake lock applications of the second type of program within the preset time threshold from when the screen is turned off;
确定申请数量是否大于预设数量;Determine whether the application quantity is greater than the preset quantity;
如果申请数量大于预设数量,则基于每一个程序对应的唤醒锁申请数量,将每一个程序按照申请数量进行从大到小的排序;If the number of applications is greater than the preset number, based on the number of wake lock applications corresponding to each program, each program is sorted from large to small according to the number of applications;
将排名最前的预设个数的程序确定为需要停止运行的第二类程序。The top preset number of programs are determined as the second type of programs that need to be stopped.
在一实施例中,方法还包括:In one embodiment, the method also includes:
确定需要停止运行的第二类程序,包括:Identify the second category of programs that need to be stopped, including:
获取从屏幕关闭时起的预设时间阈值内第二类程序的唤醒锁持有时间;Obtain the wake lock holding time of the second type of program within a preset time threshold from when the screen is turned off;
确定持有时间是否大于预设时间;Determine whether the holding time is greater than a preset time;
如果持有时间大于预设时间,则基于每一个程序对应的唤醒锁持有时间,将每一个程序按照持有时间进行从大到小的排序;If the holding time is greater than the preset time, based on the wake lock holding time corresponding to each program, each program is sorted from large to small according to the holding time;
将排名最前的预设个数的程序确定为需要停止运行的第二类程序。The top preset number of programs are determined as the second type of programs that need to be stopped.
在一实施例中,方法还包括:In one embodiment, the method also includes:
确定预设时间阈值内申请唤醒锁的非内核层的程序的标识信息;Determine the identification information of the non-kernel layer program that applies for the wake lock within the preset time threshold;
通过查询程序白名单和程序黑名单确定申请唤醒锁的非内核层的程序是否为第一类程序或者第三类程序,程序白名单用于记录第三类程序的标识信息,第三类程序为具有申请唤醒锁的第三权限的程序;By querying the program whitelist and program blacklist, it is determined whether the program at the non-kernel layer that applies for the wake lock is the first type of program or the third type of program. The program white list is used to record the identification information of the third type of program, and the third type of program is Programs with the third permission to apply for wake locks;
如果申请唤醒锁的非内核层的程序不是第三类程序和第一类程序,则确定申请唤醒锁的程序为第二类程序,基于第二类程序执行确定需要停止运行的第二类程序的操作。If the non-kernel layer program applying for the wake lock is not the third type program and the first type program, then determine that the program applying for the wake lock is the second type program, and determine the second type program that needs to stop running based on the execution of the second type program operate.
在一实施例中,方法还包括:In one embodiment, the method also includes:
在屏幕关闭时,设置一个预设时间阈值长度的定时器;Set a timer with a preset time threshold length when the screen is turned off;
通过确定定时器是否超时确定关闭屏幕的时间是否超过预设时间阈值。Whether the time for turning off the screen exceeds a preset time threshold is determined by determining whether the timer times out.
具体如何通过预设程序对唤醒锁进行限定申请进而延长移动设备续航时间的,请参考后续实施例。For how to limit the application for the wake lock through the preset program to prolong the battery life of the mobile device, please refer to the subsequent embodiments.
至此,本公开实施例提供的上述方法,可以减少持有唤醒锁的程序的数量和时间,大大降低设备功耗,延长设备续航时间。So far, the above methods provided by the embodiments of the present disclosure can reduce the number and time of programs holding wake locks, greatly reduce the power consumption of the device, and prolong the battery life of the device.
图2A是根据一示例性实施例一示出的确定需要停止运行的第二类程序的方法的流程图一,图2B是根据一示例性实施例二示出的确定需要停止运行的第二类程序的方法的流程图二;本实施例利用本公开实施例提供的上述方法,分别以如何通过唤醒锁申请数量和唤醒锁持有时间来确定需要运行的第二类程序为例进行示例性说明,如图2A所示,为根据唤醒锁申请数量确定需要运行的第二类程序的流程,包括如下步骤:Fig. 2A is a first flow chart of a method for determining a second type of program that needs to be stopped according to an exemplary embodiment 1, and Fig. 2B is a flowchart of a method for determining a second type of program that needs to be stopped according to an exemplary embodiment 2 Flowchart 2 of the program method; this embodiment uses the above-mentioned method provided by the embodiments of the present disclosure to illustrate how to determine the second type of program that needs to be run through the number of wake-up lock applications and the wake-up lock holding time as an example , as shown in FIG. 2A, the process of determining the second type of program to be run according to the number of wake lock applications includes the following steps:
在步骤201中,获取从屏幕关闭时起的预设时间阈值内第二类程序的唤醒锁申请数量。In step 201, the number of wake lock applications of the second type of program within a preset time threshold from when the screen is turned off is acquired.
在一实施例中,可通过电源管理服务模块或者电池电量统计模块执行统计唤醒锁申请信息的操作。In an embodiment, the operation of counting wake lock application information can be performed by the power management service module or the battery power statistics module.
在一实施例中,申请唤醒锁的信息,可包括申请数量、每次持有唤醒锁的时间(可通过唤醒锁申请时间和释放时间得到),例如,在预设时间阈值内第二类程序申请唤醒锁的申请数量为15次。In an embodiment, the information of applying for a wake lock may include the number of applications, the time of holding a wake lock each time (obtainable through the wake lock application time and release time), for example, the second type of program within the preset time threshold The number of applications for wake locks is 15.
在一实施例中,可通过图3实施例确定申请唤醒锁的程序是否为第二类程序,这里先不详述。In an embodiment, it may be determined through the embodiment in FIG. 3 whether the program for applying for a wake lock is a program of the second type, which will not be described in detail here.
在步骤202中,确定申请数量是否大于预设数量,如果申请数量大于预设数量,则执行步骤204,如果申请数量不大于预设数量,则执行步骤203。In step 202, it is determined whether the number of applications is greater than the preset number, if the number of applications is greater than the preset number, then step 204 is performed, and if the number of applications is not greater than the preset number, then step 203 is performed.
在一实施例中,预设数量可以为一个5个、10等的数值,可由系统根据设备在关闭屏幕时的耗电与唤醒锁申请数量的关系设置。In an embodiment, the preset number can be a value of 5, 10, etc., and can be set by the system according to the relationship between the power consumption of the device when the screen is turned off and the number of wake lock applications.
在步骤203中,确定不停止运行第二类程序中的程序,流程结束。In step 203, it is determined not to stop running the programs in the second type of programs, and the process ends.
在步骤204中,基于每一个程序对应的唤醒锁申请数量,将每一个程序按照申请数量进行从大到小的排序。In step 204, based on the number of wake lock applications corresponding to each program, each program is sorted according to the number of applications from large to small.
在一实施例中,可通过电源管理服务模块记录在屏幕关闭时起的预设时间阈值内每一个第二类程序申请唤醒锁的信息,包括申请数量、每次持有唤醒锁的时间(可通过唤醒锁申请时间和释放时间得到),例如,微信应用程序在预设时间阈值内申请唤醒锁3次,微博应用程序在预设时间阈值内申请唤醒锁3次,腾讯应用程序在预设时间阈值内申请唤醒锁5次,天天果园应用程序在预设时间阈值内申请唤醒锁1次,京东商城应用程序在预设时间阈值内申请唤醒锁2次,第二类程序总的唤醒次数为14次。In one embodiment, the power management service module can be used to record the information of each second-type program applying for a wakelock within the preset time threshold from when the screen is turned off, including the number of applications, and the time of holding the wakelock each time (optional) Obtained by the wake lock application time and release time), for example, the WeChat application applies for the wake lock 3 times within the preset time threshold, the Weibo application applies for the wake lock 3 times within the preset time threshold, and the Tencent application applies for the wake lock 3 times within the preset time threshold. Apply for wake locks 5 times within the time threshold, Everyday Orchard applications apply for wake locks once within the preset time threshold, Jingdong Mall applications apply for wake locks 2 times within the preset time threshold, the total number of wake-up times for the second type of program is 14 times.
在一实施例中,按照从大到小进行排序,可以将申请数量最多的排在前面,以上述举例进行示意,排序为:腾讯、微信、微博、京东商城、天天果园。其中如果申请数量相同,则可以结合持有时间进行排序,例如微信和微博都是申请了三次,则可确定微信和微博持有唤醒锁的时间,将持有时间长的应用程序排在前面。In one embodiment, the applications are sorted from largest to smallest, and the one with the largest number of applications can be ranked first. Using the above example to illustrate, the ranking is: Tencent, WeChat, Weibo, Jingdong Mall, and Tiantian Orchard. Among them, if the number of applications is the same, it can be sorted based on the holding time. For example, WeChat and Weibo have applied for three times, then the time when WeChat and Weibo hold the wake lock can be determined, and the applications with a long holding time can be ranked first. Front.
在步骤205中,将排名最前的预设个数的程序确定为需要停止运行的第二类程序。In step 205, the top preset number of programs are determined as the second type of programs that need to be stopped.
在一实施例中,预设个数可以为一个定值,由系统设定,例如为3个;在又一实施例中,预设个数可以由第二类程序的总申请数量和预设数量的差值确定,例如第二类程序的总申请数量为14个,预设数量为6个,则申请数量超出8个,则可停止运行排名靠前的程序,停止运行的程序的申请数量和不能小于8个。In one embodiment, the preset number can be a fixed value, which is set by the system, for example, 3; in another embodiment, the preset number can be determined by the total number of applications and the preset The difference in quantity is determined. For example, the total number of applications for the second type of program is 14, and the preset number is 6. If the number of applications exceeds 8, the program with the highest ranking can be stopped, and the number of applications for the stopped program and cannot be less than 8.
如图2B所示,为根据唤醒锁持有时间来确定需要运行的第二类程序的流程,包括如下步骤:As shown in FIG. 2B, in order to determine the flow of the second type of program that needs to be run according to the wake lock holding time, the following steps are included:
在步骤211中,获取从屏幕关闭时起的预设时间阈值内第二类程序的唤醒锁持有时间。In step 211, the wake lock holding time of the second type of program within a preset time threshold from when the screen is turned off is acquired.
在一实施例中,可通过电源管理服务模块记录在屏幕关闭时起的预设时间阈值内每一个第二类程序申请唤醒锁的信息,包括申请数量、每次持有唤醒锁的时间(可通过唤醒锁申请时间和释放时间得到),例如,在预设时间阈值内第二类程序申请唤醒锁的持有时间为600秒钟。In one embodiment, the power management service module can be used to record the information of each second-type program applying for a wakelock within the preset time threshold from when the screen is turned off, including the number of applications, and the time of holding the wakelock each time (optional) Obtained by the wake lock application time and release time), for example, the holding time of the wake lock applied by the second type of program within the preset time threshold is 600 seconds.
在一实施例中,可通过图3实施例确定申请唤醒锁的程序是否为第二类程序,这里先不详述。In an embodiment, it may be determined through the embodiment in FIG. 3 whether the program for applying for a wake lock is a program of the second type, which will not be described in detail here.
在步骤212中,确定持有时间是否大于预设时间,如果唤醒锁持有时间大于预设时间,则执行步骤214,如果唤醒锁持有时间不大于预设时间,则执行步骤213。In step 212, it is determined whether the holding time of the wake lock is longer than the preset time, if the holding time of the wake lock is longer than the preset time, execute step 214, and if the holding time of the wake lock is not longer than the preset time, execute step 213.
在一实施例中,预设时间可以为一个5分钟、10分钟等的数值。In an embodiment, the preset time may be a value of 5 minutes, 10 minutes, etc.
在步骤213中,确定不停止运行第二类程序中的程序,流程结束。In step 213, it is determined not to stop running the programs in the second type of programs, and the flow ends.
在步骤214中,基于每一个程序对应的唤醒锁持有时间,将每一个程序按照持有时间进行从大到小的排序。In step 214, based on the wake lock holding time corresponding to each program, each program is sorted according to the holding time from large to small.
在一实施例中,可通过电源管理服务模块记录在屏幕关闭时起的预设时间阈值内每一个第二类程序申请唤醒锁的信息,包括申请数量、持有唤醒锁的时间(可通过唤醒锁申请时间和释放时间得到每一次唤醒锁的持有时间),例如,微信应用程序在预设时间阈值内持有唤醒锁120秒钟。In one embodiment, the power management service module can be used to record the information of each second-type program applying for a wake lock within the preset time threshold from when the screen is turned off, including the number of applications and the time of holding the wake lock (can be lock application time and release time to obtain the holding time of each wake lock), for example, the WeChat application holds the wake lock for 120 seconds within the preset time threshold.
在一实施例中,按照从大到小进行排序,可以将持有时间最长的排在前面,如果持有时间相同,则可以结合申请数量进行排序,在持有时间相同时,将申请数量多的排在前面。In one embodiment, sorting from largest to smallest, the longest holding time can be ranked first, if the holding time is the same, it can be sorted based on the number of applications, and when the holding time is the same, the number of applications Most come in front.
在步骤215中,将排名最前的预设个数的程序确定为需要停止运行的第二类程序。In step 215, the top preset number of programs are determined as the second type of programs that need to be stopped.
在一实施例中,预设个数可以为一个定值,由系统设定,例如为3个;在又一实施例中,预设个数可以由第二类程序的唤醒锁持有时间和预设时间的差值确定,例如第二类程序的唤醒锁持有时间为240秒钟,预设时间为120秒,则持有时间超过120秒,则可停止运行排名靠前的程序,停止运行的程序的持有时间不能少于120秒。In one embodiment, the preset number can be a fixed value, set by the system, for example, 3; in another embodiment, the preset number can be determined by the wake lock holding time and The difference of the preset time is determined. For example, the wake lock holding time of the second type of program is 240 seconds, and the preset time is 120 seconds. If the holding time exceeds 120 seconds, the top-ranked program can be stopped and stopped A running program cannot be held for less than 120 seconds.
在一实施例中,还可以综合考虑每个成的申请数量和持有时间进行排序,例如根据程序的申请数量计算一个分数,根据程序持有时间计算一个分数,两个分数权重相加作为这个程序的唤醒锁得分,得分高的排序在前面;在一实施例中,申请数量得分和持有时间得分的权重系数可以由系统自行设定。例如:微信申请数量5次,总持有时间30秒;微博申请数量3次,总持有时间50秒,第二类程序的总申请数量为15次,总持有时间为120秒,则微信申请数量得分5/15*100=33分,微信持有时间得分30/120*100=25分,微博申请数量得分3/15*100=20分,微博持有时间得分50/120*100=41.7分,如果申请数量得分和持有时间得分的权重系数都为0.5,则微信的唤醒锁得分为29分,微博的唤醒锁得分为30.85分,则微博排序在前面。In an embodiment, the number of applications and holding time of each component can also be considered comprehensively for ranking, for example, a score is calculated according to the number of applications for the program, and a score is calculated according to the holding time of the program, and the weights of the two scores are added together as this For the wakelock scores of the programs, the ones with higher scores are sorted first; in one embodiment, the weight coefficients of the application quantity score and the holding time score can be set by the system itself. For example: the number of WeChat applications is 5, and the total holding time is 30 seconds; the number of Weibo applications is 3, and the total holding time is 50 seconds; the total number of applications for the second type of program is 15, and the total holding time is 120 seconds, then The number of WeChat applications scored 5/15*100=33 points, the score of WeChat holding time was 30/120*100=25 points, the number of Weibo applications scored 3/15*100=20 points, and the score of Weibo holding time was 50/120 *100=41.7 points, if the weight coefficients of the application quantity score and the holding time score are both 0.5, the wake-up lock score of WeChat is 29 points, and the wake-up lock score of Weibo is 30.85 points, and Weibo is ranked first.
本实施例中,通过在第二类程序的申请数量超过预设数量时,将第二类程序中每一个程序按照唤醒锁申请数量进行排序,并且停止运行排序最前的预设个数的程序;此外,还可通过在第二类程序的唤醒锁持有时间超过预设时间时,将第二类程序中每一个程序按照唤醒锁持有时间进行排序,并且停止运行排序最前的预设个数的程序,可以缩短唤醒锁持有时间,降低屏幕关闭时的设备功耗,延长设备续航时间。In this embodiment, when the number of applications for the second type of program exceeds the preset number, each program in the second type of program is sorted according to the number of wake lock applications, and the running of the top preset number of programs is stopped; In addition, when the wake lock holding time of the second type of program exceeds the preset time, each program in the second type of program can be sorted according to the wake lock holding time, and stop running the first preset number of sorted programs. The program can shorten the hold time of the wake lock, reduce the power consumption of the device when the screen is turned off, and prolong the battery life of the device.
图3是根据一示例性实施例三示出的确定程序是否为第二类程序的流程图;本实施例利用本公开实施例提供的上述方法,以如何确定程序为第二类程序为例进行示例性说明,如图3所示,包括如下步骤:Fig. 3 is a flow chart of determining whether a program is a program of the second type according to an exemplary embodiment 3; this embodiment uses the above-mentioned method provided by the embodiment of the present disclosure, and takes how to determine a program as a program of the second type as an example Exemplary instructions, as shown in Figure 3, include the following steps:
在步骤301中,确定预设时间阈值内申请唤醒锁的非内核层的程序的标识信息。In step 301, identification information of programs at the non-kernel layer that apply for wake locks within a preset time threshold is determined.
在一实施例中,程序的标识信息可以为程序名称,例如微信、微博等;在又一实施例中,程序的标识信息还可以为其他能够标识程序的信息。In one embodiment, the identification information of the program may be the name of the program, such as WeChat, Weibo, etc.; in another embodiment, the identification information of the program may also be other information capable of identifying the program.
在步骤302中,通过查询程序白名单和程序黑名单确定申请唤醒锁的非内核层的程序是否为第一类程序或者第三类程序,程序白名单用于记录第三类程序的标识信息。In step 302, it is determined whether the program at the non-kernel layer applying for the wake lock is a program of the first type or a program of the third type by querying the program white list and the program black list, and the program white list is used to record the identification information of the third type program.
在一实施例中,在关闭屏幕的时间超过预设时间阈值时,电源管理服务模块根据程序白名单执行确定申请唤醒锁的程序是否为第三类程序的操作,第三类程序为具有申请唤醒锁的第三权限的程序,第三权限是指在任何情况下都可以申请唤醒锁的权限,第三类程序可以为比较重要的程序,例如:手机管家等。In one embodiment, when the time for turning off the screen exceeds the preset time threshold, the power management service module executes the operation of determining whether the program applying for a wake-up lock is the third type of program according to the program whitelist. The program of the third authority of the lock, the third authority refers to the authority that can apply for a wake-up lock under any circumstances, and the third type of program can be a more important program, such as: mobile phone housekeeper, etc.
在一实施例中,在关闭屏幕的时间超过预设时间阈值时,电源管理服务模块根据程序黑名单执行确定申请唤醒锁的程序是否为第一类程序的操作,第一类程序为具有申请唤醒锁的第一权限的程序,第一权限是指在屏幕关闭时的任何情况下都不可以申请唤醒锁的权限,第一类程序可以为恶意程序或者在屏幕关闭时会较为频繁地持有唤醒锁的程序。In one embodiment, when the time for turning off the screen exceeds the preset time threshold, the power management service module executes the operation of determining whether the program applying for a wake lock is the first type of program according to the program blacklist. The program with the first permission of the lock. The first permission refers to the permission that cannot apply for a wake-up lock under any circumstances when the screen is turned off. The first type of program can be a malicious program or hold wake-up lock more frequently when the screen is turned off. lock program.
在一实施例中,第二类程序为非内核层的除第三类程序和第一类程序以外的程序。In one embodiment, the second type of program is a non-kernel layer program other than the third type of program and the first type of program.
在一实施例中,程序黑名单可以通过图4A和图5的方式进行更新,这里先不详述。在一实施例中,程序白名单也可以采用与图4A和图5的方案类似的方案进行更新,这里先不详述。In an embodiment, the program blacklist can be updated in the manner shown in FIG. 4A and FIG. 5 , which will not be described in detail here. In an embodiment, the program whitelist may also be updated using a solution similar to that shown in FIG. 4A and FIG. 5 , which will not be described in detail here.
在步骤303中,如果申请唤醒锁的非内核层的程序不是第三类程序和第一类程序,则确定申请唤醒锁的程序为第二类程序,基于第二类程序执行确定需要停止运行的第二类程序的操作。In step 303, if the program of the non-kernel layer applying for the wake lock is not the third type program and the first type program, then it is determined that the program applying for the wake lock is the second type program, and based on the execution of the second type program, it is determined that the program needs to be stopped. The operation of the second type of program.
本实施例中,通过查询程序白名单和程序黑名单可以确定申请唤醒锁的非内核层的程序是否为第二类程序,由此可以实现确定需要停止运行的第二类程序的操作,进而实现通过对第二类程序进行唤醒锁的申请限制来降低屏幕关闭时的设备功耗。In this embodiment, by querying the program whitelist and the program blacklist, it can be determined whether the non-kernel layer program applying for the wake lock is the second type of program, so that the operation of determining the second type of program that needs to stop running can be realized, and then realized The power consumption of the device when the screen is turned off is reduced by restricting the application of the wake lock for the second type of program.
图4A是根据一示例性实施例四示出的更新程序黑名单的方法的流程图一,图4B是根据一示例性实施例四示出的更新程序黑名单的方法的示意图;本实施例利用本公开实施例提供的上述方法,以如何更新程序白名单为例进行示例性说明,如图4A所示,包括如下步骤:Fig. 4A is a flowchart one of a method for updating a program blacklist according to an exemplary embodiment four, and Fig. 4B is a schematic diagram of a method for updating a program blacklist according to an exemplary embodiment four; this embodiment utilizes The above method provided by the embodiment of the present disclosure is illustrated by taking how to update the program whitelist as an example, as shown in FIG. 4A , including the following steps:
在步骤401中,生成唤醒锁应用提示信息,唤醒锁应用提示信息包括需要停止运行的第二类程序的标识信息。In step 401, wake-up lock application prompt information is generated, and the wake-up lock application prompt information includes identification information of a program of the second type that needs to stop running.
在一实施例中,可将每次屏幕关闭后统计的需要停止运行的第二类程序添加至停止运行程序名单,并在点亮屏幕时生成唤醒锁应用提示信息,唤醒锁应用提示信息中携带有停止运行程序名单的标识信息,还可携带有每个应用程序或者服务程序申请唤醒锁的次数和持有唤醒锁的时间。例如,在通知栏推送通知消息,通知在一天内每个应用程序申请唤醒锁的次数和持有唤醒锁的时间,例如显示图4B所示的通知栏消息,其中显示了每个应用程序或者服务程序申请唤醒锁的次数和持有唤醒锁的时间,并且还可以提供对应程序在关闭屏幕的时间段内的耗电信息。In an embodiment, the second type of programs that need to be stopped after the screen is turned off can be added to the list of stopped programs, and a wake-up lock application prompt message is generated when the screen is turned on, and the wake-up lock application prompt message carries There is the identification information of the list of stopped running programs, and it may also carry the number of times each application or service program applies for a wake lock and the time of holding the wake lock. For example, a notification message is pushed in the notification bar to notify the number of times each application program applies for a wake lock and the time it holds a wake lock in one day, for example, the notification bar message shown in Figure 4B is displayed, which shows that each application program or service The number of times a program applies for a wake lock and the time it holds a wake lock, and it can also provide information about the power consumption of the corresponding program during the time period when the screen is turned off.
在一实施例中,图4B中还可以显示类似“添加至黑名单”的信息,在一实施例中,“添加至黑名单”用于表示不允许程序在关闭屏幕后申请唤醒锁。In an embodiment, information similar to "add to blacklist" may also be displayed in FIG. 4B. In an embodiment, "add to blacklist" is used to indicate that the program is not allowed to apply for a wake lock after the screen is turned off.
在一实施例中,还可统计预设时间段内每次关闭屏幕时确定的需要停止运行的第二类程序的标识信息,并将标识信息添加至停止运行程序名单,然后定期生成唤醒锁应用提示信息,唤醒锁应用提示信息中携带有停止运行程序名单的标识信息。In an embodiment, the identification information of the second type of program that needs to be stopped is determined every time the screen is turned off within a preset period of time, and the identification information is added to the list of programs to stop running, and then the wake-up lock application is generated periodically The prompt information, the wake lock application prompt information carries the identification information of the list of stopped running programs.
在步骤402中,接收用户根据唤醒锁应用提示信息输入的反馈信息。In step 402, the feedback information input by the user according to the prompt information of the wake lock application is received.
在一实施例中,用户可以根据唤醒锁应用提示信息输入反馈信息,例如,在微信程序的唤醒锁信息条目上点击,选择将微信程序设置为拒绝申请唤醒锁的程序或者将其添加至程序黑名单中,根据用户的操作可以输入对应的反馈信息。In an embodiment, the user can input feedback information according to the prompt information of the wake lock application, for example, click on the wake lock information entry of the WeChat program, and choose to set the WeChat program as a program that refuses to apply for a wake lock or add it to the program blacklist. In the list, corresponding feedback information can be input according to the user's operation.
在步骤403中,根据反馈信息,更新程序黑名单。In step 403, the program blacklist is updated according to the feedback information.
在一实施例中,可根据用户输入的反馈信息,例如如果接收到“将微信程序添加至程序黑名单中”的反馈信息,则可将微信程序添加至程序黑名单中,也即允许微信程序在关闭屏幕后申请唤醒锁。In an embodiment, according to the feedback information input by the user, for example, if the feedback information of "add the WeChat program to the program blacklist" is received, the WeChat program can be added to the program blacklist, that is, the WeChat program is allowed to Apply for a wake lock after turning off the screen.
在一实施例中,对于程序白名单,也可定期生成提示信息,提示用户一段时间内每个程序申请唤醒锁的信息,以便根据用户的反馈信息更新程序白名单。In an embodiment, for the program whitelist, prompt information may also be generated periodically to remind the user of the information about each program applying for a wake lock within a period of time, so as to update the program whitelist according to the user's feedback information.
本实施例中,通过将每一个程序申请唤醒锁的次数和持有唤醒锁的时间推送给用户,可以由用户确定程序黑名单中包括哪些程序,提高了用户的体验。In this embodiment, by pushing the number of times each program applies for a wake lock and the time it holds the wake lock to the user, the user can determine which programs are included in the program blacklist, which improves user experience.
图5是根据一示例性实施例五示出的更新程序白名单的方法的流程图二;本实施例利用本公开实施例提供的上述方法,以如何更新程序白名单为例进行示例性说明,如图5所示,包括如下步骤:FIG. 5 is a second flow chart of a method for updating a program whitelist according to an exemplary embodiment five; this embodiment utilizes the above-mentioned method provided by an embodiment of the present disclosure, and uses how to update a program whitelist as an example for an exemplary description. As shown in Figure 5, it includes the following steps:
在步骤501中,向服务器发送黑名单更新请求消息,请求消息中包括需要停止运行的第二类程序的标识信息。In step 501, a blacklist update request message is sent to the server, where the request message includes identification information of the second type of program that needs to be stopped.
在一实施例中,可将每次屏幕关闭后统计的需要停止运行的第二类程序添加至停止运行程序名单,并在点亮屏幕时生成黑名单更新请求消息,黑名单更新请求消息中携带有停止运行程序名单的标识信息,还可携带有每个应用程序或者服务程序申请唤醒锁的次数和持有唤醒锁的时间。In an embodiment, the second type of programs that need to be stopped after the screen is closed can be added to the list of stopped programs, and a blacklist update request message is generated when the screen is turned on, and the blacklist update request message carries There is the identification information of the list of stopped running programs, and it may also carry the number of times each application or service program applies for a wake lock and the time of holding the wake lock.
在一实施例中,还可统计预设时间段内每次关闭屏幕时确定的需要停止运行的第二类程序的标识信息,并将标识信息添加至停止运行程序名单,然后定期生成黑名单更新请求消息,黑名单更新请求消息中携带有停止运行程序名单的标识信息。In an embodiment, the identification information of the second type of program that needs to be stopped is determined every time the screen is turned off within a preset period of time, and the identification information is added to the list of programs that stop running, and then blacklist updates are generated periodically In the request message, the blacklist update request message carries the identification information of the list of programs to stop running.
在步骤502中,接收服务器根据接收到的所有设备发送的黑名单更新请求消息确定的程序黑名单。In step 502, the program blacklist determined by the server is received according to the received blacklist update request messages sent by all devices.
在一实施例中,服务器可根据预设时间段内接收到的黑名单更新请求消息确定最近每个设备在关闭屏幕时需要停止运行的第二类程序,进而确定出完全不适合申请唤醒锁的程序,将其添加至程序黑名单中。In an embodiment, the server can determine the second type of programs that each device needs to stop running when the screen is turned off recently according to the blacklist update request message received within a preset time period, and then determine the programs that are completely unsuitable for applying for wake locks. program, add it to the program blacklist.
在一实施例中,由于每一个移动设备中运行的程序并不完全相同,因此可根据每一个移动设备发送的黑名单更新请求消息确定对应的移动设备中运行的程序,然后向移动设备返回对应的程序黑名单,例如:如果移动设备A发送的黑名单更新请求消息中不包括“斗鱼”直播程序,则可以确定移动设备A中很可能没有安装“斗鱼”直播程序,因此在云端服务器根据所有的移动设备发送的黑名单更新请求消息确定出的程序黑名单中包括“斗鱼”直播程序时,也可以不在返回给移动设备A的程序黑名单中不包括“斗鱼”直播程序;在又一实施例中,即使确定移动设备A中很可能没有安装“斗鱼”直播程序,如果在云端服务器根据所有的移动设备发送的唤醒锁应用指示消息确定出的程序黑名单中包括“斗鱼”直播程序,也可以在返回给移动设备A的程序黑名单中包括“斗鱼”直播程序。In one embodiment, since the programs running in each mobile device are not exactly the same, the corresponding program running in the mobile device can be determined according to the blacklist update request message sent by each mobile device, and then the corresponding program can be returned to the mobile device. For example, if the blacklist update request message sent by mobile device A does not include the "Betta Fish" live program, it can be determined that the "Betta Fish" live program is probably not installed in mobile device A, so the cloud server When the program blacklist determined according to the blacklist update request messages sent by all mobile devices includes the "Betta" live program, the "Betta" live program may not be included in the program blacklist returned to mobile device A; In yet another embodiment, even if it is determined that the live program "Betta" is probably not installed in mobile device A, if the program blacklist determined by the cloud server according to the wake lock application indication messages sent by all mobile devices includes "Betta" "Fish" live program, also can include "Betta Fish" live program in the program blacklist returned to mobile device A.
在步骤503中,基于接收到的程序黑名单更新本地存储的程序黑名单。In step 503, the locally stored program blacklist is updated based on the received program blacklist.
在一实施例中,如果接收到的程序黑名单中包括本移动设备中没有安装的程序时,可将接收到的程序黑名单中对应的程序删除,以此来更新本地存储的程序黑名单。In one embodiment, if the received program blacklist includes programs not installed in the mobile device, the corresponding program in the received program blacklist may be deleted, so as to update the locally stored program blacklist.
本实施例中,通过向服务器推送需要停止运行的第二类程序,可以让服务器结合所有设备需要停止运行的第二类程序确定程序黑名单,结合多个设备的申请唤醒锁的次数和持有唤醒锁的时间所确定的程序黑名单的参考性更强。In this embodiment, by pushing the second type of programs that need to stop running to the server, the server can determine the program blacklist in combination with the second type of programs that need to be stopped running on all devices, and combine the number of wake lock applications and held locks of multiple devices. The program blacklist determined by the wake-up lock time is more informative.
图6是根据一示例性实施例示出的一种设备控制装置的框图,如图6所示,设备控制装置包括:Fig. 6 is a block diagram of an equipment control device according to an exemplary embodiment. As shown in Fig. 6, the device control device includes:
程序确定模块610,被配置为确定在屏幕关闭超过预设时间阈值时需要停止运行的程序;A program determining module 610 configured to determine a program that needs to stop running when the screen is turned off for a time exceeding a preset time threshold;
停止运行模块620,被配置为执行停止运行程序确定模块确定的程序的操作。The stop running module 620 is configured to execute the operation of stopping the program determined by the running program determining module.
图7是根据一示例性实施例示出的另一种设备控制装置的框图,如图7所示,在上述图6所示实施例的基础上,在一实施例中,程序确定模块610包括:Fig. 7 is a block diagram of another device control device according to an exemplary embodiment. As shown in Fig. 7, on the basis of the embodiment shown in Fig. 6 above, in an embodiment, the program determination module 610 includes:
查询子模块611,被配置为通过查询程序黑名单,确定需要停止运行的第一类程序,第一类程序为具有申请唤醒锁的第一权限的程序,程序黑名单用于记录第一类程序的标识信息;以及,The query sub-module 611 is configured to determine the first type of program that needs to stop running by querying the program blacklist. The first type of program is a program with the first authority to apply for a wake lock. The program blacklist is used to record the first type of program identifying information for ; and,
第一确定子模块612,被配置为确定需要停止运行的第二类程序,第二类程序为具有申请唤醒锁的第二权限的程序。The first determining submodule 612 is configured to determine a second type of program that needs to stop running, and the second type of program is a program with the second permission to apply for a wake lock.
在一实施例中,装置还包括:In one embodiment, the device further includes:
发送模块630,被配置为向服务器发送黑名单更新请求消息,请求消息中包括需要停止运行的第二类程序的标识信息;The sending module 630 is configured to send a blacklist update request message to the server, where the request message includes identification information of the second type of program that needs to stop running;
第一接收模块640,被配置为接收服务器根据接收到的所有设备发送的黑名单更新请求消息确定的程序黑名单;The first receiving module 640 is configured to receive the program blacklist determined by the server according to the received blacklist update request message sent by all devices;
第一更新模块650,被配置为基于第一接收模块640接收到的程序黑名单更新本地存储的程序黑名单。The first updating module 650 is configured to update the locally stored program blacklist based on the program blacklist received by the first receiving module 640 .
在一实施例中,装置还包括:In one embodiment, the device further includes:
提示模块660,被配置为生成唤醒锁应用提示信息,唤醒锁应用提示信息包括需要停止运行的第二类程序的标识信息;The prompt module 660 is configured to generate wake lock application prompt information, where the wake lock application prompt information includes identification information of the second type of program that needs to stop running;
第二接收模块670,被配置为接收用户根据提示模块660生成的唤醒锁应用提示信息输入的反馈信息;The second receiving module 670 is configured to receive feedback information input by the user according to the wake lock application prompt information generated by the prompt module 660;
第二更新模块680,被配置为根据第二接收模块670接收到的反馈信息,更新程序黑名单。The second updating module 680 is configured to update the program blacklist according to the feedback information received by the second receiving module 670 .
在一实施例中,第一确定子模块612包括:In one embodiment, the first determining submodule 612 includes:
第一获取子模块6121,被配置为获取从屏幕关闭时起的预设时间阈值内第二类程序的唤醒锁申请数量;The first obtaining sub-module 6121 is configured to obtain the number of wake-up lock applications of the second type of program within the preset time threshold from when the screen is turned off;
第二确定子模块6122,被配置为确定第一获取子模块6121获取的申请数量是否大于预设数量;The second determination submodule 6122 is configured to determine whether the number of applications acquired by the first acquisition submodule 6121 is greater than a preset number;
第一排序子模块6123,被配置为在第二确定子模块6122确定申请数量大于预设数量时,基于每一个程序对应的唤醒锁申请数量,将每一个程序按照申请数量进行从大到小的排序;The first sorting submodule 6123 is configured to, when the second determination submodule 6122 determines that the number of applications is greater than the preset number, based on the number of wakelock applications corresponding to each program, sort each program according to the number of applications from large to small sort;
第三确定子模块6124,被配置为将第一排序子模块6123排序后的排名最前的预设个数的程序确定为需要停止运行的第二类程序,第一确定子模块基于第二类程序执行确定需要停止运行的第二类程序的操作。The third determining submodule 6124 is configured to determine the top preset number of programs sorted by the first sorting submodule 6123 as the second type of programs that need to stop running, and the first determining submodule is based on the second type of programs Perform actions to identify programs of the second type that need to be stopped.
在一实施例中,第一确定子模块612包括:In one embodiment, the first determining submodule 612 includes:
第二获取子模块6125,被配置为获取从屏幕关闭时起的预设时间阈值内第二类程序的唤醒锁持有时间;The second obtaining sub-module 6125 is configured to obtain the wake lock holding time of the second type of program within the preset time threshold from when the screen is turned off;
第四确定子模块6126,被配置为确定第二获取子模块6125获取的持有时间是否大于预设时间;The fourth determining submodule 6126 is configured to determine whether the holding time obtained by the second obtaining submodule 6125 is greater than a preset time;
第二排序子模块6127,被配置为在第四确定子模块6126持有时间大于预设时间时,基于每一个程序对应的唤醒锁持有时间,将每一个程序按照持有时间进行从大到小的排序;The second sorting submodule 6127 is configured to sort each program according to the holding time from largest to small sort;
第五确定子模块6128,被配置为将第二排序子模块6127排序后的排名最前的预设个数的程序确定为需要停止运行的第二类程序。The fifth determining submodule 6128 is configured to determine the top preset number of programs sorted by the second sorting submodule 6127 as the second type of programs that need to stop running.
图8是根据一示例性实施例示出的另一种设备控制装置的框图,如图8所示,在上述图6和/或7所示实施例的基础上,在一实施例中,装置还包括:Fig. 8 is a block diagram of another device control device according to an exemplary embodiment. As shown in Fig. 8, on the basis of the embodiment shown in Figs. include:
程序标识确定模块690,被配置为确定预设时间阈值内申请唤醒锁的非内核层的程序的标识信息;The program identification determination module 690 is configured to determine the identification information of the non-kernel layer program that applies for the wake lock within the preset time threshold;
查询模块700,被配置为通过查询程序白名单和程序黑名单确定申请唤醒锁的非内核层的程序是否为第一类程序或者第三类程序,程序白名单用于记录第三类程序的标识信息,第三类程序为具有申请唤醒锁的第三权限的程序;The query module 700 is configured to determine whether the program at the non-kernel layer that applies for the wake lock is a program of the first category or a program of the third category by querying the program whitelist and the program blacklist, and the program whitelist is used to record the identification of the third category program Information, the third type of program is a program with the third permission to apply for a wake lock;
第一确定模块710,被配置为在查询模块700确定申请唤醒锁的非内核层的程序不是第三类程序和第一类程序时,确定申请唤醒锁的程序为第二类程序。The first determining module 710 is configured to determine that the program applying for the wake lock is the program of the second type when the query module 700 determines that the non-kernel layer program applying for the wake lock is not the program of the third type or the program of the first type.
在一实施例中,装置还包括:In one embodiment, the device further includes:
设置模块720,被配置为在屏幕关闭时,设置一个预设时间阈值长度的定时器;The setting module 720 is configured to set a timer with a preset time threshold length when the screen is turned off;
第二确定模块730,被配置为通过确定设置模块720设置的定时器是否超时确定关闭屏幕的时间是否超过预设时间阈值。The second determination module 730 is configured to determine whether the time for turning off the screen exceeds a preset time threshold by determining whether the timer set by the setting module 720 times out.
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。Regarding the apparatus in the foregoing embodiments, the specific manner in which each module executes operations has been described in detail in the embodiments related to the method, and will not be described in detail here.
图9是根据一示例性实施例示出的一种适用于设备控制装置的框图。例如,装置900可以是智能手机、平板电脑等。Fig. 9 is a block diagram showing a device suitable for controlling equipment according to an exemplary embodiment. For example, device 900 may be a smartphone, tablet, or the like.
参照图9,装置900可以包括以下一个或多个组件:处理组件902,存储器904,电源组件906,多媒体组件908,音频组件910,输入/输出(I/O)的接口912,传感器组件914,以及通信组件916。9, device 900 may include one or more of the following components: processing component 902, memory 904, power supply component 906, multimedia component 908, audio component 910, input/output (I/O) interface 912, sensor component 914, and communication component 916 .
处理组件902通常控制装置900的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理元件902可以包括一个或多个处理器920来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件902可以包括一个或多个模块,便于处理组件902和其他组件之间的交互。例如,处理部件902可以包括多媒体模块,以方便多媒体组件908和处理组件902之间的交互。The processing component 902 generally controls the overall operations of the device 900, such as those associated with display, telephone calls, data communications, camera operations, and recording operations. The processing element 902 may include one or more processors 920 to execute instructions to complete all or part of the steps of the above method. Additionally, processing component 902 may include one or more modules that facilitate interaction between processing component 902 and other components. For example, the processing component 902 may include a multimedia module to facilitate interaction between the multimedia component 908 and the processing component 902 .
存储器904被配置为存储各种类型的数据以支持在设备900的操作。这些数据的示例包括用于在装置900上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器904可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。The memory 904 is configured to store various types of data to support operations at the device 900 . Examples of such data include instructions for any application or method operating on device 900, contact data, phonebook data, messages, pictures, videos, and the like. The memory 904 can be implemented by any type of volatile or non-volatile memory device or their combination, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Magnetic Memory, Flash Memory, Magnetic or Optical Disk.
电力组件906为装置900的各种组件提供电力。电力组件906可以包括电源管理系统,一个或多个电源,及其他与为装置900生成、管理和分配电力相关联的组件。Power component 906 provides power to various components of device 900 . Power components 906 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for device 900 .
多媒体组件908包括在装置900和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件908包括一个前置摄像头和/或后置摄像头。当设备900处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。The multimedia component 908 includes a screen that provides an output interface between the device 900 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may not only sense a boundary of a touch or a swipe action, but also detect duration and pressure associated with the touch or swipe operation. In some embodiments, the multimedia component 908 includes a front camera and/or a rear camera. When the device 900 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have focal length and optical zoom capability.
音频组件910被配置为输出和/或输入音频信号。例如,音频组件910包括一个麦克风(MIC),当装置900处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器904或经由通信组件916发送。在一些实施例中,音频组件910还包括一个扬声器,用于输出音频信号。The audio component 910 is configured to output and/or input audio signals. For example, the audio component 910 includes a microphone (MIC) configured to receive external audio signals when the device 900 is in operation modes, such as call mode, recording mode and voice recognition mode. Received audio signals may be further stored in memory 904 or sent via communication component 916 . In some embodiments, the audio component 910 also includes a speaker for outputting audio signals.
I/O接口912为处理组件902和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。The I/O interface 912 provides an interface between the processing component 902 and a peripheral interface module. The peripheral interface module may be a keyboard, a click wheel, a button, and the like. These buttons may include, but are not limited to: a home button, volume buttons, start button, and lock button.
传感器组件914包括一个或多个传感器,用于为装置900提供各个方面的状态评估。例如,传感器组件914可以检测到设备900的打开/关闭状态,组件的相对定位,例如组件为装置900的显示器和小键盘,传感器组件914还可以检测装置900或装置900一个组件的位置改变,用户与装置900接触的存在或不存在,装置900方位或加速/减速和装置900的温度变化。传感器组件914可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件914还可以包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件914还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。Sensor assembly 914 includes one or more sensors for providing status assessments of various aspects of device 900 . For example, the sensor component 914 can detect the open/closed state of the device 900, the relative positioning of components, such as the display and keypad of the device 900, the sensor component 914 can also detect a change in the position of the device 900 or a component of the device 900, the user Presence or absence of contact with device 900 , device 900 orientation or acceleration/deceleration and temperature change of device 900 . Sensor assembly 914 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact. Sensor assembly 914 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor component 914 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor.
通信组件916被配置为便于装置900和其他设备之间有线或无线方式的通信。装置900可以接入基于通信标准的无线网络,如WiFi,2G或3G,或它们的组合。在一个示例性实施例中,通信部件916经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,通信部件916还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。The communication component 916 is configured to facilitate wired or wireless communication between the apparatus 900 and other devices. The device 900 can access wireless networks based on communication standards, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 916 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, communication component 916 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wide Band (UWB) technology, Bluetooth (BT) technology and other technologies.
在示例性实施例中,装置900可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。In an exemplary embodiment, apparatus 900 may be programmed by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable A gate array (FPGA), controller, microcontroller, microprocessor or other electronic component implementation for performing the methods described above.
在示例性实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器904,上述指令可由装置900的处理器920执行以完成上述方法。例如,非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。In an exemplary embodiment, there is also provided a non-transitory computer-readable storage medium including instructions, such as the memory 904 including instructions, which can be executed by the processor 920 of the device 900 to implement the above method. For example, the non-transitory computer readable storage medium may be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, and the like.
本领域技术人员在考虑说明书及实践这里公开的公开后,将容易想到本公开的其它实施方案。本申请旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由下面的权利要求指出。Other embodiments of the disclosure will be readily apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any modification, use or adaptation of the present disclosure, and these modifications, uses or adaptations follow the general principles of the present disclosure and include common knowledge or conventional technical means in the technical field not disclosed in the present disclosure . The specification and examples are to be considered exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限制。It should be understood that the present disclosure is not limited to the precise constructions which have been described above and shown in the drawings, and various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610875979.6ACN107894902B (en) | 2016-09-30 | 2016-09-30 | Equipment control method and device |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610875979.6ACN107894902B (en) | 2016-09-30 | 2016-09-30 | Equipment control method and device |
| Publication Number | Publication Date |
|---|---|
| CN107894902Atrue CN107894902A (en) | 2018-04-10 |
| CN107894902B CN107894902B (en) | 2021-01-01 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201610875979.6AActiveCN107894902B (en) | 2016-09-30 | 2016-09-30 | Equipment control method and device |
| Country | Link |
|---|---|
| CN (1) | CN107894902B (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112099757A (en)* | 2020-09-21 | 2020-12-18 | 珠海格力电器股份有限公司 | Application keep-alive method and device |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103313427A (en)* | 2013-05-08 | 2013-09-18 | 广东欧珀移动通信有限公司 | Method and device for starting data network of mobile terminal and mobile terminal |
| CN103324519A (en)* | 2013-06-17 | 2013-09-25 | 华为技术有限公司 | Method and device for clearing malicious power consumption applications, and user terminal |
| CN104156053A (en)* | 2014-07-29 | 2014-11-19 | 深圳市中兴移动通信有限公司 | Abnormal power consumption control method, abnormal power consumption control device and mobile terminal |
| CN104221445A (en)* | 2013-11-15 | 2014-12-17 | 华为终端有限公司 | Method and terminal for waking up terminal system |
| CN104298584A (en)* | 2013-07-19 | 2015-01-21 | 贝壳网际(北京)安全技术有限公司 | Method and device for acquiring application program with abnormal power consumption and mobile terminal |
| CN104298335A (en)* | 2013-07-19 | 2015-01-21 | 贝壳网际(北京)安全技术有限公司 | Application program process cleaning method and device of mobile terminal and mobile terminal |
| US20150346799A1 (en)* | 2013-12-28 | 2015-12-03 | Intel Corporation | Techniques for increasing energy efficiency of sensor controllers |
| US20150355953A1 (en)* | 2013-05-22 | 2015-12-10 | International Business Machines Corporation | Low Overhead Contention-Based Switching Between Ticket Lock And Queued Lock |
| CN105183137A (en)* | 2015-09-09 | 2015-12-23 | 厦门美图移动科技有限公司 | Mobile terminal and wake lock control method and system thereof |
| CN105260291A (en)* | 2015-09-29 | 2016-01-20 | 小米科技有限责任公司 | System log capture method and apparatus |
| CN105306743A (en)* | 2015-09-30 | 2016-02-03 | 小米科技有限责任公司 | Screen control method and device |
| WO2016033252A2 (en)* | 2014-08-26 | 2016-03-03 | Cellepathy Ltd. | Transportation-related mobile device context inferences |
| CN105807894A (en)* | 2016-03-22 | 2016-07-27 | 北京小米移动软件有限公司 | Processing method and device of lock holding of application |
| CN105867578A (en)* | 2015-12-07 | 2016-08-17 | 乐视移动智能信息技术(北京)有限公司 | Monitoring method and apparatus of power-consuming application, and user terminal |
| CN105867581A (en)* | 2015-12-16 | 2016-08-17 | 乐视移动智能信息技术(北京)有限公司 | Power optimization method and device and mobile terminal |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103313427A (en)* | 2013-05-08 | 2013-09-18 | 广东欧珀移动通信有限公司 | Method and device for starting data network of mobile terminal and mobile terminal |
| US20150355953A1 (en)* | 2013-05-22 | 2015-12-10 | International Business Machines Corporation | Low Overhead Contention-Based Switching Between Ticket Lock And Queued Lock |
| CN103324519A (en)* | 2013-06-17 | 2013-09-25 | 华为技术有限公司 | Method and device for clearing malicious power consumption applications, and user terminal |
| CN104298584A (en)* | 2013-07-19 | 2015-01-21 | 贝壳网际(北京)安全技术有限公司 | Method and device for acquiring application program with abnormal power consumption and mobile terminal |
| CN104298335A (en)* | 2013-07-19 | 2015-01-21 | 贝壳网际(北京)安全技术有限公司 | Application program process cleaning method and device of mobile terminal and mobile terminal |
| CN104221445A (en)* | 2013-11-15 | 2014-12-17 | 华为终端有限公司 | Method and terminal for waking up terminal system |
| US20150346799A1 (en)* | 2013-12-28 | 2015-12-03 | Intel Corporation | Techniques for increasing energy efficiency of sensor controllers |
| CN104156053A (en)* | 2014-07-29 | 2014-11-19 | 深圳市中兴移动通信有限公司 | Abnormal power consumption control method, abnormal power consumption control device and mobile terminal |
| WO2016033252A2 (en)* | 2014-08-26 | 2016-03-03 | Cellepathy Ltd. | Transportation-related mobile device context inferences |
| CN105183137A (en)* | 2015-09-09 | 2015-12-23 | 厦门美图移动科技有限公司 | Mobile terminal and wake lock control method and system thereof |
| CN105260291A (en)* | 2015-09-29 | 2016-01-20 | 小米科技有限责任公司 | System log capture method and apparatus |
| CN105306743A (en)* | 2015-09-30 | 2016-02-03 | 小米科技有限责任公司 | Screen control method and device |
| CN105867578A (en)* | 2015-12-07 | 2016-08-17 | 乐视移动智能信息技术(北京)有限公司 | Monitoring method and apparatus of power-consuming application, and user terminal |
| CN105867581A (en)* | 2015-12-16 | 2016-08-17 | 乐视移动智能信息技术(北京)有限公司 | Power optimization method and device and mobile terminal |
| CN105807894A (en)* | 2016-03-22 | 2016-07-27 | 北京小米移动软件有限公司 | Processing method and device of lock holding of application |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112099757A (en)* | 2020-09-21 | 2020-12-18 | 珠海格力电器股份有限公司 | Application keep-alive method and device |
| Publication number | Publication date |
|---|---|
| CN107894902B (en) | 2021-01-01 |
| Publication | Publication Date | Title |
|---|---|---|
| WO2017113660A1 (en) | Application program management method and device | |
| RU2663212C2 (en) | Method and device for starting energy-saving mode | |
| WO2016029642A1 (en) | Background application program control method, device and terminal device | |
| CN107885307B (en) | Device control method and device | |
| WO2016188060A1 (en) | Method and apparatus for processing application program package | |
| WO2016029648A1 (en) | File backup method and device | |
| WO2017071066A1 (en) | Information processing method and device | |
| CN105979088B (en) | Message pushing method and device | |
| CN105898032B (en) | Prompt sound adjustment method and device | |
| CN105847520A (en) | Recording realization method and device in conversation process | |
| CN106537344A (en) | Method and device for application call management | |
| CN107094094B (en) | Application networking method and device and terminal | |
| CN105807894B (en) | Using the treating method and apparatus for holding lock | |
| CN108804244A (en) | Data transmission method for uplink, device and storage medium | |
| CN105955441A (en) | Method and device for application management | |
| CN106648730A (en) | Processing method and device of abnormal application | |
| CN107368175B (en) | Processing method and device for reducing terminal power consumption and terminal | |
| CN106412884A (en) | WIFI connection management method and apparatus thereof | |
| CN107436782A (en) | Application program silence installation method and device | |
| CN105868624A (en) | Application program authority management method and device | |
| CN106385470A (en) | Information push method and device | |
| CN107885308A (en) | Electricity saving method and device | |
| CN105677428A (en) | Upgrading method and device for terminal and terminal | |
| WO2016197549A1 (en) | Searching method and apparatus | |
| CN106201738B (en) | System broadcast calling method and device |
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |