CN110896240B - Charging control method and device, computer readable storage medium and terminal - Google Patents

Charging control method and device, computer readable storage medium and terminal Download PDF

Info

Publication number
CN110896240B
CN110896240B CN201911209209.8A CN201911209209A CN110896240B CN 110896240 B CN110896240 B CN 110896240B CN 201911209209 A CN201911209209 A CN 201911209209A CN 110896240 B CN110896240 B CN 110896240B
Authority
CN
China
Prior art keywords
switch
state
charging
voltage
battery
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
CN201911209209.8A
Other languages
Chinese (zh)
Other versions
CN110896240A (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.)
TCL Mobile Communication Technology Ningbo Ltd
Original Assignee
TCL Mobile Communication Technology Ningbo 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 TCL Mobile Communication Technology Ningbo Ltd filed Critical TCL Mobile Communication Technology Ningbo Ltd
Priority to CN201911209209.8A priority Critical patent/CN110896240B/en
Publication of CN110896240A publication Critical patent/CN110896240A/en
Application granted granted Critical
Publication of CN110896240B publication Critical patent/CN110896240B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H01ELECTRIC ELEMENTS
    • H01MPROCESSES OR MEANS, e.g. BATTERIES, FOR THE DIRECT CONVERSION OF CHEMICAL ENERGY INTO ELECTRICAL ENERGY
    • H01M10/00Secondary cells; Manufacture thereof
    • H01M10/42Methods or arrangements for servicing or maintenance of secondary cells or secondary half-cells
    • H01M10/44Methods for charging or discharging
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02EREDUCTION OF GREENHOUSE GAS [GHG] EMISSIONS, RELATED TO ENERGY GENERATION, TRANSMISSION OR DISTRIBUTION
    • Y02E60/00Enabling technologies; Technologies with a potential or indirect contribution to GHG emissions mitigation
    • Y02E60/10Energy storage using batteries

Abstract

The embodiment of the application discloses a charging control method, a charging control device, a computer readable storage medium and a terminal, wherein when a charging power supply is detected to be connected, the voltage at two ends of a resistor is obtained; determining a charging current based on the voltage and a resistance value; comparing the charging current with a preset threshold value; if the charging current is larger than a preset threshold value, acquiring the state of the first switch or the second switch, and switching the state of the first switch or the second switch according to the state. The embodiment can improve the charging efficiency of the terminal battery.

Description

