CN112737061A - Charger charging processing method and device, charging terminal equipment and storage medium - Google Patents

Charger charging processing method and device, charging terminal equipment and storage medium Download PDF

Info

Publication number
CN112737061A
CN112737061A CN202110089106.3A CN202110089106A CN112737061A CN 112737061 A CN112737061 A CN 112737061A CN 202110089106 A CN202110089106 A CN 202110089106A CN 112737061 A CN112737061 A CN 112737061A
Authority
CN
China
Prior art keywords
mobile terminal
charger
charging
current consumed
connected mobile
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.)
Pending
Application number
CN202110089106.3A
Other languages
Chinese (zh)
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.)
Huizhou TCL Mobile Communication Co Ltd
Original Assignee
Huizhou TCL 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 Huizhou TCL Mobile Communication Co Ltd filed Critical Huizhou TCL Mobile Communication Co Ltd
Priority to CN202110089106.3A priority Critical patent/CN112737061A/en
Publication of CN112737061A publication Critical patent/CN112737061A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/0047Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries with monitoring or indicating devices or circuits
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/0029Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries with safety or protection devices or circuits

Landscapes

  • Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Charge And Discharge Circuits For Batteries Or The Like (AREA)

Abstract

The invention discloses a charger charging processing method, a charger charging processing device, charging terminal equipment and a storage medium, wherein the method comprises the following steps: detecting whether a charger is connected with the mobile terminal to start a charging function; when the charger is connected with the mobile terminal and starts a charging function, acquiring the current consumed by the connected mobile terminal; judging whether the current consumed by the connected mobile terminal is greater than a first threshold, if so, the connected mobile terminal is in a charging state; monitoring the current consumed by the connected mobile terminal in a charging state; and when the difference between the current consumed by the connected mobile terminal at the last time and the current consumed by the connected mobile terminal at the previous time is larger than a second threshold, the charging function is closed. The invention can monitor whether the current actually output to the charger changes violently when the charger is connected with the charger through the data line to start charging so as to predict the problems of heating/short circuit and the like of the charger side in advance, avoid safety accidents of the charger during charging, improve the safety and provide convenience for users to use.

Description

