CN109755997B - Charging method and terminal equipment - Google Patents

Charging method and terminal equipment Download PDF

Info

Publication number
CN109755997B
CN109755997B CN201811544003.6A CN201811544003A CN109755997B CN 109755997 B CN109755997 B CN 109755997B CN 201811544003 A CN201811544003 A CN 201811544003A CN 109755997 B CN109755997 B CN 109755997B
Authority
CN
China
Prior art keywords
charger
charging
battery
terminal device
connection state
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
CN201811544003.6A
Other languages
Chinese (zh)
Other versions
CN109755997A (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 CN201811544003.6A priority Critical patent/CN109755997B/en
Publication of CN109755997A publication Critical patent/CN109755997A/en
Application granted granted Critical
Publication of CN109755997B publication Critical patent/CN109755997B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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

Landscapes

  • Charge And Discharge Circuits For Batteries Or The Like (AREA)

Abstract

The embodiment of the invention provides a charging method and terminal equipment, which are applied to the technical field of communication and are used for solving the problem that in the process of quickly charging a battery of the terminal equipment, the battery leaks electricity at a charging interface of the terminal equipment due to the fact that a charger is pulled out. The method comprises the following steps: detecting the connection state of the charger in the process of charging the battery of the terminal equipment by the charger; when the connection state indication is detected to be unconnected, the charging switch tube of the terminal equipment is controlled to be cut off; the charging switch tube is used for switching on or off a path between a charging interface of the terminal equipment and a battery of the terminal equipment.

Description

Charging method and terminal equipment
Technical Field
The embodiment of the invention relates to the technical field of communication, in particular to a charging method and terminal equipment.
Background
With the high-speed popularization of terminal equipment (such as a smart phone), people rely on the terminal equipment more and more strongly. With the rapid development of terminal hardware and app (application) applications, the power consumption of terminal devices is also becoming larger and larger. In order to improve the cruising ability of the terminal equipment and reduce the charging time, the rapid charging is one of the necessary functions of the terminal equipment nowadays.
Fig. 1 is a schematic diagram of a conventional terminal device for fast charging, and as shown in fig. 1, a standard charger charges a battery through a charging switch (i.e., the switch Q1 and the switch Q2 in fig. 1), wherein the switch Q1 and the switch Q2 are both high-power N-type MOS transistors, an output voltage Vbus of the charger (i.e., a charging voltage of a charging interface of the terminal device) is slightly higher than a battery voltage Vbat, i.e., Vbus ≈ Vbat, and capacitors C1 and C2 are used to improve a load transient response of the entire charging circuit. Illustratively, a Micro Controller Unit (MCU) or a CPU controls a driving circuit to generate high voltage control signals CT1 and CT2 for driving the switch Q1 and the switch Q2 to be turned on, respectively.
However, when the user unplugs the charger during the fast charging process, the switch Q1 and the switch Q2 are still in the conducting state, so that the battery generates electric leakage at the charging interface of the terminal device, and the electric leakage not only increases the risk of corrosion of the charging interface, but also affects the normal operation of the external device externally connected to the terminal device.
Disclosure of Invention
The embodiment of the invention provides a charging method and terminal equipment, and aims to solve the problem that a battery leaks electricity at a charging interface of the terminal equipment due to the fact that a charger is pulled out in the process of quickly charging the battery of the terminal equipment.
In order to solve the above technical problem, the embodiment of the present invention is implemented as follows:
in a first aspect, a charging method is provided, which is applied to a terminal device, and includes:
detecting the connection state of a charger in the process that the charger charges a battery of the terminal equipment;
when the connection state indication is detected to be unconnected, controlling a charging switch tube of the terminal equipment to be cut off;
the charging switch tube is used for switching on or switching off a path between a charging interface of the terminal equipment and the battery.
In a second aspect, an embodiment of the present invention further provides a terminal device, including:
the detection module is used for detecting the connection state of the charger in the process that the charger charges the battery of the terminal equipment;
the control module is used for controlling the charging switch tube of the terminal equipment to be cut off when the detection module detects that the connection state indicates that the terminal equipment is not connected;
the charging switch tube is used for switching on and off a path between a charging interface of the terminal equipment and the battery.
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 executable on the processor, and when executed by the processor, the computer program implements the steps of the charging method according to the first aspect.
In a fourth aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the computer program implements the steps of the charging method according to the first aspect.
In the embodiment of the invention, in the process of charging the battery of the terminal equipment by the charger, the connection state of the charger is detected, so that when the connection state indication is detected to be unconnected, the charging switch tube of the terminal equipment is immediately controlled to be cut off, and the path between the charging interface of the terminal equipment and the battery is cut off, thereby avoiding the electric leakage of the charging interface.
Drawings
Fig. 1 is a schematic diagram of a charging architecture of a typical terminal device in the prior art;
fig. 2 is a schematic structural diagram of an android operating system according to an embodiment of the present invention;
fig. 3 is a schematic flow chart of a charging method according to an embodiment of the present invention;
fig. 4 is a second schematic flowchart of a charging method according to an embodiment of the present invention;
fig. 5 is a third schematic flow chart of a charging method according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a terminal device according to an embodiment of the present invention;
fig. 7 is a second schematic structural 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 obtained by a person skilled in the art without inventive step based on the embodiments of the present invention, are within the scope of the present invention.
It should be noted that "/" in this context means "or", for example, A/B may mean A or B; "and/or" herein is merely an association describing an associated object, and means that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. "plurality" means two or more than two.
It should be noted that, in the embodiments of the present invention, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. 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.
The execution main body of the charging protection method provided by the embodiment of the present invention may be a terminal device (including a mobile terminal device and a non-mobile terminal device), or a functional module and/or a functional entity capable of implementing the charging protection 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 charging protection method provided by the embodiment of the present invention.
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 device, 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.
For example, fig. 1 is a schematic diagram of a fast charging architecture of a currently-common terminal device, as shown in fig. 1, the terminal device includes: the charging interface, electric capacity C1, electric capacity C2, switch Q1, switch Q2, drive circuit, treater (such as MCU or CPU) and battery. The charger is connected with the terminal device through a charging interface, so that the battery can be charged through a charging switch tube (namely the switch Q1 and the switch Q2), the switch Q1 and the switch Q2 are both high-power N-Type MOS tubes, the switch Q1 and the switch Q2 are back-to-back, the capacitor C1 and the capacitor C2 are used for improving load transient response of the whole charging circuit, the charging interface can be micro USB, Type-C or an interface for realizing high-current charging customized by a user, the driving circuit can be an integrated IC or discrete voltage doubling circuit or the like, the battery is a combination of a lithium ion or lithium polymer battery core and a protection circuit or the like, and the processor is used for controlling the driving circuit to generate a high-voltage control signal (including the CT1 and the CT2, wherein the CT1 drives the switch Q1 and the CT2 to drive the switch Q2) to drive the switch Q1 and the switch Q2 to be conducted.
Furthermore, the output voltage Vbus of the charger (i.e. the charging voltage of the charging interface of the terminal device) is slightly higher than the battery voltage Vbat, i.e. Vbus ≈ Vbat.
The embodiment of the invention provides a charging method and a terminal device, wherein in the process of detecting that a charger charges a battery of the terminal device, the connection state of the charger is detected, so that when the connection state indication is detected to be unconnected, a charging switch tube (such as a switch Q1 and a switch Q2 in fig. 1) of the terminal device can be immediately controlled to be cut off, and a path between a charging interface of the terminal device and the battery is cut off, so that the problem of electric leakage of the battery at the charging interface of the terminal device caused by the removal of the charger in the process of quickly charging the battery of the terminal device can be avoided.
The terminal device in the embodiment of the present invention may be a terminal device having an operating system. The operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, and embodiments of the present invention are not limited in particular.
Next, a software environment applied to the charging protection method provided by the embodiment of the present invention is described by taking an android operating system as an example.
Fig. 2 is a schematic diagram of an architecture of a possible android operating system according to an embodiment of the present invention. In fig. 2, 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 charging protection method provided in the embodiment of the present invention based on the system architecture of the android operating system shown in fig. 2, so that the charging protection method may operate based on the android operating system shown in fig. 2. Namely, the processor or the terminal device can implement the charging protection method provided by the embodiment of the invention by running the software program in the android operating system.
The charging protection method according to the embodiment of the present invention is described below with reference to a flowchart of the charging protection method shown in fig. 3, where fig. 3 is a schematic flowchart of a charging method according to the embodiment of the present invention, and the charging protection method includes steps 201 and 202:
step 201: the terminal device detects the connection state of the charger in the process that the charger charges the battery of the terminal device.
In the embodiment of the present invention, there are two connection states of the charger, one state is used to indicate that the terminal device is not connected, that is, the charger is not connected to the charging interface of the terminal device, and the other state is used to indicate that the terminal device is connected, that is, the charger is connected to the charging interface of the terminal device.
Step 202: and when the terminal equipment detects that the connection state indicates that the terminal equipment is not connected, the charging switch tube of the terminal equipment is controlled to be cut off.
The charging switch tube is used to turn on and off a path between a charging interface of the terminal device and a battery of the terminal device, and may refer to the switch Q1 and the switch Q2 in fig. 1.
In the embodiment of the invention, as in a normal situation, a processor inside the terminal device generally controls a driving circuit inside the terminal device to send a high-voltage control signal to the charging switch tube so as to control the on and off of the charging switch tube, when the terminal device detects that the connection state indicates non-connection, an alarm can be sent to the processor, and the processor sends a control signal to the charging switch tube based on the alarm driving circuit so as to control the off of the charging switch tube.
Optionally, in the embodiment of the present invention, the terminal device may detect the connection state of the charger in two ways.
According to the charging protection method provided by the embodiment of the invention, in the process of detecting that the charger charges the battery of the terminal equipment, the connection state of the charger is detected, so that when the connection state indication is not connected, the charging switch tube of the terminal equipment is immediately controlled to be cut off, and the path between the charging interface of the terminal equipment and the battery is cut off, thereby avoiding the electric leakage of the charging interface.
In one possible implementation:
exemplarily, referring to fig. 3, as shown in fig. 4, the step 201 includes the following steps:
step 201a 1: the terminal device detects the charging voltage of the charging interface, the voltage of the battery and the discharging current of the battery in the process that the charger charges the battery of the terminal device.
Step 201a 2: if the charging voltage is less than or equal to the voltage of the battery and the discharging current is greater than 0 in the preset time period, the terminal equipment determines that the connection state indication of the charger is not connected, and otherwise, determines that the connection state indication is connected.
Wherein, the current of the battery comprises the charging current of the battery and the power consumption current of the terminal equipment.
Illustratively, the battery is usually provided with a fuel gauge circuit, and therefore, the terminal device can read the voltage Vbat of the battery and the charge/discharge current Ibat of the battery, etc. in real time through the fuel gauge circuit. In addition, the voltage Vbat of the battery may also be read in real time by a processor of the terminal device (for example, an MCU or a CPU in the terminal device), and the processor of the terminal device may also read the charging voltage Vbus of the charging interface in real time.
For example, taking the charging architecture shown in fig. 1 as an example, it is assumed that the charging battery of the battery is I1, the power consumption current of the terminal device is I2, the resistance of the charging switch tube when it is turned on is R, the voltage of the battery is Vbat, and the charging voltage Vbus of the charging interface. Then Vbus-Vbat + (I1+ I2) × R, i.e. Vbus-Vbat ═ (I1+ I2) × R, so that, during the process of charging the terminal device by the charger, if the charger is pulled out, the charging battery I1 charged into the battery becomes 0A instantaneously, the current flowing out from the battery is I2, and Vbus-Vbat ═ R (I2) × R, at which time, (I2) × R ≦ 0. Therefore, Vbus-Vbat is less than or equal to 0 and the current flowing out of the battery, the connection state of the charger is determined to indicate not connection, and the connection state of the charger is determined to indicate connection when Vbus-Vbat is greater than 0.
In combination with the above, the terminal device can determine the connection state of the charger by determining whether the difference between the charging voltage and the voltage of the battery is less than zero.
In the embodiment of the present invention, the terminal device may perform multiple detections on the charging voltage of the charging interface and the voltage and the discharging current of the battery within a predetermined time (e.g., 200ms), and determine that the connection status of the charger indicates no connection only when the charging voltage is less than or equal to the voltage of the battery and the discharging current is greater than 0.
In the embodiment of the invention, in the process of detecting that the charger charges the battery of the terminal device, the charging voltage of the charging interface, the voltage of the battery and the discharging current are detected, so that whether the charger is in the pull-out state is judged by detecting the charging voltage of the charging interface, the voltage of the battery and the discharging current of the battery, when the charger is detected to be in the pull-out state, the charging switch tube of the terminal device is immediately controlled to be cut off, and the path between the charging interface of the terminal device and the battery is cut off, so that the electric leakage of the charging interface can be avoided.
In two possible implementations:
exemplarily, referring to fig. 3, as shown in fig. 5, the step 201 includes the following steps:
step 201b 1: and the terminal equipment sends a detection signal to the charger.
In the embodiment of the invention, the terminal equipment sends a detection signal to the charger, if the charger feeds back a response signal to the terminal equipment, the detection signal is continuously sent, and if the charger does not feed back the response signal to the terminal equipment, the charger is judged to be pulled out, namely, the connection state indication of the charger is determined to be unconnected.
Further, in the embodiment of the present invention, the terminal device sends the detection signal to the charger according to a predetermined period, wherein at least one detection signal is sent in one period. For example, when the terminal device periodically transmits the detection signal, one detection signal may be transmitted in one period, or a plurality of detection signals may be transmitted in one period.
The predetermined period may be flexibly set by the user according to the actual application scenario, or may be a fixed value, which is not limited in the present invention.
In one example, the terminal device sends a detection signal and receives a response signal fed back by the charger through a D +/D-data line of a microUSB or TypeC interface port. Illustratively, taking the D +/D-data line of the TypeC interface port as an example, the terminal device may send a CLK signal over the D + data line and a detection signal (8 bits per command) over the D-data line, e.g., the detection signal is transmitted during CLK high level. Generally, D +/D-always has a detection signal when in quick charging, and the sending period is 20 ms.
Step 201b 2: and if the terminal equipment does not receive the response signal fed back by the charger, determining that the connection state indication of the charger is not connected, otherwise, determining that the connection state indication is connected.
In the embodiment of the present invention, if the terminal device does not receive the response signal fed back by the charger, it indicates that the connection between the charger and the terminal device is abnormal, so that the terminal device cannot receive the response signal fed back by the charger, or the charger does not receive the detection signal. Otherwise, the terminal equipment receives the response signal fed back by the charger, and the charger is normally connected with the terminal equipment.
Further, the step 201b2 specifically includes the following steps:
step A: and if the terminal equipment does not receive a response signal fed back by the charger after continuously sending M detection signals, determining that the connection state indication of the charger is not connected, wherein M is an integer greater than 1.
For example, in order to improve the detection accuracy, the terminal device may determine that the charger has been unplugged and determine that the connection state of the charger indicates no connection in a case where the charger continuously transmits M detection signals to the terminal device without a response signal.
In one example, M detection signals correspond to one response signal, that is, the terminal device determines that the charger has been pulled out when the terminal device does not receive the corresponding response signal after continuously transmitting the M detection signals.
In another example, one detection signal corresponds to one response signal, that is, it is determined that the charger has been pulled out as long as the number of consecutive times that the charger does not respond reaches M times.
In the embodiment of the invention, the terminal equipment sends the detection signal to the charger in the process that the charger charges the battery of the terminal equipment, so that whether the charger is in the pull-out state is judged by judging whether the charger feeds back the response signal to the terminal equipment, when the charger is detected to be in the pull-out state, the charging switch tube of the terminal equipment is immediately controlled to be cut off, and the path between the charging interface of the terminal equipment and the battery is cut off, so that the electric leakage of the charging interface can be avoided.
Fig. 6 is a schematic diagram of a possible structure of a terminal device according to an embodiment of the present invention, as shown in fig. 6, the terminal device 300 includes a detection module 301 and a control module 302, where:
the detecting module 301 is configured to detect a connection state of a charger during a process that the charger charges a battery of the terminal device 300.
The control module 302 is used for controlling the charging switch tube of the terminal device 300 to be cut off when the detection module 301 detects that the connection state indicates that the terminal device is not connected; the charging switch tube is used for switching on and off a path between a charging interface of the terminal device 300 and the battery.
Optionally, the detection module 301 is specifically configured to: detecting the charging voltage of a charging interface, the voltage of a battery and the discharging current of the battery; and if the charging voltage is less than or equal to the voltage of the battery and the discharging current is greater than 0 in the preset time period, determining that the connection state indication of the charger is not connected, and otherwise, determining that the connection state indication is connected.
Optionally, the detection module 301 is specifically configured to: sending a detection signal to a charger; if the terminal device 300 does not receive the response signal fed back by the charger, it is determined that the connection state indication of the charger is not connected, otherwise, it is determined that the connection state indication is connected.
Optionally, the detection module 301 is specifically configured to: sending a detection signal to a charger according to a preset period; wherein at least one detection signal is transmitted in one period.
Optionally, the detection module 301 is specifically configured to: if the terminal device 300 does not receive M response signals fed back by the charger after continuously sending M detection signals, it is determined that the connection state indication of the charger is not connected, and M is an integer greater than 1.
According to the terminal device provided by the embodiment of the invention, in the process of charging the battery of the terminal device by the charger, the connection state of the charger is detected, so that when the connection state indication is detected to be unconnected, the charging switch tube of the terminal device is immediately controlled to be cut off, and the path between the charging interface of the terminal device and the battery is cut off, so that the charging interface can be prevented from generating electric leakage.
The terminal device provided by the embodiment of the present invention can implement each process implemented by the terminal device in the above method embodiments, and is not described here again to avoid repetition.
Fig. 7 is a schematic diagram of a hardware structure of a terminal device for implementing various embodiments of the present invention, where 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 configuration of the terminal device 100 shown in fig. 7 does not constitute a limitation of the terminal device, and that the terminal device 100 may include more or less components than those shown, or combine some components, or arrange different components. In the embodiment of the present invention, the terminal device 100 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 detect a connection state of the charger in a process that the charger charges a battery of the terminal device, and control a charging switching tube of the terminal device to be turned off when detecting that the connection state indicates that the battery is not connected; the charging switch tube is used for switching on and off a path between a charging interface of the terminal device and the battery.
According to the terminal device provided by the embodiment of the invention, in the process of charging the battery of the terminal device by the charger, the connection state of the charger is detected, so that when the connection state indication is detected to be unconnected, the charging switch tube of the terminal device is immediately controlled to be cut off, and the path between the charging interface of the terminal device and the battery is cut off, so that the charging interface can be prevented from generating electric leakage.
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 100 provides the user with wireless broadband internet access via the network module 102, such as helping the user send and receive e-mails, browse web pages, and access streaming media.
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 100. 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. 7, the touch panel 1071 and the display panel 1061 are two independent components to implement the input and output functions of the terminal device 100, 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 100, 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 100, connects various parts of the entire terminal device 100 by various interfaces and lines, and performs various functions of the terminal device 100 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 100. 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 includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor 110, where the computer program, when executed by the processor, implements each process of the above charging protection method embodiment, and can achieve the same technical effect, and details are not repeated here to avoid repetition.
The 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 above-mentioned embodiment of the charging protection method, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. 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 (10)

1. A charging method is applied to terminal equipment, and is characterized by comprising the following steps:
detecting the connection state of a charger in the process that the charger charges a battery of the terminal equipment;
when the connection state indication is detected to be unconnected, controlling a charging switch tube of the terminal equipment to be cut off;
the charging switch tube is used for switching on and off a path between a charging interface of the terminal equipment and the battery;
the detecting a connection state of the charger includes:
detecting the charging voltage of the charging interface, the voltage of the battery and the discharging current of the battery;
if the charging voltage is less than or equal to the voltage of the battery and the discharging current is greater than 0 in a preset time period, determining that the connection state indication of the charger is not connected, otherwise, determining that the connection state indication is connected.
2. The method of claim 1, wherein the detecting the connection status of the charger comprises:
sending a detection signal to the charger;
and if the terminal equipment does not receive the response signal fed back by the charger, determining that the connection state indication of the charger is not connected, otherwise, determining that the connection state indication is connected.
3. The method of claim 2, wherein said sending a detection signal to said charger comprises:
sending a detection signal to the charger according to a preset period;
wherein at least one detection signal is transmitted in one period.
4. The method according to claim 2 or 3, wherein the determining that the connection status of the charger indicates not connected if the terminal device does not receive the response signal fed back by the charger comprises:
and if the terminal equipment does not receive a response signal fed back by the charger after continuously sending M detection signals, determining that the connection state indication of the charger is not connected, wherein M is an integer greater than 1.
5. A terminal device, comprising:
the detection module is used for detecting the connection state of the charger in the process that the charger charges the battery of the terminal equipment;
the control module is used for controlling the charging switch tube of the terminal equipment to be cut off when the detection module detects that the connection state indicates that the terminal equipment is not connected;
the charging switch tube is used for switching on and off a path between a charging interface of the terminal equipment and the battery;
the detection module is specifically configured to:
detecting the charging voltage of the charging interface, the voltage of the battery and the discharging current of the battery;
if the charging voltage is less than or equal to the voltage of the battery and the discharging current is greater than 0 in a preset time period, determining that the connection state indication of the charger is not connected, otherwise, determining that the connection state indication is connected.
6. The terminal device of claim 5, wherein the detection module is specifically configured to:
sending a detection signal to the charger;
and if the terminal equipment does not receive the response signal fed back by the charger, determining that the connection state indication of the charger is not connected, otherwise, determining that the connection state indication is connected.
7. The terminal device of claim 6, wherein the detection module is specifically configured to:
sending a detection signal to the charger according to a preset period;
wherein at least one detection signal is transmitted in one period.
8. The terminal device according to claim 6 or 7, wherein the detection module is specifically configured to:
and if the terminal equipment does not receive a response signal fed back by the charger after continuously sending M detection signals, determining that the connection state indication of the charger is not connected, wherein M is an integer greater than 1.
9. 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 charging method according to any one of claims 1 to 4.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the charging method according to any one of claims 1 to 4.
CN201811544003.6A 2018-12-17 2018-12-17 Charging method and terminal equipment Active CN109755997B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811544003.6A CN109755997B (en) 2018-12-17 2018-12-17 Charging method and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811544003.6A CN109755997B (en) 2018-12-17 2018-12-17 Charging method and terminal equipment

Publications (2)

Publication Number Publication Date
CN109755997A CN109755997A (en) 2019-05-14
CN109755997B true CN109755997B (en) 2021-05-25

Family

ID=66402722

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811544003.6A Active CN109755997B (en) 2018-12-17 2018-12-17 Charging method and terminal equipment

Country Status (1)

Country Link
CN (1) CN109755997B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112054564B (en) * 2019-06-05 2022-07-19 Oppo广东移动通信有限公司 Circuit detection method and device, equipment and storage medium
CN111722122B (en) * 2020-06-01 2023-01-03 Oppo广东移动通信有限公司 Detection method, detection device, electronic equipment and computer-readable storage medium
CN113156244B (en) * 2021-04-12 2022-07-12 Oppo广东移动通信有限公司 Method and device for testing charging device, electronic device and storage medium
CN114005232B (en) * 2021-12-29 2022-04-19 广州市科锐达光电技术股份有限公司 No-leakage TYPE-C burglar alarm

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106684955B (en) * 2015-11-11 2019-10-15 小米科技有限责任公司 Charger, electronic equipment and charging method
US10326296B2 (en) * 2016-02-01 2019-06-18 Qualcomm Incorporated Dual-phase operation for concurrently charging a battery and powering a peripheral device
CN107231013B (en) * 2016-05-24 2019-01-15 华为技术有限公司 A kind of method of charging, terminal, charger and system
WO2017201738A1 (en) * 2016-05-27 2017-11-30 广东欧珀移动通信有限公司 Battery protecting board, battery, and mobile terminal
CN106786994A (en) * 2017-02-20 2017-05-31 维沃移动通信有限公司 A kind of charging method, charger and mobile terminal
CN108233460B (en) * 2017-09-04 2021-10-22 珠海市魅族科技有限公司 Charging method, charging device and terminal equipment

Also Published As

Publication number Publication date
CN109755997A (en) 2019-05-14

Similar Documents

Publication Publication Date Title
CN109755997B (en) Charging method and terminal equipment
US11929635B2 (en) Charging method and charging device
CN108494030B (en) Wireless charging method, terminal and transmitting terminal equipment
CN108572767B (en) Method for determining external object position and mobile terminal
CN110058836B (en) Audio signal output method and terminal equipment
US11582655B2 (en) Condition handover cancellation method and communication equipment
CN109828705B (en) Icon display method and terminal equipment
CN109639887B (en) Control method and terminal equipment
CN109888928B (en) Terminal and wireless charging control method
CN108767919B (en) Charging device, terminal equipment and charging method
CN109560591B (en) Charging method, device and terminal
CN109976611B (en) Terminal device control method and terminal device
CN107834640B (en) Charging method and terminal
CN110730017A (en) Radio frequency device, control method thereof and terminal equipment
US20220046534A1 (en) Power control device, method, and terminal device
CN110597437A (en) Screen capturing method and terminal equipment
CN110012151B (en) Information display method and terminal equipment
CN108448177B (en) Charging method and terminal
CN111343710A (en) Power adjustment method and electronic equipment
CN108649716B (en) Signal transmission method, receiving end, sending end and terminal equipment
US20230017912A1 (en) Electric quantity indicating method and electronic device
CN109451154B (en) Method for setting multimedia file and terminal equipment
CN111309133A (en) Power saving control method and electronic equipment
CN108595352B (en) Protection method and device for mobile terminal
CN108845261B (en) Electric quantity prompting method and terminal equipment

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