# US 2018/0321733 A1 · Terminal-Based Wakelock Control Method and Apparatus and Terminal

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2018/0321733 A1
- Document ID: US20180321733A1
- Status: Published application
- Kind: A1
- Application number: 15/772,349
- Filed: 2015-10-29
- Published: 2018-11-08
- Earliest claimed: 2015-10-29
- Assignees: Huawei Technologies Co., Ltd.
- Applicants: Huawei Technologies Co., Ltd.
- Inventors: Qinghua Yang
- Web page: https://patentgrep.com/patent/US20180321733A1

## CPC

- G06F 1/3234: Power saving characterised by the action undertaken
- G06F 1/3203: Power management, i.e. event-based initiation of a power-saving mode
- G06F 1/3206: Monitoring of events, devices or parameters that trigger a change in power modality
- G06F 1/3228: Monitoring task completion, e.g. by use of idle timers, stop commands or wait commands
- G06F 1/3265: {Power saving in display device}
- G06F 9/4418: {Suspend and resume; Hibernate and awake}
- G06F 9/485: {Task life-cycle, e.g. stopping, restarting, resuming execution (G06F9/4881 takes precedence)}
- G06F 21/629: {to features or functions of an application}
- H04W 52/0264: {by selectively disabling software applications}
- H04W 52/0251: {using monitoring of local events, e.g. events related to user activity}
- Y02D 10/00: Energy efficient computing, e.g. low power processors, power management or thermal management
- Y02D 30/70: in wireless communication networks
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- H04W: WIRELESS COMMUNICATION NETWORKS (broadcast communication H04H; communication systems using wireless links for non-selective communication, e.g. wireless extensions H04M1/72)
- Y02D: CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE

## Abstract

A terminal-based wakelock control method and apparatus, and a terminal, where the method includes obtaining a first application program that runs in the background, determining whether the first application program meets a preset filter criterion, selecting a first application program that does not meet the preset filter criterion to obtain a second application program, and forcibly releasing a wakelock held by the second application program and a service called by the second application program.

## Claims

### Claim 1

A terminal-based wakelock control method, comprising:
obtaining a first application program that runs in a background;
determining whether the first application program meets a preset filter criterion;
selecting the first application program that does not meet the preset filter criterion to obtain a second application program; and
forcibly releasing a wakelock held by the second application program and a service called by the second application program.

### Claim 2 (depends on 1)

The method of claim 1, wherein the preset filter criterion comprises preset duration, a preset application scenario list and a blacklist, and determining whether the first application program meets the present filter criterion comprising:
collecting statistics on background running duration of the first application program;
determining whether the background running duration of the first application program exceeds the preset duration;
determining an application scenario of the first application program according to an interface called by the first application program;
comparing the application scenario of the first application program with the preset application scenario list;
comparing the first application program with die blacklist; and
determining that the first application program whose the background running duration exceeds the preset duration and whose the application scenario is neither saved in the preset application scenario list nor the blacklist does not meet the preset filter criterion.

### Claim 3 (depends on 2)

The method of claim 2, further comprising determining that the first application program whose the background running duration is less than the preset duration and whose the application scenario is saved in the preset application scenario list meets the preset filter criterion.

### Claim 4 (depends on 1)

The method of claim 1, wherein before forcibly releasing the wakelock held by the second application program and the service called by the second application program, the method further comprises saving characteristic information of the wakelock held by the second application program and the service called by the second application program, the characteristic information comprising an identifier corresponding to the second application program, and after forcibly releasing the wakelock held by the second application program and the service called by the second application program, the method further comprising setting the second application program to an agent lock state.

### Claim 5 (depends on 4)

The method of claim 4, further comprising:
recording a wakelock application request in the characteristic information comprising the identifier of the second application program, and skip executing the wakelock application request when the wakelock application request carrying the identifier of the second application program is received;
recording a wakelock change request in the characteristic information comprising the identifier of the second application program, and skip executing the wakelock change request when the wakelock change request carrying the identifier of the second application program is received; and
deleting the characteristic information comprising the identifier of the second application program, and skip executing a wakelock deletion request when the wakelock deletion request carrying the identifier of the second application program is received.

### Claim 6 (depends on 4)

The method of claim 4, further comprising:
determining whether the second application program meets a forcible restoration criterion;
forcibly restoring, according to the characteristic information comprising the identifier of the second application program, the wakelock held by the second application program and the service called by the second application program when the second application program meets the forcible restoration criterion; and
cancelling the agent lock state of the second application program.

### Claim 7 (depends on 6)

