CN105807894B - Using the treating method and apparatus for holding lock - Google Patents

Using the treating method and apparatus for holding lock Download PDF

Info

Publication number
CN105807894B
CN105807894B CN201610166140.5A CN201610166140A CN105807894B CN 105807894 B CN105807894 B CN 105807894B CN 201610166140 A CN201610166140 A CN 201610166140A CN 105807894 B CN105807894 B CN 105807894B
Authority
CN
China
Prior art keywords
application
wakelock
detected
lock
prompting message
Prior art date
Application number
CN201610166140.5A
Other languages
Chinese (zh)
Other versions
CN105807894A (en
Inventor
王智勇
邱峰
张家贞
Original Assignee
北京小米移动软件有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京小米移动软件有限公司 filed Critical 北京小米移动软件有限公司
Priority to CN201610166140.5A priority Critical patent/CN105807894B/en
Publication of CN105807894A publication Critical patent/CN105807894A/en
Application granted granted Critical
Publication of CN105807894B publication Critical patent/CN105807894B/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 – G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • G06F1/3287Power saving characterised by the action undertaken by switching off individual functional units in the computer system
    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 – G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • G06F1/329Power saving characterised by the action undertaken by task scheduling

Abstract

The disclosure is directed to the treating method and apparatus that lock is held in a kind of application.The method may include: it obtains application to be detected and persistently holds the time that WAKELOCK is locked in wake-up;When the time for persistently holding the WAKELOCK reaching preset threshold, prompting message is exported, the prompting message includes visual cues message, voice prompting message.Disclosure smart machine can export prompting message when the time that WAKELOCK is persistently held in application to be detected reaching preset threshold, so that user understands the Expenditure Levels of equipment power dissipation, reduce user to the misunderstanding of amount of equipment power consumption.

Description

Using the treating method and apparatus for holding lock

Technical field

This disclosure relates to which the treating method and apparatus of lock is held in field of terminal technology more particularly to a kind of application.

Background technique

With the fast development of Internet technology, more and more smart machines have entered into people's lives, such as: intelligence Mobile phone, tablet computer etc., user can install various applications (Application, APP) in smart machine, with reality Existing different function.

In the related technology, system can provide to application and call the permission for waking up lock WAKELOCK, and application can pass through calling WAKELOCK keeps the wake-up of system, such as: keep the operating of CPU, the display for keeping screen etc..It is being called however, applying After WAKELOCK, system cannot propagate into dormant state, cause system power dissipation excessive, power consumption is significantly increased.

Summary of the invention

To overcome the problems in correlation technique, the disclosure provides the treating method and apparatus that lock is held in a kind of application.

According to the first aspect of the embodiments of the present disclosure, the processing method that lock is held in a kind of application is provided, comprising:

It obtains application to be detected and persistently holds the time for waking up lock WAKELOCK;

When the time for persistently holding the WAKELOCK reaching preset threshold, prompting message, the prompting message are exported Including visual cues message, voice prompting message.

Optionally, the time for obtaining application to be detected and persistently holding WAKELOCK, comprising:

Setting timer corresponding with the application to be detected;

When the WAKELOCK is called in the application to be detected, starts the timer and start timing;

The time that the WAKELOCK is persistently held in the application to be detected is obtained by the timer.

Optionally, further includes:

In the preset time period before obtaining the time that the WAKELOCK is persistently held in the application to be detected, obtain The local CPU frequency of use for having installed application;

According to the CPU frequency of use, the application to be detected is determined.

Optionally, further includes:

After exporting the prompting message, user's releasing order for prompting message input is received;

The application to be detected is discharged to the calling of the WAKELOCK according to described release order.

According to the second aspect of an embodiment of the present disclosure, the processing unit that lock is held in a kind of application is provided, comprising:

Time-obtaining module is configured as obtaining the time that wake-up lock WAKELOCK is persistently held in application to be detected;

Message output module is configured as persistently holding the WAKELOCK's what the time-obtaining module was got When time reaches preset threshold, prompting message is exported, the prompting message includes visual cues message, voice prompting message.

Optionally, the time-obtaining module, comprising:

Submodule is set, setting timer corresponding with the application to be detected is configured as;

Timing submodule is configured as starting setting when the WAKELOCK is called in the application to be detected The timer of module setting starts timing;

Acquisition submodule is configured as obtaining described to be detected answer by the timer that the setting submodule is arranged With the time for persistently holding the WAKELOCK.

Optionally, further includes:

Frequency acquisition module is configured as persistently holding in the time-obtaining module acquisition application to be detected described In preset time period before the time of WAKELOCK, the local CPU frequency of use for having installed application is obtained;

Using determining module, be configured as the CPU frequency of use obtained according to the frequency acquisition module, determine it is described to Detection application.

Optionally, further includes:

Command reception module is configured as after the message output module exports the prompting message, receives user For releasing order for prompting message input;

Call release module, be configured as according to described instruction receiving module it is received release order discharge it is described to be detected Application to the calling of the WAKELOCK.

According to the third aspect of an embodiment of the present disclosure, the processing unit that lock is held in a kind of application is provided, comprising:

Processor;

Memory for storage processor executable instruction;

Wherein, the processor is configured to:

It obtains application to be detected and persistently holds the time for waking up lock WAKELOCK;

When the time for persistently holding the WAKELOCK reaching preset threshold, prompting message, the prompting message are exported Including visual cues message, voice prompting message.

The technical scheme provided by this disclosed embodiment can include the following benefits:

Disclosure smart machine can be defeated when the time that WAKELOCK is persistently held in application to be detected reaching preset threshold Prompting message out reduces user to the misunderstanding of amount of equipment power consumption so that user understands the Expenditure Levels of equipment power dissipation.

Timer corresponding with application to be detected can be set in disclosure smart machine, and calls in the application to be detected Start timer when WAKELOCK and start timing, to obtain the time that the WAKELOCK is persistently held in the application to be detected And carry out subsequent prompting.

Disclosure smart machine can determine application to be detected according to the CPU frequency of use of each application, be directed to realize Using the selectivity management for holding lock, the operation expense of equipment is saved, while meeting the individual demand of user.

Disclosure smart machine can receive user for prompting message input release order after, discharge it is to be detected Using the calling to WAKELOCK, and the application to be detected is avoided to call the long-time of WAKELOCK, reduces system power dissipation, Reduce power consumption.

It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not The disclosure can be limited.

Detailed description of the invention

The drawings herein are incorporated into the specification and forms part of this specification, and shows the implementation for meeting the disclosure Example, and together with specification for explaining the principles of this disclosure.

Fig. 1 is the process flow diagram that lock is held in a kind of application shown according to an exemplary embodiment.

Fig. 2 is a kind of process of the release application program shown according to an exemplary embodiment to the calling of WAKELOCK Figure.

Fig. 3 is a kind of time for obtaining application to be detected and persistently holding WAKELOCK shown according to an exemplary embodiment Flow chart.

Fig. 4 is a kind of flow chart for determining application to be detected shown according to an exemplary embodiment.

Fig. 5 is the block diagram for the processing unit that lock is held in a kind of application shown according to an exemplary embodiment.

Fig. 6 is the block diagram for the processing unit that lock is held in another application shown according to an exemplary embodiment.

Fig. 7 is the block diagram for the processing unit that lock is held in another application shown according to an exemplary embodiment.

Fig. 8 is the block diagram for the processing unit that lock is held in another application shown according to an exemplary embodiment.

Fig. 9 is an a kind of structural representation of processing unit that lock is held for application shown according to an exemplary embodiment Figure.

Specific embodiment

Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment Described in embodiment do not represent all implementations consistent with this disclosure.On the contrary, they be only with it is such as appended The example of the consistent device and method of some aspects be described in detail in claims, the disclosure.

Fig. 1 is the flow chart for the processing method that lock is held in a kind of application shown according to an exemplary embodiment.

Referring to FIG. 1, the processing method that lock is held in the application can be used in smart machine, the smart machine be can wrap Include smart phone, tablet computer, PDA (Personal Digital Assistant, palm PC), PC machine, wearable device Etc. equipment.The processing method that lock is held in the application may comprise steps of:

In step s101, it obtains application to be detected and persistently holds the time for waking up lock WAKELOCK.

In the present embodiment, the application is the application program installed in smart machine, including equipment has been pacified when leaving the factory The application program of dress also includes the application program of user's subsequent download installation.

In step s 102, when the time for persistently holding the WAKELOCK reaching preset threshold, prompting message is exported, The prompting message includes visual cues message, voice prompting message.

In the present embodiment, the technical solution recorded in above-mentioned steps S101 and step S102 can be understood as smart machine The processing logic that operating system executes, such as: the processing logic that power management services execute in smart machine operating system.

Disclosure smart machine can be when WAKELOCK be persistently held in application to be detected it can be seen from above description Between when reaching preset threshold, export prompting message, so that user understands the Expenditure Levels of equipment power dissipation, reduce user and equipment is consumed The misunderstanding of electricity.

Optionally, in one example of the disclosure, reach default when the time that WAKELOCK is persistently held in application to be detected When threshold value, the prompting message that visual cues message, voice prompting message or vision are combined with voice can be exported.Wherein, The visual cues message may include: the mark of the application to be detected, the application to be detected persistently hold it is described The time etc. of WAKELOCK.The voice prompting message can be the message alert tone of user setting, certainly, the voice prompting Message may be the voice broadcast of the visual cues message, and the disclosure is not particularly limited this.

Optionally, in another example of the disclosure, referring to FIG. 2, smart machine is after exporting above-mentioned prompting message, Following operation can also be performed:

In step s 201, after exporting prompting message, the release for receiving user for prompting message input refers to It enables.

It in the present embodiment, can also include the Treatment Options selected for user in the prompting message of smart machine output, Such as: terminate to call or ignore.

As an example it is assumed that the time that application " * * map " to be detected persistently holds WAKELOCK reaches preset threshold 5 and divides Clock can then export prompting message to user, such as: " * * map calls WAKELOCK to be up to 5 minutes, and system can not stop for output It sleeps, release WAKELOCK " please be choose whether, and provide the option of " release " and " ignoring ", after user selects " release " option, Step S202 can be executed.

In step S202, the application to be detected is discharged to the tune of the WAKELOCK according to described release order With.

Based on abovementioned steps S201, after exporting the prompting message, if receiving user for the prompting message Releasing order for input, then can discharge the application to be detected to the calling of the WAKELOCK.Wherein, user's input is released The mode for putting instruction may include: touch input, voice input etc., and the disclosure is not particularly limited this.

In the present embodiment, it when receiving releasing order for prompting message input, can discharge described to be checked Application is surveyed to the calling of WAKELOCK, such as:.

Still by taking the citing in abovementioned steps S201 as an example, if user selects the option of " release ", with can discharging * * Figure to the calling of WAKELOCK, such as: terminate the process of * * map, to prevent * * map to the calling again of WAKELOCK.Such as Fruit user selects the selection of " ignoring ", then, can the afterflow after without interfering calling of the * * map to WAKELOCK Journey.

Disclosure smart machine can receive user's releasing for prompting message input it can be seen from above description After putting instruction, application to be detected is discharged to the calling of WAKELOCK, to avoid the application to be detected to the length of WAKELOCK Time calls, and reduces system power dissipation, reduces power consumption.

Optionally, in another example of the disclosure, persistently hold referring to FIG. 3, smart machine obtains application to be detected The time of WAKELOCK may comprise steps of:

In step S301, timer corresponding with application to be detected is set.

In the present embodiment, it for application to be detected each of is loaded in smart machine, can be set for the application to be detected Set corresponding timer, such as: open a thread, and be the corresponding trigger condition of the timer setting, such as: it is described to WAKELOCK etc. is called in detection application.

In step s 302, when WAKELOCK is called in the application to be detected, starting timer starts timing.

In the present embodiment, when WAKELOCK is called in the application to be detected, the timer for its setting can be triggered, it is fixed When device start the process of timing.

In step S303, the time that the WAKELOCK is persistently held in application to be detected is obtained by the timer.

In the present embodiment, smart machine can be obtained according to the preset time cycle by the timer described to be checked Survey application be persistently have the time of the WAKELOCK, such as: smart machine can be needed with the poll of per half a minute or 1 minute The timer of application is detected, to obtain the time that the WAKELOCK is persistently held in each application to be detected.

Timer corresponding with application to be detected can be set in disclosure smart machine it can be seen from above description, and When WAKELOCK is called in the application to be detected, starting timer starts timing, persistently holds to obtain the application to be detected There is the time of the WAKELOCK and carries out subsequent prompting.

Optionally, in another example of the disclosure, WAKELOCK is generally included there are many type, such as:

PARTIAL_WAKE_LOCK can keep CPU to operate, and screen is allowed to close;

SCREEN_DIM_WAKE_LOCK can keep CPU to operate, and allow that screen is kept to show, keyboard light is allowed to close;

SCREEN_BRIGHT_WAKE_LOCK can keep CPU to operate, and screen highlight is kept to show, keyboard light is allowed to close It closes;

FULL_WAKE_LOCK can keep CPU to operate, and screen highlight is kept to show, keyboard light is kept to open.

In the present embodiment, when the time that WAKELOCK is persistently held in application to be detected reaching preset threshold, Ke Yi When the type of the WAKELOCK is preset type, prompting message is exported to user.Wherein, the preset type can be by Developer is configured, optionally, for both classes of FULL_WAKE_LOCK and SCREEN_BRIGHT_WAKE_LOCK The WAKELOCK of type can keep screen highlight to show, user can be easy to perceive equipment current due to applying when calling Power consumption it is higher, therefore, prompting message can not be exported to user.Optionally, for PARTIAL_WAKE_LOCK and The WAKELOCK of SCREEN_DIM_WAKE_LOCK both types, due to apply call when, allow the screen of equipment to close, And cease screen in the state of, user is difficult the current power consumption of recognition device, therefore, can application to be detected persistently hold this two When the time of seed type WAKELOCK reaches preset threshold, prompting message is exported to user.It can thus be seen that the disclosure to When the time that WAKELOCK is persistently held in detection application reaches preset threshold, and the type of the WAKELOCK is preset kind When, prompting message is exported, to realize the fine-grained management discharged to WAKELOCK.

Optionally, in another example of the disclosure, before executing the application that the disclosure provides and holding the process flow of lock, User can with self-setting application to be detected, such as: user can set application to be detected for the lower application of frequency of use, To terminate associated process in time when application power consumption to be detected is more.Optionally, smart machine can make according to user Application to be detected is automatically determined with situation, referring to FIG. 4, determining that the process of application to be detected may comprise steps of:

In step S401, the local CPU frequency of use for having installed application is obtained.

In the present embodiment, smart machine can be before executing the application that the disclosure provides and holding the process flow of lock, i.e., Before obtaining the time that application to be detected persistently holds WAKELOCK, the CPU frequency of use of local mounted application is obtained. Such as: smart machine can obtain local mounted respectively answers in the preset time after first powering on or after system initialization With CPU frequency of use during this period of time.In general, the CPU frequency of use of the higher application of user's frequency of use is higher, The CPU frequency of use of the lower application of user's frequency of use is lower.

In step S402, according to the CPU frequency of use, application to be detected is determined.

It, can be according to CPU frequency of use after getting the CPU frequency of use of each application based on abovementioned steps S401 Sequence from low to high to application arrange, then by be arranged in top N application be determined as application to be detected, so as to Family usually carries out the control of power consumption using less application.Wherein, N is the natural number more than or equal to 1, can be by developer It is configured, the disclosure is not particularly limited this.

Disclosure smart machine can determine to be checked according to the CPU frequency of use of each application it can be seen from above description Application is surveyed, to realize the selectivity management for holding lock for application, saves the operation expense of equipment, while meeting the individual character of user Change demand.

Hold that the processing method embodiment of lock is corresponding with aforementioned applications, the disclosure is additionally provided using the processing unit for holding lock Embodiment.

Fig. 5 is the block diagram for the processing unit that lock is held in a kind of application shown according to an exemplary embodiment.

Referring to FIG. 5, the processing unit 500 that lock is held in the application can be used in smart machine, include: the time obtains Module 501 and message output module 502.

Wherein, the time-obtaining module 501 is configured as obtaining application to be detected and persistently holds wake-up lock WAKELOCK Time;

The message output module 502 is configured as described in persistently holding of getting of the time-obtaining module 501 When the time of WAKELOCK reaches preset threshold, prompting message is exported, the prompting message includes that visual cues message, voice mention Show message.

In above-described embodiment, smart machine can reach default threshold in the time that WAKELOCK is persistently held in application to be detected When value, prompting message is exported, so that user understands the Expenditure Levels of equipment power dissipation, reduces user to the misunderstanding of amount of equipment power consumption.

Fig. 6 is the block diagram for the processing unit that lock is held in another application shown according to an exemplary embodiment.

Referring to FIG. 6, the embodiment, on the basis of aforementioned embodiment shown in fig. 5, the time-obtaining module 501 can To include: setting submodule 5011, timing submodule 5012 and acquisition submodule 5013.

Wherein, the setting submodule 5011 is configured as setting timer corresponding with the application to be detected;

The timing submodule 5012 is configured as starting institute when the WAKELOCK is called in the application to be detected It states the timer that setting submodule 5011 is arranged and starts timing;

The acquisition submodule 5013 is configured as obtaining by the timer that the setting submodule 5011 is arranged The time of the WAKELOCK is persistently held in the application to be detected.

In above-described embodiment, timer corresponding with application to be detected is can be set in smart machine, and described to be detected Using calling starting timer when WAKELOCK to start timing, thus obtain the application to be detected persistently hold it is described The time of WAKELOCK simultaneously carries out subsequent prompting.

Fig. 7 is the block diagram for the processing unit that lock is held in another application shown according to an exemplary embodiment.

Referring to FIG. 7, the embodiment, on the basis of aforementioned embodiment shown in fig. 5, the processing dress of lock is held in the application Setting 500 can also include: frequency acquisition module 503 and application determining module 504.

Wherein, the frequency acquisition module 503 is configured as obtaining in the time-obtaining module 501 described to be detected It is used using the local CPU for having installed application in the preset time period before the time for persistently holding the WAKELOCK, is obtained Frequency;

The application determining module 504 is configured as the CPU frequency of use obtained according to the frequency acquisition module 503, Determine the application to be detected.

In above-described embodiment, smart machine can determine application to be detected according to the CPU frequency of use of each application, thus It realizes the selectivity management for holding lock for application, saves the operation expense of equipment, while meeting the individual demand of user.

It should be noted that the frequency acquisition module 503 and application that include in above-mentioned embodiment shown in Fig. 7 determine mould Block 504 also may include in aforementioned embodiment shown in fig. 6, and the disclosure is not particularly limited this.

Fig. 8 is the block diagram for the processing unit that lock is held in another application shown according to an exemplary embodiment.

Referring to FIG. 8, the embodiment, on the basis of aforementioned embodiment shown in fig. 5, the processing dress of lock is held in the application Setting 500 can also include: command reception module 505 and calling release module 506.

Wherein, described instruction receiving module 505, be configured as the message output module 502 export it is described prompt disappear After breath, user's releasing order for prompting message input is received.

The calling release module 506 is configured as according to the received release of releasing order of described instruction receiving module 505 Calling of the application to be detected to the WAKELOCK.

In above-described embodiment, smart machine can receive user for prompting message input release order after, release Application to be detected is put to the calling of WAKELOCK, and the application to be detected is avoided to call the long-time of WAKELOCK, is reduced System power dissipation reduces power consumption.

It should be noted that the command reception module 505 and calling release mould that include in above-mentioned embodiment shown in Fig. 8 Block 506 also may include in earlier figures 6 or embodiment shown in Fig. 7, and the disclosure is not particularly limited this.

The function of each unit and the realization process of effect are specifically detailed in the above method and correspond to step in above-mentioned apparatus Realization process, details are not described herein.

For device embodiment, since it corresponds essentially to embodiment of the method, so related place is referring to method reality Apply the part explanation of example.The apparatus embodiments described above are merely exemplary, wherein described be used as separation unit The unit of explanation may or may not be physically separated, and component shown as a unit can be or can also be with It is not physical unit, it can it is in one place, or may be distributed over multiple network units.It can be according to actual The purpose for needing to select some or all of the modules therein to realize disclosure scheme.Those of ordinary skill in the art are not paying Out in the case where creative work, it can understand and implement.

Correspondingly, the disclosure also provides the processing unit that lock is held in a kind of application, described device includes: processor;For depositing Store up the memory of processor-executable instruction;Wherein, the processor is configured to: obtain application to be detected and persistently hold wake-up Lock the time of WAKELOCK;When the time for persistently holding the WAKELOCK reaching preset threshold, prompting message is exported, it is described Prompting message includes visual cues message, voice prompting message.

Correspondingly, the disclosure also provides a kind of non-transitorycomputer readable storage medium, when in the storage medium When instruction is executed by the processor of smart machine, so that smart machine is able to carry out the processing method that lock is held in a kind of application, it is described Method includes: to obtain application to be detected persistently to hold the time for waking up lock WAKELOCK;When persistently holding the WAKELOCK's When time reaches preset threshold, prompting message is exported, the prompting message includes visual cues message, voice prompting message.

Fig. 9 is a kind of block diagram for WAKELOCK managing device 800 shown according to an exemplary embodiment.For example, Device 800 can be mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, doctor Treat equipment, body-building equipment, personal digital assistant etc..

Referring to Fig. 9, device 800 may include following one or more components: processing component 802, memory 804, power supply Component 806, multimedia component 808, audio component 810, the interface 812 of input/output (I/O), sensor module 814, and Communication component 816.

The integrated operation of the usual control device 800 of processing component 802, such as with display, telephone call, data communication, phase Machine operation and record operate associated operation.Processing element 802 may include that one or more processors 820 refer to execute It enables, to perform all or part of the steps of the methods described above.In addition, processing component 802 may include one or more modules, just Interaction between processing component 802 and other assemblies.For example, processing component 802 may include multi-media module, it is more to facilitate Interaction between media component 808 and processing component 802.

Memory 804 is configured as storing various types of data to support the operation in equipment 800.These data are shown Example includes the instruction of any application or method for operating on device 800, contact data, and telephone book data disappears Breath, picture, video etc..Memory 804 can be by any kind of volatibility or non-volatile memory device or their group It closes and realizes, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM) is erasable to compile Journey read-only memory (EPROM), programmable read only memory (PROM), read-only memory (ROM), magnetic memory, flash Device, disk or CD.

