Embodiment
Below in conjunction with drawings and Examples, the present invention is described in further detail.Be understandable that, specific embodiment described herein is only for explaining the present invention, but not limitation of the invention.It also should be noted that, for convenience of description, illustrate only part related to the present invention in accompanying drawing but not full content.
Fig. 1 shows the first embodiment of the present invention.
A kind of schematic flow sheet controlling the method for screen locking time that Fig. 1 provides for first embodiment of the invention.The method be applied in there is screen locking function terminal in be illustrated, these terminals include but not limited to smart mobile phone, panel computer, personal digital assistant, pocket computer on knee etc.See Fig. 1, described method comprises:
Step S101, detect software foremost at terminal operating.
In the present embodiment, by registering a polling procedure, every Preset Time detect once at the software foremost of terminal operating, also can user open foremost software time this software is detected.When adopt before plant detection mode time, the large I of Preset Time is set automatically by system, also can by man-machine interaction using the interval time set by user as Preset Time.In order to more whether there is close to real-time sense terminals screen the software run, and under not making cumbrous situation to system, preferably, automatically setting Preset Time by system is 2 seconds.Be understandable that, Preset Time can adjust according to user's user demand, such as can be set to 3 seconds, 4 seconds or 5 seconds.
Step S102, obtain software screen locking time of this software foremost.
When the software foremost of operation being detected in terminal, obtain the mark of software foremost, obtain the software screen locking time of software foremost according to this mark.Wherein, foremost in all softwares of running for terminal screen of software unique a software of using by active user.Such as, detect that terminal screen runs text edit software, instant communication software, browser software, wherein text edit software use by terminal user, other two softwares are all in minimized state, and software foremost is now text edit software.
In the present embodiment, the step obtaining the software screen locking time of software foremost can comprise further: the corresponding scene of first searching software foremost from preset corresponding relation list, obtain the software screen locking time of described corresponding scene corresponding software screen locking time as software foremost again, wherein preset corresponding relation list records at least one scene and the software identification corresponding with each scene at least one scene described; Or
From preset software screen locking time list, directly search the screen locking time of software foremost, wherein software screen locking time list records at least one software identification and the software screen locking time corresponding with every software identification in described at least one software identification.
The current screen locking time of step S103, acquisition terminal.
The software screen locking time of current screen locking time of step S104, comparison terminal and software foremost.
If the current screen locking time of step S105 terminal is different from the software screen locking time of software foremost, is then adjusted to the software screen locking time of software foremost the current screen locking time of terminal.
In order to the current screen locking time and current software foremost that can realize terminal are suitable, after the software screen locking time of the current screen locking time and software foremost that get terminal, obtained two times are compared, judge that whether the current screen locking time of terminal is consistent with the software screen locking time of software foremost, if not, is adjusted to the software screen locking time of software foremost the current screen locking time of terminal.
Certain those of ordinary skill in the art should understand, time little with the software screen locking time phase difference of software foremost when current screen locking time terminal being detected, without the need to again adjusting the current time of terminal, and the screen locking time of switching terminal can impact the stability of system frequently, one of the present embodiment preferred embodiment in, when judging that the current screen locking time of terminal is different from the software screen locking time of software foremost, also can judge whether the current screen locking time of terminal is less than the software screen locking time of software foremost further, and be less than default first threshold with the difference of software screen locking time of software foremost, if, just is adjusted to the software screen locking time of software foremost the current screen locking time of terminal, or
When judging that the current screen locking time of terminal is different from the software screen locking time of software foremost, also can judge whether the current screen locking time of terminal is greater than the software screen locking time of software foremost further, and be greater than default Second Threshold with the difference of software screen locking time of software foremost, if so, is just adjusted to the software screen locking time of software foremost the current screen locking time of terminal.
Such as, the current screen locking time of the terminal obtained is 5 seconds, the software screen locking time of software is 20 seconds foremost, the first threshold preset is-5, Second Threshold is+5, then judge that the current screen locking time (5 seconds) of terminal is less than the software screen locking time (20 seconds) of software foremost, and be less than first threshold-5 with the difference-15 of software screen locking time (20 seconds) of software foremost, now the current screen locking time of terminal is adjusted to 20 seconds.
Consider terminal user sometimes because of maloperation switching terminal screen software foremost frequently, or open a terminal screen foremost after software within very short time (such as 2 seconds) just close, now without the need to adjusting the screen locking time of terminal.One of the present embodiment preferred embodiment in, terminal, when performing step S101, also comprises: whether the software foremost detecting terminal operating in predetermined time duration all belongs to a software.If so, then step S102 is performed.
The technical scheme that first embodiment of the invention provides, time different from the software screen locking time of software foremost by current screen locking time of comparison terminal, the current screen locking time of terminal is adjusted to the software screen locking time, thus make terminal can switch the current screen locking time automatically according to software foremost, overcome because of user's manual switchover screen locking time and then expend the drawback of more terminal battery electricity quantity frequently.
Fig. 2 shows the second embodiment of the present invention.
A kind of schematic flow sheet controlling the method for screen locking time that Fig. 2 provides for second embodiment of the invention.The method be applied in there is screen locking function terminal in be illustrated, these terminals include but not limited to smart mobile phone, panel computer, personal digital assistant, pocket computer on knee etc.See Fig. 2, described method comprises:
Step S201, the software foremost of operation whether detected in terminal.
In the present embodiment, by registering a polling procedure, detect once at the software foremost of terminal operating every Preset Time.When the software foremost of operation being detected in terminal, perform step S202, otherwise perform step S204.
Step S202, search the corresponding scene that whether there is software foremost in preset corresponding relation list.
In the present embodiment, foremost in all softwares of running for terminal screen of software unique a software of using by active user.Preset corresponding relation list records at least one scene and the software identification corresponding with each scene at least one scene described.Wherein, software identification can be the MD5(Message-Digest5 of software path, dbase or software, informative abstract 5) various forms such as value.Such as, following table is the preset a kind of corresponding relation list of terminal:
Preset corresponding relation list can acquire from server, and also by providing a personal-machine interactive interface, the dependent instruction that reception user inputs on the surface generates.One of the present embodiment preferred embodiment in, periodically obtain scene software matrix from server, upgrade preset corresponding relation list according to scene software matrix.This renewal process can adopt and cover local preset corresponding relation list mode comprehensively, also the scene software matrix of corresponding relation list preset for this locality and up-to-date acquisition can be compared, only the list item mode of amendment changing unit.
The software foremost of operation detected in terminal after, first obtain the software identification of software foremost, then search the corresponding scene that whether there is obtained software identification in preset corresponding relation list, if, perform step S203, otherwise perform step S204.It should be noted that, the software identification of the software foremost that the every software identification in preset corresponding relation list and terminal obtain in form should unification mutually.Such as, when every software identification of preset corresponding relation list records is the MD5 value of each software, the software identification of the software foremost that terminal obtains also should be the MD5 value of this software.
Step S203, obtain the software screen locking time of described corresponding scene corresponding software screen locking time as software foremost.
When the software foremost of operation being detected in terminal, and search when there is the corresponding scene of obtained software identification in preset corresponding relation list, obtain the described corresponding scene corresponding software screen locking time, perform step S205.
Step S204, obtain the software screen locking time of screen locking time as software foremost of acquiescence.
When do not detect in terminal operation software foremost or search whether there is the corresponding scene of obtained software identification in preset corresponding relation list time, directly obtain the software screen locking time of screen locking time as terminal software foremost of acquiescence, continue to perform step S205.
The current screen locking time of step S205, acquisition terminal.
The software screen locking time of current screen locking time of step S206, comparison terminal and software foremost;
If the absolute value of the current screen locking time of step S207 terminal and the foremost difference of the software screen locking time of software is greater than default threshold value, then the current screen locking time is adjusted to the software screen locking time.
The technical scheme that second embodiment of the invention provides, according to the corresponding scene of the corresponding relation list lookup software foremost preset, obtain this scene corresponding software screen locking time, when the absolute value of the difference of the current screen locking time and software screen locking time that judge terminal is greater than default threshold value, the current screen locking time of terminal is adjusted to the software screen locking time, thus make terminal can according to the corresponding scene of software foremost from the dynamic switching current screen locking time, overcome because of user's manual switchover screen locking time and then expend the drawback of more terminal battery electricity quantity frequently, and avoid frequently switch the screen locking time on the impact of system stability, upgrade default corresponding relation list by the scene software matrix obtained from server, the screen locking time of terminal can be regulated under more scenes, promote Consumer's Experience.
Fig. 3 shows the third embodiment of the present invention.
A kind of structural representation controlling the device of screen locking time that Fig. 3 provides for third embodiment of the invention.See Fig. 3, described device comprises:
Software detection module 301, for detecting the software foremost at terminal operating;
Software screen locking time-obtaining module 302, for obtaining the software screen locking time of this software foremost;
Current screen locking time-obtaining module 303, for obtaining the current screen locking time of terminal;
Screen locking time comparison module 304, for the current screen locking time of more described terminal and the software screen locking time of described software foremost;
Screen locking time regulating module 305, for when the described current screen locking time is different from the described software screen locking time, is adjusted to the described software screen locking time by the described current screen locking time.
In the present embodiment, software detection module 301 by registering a polling procedure, every Preset Time detect once at the software foremost of terminal operating, also can user open foremost software time this software is detected.When adopt before plant detection mode time, the large I of Preset Time is set automatically by software detection module 301, also can by man-machine interaction using the interval time set by user as Preset Time.In order to more whether there is close to real-time sense terminals screen the software run, and under not making cumbrous situation to system, preferably, automatically setting Preset Time by software detection module 301 is 2 seconds.Be understandable that, Preset Time can adjust according to user's user demand, such as can be set to 3 seconds, 4 seconds or 5 seconds.
When software detection module 301 detects the software foremost of operation in terminal, software screen locking time-obtaining module 302 obtains the mark of software foremost, obtains the software screen locking time of software foremost according to this mark.Wherein, foremost in all softwares of running for terminal screen of software unique a software of using by active user.
In the present embodiment, software screen locking time-obtaining module 302 when obtaining the software screen locking time of software foremost specifically for the corresponding scene of first searching software foremost from preset corresponding relation list, obtain the software screen locking time of described corresponding scene corresponding software screen locking time as software foremost again, wherein preset corresponding relation list records at least one scene and the software identification corresponding with each scene at least one scene described; Or
From preset software screen locking time list, directly search the screen locking time of software foremost, wherein software screen locking time list records at least one software identification and the software screen locking time corresponding with every software identification in described at least one software identification.
In order to the current screen locking time and current software foremost that can realize terminal are suitable, after current screen locking time-obtaining module 303 gets the software screen locking time that current screen locking time of terminal and software screen locking time-obtaining module 302 get software foremost, obtained two times compare by screen locking time comparison module 304, judge that whether the current screen locking time of terminal is consistent with the software screen locking time of software foremost, if not, the current screen locking time of terminal is adjusted to the software screen locking time of software foremost by screen locking time regulating module 305.
Certain those of ordinary skill in the art should understand, time little with the software screen locking time phase difference of software foremost when the current screen locking time that screen locking time comparison module 304 detects terminal, screen locking time regulating module 305 is without the need to again adjusting the current time of terminal, and the screen locking time of switching terminal can impact the stability of system frequently, one of the present embodiment preferred embodiment in, when screen locking time comparison module 304 judges that the current screen locking time of terminal is different from the software screen locking time of software foremost, also can judge whether the current screen locking time of terminal is less than the software screen locking time of software foremost further, and be less than default first threshold with the difference of software screen locking time of software foremost, if, the current screen locking time of terminal is just adjusted to the software screen locking time of software foremost by screen locking time regulating module 305, or
When screen locking time comparison module 304 judges that the current screen locking time of terminal is different from the software screen locking time of software foremost, also can judge whether the current screen locking time of terminal is greater than the software screen locking time of software foremost further, and be greater than default Second Threshold with the difference of software screen locking time of software foremost, if so, the current screen locking time of terminal is just adjusted to the software screen locking time of software foremost by screen locking time regulating module 305.
Consider terminal user sometimes because of maloperation switching terminal screen software foremost frequently, or open a terminal screen foremost after software within very short time (such as 2 seconds) just close, now without the need to adjusting the screen locking time of terminal.One of the present embodiment preferred embodiment in, software detection module 301 also for: whether the software foremost detecting terminal operating in predetermined time duration all belongs to a software.If so, software screen locking time-obtaining module 302 obtains the software screen locking time of this software foremost.
The technical scheme that third embodiment of the invention provides, time different from the software screen locking time of software foremost by current screen locking time of comparison terminal, the current screen locking time of terminal is adjusted to the software screen locking time, thus make terminal can switch the current screen locking time automatically according to software foremost, overcome because of user's manual switchover screen locking time and then expend the drawback of more terminal battery electricity quantity frequently.
Fig. 4 shows the fourth embodiment of the present invention.
A kind of structural representation controlling the device of screen locking time that Fig. 4 provides for fourth embodiment of the invention.See Fig. 4, described device comprises:
Software detection module 401, for detecting the software foremost at terminal operating, when the software foremost of operation not detected in terminal, obtains the acquiescence screen locking time of terminal as the described software screen locking time;
Software screen locking time-obtaining module 402, comprising: scene searches subelement 4021, for when the software foremost of operation being detected in terminal, and the corresponding scene of software foremost described in searching from preset corresponding relation list; Time obtains subelement 4022, for obtaining the software screen locking time of described corresponding scene corresponding software screen locking time as this software foremost;
Current screen locking time-obtaining module 403, for obtaining the current screen locking time of terminal;
Screen locking time comparison module 404, for the current screen locking time of more described terminal and the software screen locking time of described software foremost;
Screen locking time regulating module 405, when the absolute value for the difference when described current screen locking time and described software screen locking time is greater than default threshold value, is adjusted to the described software screen locking time by the described current screen locking time.
In the present embodiment, software detection module 401, by registering a polling procedure, detects once at the software foremost of terminal operating every Preset Time.Foremost in all softwares of running for terminal screen of software unique a software of using by active user.Preset corresponding relation list records at least one scene and the software identification corresponding with each scene at least one scene described.Wherein, software identification can be the MD5(Message-Digest5 of software path, dbase or software, informative abstract 5) various forms such as value.
In the present embodiment, software screen locking time-obtaining module 402 also comprises list update subelement (not shown), preset corresponding relation list can be acquired from server by list update subelement, also by providing a personal-machine interactive interface, the dependent instruction that reception user inputs on the surface generates.One of the present embodiment preferred embodiment in, list update subelement periodically obtains scene software matrix from server, upgrades preset corresponding relation list according to scene software matrix.This renewal process can adopt and cover local preset corresponding relation list mode comprehensively, also the scene software matrix of corresponding relation list preset for this locality and up-to-date acquisition can be compared, only the list item mode of amendment changing unit.
The software foremost of operation detected in software detection module 401 after, scene searches the software identification that first subelement 4021 obtains software foremost, then the corresponding scene that whether there is obtained software identification in preset corresponding relation list is searched, if, time obtains subelement 4022 and obtains the software screen locking time of described corresponding scene corresponding software screen locking time as this software foremost, if not, the acquiescence screen locking time of terminal is obtained as the described software screen locking time.It should be noted that, the software identification of the software foremost that the every software identification in preset corresponding relation list and terminal obtain in form should unification mutually.Such as, when every software identification of preset corresponding relation list records is the MD5 value of each software, the software identification that scene searches the software foremost that subelement 4021 obtains also should be the MD5 value of this software.
The technical scheme that fourth embodiment of the invention provides, according to the corresponding scene of the corresponding relation list lookup software foremost preset, obtain this scene corresponding software screen locking time, when the absolute value of the difference of the current screen locking time and software screen locking time that judge terminal is greater than default threshold value, the current screen locking time of terminal is adjusted to the software screen locking time, thus make terminal can according to the corresponding scene of software foremost from the dynamic switching current screen locking time, overcome because of user's manual switchover screen locking time and then expend the drawback of more terminal battery electricity quantity frequently, and avoid frequently switch the screen locking time on the impact of system stability, upgrade default corresponding relation list by the scene software matrix obtained from server, the screen locking time of terminal can be regulated under more scenes, promote Consumer's Experience.
Fig. 5 is the structural representation that can be used for the terminal implementing the present invention program.See Fig. 5, terminal 50 can comprise the parts such as storer 501, input block 502, processor 503, display unit 504, communicator 505.
Storer 501 stores software program and the module of the method realizing the control screen locking time that the embodiment of the present invention proposes.
Input block 502 receives numeral or the note information of input, and produces and to arrange with user or function controls relevant Trackpad, keyboard, mouse, control lever signal input.
Processor 503 by running the software program being stored in storer 501 and the data obtaining input block 502, thus performs the application of various function and data processing.
Display unit 504 can be used for the various graphical user interface of the information inputted by user that video-stream processor 503 provides or the information being supplied to user and terminal 50, and these graphical user interface can be made up of figure, text, icon, video and its combination in any.
Communicator 505 can be used for being transmitted and receive data by the Wireless/wired communication technology, wherein wireless communication technology includes but not limited to CDMA (Code Division Multiple Access, CDMA), WCDMA (Wideband Code Division Multiple Access, Wideband Code Division Multiple Access (WCDMA)), the technology such as GPRS (General Packet Radio Service, general packet radio service).
It will be understood by those skilled in the art that the restriction of the not structure paired terminal of the terminal structure shown in Fig. 5, the parts more more or less than diagram can be comprised, or combine some parts, or different parts are arranged.
All or part of content in the technical scheme that above embodiment provides can be realized by software programming, its software program is stored in the storage medium that can read, storage medium such as: the hard disk in computing machine, computer readable memory, CD or floppy disk etc.
Note, above are only preferred embodiment of the present invention and institute's application technology principle.Skilled person in the art will appreciate that and the invention is not restricted to specific embodiment described here, various obvious change can be carried out for a person skilled in the art, readjust and substitute and can not protection scope of the present invention be departed from.Therefore, although be described in further detail invention has been by above embodiment, the present invention is not limited only to above embodiment, when not departing from the present invention's design, can also comprise other Equivalent embodiments more, and scope of the present invention is determined by appended right.