Charging control method and device, computer readable storage medium and terminal
Technical Field
The application relates to the field of mobile terminal application, in particular to a charging control method and device, a computer readable storage medium and a terminal.
Background
Currently, charging is one of the most common functions of mobile terminals, and the mobile terminals all use rechargeable batteries. In order to detect various states such as battery voltage and charging current in real time during charging of the mobile terminal, the mobile terminal needs to be in an awake state all the time.
In the related art, when the charging is fully charged, for low-carbon power saving, the charging is turned off, and the battery voltage is detected, and when the battery voltage is lower than a preset threshold value, the charging is triggered to be started again. Therefore, the terminal requires frequent control of the switch reversal to reduce the charger charging efficiency.
Disclosure of Invention
The embodiment of the application provides a charging control method and device, a computer readable storage medium and a terminal, which can improve the charging efficiency of a terminal battery.
The embodiment of the application provides a charging control method, which comprises the following steps:
when the charging power supply is detected to be connected, acquiring voltages at two ends of the resistor;
determining a charging current based on the voltage and a resistance value;
comparing the charging current with a preset threshold value;
if the charging current is larger than a preset threshold value, acquiring the state of the first switch or the second switch, and switching the state of the first switch or the second switch according to the state.
Correspondingly, this application embodiment still provides a charge control device, includes:
the acquisition unit is used for acquiring the voltage at two ends of the resistor when the charging power supply is detected to be connected;
a determination unit for determining a charging current based on the voltage and a resistance value;
the comparison unit is used for comparing the charging current with a preset threshold value;
and the switching unit is used for acquiring the state of the first switch or the second switch if the charging current is greater than a preset threshold value, and switching the state of the first switch or the second switch according to the state.
Accordingly, the present application further provides a computer-readable storage medium, where a plurality of instructions are stored, and the instructions are suitable for being loaded by a processor to perform the steps in the charging control method as described above.
Correspondingly, an embodiment of the present application further provides a terminal, which includes a processor and a memory, where the memory stores a plurality of instructions, and the processor loads the instructions to execute the steps in the charging control method described above.
The embodiment of the application discloses a charging control method, a charging control device, a computer readable storage medium and a terminal, wherein when a charging power supply is detected to be connected, the voltage at two ends of a resistor is obtained; determining a charging current based on the voltage and a resistance value; comparing the charging current with a preset threshold value; if the charging current is larger than a preset threshold value, acquiring the state of the first switch or the second switch, and switching the state of the first switch or the second switch according to the state. The embodiment can improve the charging efficiency of the terminal battery.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart illustrating a first charging control method according to an embodiment of the present disclosure.
Fig. 2 is a schematic connection diagram of circuit components of a charging control method according to an embodiment of the present application.
Fig. 3 is a flowchart illustrating a second charging control method according to an embodiment of the present disclosure.
Fig. 4 is a block diagram of a first charging control device according to an embodiment of the present application.
Fig. 5 is a block diagram of a second charging control device according to an embodiment of the present application.
Fig. 6 is a block diagram of a third charging control device according to an embodiment of the present application.
Fig. 7 is a schematic structural diagram of a terminal according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described clearly and completely with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only some embodiments of the present application, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In view of the foregoing problems, embodiments of the present application provide a first charging control method, apparatus, computer-readable storage medium, and terminal, which can improve the efficiency of charging control of the terminal. The following are detailed below. It should be noted that the following description of the embodiments is not intended to limit the preferred order of the embodiments.
Referring to fig. 1, fig. 1 is a schematic flowchart illustrating a charging control method according to an embodiment of the present disclosure. The charging control method may be applied to mobile terminals such as mobile phones, tablet computers, notebook computers, palmtop computers, Portable Media Players (PMPs), and fixed terminals such as desktop computers.
Specifically, the terminal includes a first battery, a second battery, a resistor, a first switch, a second switch, and a third switch, please refer to fig. 2, and fig. 2 is a schematic connection diagram of circuit components of a charging control method according to an embodiment of the present disclosure. One end of the first battery is connected with the resistor through the first switch, the other end of the first battery is connected with the second battery through the third switch, and one end of the second battery is connected with the resistor through the second switch. The specific flow of the charging control method can be as follows:
101. and when the charging power supply is detected to be connected, acquiring the voltage at two ends of the resistor.
In this embodiment, specifically, there may be a plurality of ways to detect whether to access the charging power supply, for example, whether current exists in the charging access port of the terminal or whether a magnetic field exists in the internal coil of the terminal may be detected. The access mode of the charging power supply may include multiple modes, for example, the access mode of the charging power supply may include wired access or wireless access.
The wireless charging mode can be an electromagnetic induction mode, a magnetic resonance mode, an electric field coupling mode, a radio wave transmission mode and the like, and the electromagnetic induction principle is mostly adopted for the wireless charging of the mobile phone. The electromagnetic induction type wireless charging mode is characterized in that when current of a power supply passes through a coil (a power transmission coil of a wireless charger), a magnetic field is generated, and other coils (power receiving coils at the mobile phone end) which are not electrified are close to the magnetic field, so that current is generated to charge the mobile phone.
Specifically, the wired access may be to charge the terminal by connecting a charging wire of the terminal with a fixed power supply or a mobile power supply, and the wireless charging may be to perform a charging operation by contacting a charging device with a built-in power transmission coil with the terminal.
Further, when the terminal is detected to be connected with a power supply, the voltage values at two ends of the resistor are obtained. Specifically, the voltage value across the resistor may be read through the charging circuit module, and the voltage value across the resistor may include a first voltage value and a second voltage value. For example, the first voltage value may be 1V (volts) or the like, and the second voltage value may be 2V or the like.
102. The charging current is determined based on the voltage and the resistance value.
Specifically, the access current can be transmitted to the battery through the resistor, and when the current of the access power supply is determined, the current can be obtained by processing the voltage at two ends of the resistor and the resistance value of the resistor.
In some embodiments, the step of "determining the charging current based on the voltage and the resistance value" may include the following process:
acquiring the resistance value;
determining a difference value between the first voltage and the second voltage to obtain a voltage difference value;
obtaining the ratio of the voltage difference value to the resistance value based on the resistance value and the voltage difference value;
determining the charging current according to the ratio.
The resistance value is obtained, the resistance may be a fixed resistance, the resistance value may be stored in the terminal in advance, and the obtained resistance value may be directly read from the memory. For example, the resistance value may be 1 Ω (ohm) or the like.
After the resistance value, the first voltage value and the second voltage value are obtained, the resistance value, the first voltage value and the second voltage value may be processed according to a preset rule to obtain the charging current. The preset rule may be a calculation method, for example, the calculation method may be that I ═ Va1-Va2)/Ra, where I may be represented as a charging current; va1 may represent a first voltage value, which may be 3V; va2 may represent a second voltage value, which may be 1V; ra may represent a resistance value, which may be 1 Ω, and the charging current I may be calculated to be 2A (amperes).
103. The charging current is compared to a preset threshold.
Specifically, after the charging current is determined, the charging current may be compared with a preset threshold. The preset threshold may be a charging current threshold determined in an experiment, that is, the charging current below the preset threshold may charge the terminal battery normally without affecting the battery performance.
For example, the access current may be 1A, 2A, etc., the preset threshold may be 1.5A, and when the access current is 1A, it may be determined that the access current is smaller than the preset threshold; when the access current is 2A, it can be determined that the access current is greater than the preset current.
104. And if the charging current is larger than the preset threshold value, acquiring the state of the first switch or the second switch, and switching the state of the first switch or the second switch according to the state.
Specifically, when the charging current is larger than a preset threshold, the current state of the first switch or the second switch may be obtained, and the state of the first switch or the second switch may be switched based on the current state. The two ends of the first switch can be respectively connected with the resistor and the first battery, and the two ends of the second switch can be respectively connected with the resistor and the second battery.
For example, the first switch may include an a terminal and a B terminal, wherein the a terminal may be connected to the resistor, and the B terminal may be connected to the first battery; the second switch may include a terminal C and a terminal D, wherein the terminal C may be connected to the resistor, and the terminal D may be connected to the second battery.
In some embodiments, the step of "obtaining a state of the first switch or the second switch, and switching the state of the first switch or the second switch according to the state" may include the following steps:
acquiring a first state of the first switch;
performing a state switching operation on the first switch and the second switch based on the first state.
Specifically, the first state of the first switch is obtained, and the first state may be a plurality of states, for example, the first state may be an open state or a closed state, where an open-to-state transition may indicate that a circuit where the first switch is open is opened, and a closed state may indicate that a circuit where the first switch is connected is closed.
Specifically, the state switching operation may be performed on the first switch and the second switch according to the first state of the first switch. For example, the first state may be open or closed, and when the first state is open, the first switch state may be switched to the closed state and the second switch state may be switched to the open state; when the first state is closed, the first switching state may be switched to an open state and the second switching state may be switched to a closed state.
In some embodiments, the step of "obtaining a state of the first switch or the second switch, and switching the state of the first switch or the second switch according to the state" may further include the following process:
acquiring a second state of the second switch;
performing a state switching operation on the first switch and the second switch based on the second state.
Specifically, the second state of the second switch is obtained, and the second state may be a plurality of states, for example, the second state may be an open state or a closed state, where an open-to-state transition may indicate that the circuit where the second switch is located is opened, and a closed state may indicate that the circuit where the second switch is located is connected.
Specifically, the state switching operation may be performed on the first switch and the second switch according to the second state of the second switch. For example, the second state may be open or closed, and when the second state is open, the state of the second switch may be switched to the closed state and the state of the first switch may be switched to the open state; when the second state is closed, the state of the second switch may be switched to an open state and the state of the first switch may be switched to a closed-open state.
When the access current is larger than the preset threshold value, the states of the first switch and the second switch are detected, and the states of the first switch and the second switch are switched, so that the battery can be effectively protected, and the battery is prevented from being damaged due to overlarge charging current.
In some embodiments, the charge control method may further include the steps of:
and if the charging current is less than or equal to a preset threshold value, performing charging operation on the first battery.
Specifically, when the charging current is less than or equal to the preset threshold, the charging current may be a normal charging current, and the terminal battery may be directly charged. When the terminal battery is charged, the first switch state can be switched to the closed state to perform charging operation on the first battery.
According to the scheme, when the charging power supply is detected to be connected, the voltages at two ends of the resistor are obtained; determining a charging current based on the voltage and a resistance value; comparing the charging current with a preset threshold value; if the charging current is larger than a preset threshold value, acquiring the state of the first switch or the second switch, and switching the state of the first switch or the second switch according to the state. In the embodiment, the charging current is compared with the preset current threshold value by acquiring the charging current, and then the charging state of the first battery and the charging state of the second battery are controlled, so that the power consumption of the batteries can be reduced, and the efficiency of the charging control of the terminal is improved.
Referring to fig. 3, fig. 3 is a schematic flowchart illustrating a second charging control method according to an embodiment of the present disclosure. In this embodiment, the specific application scenarios of the charging control method may be as follows:
201. and when the terminal detects that the charging power supply is connected, the voltage at the two ends of the resistor is obtained.
In this embodiment, when the user performs the charging operation on the terminal, the terminal may detect that the charging power supply is accessed, wherein the user may connect the terminal with the power supply through the charging wire, that is, may perform the charging operation on the terminal.
When the terminal detects that the charging power supply is connected, the voltage at the two ends of the resistor is obtained, and the voltage value at the two ends of the resistor can be a first voltage value and a second voltage value. For example, the first voltage value may be 5V, and the second voltage value may be 3V.
202. And the terminal processes the acquired voltage and the resistance value of the resistor to obtain the charging current.
Specifically, after the terminal acquires the first voltage value and the second voltage value at the two ends of the resistor, the resistance value of the resistor can be acquired. Wherein the resistance value may be obtained by reading resistance value data stored in the memory.
Further, after the terminal obtains the first voltage value, the second voltage value and the resistance value, the first voltage value, the second voltage value and the resistance value may be operated according to a preset calculation formula, so as to obtain the access current.
For example, the first voltage value may be 5V, the second voltage value may be 3V, the resistance value may be 2 Ω, and the preset calculation formula may be (Va1-Va2)/Ra, where Va1 represents the first voltage value, Va2 represents the second voltage value, and Ra represents the resistance value, and the access current I may be 1A by processing according to the preset calculation formula. The current value of the terminal access current can be obtained through a preset calculation mode, and the access current is conveniently compared with a preset current threshold value.
203. And the terminal compares the charging current with a preset current threshold value and judges whether the charging current is smaller than the preset current threshold value or not.
Specifically, after the terminal calculates the access current according to the above steps, the access current may be compared with a preset current threshold. The preset current threshold may be the maximum safe current that the terminal can access, that is, the current below the preset current threshold may charge the terminal battery normally without damaging the battery performance.
For example, the access current may be 0.5A, 1.8A, etc., the preset threshold may be 1.5A, and when the access current is 0.5A, it may be determined that the access current is smaller than the preset threshold, step 204 is executed; when the access current is 1.8A, it can be determined that the access current is greater than the preset current, and step 205 is executed.
204. The terminal detects the first switch state and carries out switching operation on the first switch state and the second switch state according to the first switch state.
Specifically, the state switching operation of the first switch and the second switch in this step may refer to the steps in the above embodiments, which are not described herein,
205. the terminal switches the first switch state to perform charging operation on the first battery.
When the access current of the terminal is less than or equal to the preset current threshold, the access current at the moment can be represented as safe current, and the terminal can perform charging operation on the battery. The terminal comprises two batteries, namely a first battery and a second battery, and the first battery can be charged firstly when the charging operation is carried out. For example, the terminal may switch the state of the first switch to a closed state, which is the transfer of access current to the first battery, thereby charging the first battery.
According to the scheme, when the charging power supply is detected to be connected, the voltages at two ends of the resistor are obtained; determining a charging current based on the voltage and resistance values; comparing the charging current with a preset threshold value; if the charging current is larger than a preset threshold value, acquiring the state of the first switch or the second switch, and switching the state of the first switch or the second switch according to the state. In the embodiment, the charging current is compared with the preset current threshold value by acquiring the charging current, and then the charging state of the first battery and the charging state of the second battery are controlled, so that the power consumption of the batteries can be reduced, and the efficiency of the charging control of the terminal is improved.
In order to better implement the charging control method provided in the embodiment of the present application, an apparatus based on the charging control method is also provided in the embodiment of the present application. The terms are the same as those in the above-described charge control method, and details of implementation may refer to the description in the method embodiment.
Referring to fig. 4, fig. 4 is a block diagram of a first charging control device according to an embodiment of the present disclosure, including:
the acquiring unit 301 is configured to acquire a voltage across the resistor when detecting that the charging power supply is connected;
a determination unit 302 for determining a charging current based on the voltage and the resistance value;
a comparing unit 303, configured to compare the charging current with a preset threshold;
a switching unit 304, configured to obtain a state of the first switch or the second switch if the charging current is greater than a preset threshold, and switch the state of the first switch or the second switch according to the state.
In some embodiments, as shown in fig. 5, fig. 5 is a block diagram of a second charging control device provided in an embodiment of the present application. The determining unit 302 may include:
a first obtaining subunit 3021 configured to obtain the resistance value;
a first determining subunit 3022, configured to determine a difference between the first voltage and the second voltage to obtain a voltage difference;
a second obtaining subunit 3023, configured to obtain, based on the resistance value and the voltage difference value, a ratio of the voltage difference value to the resistance value;
a second determining subunit 3024, configured to determine the charging current according to the ratio.
In some embodiments, as shown in fig. 6, fig. 6 is a block diagram of a third charging control device provided in the embodiments of the present application. The switching unit 304 may include:
a third acquiring subunit 3041 configured to acquire a first state of the first switch;
a first switching subunit 3042 configured to perform a state switching operation on the first switch and the second switch based on the first state.
In some embodiments, the switching unit 304 may further include:
a fourth acquiring subunit, configured to acquire a second state of the second switch;
and the second switching subunit is used for carrying out state switching operation on the first switch and the second switch based on the second state.
In some embodiments, the charge control device may further include:
and the charging unit is used for charging the first battery if the charging current is less than or equal to a preset threshold value.
According to the scheme, when the charging power supply is detected to be connected, the voltages at two ends of the resistor are obtained; determining a charging current based on the voltage and a resistance value; comparing the charging current with a preset threshold value; if the charging current is larger than a preset threshold value, acquiring the state of the first switch or the second switch, and switching the state of the first switch or the second switch according to the state. In the embodiment, the charging current is compared with the preset current threshold value by acquiring the charging current, and then the charging state of the first battery and the charging state of the second battery are controlled, so that the power consumption of the batteries can be reduced, and the efficiency of the charging control of the terminal is improved.
The embodiment of the application also provides a terminal. As shown in fig. 7, the terminal may include Radio Frequency (RF) circuitry 601, memory 602 including one or more computer-readable storage media, input unit 603, display unit 604, sensor 605, audio circuitry 606, Wireless Fidelity (WiFi) module 607, processor 608 including one or more processing cores, and power supply 609. Those skilled in the art will appreciate that the terminal structure shown in fig. 7 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components. Wherein:
the RF circuit 601 may be used for receiving and transmitting signals during the process of transmitting and receiving information, and in particular, for processing the received downlink information of the base station by one or more processors 608; in addition, data relating to uplink is transmitted to the base station. In general, the RF circuit 601 includes, but is not limited to, an antenna, at least one Amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, the RF circuitry 601 may also communicate with networks and other devices via wireless communications.
The memory 602 may be used to store software programs and modules, and the processor 608 executes various functional applications and data processing by operating the software programs and modules stored in the memory 602. The memory 602 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 for at least one function (such as a sound playing function, an image playing function, etc.), and the like. Further, the memory 602 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. Accordingly, the memory 602 may also include a memory controller to provide the processor 608 and the input unit 603 access to the memory 602.
The input unit 603 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. In particular, in one particular embodiment, input unit 603 may include a touch-sensitive surface as well as other input devices. The touch-sensitive surface, also referred to as a touch display screen or a touch pad, may collect touch operations by a user (e.g., operations by a user on or near the touch-sensitive surface using a finger, a stylus, or any other suitable object or attachment) thereon or nearby, and drive the corresponding connection device according to a predetermined program. The input unit 603 may include other input devices in addition to the touch-sensitive surface. In particular, other input devices may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 604 may be used to display information input by or provided to the user and various graphical user interfaces of the server, which may be made up of graphics, text, icons, video, and any combination thereof. The Display unit 604 may include a Display panel, and optionally, the Display panel may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. Further, the touch-sensitive surface may overlay the display panel, and when a touch operation is detected on or near the touch-sensitive surface, the touch operation is transmitted to the processor 608 to determine the type of touch event, and the processor 608 then provides a corresponding visual output on the display panel according to the type of touch event. Although in FIG. 6 the touch sensitive surface and the display panel are two separate components to implement input and output functions, in some embodiments the touch sensitive surface may be integrated with the display panel to implement input and output functions.
The terminal may also include at least one sensor 605, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor that adjusts the brightness of the display panel according to the brightness of ambient light, and a proximity sensor that turns off the display panel and the backlight when the server moves to the ear.
Audio circuitry 606, speakers, and microphones may provide an audio interface between the user and the server. The audio circuit 606 may transmit the electrical signal converted from the received audio data to a speaker, and convert the electrical signal into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 606 and converted into audio data, which is then processed by the audio data output processor 608, and then passed through the RF circuit 601 to be sent to, for example, a terminal, or the audio data is output to the memory 602 for further processing. The audio circuitry 606 may also include an ear-bud jack to provide communication of peripheral headphones with the server.
WiFi belongs to short-distance wireless transmission technology, and the terminal can help a user to receive and send e-mails, browse webpages, access streaming media and the like through the WiFi module 607, and provides wireless broadband internet access for the user. Although fig. 7 shows the WiFi module 607, it is understood that it does not belong to the essential constitution of the terminal, and may be omitted entirely as needed within the scope of not changing the essence of the application.
The processor 608 is a control center of the terminal, connects various parts of the entire handset using various interfaces and lines, and performs various functions of the server and processes data by operating or executing software programs and modules stored in the memory 602 and calling data stored in the memory 602, thereby performing overall monitoring of the handset. Optionally, processor 608 may include one or more processing cores; preferably, the processor 608 may integrate an application processor, which primarily handles operating systems, user interfaces, applications, etc., and a modem processor, which primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 608.
The terminal also includes a power supply 609 (e.g., a battery) for powering the various components, which may preferably be logically connected to the processor 608 via a power management system that may be used to manage charging, discharging, and power consumption. The power supply 609 may also include any component of one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
Specifically, in this embodiment, the processor 608 in the terminal loads the executable file corresponding to the process of one or more application programs into the memory 602 according to the following instructions, and the processor 608 runs the application programs stored in the memory 602, thereby implementing various functions:
when the charging power supply is detected to be connected, acquiring voltages at two ends of the resistor;
determining a charging current based on the voltage and a resistance value;
comparing the charging current with a preset threshold value;
if the charging current is larger than a preset threshold value, acquiring the state of the first switch or the second switch, and switching the state of the first switch or the second switch according to the state.
According to the scheme, when the charging power supply is detected to be connected, the voltages at two ends of the resistor are obtained; determining a charging current based on the voltage and a resistance value; comparing the charging current with a preset threshold value; if the charging current is larger than a preset threshold value, acquiring the state of the first switch or the second switch, and switching the state of the first switch or the second switch according to the state. In the embodiment, the charging current is compared with the preset current threshold value by acquiring the charging current, and then the charging state of the first battery and the charging state of the second battery are controlled, so that the power consumption of the batteries can be reduced, and the efficiency of the charging control of the terminal is improved.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, embodiments of the present application provide a computer-readable storage medium, in which a plurality of instructions are stored, where the instructions can be loaded by a processor to execute steps in any one of the charging control methods provided in the embodiments of the present application. For example, the instructions may perform the steps of:
when the charging power supply is detected to be connected, acquiring voltages at two ends of the resistor;
determining a charging current based on the voltage and a resistance value;
comparing the charging current with a preset threshold value;
if the charging current is larger than a preset threshold value, acquiring the state of the first switch or the second switch, and switching the state of the first switch or the second switch according to the state.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
Wherein the computer-readable storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
Since the instructions stored in the computer-readable storage medium can execute the steps in any of the charging control methods provided in the embodiments of the present application, beneficial effects that can be achieved by any of the charging control methods provided in the embodiments of the present application can be achieved, for details, see the foregoing embodiments, and are not described herein again.
The charging control method, the charging control device, the computer-readable storage medium, and the terminal provided in the embodiments of the present application are described in detail above, and specific examples are applied herein to explain the principles and embodiments of the present application, and the description of the embodiments is only used to help understand the method and the core idea of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (7)