Electric power assembly 806 provides electric power for the various assemblies of device 800.Electric power assembly 806 may include power management system System, one or more power supplys and other with for device 800 generate, manage, and distribute the associated component of electric power.

Multimedia component 808 includes the screen of one output interface of offer between described device 800 and user.One In a little embodiments, screen may include liquid crystal display (LCD) and touch panel (TP).If screen includes touch panel, screen Curtain may be implemented as touch screen, to receive input signal from the user.Touch panel includes one or more touch sensings Device is to sense the gesture on touch, slide, and touch panel.The touch sensor can not only sense touch or sliding action Boundary, but also detect duration and pressure associated with the touch or slide operation.In some embodiments, more matchmakers Body component 808 includes a front camera and/or rear camera.When equipment 800 is in operation mode, such as screening-mode or When video mode, front camera and/or rear camera can receive external multi-medium data.Each front camera and Rear camera can be a fixed optical lens system or have focusing and optical zoom capabilities.

Audio component 810 is configured as output and/or input audio signal.For example, audio component 810 includes a Mike Wind (MIC), when device 800 is in operation mode, when such as call mode, recording mode, and voice recognition mode, microphone is matched It is set to reception external audio signal.The received audio signal can be further stored in memory 804 or via communication set Part 816 is sent.In some embodiments, audio component 810 further includes a loudspeaker, is used for output audio signal.

