Time display method and terminal
[ technical field ] A method for producing a semiconductor device
The present invention relates to the field of communications technologies, and in particular, to a time display method and a terminal.
[ background of the invention ]
Currently, some users do not have the habit of wearing a watch, and prefer to use a terminal to view time. And along with the increase of the terminal screen, the power consumption of the terminal is intensified, and after the terminal is automatically shut down when the terminal runs out of electric quantity, if the terminal is charged, only the charging information is displayed.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art:
in the existing display method, only charging information is displayed in the charging process of the terminal in a shutdown state, and if a user wants to check time, the user can check the current time only after performing startup operation on the terminal after waiting for the electric quantity of the terminal to meet the startup condition, so that the operation is complex and the checking efficiency is low.
[ summary of the invention ]
In view of this, embodiments of the present invention provide a time display method and a terminal, so as to solve the problems that in the existing display method, when time information is viewed in a charging process in a terminal shutdown state, steps are complex and viewing efficiency is low.
In one aspect, an embodiment of the present invention provides a time display method, including:
detecting the voltage of a terminal battery in the charging process of the terminal in a shutdown state;
judging whether the voltage of the terminal battery reaches the system working voltage or not;
and if the voltage of the terminal battery is determined to reach the system working voltage, acquiring the time information of the real-time clock in the terminal, and displaying the time information.
The above-described aspect and any possible implementation manner further provide an implementation manner, where the determining whether the voltage of the terminal battery reaches the system operating voltage includes:
comparing the voltage of the terminal battery with a preset voltage threshold, wherein the voltage threshold is smaller than the system working voltage;
and if the voltage of the terminal battery is greater than the voltage threshold, judging whether the voltage of the terminal battery reaches the system working voltage.
The above aspect and any possible implementation manner further provide an implementation manner, where the obtaining time information of a real-time clock in the terminal includes:
and running a kernel program of an operating system in the terminal so that the kernel program of the operating system reads the time information of the real-time clock in the terminal.
The above-described aspect and any possible implementation further provides an implementation, where after determining that the voltage of the terminal battery reaches the system operating voltage, the method further includes:
and acquiring the electric quantity information of the terminal and displaying the electric quantity information.
The above aspect and any possible implementation manner further provide an implementation manner, where the acquiring the power information of the terminal includes:
and operating the electric quantity detection program in the terminal so that the electric quantity detection program detects the charging current of the terminal, and acquiring the electric quantity information of the terminal according to the voltage of the terminal battery and the charging current.
The above aspect and any possible implementation manner further provide an implementation manner, where the displaying the time information includes:
lightening a terminal screen and displaying the time information through the screen; or,
and lightening other display areas except the terminal screen, and displaying the time information through the other display areas.
One of the above technical solutions has the following beneficial effects:
in the time display method provided by the embodiment of the invention, the voltage of the terminal battery is detected in the charging process of the terminal in the shutdown state, then, whether the voltage of the terminal battery reaches the system working voltage is judged, and if the voltage of the terminal battery reaches the system working voltage is determined, the time information of the real-time clock in the terminal is obtained and the time information is displayed. The embodiment of the invention can realize that the time information is displayed when the voltage of the terminal battery reaches the system working voltage in the charging process of the terminal in the shutdown state without adding an additional hardware circuit, and the user can check the time information without starting the terminal, thereby being simple, convenient and feasible, and solving the problems of complicated steps and low checking efficiency when checking the time information in the charging process of the terminal in the shutdown state in the existing display method.
In another aspect, an embodiment of the present invention provides a terminal, including:
the detection unit is used for detecting the voltage of the terminal battery in the charging process of the terminal in the shutdown state;
the judging unit is used for judging whether the voltage of the terminal battery reaches the system working voltage or not;
and the processing unit is used for acquiring the time information of the real-time clock in the terminal and displaying the time information if the voltage of the terminal battery is determined to reach the system working voltage.
The above-mentioned aspect and any possible implementation manner further provide an implementation manner, where the determining unit is specifically configured to:
comparing the voltage of the terminal battery with a preset voltage threshold, wherein the voltage threshold is smaller than the system working voltage;
and if the voltage of the terminal battery is greater than the voltage threshold, judging whether the voltage of the terminal battery reaches the system working voltage.
The above aspect and any possible implementation manner further provide an implementation manner, where the processing unit, when being configured to acquire time information of a real-time clock in the terminal, is specifically configured to:
and running a kernel program of an operating system in the terminal so that the kernel program of the operating system reads the time information of the real-time clock in the terminal.
The above aspect and any possible implementation manner further provide an implementation manner, and after determining that the voltage of the terminal battery reaches the system operating voltage, the processing unit is further configured to:
and acquiring the electric quantity information of the terminal and displaying the electric quantity information.
As for the above-mentioned aspect and any possible implementation manner, there is further provided an implementation manner, where the processing unit is configured to, when acquiring the power information of the terminal, specifically:
and operating the electric quantity detection program in the terminal so that the electric quantity detection program detects the charging current of the terminal, and acquiring the electric quantity information of the terminal according to the voltage of the terminal battery and the charging current.
The above aspect and any possible implementation manner further provide an implementation manner, where the display unit is configured to, when displaying the time information, specifically:
lightening a terminal screen and displaying the time information through the screen; or,
and lightening other display areas except the terminal screen, and displaying the time information through the other display areas.
One of the above technical solutions has the following beneficial effects:
in the terminal provided by the embodiment of the invention, the voltage of the terminal battery is detected by the detection unit in the terminal in the charging process of the terminal in the shutdown state, then the judgment unit in the terminal judges whether the voltage of the terminal battery reaches the system working voltage, and if the voltage of the terminal battery reaches the system working voltage, the processing unit in the terminal acquires the time information of the real-time clock in the terminal and displays the time information. The embodiment of the invention can realize that the time information is displayed when the voltage of the terminal battery reaches the system working voltage in the charging process of the terminal in the shutdown state without adding an additional hardware circuit, and the user can check the time information without starting the terminal, thereby being simple, convenient and feasible, and solving the problems of complicated steps and low checking efficiency when checking the time information in the charging process of the terminal in the shutdown state in the existing display method.
[ description of the drawings ]
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive labor.
Fig. 1 is a schematic flow chart of a first embodiment of a time display method according to an embodiment of the present invention;
fig. 2 is a schematic diagram of display contents of a terminal in the embodiment of the present invention;
fig. 3 is a flowchart illustrating a second embodiment of a time display method according to an embodiment of the present invention;
fig. 4 is a functional block diagram of a terminal according to an embodiment of the present invention.
[ detailed description ] embodiments
For better understanding of the technical solutions of the present invention, the following detailed descriptions of the embodiments of the present invention are provided with reference to the accompanying drawings.
It should be understood that the described embodiments are only some embodiments of the invention, and not all embodiments. 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 terminology used in the embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the examples of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be understood that the term "and/or" as used herein is merely one type of association that describes an associated object, meaning that three relationships may exist, e.g., a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination" or "in response to a detection", depending on the context. Similarly, the phrases "if determined" or "if detected (a stated condition or event)" may be interpreted as "when determined" or "in response to a determination" or "when detected (a stated condition or event)" or "in response to a detection (a stated condition or event)", depending on the context.
Example one
An embodiment of the present invention provides a time display method, please refer to fig. 1, which is a schematic flow chart of a first embodiment of the time display method provided in the embodiment of the present invention, as shown in fig. 1, the method includes the following steps:
s101, detecting the voltage of a terminal battery in the charging process of the terminal in the shutdown state.
Specifically, the charger or the power supply can supply power to the terminal by connecting a charging wire. In a shutdown state of the terminal, if the insertion of the charging wire is detected, a charging program can be started to supply power to the terminal.
In the embodiment of the invention, the voltage of the terminal battery is detected, so that whether the voltage reaches the system working voltage is judged according to the voltage of the terminal battery.
And S102, judging whether the voltage of the terminal battery reaches the system working voltage.
Specifically, in the embodiment of the present invention, it is determined whether the voltage of the terminal battery reaches the system operating voltage, so as to obtain the time information of the real-time clock in the terminal and display the obtained time information if the voltage of the terminal battery reaches the system operating voltage.
It should be noted that the system operating voltage is a voltage at which the terminal system can normally operate. The system working voltage can be preset according to actual needs, and the terminal system can start to work only when the voltage of the terminal battery reaches the system working voltage.
In one particular implementation, the system operating voltage may be 3.4V.
Specifically, the acquired voltage of the terminal battery is compared with the system operating voltage, and the voltage of the terminal battery may be compared with a preset voltage threshold, where the preset voltage threshold is smaller than the system operating voltage. And if the voltage of the terminal battery is greater than the voltage threshold, judging whether the voltage of the terminal battery reaches the system working voltage.
It should be noted that the voltage threshold may be preset according to actual needs, and this is not particularly limited in the embodiment of the present invention. For example, in one particular implementation, the voltage threshold may be 3.2V.
And if the voltage of the terminal battery is less than or equal to the voltage threshold, charging the terminal battery in a trickle charge mode. In this case, the charging current during charging may be controlled to be within 100mA, and the trickle charge charging method may be maintained until the voltage of the terminal battery reaches the voltage threshold.
Specifically, when the voltage of the terminal battery is greater than the voltage threshold and whether the voltage of the terminal battery reaches the system operating voltage is determined, the voltage of the terminal battery may be continuously compared with the system operating voltage.
If the voltage of the terminal battery is greater than or equal to the system working voltage, the voltage of the terminal battery is determined to reach the system working voltage, the terminal system starts to operate, and the terminal battery can be charged by a large charging current.
In addition, if the voltage of the terminal battery is smaller than the system working voltage, that is, the voltage of the terminal battery is between the preset voltage threshold and the system working voltage, at this time, it is determined that the voltage of the terminal battery does not reach the system working voltage, at this time, a second guiding charging program can be started to pre-charge the terminal battery, the charging current can be controlled within 500mA, and before the voltage of the terminal battery reaches the system working voltage, the pre-charging mode is kept unchanged, so that the service life and the safety of the battery are ensured.
For example, if the preset system operating voltage is 3.4V and the voltage threshold is 3.2V, after the voltage of the terminal battery is detected, the voltage of the terminal battery is first compared with the voltage threshold of 3.2V, and if the voltage of the terminal battery is greater than the voltage threshold of 3.2V, the voltage of the terminal battery is compared with the system operating voltage. Specifically, if the voltage of the terminal battery is detected to be 3.1V, trickle charging is started to be performed on the terminal battery at the moment, and the charging current can be 80 mA; with the increase of the charging time, if the voltage of the terminal battery is detected to be 3.23V, starting a second guiding charging program to pre-charge the terminal battery, wherein the charging current can be 400 mA; as the charging time continues to increase, if the voltage of the terminal battery is detected to be 3.4V, the terminal system starts to operate, and the terminal battery can be charged with a larger charging current.
And S103, if the voltage of the terminal battery is determined to reach the system working voltage, acquiring the time information of the real-time clock in the terminal, and displaying the time information.
Specifically, in the embodiment of the present invention, if it is determined that the voltage of the terminal battery reaches the system operating voltage, the time information of the real-time clock in the terminal may be obtained, and then the obtained time information may be displayed.
It should be noted that, in the embodiment of the present invention, the time information may include, but is not limited to: at least one of a current time, a solar calendar date, and a lunar calendar date.
In a specific implementation process, the time information of the real-time clock in the terminal is obtained, and the kernel program of the operating system in the terminal can be run, so that the kernel program of the operating system reads the time information of the real-time clock in the terminal.
It should be noted that, if the real-time clock in the terminal is an independent clock circuit, that is, an independent battery exists on a motherboard of the terminal to supply power to the real-time clock, when the battery power of the terminal is exhausted, the terminal is powered off and stops running, but the real-time clock can still run. That is, if the real-time clock is an independent clock circuit, even if the terminal is powered off due to battery power exhaustion, the real-time clock can still run and update the time. Therefore, the time information of the acquired real-time clock is the current correct time information. Or, if the real-time clock in the terminal is a non-independent clock circuit, that is, the real-time clock is powered by the terminal battery, and if the terminal battery is exhausted, the terminal is shut down and stops operating, and the real-time clock also stops operating. Therefore, the time information for acquiring the real-time clock may be the initial time information or the updated time information before the battery power of the terminal is exhausted. The embodiment of the present invention does not particularly limit how the real-time clock updates the time information.
Specifically, in the embodiment of the present invention, displaying the time information may include, but is not limited to, the following two implementation manners:
the first method comprises the following steps: and lightening a terminal screen and displaying the time information through the terminal screen.
In the embodiment of the present invention, when displaying time information on the lighted terminal screen, the time information may be displayed in a full screen, or may be displayed in a designated area on the lighted terminal screen, which is not particularly limited in the embodiment of the present invention.
And the second method comprises the following steps: and lighting other display areas except the terminal screen, and displaying the time information through the other display areas.
It should be understood that, in the embodiment of the present invention, other display areas besides the terminal screen, that is, other displayable areas in the terminal except the main screen, for example: edge curved screens, rear screens, etc.
It should be noted that a specific format of the displayed time information may be preset according to actual needs, and the description is given by taking 2015 year 5, month and 20 as an example, in the embodiment of the present invention, the date may be displayed in a format of "2015 year 5, month and 20," or may be displayed in a format of "2015-05-20," or may be displayed in a format of "2015-5-20," which is not particularly limited in the embodiment of the present invention.
Specifically, in the embodiment of the present invention, if it is determined that the voltage of the terminal battery reaches the system operating voltage, the electric quantity information of the terminal may also be obtained, and then the obtained electric quantity information may be displayed.
It should be noted that, in the embodiment of the present invention, the power information may include, but is not limited to, a current power of the terminal.
In a specific implementation process, the electric quantity information of the terminal is acquired by running an electric quantity detection program, so that the electric quantity detection program detects the charging current of the terminal, and the electric quantity information of the terminal is acquired according to the voltage and the charging current of the terminal battery.
It can be understood that, in the embodiment of the present invention, an implementation manner of displaying the electric quantity information of the terminal is consistent with an implementation manner of displaying the time information, which is not described in detail herein.
Please refer to fig. 2, which is a diagram illustrating display contents of a terminal according to an embodiment of the present invention.
As shown in fig. 2, in the charging process of the terminal in the shutdown state, if it is determined that the voltage of the terminal battery reaches the system operating voltage, the acquired time information and electric quantity information may be displayed on the terminal screen.
It should be noted that the terminal according to the embodiment of the present invention may include, but is not limited to, a Personal Computer (PC), a Personal Digital Assistant (PDA), a wireless handheld device, a Tablet Computer (Tablet Computer), a mobile phone, an MP3 player, an MP4 player, and the like.
It should be noted that the execution subjects of S101 to S103 may be time display devices, and the time display devices may be applications located in the local terminal, or may also be functional units such as a plug-in or a Software Development Kit (SDK) located in the applications located in the local terminal, which is not particularly limited in this embodiment of the present invention.
It should be understood that the application may be an application program (native app) installed on the terminal, or may also be a web page program (webApp) of a browser on the terminal, which is not limited in this embodiment of the present invention.
The time display method provided by the embodiment of the invention has the following beneficial effects:
according to the time display method provided by the embodiment of the invention, the voltage of the terminal battery is detected in the charging process of the terminal in the shutdown state, then, whether the voltage of the terminal battery reaches the system working voltage or not is judged, and if the voltage of the terminal battery reaches the system working voltage is determined, the time information of the real-time clock in the terminal is obtained and displayed. The embodiment of the invention can realize that the time information is displayed when the voltage of the terminal battery reaches the system working voltage in the charging process of the terminal in the shutdown state without adding an additional hardware circuit, and the user can check the time information without starting the terminal, thereby being simple, convenient and feasible, and solving the problems of complicated steps and low checking efficiency when checking the time information in the charging process of the terminal in the shutdown state in the existing display method.
Example two
Referring to fig. 3, it is a schematic flow chart of a second embodiment of the time display method according to the embodiment of the present invention, and as shown in fig. 3, the method includes the following steps:
s301, detecting the voltage of the terminal battery in the charging process of the terminal in the shutdown state.
S302, judging whether the voltage of the terminal battery reaches a preset voltage threshold value; if yes, executing S303; if not, go to step S304.
S303, judging whether the voltage of the terminal battery reaches the system working voltage or not; if yes, go to S305; if not, go to step S306.
S304, the terminal battery is charged in a trickle charge manner, and S301 is continuously executed.
S305, operating an operating system kernel program, and acquiring the time information of the real-time clock in the terminal.
S306, the terminal battery is charged in a pre-charged manner, and S301 is continuously executed.
And S307, operating the electric quantity detection program to acquire electric quantity information of the terminal.
And S308, lighting up a terminal screen, and displaying the time information and the electric quantity information on the screen.
The time display method provided by the embodiment of the invention has the following beneficial effects:
the time display method provided by the embodiment of the invention can realize that the time information is displayed when the voltage of the terminal battery reaches the system working voltage in the charging process of the terminal in the shutdown state without adding an additional hardware circuit, and a user can check the time information without starting the terminal, so that the time display method is simple, convenient and feasible, and solves the problems of complicated steps and low checking efficiency when the time information is checked in the charging process of the terminal in the shutdown state in the existing display method.
EXAMPLE III
Based on the time display method provided by the implementation, the embodiment of the invention further provides a terminal embodiment for realizing the steps and the method in the embodiment of the method.
Please refer to fig. 4, which is a functional block diagram of a terminal according to an embodiment of the present invention. As shown in fig. 4, the terminal includes:
a detection unit 41, configured to detect a voltage of a terminal battery during a charging process in a terminal shutdown state;
a judging unit 42 for judging whether the voltage of the terminal battery reaches the system operating voltage;
and the processing unit 43 is configured to, if it is determined that the voltage of the terminal battery reaches the system operating voltage, acquire time information of the real-time clock in the terminal, and display the time information.
Specifically, in the embodiment of the present invention, the determining unit 42 is specifically configured to:
comparing the voltage of the terminal battery with a preset voltage threshold, wherein the voltage threshold is smaller than the system working voltage;
and if the voltage of the terminal battery is greater than the voltage threshold, judging whether the voltage of the terminal battery reaches the system working voltage.
Specifically, in the embodiment of the present invention, when the processing unit 43 is configured to obtain time information of a real-time clock in the terminal, it is specifically configured to:
and running a kernel program of an operating system in the terminal so that the kernel program of the operating system reads the time information of the real-time clock in the terminal.
In a specific implementation, after determining that the voltage of the terminal battery reaches the system operating voltage, the processing unit 43 is further configured to:
and acquiring the electric quantity information of the terminal and displaying the electric quantity information.
Specifically, in the embodiment of the present invention, when the processing unit 43 is configured to obtain the power information of the terminal, it is specifically configured to:
and operating the electric quantity detection program in the terminal so that the electric quantity detection program detects the charging current of the terminal and acquires the electric quantity information of the terminal according to the voltage and the charging current of the terminal battery.
Specifically, in the embodiment of the present invention, when the processing unit 43 is configured to display the time information, it is specifically configured to:
lightening a terminal screen and displaying time information through the terminal screen; or,
and lighting other display areas except the terminal screen, and displaying the time information through the other display areas.
Since each unit in the present embodiment can execute the method shown in fig. 1, reference may be made to the related description of fig. 1 for a part of the present embodiment that is not described in detail.
The terminal provided by the embodiment of the invention has the following beneficial effects:
in the terminal provided by the embodiment of the invention, the voltage of the terminal battery is detected by the detection unit in the terminal in the charging process of the terminal in the shutdown state, then the judgment unit in the terminal judges whether the voltage of the terminal battery reaches the system working voltage, and if the voltage of the terminal battery reaches the system working voltage, the processing unit in the terminal acquires the time information of the real-time clock in the terminal and displays the time information. The embodiment of the invention can realize that the time information is displayed when the voltage of the terminal battery reaches the system working voltage in the charging process of the terminal in the shutdown state without adding an additional hardware circuit, and the user can check the time information without starting the terminal, thereby being simple, convenient and feasible, and solving the problems of complicated steps and low checking efficiency when checking the time information in the charging process of the terminal in the shutdown state in the existing display method.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present invention, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions in actual implementation, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) or a Processor (Processor) to execute some steps of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.