Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terminal provided by the embodiment of the invention can be an electronic device such as a mobile phone, a tablet personal computer, an MP3 and the like; the desktop real-time clock may refer to an application requiring a real-time clock setting on a main interface of the terminal, for example, a time display application, a battery power display application, a signal display application, and the like on the main interface.
Referring to fig. 1, a schematic flow chart of a method for managing a desktop real-time clock according to an embodiment of the present invention is shown, where the method includes:
s101, detecting the current running state of the terminal;
specifically, the current running state of the terminal may include a real-time clock display state and a real-time clock non-display state, and the current running state of the terminal may be detected by detecting whether a desktop real-time clock of the terminal is displayed. When desktop real-time clock display of a terminal is detected, determining that the current operation state of the terminal is a real-time clock display state; when the fact that the desktop real-time clock of the terminal is not displayed is detected, the current running state of the terminal is determined to be the real-time clock non-display state. The specific process of detecting whether the desktop real-time clock of the terminal is displayed can be as follows: when the terminal is not in a standby state, detecting whether a terminal screen is started, and if the screen is not started, detecting that the current running state of the terminal is a real-time clock undisplayed state; if the screen is opened, further detecting whether the interface process at the foremost end of the screen is in a full-screen mode, and if the interface process is in the full-screen mode, detecting that the current running state of the terminal is a real-time clock undisplayed state; and if the terminal is not in the full-screen mode, detecting that the current running state of the terminal is a real-time clock display state. Accordingly, the real-time clock non-display state may include a full-screen mode state, a non-standby and a screen-off state. For example, when the terminal is used to play a game in full screen, the desktop real-time clock of the terminal is not displayed, and applications that need to update the real-time clock, such as a time display application, a battery power display application, a signal display application, and the like on the desktop, are not displayed on the interface process at the frontmost end of the screen.
S102, acquiring the set running parameters of the desktop real-time clock corresponding to the current running state of the terminal;
specifically, after the current operation state of the terminal is detected, the set operation parameters of the desktop real-time clock corresponding to the current operation state of the terminal may be obtained, where the correspondence between the current operation state of the terminal and the operation parameters of the desktop real-time clock may be preset, for example, the display state of the real-time clock may correspond to the high-frequency operation parameters of the desktop real-time clock, such as updating the real-time clock every 1 second, so that the time in the time display application may be updated every second; the non-display state of the real-time clock can correspond to the stop operation parameters of the desktop real-time clock, for example, when the game is played in a full screen mode, the operation of the desktop real-time clock can be stopped, so that the time display updating in the time display application of the background can be stopped, and the electric quantity can be saved.
S103, adjusting the operation of the desktop real-time clock according to the acquired operation parameters.
Specifically, after the operation parameters of the corresponding desktop real-time clock are obtained, the operation of the desktop real-time clock can be adjusted according to the obtained operation parameters, for example, if the high-frequency operation parameters are obtained, the operation of the desktop real-time clock is adjusted to be high-frequency operation, for example, the real-time clock is updated every 1 second; and if the operation stopping parameters are obtained, adjusting the operation of the desktop real-time clock to be stopped, namely stopping the operation of the desktop real-time clock so as to save electric quantity.
According to the embodiment of the invention, the set running parameters of the desktop real-time clock corresponding to the current running state of the terminal can be obtained by detecting the current running state of the terminal so as to adjust the running of the desktop real-time clock, so that the running of the desktop real-time clock can be intelligently controlled according to the use scene of a user, and the power consumption of a system is reduced.
Referring to fig. 2 again, a flow chart of another desktop real-time clock management method according to an embodiment of the present invention is shown, where the method includes:
s201, detecting whether a desktop real-time clock of the terminal is displayed or not;
specifically, when the terminal is not in a standby state, detecting whether a terminal screen is opened, and if the screen is not opened, detecting that a desktop real-time clock of the terminal is not displayed, namely that the current running state of the terminal is a real-time clock non-display state; if the screen is opened, whether the interface process at the foremost end of the screen is in a full-screen mode can be further detected, if so, the desktop real-time clock of the terminal is detected to be not displayed, namely, the detected current running state of the terminal is a real-time clock non-display state; and if the terminal is not in the full-screen mode, detecting that a desktop real-time clock of the terminal is displayed, namely detecting that the current running state of the terminal is a real-time clock display state.
S202, determining the current running state of the terminal to be a real-time clock undisplayed state;
specifically, when detecting that the desktop real-time clock of the terminal is not displayed in S201, it is determined that the current running state of the terminal is the real-time clock non-display state, where the real-time clock non-display state may include a full-screen mode state, a non-standby state, and a screen-off state. For example, when a game is played on the terminal in a full screen mode, the current running state of the terminal can be determined to be a real-time clock undisplayed state.
S203, acquiring a set low-frequency running parameter or a set stop running parameter of the desktop real-time clock;
specifically, when the current running state of the terminal is determined to be a real-time clock non-display state, the set low-frequency running parameter or the running stopping parameter of the desktop real-time clock can be obtained. The low-frequency operation parameter may refer to updating the real-time clock once every 1 hour or every 2 hours or longer, for example, when the low-frequency operation parameter is used in the real-time clock operation corresponding to the time display application, the time in the time display application may be updated once every 1 hour or every 2 hours or longer. The stop-running parameter may refer to stopping updating of the real-time clock, for example, when the stop-running parameter is used in running of the real-time clock corresponding to the time display application, the time in the time display application will not be updated.
S204, determining the current running state of the terminal as a real-time clock display state;
specifically, when detecting that the desktop real-time clock of the terminal is displayed in S201, it may be determined that the current operation state of the terminal is the real-time clock display state.
S205, judging whether the display area of the desktop real-time clock is in a preset abbreviated display area or not and whether the area of the display area of the desktop real-time clock is smaller than a preset abbreviated display area threshold or not;
specifically, when it is determined that the current operation state of the terminal is the real-time clock display state, it may be further determined whether the display area of the desktop real-time clock is in a preset abbreviated display area, and whether the area of the display area of the desktop real-time clock is smaller than a preset abbreviated display area threshold. Wherein, an area which is not obvious to the user can be set as the thumbnail display area, such as the upper left corner or the upper right corner in the screen desktop. The thumbnail display area threshold may be set in advance, such as setting the thumbnail display area threshold to one tenth of the size of the screen area.
S206, determining the display state of the real-time clock to be in a thumbnail display mode;
specifically, when the determination in step S205 is yes, it may be further determined that the real-time clock display state is in the thumbnail display mode, for example, when the time display application and the battery power display application are both displayed in a small area at the upper left or the upper right of the screen, it may be determined that the real-time clock display state is in the thumbnail display mode.
S207, acquiring a set intermediate frequency operating parameter of the desktop real-time clock;
specifically, when the display state of the real-time clock is determined to be in the thumbnail display mode, the set intermediate frequency operating parameters of the desktop real-time clock can be acquired. The intermediate frequency operation parameter may refer to updating the real-time clock every 1 minute or every 5 minutes or other time periods, for example, when the intermediate frequency operation parameter is used in the real-time clock operation corresponding to the time display application, the time in the time display application may be updated every 1 minute or every 5 minutes or other time periods.
S208, determining that the display state of the real-time clock is in an obvious display mode;
specifically, when the determination in step S205 is negative, it may be further determined that the real-time clock display status is in the explicit display mode, for example, when the time display application is in the middle of the screen for displaying, or when the display area of the time display application in the screen is greater than the preset abbreviated display area threshold, it may be determined that the real-time clock display status is in the explicit display mode.
S209, acquiring the set high-frequency operation parameters of the desktop real-time clock;
specifically, when the display state of the real-time clock is determined to be in the obvious display mode, the set high-frequency operation parameters of the desktop real-time clock can be acquired. The high-frequency operation parameter may refer to updating the real-time clock every 1 second, and for example, when the high-frequency operation parameter is used in the real-time clock operation corresponding to the time display application, the time in the time display application may be updated every 1 second.
Of course, the time length of the update cycle of the intermediate frequency operation parameter is less than the time length of the update cycle of the low frequency operation parameter and greater than the time length of the update cycle of the high frequency operation parameter.
The adjusting the operation of the desktop real-time clock according to the acquired operation parameter in step S103 in the embodiment corresponding to fig. 1 may specifically include:
when the acquired operation parameters are the high-frequency operation parameters, adjusting the operation of the desktop real-time clock to be high-frequency operation;
specifically, when the operation parameter obtained in step S209 is the high-frequency operation parameter, the operation of the desktop real-time clock may be adjusted to be the high-frequency operation, so that the user may view time, battery level, mobile phone signals, and the like in real time.
When the acquired operation parameters are the intermediate-frequency operation parameters, adjusting the operation of the desktop real-time clock to be intermediate-frequency operation;
specifically, when the operation parameter obtained in step S207 is the intermediate-frequency operation parameter, the operation of the desktop real-time clock may be adjusted to be intermediate-frequency operation, so that the related application does not need to be updated in real time, and the battery power is appropriately reduced.
When the acquired running parameters are the low-frequency running parameters, the operation of the desktop real-time clock is adjusted to be low-frequency operation;
specifically, when the operation parameter obtained in step S203 is the low-frequency operation parameter, the operation of the desktop real-time clock may be adjusted to be low-frequency operation, so that the related application does not need to be updated in real time, and the battery power is further reduced.
When the acquired running parameters are the running stopping parameters, the operation of the desktop real-time clock is adjusted to be stopped;
specifically, when the operation parameter acquired in step S203 is the operation stop parameter, the operation of the desktop real-time clock may be adjusted to stop operation, and at this time, the terminal may be in an un-standby and screen-off state or a full-screen mode state, and the user may not view the time display application, the battery power display application, and the like, so that the operation of the real-time clock of the relevant applications such as the time display application, the battery power display application, and the like may be stopped, and thus, the power consumption of the system may be effectively reduced.
Of course, the operation parameters of the desktop real-time clock may also be correspondingly switched according to the current operation state of the terminal, for example, when the current operation state of the terminal is switched from the undisplayed state of the real-time clock to the obvious display mode, the acquired operation parameters of the desktop real-time clock may be switched from the operation stop parameters to the high-frequency operation parameters, that is, the operation stop of the desktop real-time clock is adjusted to the high-frequency operation.
According to the embodiment of the invention, the set running parameters of the desktop real-time clock corresponding to the current running state of the terminal can be obtained by detecting the current running state of the terminal so as to adjust the running of the desktop real-time clock, so that the running of the desktop real-time clock can be intelligently controlled according to the use scene of a user, and the power consumption of a system is reduced.
Referring to fig. 3, which is a schematic structural diagram of a mobile terminal 1 according to an embodiment of the present invention, the mobile terminal 1 may include: a state detection unit 10, a parameter acquisition unit 20, an adjustment unit 30;
the state detection unit 10 is configured to detect a current operation state of the terminal;
specifically, the current operation state of the terminal may include a real-time clock display state and a real-time clock non-display state, and the state detection unit 10 may detect the current operation state of the terminal by detecting whether a desktop real-time clock of the terminal is displayed. When the state detection unit 10 detects that the desktop real-time clock of the terminal is displayed, it may be determined that the current operation state of the terminal is the real-time clock display state; when the state detection unit 10 detects that the desktop real-time clock of the terminal is not displayed, it may be determined that the current operating state of the terminal is a real-time clock non-display state. The specific process of the state detection unit 10 detecting whether the desktop real-time clock of the terminal is displayed may be as follows: when the terminal is not in a standby state, the state detection unit 10 detects whether a terminal screen is opened, and if the terminal screen is not opened, the detected current running state of the terminal is a real-time clock undisplayed state; if the screen is opened, further detecting whether the interface process at the foremost end of the screen is in a full-screen mode, and if the interface process is in the full-screen mode, detecting that the current running state of the terminal is a real-time clock undisplayed state; and if the terminal is not in the full-screen mode, detecting that the current running state of the terminal is a real-time clock display state. Accordingly, the real-time clock non-display state may include a full-screen mode state, a non-standby and a screen-off state. For example, when the terminal is used to play a game in full screen, the desktop real-time clock of the terminal is not displayed, and applications that need to update the real-time clock, such as a time display application, a battery power display application, a signal display application, and the like on the desktop, are not displayed on the interface process at the frontmost end of the screen.
The parameter acquiring unit 20 is configured to acquire a set operation parameter of the desktop real-time clock corresponding to the current operation state of the terminal;
specifically, after the state detection unit 10 detects the current operation state of the terminal, the parameter obtaining unit 20 may obtain a set operation parameter of the desktop real-time clock corresponding to the current operation state of the terminal, where a corresponding relationship between the current operation state of the terminal and the operation parameter of the desktop real-time clock may be preset, for example, a real-time clock display state may correspond to a high-frequency operation parameter of the desktop real-time clock, such as updating the real-time clock every 1 second, so that the time in the time display application may be updated every second; the non-display state of the real-time clock can correspond to the stop operation parameters of the desktop real-time clock, for example, when the game is played in a full screen mode, the operation of the desktop real-time clock can be stopped, so that the time display updating in the time display application of the background can be stopped, and the electric quantity can be saved.
The adjusting unit 30 is configured to adjust the operation of the desktop real-time clock according to the acquired operation parameter;
specifically, after the parameter obtaining unit 20 obtains the operation parameters of the corresponding desktop real-time clock, the adjusting unit 30 may adjust the operation of the desktop real-time clock according to the obtained operation parameters, for example, if the high-frequency operation parameters are obtained, the adjusting unit 30 adjusts the operation of the desktop real-time clock to be the high-frequency operation, for example, the real-time clock is updated every 1 second; if the operation stop parameter is obtained, the adjusting unit 30 adjusts the operation of the desktop real-time clock to be a stop operation, that is, stops the operation of the desktop real-time clock, so as to save electric quantity.
Further, referring to fig. 4, which is a schematic structural diagram of a state detection unit 10 according to an embodiment of the present invention, the state detection unit 10 may include: a display detection unit 101, a first determination unit 102, a second determination unit 103, a thumbnail display determination unit 104;
the display detection unit 101 is configured to detect whether a desktop real-time clock of the terminal is displayed;
specifically, when the terminal is not in a standby state, the display detection unit 101 detects whether a terminal screen is opened, and if the terminal screen is not opened, the display detection unit 101 detects that a desktop real-time clock of the terminal is not displayed, that is, the current running state of the terminal is a real-time clock non-display state; if the screen is opened, whether the interface process at the forefront end of the screen is in a full-screen mode can be further detected, and if the interface process is in the full-screen mode, the display detection unit 101 detects that the desktop real-time clock of the terminal is not displayed, that is, the detected current running state of the terminal is a real-time clock non-display state; if the current operation state of the terminal is not the full screen mode, the display detection unit 101 detects that the desktop real-time clock of the terminal is displayed, that is, detects that the current operation state of the terminal is the real-time clock display state.
The first determining unit 102 is configured to determine that a current operation state of the terminal is a real-time clock display state when the display detecting unit 101 detects that a desktop real-time clock of the terminal is displayed;
the second determining unit 103 is configured to determine that the current running state of the terminal is a real-time clock undisplayed state when the display detecting unit 101 detects that the desktop real-time clock of the terminal is undisplayed;
specifically, when the display detection unit 101 detects that the desktop real-time clock of the terminal is not displayed, the second determination unit 103 determines that the current running state of the terminal is a real-time clock non-display state, where the real-time clock non-display state may include a full-screen mode state, a non-standby state, and a screen-off state. For example, when a game is played on the terminal in a full screen, the second determining unit 103 may determine that the current operation state of the terminal is a real-time clock non-display state.
The thumbnail display determining unit 104 is configured to determine whether a display area of the desktop real-time clock is in a preset thumbnail display area, and whether an area of the display area of the desktop real-time clock is smaller than a preset thumbnail display area threshold;
specifically, after the first determining unit 102 determines that the current operation state of the terminal is the real-time clock display state, the abbreviated display determining unit 104 may further determine whether the display area of the desktop real-time clock is in a preset abbreviated display area, and whether the display area of the desktop real-time clock is smaller than a preset abbreviated display area threshold. Wherein, an area which is not obvious to the user can be set as the thumbnail display area, such as the upper left corner or the upper right corner in the screen desktop. The thumbnail display area threshold may be set in advance, such as setting the thumbnail display area threshold to one tenth of the size of the screen area.
The first determining unit 102 is further configured to further determine that the real-time clock display state is in a thumbnail display mode if the thumbnail display determining unit 104 determines that the real-time clock display state is yes;
for example, when a time display application and a battery power display application are displayed in a small area on the upper left or right of the screen, the thumbnail display determination unit 104 determines that the real-time clock display state is in the thumbnail display mode.
The first determining unit 102 is further configured to further determine that the real-time clock display state is an obvious display mode if the thumbnail display determining unit 104 determines that the real-time clock display state is negative;
for example, when the time display application is displayed in the middle of the screen, or when the display area of the time display application in the screen is greater than the preset thumbnail display area threshold, the thumbnail display determination unit 104 may determine that the real-time clock display state is in the obvious display mode.
The parameter obtaining unit 20 provided in the embodiment of the present invention is specifically configured to obtain a set high-frequency operation parameter of the desktop real-time clock when the current operation state of the terminal is a real-time clock display state and the real-time clock display state is an obvious display mode;
specifically, when the first determining unit 102 determines that the display state of the real-time clock is in the explicit display mode, the parameter obtaining unit 20 may obtain the set high-frequency operating parameter of the desktop real-time clock. The high-frequency operation parameter may refer to updating the real-time clock every 1 second, and for example, when the high-frequency operation parameter is used in the real-time clock operation corresponding to the time display application, the time in the time display application may be updated every 1 second.
Or, the parameter obtaining unit 20 is specifically configured to obtain a set intermediate frequency operating parameter of the desktop real-time clock when the current operating state of the terminal is a real-time clock display state and the real-time clock display state is a thumbnail display mode;
specifically, when the first determining unit 102 determines that the display state of the real-time clock is in the thumbnail display mode, the parameter acquiring unit 20 may acquire the set intermediate frequency operating parameter of the desktop real-time clock. The intermediate frequency operation parameter may refer to updating the real-time clock every 1 minute or every 5 minutes or other time periods, for example, when the intermediate frequency operation parameter is used in the real-time clock operation corresponding to the time display application, the time in the time display application may be updated every 1 minute or every 5 minutes or other time periods.
Or, the parameter obtaining unit 20 is specifically configured to obtain a set low-frequency running parameter or a running stop parameter of the desktop real-time clock when the current running state of the terminal is a real-time clock non-display state;
specifically, when the second determining unit 103 determines that the current operating state of the terminal is the real-time clock non-display state, the parameter obtaining unit 20 may obtain a set low-frequency operating parameter or a set stop operating parameter of the desktop real-time clock. The low-frequency operation parameter may refer to updating the real-time clock once every 1 hour or every 2 hours or longer, for example, when the low-frequency operation parameter is used in the real-time clock operation corresponding to the time display application, the time in the time display application may be updated once every 1 hour or every 2 hours or longer. The stop-running parameter may refer to stopping updating of the real-time clock, for example, when the stop-running parameter is used in running of the real-time clock corresponding to the time display application, the time in the time display application will not be updated.
The adjusting unit 30 provided in the embodiment of the present invention is specifically configured to adjust the operation of the desktop real-time clock to be a high-frequency operation when the acquired operation parameter is the high-frequency operation parameter; or,
the adjusting unit 30 is specifically configured to adjust the operation of the desktop real-time clock to be an intermediate-frequency operation when the acquired operation parameter is the intermediate-frequency operation parameter; or,
the adjusting unit 30 is specifically configured to adjust the operation of the desktop real-time clock to be low-frequency operation when the acquired operation parameter is the low-frequency operation parameter; or,
the adjusting unit 30 is specifically configured to adjust the operation of the desktop real-time clock to be stopped when the acquired operation parameter is the stop operation parameter;
the time length of the update cycle of the intermediate frequency operation parameter is less than the time length of the update cycle of the low frequency operation parameter and is greater than the time length of the update cycle of the high frequency operation parameter.
According to the embodiment of the invention, the set running parameters of the desktop real-time clock corresponding to the current running state of the terminal can be obtained by detecting the current running state of the terminal so as to adjust the running of the desktop real-time clock, so that the running of the desktop real-time clock can be intelligently controlled according to the use scene of a user, and the power consumption of a system is reduced.
Referring to fig. 5, a schematic structural diagram of another mobile terminal according to an embodiment of the present invention is shown in fig. 5, where the mobile terminal includes: at least one processor 1001, such as a CPU, at least one user interface 1003, memory 1004, at least one communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display) and a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a standard wireless interface. The memory 1004 may be a high-speed RAM memory or a non-volatile memory (e.g., at least one disk memory). The memory 1004 may optionally be at least one storage device located remotely from the processor 1001. Wherein the processor 1001 may be combined with the mobile terminal described in fig. 3 to 4, the memory 1004 stores a set of program codes, and the processor 1001 calls the program codes stored in the memory 1004 to perform the following operations:
detecting the current running state of the terminal;
acquiring a set running parameter of a desktop real-time clock corresponding to the current running state of the terminal;
and adjusting the operation of the desktop real-time clock according to the acquired operation parameters.
The processor 1001 is specifically configured to:
detecting whether a desktop real-time clock of the terminal is displayed or not;
when desktop real-time clock display of a terminal is detected, determining that the current operation state of the terminal is a real-time clock display state;
when the fact that the desktop real-time clock of the terminal is not displayed is detected, the current running state of the terminal is determined to be the real-time clock non-display state.
Wherein the processor 1001 is further configured to:
judging whether the display area of the desktop real-time clock is in a preset abbreviated display area or not and whether the area of the display area of the desktop real-time clock is smaller than a preset abbreviated display area threshold or not;
if the real-time clock display state is judged to be the thumbnail display mode, further determining that the real-time clock display state is the thumbnail display mode;
otherwise, determining the display state of the real-time clock to be an obvious display mode.
The processor 1001 is specifically configured to:
and when the current running state of the terminal is a real-time clock display state and the real-time clock display state is an obvious display mode, acquiring the set high-frequency running parameters of the desktop real-time clock.
The processor 1001 is specifically configured to:
and when the current running state of the terminal is a real-time clock display state and the real-time clock display state is a thumbnail display mode, acquiring the set intermediate-frequency running parameters of the desktop real-time clock.
The processor 1001 is specifically configured to:
and when the current running state of the terminal is a real-time clock undisplayed state, acquiring a set low-frequency running parameter or a set running stopping parameter of the desktop real-time clock.
The processor 1001 is specifically configured to:
and when the acquired operation parameters are the high-frequency operation parameters, adjusting the operation of the desktop real-time clock to be high-frequency operation.
The processor 1001 is specifically configured to:
and when the acquired operation parameters are the intermediate-frequency operation parameters, adjusting the operation of the desktop real-time clock to be intermediate-frequency operation.
The processor 1001 is specifically configured to:
and when the acquired running parameters are the low-frequency running parameters, adjusting the running of the desktop real-time clock to be low-frequency running.
The processor 1001 is specifically configured to:
and when the acquired running parameters are the running stopping parameters, adjusting the running of the desktop real-time clock to be stopped.
Specifically, the mobile terminal described in this embodiment may be used to implement part or all of the processes in the embodiments of the desktop real-time clock management method described in conjunction with fig. 1 to fig. 2 of the present invention.
The units in the embodiments of the present invention may be implemented by a general-purpose integrated circuit, such as a Central Processing Unit (CPU), or an Application Specific Integrated Circuit (ASIC).
The steps in the method of the embodiment of the invention can be sequentially adjusted, combined and deleted according to actual needs.
The units in the device of the embodiment of the invention can be merged, divided and deleted according to actual needs.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present invention, and it is therefore to be understood that the invention is not limited by the scope of the appended claims.