Charger charging processing method and device, charging terminal equipment and storage medium
Technical Field
The present invention relates to the field of charger technologies, and in particular, to a charger charging processing method and apparatus, a charging terminal device, and a storage medium.
Background
With the development of science and technology and the continuous improvement of the living standard of people, various intelligent terminals such as mobile phones are more and more popularized, and the mobile phones become indispensable communication tools in the life of people.
Because the lithium battery has the advantages of no memory effect, long service life and the like, the lithium battery is generally adopted for supplying power for the charger at present. With the development of the charger technology, the existing charger has more functions, including not only basic functions of short messages, telephones and the like, but also various games, WeChat, mobile payment, online videos and the like, so that the function of one charger even exceeds that of one PC; based on such many application functions, the time for the user to use the charger is greatly increased, which results in that although the power consumption control and the battery capacity of the charger are greatly superior to those of the prior functional mobile phones, the charger often needs to be charged at least once a day to maintain normal use. The charger often passes through the USB interface when charging, both can carry out data communication and can charge again, and the charging current is all great in the charging process, in order to avoid the incident appearing in the charging process, the charger side all can monitor the charging current, but does not basically monitor whether safe to the charger end self-monitoring charging process among the prior art charging process, cause often to lack control to the charger side, the charger is direct to link to each other with 220V in fact and more easily makes large-scale incident.
Thus, there is a need for improvements and enhancements in the art.
Disclosure of Invention
The present invention aims to solve the above-mentioned problems of the prior art, and provide a charger charging processing method, device, charging terminal device and storage medium, which can monitor whether the current actually output to the charger changes dramatically when the charger starts charging by connecting the charger via a data line, so as to predict the problems of heating/short circuit at the charger side in advance, avoid the occurrence of safety accidents during charging of the charger, improve the safety, and provide convenience for the user.
In order to solve the technical problems, the technical scheme adopted by the invention is as follows:
a charger charging processing method comprises the following steps:
detecting whether a charger is connected with the mobile terminal to start a charging function;
when the charger is connected with the mobile terminal and starts a charging function, acquiring the current consumed by the connected mobile terminal;
judging whether the current consumed by the connected mobile terminal is greater than a first threshold, if so, the connected mobile terminal is in a charging state;
monitoring the current consumed by the connected mobile terminal in a charging state;
and when the difference between the current consumed by the connected mobile terminal at the last time and the current consumed by the connected mobile terminal at the previous time is larger than a second threshold, the charging function is closed.
The charger charging processing method comprises the steps that the first threshold is 50mA, and the second threshold is 2000 mA.
The charger charging processing method comprises the following steps of detecting whether a charger is connected with a mobile terminal or not to start a charging function:
judging whether a charging function of a charger is started or not by detecting whether a power supply pin VBUS on a USB port for supplying power to the mobile terminal generates rising edge interruption or not;
and when detecting that a power supply pin VBUS on a USB port for supplying power to the mobile terminal generates rising edge interruption, judging that a charging function of the charger is started.
The charger charging processing method, wherein the step of detecting whether the charger is connected with the mobile terminal to start the charging function further comprises:
whether the charging function of the charger is started or not is judged by reading the register value related to the power management chip.
The charger charging processing method comprises the following steps that when the charger is connected with the mobile terminal and starts a charging function, the step of acquiring the current consumed by the connected mobile terminal comprises the following steps:
when the charging function of the charger is closed, acquiring the magnitude of the output current of the charger as a first current P1;
when the charging function of the charger is started, the magnitude of the output current of the charger is obtained as a second current P2;
the difference between the first current P2 and the second current P1 is the amount of current consumed by the mobile terminal connected to the mobile terminal.
The charger charging processing method includes the steps of judging whether the current consumed by the connected mobile terminal is greater than a first threshold, and if so, enabling the connected mobile terminal to be in a charging state, and including:
judging whether the current consumed by the connected mobile terminal is greater than a first threshold;
when the current consumed by the connected mobile terminal is larger than a first threshold, the connected mobile terminal is in a charging state;
when the current consumed by the connected mobile terminal is less than the first threshold, the connected mobile terminal is not in an uncharged state.
The charger charging processing method, wherein the step of turning off the charging function when the difference between the current consumed by the connected mobile terminal at the last time and the current consumed by the connected mobile terminal at the last time is greater than a second threshold comprises:
acquiring the monitored current consumed by the connected mobile terminal in a charging state in real time;
comparing the current consumed by connecting the mobile terminal obtained each time with the current consumed by connecting the mobile terminal obtained last time
And when the difference between the current consumed by the connected mobile terminal at the last time and the current consumed by the connected mobile terminal at the previous time is greater than a second threshold, controlling to close the charging function of the charger.
A charger charge processing device, wherein the device comprises:
the detection module is used for detecting whether the charger is connected with the mobile terminal to start a charging function;
the acquisition module is used for acquiring the current consumed by the connected mobile terminal when the charger is connected with the mobile terminal and the charging function is started;
the judging module is used for judging whether the current consumed by the connected mobile terminal is greater than a first threshold, and if so, the connected mobile terminal is in a charging state;
the monitoring module is used for monitoring the current consumed by the connected mobile terminal in a charging state;
and the overrun control module is used for closing the charging function when the difference between the current consumed by the connected mobile terminal at the last time and the current consumed by the connected mobile terminal at the previous time is greater than a second threshold.
A charging terminal device comprises a memory, a processor and a charger charging processing program which is stored on the memory and can run on the processor, wherein when the processor executes the charger charging processing program, the steps of any charger charging processing method are realized.
A computer-readable storage medium, wherein a charger charging processing program is stored thereon, which when executed by a processor, implements the steps of any of the charger charging processing methods.
Has the advantages that: compared with the prior art, the invention provides a charger charging processing method, which is characterized in that the change of the actual current output to the charger by the charger is monitored, when the change value is larger instantly, the charger side is considered to be abnormal (such as short circuit, charging overheating and the like), the charger can respond in time to actively turn off the charging path to the charger, the charger is protected, the problems of heating/short circuit and the like of the charger side are predicted in advance, the occurrence of safety accidents of the charger during charging is avoided, the safety is improved, convenience is provided for users to use, and convenience is provided for users to use.
Drawings
Fig. 1 is a flowchart of a specific implementation of a charger charging processing method according to an embodiment of the present invention.
Fig. 2 is a flowchart illustrating a method for processing charging of a charger according to an embodiment of the present invention to determine whether a charging function is activated.
Fig. 3 is a flowchart illustrating a current detection process of a mobile terminal connected to a charger according to a charging processing method of the charger of the present invention.
Fig. 4 is a flowchart illustrating a charging status confirmation method for a charger according to an embodiment of the present invention.
Fig. 5 is a flowchart illustrating a control procedure of abnormal shutdown of charging in the charger charging processing method according to the embodiment of the present invention.
Fig. 6 is a schematic block diagram of a charger charging processing apparatus according to an embodiment of the present invention.
Fig. 7 is a schematic block diagram of an internal structure of a charging terminal device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and effects of the present invention clearer and clearer, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
It should be noted that, if directional indications (such as up, down, left, right, front, and back … …) are involved in the embodiment of the present invention, the directional indications are only used to explain the relative positional relationship between the components, the movement situation, and the like in a specific posture (as shown in the drawing), and if the specific posture is changed, the directional indications are changed accordingly.
In addition, if there is a description of "first", "second", etc. in an embodiment of the present invention, the description of "first", "second", etc. is for descriptive purposes only and is not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In addition, technical solutions between various embodiments may be combined with each other, but must be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope of the present invention.
Today, people and various charging terminal devices such as mobile phones, tablets, computers and televisions are surrounded by people in life as the videos follow up. The charging terminal device has slowly penetrated into every corner of people's life.
With the development of science and technology and the continuous improvement of the living standard of people, various intelligent terminals such as mobile phones are more and more popularized, and the mobile phones become indispensable communication tools in the life of people.
Because the lithium battery has the advantages of no memory effect, long service life and the like, the lithium battery is generally adopted for supplying power for the charger at present. With the development of the charger technology, the existing charger has more functions, including not only basic functions of short messages, telephones and the like, but also various games, WeChat, mobile payment, online videos and the like, so that the function of one charger even exceeds that of one PC; based on such many application functions, the time for the user to use the charger is greatly increased, which results in that although the power consumption control and the battery capacity of the charger are greatly superior to those of the prior functional mobile phones, the charger often needs to be charged at least once a day to maintain normal use. The charger often passes through the USB interface when charging, both can carry out data communication and can charge again, and the charging current is all great in the charging process, in order to avoid the incident appearing in the charging process, the charger side all can monitor the charging current, but does not basically monitor the charger end among the prior art charging process, and the charger side then often lacks control, and the charger is direct to link to each other with 220V in fact and makes large-scale incident more easily, and the operation is very inconvenient.
In order to solve the problems in the prior art, the present embodiment provides a charger charging processing method, by which a charging function of a charger is detected to be started; acquiring current consumed by a connected charger; judging whether the current consumed by the connected charger is larger than a first threshold, if so, the connected charger is in a charging state; otherwise, the connected charger is not in a charging state; monitoring the current consumed by the connected charger, and closing the charging function when the difference between the current consumed by the connected charger at the last time and the current consumed by the connected charger at the previous time is greater than a second threshold; when making the charger pass through the data line and connecting the charger and begin to charge, whether the electric current that can the actual output of charger side for the charger takes place violent change to foresee charger side in advance/short circuit scheduling problem, avoid the charger because the incident takes place during charging, promote user experience.
Exemplary method
The charger charging processing method of the embodiment may be applied to a charging terminal device, specifically as shown in fig. 1, and includes the following steps:
s100, detecting whether a charger is connected with a mobile terminal to start a charging function;
in the embodiment of the invention, when the mobile terminal mobile phone needs to be charged, the charger is connected with the mobile terminal mobile phone, and the charger can detect whether the charging function is started or not after connection.
In one embodiment, the step S100 specifically includes:
step S101, judging whether a charging function of a charger is started or not by detecting whether a power supply pin VBUS on a USB port for supplying power to the mobile terminal generates rising edge interruption or not;
and step S102, when detecting that a power supply pin VBUS on a USB port for supplying power to the mobile terminal generates rising edge interruption, judging that a charging function of the charger is started.
In the embodiment of the invention, whether the charging function of the charger is started is judged by detecting whether the power supply pin VBUS on the USB port for supplying power to the mobile terminal generates the rising edge interruption or not, and when the power supply pin VBUS on the USB port for supplying power to the mobile terminal generates the rising edge interruption or not, the charging function of the charger is judged to be started, so that whether the charging function of the charger is started or not is conveniently detected.
Of course, in another embodiment, whether the charger is connected with the mobile terminal to start the charging function is detected, and whether the charging function of the charger is started can also be judged by reading the register value related to the power management chip.
Specifically, when the charging function of the charger is started, the charger is enabled to supply power to the outside by setting the value of the relevant register of the power management chip; the specific register of the power management chip can be obtained by inquiring a manual of the power management chip or directly inquiring a manufacturer of the power management chip. Therefore, whether the charging function of the charger is started or not can be conveniently detected and judged by reading the register value related to the power management chip, and the detection efficiency is improved.
Step S200, when the charger is connected with the mobile terminal and a charging function is started, acquiring the current consumed by the connected mobile terminal;
in the embodiment of the invention, when the charger is connected with the mobile terminal mobile phone and the charging function is started, the current consumed by the connected mobile terminal is obtained. The current consumed by the connected mobile terminal is acquired, so that whether the current is normal or not can be analyzed and compared conveniently in the future, and corresponding measures can be taken in time.
In one embodiment, as shown in fig. 3, the step S200 specifically includes:
step S201, when the charging function of the charger is closed, acquiring the magnitude of the output current of the charger as a first current P1;
step S202, when the charging function of the charger is started, acquiring a second current P2 as the magnitude of the output current of the charger;
in step S203, the difference between the first current P2 and the second current P1 is the magnitude of the current consumed by the mobile terminal connected to the mobile terminal.
That is, in the embodiment of the present invention, the charger end first obtains the first current P1 as the magnitude of the output current of the charger when the charging function of the charger is turned off; then, the charging function of the charger is started, and the output current of the charger is obtained as a second current P2; comparing the difference between the first current P2 and the second current P1 is the magnitude of the current consumed by the mobile terminal connected to the mobile terminal. The current consumed by the connected mobile terminal is acquired, so that whether the current is normal or not can be analyzed and compared conveniently in the future, and corresponding measures can be taken in time.
Step S300, judging whether the current consumed by the connected mobile terminal is greater than a first threshold, if so, the connected mobile terminal is in a charging state;
in the embodiment of the invention, after the current consumed by the connected mobile terminal is acquired, whether the current consumed by the connected mobile terminal is greater than a first threshold or not is judged, and if so, the connected mobile terminal is judged to be in a charging state. In the embodiment of the present invention, preferably, the first threshold is 50 mA.
In one embodiment, as shown in fig. 4, the step S300 specifically includes:
step S301, judging whether the current consumed by the connected mobile terminal is greater than a first threshold;
step S302, when the current consumed by the connected mobile terminal is larger than a first threshold, the connected mobile terminal is in a charging state;
step S303, when the current consumed by the connected mobile terminal is less than the first threshold, the connected mobile terminal is not in the uncharged state.
In the embodiment of the present invention, after the current consumed by the connected mobile terminal is obtained, the current consumed by the connected mobile terminal is compared with a first threshold (for example, 50mA), and whether the current consumed by the connected mobile terminal is greater than the first threshold (for example, 50mA) is determined. When the current consumed by the connected mobile terminal is greater than the first threshold, the connected mobile terminal is in a charging state. When the current consumed by the connected mobile terminal is less than the first threshold, the connected mobile terminal is not in an uncharged state. The first threshold is set to be 50mA, and the charging can be smoothly carried out only when the first threshold is larger than the first threshold, so that convenience is provided for the use of a user.
Step S400, monitoring the current consumed by the connected mobile terminal in the charging state;
namely, in the embodiment of the invention, the current consumed by the connected mobile terminal when the charger is in the charging state can be monitored in real time. To monitor whether the current changes too much to cause an abnormality.
And step S500, when the difference between the current consumed by the connected mobile terminal at the last time and the current consumed by the connected mobile terminal at the previous time is greater than a second threshold, the charging function is closed.
In the embodiment of the present invention, when a difference between a last time and a previous time of a current consumed by the connected mobile terminal is greater than a second threshold, the charging function is turned off, and preferably, the second threshold is 2000 mA. In other words, in the embodiment of the present invention, when it is monitored that the current difference ratio consumed by the mobile terminal twice exceeds the second threshold of 2000mA, it is considered that the consumed current is abnormal, for example, a short circuit or an overvoltage may occur, and the present invention may control to immediately close the charging function, reduce damage to the electrical appliance, and improve the safety.
In one embodiment, as shown in fig. 5, the step S500 specifically includes:
step S501, current consumed by the connected mobile terminal in a charging state is obtained in real time;
step S502, comparing the current consumed by connecting the mobile terminal obtained each time with the current consumed by connecting the mobile terminal obtained last time;
and step S503, when the difference between the current consumed by the connected mobile terminal and the current consumed by the connected mobile terminal is larger than a second threshold, controlling to close the charging function of the charger.
Namely, in the embodiment of the invention, the current consumed by the connected mobile terminal is monitored in real time when the charging state of the charger is monitored; comparing the current consumed by connecting the mobile terminal obtained each time with the current consumed by connecting the mobile terminal obtained last time; and when the difference between the current consumed by the connected mobile terminal at the last time and the current consumed by the connected mobile terminal at the previous time is greater than a second threshold, controlling to close the charging function of the charger. Preferably, the second threshold is 2000 mA. In other words, in the embodiment of the present invention, when it is monitored that the current difference ratio consumed by the mobile terminal twice exceeds the second threshold of 2000mA, it is considered that the consumed current is abnormal, for example, a short circuit or an overvoltage may occur, and the present invention may control to immediately close the charging function, reduce damage to the electrical appliance, and improve the safety.
Therefore, when the charger is connected with the charger through the data line and starts charging, the invention can monitor whether the current actually output to the charger at the charger side is changed violently or not so as to predict the problems of heating/short circuit at the charger side in advance, avoid the safety accidents of the charger during charging, improve the safety and provide convenience for users.
Exemplary device
As shown in fig. 6, an embodiment of the present invention provides a charger charging processing apparatus, including:
the detection module 10 is used for detecting whether the charger is connected with the mobile terminal to start a charging function;
the acquiring module 20 is configured to acquire a current consumed by the connected mobile terminal when the charger is connected to the mobile terminal and starts a charging function;
the judging module 30 is configured to judge whether a current consumed by the connected mobile terminal is greater than a first threshold, and if so, the connected mobile terminal is in a charging state;
a monitoring module 40, configured to monitor a current consumed by a connected mobile terminal in a charging state;
and an overrun control module 50, configured to turn off the charging function when a difference between a current consumed by the connected mobile terminal at a previous time and a current consumed by the connected mobile terminal is greater than a second threshold.
In one implementation, the detection module 10 includes:
the first detection and judgment unit is used for judging whether a charging function of a charger is started or not by detecting whether a power supply pin VBUS on a USB port for supplying power to the mobile terminal generates rising edge interruption or not;
and the second detection and judgment unit is configured to judge that the charging function of the charger is started when detecting that the power supply pin VBUS on the USB port for supplying power to the mobile terminal generates a rising edge interrupt, which is specifically described above.
In one implementation, the obtaining module 20 includes:
the shutdown detection unit is used for acquiring the magnitude of the output current of the charger as a first current P1 when the charging function of the charger is shut down;
the starting detection unit is used for acquiring the magnitude of the output current of the charger as a second current P2 when the charging function of the charger is started;
the comparison unit is used for comparing the difference between the first current P2 and the second current P1, which is the magnitude of the current consumed by the mobile terminal connected with the mobile terminal.
In one implementation, the determining module 30 includes:
the first judging unit is used for judging whether the current consumed by the connected mobile terminal is greater than a first threshold or not;
the second judging unit is used for judging that the connected mobile terminal is in a charging state when the current consumed by the connected mobile terminal is greater than the first threshold;
the third determining unit is configured to determine that the connected mobile terminal is not in the uncharged state when the current consumed by the connected mobile terminal is smaller than the first threshold, which is specifically described above.
In one implementation, overrun control module 30 includes:
the detection acquisition unit is used for acquiring the monitored current consumed by the connected mobile terminal in the charging state in real time;
the detection and comparison unit is used for comparing the current consumed by the mobile terminal connected with the detection and comparison unit each time with the current consumed by the mobile terminal connected with the detection and comparison unit last time;
and a control closing unit, configured to control to close the charging function of the charger when a difference between a current consumed by the connected mobile terminal at a later time and a current consumed at a previous time is greater than a second threshold, which is specifically described above.
Based on the above embodiments, the present invention further provides a charging terminal device, and a schematic block diagram thereof may be as shown in fig. 7. The charging terminal device comprises a processor, a memory, a network interface, a display screen and a USB charging interface which are connected through a system bus. Wherein the processor of the charging terminal device is configured to provide computing and control capabilities. The memory of the charging terminal device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the charging terminal device is used for connecting and communicating with an external terminal through a network. The computer program is executed by a processor to implement a charger charging processing method. The display screen of the charging terminal equipment can be a liquid crystal display screen or an electronic ink display screen, and the USB charging interface of the charging terminal equipment is arranged inside the charging terminal equipment in advance and used for detecting the operating temperature of the internal equipment.
It will be understood by those skilled in the art that the schematic block diagram shown in fig. 7 is only a block diagram of a part of the structure related to the scheme of the present invention, and does not constitute a limitation of the charging terminal device to which the scheme of the present invention is applied, and a specific charging terminal device may include more or less components than those shown in the figure, or combine some components, or have a different arrangement of components.
In one embodiment, a charging terminal device is provided, the charging terminal device includes a memory, a processor, and a charger charging processing program stored on the memory and executable on the processor, and when the processor executes the charger charging processing program, the following operation instructions are implemented:
detecting whether a charger is connected with the mobile terminal to start a charging function;
when the charger is connected with the mobile terminal and starts a charging function, acquiring the current consumed by the connected mobile terminal;
judging whether the current consumed by the connected mobile terminal is greater than a first threshold, if so, the connected mobile terminal is in a charging state;
monitoring the current consumed by the connected mobile terminal in a charging state;
and when the difference between the current consumed by the connected mobile terminal at the last time and the current consumed by the connected mobile terminal at the last time is greater than the second threshold, the charging function is turned off, specifically as described above.
Wherein the first threshold is 50mA, and the second threshold is 2000 mA.
Wherein, the step of detecting whether the charger is connected with the mobile terminal to start the charging function comprises:
judging whether a charging function of a charger is started or not by detecting whether a power supply pin VBUS on a USB port for supplying power to the mobile terminal generates rising edge interruption or not;
and when detecting that a power supply pin VBUS on a USB port for supplying power to the mobile terminal generates rising edge interruption, judging that a charging function of the charger is started.
Wherein, the step of detecting whether the charger is connected with the mobile terminal to start the charging function further comprises:
whether the charging function of the charger is started or not is judged by reading the register value related to the power management chip.
Wherein, when the charger is connected with the mobile terminal and starts the charging function, the step of obtaining the current consumed by the connected mobile terminal comprises:
when the charging function of the charger is closed, acquiring the magnitude of the output current of the charger as a first current P1;
when the charging function of the charger is started, the magnitude of the output current of the charger is obtained as a second current P2;
the difference between the first current P2 and the second current P1 is the amount of current consumed by the mobile terminal connected to the mobile terminal.
The step of judging whether the current consumed by the connected mobile terminal is greater than a first threshold, and if so, the connected mobile terminal is in a charging state comprises the following steps:
judging whether the current consumed by the connected mobile terminal is greater than a first threshold;
when the current consumed by the connected mobile terminal is larger than a first threshold, the connected mobile terminal is in a charging state;
when the current consumed by the connected mobile terminal is less than the first threshold, the connected mobile terminal is not in an uncharged state.
Wherein, the step of closing the charging function when the difference between the current consumed by the connected mobile terminal at the last time and the current consumed by the connected mobile terminal at the last time is greater than a second threshold comprises the following steps:
acquiring the monitored current consumed by the connected mobile terminal in a charging state in real time;
comparing the current consumed by connecting the mobile terminal obtained each time with the current consumed by connecting the mobile terminal obtained last time;
and when the difference between the current consumed by the connected mobile terminal at the last time and the current consumed by the connected mobile terminal at the previous time is greater than a second threshold, controlling to close the charging function of the charger.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, databases, or other media used in embodiments provided herein may include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
In summary, the present invention discloses a charger charging processing method, device, charging terminal device and storage medium, the method includes: detecting whether a charger is connected with the mobile terminal to start a charging function; when the charger is connected with the mobile terminal and starts a charging function, acquiring the current consumed by the connected mobile terminal; judging whether the current consumed by the connected mobile terminal is greater than a first threshold, if so, the connected mobile terminal is in a charging state; monitoring the current consumed by the connected mobile terminal in a charging state; and when the difference between the current consumed by the connected mobile terminal at the last time and the current consumed by the connected mobile terminal at the previous time is larger than a second threshold, the charging function is closed. The invention can monitor whether the current actually output to the charger changes violently when the charger is connected with the charger through the data line to start charging so as to predict the problems of heating/short circuit and the like of the charger side in advance, avoid safety accidents of the charger during charging, improve the safety and provide convenience for users to use.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A charger charging processing method is characterized by comprising the following steps:
detecting whether a charger is connected with the mobile terminal to start a charging function;
when the charger is connected with the mobile terminal and starts a charging function, acquiring the current consumed by the connected mobile terminal;
judging whether the current consumed by the connected mobile terminal is greater than a first threshold, if so, the connected mobile terminal is in a charging state;
monitoring the current consumed by the connected mobile terminal in a charging state;
and when the difference between the current consumed by the connected mobile terminal at the last time and the current consumed by the connected mobile terminal at the previous time is larger than a second threshold, the charging function is closed.
2. The charger charge processing method of claim 1, wherein the first threshold is 50mA and the second threshold is 2000 mA.
3. The method for processing charging of a charger according to claim 1, wherein the step of detecting whether the charger is connected to the mobile terminal to start the charging function comprises:
judging whether a charging function of a charger is started or not by detecting whether a power supply pin VBUS on a USB port for supplying power to the mobile terminal generates rising edge interruption or not;
and when detecting that a power supply pin VBUS on a USB port for supplying power to the mobile terminal generates rising edge interruption, judging that a charging function of the charger is started.
4. The method for processing charging of a charger according to claim 1, wherein the step of starting the charging function by detecting whether the charger is connected to the mobile terminal further comprises:
whether the charging function of the charger is started or not is judged by reading the register value related to the power management chip.
5. The method for processing charging of a charger according to claim 1, wherein the step of obtaining the current consumed by the connected mobile terminal when the charger is connected to the mobile terminal and the charging function is started comprises:
when the charging function of the charger is closed, acquiring the magnitude of the output current of the charger as a first current P1;
when the charging function of the charger is started, the magnitude of the output current of the charger is obtained as a second current P2;
the difference between the first current P2 and the second current P1 is the amount of current consumed by the mobile terminal connected to the mobile terminal.
6. The method of claim 1, wherein the step of determining whether the current consumed by the connected mobile terminal is greater than a first threshold, and if so, the connected mobile terminal is in a charging state comprises:
judging whether the current consumed by the connected mobile terminal is greater than a first threshold;
when the current consumed by the connected mobile terminal is larger than a first threshold, the connected mobile terminal is in a charging state;
when the current consumed by the connected mobile terminal is less than the first threshold, the connected mobile terminal is not in an uncharged state.
7. The method of claim 1, wherein the step of turning off the charging function when the difference between the current consumed by the connected mobile terminal and the current consumed by the connected mobile terminal is greater than a second threshold comprises:
acquiring the monitored current consumed by the connected mobile terminal in a charging state in real time;
comparing the current consumed by connecting the mobile terminal obtained each time with the current consumed by connecting the mobile terminal obtained last time;
and when the difference between the current consumed by the connected mobile terminal at the last time and the current consumed by the connected mobile terminal at the previous time is greater than a second threshold, controlling to close the charging function of the charger.
8. A charger charge processing apparatus, characterized in that the apparatus comprises:
the detection module is used for detecting whether the charger is connected with the mobile terminal to start a charging function;
the acquisition module is used for acquiring the current consumed by the connected mobile terminal when the charger is connected with the mobile terminal and the charging function is started;
the judging module is used for judging whether the current consumed by the connected mobile terminal is greater than a first threshold, and if so, the connected mobile terminal is in a charging state;
the monitoring module is used for monitoring the current consumed by the connected mobile terminal in a charging state;
and the overrun control module is used for closing the charging function when the difference between the current consumed by the connected mobile terminal at the last time and the current consumed by the connected mobile terminal at the previous time is greater than a second threshold.
9. A charging terminal device, characterized in that the charging terminal device comprises a memory, a processor and a charger charging processing program stored on the memory and operable on the processor, and the processor implements the steps of the charger charging processing method according to any one of claims 1 to 7 when executing the charger charging processing program.
10. A computer-readable storage medium, having stored thereon a charger charging processing program, which when executed by a processor, implements the steps of the charger charging processing method according to any one of claims 1 to 7.
CN202110089106.3A 2021-01-22 2021-01-22 Charger charging processing method and device, charging terminal equipment and storage medium Pending CN112737061A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110089106.3A CN112737061A (en) 2021-01-22 2021-01-22 Charger charging processing method and device, charging terminal equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110089106.3A CN112737061A (en) 2021-01-22 2021-01-22 Charger charging processing method and device, charging terminal equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112737061A true CN112737061A (en) 2021-04-30

