CN109828652B - Control method of power consumption mode and terminal equipment - Google Patents

Control method of power consumption mode and terminal equipment Download PDF

Info

Publication number
CN109828652B
CN109828652B CN201811604020.4A CN201811604020A CN109828652B CN 109828652 B CN109828652 B CN 109828652B CN 201811604020 A CN201811604020 A CN 201811604020A CN 109828652 B CN109828652 B CN 109828652B
Authority
CN
China
Prior art keywords
power consumption
consumption mode
ocp
value
current value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811604020.4A
Other languages
Chinese (zh)
Other versions
CN109828652A (en
Inventor
陈伟得
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN201811604020.4A priority Critical patent/CN109828652B/en
Publication of CN109828652A publication Critical patent/CN109828652A/en
Application granted granted Critical
Publication of CN109828652B publication Critical patent/CN109828652B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The embodiment of the invention discloses a control method of a power consumption mode and terminal equipment, relates to the technical field of communication, and aims to solve the problem that the prior art may influence the system stability of the terminal equipment. The method comprises the following steps: acquiring a first current value of a target function module in terminal equipment; switching the power consumption mode of the target function module from a first power consumption mode to a second power consumption mode if the first current value satisfies a first target condition, the first target condition including: the current value is greater than or equal to a first overcurrent protection OCP value, the OCP value corresponding to the first power consumption mode is the first OCP value, the OCP value corresponding to the second power consumption mode is a second OCP value, and the first OCP value is smaller than the second OCP value. The scheme is particularly applied to the scene of overcurrent protection, and the stability of the system can be improved to a certain extent.

Description

Control method of power consumption mode and terminal equipment
Technical Field
The embodiment of the invention relates to the technical field of communication, in particular to a power consumption mode control method and terminal equipment.
Background
With the continuous development of terminal technology, the functions of terminal equipment are more and more. In order to reasonably manage the power supply of the terminal equipment, reduce the power consumption of the terminal equipment and prolong the service life of the terminal equipment, the terminal equipment sets different power consumption modes for the power supply in different scenes. For example, in a standby situation, the terminal device sets a low power consumption mode for the power supply.
In addition, in order to ensure the safety of the power supply, an Over Current Protection (OCP) function is provided for the power supply. Different power consumption modes correspond to different OCP values. And the lower the power consumption of a power consumption mode is, the lower its corresponding OCP value is.
However, when the terminal device is in the low power consumption mode, sometimes, due to sudden increase of power consumption of a certain functional module, the current of the functional module increases and exceeds the OCP value corresponding to the low power consumption mode, so that the terminal device triggers the OCP function, and further, the system of the terminal device is crashed. Thus, the system stability of the terminal device will be affected.
Disclosure of Invention
The embodiment of the invention provides a control method of a power consumption mode and a terminal device, and aims to solve the problem of low system stability of the conventional terminal device.
In order to solve the technical problem, the invention is realized as follows:
in a first aspect, an embodiment of the present invention provides a method for controlling a power consumption mode, where the method includes:
acquiring a first current value of a target function module in terminal equipment;
switching the power consumption mode of the target function module from a first power consumption mode to a second power consumption mode if the first current value satisfies a first target condition, the first target condition including: the current value is greater than or equal to a first overcurrent protection OCP value, the OCP value corresponding to the first power consumption mode is the first OCP value, the OCP value corresponding to the second power consumption mode is a second OCP value, and the first OCP value is smaller than the second OCP value.
In a second aspect, an embodiment of the present invention provides a terminal device, where the terminal device includes: the device comprises an acquisition module and a switching module;
the acquisition module is used for acquiring a first current value of a target function module in the terminal equipment;
the switching module is configured to switch the power consumption mode of the target function module from a first power consumption mode to a second power consumption mode when the first current value obtained by the obtaining module satisfies a first target condition, where the first target condition includes: the current value is greater than or equal to a first overcurrent protection OCP value, the OCP value corresponding to the first power consumption mode is the first OCP value, the OCP value corresponding to the second power consumption mode is a second OCP value, and the first OCP value is smaller than the second OCP value.
In a third aspect, an embodiment of the present invention provides a terminal device, which includes a processor, a memory, and a computer program stored on the memory and operable on the processor, and when executed by the processor, the computer program implements the steps of the method for controlling the power consumption mode in the first aspect.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the steps of the method for controlling the power consumption mode as in the first aspect.
In the embodiment of the invention, the terminal equipment can obtain a first current value of a target function module in the terminal equipment; switching the power consumption mode of the target function module from a first power consumption mode to a second power consumption mode if the first current value satisfies a first target condition, the first target condition including: the current value is greater than or equal to a first overcurrent protection OCP value, the OCP value corresponding to the first power consumption mode is the first OCP value, the OCP value corresponding to the second power consumption mode is a second OCP value, and the first OCP value is smaller than the second OCP value. Through the scheme, when the power consumption of the target function module is increased suddenly and the current of the target function module exceeds the OCP value corresponding to the low power consumption mode, the power consumption mode of the target function module is switched from the low power consumption mode to the high power consumption mode by the terminal equipment, the OCP function is prevented from being triggered by the terminal equipment to a certain extent, and the system breakdown of the terminal equipment is caused.
Drawings
Fig. 1 is a schematic structural diagram of an android operating system according to an embodiment of the present invention;
fig. 2 is a flowchart of a method for controlling a power consumption mode according to an embodiment of the present invention;
fig. 3 is a second flowchart of a method for controlling a power consumption mode according to an embodiment of the present invention;
fig. 4 is a third flowchart of a method for controlling a power consumption mode according to an embodiment of the present invention;
FIG. 5 is a fourth flowchart of a method for controlling power consumption modes according to an embodiment of the present invention;
fig. 6 is a fifth flowchart of a control method of power consumption modes according to an embodiment of the present invention;
fig. 7 is a sixth flowchart of a control method of power consumption modes according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a terminal device according to an embodiment of the present invention;
fig. 9 is a second schematic structural diagram of a terminal device according to an embodiment of the present invention;
fig. 10 is a hardware schematic diagram of a terminal device according to an embodiment of the present invention.
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 terms "first," "second," "third," and "fourth," etc. in the description and in the claims of the present invention are used for distinguishing between different objects and not for describing a particular order of the objects. For example, the first power consumption mode, the second power consumption mode, the third power consumption mode, the fourth power consumption mode, and the like are for distinguishing different power consumption modes, not for describing a specific order of the power consumption modes.
In the embodiments of the present invention, words such as "exemplary" or "for example" are used to mean serving as examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "e.g.," an embodiment of the present invention is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the word "exemplary" or "such as" is intended to present concepts related in a concrete fashion.
In the description of the embodiments of the present invention, unless otherwise specified, "a plurality" means two or more, for example, a plurality of processing units means two or more processing units; plural elements means two or more elements, and the like.
The embodiment of the invention provides a control method of a power consumption mode, wherein terminal equipment can obtain a first current value of a target function module in the terminal equipment; switching the power consumption mode of the target function module from a first power consumption mode to a second power consumption mode if the first current value satisfies a first target condition, the first target condition including: the current value is greater than or equal to a first overcurrent protection OCP value, the OCP value corresponding to the first power consumption mode is the first OCP value, the OCP value corresponding to the second power consumption mode is a second OCP value, and the first OCP value is smaller than the second OCP value. Through the scheme, when the power consumption of the target function module is increased suddenly and the current of the target function module exceeds the OCP value corresponding to the low power consumption mode, the power consumption mode of the target function module is switched from the low power consumption mode to the high power consumption mode by the terminal equipment, the OCP function is prevented from being triggered by the terminal equipment to a certain extent, and the system breakdown of the terminal equipment is caused.
Next, a software environment applied to the method for controlling the power consumption mode according to the embodiment of the present invention is described by taking an android operating system as an example.
Fig. 1 is a schematic diagram of an architecture of a possible android operating system according to an embodiment of the present invention. In fig. 1, the architecture of the android operating system includes 4 layers, which are respectively: an application layer, an application framework layer, a system runtime layer, and a kernel layer (specifically, a Linux kernel layer).
The application program layer comprises various application programs (including system application programs and third-party application programs) in an android operating system.
The application framework layer is a framework of the application, and a developer can develop some applications based on the application framework layer under the condition of complying with the development principle of the framework of the application.
The system runtime layer includes libraries (also called system libraries) and android operating system runtime environments. The library mainly provides various resources required by the android operating system. The android operating system running environment is used for providing a software environment for the android operating system.
The kernel layer is an operating system layer of an android operating system and belongs to the bottommost layer of an android operating system software layer. The kernel layer provides kernel system services and hardware-related drivers for the android operating system based on the Linux kernel.
Taking an android operating system as an example, in the embodiment of the present invention, a developer may develop a software program for implementing the control method of the power consumption mode provided in the embodiment of the present invention based on the system architecture of the android operating system shown in fig. 1, so that the control method of the power consumption mode may run based on the android operating system shown in fig. 1. That is, the processor or the terminal may implement the control method of the power consumption mode provided by the embodiment of the present invention by running the software program in the android operating system.
The terminal device in the embodiment of the invention can be a mobile terminal device and can also be a non-mobile terminal device. The mobile terminal device may be a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a Personal Digital Assistant (PDA), etc.; the non-mobile terminal device may be a Personal Computer (PC), a Television (TV), a teller machine, a self-service machine, or the like; the embodiments of the present invention are not particularly limited.
The execution main body of the power consumption mode control method provided by the embodiment of the present invention may be the terminal device (including a mobile terminal device and a non-mobile terminal device), or may also be a functional module and/or a functional entity capable of implementing the method in the terminal device, and may be specifically determined according to actual use requirements, which is not limited in the embodiment of the present invention. The following takes a terminal device as an example to exemplarily describe the control method of the power consumption mode provided by the embodiment of the present invention.
Referring to fig. 2, an embodiment of the present invention provides a method for controlling a power consumption mode, which may include steps 201 to 203 described below.
Step 201, the terminal device obtains a first current value of a target function module in the terminal device.
In the embodiment of the invention, the target function module at least has two different power consumption modes, and the power consumption of the target function module in the different power consumption modes is different. The target function module may be at least one of a radio frequency unit, a network module, an audio output unit, an input unit, a sensor, a display unit, a user input unit, an interface unit, a memory, a processor, and the like in the terminal device, which is determined according to actual design requirements, and the embodiment of the present invention is not limited.
For example, when the terminal device is in a standby state or in other scenarios where a large current is not required, the terminal device may set the power consumption mode of a part of the function modules (target function modules) to a low power consumption mode (first power consumption mode).
Specifically, as for the method for acquiring the first current of the target function module by the terminal device, reference may be made to a related method in the prior art, and the embodiment of the present invention is not limited thereto. For example, any current protection circuit may be used to obtain the first current.
Step 202 (optional), the terminal device determines whether the first current value satisfies a first target condition.
In a case where the first current value satisfies the first target condition, the terminal device executes step 203 described below; otherwise, no processing is performed.
Step 203, the terminal device switches the power consumption mode of the target function module from the first power consumption mode to the second power consumption mode.
And under the condition that the first current value meets a first target condition, the terminal equipment switches the power consumption mode of the target function module from the first power consumption mode to the second power consumption mode.
The first power consumption mode is any one of the power consumption modes except the power consumption mode with the largest power consumption among all the power consumption modes of the target functional module. The power consumption of the target functional module in the second power consumption mode is greater than the power consumption of the target functional module in the first power consumption mode.
For a specific method for switching the power consumption mode of the target function module from the first power consumption mode to the second power consumption mode by the terminal device, reference may be made to related methods in the prior art, and the embodiment of the present invention is not limited thereto.
Therefore, the safety of the terminal equipment is ensured, the breakdown probability of the terminal equipment is avoided, and the stability of the system is improved.
The first target condition includes: the current value is greater than or equal to a first overcurrent protection OCP value, the OCP value corresponding to the first power consumption mode is the first OCP value, the OCP value corresponding to the second power consumption mode is a second OCP value, and the first OCP value is smaller than the second OCP value.
For example, if the first target condition is that the current value is greater than or equal to the first over-current protection OCP value, the step 202 can be specifically implemented by the following step 202a, as shown in fig. 3 in conjunction with fig. 2.
Step 202a (optional), the terminal device determines whether the first current value is greater than or equal to the first over-current protection OCP value.
The specific terminal equipment judges whether the first current value is larger than or equal to the first OCP value or not by comparing the first current value with the first OCP value.
The specific method can refer to any existing method with a large size, and the embodiment of the invention is not limited. For example, if the determination process is implemented by a hardware circuit, the magnitude of the first current value and the magnitude of the first OCP value may be compared by a current comparator.
If the first current value is greater than or equal to the first over-current protection OCP value, the terminal device executes step 203; and if the first current value is smaller than the first overcurrent protection OCP value, the terminal equipment does not change the power consumption mode of the target function module.
The step 203 specifically includes: and under the condition that the first current value is greater than or equal to the first over-current protection OCP value, the terminal equipment switches the power consumption mode of the target function module from the first power consumption mode to the second power consumption mode.
For example, when the terminal device determines that the first current value is greater than or equal to the first overcurrent protection OCP value, the terminal device is triggered to switch the power consumption mode of the target function module from the first power consumption mode to the second power consumption mode by an output enable signal (the flag bit may be 0 or 1 if the terminal device is implemented by software, or the flag bit may be high or low if the terminal device is implemented by hardware, or the like).
After the terminal device switches the power consumption mode of the target function module from the first power consumption mode to the second power consumption mode, if the first current value is greater than or equal to the second OCP value, the terminal device may continue to switch the power consumption mode of the target function module to the power consumption mode with a larger OCP value (which may be a step-by-step switch or a cross-step switch, which is not limited in the embodiments of the present invention, for example, switch from the second power consumption mode to the third power consumption mode, the second power consumption mode is not the power consumption mode with the largest power consumption among all the power consumption modes of the target function module, until the power consumption mode of the target function module is switched to the power consumption mode corresponding to the OCP value with the smaller first current value, and if the terminal device switches the power consumption mode of the target function module to the power consumption mode with the largest power consumption, the first current value is greater than or equal to the OCP value corresponding to the largest power consumption mode, the terminal device may stop supplying power to the function module.
For example, the second power consumption mode is a power consumption mode with the largest power consumption among all power consumption modes of the target functional module, and as shown in fig. 4 in conjunction with fig. 3, after step 203, the method for controlling the power consumption mode according to the embodiment of the present invention may further include the following steps 204 to 205.
Step 204 (optional), the terminal device determines whether the first current value is greater than or equal to the second OCP value.
The specific terminal equipment judges whether the first current value is larger than or equal to the second OCP value or not by comparing the first current value with the second OCP value.
The specific method can refer to any existing method with a large size, and the embodiment of the invention is not limited. For example, if the determination process is implemented by a hardware circuit, the magnitude of the first current value and the magnitude of the second OCP value may be compared by a current comparator.
If the first current value is greater than or equal to the second OCP value and the second power consumption mode is the power consumption mode with the maximum power consumption among all the power consumption modes of the target functional module, it indicates that the power consumption mode of the target functional module is the power consumption mode with the maximum power consumption, and the terminal device cannot continue to switch (adjust), and then executes the following step 205; if the first current value is smaller than the second OCP value, it is not limited herein.
And step 205, the terminal equipment stops supplying power to the target function module.
And under the condition that the first current value is larger than or equal to the second OCP value, the terminal equipment stops supplying power to the target function module. I.e. to cut off the power supply to the target functional module. Powering off the target function module may cause the terminal device to crash, for example, causing a system restart of the terminal device or causing the terminal device to shut down.
When the power consumption mode of the target function module is switched to the power consumption mode with the maximum power consumption, if the first current value is greater than or equal to the OCP value corresponding to the power consumption mode with the maximum power consumption, it indicates that the previous power consumption mode cannot be switched any more, and at this time, in order to ensure the safety of a circuit, a power supply and the like, the power supply of the target function module needs to be stopped.
Optionally, the first target condition further includes: the current value is less than the second OCP value.
For example, if the first target condition is that the current value is greater than or equal to the first over-current protection OCP value and the current value is less than the second OCP value, the step 202 can be specifically implemented by the following step 202b, as shown in fig. 5 in conjunction with fig. 2.
In step 202b (optional), the terminal device determines whether the first current value is greater than or equal to the first overcurrent protection OCP value and smaller than the second OCP value.
The terminal equipment judges whether the first current value is larger than or equal to the first OCP value and smaller than the second OCP value by comparing the first current value with the first OCP value and comparing the first current value with the second OCP value.
The specific implementation method can refer to any existing method with a large size, and the embodiment of the invention is not limited. For example, if the determination process is implemented by a hardware circuit, the first current value and the first OCP value may be compared by a current comparator, and the first current value and the second OCP value may be compared by a current comparator.
If the first current value is greater than or equal to the first overcurrent protection OCP value and less than the second OCP value, the terminal device executes step 203; if the first current value is smaller than the first overcurrent protection OCP value, the terminal equipment does not change the power consumption mode of the target function module; if the first current value is greater than the second OCP value, it is not limited herein.
The step 203 specifically includes: and under the condition that the first current value is greater than or equal to the first over-current protection OCP value and the first current value is smaller than the second OCP value, the terminal equipment switches the power consumption mode of the target function module from the first power consumption mode to the second power consumption mode.
Illustratively, when the terminal device determines that the first current value is greater than or equal to the first overcurrent protection OCP value and less than the second OCP value, the terminal device is triggered to switch the power consumption mode of the target function module from the first power consumption mode to the second power consumption mode by an output enable signal (the flag bit is 0 or 1 if the current value is software implementation, the flag bit is high level or low level if the current value is hardware implementation, or the like).
Therefore, the terminal equipment can accurately judge whether the power consumption mode of the target function module is switched, and the power consumption mode is switched to, or the power supply to the target function module is stopped. Compared with the method provided by the steps 202a to 203, the method can be switched to the corresponding power consumption mode in one step, or the power supply to the target function module is stopped.
For example, referring to fig. 5, as shown in fig. 6, after the step 202b determines that the first current value is not greater than or equal to the first OCP value and is less than the second OCP value, the method for controlling the power consumption mode according to the embodiment of the present invention may further include the following steps 206 to 207.
In step 206 (optional), the terminal device determines whether the first current value is greater than or equal to the third OCP value.
And the specific terminal equipment judges whether the first current value is greater than or equal to the third OCP value or not by comparing the first current value with the third OCP value.
The specific method can refer to any existing method with a large size, and the embodiment of the invention is not limited. For example, if the determination process is implemented by a hardware circuit, the magnitude of the first current value and the magnitude of the third OCP value may be compared by a current comparator.
The third OCP value is an OCP value corresponding to a third power consumption mode, the third power consumption mode is a power consumption mode with the largest power consumption in all power consumption modes of the target function module, and the first OCP value is smaller than the third OCP value.
If the first current value is greater than or equal to the third OCP value, it indicates that the first current value is greater than the OCP value corresponding to any power consumption mode of the target functional module, and the terminal device executes step 207 described below.
And step 207, the terminal equipment stops supplying power to the target function module.
And under the condition that the first current value is larger than or equal to the third OCP value, the terminal equipment stops supplying power to the target function module.
If the first current value is greater than or equal to the OCP value corresponding to the power consumption mode with the maximum power consumption, the power supply is cut off to stop supplying power to the target function module in order to ensure the safety of the circuit, the power supply and the like.
Compared with the method provided in the steps 204 to 205, the method can directly judge whether the power supply to the target function module needs to be stopped, and when the power supply to the target function module needs to be stopped, the method can quickly judge and cut off the power supply, so that the safety of the target function module or the power supply is ensured, and the safety of the terminal equipment is improved.
Illustratively, in conjunction with fig. 2, as shown in fig. 7, after step 203, the method for controlling the power consumption mode according to the embodiment of the present invention may further include steps 208 to 210 described below.
And step 208, after the preset time length, the terminal device acquires the first current value again.
The preset time length is preset in advance by the terminal device, and the preset time length can be any feasible time length and is specifically set according to actual needs, and the embodiment of the invention is not limited.
The first current value obtained again is the current value obtained by the terminal device at the same position but different time points.
The method for the terminal device to reacquire the first current value refers to the method for the terminal device to acquire the first current value, and is not described herein again.
Step 209 (optional), the terminal device determines whether the retrieved first current value is less than or equal to the first OCP value.
And the terminal equipment judges whether the first current value is smaller than the first OCP value or not by comparing the first current value with the first OCP value.
The specific implementation method can refer to any existing method with a large size, and the embodiment of the invention is not limited. For example, if the determination process is implemented by a hardware circuit, the magnitude of the first current value and the magnitude of the first OCP value may be compared by a current comparator.
If the retrieved first current value is less than or equal to the first OCP value, the terminal device performs step 210 described below; if the retrieved first current value is greater than the first OCP value, this is not limited herein.
Step 210, the terminal device switches the power consumption mode of the target function module from the second power consumption mode to the first power consumption mode.
And under the condition that the obtained first current value is less than or equal to the first OCP value, the terminal equipment switches the power consumption mode of the target function module from the second power consumption mode to the first power consumption mode.
The second power consumption mode is switched to the first power consumption mode, for example, the working mode can be changed from a pulse width modulation mode to a pulse density modulation mode, so that the power supply capacity of the power supply can be reduced, and the power consumption of the target functional module can be reduced.
Therefore, when the first current value obtained again after the preset duration is smaller than the first OCP value, the fact that the first current value exceeds the first OCP value only accidentally and temporarily is indicated, and the power consumption mode of the target function module is switched from the second power consumption mode to the first power consumption mode, so that the power consumption of the terminal device is reduced, and electric energy can be saved.
It should be noted that: the control method of the power consumption mode provided by the embodiment of the invention can reduce the probability of terminal equipment breakdown (system restart or crash) and improve the stability of the system; moreover, the production requirement on the power management chip (IC) can be reduced, the yield of the power management chip is improved, and the production cost of the power management chip is reduced. The control method of the power consumption mode provided by the embodiment of the present invention may be implemented by software, or may be implemented by a hardware circuit, and may be, for example, any hardware circuit that can use the above method as a working principle, and the embodiment of the present invention is not limited.
The embodiment of the invention provides a control method of a power consumption mode, wherein terminal equipment can obtain a first current value of a target function module in the terminal equipment; switching the power consumption mode of the target function module from a first power consumption mode to a second power consumption mode if the first current value satisfies a first target condition, the first target condition including: the current value is greater than or equal to a first overcurrent protection OCP value, the OCP value corresponding to the first power consumption mode is the first OCP value, the OCP value corresponding to the second power consumption mode is a second OCP value, and the first OCP value is smaller than the second OCP value. Through the scheme, when the power consumption of the target function module is increased suddenly and the current of the target function module exceeds the OCP value corresponding to the low power consumption mode, the power consumption mode of the target function module is switched from the low power consumption mode to the high power consumption mode by the terminal equipment, the OCP function is prevented from being triggered by the terminal equipment to a certain extent, and the system breakdown of the terminal equipment is caused.
As shown in fig. 8, an embodiment of the present invention provides a terminal device 120, where the terminal device 120 includes: an acquisition module 121 and a switching module 122;
the obtaining module 121 is configured to obtain a first current value of a target function module in the terminal device;
the switching module 122 is configured to switch the power consumption mode of the target functional module from the first power consumption mode to the second power consumption mode when the first current value obtained by the obtaining module 121 satisfies a first target condition, where the first target condition includes: the current value is greater than or equal to a first overcurrent protection OCP value, the OCP value corresponding to the first power consumption mode is the first OCP value, the OCP value corresponding to the second power consumption mode is a second OCP value, and the first OCP value is smaller than the second OCP value.
Optionally, the first target condition further includes: the current value is less than the second OCP value.
Optionally, with reference to fig. 8, as shown in fig. 9, the terminal device 120 further includes: a power supply module 123; the power supply module 123 is configured to, after the first current value of the target function module in the terminal device is obtained, stop supplying power to the target function module when the first current value obtained by the obtaining module 121 is greater than or equal to a third OCP value, where the third OCP value is an OCP value corresponding to a third power consumption mode, the third power consumption mode is a power consumption mode with the largest power consumption in all power consumption modes of the target function module, and the first OCP value is smaller than the third OCP value.
Optionally, the obtaining module 121 is further configured to, after the first power consumption mode is switched to the second power consumption mode and after a preset time period, obtain the first current value again; the switching module 122 is further configured to switch the power consumption mode of the target function module from the second power consumption mode to the first power consumption mode when the first current value obtained again by the obtaining module 121 is less than or equal to the first OCP value.
Optionally, the second power consumption mode is a power consumption mode with the highest power consumption in all power consumption modes of the target functional module; referring to fig. 8, as shown in fig. 9, the terminal device 120 further includes: a power supply module 123; the power supply module 123 is configured to stop supplying power to the target function module when the first current value obtained by the obtaining module 121 is greater than or equal to the second OCP value after the power consumption mode of the target function module is switched from the first power consumption mode to the second power consumption mode.
The terminal device provided in the embodiment of the present invention can implement each process shown in any one of fig. 2 to 7 in the above method embodiments, and details are not described here again to avoid repetition.
The embodiment of the invention provides a terminal device, which can obtain a first current value of a target function module in the terminal device; switching the power consumption mode of the target function module from a first power consumption mode to a second power consumption mode if the first current value satisfies a first target condition, the first target condition including: the current value is greater than or equal to a first overcurrent protection OCP value, the OCP value corresponding to the first power consumption mode is the first OCP value, the OCP value corresponding to the second power consumption mode is a second OCP value, and the first OCP value is smaller than the second OCP value. Through the scheme, when the power consumption of the target function module is increased suddenly and the current of the target function module exceeds the OCP value corresponding to the low power consumption mode, the power consumption mode of the target function module is switched from the low power consumption mode to the high power consumption mode by the terminal equipment, the OCP function is prevented from being triggered by the terminal equipment to a certain extent, and the system breakdown of the terminal equipment is caused.
Fig. 10 is a schematic diagram of a hardware structure of a terminal device for implementing various embodiments of the present invention. As shown in fig. 10, the terminal device 100 includes, but is not limited to: radio frequency unit 101, network module 102, audio output unit 103, input unit 104, sensor 105, display unit 106, user input unit 107, interface unit 108, memory 109, processor 110, and power supply 111. Those skilled in the art will appreciate that the terminal device configuration shown in fig. 10 is not intended to be limiting, and that terminal devices may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components. In the embodiment of the present invention, the terminal device includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal device, a wearable device, a pedometer, and the like.
The processor 110 is configured to obtain a first current value of a target function module in the terminal device; switching the power consumption mode of the target function module from a first power consumption mode to a second power consumption mode if the first current value satisfies a first target condition, the first target condition including: the current value is greater than or equal to a first overcurrent protection OCP value, the OCP value corresponding to the first power consumption mode is the first OCP value, the OCP value corresponding to the second power consumption mode is a second OCP value, and the first OCP value is smaller than the second OCP value.
According to the terminal device provided by the embodiment of the invention, the terminal device can obtain a first current value of a target function module in the terminal device; switching the power consumption mode of the target function module from a first power consumption mode to a second power consumption mode if the first current value satisfies a first target condition, the first target condition including: the current value is greater than or equal to a first overcurrent protection OCP value, the OCP value corresponding to the first power consumption mode is the first OCP value, the OCP value corresponding to the second power consumption mode is a second OCP value, and the first OCP value is smaller than the second OCP value. Through the scheme, when the power consumption of the target function module is increased suddenly and the current of the target function module exceeds the OCP value corresponding to the low power consumption mode, the power consumption mode of the target function module is switched from the low power consumption mode to the high power consumption mode by the terminal equipment, the OCP function is prevented from being triggered by the terminal equipment to a certain extent, and the system breakdown of the terminal equipment is caused.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 101 may be used for receiving and sending signals during a message transmission or call process, and specifically, after receiving downlink data from a base station, the downlink data is processed by the processor 110; in addition, the uplink data is transmitted to the base station. Typically, radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 101 can also communicate with a network and other devices through a wireless communication system.
The terminal device provides wireless broadband internet access to the user through the network module 102, such as helping the user send and receive e-mails, browse webpages, access streaming media, and the like.
The audio output unit 103 may convert audio data received by the radio frequency unit 101 or the network module 102 or stored in the memory 109 into an audio signal and output as sound. Also, the audio output unit 103 may also provide audio output related to a specific function performed by the terminal device 100 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 103 includes a speaker, a buzzer, a receiver, and the like.
The input unit 104 is used to receive an audio or video signal. The input Unit 104 may include a Graphics Processing Unit (GPU) 1041 and a microphone 1042, and the Graphics processor 1041 processes image data of a still picture or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 106. The image frames processed by the graphic processor 1041 may be stored in the memory 109 (or other storage medium) or transmitted via the radio frequency unit 101 or the network module 102. The microphone 1042 may receive sound and may be capable of processing such sound into audio data. The processed audio data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 101 in case of a phone call mode.
The terminal device 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 1061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 1061 and/or the backlight when the terminal device 100 is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used to identify the terminal device posture (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration identification related functions (such as pedometer, tapping), and the like; the sensors 105 may also include fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., which are not described in detail herein.
The display unit 106 is used to display information input by a user or information provided to the user. The Display unit 106 may include a Display panel 1061, and the Display panel 1061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 107 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the terminal device. Specifically, the user input unit 107 includes a touch panel 1071 and other input devices 1072. Touch panel 1071, also referred to as a touch screen, may collect touch operations by a user on or near the touch panel 1071 (e.g., operations by a user on or near touch panel 1071 using a finger, stylus, or any suitable object or attachment). The touch panel 1071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 110, and receives and executes commands sent by the processor 110. In addition, the touch panel 1071 may be implemented in various types, such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 1071, the user input unit 107 may include other input devices 1072. Specifically, other input devices 1072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail herein.
Further, the touch panel 1071 may be overlaid on the display panel 1061, and when the touch panel 1071 detects a touch operation thereon or nearby, the touch panel 1071 transmits the touch operation to the processor 110 to determine the type of the touch event, and then the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of the touch event. Although in fig. 10, the touch panel 1071 and the display panel 1061 are two independent components to implement the input and output functions of the terminal device, in some embodiments, the touch panel 1071 and the display panel 1061 may be integrated to implement the input and output functions of the terminal device, and is not limited herein.
The interface unit 108 is an interface for connecting an external device to the terminal apparatus 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 108 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the terminal apparatus 100 or may be used to transmit data between the terminal apparatus 100 and the external device.
The memory 109 may be used to store software programs as well as various data. The memory 109 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 109 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 110 is a control center of the terminal device, connects various parts of the entire terminal device by using various interfaces and lines, and performs various functions of the terminal device and processes data by running or executing software programs and/or modules stored in the memory 109 and calling data stored in the memory 109, thereby performing overall monitoring of the terminal device. Processor 110 may include one or more processing units; alternatively, the processor 110 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 110.
The terminal device 100 may further include a power supply 111 (such as a battery) for supplying power to each component, and optionally, the power supply 111 may be logically connected to the processor 110 through a power management system, so as to implement functions of managing charging, discharging, and power consumption through the power management system.
In addition, the terminal device 100 includes some functional modules that are not shown, and are not described in detail here.
Optionally, an embodiment of the present invention further provides a terminal device, which may include the processor 110 shown in fig. 10, the memory 109, and a computer program stored on the memory 109 and capable of being executed on the processor 110, where the computer program, when executed by the processor 110, implements each process of the control method for power consumption mode shown in any one of fig. 2 to fig. 7 in the foregoing method embodiments, and can achieve the same technical effect, and in order to avoid repetition, details are not described here again.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the control method for the power consumption mode shown in any one of fig. 2 to 7 in the foregoing method embodiments, and can achieve the same technical effect, and in order to avoid repetition, details are not described here again. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (12)

1. A method for controlling a power consumption mode, the method comprising:
acquiring a first current value of a target function module in terminal equipment;
switching the power consumption mode of the target functional module from a first power consumption mode to a second power consumption mode if the first current value satisfies a first target condition, the first target condition including: the current value is greater than or equal to a first overcurrent protection OCP value, the OCP value corresponding to the first power consumption mode is a first OCP value, the OCP value corresponding to the second power consumption mode is a second OCP value, and the first OCP value is smaller than the second OCP value; the target function module has at least two different power consumption modes, and the power consumption of the target function module is different in the different power consumption modes.
2. The method of claim 1, wherein the first target condition further comprises: the current value is less than the second OCP value.
3. The method of claim 2, wherein after obtaining the first current value of the target function module in the terminal device, the method further comprises:
and under the condition that the first current value is larger than or equal to a third OCP value, stopping supplying power to the target function module, wherein the third OCP value is an OCP value corresponding to a third power consumption mode, the third power consumption mode is a power consumption mode with the maximum power consumption in all power consumption modes of the target function module, and the first OCP value is smaller than the third OCP value.
4. The method of claim 1 or 2, wherein after switching the power consumption mode of the target functional module from the first power consumption mode to the second power consumption mode, further comprising:
after the preset duration, the first current value is obtained again;
switching the power consumption mode of the target functional module from the second power consumption mode to the first power consumption mode when the retrieved first current value is less than or equal to the first OCP value.
5. The method according to claim 1, wherein the second power consumption mode is a power consumption mode with the largest power consumption in all power consumption modes of the target functional module;
after the power consumption mode of the target function module is switched from the first power consumption mode to the second power consumption mode, the method further comprises the following steps:
and stopping supplying power to the target function module when the first current value is larger than or equal to the second OCP value.
6. A terminal device, characterized in that the terminal device comprises: the device comprises an acquisition module and a switching module;
the acquisition module is used for acquiring a first current value of a target function module in the terminal equipment;
the switching module is configured to switch the power consumption mode of the target function module from a first power consumption mode to a second power consumption mode when the first current value obtained by the obtaining module meets a first target condition, where the first target condition includes: the current value is greater than or equal to a first overcurrent protection OCP value, the OCP value corresponding to the first power consumption mode is a first OCP value, the OCP value corresponding to the second power consumption mode is a second OCP value, and the first OCP value is smaller than the second OCP value; the target function module has at least two different power consumption modes, and the power consumption of the target function module is different in the different power consumption modes.
7. The terminal device of claim 6, wherein the first target condition further comprises: the current value is less than the second OCP value.
8. The terminal device according to claim 7, wherein the terminal device further comprises: a power supply module;
the power supply module is used for stopping supplying power to the target function module after the first current value of the target function module in the terminal device is obtained and under the condition that the first current value obtained by the obtaining module is larger than or equal to a third OCP value, the third OCP value is an OCP value corresponding to a third power consumption mode, the third power consumption mode is a power consumption mode with the maximum power consumption in all power consumption modes of the target function module, and the first OCP value is smaller than the third OCP value.
9. The terminal device according to claim 6 or 7,
the obtaining module is further configured to obtain the first current value again after a preset duration after the power consumption mode of the target function module is switched from the first power consumption mode to the second power consumption mode;
the switching module is further configured to switch the power consumption mode of the target function module from the second power consumption mode to the first power consumption mode when the first current value obtained again by the obtaining module is less than or equal to the first OCP value.
10. The terminal device according to claim 6, wherein the second power consumption mode is a power consumption mode with the largest power consumption from all power consumption modes of the target function module; the terminal device further includes: a power supply module;
the power supply module is configured to stop supplying power to the target function module when the first current value obtained by the obtaining module is greater than or equal to the second OCP value after the power consumption mode of the target function module is switched from the first power consumption mode to the second power consumption mode.
11. A terminal device, characterized in that it comprises a processor, a memory and a computer program stored on said memory and executable on said processor, said computer program, when executed by said processor, implementing the steps of the method for controlling the power consumption mode according to any one of claims 1 to 5.
12. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of the method of controlling the power consumption mode according to any one of claims 1 to 5.
CN201811604020.4A 2018-12-26 2018-12-26 Control method of power consumption mode and terminal equipment Active CN109828652B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811604020.4A CN109828652B (en) 2018-12-26 2018-12-26 Control method of power consumption mode and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811604020.4A CN109828652B (en) 2018-12-26 2018-12-26 Control method of power consumption mode and terminal equipment

Publications (2)

Publication Number Publication Date
CN109828652A CN109828652A (en) 2019-05-31
CN109828652B true CN109828652B (en) 2021-03-05

Family

ID=66861261

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811604020.4A Active CN109828652B (en) 2018-12-26 2018-12-26 Control method of power consumption mode and terminal equipment

Country Status (1)

Country Link
CN (1) CN109828652B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116667268A (en) * 2022-12-15 2023-08-29 荣耀终端有限公司 Method for preventing triggering over-current protection and electronic equipment

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107567080A (en) * 2017-08-24 2018-01-09 广东欧珀移动通信有限公司 Reduce the method and terminal device of power consumption

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5870763B2 (en) * 2012-03-02 2016-03-01 ミツミ電機株式会社 Secondary battery monitoring device and battery pack
WO2015079562A1 (en) * 2013-11-29 2015-06-04 株式会社 東芝 Electronic device and inter-electronic device power supply control method
US10355505B2 (en) * 2014-03-10 2019-07-16 Dell Products L.P. Method for adapter over-current-protection (OCP) protection and user warning
CN106648013A (en) * 2016-09-28 2017-05-10 华为技术有限公司 Overcurrent point configuration method and apparatus, and overcurrent protection apparatus
CN106814835A (en) * 2016-12-11 2017-06-09 乐视控股(北京)有限公司 A kind of over-current protection method, device and electronic equipment
CN106648020A (en) * 2017-01-05 2017-05-10 郑州云海信息技术有限公司 Method and apparatus for preventing over-current protection malfunction
CN107239129A (en) * 2017-06-28 2017-10-10 联想(北京)有限公司 The power control method and device of a kind of electronic equipment

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107567080A (en) * 2017-08-24 2018-01-09 广东欧珀移动通信有限公司 Reduce the method and terminal device of power consumption

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Mobile battery energy storage systems influence on overcurrent protection of distribution networks;Pedro H. A. Barra,Gabriela P. Campos,Denis V. Coury等;《2018 Simposio Brasileiro de Sistemas Eletricos (SBSE)》;20180628;全文 *
锂电池管理芯片的过流保护功能设计及实现;朱卓娅,程剑平,魏同立;《电路与系统学报》;20060228;全文 *

Also Published As

Publication number Publication date
CN109828652A (en) 2019-05-31

Similar Documents

Publication Publication Date Title
CN109067418B (en) Antenna control method and mobile terminal
CN109976611B (en) Terminal device control method and terminal device
CN110399000B (en) Mobile terminal and temperature control method thereof
CN109639887B (en) Control method and terminal equipment
CN109831359B (en) Method for detecting connection state of data network and terminal equipment thereof
CN113163460A (en) Service processing method, terminal and network equipment
CN109714476B (en) Data processing method and device, mobile terminal and storage medium
CN109739300B (en) Antenna control method and terminal
CN109755997B (en) Charging method and terminal equipment
CN110730017A (en) Radio frequency device, control method thereof and terminal equipment
CN108712555B (en) Method and device for sending alarm information
CN111343710B (en) Power adjustment method and electronic equipment
US11375497B2 (en) Power configuration method and terminal
CN110958710B (en) Channel access method, configuration method, terminal and network side equipment
CN110597437A (en) Screen capturing method and terminal equipment
CN108449490B (en) Terminal control method and terminal
CN111240451B (en) Heat dissipation method, electronic device and computer-readable storage medium
CN111026263B (en) Audio playing method and electronic equipment
CN111800835B (en) Switching configuration method, network device, terminal device and storage medium
CN109451154B (en) Method for setting multimedia file and terminal equipment
CN109828652B (en) Control method of power consumption mode and terminal equipment
CN109450508B (en) Antenna determination method and device and mobile terminal
CN109067429B (en) Control method and terminal equipment
CN110621079B (en) Random access resource selection method and terminal equipment
CN108234745B (en) Signal receiving method, mobile terminal and computer readable storage medium

Legal Events

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