CN109768593A - A kind of charge protection method and terminal device - Google Patents

A kind of charge protection method and terminal device Download PDF

Info

Publication number
CN109768593A
CN109768593A CN201910016016.4A CN201910016016A CN109768593A CN 109768593 A CN109768593 A CN 109768593A CN 201910016016 A CN201910016016 A CN 201910016016A CN 109768593 A CN109768593 A CN 109768593A
Authority
CN
China
Prior art keywords
pin
network
charging
port
charger
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.)
Granted
Application number
CN201910016016.4A
Other languages
Chinese (zh)
Other versions
CN109768593B (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 CN201910016016.4A priority Critical patent/CN109768593B/en
Publication of CN109768593A publication Critical patent/CN109768593A/en
Application granted granted Critical
Publication of CN109768593B publication Critical patent/CN109768593B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The embodiment of the invention discloses a kind of charge protection method and terminal devices, wherein the described method includes: detection charger is inserted into the charging port of the terminal device, determines the port voltage of the charging port;According to the port voltage and preset charging current value, the present impedance of the charging port is determined;In the case where the present impedance is greater than default impedance threshold, the charger is connect with the current pin of the charging port and is switched to the connection of target pin;Charge protection method provided in an embodiment of the present invention is able to extend the service life of USB port in terminal device, so that it is guaranteed that terminal device can smoothly complete charging;This programme only needs to switch the pin connection relationship of the charging port of charger and terminal device, it is easy to accomplish and it is at low cost.

Description

A kind of charge protection method and terminal device
Technical field
The present embodiments relate to terminal device charging technique fields more particularly to a kind of charge protection method and terminal to set It is standby.
Background technique
In actual use, USB (Universal Serial Bus, universal serial bus) port is difficult for terminal device Exempt under various steam, impurity, salt fog, the adverse circumstances such as sweat, USB port will be corroded.And USB port is corroded directly The service life of USB port can be shortened.
The service life for extending USB port in industry at present, generally takes two ways.Mode one: by USB port Increase various protective coatings, to avoid the corrosion of USB port, and then extends the service life of USB port;Mode two: in USB Temperature detecting function is added in port, in the case where USB port mid-winter, is prolonged the service life by stopping charging.
Inventor has found during studying above two mode, increases the side of protective coating in USB port Formula, not only complex process, and coating structure is at high cost;And increase the mode of temperature detecting function in USB port, since it is desired that stopping It only charges, will affect user experience, and whole service life is promoted unobvious.It can be seen that existing extension USB port makes With the method in service life, at high cost and effect is unobvious.
Summary of the invention
The embodiment of the present invention provides a kind of charge protection method, to solve the existing method for extending USB port service life The unconspicuous problem of at high cost and effect.
In order to solve the above-mentioned technical problem, the present invention is implemented as follows:
In a first aspect, being applied to terminal device, the method packet the embodiment of the invention provides a kind of charge protection method It includes:
Detection charger is inserted into the charging port of the terminal device, determines the port voltage of the charging port; Wherein, the charger includes first network end, the second network-side, and the charging port includes third network-side, the 4th network End and the first pin, second pin;The charger is connect with the current pin of the charging port: the of the charger One network-side is connected by the first pin of the charging port with third network-side;Second network-side of the charger passes through The second pin of the charging port is connected with the 4th network-side;
According to the port voltage and preset charging current value, the present impedance of the charging port is determined;
In the case where the present impedance is greater than default impedance threshold, by working as the charger and the charging port Preceding pin connection is switched to the connection of target pin;
Wherein, the target pin connection includes: that the first network end of the charger passes through the second pin and institute The third network-side for stating charging port is connected, and the second network-side of the charger passes through first pin and the charging end 4th network-side of mouth is connected.
Second aspect, the embodiment of the invention provides a kind of terminal devices, wherein the terminal device includes:
Port voltage determining module is inserted into the charging port of the terminal device for detecting charger, determines institute State the port voltage of charging port;Wherein, the charger includes first network end, the second network-side, the charging port packet Include third network-side, the 4th network-side and the first pin, second pin;The current pin of the charger and the charging port Connection is: the first network end of the charger is connected by the first pin of the charging port with third network-side;It is described Second network-side of charger is connected by the second pin of the charging port with the 4th network-side;
Impedance determining module, for determining the charging port according to the port voltage and preset charging current value Present impedance;
Switching module is used in the case where the present impedance is greater than default impedance threshold, by the charger and institute The current pin connection for stating charging port is switched to the connection of target pin;
Wherein, the target pin connection includes: that the first network end of the charger passes through the second pin and institute The third network-side for stating charging port is connected, and the second network-side of the charger passes through first pin and the charging end 4th network-side of mouth is connected.
The third aspect, the embodiment of the invention provides a kind of terminal devices, wherein including processor, memory and storage On the memory and the computer program that can run on the processor, the computer program are held by the processor It is realized when row as described in the embodiment of the present invention the step of any one charge protection method.
Fourth aspect, the embodiment of the invention provides a kind of computer readable storage mediums, wherein described computer-readable Computer program is stored on storage medium, is realized as described in the embodiment of the present invention when computer program is executed by processor Any one charge protection method the step of.
In embodiments of the present invention, it is inserted into charging port by detecting charger, determines the end of the charging port Mouth voltage;Wherein, the charger includes first network end, the second network-side, and the charging port includes third network-side, Four network-sides and the first pin, second pin;The charger is connect with the current pin of the charging port: the charging The first network end of device is connected by the first pin of the charging port with third network-side;Second network of the charger End is connected by the second pin of the charging port with the 4th network-side;According to the port voltage and preset charging current Value, determines the present impedance of the charging port;In the case where the present impedance is greater than default impedance threshold, filled described Electric appliance is connect with the current pin of the charging port is switched to the connection of target pin, wherein the target pin, which connects, includes: The first network end of the charger is connected by the second pin with the third network-side of the charging port, the charging Second network-side of device is connected by first pin with the 4th network-side of the charging port, thus by current pin with The voltage that target pin is born is exchanged, and current pin is avoided to continue to be corroded, to extend USB in terminal device The service life of port, it is ensured that terminal device can smoothly complete charging;This programme only needs to switch the pin in charging port Connection relationship, it is easy to accomplish and it is at low cost.
The above description is only an overview of the technical scheme of the present invention, in order to better understand the technical means of the present invention, And it can be implemented in accordance with the contents of the specification, and in order to allow above and other objects of the present invention, feature and advantage can It is clearer and more comprehensible, the followings are specific embodiments of the present invention.
Detailed description of the invention
By reading the following detailed description of the preferred embodiment, various advantage and benefit are for ordinary skill people Member will become clear.Attached drawing is only used for showing preferred embodiment, and is not to be construed as limiting the invention.And In entire attached drawing, the same reference numbers will be used to refer to the same parts.In the accompanying drawings:
Fig. 1 is a kind of step flow chart of according to embodiments of the present invention one charge protection method;
Fig. 2 is a kind of step flow chart of according to embodiments of the present invention two charge protection method;
Fig. 3 is the circuit diagram before the first charging control switch, the switching of the second charging control switch;
Fig. 4 is the circuit diagram after the first charging control switch, the switching of the second charging control switch;
Fig. 5 is a kind of structural block diagram of according to embodiments of the present invention three terminal device;
Fig. 6 is a kind of hardware structural diagram of according to embodiments of the present invention four terminal device.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are some of the embodiments of the present invention, instead of all the embodiments.Based on this hair Embodiment in bright, every other implementation obtained by those of ordinary skill in the art without making creative efforts Example, shall fall within the protection scope of the present invention.
Embodiment one
Referring to Fig.1, a kind of step flow chart of charge protection method of the embodiment of the present invention one is shown.
The charge protection method of the embodiment of the present invention the following steps are included:
Step 101: detection charger is inserted into the charging port of the terminal device, determines the end of the charging port Mouth voltage.
The charge protection method of the embodiment of the present invention is suitable for terminal device, and terminal device can be tablet computer, mobile phone Etc. equipment.Include charging port in terminal device, charger is inserted into charging port when terminal device charges.
Due to various corrosion factors such as friction and steam, impurity, sweat, USB port is more long using the time, port Contact impedance will be bigger, it is possible to whether determine USB port by judging the impedance of USB and terminal device connecting path Reach default service life.Judge the impedance of access, then must first determine the port voltage of charging port.
Detection charger is inserted into the charging port of terminal device, it is, the charging port of charger and terminal device Charging connection access is set up, is closed at this point, judging whether to pin connection using the charge protection method of the embodiment of the present invention System's switching, to extend the service life of USB port in terminal device.
Specifically, the charger includes first network end, the second network-side, and the charging port includes third network End, the 4th network-side and the first pin, second pin.
The current pin connection relationship of the charger and the charging port is: the first network end of the charger is logical The first pin for crossing the charging port is connected with third network-side;Second network-side of the charger passes through the charging end The second pin of mouth is connected with the 4th network-side.
Step 102: according to the port voltage and preset charging current value, determining the current resistance of the charging port It is anti-.
Preset charged current value can be configured according to actual needs by those skilled in the art, and by pre-set current value It is set as the charging current value of terminal device.
Impedance is resistance in circuit, inductance, capacitor to the general designation of the inhibition of alternating current, measures flowing in circuit The obstruction that alternating current is encountered.
Herein, according to port voltage and preset charging current value, the present impedance of charging port can be determined.
Step 103: in the case where the present impedance is greater than default impedance threshold, by the charger and the charging The current pin connection of port is switched to the connection of target pin.
Pin, is the wiring with peripheral circuit drawn from integrated circuit (chip) internal circuit, and all pins are constituted The interface of this block integrated circuit.The pin of charging port includes the first pin and second pin.Caused by corroding in USB port not In charging problems, 99% or more accounting is all that the first pin in USB port is corroded, and second pin is relatively intact, this It is because current potential is exactly charging voltage on the first pin, and second pin does not contact charging voltage, and current potential is close to zero thereon.
The target pin connection includes: that the first network end of the charger passes through the second pin and the charging The third network-side of port is connected, the second network-side of the charger pass through first pin and the charging port the Four network-sides are connected.
It is connected and is switched by pin, ensure that the first network end of the charger still third with terminal device charging port Network be connected, the second network-side of charger is still connected with the 4th network-side of terminal device charging port, be electrically connected according to It is so correct, but the first pin and the connection circuit of second pin are exchanged, so that etching condition is also exchanged, it can To guarantee that the first pin is not continued corrosion, but go to corrosion second pin.
In conclusion in embodiments of the present invention, being inserted into charging port by detecting charger, determining the charging The port voltage of port;Wherein, the charger includes first network end, the second network-side, and the charging port includes third Network-side, the 4th network-side and the first pin, second pin;The charger is connect with the current pin of the charging port Be: the first network end of the charger is connected by the first pin of the charging port with third network-side;The charging Second network-side of device is connected by the second pin of the charging port with the 4th network-side;According to the port voltage and in advance If charging current value, determine the present impedance of the charging port;It is greater than the feelings of default impedance threshold in the present impedance Under condition, the charger is connect with the current pin of the charging port and is switched to the connection of target pin, wherein the target Pin connection includes: that the first network end of the charger passes through the third network-side of the second pin and the charging port It is connected, the second network-side of the charger is connected by first pin with the 4th network-side of the charging port.This The charge protection method that inventive embodiments provide, is able to extend the service life of USB port in terminal device, so that it is guaranteed that terminal Equipment can smoothly complete charging;This programme only needs to switch charger and connect pass with the pin of terminal device charging port System, it is easy to accomplish and it is at low cost.
Embodiment two
Referring to Fig. 2, a kind of step flow chart of charge protection method of the embodiment of the present invention two is shown.
The charge protection method of the embodiment of the present invention the following steps are included:
Step 201: detection charger is inserted into charging port, obtains the first voltage and charging port of charger output Received second voltage.
Specifically, the first voltage of charger output is detected by charger itself, passes through difference after detecting the voltage Signal is sent to terminal device;First voltage U1 is the voltage between the first network end of charger and the second network-side, second Voltage U2 is the voltage between the third network-side of charging port and the 4th network-side.
Step 202: determining the difference of the first voltage Yu the second voltage.
The difference of the first voltage and the second voltage is the value of U1-U2.
Step 203: by the ratio of the difference and preset charged current value, being determined as the current resistance of the charging port It is anti-.
Preset charged current value can be configured according to actual needs by those skilled in the art, and by pre-set current value It is set as the charging current value of terminal device.If preset charged current value is I, then impedance R=(U1-U2)/I.
Step 204: in the case where the present impedance is greater than default impedance threshold, generating pin and connect switching command.
Default impedance threshold can be configured according to actual needs by those skilled in the art, to this in the embodiment of the present invention It is not particularly limited.
In the case where impedance is greater than default impedance threshold, determine that the first pin in charging port reaches default and uses the longevity Life.It, need to be to filling in order to ensure charging flow smoothly executes if it is determined that the first pin in charging port has arrived default service life The role of the first pin and second pin is interchangeable in electric port, that is, needs to generate pin connection switching command.
During specific implementation, pin switching command can be generated by the central processing unit of terminal device, and pin is cut Change the micro-control unit that instruction is sent in charger.Correspondingly, it is less than or equal to pre- handicapping in the present impedance of charging port In the case where anti-threshold value, determine that the first pin in charging port does not arrive default service life, then continue to use third pin into Row charging, and return to step 201.
Step 205: switching command being connected according to the pin, switches the first charging control switch of the charger built-in Circuit connection and the charging port in the circuit connection of the second charging control switch that is arranged, so that the charging port Current pin connection be switched to target pin connection.
Experiment shows the increase with the first pin voltage, and Electrochemical corrosion rate will increase, electrification when voltage value 9V Learn the electrochemistry rate that corrosion rate is much larger than voltage value 5V.Caused by the USB port corrosion of terminal device not in charging problems, 99% or more accounting is all that the first pin in USB port is corroded, and second pin is relatively intact.Due on the first pin Current potential is charging voltage, and current potential is close to zero in second pin, therefore in order to extend the service life on probation of USB port, can pass through by Serious first pin that is etched electrochemically with the second pin that is not almost etched electrochemically carries out role exchange.Pass through this kind It exchanges, USB port service life can be allow to extend 40% or more.
The switching of pin connection is by the connection circuit of the first charging control switch to charger built-in and to charging The connection circuit for the second charging control switch being arranged in port switches over realization.Specifically, respectively by central processing unit It controls the second charging control switch, switching is synchronized by the first charging control switch of micro-control unit controls.
Fig. 3 is that charger was inserted into the initial stage of charging port, the circuit diagram before pin connection switching;Fig. 4 is Circuit diagram in the case where the present impedance is greater than default impedance threshold, after completing pin connection switching.
As shown in figure 3, the first charging control switch is arranged in charger, the setting of the second charging control switch is set in terminal In standby.First charging control switch SW1 and the 2nd SW2 charging control switch are DPTT double-pole triple throw switch.
First charging control switch SW1 includes: the first knife being arranged successively from top to bottom, the second knife, and from top to bottom according to The first connector, the second connector and the third connector of secondary arrangement;Second charging control switch SW2 includes: successively to arrange from top to bottom Third knife, the 4th knife of column, and the 5th connector, the 6th connector and the 7th connector that are arranged successively from top to bottom.
First knife is fixedly connected with the first network end of charger, and the second network-side of the second knife and charger is fixed to be connected It connects;Second connector is fixedly connected with the first pin in charging port, and the first connector and third connector are and in charging port Second pin is fixedly connected;Third knife is fixedly connected with the first pin in charging port, and the in the 4th knife and charging port Two pins are fixedly connected;4th interface and the 6th interface are fixedly connected with the 4th network-side of terminal device;5th interface with The third network-side of terminal device is fixedly connected.
As shown in figure 3, when micro-control unit is not when receiving pin connection switching command, the first charging control switch The first knife and the second knife of SW1 respectively with the second connector, third junction contacts;The third knife of second charging control switch SW2 and 4th knife respectively with the 5th connector, the 6th junction contacts.
As shown in figure 4, after micro-control unit and terminal device carry out switching, the first charging control switch SW1's First knife and the second knife respectively with the first connector, the second junction contacts;The third knife and the 4th knife of second charging control switch point Not with the 4th connector, the 5th junction contacts.
It is switched over, can will be charged by the insert contacts point to the first charging control switch, the second charging control switch First network end in device is connect by second pin with the third network-side in terminal device, the second network-side in charger It is connect by the first pin with the 4th network-side in terminal device, the voltage of the first pin and second pin is handed over It changes, the first pin is avoided to continue to corrode, it is ensured that terminal device can charge normal.
Preferably, the first network end and the third network-side are VBUS network-side, second network-side and 4th network-side is GND network-side;First pin is VBUS pin, and the second pin is GND pin.
In embodiments of the present invention, VBUS network-side and GND network-side are respectively the anode and cathode of power supply, GND network End is generally ground terminal.
In conclusion charge protection method provided in an embodiment of the present invention, is inserted into charging port by detecting charger In, the first voltage and the received second voltage of terminal device of charger output are obtained, according to first voltage and second voltage Difference and preset charged electric current, determine the present impedance of charging port, the case where present impedance is greater than default impedance threshold Under, it generates pin and connects switching command, switching command is connected according to pin, control the first charging control switch and the second charging control The on-off of system switch connection circuit, so that the current pin connection of the charging port is switched to the connection of target pin, it is final real The role exchange of the first pin and second pin in existing terminal device, the voltage that the first pin and second pin are born into It has gone exchange, the first pin is avoided to continue to corrode, but gone to corrosion second pin, to extend the end USB in terminal device The service life of mouth, it is ensured that terminal device can smoothly complete charging.This programme only needs switching charger to fill with terminal device The pin connection relationship of electric port, it is easy to accomplish and it is at low cost.It is filled in addition, additionally providing preferred first in the embodiment of the present invention The structure and switching mode of electric control switch and the second charging control switch, this kind of structure design are simple clear, it is easy to accomplish.
Embodiment three
Referring to Fig. 5, a kind of structural block diagram of terminal device of the embodiment of the present invention three is shown.
The terminal device of the embodiment of the present invention includes:
Port voltage determining module 301 is inserted into the charging port of the terminal device for detecting charger, is determined The port voltage of the charging port;Wherein, the charger includes first network end, the second network-side, the charging port Including third network-side, the 4th network-side and the first pin, second pin;The charger works as leading with the charging port Foot connection is: the first network end of the charger is connected by the first pin of the charging port with third network-side;Institute The second network-side for stating charger is connected by the second pin of the charging port with the 4th network-side;Impedance determining module 302, for determining the present impedance of the charging port according to the port voltage and preset charging current value;
Switching module 303,
For in the case where the present impedance is greater than default impedance threshold, by the charger and the charging port Current pin connection be switched to target pin connection;
Wherein, the target pin connection includes: that the first network end of the charger passes through the second pin and institute The third network-side for stating charging port is connected, and the second network-side of the charger passes through first pin and the charging end 4th network-side of mouth is connected.
Preferably, the switching module 303 includes:
Instruction generates submodule 3031, in the case where the present impedance is greater than default impedance threshold, generation to be drawn Foot connects switching command;Switching submodule 3032 switches the charger built-in for connecting switching command according to the pin The first charging control switch circuit connection and the charging port in the circuit of the second charging control switch that is arranged connect It connects,;So that the current pin connection of the charging port is switched to the connection of target pin.
Preferably, the port voltage determining module 301 includes:
Voltage determines submodule 3011, is inserted into charging port for detecting charger, obtains the charger output First voltage and the received second voltage of the charging port;Wherein, the first voltage is read concurrent by the charger It send to the terminal device.
Preferably, the impedance determining module 302 includes:
Difference determines submodule 3021, for determining the difference of the first voltage Yu the second voltage;
Impedance determines submodule 3022, for being determined as institute for the ratio of the difference and the preset charged current value State the present impedance of charging port.
Preferably, first charging control switch and second charging control switch are DPTT double-pole triple throw switch;
First charging control switch includes: the first knife, the second knife, the first connector, the second connector and third connector; Second charging control switch includes: third knife, the 4th knife, the 5th connector, the 6th connector and the 7th connector;
First knife is fixedly connected with the first network end of the charger, the second net of second knife and charger Network end is fixedly connected;Second connector is fixedly connected with first pin in the charging port, first connector It is fixedly connected with the second pin in the charging port with third connector;
The third knife is fixedly connected with first pin in the charging port, the 4th knife and the charging The second pin in port is fixedly connected;4th connector and the 6th connector with the terminal device the 4th Network-side is fixedly connected;5th connector is fixedly connected with the third network-side of the terminal device.
Preferably, before the switching module carries out pin connection switching, the first of first charging control switch Knife and second knife respectively with second connector, the third junction contacts;The third of second charging control switch Knife and the 4th knife respectively with the 5th connector, the 6th junction contacts;
After the switching module carries out pin connection switching, the first knife of first charging control switch and described Second knife respectively with first connector, second junction contacts;The third knife of second charging control switch and described 4th knife respectively with the 4th connector, the 5th junction contacts.
Preferably, the first network end and the third network-side are VBUS network-side, second network-side and 4th network-side is GND network-side;First pin is VBUS pin, and the second pin is GND pin.
Terminal device provided in an embodiment of the present invention can be realized mobile terminal in the embodiment of the method for Fig. 1 to Fig. 2 and realize Each process, to avoid repeating, which is not described herein again.
Terminal device provided in an embodiment of the present invention, the charging port for being inserted into the terminal device by detecting charger In, determine the port voltage of the charging port;Wherein, the charger includes first network end, the second network-side, described to fill Electric port includes third network-side, the 4th network-side and the first pin, second pin;The charger and the charging port Current pin connection is: the first pin and third network-side phase that the first network end of the charger passes through the charging port Even;Second network-side of the charger is connected by the second pin of the charging port with the 4th network-side;According to described Port voltage and preset charging current value, determine the present impedance of the charging port;It is greater than in the present impedance default In the case where impedance threshold, the charger is connect with the current pin of the charging port and is switched to the connection of target pin, Wherein, the target pin connection includes: that the first network end of the charger passes through the second pin and the charging end The third network-side of mouth is connected, and the second network-side of the charger passes through first pin and the 4th of the charging port the Network-side is connected;Charge protection method provided in an embodiment of the present invention is able to extend the use longevity of USB port in terminal device Life, so that it is guaranteed that terminal device can smoothly complete charging;This programme only needs to switch charger and terminal device charging port Pin connection relationship, it is easy to accomplish and it is at low cost.
Example IV
Referring to Fig. 6, a kind of structural block diagram of terminal device of the embodiment of the present invention four is shown.
A kind of hardware structural diagram of Fig. 6 terminal device of each embodiment to realize the present invention, the terminal device 400 Including but not limited to: radio frequency unit 401, audio output unit 403, input unit 404, sensor 405, is shown network module 402 Show the components such as unit 406, user input unit 407, interface unit 408, memory 409, processor 410 and power supply 411. It will be understood by those skilled in the art that terminal device structure shown in Fig. 6 does not constitute the restriction to terminal device, terminal is set Standby may include perhaps combining certain components or different component layouts than illustrating more or fewer components.In the present invention In embodiment, terminal device includes but is not limited to mobile phone, tablet computer, laptop, palm PC, car-mounted terminal, can wear Wear equipment and pedometer etc..
Wherein, processor 410 are inserted into the charging port of the terminal device for detecting charger, described in determination The port voltage of charging port;According to the port voltage and preset charging current value, determine that the charger is filled with described The present impedance of electric port;In the case where the present impedance is greater than default impedance threshold, the charger is filled with described The current pin connection of electric port is switched to the connection of target pin.
The charger includes first network end, the second network-side, and the charging port includes third network-side, the 4th net Network end and the first pin, second pin;The charger is connect with the current pin of the charging port: the charger First network end is connected by the first pin of the charging port with third network-side;Second network-side of the charger is logical The second pin for crossing the charging port is connected with the 4th network-side;Target pin connection includes: the of the charger One network-side is connected by the second pin with the third network-side of the charging port, the second network-side of the charger It is connected by first pin with the 4th network-side of the charging port.
Terminal device provided in an embodiment of the present invention, detection charger are inserted into the charging port of the terminal device, Determine the port voltage of the charging port;According to the port voltage and preset charging current value, the charging end is determined The present impedance of mouth;In the case where the present impedance is greater than default impedance threshold, by the charger and the charging end The current pin connection of mouth is switched to the connection of target pin;Charge protection method provided in an embodiment of the present invention, is able to extend end The service life of USB port in end equipment, so that it is guaranteed that terminal device can smoothly complete charging;This programme is only needed to switch and be filled The pin connection relationship of electric appliance and terminal device charging port, it is easy to accomplish and it is at low cost.
It should be understood that the embodiment of the present invention in, radio frequency unit 401 can be used for receiving and sending messages or communication process in, signal Send and receive, specifically, by from base station downlink data receive after, to processor 410 handle;In addition, by uplink Data are sent to base station.In general, radio frequency unit 401 includes but is not limited to antenna, at least one amplifier, transceiver, coupling Device, low-noise amplifier, duplexer etc..In addition, radio frequency unit 401 can also by wireless communication system and network and other set Standby communication.
Terminal device provides wireless broadband internet by network module 402 for user and accesses, and such as user is helped to receive It sends e-mails, browse webpage and access streaming video etc..
Audio output unit 403 can be received by radio frequency unit 401 or network module 402 or in memory 409 The audio data of storage is converted into audio signal and exports to be sound.Moreover, audio output unit 403 can also provide and end The relevant audio output of specific function that end equipment 400 executes is (for example, call signal receives sound, message sink sound etc. Deng).Audio output unit 403 includes loudspeaker, buzzer and receiver etc..
Input unit 404 is for receiving audio or video signal.Input unit 404 may include graphics processor (Graphics Processing Unit, GPU) 4041 and microphone 4042, graphics processor 4041 is in video acquisition mode Or the image data of the static images or video obtained in image capture mode by image capture apparatus (such as camera) carries out Reason.Treated, and picture frame may be displayed on display unit 406.Through graphics processor 4041, treated that picture frame can be deposited Storage is sent in memory 409 (or other storage mediums) or via radio frequency unit 401 or network module 402.Mike Wind 4042 can receive sound, and can be audio data by such acoustic processing.Treated audio data can be The format output that mobile communication base station can be sent to via radio frequency unit 401 is converted in the case where telephone calling model.
Terminal device 400 further includes at least one sensor 405, such as optical sensor, motion sensor and other biographies Sensor.Specifically, optical sensor includes ambient light sensor and proximity sensor, wherein ambient light sensor can be according to environment The light and shade of light adjusts the brightness of display panel 4061, and proximity sensor can close when terminal device 400 is moved in one's ear Display panel 4061 and/or backlight.Display panel 401 is flexible display screen, and flexible display screen includes the screen for being sequentially overlapped setting Curtain pedestal, liftable module array and flexible screen.As a kind of motion sensor, accelerometer sensor can detect each The size of (generally three axis) acceleration, can detect that size and the direction of gravity, can be used to identify terminal on direction when static Equipment posture (such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, Tap) etc.;Sensor 405 can also include fingerprint sensor, pressure sensor, iris sensor, molecule sensor, gyro Instrument, barometer, hygrometer, thermometer, infrared sensor etc., details are not described herein.
Display unit 406 is for showing information input by user or being supplied to the information of user.Display unit 406 can wrap Display panel 4061 is included, liquid crystal display (Liquid Crystal Display, LCD), Organic Light Emitting Diode can be used Forms such as (Organic Light-Emitting Diode, OLED) configure display panel 4061.
User input unit 407 can be used for receiving the number or character information of input, and generate the use with terminal device Family setting and the related key signals input of function control.Specifically, user input unit 407 include touch panel 4071 and Other input equipments 4072.Touch panel 4071, also referred to as touch screen collect the touch operation of user on it or nearby (for example user uses any suitable objects or attachment such as finger, stylus on touch panel 4071 or in touch panel 4071 Neighbouring operation).Touch panel 4071 may include both touch detecting apparatus and touch controller.Wherein, touch detection Device detects the touch orientation of user, and detects touch operation bring signal, transmits a signal to touch controller;Touch control Device processed receives touch information from touch detecting apparatus, and is converted into contact coordinate, then gives processor 410, receiving area It manages the order that device 410 is sent and is executed.Furthermore, it is possible to more using resistance-type, condenser type, infrared ray and surface acoustic wave etc. Seed type realizes touch panel 4071.In addition to touch panel 4071, user input unit 407 can also include other input equipments 4072.Specifically, other input equipments 4072 can include but is not limited to physical keyboard, function key (such as volume control button, Switch key etc.), trace ball, mouse, operating stick, details are not described herein.
Further, touch panel 4071 can be covered on display panel 4061, when touch panel 4071 is detected at it On or near touch operation after, send processor 410 to determine the type of touch event, be followed by subsequent processing device 410 according to touching The type for touching event provides corresponding visual output on display panel 4061.Although in Fig. 6, touch panel 4071 and display Panel 4061 is the function that outputs and inputs of realizing terminal device as two independent components, but in some embodiments In, can be integrated by touch panel 4071 and display panel 4061 and realize the function that outputs and inputs of terminal device, it is specific this Place is without limitation.
Interface unit 408 is the interface that external device (ED) is connect with terminal device 400.For example, external device (ED) may include having Line or wireless head-band earphone port, external power supply (or battery charger) port, wired or wireless data port, storage card end Mouth, port, the port audio input/output (I/O), video i/o port, earphone end for connecting the device with identification module Mouthful etc..Interface unit 408 can be used for receiving the input (for example, data information, electric power etc.) from external device (ED) and By one or more elements that the input received is transferred in terminal device 400 or can be used in 400 He of terminal device Data are transmitted between external device (ED).
Memory 409 can be used for storing software program and various data.Memory 409 can mainly include storing program area The storage data area and, wherein storing program area can (such as the sound of application program needed for storage program area, at least one function Sound playing function, image player function etc.) etc.;Storage data area can store according to mobile phone use created data (such as Audio data, phone directory etc.) etc..In addition, memory 409 may include high-speed random access memory, it can also include non-easy The property lost memory, a for example, at least disk memory, flush memory device or other volatile solid-state parts.
Processor 410 is the control centre of terminal device, utilizes each of various interfaces and the entire terminal device of connection A part by running or execute the software program and/or module that are stored in memory 409, and calls and is stored in storage Data in device 409 execute the various functions and processing data of terminal device, to carry out integral monitoring to terminal device.Place Managing device 410 may include one or more processing units;Preferably, processor 410 can integrate application processor and modulatedemodulate is mediated Manage device, wherein the main processing operation system of application processor, user interface and application program etc., modem processor is main Processing wireless communication.It is understood that above-mentioned modem processor can not also be integrated into processor 410.
Terminal device 400 can also include the power supply 411 (such as battery) powered to all parts, it is preferred that power supply 411 Can be logically contiguous by power-supply management system and processor 410, to realize management charging by power-supply management system, put The functions such as electricity and power managed.
In addition, terminal device 400 includes some unshowned functional modules, details are not described herein.
Preferably, the embodiment of the present invention also provides a kind of terminal device, including processor 410, and memory 409 is stored in On memory 409 and the computer program that can run on the processor 410, the computer program are executed by processor 410 Each process of the above-mentioned charge protection method embodiment of Shi Shixian, and identical technical effect can be reached, to avoid repeating, here It repeats no more.
The embodiment of the present invention also provides a kind of computer readable storage medium, and meter is stored on computer readable storage medium Calculation machine program, the computer program realize each process of above-mentioned charge protection method embodiment, and energy when being executed by processor Reach identical technical effect, to avoid repeating, which is not described herein again.Wherein, the computer readable storage medium, such as only Read memory (Read-Only Memory, abbreviation ROM), random access memory (Random Access Memory, abbreviation RAM), magnetic or disk etc..
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that the process, method, article or the device that include a series of elements not only include those elements, and And further include other elements that are not explicitly listed, or further include for this process, method, article or device institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do There is also other identical elements in the process, method of element, article or device.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art The part contributed out can be embodied in the form of software products, which is stored in a storage medium In (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal (can be mobile phone, computer, service Device, air conditioner or network equipment etc.) execute method described in each embodiment of the present invention.
The embodiment of the present invention is described with above attached drawing, but the invention is not limited to above-mentioned specific Embodiment, the above mentioned embodiment is only schematical, rather than restrictive, those skilled in the art Under the inspiration of the present invention, without breaking away from the scope protected by the purposes and claims of the present invention, it can also make very much Form belongs within protection of the invention.

Claims (16)

1. a kind of charge protection method is applied to terminal device, which is characterized in that the described method includes:
Detection charger is inserted into the charging port of the terminal device, determines the port voltage of the charging port;Wherein, The charger includes first network end, the second network-side, and the charging port includes third network-side, the 4th network-side and One pin, second pin;The charger is connect with the current pin of the charging port: the first network of the charger End is connected by the first pin of the charging port with third network-side;Second network-side of the charger is filled by described The second pin of electric port is connected with the 4th network-side;
According to the port voltage and preset charging current value, the present impedance of the charging port is determined;
In the case where the present impedance is greater than default impedance threshold, the charger and the charging port are worked as into leading Foot connection is switched to the connection of target pin;
Wherein, the target pin connection includes: that the first network end of the charger is filled by the second pin with described The third network-side of electric port is connected, and the second network-side of the charger passes through first pin and the charging port 4th network-side is connected.
2. the method according to claim 1, wherein described be greater than default impedance threshold in the present impedance In the case of, the charger is connect with the current pin of the charging port and is switched to the connection of target pin, comprising:
In the case where the present impedance is greater than default impedance threshold, generates pin and connect switching command;
According to the pin connect switching command, switch the first charging control switch of the charger built-in circuit connection and The circuit connection for the second charging control switch being arranged in the charging port;So that the current pin of the charging port connects It is switched to the connection of target pin.
3. the method according to claim 1, wherein the detection charger is inserted into filling for the terminal device In electric port, the port voltage of the charging port is determined, comprising:
Detection charger is inserted into charging port, and the first voltage and the charging port for obtaining the charger output receive Second voltage;Wherein, the first voltage is read by the charger and is sent to the terminal device.
4. according to the method described in claim 3, it is characterized in that, described according to the port voltage and preset charging current Value, determines the present impedance of the charging port;Include:
Determine the difference of the first voltage Yu the second voltage;
By the ratio of the difference and preset charged current value, it is determined as the present impedance of the charging port.
5. according to the method described in claim 2, it is characterized in that, first charging control switch and second charging are controlled System switch is DPTT double-pole triple throw switch;
First charging control switch includes: the first knife, the second knife, the first connector, the second connector and third connector;It is described Second charging control switch includes: third knife, the 4th knife, the 5th connector, the 6th connector and the 7th connector;
First knife is fixedly connected with the first network end of the charger, the second network-side of second knife and charger It is fixedly connected;Second connector is fixedly connected with first pin in the charging port, first connector and Three connectors are fixedly connected with the second pin in the charging port;
The third knife is fixedly connected with first pin in the charging port, the 4th knife and the charging port In the second pin be fixedly connected;4th connector and the 6th connector with the 4th network of the terminal device End is fixedly connected;5th connector is fixedly connected with the third network-side of the terminal device.
6. according to the method described in claim 5, it is characterized in that,
Before the terminal device carries out pin connection switching, the first knife of first charging control switch and described the Two knives respectively with second connector, the third junction contacts;The third knife of second charging control switch and described Four knives respectively with the 5th connector, the 6th junction contacts;
After the terminal device carries out pin connection switching, the first knife of first charging control switch and described second Knife respectively with first connector, second junction contacts;The third knife of second charging control switch and the described 4th Knife respectively with the 4th connector, the 5th junction contacts.
7. method according to claim 1-6, which is characterized in that the first network end and the third network End is VBUS network-side, and second network-side and the 4th network-side are GND network-side;First pin is VBUS pin, the second pin are GND pin.
8. a kind of terminal device, which is characterized in that the terminal device includes:
Port voltage determining module is inserted into the charging port of the terminal device for detecting charger, is filled described in determination The port voltage of electric port;Wherein, the charger includes first network end, the second network-side, and the charging port includes the Three network-sides, the 4th network-side and the first pin, second pin;The charger is connect with the current pin of the charging port Be: the first network end of the charger is connected by the first pin of the charging port with third network-side;The charging Second network-side of device is connected by the second pin of the charging port with the 4th network-side;
Impedance determining module, for determining working as the charging port according to the port voltage and preset charging current value Preceding impedance;
Switching module, in the case where the present impedance is greater than default impedance threshold, the charger to be filled with described The current pin connection of electric port is switched to the connection of target pin;
Wherein, the target pin connection includes: that the first network end of the charger is filled by the second pin with described The third network-side of electric port is connected, and the second network-side of the charger passes through first pin and the charging port 4th network-side is connected.
9. terminal device according to claim 8, which is characterized in that the switching module includes:
Instruction production submodule is cut in the case where the present impedance is greater than default impedance threshold, generating pin connection Change instruction;
Switching submodule switches the first charge control of the charger built-in for connecting switching command according to the pin The circuit connection for the second charging control switch being arranged in the circuit connection of switch and the charging port,;So that the charging The current pin connection of port is switched to the connection of target pin.
10. terminal device according to claim 8, which is characterized in that the port voltage determining module includes:
Voltage determines submodule, is inserted into charging port for detecting charger, obtains the first electricity of the charger output Pressure and the received second voltage of the charging port;Wherein, the first voltage is read by the charger and is sent to described Terminal device.
11. terminal device according to claim 8, which is characterized in that the impedance determining module includes:
Difference determines submodule, for determining the difference of the first voltage Yu the second voltage;
Impedance determines submodule, for being determined as the charging port for the ratio of the difference and preset charged current value Present impedance.
12. terminal device according to claim 8, which is characterized in that first charging control switch and described second Charging control switch is DPTT double-pole triple throw switch;
First charging control switch includes: the first knife, the second knife, the first connector, the second connector and third connector;It is described Second charging control switch includes: third knife, the 4th knife, the 5th connector, the 6th connector and the 7th connector;
First knife is fixedly connected with the first network end of the charger, the second network-side of second knife and charger It is fixedly connected;Second connector is fixedly connected with first pin in the charging port, first connector and Three connectors are fixedly connected with the second pin in the charging port;
The third knife is fixedly connected with first pin in the charging port, the 4th knife and the charging port In the second pin be fixedly connected;4th connector and the 6th connector with the 4th network of the terminal device End is fixedly connected;5th connector is fixedly connected with the third network-side of the terminal device.
13. terminal device according to claim 12, which is characterized in that
Before the switching module carries out pin connection switching, the first knife of first charging control switch and described second Knife respectively with second connector, the third junction contacts;The third knife of second charging control switch and the described 4th Knife respectively with the 5th connector, the 6th junction contacts;
After the switching module carries out pin connection switching, the first knife of first charging control switch and described second Knife respectively with first connector, second junction contacts;The third knife of second charging control switch and the described 4th Knife respectively with the 4th connector, the 5th junction contacts.
14. according to the described in any item terminal devices of claim 8-13, which is characterized in that the first network end and described Three network-sides are VBUS network-side, and second network-side and the 4th network-side are GND network-side;Described first draws Foot is VBUS pin, and the second pin is GND pin.
15. a kind of terminal device, which is characterized in that including processor, memory and be stored on the memory and can be in institute The computer program run on processor is stated, such as claim 1 to 7 is realized when the computer program is executed by the processor Any one of described in charge protection method the step of.
16. a kind of computer readable storage medium, which is characterized in that store computer journey on the computer readable storage medium Sequence, the charge protection method as described in any one of claims 1 to 7 is realized when the computer program is executed by processor Step.
CN201910016016.4A 2019-01-04 2019-01-04 Charging protection method and terminal equipment Active CN109768593B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910016016.4A CN109768593B (en) 2019-01-04 2019-01-04 Charging protection method and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910016016.4A CN109768593B (en) 2019-01-04 2019-01-04 Charging protection method and terminal equipment

Publications (2)

Publication Number Publication Date
CN109768593A true CN109768593A (en) 2019-05-17
CN109768593B CN109768593B (en) 2020-10-02

Family

ID=66453428

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910016016.4A Active CN109768593B (en) 2019-01-04 2019-01-04 Charging protection method and terminal equipment

Country Status (1)

Country Link
CN (1) CN109768593B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020259700A1 (en) * 2019-06-28 2020-12-30 Oppo广东移动通信有限公司 Anomaly detection method and device, and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015096743A1 (en) * 2013-12-26 2015-07-02 Mediatek Inc. Multipath charger and charging method thereof
CN205721762U (en) * 2016-03-31 2016-11-23 维沃移动通信有限公司 The interface circuit of general-purpose serial bus USB interface and portable terminal
CN106199731A (en) * 2016-08-18 2016-12-07 乐视控股(北京)有限公司 A kind of detection method, device and charger
CN106329635A (en) * 2016-09-05 2017-01-11 北京小米移动软件有限公司 Terminal charging method and device
CN206258818U (en) * 2016-11-04 2017-06-16 上海控易电子科技有限公司 A kind of airborne computer power interruptions protection system
CN107579559A (en) * 2017-08-29 2018-01-12 维沃移动通信有限公司 A kind of Type C interface charging circuit, charge control method and electronic equipment
US20180083464A1 (en) * 2016-09-22 2018-03-22 Darryl Deshon JONES, JR. Charging case for an electronic device
CN108268402A (en) * 2016-12-30 2018-07-10 维沃移动通信有限公司 Protection circuit, guard method and the mobile terminal of Type-C interfaces
CN108767919A (en) * 2018-05-25 2018-11-06 维沃移动通信有限公司 A kind of charging unit, terminal device and charging method

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015096743A1 (en) * 2013-12-26 2015-07-02 Mediatek Inc. Multipath charger and charging method thereof
CN205721762U (en) * 2016-03-31 2016-11-23 维沃移动通信有限公司 The interface circuit of general-purpose serial bus USB interface and portable terminal
CN106199731A (en) * 2016-08-18 2016-12-07 乐视控股(北京)有限公司 A kind of detection method, device and charger
CN106329635A (en) * 2016-09-05 2017-01-11 北京小米移动软件有限公司 Terminal charging method and device
US20180083464A1 (en) * 2016-09-22 2018-03-22 Darryl Deshon JONES, JR. Charging case for an electronic device
CN206258818U (en) * 2016-11-04 2017-06-16 上海控易电子科技有限公司 A kind of airborne computer power interruptions protection system
CN108268402A (en) * 2016-12-30 2018-07-10 维沃移动通信有限公司 Protection circuit, guard method and the mobile terminal of Type-C interfaces
CN107579559A (en) * 2017-08-29 2018-01-12 维沃移动通信有限公司 A kind of Type C interface charging circuit, charge control method and electronic equipment
CN108767919A (en) * 2018-05-25 2018-11-06 维沃移动通信有限公司 A kind of charging unit, terminal device and charging method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020259700A1 (en) * 2019-06-28 2020-12-30 Oppo广东移动通信有限公司 Anomaly detection method and device, and storage medium

Also Published As

Publication number Publication date
CN109768593B (en) 2020-10-02

Similar Documents

Publication Publication Date Title
CN108255378A (en) A kind of display control method and mobile terminal
CN109445736A (en) A kind of multi-screen display method and mobile terminal
CN108304061A (en) A kind of display control method and terminal
CN109343759A (en) A kind of control method and terminal of the display of breath screen
CN109962514A (en) A kind of charging method and mobile terminal
CN109145731A (en) A kind of fingerprint identification method, device and mobile terminal
CN108898555A (en) A kind of image processing method and terminal device
CN110213686A (en) A kind of detection method and terminal of earphone socket
CN110209313A (en) Icon moving method and terminal device
CN108491123A (en) A kind of adjusting application program image target method and mobile terminal
CN110045807A (en) A kind of voltage control method and terminal
CN109768593A (en) A kind of charge protection method and terminal device
CN109348366A (en) A kind of method and mobile terminal for realizing volume adjustment using electrical parameter
CN108767919A (en) A kind of charging unit, terminal device and charging method
CN108494030A (en) A kind of wireless charging method, terminal and transmitting end equipment
CN107995372A (en) A kind of false touch ground connection identifying processing method, circuit and mobile terminal
CN110021981A (en) Charger and terminal
CN110365845A (en) The call control method and terminal of terminal
CN109991507A (en) A kind of smart card contact detection circuit, method and apparatus
CN110267142A (en) A kind of mobile terminal and control method
CN109888928A (en) A kind of terminal and wireless charging control method
CN109672254A (en) A kind of charging control circuit, terminal device and control method
CN110071559A (en) A kind of charging circuit and mobile terminal
CN109873473A (en) A kind of charging circuit and mobile terminal
CN109443261A (en) The acquisition methods and mobile terminal of Folding screen mobile terminal folding angles

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