Family

ID=75593773

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110089106.3A Pending CN112737061A (en) 2021-01-22 2021-01-22 Charger charging processing method and device, charging terminal equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112737061A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104103868A (en) * 2014-07-21 2014-10-15 Tcl通讯(宁波)有限公司 Charging method and system for charger of mobile terminal
CN105098862A (en) * 2014-05-19 2015-11-25 中兴通讯股份有限公司 Charging control method, charging control device and charging control terminal
CN106066438A (en) * 2016-07-26 2016-11-02 Tcl移动通信科技(宁波)有限公司 A kind of mobile terminal is based on the method and system of OTG detection equipment charge state
CN107508346A (en) * 2017-08-28 2017-12-22 惠州Tcl移动通信有限公司 Mobile terminal and charge control method and storage medium
CN108287605A (en) * 2018-01-08 2018-07-17 广东欧珀移动通信有限公司 charge control method, device, terminal device and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105098862A (en) * 2014-05-19 2015-11-25 中兴通讯股份有限公司 Charging control method, charging control device and charging control terminal
CN104103868A (en) * 2014-07-21 2014-10-15 Tcl通讯(宁波)有限公司 Charging method and system for charger of mobile terminal
CN106066438A (en) * 2016-07-26 2016-11-02 Tcl移动通信科技(宁波)有限公司 A kind of mobile terminal is based on the method and system of OTG detection equipment charge state
CN107508346A (en) * 2017-08-28 2017-12-22 惠州Tcl移动通信有限公司 Mobile terminal and charge control method and storage medium
CN108287605A (en) * 2018-01-08 2018-07-17 广东欧珀移动通信有限公司 charge control method, device, terminal device and storage medium