I/O interface 812 provides interface between processing component 802 and peripheral interface module, and above-mentioned peripheral interface module can To be keyboard, click wheel, button etc..These buttons may include, but are not limited to: home button, volume button, start button and lock Determine button.

Sensor module 814 includes one or more sensors, and the state for providing various aspects for device 800 is commented Estimate.For example, sensor module 814 can detecte the state that opens/closes of equipment 800, and the relative positioning of component, for example, it is described Component is the display and keypad of device 800, and sensor module 814 can be with 800 1 components of detection device 800 or device Position change, the existence or non-existence that user contacts with device 800,800 orientation of device or acceleration/deceleration and device 800 Temperature change.Sensor module 814 may include proximity sensor, be configured to detect without any physical contact Presence of nearby objects.Sensor module 814 can also include optical sensor, such as CMOS or ccd image sensor, at As being used in application.In some embodiments, which can also include acceleration transducer, gyro sensors Device, Magnetic Sensor, pressure sensor or temperature sensor.

Communication component 816 is configured to facilitate the communication of wired or wireless way between device 800 and other equipment.Device 800 can access the wireless network based on communication standard, such as WiFi, 2G or 3G or their combination.In an exemplary implementation In example, communication component 816 receives broadcast singal or broadcast related information from external broadcasting management system via broadcast channel. In one exemplary embodiment, the communication component 816 further includes near-field communication (NFC) module, to promote short range communication.Example Such as, NFC module can be based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra wide band (UWB) technology, Bluetooth (BT) technology and other technologies are realized.