1. A charging control method is applied to a terminal, the terminal comprises a first battery, a second battery, a resistor, a first switch, a second switch and a third switch, wherein one end of the first battery is connected with the resistor through the first switch, the other end of the first battery is connected with the second battery through the third switch, and one end of the second battery is connected with the resistor through the second switch, and the charging control method comprises the following steps:
when detecting that current exists at a charging access port of the terminal or a magnetic field exists in an internal coil of the terminal, acquiring voltages at two ends of a resistor, wherein the charging access port is used for wired charging, and the internal coil is used for wireless charging;
determining a charging current based on the voltage and a resistance value;
comparing the charging current with a preset threshold value;
if the charging current is larger than a preset threshold value, acquiring the state of the first switch or the second switch, and switching the state of the first switch or the second switch according to the state,
the method comprises the following steps:
if the state of the first switch is an open state, switching the state of the first switch to a closed state, and switching the state of the second switch to an open state, wherein the open state represents that the battery charging is stopped, and the closed state represents that the battery is charged;
if the state of the first switch is a closed state, switching the state of the first switch to an open state, and switching the state of the second switch to a closed state;
if the state of the second switch is an open state, switching the state of the second switch to a closed state, and switching the state of the first switch to an open state;
and if the state of the second switch is the closed state, switching the state of the second switch to the open state, and switching the state of the first switch to the closed state.
2. The method of claim 1, wherein the voltage comprises a first voltage and a second voltage;
the determining a charging current based on the voltage and a resistance value includes:
acquiring the resistance value;
determining a difference value between the first voltage and the second voltage to obtain a voltage difference value;
obtaining the ratio of the voltage difference value to the resistance value based on the resistance value and the voltage difference value;
determining the charging current according to the ratio.
3. The method of claim 1, further comprising:
and if the charging current is less than or equal to a preset threshold value, performing charging operation on the first battery.
4. A charge control device applied to a terminal, the terminal comprising a first battery, a second battery, a resistor, a first switch, a second switch and a third switch, wherein one end of the first battery is connected to the resistor through the first switch, the other end of the first battery is connected to the second battery through the third switch, and one end of the second battery is connected to the resistor through the second switch, the device comprising:
the terminal comprises an acquisition unit, a control unit and a processing unit, wherein the acquisition unit is used for acquiring the voltage at two ends of a resistor when detecting that current exists at a charging access port of the terminal or a magnetic field exists in an internal coil of the terminal, the charging access port is used for wired charging, and the internal coil is used for wireless charging;
a determination unit for determining a charging current based on the voltage and a resistance value;
the comparison unit is used for comparing the charging current with a preset threshold value;
a switching unit, configured to acquire a state of the first switch or the second switch if the charging current is greater than a preset threshold, and switch the state of the first switch or the second switch according to the state,
the method comprises the following steps:
if the state of the first switch is an open state, switching the state of the first switch to a closed state, and switching the state of the second switch to an open state, wherein the open state represents that the battery charging is stopped, and the closed state represents that the battery is charged;
if the state of the first switch is a closed state, switching the state of the first switch to an open state, and switching the state of the second switch to a closed state;
if the state of the second switch is an open state, switching the state of the second switch to a closed state, and switching the state of the first switch to an open state;
and if the state of the second switch is the closed state, switching the state of the second switch to the open state, and switching the state of the first switch to the closed state.
5. The apparatus of claim 4, wherein the voltage comprises a first voltage and a second voltage; the determination unit includes:
a first obtaining subunit, configured to obtain the resistance value;
the first determining subunit is used for determining a difference value between the first voltage and the second voltage to obtain a voltage difference value;
the second obtaining subunit is configured to obtain, based on the resistance value and the voltage difference value, a ratio of the voltage difference value to the resistance value;
a second determining subunit, configured to determine the charging current according to the ratio.
6. A computer-readable storage medium storing instructions adapted to be loaded by a processor to perform the steps of the charging control method according to any one of claims 1 to 3.
7. A terminal comprising a processor and a memory, the memory storing a plurality of instructions, the processor loading the instructions to perform the steps in the charging control method of any one of claims 1 to 3.
CN201911209209.8A 2019-11-30 2019-11-30 Charging control method and device, computer readable storage medium and terminal Active CN110896240B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911209209.8A CN110896240B (en) 2019-11-30 2019-11-30 Charging control method and device, computer readable storage medium and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911209209.8A CN110896240B (en) 2019-11-30 2019-11-30 Charging control method and device, computer readable storage medium and terminal