Similar Documents

Publication Publication Date Title
CN103440029B (en) Extend method and the mobile terminal of the service time of mobile terminal under low electricity
US20050248311A1 (en) Electronic device, battery pack, power-supply controlling method for electronic device, program for controlling power supply for electronic device
CN111463842B (en) Electronic equipment and communication method thereof
CN109217248B (en) Fault processing method and system for connector
CN107305406B (en) Electronic device and water inlet protection method
US9489002B2 (en) Providing power to a component
CN105739668A (en) Power management method and power management system of notebook computers
CN103477301A (en) Method and device for charging energy storage devices
CN211605566U (en) USBType-C connects, USB data line and battery charging outfit
CN110611353A (en) Charging control method and device of intelligent door lock and intelligent door lock
CN107863589B (en) Battery processing method and device
JP2009118441A (en) Mobile terminal
CN114665524A (en) Electronic equipment and control method thereof
CN112737061A (en) Charger charging processing method and device, charging terminal equipment and storage medium
JP2018113759A (en) Information processor provided with chargeable battery and charging device
CN112311032B (en) Charging method, charging device, electronic device and storage medium
CN114069803B (en) Portable emergency energy storage power supply detection method, device, equipment and storage medium
CN114610135B (en) Power management method and management circuit of fingerprint module and electronic equipment
US9419312B2 (en) Disablement of connection between connection module and battery
WO2022202156A1 (en) Electricity storage device management system and electricity storage device management method
CN112737060B (en) Mobile terminal charging control method and device, terminal equipment and storage medium
CN101907916A (en) Intelligent protection circuit and method of notebook battery pack
Hausmann et al. Enabling an Energy-Saving Mode on a Mobile Device After an Unexpected Charging Interruption
JP2022145630A (en) Charging control method, device, and system
CN111988467B (en) Method, device and system for self-defining control of temperature of mobile phone and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210430