In the exemplary embodiment, device 800 can be believed by one or more application specific integrated circuit (ASIC), number Number processor (DSP), digital signal processing appts (DSPD), programmable logic device (PLD), field programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components are realized, for executing the above method.

In the exemplary embodiment, a kind of non-transitorycomputer readable storage medium including instruction, example are additionally provided It such as include the memory 804 of instruction, above-metioned instruction can be executed by the processor 820 of device 800 to complete the above method.For example, The non-transitorycomputer readable storage medium can be ROM, random access memory (RAM), CD-ROM, tape, floppy disk With optical data storage devices etc..

Those skilled in the art will readily occur to its of the disclosure after considering specification and practicing disclosure disclosed herein Its embodiment.This application is intended to cover any variations, uses, or adaptations of the disclosure, these modifications, purposes or Person's adaptive change follows the general principles of this disclosure and including the undocumented common knowledge in the art of the disclosure Or conventional techniques.The description and examples are only to be considered as illustrative, and the true scope and spirit of the disclosure are by following Claim is pointed out.

It should be understood that the present disclosure is not limited to the precise structures that have been described above and shown in the drawings, and And various modifications and changes may be made without departing from the scope thereof.The scope of the present disclosure is only limited by the accompanying claims.

Claims (7)

1. the processing method that lock is held in a kind of application characterized by comprising
Timer corresponding with application to be detected is set;
When WAKELOCK is called in the application to be detected, starts the timer and start timing;
The time that the WAKELOCK is persistently held in the application to be detected is obtained by the timer;
Reach preset threshold when the time for persistently holding the WAKELOCK, and the type of the WAKELOCK is preset kind When, prompting message is exported, the prompting message includes visual cues message and/or voice prompting message, the preset kind packet Include at least one of following: FULL_WAKE_LOCK, SCREEN_BRIGHT_WAKE_LOCK, PARTIAL_WAKE_LOCK, SCREEN_DIM_WAKE_LOCK。
2. the processing method that lock is held in application according to claim 1, which is characterized in that further include:
In the preset time period before obtaining the time that the WAKELOCK is persistently held in the application to be detected, obtain local The CPU frequency of use of application has been installed;
According to the CPU frequency of use, the application to be detected is determined.
3. the processing method that lock is held in application according to claim 1, which is characterized in that further include:
After exporting the prompting message, user's releasing order for prompting message input is received;
The application to be detected is discharged to the calling of the WAKELOCK according to described release order.
4. the processing unit that lock is held in a kind of application characterized by comprising
Time-obtaining module is configured as setting timer corresponding with application to be detected;It is called in the application to be detected When WAKELOCK, starts the timer and start timing;The application to be detected, which is obtained, by the timer persistently holds institute State the time of WAKELOCK;
Message output module is configured as the time for persistently holding the WAKELOCK got in the time-obtaining module Reach preset threshold, and when the type of the WAKELOCK is preset kind, exports prompting message, the prompting message includes view Feel prompting message and/or voice prompting message, the preset kind include at least one of the following: FULL_WAKE_LOCK, SCREEN_BRIGHT_WAKE_LOCK、PARTIAL_WAKE_LOCK、SCREEN_DIM_WAKE_LOCK。
5. the processing unit that lock is held in application according to claim 4, which is characterized in that further include:
Frequency acquisition module is configured as persistently holding in the time-obtaining module acquisition application to be detected described In preset time period before the time of WAKELOCK, the local CPU frequency of use for having installed application is obtained;
Using determining module, it is configured as the CPU frequency of use obtained according to the frequency acquisition module, is determined described to be detected Using.
6. the processing unit that lock is held in application according to claim 4, which is characterized in that further include:
Command reception module is configured as after the message output module exports the prompting message, is received user and is directed to The prompting message input is released order;
Release module is called, is configured as discharging described to be detected answer according to received release order of described instruction receiving module With the calling to the WAKELOCK.
7. a kind of equipment characterized by comprising
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is configured to:
Timer corresponding with application to be detected is set;
When WAKELOCK is called in the application to be detected, starts the timer and start timing;
The time that the WAKELOCK is persistently held in the application to be detected is obtained by the timer;
Reach preset threshold when the time for persistently holding the WAKELOCK, and the type of the WAKELOCK is preset kind When, prompting message is exported, the prompting message includes visual cues message and/or voice prompting message, the preset kind packet Include at least one of following: FULL_WAKE_LOCK, SCREEN_BRIGHT_WAKE_LOCK, PARTIAL_WAKE_LOCK, SCREEN_DIM_WAKE_LOCK。
CN201610166140.5A 2016-03-22 2016-03-22 Using the treating method and apparatus for holding lock CN105807894B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610166140.5A CN105807894B (en) 2016-03-22 2016-03-22 Using the treating method and apparatus for holding lock

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610166140.5A CN105807894B (en) 2016-03-22 2016-03-22 Using the treating method and apparatus for holding lock