Publications (2)

Publication Number Publication Date
CN110896240A CN110896240A (en) 2020-03-20
CN110896240B true CN110896240B (en) 2022-08-05

Family

ID=69786949

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911209209.8A Active CN110896240B (en) 2019-11-30 2019-11-30 Charging control method and device, computer readable storage medium and terminal

Country Status (1)

Country Link
CN (1) CN110896240B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113851745A (en) * 2021-09-29 2021-12-28 东莞新能安科技有限公司 Battery cell charging control method, battery pack and parallel operation system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101501955A (en) * 2006-07-13 2009-08-05 株式会社Lg化学 Circuit current balancing method and apparatus for battery apparatus
CN101677144A (en) * 2008-09-16 2010-03-24 原子能委员会 Method for pulsed charging of a battery in a standalone system comprising a supercapacitor
CN105811493A (en) * 2014-12-31 2016-07-27 联想(北京)有限公司 Power source circuit, power source circuit discharging method, power source circuit charging method and controller
CN105990896A (en) * 2015-02-13 2016-10-05 深圳市华思旭科技有限公司 Power supply control circuit, mobile power supply and electric connection device
CN205846778U (en) * 2016-06-29 2016-12-28 深圳市沃特玛电池有限公司 A kind of Intelligent lithium battery balancing equipment
CN209356648U (en) * 2018-11-13 2019-09-06 上海艾为电子技术股份有限公司 Battery full charge testing circuit, electronic device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104333097B (en) * 2014-11-26 2017-05-10 惠州Tcl移动通信有限公司 Terminal and method for preventing battery polarization
CN106786962B (en) * 2017-01-13 2019-12-10 Oppo广东移动通信有限公司 Charging control method and device and terminal

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101501955A (en) * 2006-07-13 2009-08-05 株式会社Lg化学 Circuit current balancing method and apparatus for battery apparatus
CN101677144A (en) * 2008-09-16 2010-03-24 原子能委员会 Method for pulsed charging of a battery in a standalone system comprising a supercapacitor
CN105811493A (en) * 2014-12-31 2016-07-27 联想(北京)有限公司 Power source circuit, power source circuit discharging method, power source circuit charging method and controller
CN105990896A (en) * 2015-02-13 2016-10-05 深圳市华思旭科技有限公司 Power supply control circuit, mobile power supply and electric connection device
CN205846778U (en) * 2016-06-29 2016-12-28 深圳市沃特玛电池有限公司 A kind of Intelligent lithium battery balancing equipment
CN209356648U (en) * 2018-11-13 2019-09-06 上海艾为电子技术股份有限公司 Battery full charge testing circuit, electronic device

