Disclosure of Invention
The invention provides a mobile power supply small current mode control method aiming at the defects in the prior art, and aims to solve the problem that the mobile power supply in the prior art cannot set the small current mode running time in a self-defined mode.
The technical scheme adopted by the invention for solving the technical problem is as follows: a mobile power supply small current mode control method comprises the following steps:
detecting whether the mobile power supply is started;
after the mobile power supply is started, detecting whether a key touch event exists or not;
when a key touch event is detected, detecting the key touch time t0;
Judging the t0Whether the time is more than or equal to N seconds and less than N +1 seconds, wherein N is a positive integer less than a preset threshold value;
and if so, controlling the mobile power supply to enter a low current output mode and keeping the low current output mode for N hours.
Further, after the mobile power supply is powered on, detecting whether a key touch event occurs, the method further includes:
the method comprises the steps of associating key touch time of a startup and shutdown key of the mobile power supply with retention time of a low current mode of the mobile power supply in advance, and storing the retention time.
Further, if yes, controlling the mobile power supply to enter a low current output mode and keep for N hours, and then further including:
and controlling a single lamp of the indicator lamp to flash for N times per period, and indicating that the keeping time of the low-current mode is N hours.
Or detecting the remaining time M of the mobile power supply in the low-current running mode, and controlling an indicator light to flash in a flashing frequency increasing or decreasing mode according to the remaining time M, wherein M is an integer not greater than N.
Further, the detecting a remaining time M of the mobile power supply operating in the low current mode, and controlling an indicator light to blink in an increasing or decreasing manner according to the remaining time M, where M is an integer not greater than N, specifically includes:
when the M is equal to N, controlling the flashing frequency of the indicator light to be N times per period;
when the M is equal to N-1, controlling the flashing frequency of the indicator light to be N-1 times per period;
and analogizing in sequence, when the M is 2, controlling the flashing frequency of the indicator light to be 2 times per period;
when the M is 1, controlling the flashing frequency of the indicator light to be 1 time per period;
and when the M is equal to 0, controlling the mobile power supply to exit the low-current mode and controlling the stop flashing of the indicator light.
Further, the detecting a remaining time M of the mobile power supply operating in the low current mode, and controlling an indicator light to blink in an increasing or decreasing manner according to the remaining time M, where M is an integer not greater than N, specifically includes:
when the M is equal to N, controlling the flashing frequency of the indicator light to be 1 time per period;
when the M is equal to N-1, controlling the flashing frequency of the indicator light to be 2 times per period;
and analogizing in sequence, when the M is 2, controlling the flashing frequency of the indicator light to be N-1 times per period;
when the M is equal to 1, controlling the flashing frequency of the indicator light to be N times per period;
and when the M is equal to 0, controlling the mobile power supply to exit the low-current mode and controlling the stop flashing of the indicator light.
Further, if yes, controlling the mobile power supply to enter a low current output mode and keep for N hours, and then further including:
detecting whether a key single-click touch event occurs;
and if so, controlling the mobile power supply to exit the low-current mode.
Further, after the mobile power supply is started, whether a key touch event exists is detected, and the method also comprises the following steps;
when no key touch event is detected, detecting the actual output current value of the mobile power supply;
judging whether the actual output current value is smaller than a preset proportion of a rated output current value or not;
if yes, detecting that the actual output current value is smaller than the rated current value and deserves a duration T;
judging whether the T is smaller than a low-current shutdown time threshold value or not;
if not, controlling the mobile power supply to be powered off.
Further, the determination of the t0Whether the second is more than or equal to N and less than N +1 seconds, wherein N is a positive integer less than a preset threshold value, and then the method further comprises the following steps:
when the t is0And when the current value is greater than or equal to a preset threshold value, controlling the mobile power supply to be powered off.
The invention adopts another technical scheme for solving the technical problem as follows: a mobile power supply comprising a memory, a processor and a mobile power supply undercurrent mode control program stored on the memory and operable on the processor, which when executed by the processor implements the steps of a mobile power supply undercurrent mode control method as described above.
The invention adopts another technical scheme for solving the technical problem as follows: a storage medium, characterized in that the storage medium stores a computer program executable for implementing a mobile power supply small current mode control method as described above.
The invention provides a mobile power supply small current mode control method, a mobile power supply and a storage medium, wherein the method comprises the steps of detecting whether the mobile power supply is started or not; after the mobile power supply is started, detecting whether a key touch event exists or not; when a key touch event is detected, detecting the key touch time t0(ii) a Judging t0Whether the time is more than or equal to N seconds and less than N +1 seconds, wherein N is a positive integer less than a preset threshold value; and if so, controlling the mobile power supply to enter a low current output mode and keeping the low current output mode for N hours. After the mobile power supply is started, whether a key touch event occurs or not is detected, and the touch time t of the key touch event is detected0When the touch time t0The minimum positive integer N which is more than or equal to the preset threshold is less than N +1, the small current mode is correspondingly set to be N hours, and the touch time t of the key touch event is controlled0The holding time of the mobile power supply in the small current mode time is set, so that the charging in different current modes is required, and the charging in the small current modes of the equipment with different charging times is realized.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer and clearer, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The conventional mobile power supply does not support the operation in a low-current mode (the output current is more than or equal to 5% of the rated output current and less than the rated output current), and when the mobile power supply charges equipment needing low-current charging, the equipment is automatically shut down when the equipment needs to be operated for no more than a few minutes; the minimum part of the mobile power supply has a low-current mode, but the running time of the low-current mode is fixed and cannot be adjusted, which is usually preset to be 1 hour or 2 hours when leaving a factory, and a user cannot set the running time of the low-current mode of the mobile power supply according to actual requirements; meanwhile, the electric quantity of the existing equipment needing small current mode charging is different, so that the fully charged charging time is different; furthermore, the residual electric quantity of the equipment needing to be charged in the low-current mode is different when the mobile power supply is connected to charge, so that the actual charging time is different; therefore, the invention aims to provide a method, a mobile power supply and a storage medium which have a low current mode and can be set by a user in a self-defined manner according to the user requirement, so that the user can conveniently set the running time of the low current mode of the mobile power supply in the self-defined manner according to the actual requirement, and the low current charging of different equipment is further met.
Referring to fig. 1, a first embodiment of the present invention provides a method for controlling a small current mode of a mobile power supply, including:
step S11, detecting whether the mobile power supply is started;
step S13, after the mobile power supply is started, whether a key touch event exists is detected;
step S14, when the key touch event is detected, detecting the key touch time t0;
Step S15, judging t0Whether the N seconds is more than or equal to the N seconds and less than the N +1 seconds,the N is a minimum positive integer smaller than a preset threshold value;
and step S16, if yes, controlling the mobile power supply to enter a low current output mode and keeping for N hours.
It can be understood that after the mobile power supply is started, whether a key touch event occurs on the mobile power supply is detected, and the touch time t of the key touch event is detected0And will touch for a time t0Comparing with a preset threshold value, if and only if the touch-down time t0The minimum positive integer N which is smaller than the preset threshold and larger than or equal to the preset threshold is smaller than N +1, the small current mode is correspondingly set to be N hours, and therefore the touch time t of a key touch event is controlled by a user according to actual needs0The holding time (running time) of the small current mode time is controlled by moving the existing key, so that the charging in the small current mode of different devices needing current mode charging and different devices with different residual capacities and needing small current charging is realized.
In some preferred embodiments, the step S13 is preceded by the step S12:
the method comprises the steps of associating key touch time of a startup and shutdown key of the mobile power supply with retention time of a low current mode of the mobile power supply in advance, and storing the retention time.
It should be noted that, in the prior art, a button is usually disposed on a side edge or a front end surface and a back end surface of the mobile power supply, and the button is a power on/off button of the mobile power supply and is used for controlling the mobile power supply to be powered on and powered off actively; the mobile power supply small current mode control method provided by the invention is based on the existing power supply on-off button of the mobile power supply, and the power supply on-off button is used as the trigger of the mobile power supply small current mode control method; specifically, the key touch time of the power on/off key is associated with the retention time of the small current mode of the mobile power supply, and the retention time of the small current mode of the mobile power supply is controlled by touching the key touch time of the power on/off key. It can be understood that the existing on-off key of the mobile power supply is used for controlling the retention time (running time) of the low-current mode, so that the hardware transformation of the mobile power supply is effectively avoided, and the manufacturing cost of the mobile power supply is reduced.
In some preferred embodiments, the step S16 is followed by: and controlling a single lamp of the indicator lamp to flash for N times per period, and indicating that the keeping time of the low-current mode is N hours.
It can be understood that the holding time of the currently set low-current mode of the mobile power supply is indicated by controlling the flashing frequency of a single lamp of the indicator lamp on the mobile power supply, so that convenience is brought to a user or the holding time of the currently set low-current mode of the mobile power supply.
In other preferred embodiments, step S16 is followed by: and detecting the remaining time M of the mobile power supply in the low-current running mode, and controlling an indicator light to flash in a mode of increasing or decreasing the flash frequency according to the remaining time M, wherein M is an integer not greater than N.
It can be understood that, in the mobile power supply low-current mode control method provided by the invention, after the mobile power supply is controlled to enter the low-current mode, the flicker frequency of the indicator light is controlled according to the current remaining time, so that the remaining operation time of the low-current mode is indicated for a user in real time.
In some embodiments, the detecting a remaining time M of the mobile power supply operating in the low current mode, and controlling an indicator light to blink in an increasing or decreasing manner according to the remaining time M, where M is an integer not greater than N specifically includes:
when the M is equal to N, controlling the flashing frequency of the indicator light to be N times per period;
when the M is equal to N-1, controlling the flashing frequency of the indicator light to be N-1 times per period;
and analogizing in sequence, when the M is 2, controlling the flashing frequency of the indicator light to be 2 times per period;
when the M is 1, controlling the flashing frequency of the indicator light to be 1 time per period;
and when the M is equal to 0, controlling the mobile power supply to exit the low-current mode and controlling the stop flashing of the indicator light.
It can be understood that, in the mobile power supply low-current mode control method provided by the invention, after the mobile power supply is controlled to enter the low-current mode, the flicker frequency of the indicator lamp is correspondingly controlled to be decreased in a decreasing mode according to the current remaining time, and further, the remaining operation time of the low-current mode is indicated for a user in real time.
In other embodiments, the detecting the remaining time M of the mobile power supply operating in the low current mode, and controlling an indicator light to blink in an increasing or decreasing manner according to the remaining time M, where M is an integer not greater than N specifically includes:
when the M is equal to N, controlling the flashing frequency of the indicator light to be 1 time per period;
when the M is equal to N-1, controlling the flashing frequency of the indicator light to be 2 times per period;
and analogizing in sequence, when the M is 2, controlling the flashing frequency of the indicator light to be N-1 times per period;
when the M is equal to 1, controlling the flashing frequency of the indicator light to be N times per period;
and when the M is equal to 0, controlling the mobile power supply to exit the low-current mode and controlling the stop flashing of the indicator light.
It can be understood that, in the mobile power supply low-current mode control method provided by the invention, after the mobile power supply is controlled to enter the low-current mode, the flicker frequency of the indicator light is correspondingly controlled to give a gift in an increasing mode according to the current remaining time, so that the remaining operation time of the low-current mode is indicated for a user in real time.
Referring to fig. 2, in some preferred embodiments, the step S16 further includes:
step S161, detecting whether a key click touch event occurs;
and step S162, if yes, controlling the mobile power supply to exit the low current mode.
The mobile power supply small current mode control method provided by the invention can be understood that after the mobile power supply is controlled to enter the small current mode, the mobile power supply is actively controlled to exit the small current mode through clicking a touch event by a key, so that a user can conveniently control the mobile power supply to switch between the small current mode and the normal output mode.
Referring to fig. 3, in some embodiments, the step S13 is further included after;
step S131, when no key touch event is detected, detecting the actual output current value of the mobile power supply;
step S132, judging whether the actual output current value is smaller than the preset proportion of the rated output current value;
step S133, if yes, detecting that the actual output current value is smaller than the rated current value to obtain a duration T;
step S134, judging whether T is smaller than a low-current shutdown time threshold value;
and step S135, if not, controlling the mobile power supply to be powered off.
It can be understood that, according to the mobile power supply small-current mode control method provided by the invention, after the mobile power supply is detected to be started, when a key touch event is not detected, that is, after the mobile power supply is started, when the mobile power supply is not detected to be actively switched to the small-current mode to operate, the actual output current value of the mobile power supply is actively detected, and the mobile power supply is controlled to be shut down by judging whether the actual output current value of the mobile power supply is smaller than the preset proportion of the rated output current value, acquiring the duration time T of the actual output current value which is smaller than the preset proportion, and when the duration time is not smaller than the small-current shutdown time threshold, so that the problem of static power consumption of the mobile power supply is avoided, and the electric quantity loss of the mobile power supply is effectively avoided. In some embodiments, the low-current shutdown time threshold is set to any one of 7 seconds, 6 seconds, 5 seconds, or 4 seconds; the current value in the small current mode is 5% of the rated output current value of the mobile power supply.
In some embodiments, said step S15 is further followed by; when the t is0And when the current value is greater than or equal to a preset threshold value, controlling the mobile power supply to be powered off.
It can be understood that, according to the mobile power supply low-current mode control method provided by the invention, after the mobile power supply is detected to be started, whenever a key touch event is detected, and when the duration time of the key touch event is greater than a preset threshold value, the mobile power supply is controlled to be shut down, so that the active shutdown control of the mobile power supply is realized.
In some specific embodiments, the mobile power supply is provided with 4 indicator lights, and the preset threshold is set for 5 seconds; at this time, the N is set to 1, 2, 3, or 4; at this time, the key touch time t of the key touch event is known0Is, 1 is not more than t0<2 seconds, 2 is less than or equal to t0<3 seconds, t is more than or equal to 30<4 seconds or t0And the time is more than or equal to 4 seconds, and the holding time of the small current mode is 1h, 2h, 3h or 4 h. Specifically, when the value of 1 is less than or equal to t0<At 2 seconds, the holding time is 1 h; when the value of 2 is less than or equal to t0<At 3 seconds, the holding time is 2 hours; when the t is more than or equal to 30<At 4 seconds, the holding time is 3 hours; when the t is0Not less than 4 seconds (t is not less than 4)0<5) The holding time is 4 h.
Further, controlling a single indicator light of the mobile power supply to flash N times per period;
in some embodiments, the mobile power supply small current mode control method controls the indicator light to control the indicator light to flicker in a descending manner; with said t0The preset threshold value is 5 seconds or more, and the holding time is 4 hours for illustration;
when the remaining time is more than 4h, controlling the flashing frequency of the indicator light to be 4 times per period;
when the remaining time is more than or equal to 3h and less than 4h, controlling the flashing frequency of the indicator light to be 3 times per period;
when the remaining time is more than or equal to 2h and less than 3h, controlling the flashing frequency of the indicator light to be 2 times per period;
when the remaining time is more than or equal to 1h and less than 2h, controlling the flashing frequency of the indicator light to be 1 time per period;
and when the remaining time is less than 1h, controlling the mobile power supply to exit the low-current mode, and controlling the indicator light to stop flashing.
In other embodiments, the mobile power supply small current mode control method controls the indicator light to control the indicator light to blink in an incremental mode; with said t0The preset threshold value is 5 seconds or more, and the holding time is 4 hours for illustration;
when the remaining time is more than 4h, controlling the flashing frequency of the indicator light to be 1 time per period;
when the remaining time is more than or equal to 3h and less than 4h, controlling the flashing frequency of the indicator light to be 2 times per period;
when the remaining time is more than or equal to 2h and less than 3h, controlling the flashing frequency of the indicator light to be 3 times per period;
when the remaining time is more than or equal to 1h and less than 2h, controlling the flashing frequency of the indicator light to be 4 times per period;
and when the remaining time is less than 1h, controlling the mobile power supply to exit the low-current mode, and controlling the indicator light to stop flashing.
Referring to fig. 4, the present invention further provides a mobile power supply, which includes a memory 10, a processor 20 and a mobile power supply small current mode control program stored in the memory 10 and capable of being executed on the processor 20, wherein when the mobile power supply small current mode control program is executed by the processor 20, the steps of the mobile power supply small current mode control method according to the above embodiment of the present invention are implemented, specifically as described above.
The present invention also provides a storage medium, wherein the storage medium stores a computer program, and the computer program can be executed to implement the mobile power supply small current mode control method as described in the above embodiments of the present invention, specifically as described above.
In summary, the present invention provides a mobile power supply small current mode control method, a mobile power supply and a storage medium, where the mobile power supply small current mode control method includes: detecting whether the mobile power supply is started; after the mobile power supply is started, whether the mobile power supply is started or not is detectedA key press event; when a key touch event is detected, detecting the key touch time t0(ii) a Judging the t0Whether the time is more than or equal to N seconds and less than N +1 seconds, wherein N is a positive integer less than a preset threshold value; and if so, controlling the mobile power supply to enter a low current output mode and keeping the low current output mode for N hours. It can be understood that after the mobile power supply is started, whether a key touch event occurs on the mobile power supply is detected, and the touch time t of the key touch event is detected0And will touch for a time t0Comparing with a preset threshold value, if and only if the touch-down time t0The minimum positive integer N which is smaller than the preset threshold and larger than the preset threshold is smaller than N +1, the small current mode is correspondingly set to be N hours, and therefore the touch time t of a key touch event is controlled by a user according to actual needs0The time keeping time (running time) of the mobile power supply in the low current mode is further realized, and the requirements of charging equipment in different current modes and charging equipment in different residual capacities and in low current modes of the equipment in the low current mode are further met.
It is to be understood that the invention is not limited to the examples described above, but that modifications and variations may be effected thereto by those of ordinary skill in the art in light of the foregoing description, and that all such modifications and variations are intended to be within the scope of the invention as defined by the appended claims.