The method of claim 6, wherein the forcible restoration criterion comprises foreground running, and determining whether the second application program meets the forcible restoration criterion comprising:
monitoring whether the second application program is switched to the foreground running; and
determining that the second application program meets the forcible restoration criterion when it is detected that the second application program is switched to the foreground running.

### Claim 8 (depends on 7)

The method of claim 7, further comprising determining that the second application program does not meet the forcible restoration criterion when it is detected that the second application program is not switched to the foreground running.

### Claim at position 9

-16. (canceled)

### Claim 17

A terminal, comprising:
a first processor configured to a first application program that runs a background; and
a second processor coupled to the first processor and configured to:
determine whether the first application program meets a preset filter criterion;
select the first application program that does not meet the preset filter criterion to obtain a second application program; and
forcibly release a wakelock held by the second application program and a service called by the second application program.

### Claim 18 (depends on 17)

The terminal of claim 17, wherein the preset filter criterion comprises preset duration, a preset application scenario list and a blacklist, and when determining whether the first application program meets the preset filter criterion, the second processor being further configured to:
collect statistics on background running duration of the first application program;
determine whether the background running duration of the first application program exceeds the preset duration:
determine an application scenario of the first application program according to an interface called by the first application program;
compare the application scenario of the first application program with the preset application scenario list;
compare the first application program with the blacklist; and
determine that the first application program whose the background running duration exceeds the preset duration and whose the application scenario is neither saved in the preset application scenario list nor the blacklist does not meet the preset filter criterion.

### Claim 19 (depends on 18)

The terminal of claim 18, wherein the second processor is further configured to determine that the first application program whose the background running duration is less than the preset duration and whose the application scenario is saved in the preset application scenario list meets the preset filter criterion.

### Claim 20 (depends on 17)

The terminal of claim 17, wherein the second processor is further configured to:
save characteristic information of the wakelock held by the second application program and the service called by the second application program before the wakelock held by the second application program and the service called by the second application program is forcibly released, the characteristic information comprising an identifier corresponding to the second application program; and
set the second application program to an agent lock state after the wakelock held by the second application program and the service called by the second application program is forcibly released.

### Claim 21 (depends on 20)

The terminal of claim 20, wherein the second processor is further configured to:
record a wakelock application request in the characteristic information comprising the identifier of the second application program, and skip executing the wakelock application request when the wakelock application request carrying the identifier of the second application program is received;
record a wakelock change request in the characteristic information comprising the identifier of the second application program, and skip executing the wakelock change request when the wakelock change request carrying the identifier of the second application program is received; and
delete the characteristic information comprising the identifier of the second application program, and skip executing a wakelock deletion request when the wakelock deletion request carrying the identifier of the second application program is received.

### Claim 22 (depends on 20)

The terminal of claim 20, wherein the second processor is further configured to:
determine whether the second application program meets a forcible restoration criterion;
forcibly restore, according to the characteristic information comprising the identifier of the second application program, the wakelock held by the second application program and the service called by the second application program when the second application program meets the forcible restoration criterion; and
cancel the agent lock state of the second application program.

### Claim 23 (depends on 22)

The terminal of claim 22, wherein the forcible restoration criterion comprises foreground running or being called, and when determining whether the second application program meets the forcible restoration criterion, the second processor being further configured to:
monitor whether the second application program is switched to the foreground running or whether the second application program is called; and
determine that the second application program meets the forcible restoration criterion when it is detected that the second application program is switched to the foreground running or that the second application program is called.

### Claim 24 (depends on 23)

The terminal of claim 23, wherein the second processor is further configured to determine that the second application program does not meet the forcible restoration criterion when it is detected that the second application program is not switched to the foreground running and that the second application program is not called.

### Claim 25 (depends on 2)

The method of claim 2, further comprising determining that the first application program whose the background running duration is less than the preset duration and whose the application scenario is saved in the blacklist meets the preset filter criterion.

### Claim 26 (depends on 6)

The method of claim 6, wherein the forcible restoration criterion comprises being called, and determining whether the second application program meets the forcible restoration criterion comprising:
monitoring whether the second application program is called; and
determining that the second application program meets the forcible restoration criterion when it is detected that the second application program is called.

### Claim 27 (depends on 7)

The method of claim 7, further comprising determining that the second application program does not meet the forcible restoration criterion when it is detected that the second application program is not called.

### Claim 28 (depends on 18)

The terminal of claim 18, wherein the second processor is further configured to determine that the first application program whose the background running duration is less than the preset duration and whose the application scenario is saved in the blacklist meets the preset filter criterion.