Also Published As

Publication number Publication date
CN110896240A (en) 2020-03-20

Similar Documents

Publication Publication Date Title
CN111158455A (en) Power consumption control method and device, storage medium and terminal
CN106786962B (en) Charging control method and device and terminal
CN111343682B (en) Network switching method, device, storage medium and terminal
CN106655381B (en) Wireless charging method and device
WO2015081664A1 (en) Method, apparatus, device and system for controlling wireless network to be switched on/off
US11050282B2 (en) Power supply control method and device, storage medium and electronic device
CN110688051B (en) Screen recording operation method and device, computer readable storage medium and terminal
CN110896240B (en) Charging control method and device, computer readable storage medium and terminal
CN111404242A (en) Charging method, charging device, storage medium and mobile terminal
CN111372003A (en) Camera switching method and device and terminal
CN112542867B (en) Mobile terminal power supply control method and device, terminal equipment and storage medium
CN110471622B (en) SD card data writing method and device, storage medium and terminal
CN106155733B (en) Method and device for running application program
CN109672242B (en) Terminal charging control method and device and storage medium
CN112437421A (en) Bluetooth control method, device, storage medium and mobile terminal
CN112367428A (en) Electric quantity display method and system, storage medium and mobile terminal
CN112261634A (en) Bluetooth transmission control method, device, terminal equipment and storage medium
CN111897916A (en) Voice instruction recognition method and device, terminal equipment and storage medium
CN111384754B (en) Charging method, charging device, storage medium and mobile terminal
CN112256610B (en) Connection control method, system, storage medium and mobile terminal
CN111984107B (en) Method and device for processing power supply abnormity of terminal equipment
CN110972075B (en) Positioning control method, positioning control circuit, storage medium and terminal
CN112350743B (en) Antenna selection circuit structure, antenna selection method and customer premises equipment
CN112491562B (en) Communication control method and device and mobile terminal
CN110972221B (en) Communication signal processing method and device and mobile terminal

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