Publications (2)

Publication Number Publication Date
CN105807894A CN105807894A (en) 2016-07-27
CN105807894B true CN105807894B (en) 2019-06-25

Family

ID=56453597

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610166140.5A CN105807894B (en) 2016-03-22 2016-03-22 Using the treating method and apparatus for holding lock

Country Status (1)

Country Link
CN (1) CN105807894B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106372543A (en) * 2016-08-31 2017-02-01 上海摩软通讯技术有限公司 Resource control method and device based on mobile terminal
CN106774792A (en) * 2016-11-28 2017-05-31 宇龙计算机通信科技(深圳)有限公司 Method for managing power supply and system
CN106775685A (en) * 2016-12-01 2017-05-31 北京奇虎科技有限公司 Wake up lock method for releasing and device, mobile terminal
CN107231434A (en) * 2017-07-10 2017-10-03 北京小米移动软件有限公司 The control method and device of terminal device

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10013511B2 (en) * 2012-04-09 2018-07-03 Purdue Research Foundation System and method for energy usage accounting in software applications
CN103402027B (en) * 2013-07-29 2015-03-04 广东欧珀移动通信有限公司 Mobile terminal and method for putting same into sleeping state
US9229522B1 (en) * 2013-08-27 2016-01-05 Symantec Corporation Mobile battery performance by identifying apps that disproportionally run background tasks that prevent mobile devices from sleeping
CN104038635A (en) * 2014-06-25 2014-09-10 深圳市中兴移动通信有限公司 Mobile terminal and prompting method of abnormal standby thereof
CN104156053B (en) * 2014-07-29 2015-12-30 努比亚技术有限公司 A kind of control method of abnormal power consumption, device and mobile terminal
CN104808766A (en) * 2015-03-31 2015-07-29 深圳市金立通信设备有限公司 Terminal
CN105183137B (en) * 2015-09-09 2018-06-01 厦门美图移动科技有限公司 A kind of mobile terminal and its wake-up lock control method and control system

Also Published As

Publication number Publication date
CN105807894A (en) 2016-07-27

Similar Documents

Publication Publication Date Title
CN104714414B (en) The control method and device of smart home device, electronic equipment
EP2993584B1 (en) Method and device for controlling background application
EP2879037B1 (en) Mobile terminal and controlling method thereof
JP6254718B2 (en) Method for adjusting operating state of smart home equipment, apparatus, program, and recording medium
EP3035738B1 (en) Method for connecting appliance to network and corresponding device
EP2930705A1 (en) Method and apparatus for controlling smart terminal
JP6096992B2 (en) Method, apparatus, program and storage medium for saving storage space
KR101639539B1 (en) Method, device, program, and recording medium for prompting application removal
KR101869410B1 (en) Method, apparatus, program and computer-readable recording medium for charging
JP2016526244A (en) Application program processing method, apparatus, program, and storage medium
EP3046016A1 (en) Method and apparatus for switching display mode
CN105677460B (en) Applied program processing method and device
CN104376239B (en) The unlocking method and a device of terminal
JP2017535003A (en) Multimedia information display method and apparatus
CN105430547B (en) The dormancy method and device of bluetooth headset
US10409684B2 (en) Method, device and storage medium for cleaning memory
CN105204894B (en) The method and apparatus for installing the plug-in unit of smart machine
EP3131079B1 (en) Home appliance control method and device, computer program and recording medium
CN104484200B (en) The method and device upgraded to firmware
US10282561B2 (en) Method and apparatus for managing application
CN104580642A (en) Clock reminding method and device
CN105306718B (en) Incidence prompt method and device
EP3015779A1 (en) Air purification prompting method and apparatus, and user equipment
CN106020670B (en) Screen lighting control method and device and electronic equipment
CN105117211B (en) The method and device of prompting message

Legal Events

Date Code Title Description
PB01 Publication
C06 Publication
SE01 Entry into force of request for substantive examination
C10 Entry into substantive examination
GR01 Patent grant
GR01 Patent grant