CN108448177A - A kind of charging method and terminal - Google Patents

A kind of charging method and terminal Download PDF

Info

Publication number
CN108448177A
CN108448177A CN201810209972.XA CN201810209972A CN108448177A CN 108448177 A CN108448177 A CN 108448177A CN 201810209972 A CN201810209972 A CN 201810209972A CN 108448177 A CN108448177 A CN 108448177A
Authority
CN
China
Prior art keywords
type
terminal
charging
detection signal
detection
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
CN201810209972.XA
Other languages
Chinese (zh)
Other versions
CN108448177B (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 CN201810209972.XA priority Critical patent/CN108448177B/en
Publication of CN108448177A publication Critical patent/CN108448177A/en
Application granted granted Critical
Publication of CN108448177B publication Critical patent/CN108448177B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H01ELECTRIC ELEMENTS
    • H01MPROCESSES OR MEANS, e.g. BATTERIES, FOR THE DIRECT CONVERSION OF CHEMICAL ENERGY INTO ELECTRICAL ENERGY
    • H01M10/00Secondary cells; Manufacture thereof
    • H01M10/42Methods or arrangements for servicing or maintenance of secondary cells or secondary half-cells
    • H01M10/44Methods for charging or discharging
    • HELECTRICITY
    • H01ELECTRIC ELEMENTS
    • H01MPROCESSES OR MEANS, e.g. BATTERIES, FOR THE DIRECT CONVERSION OF CHEMICAL ENERGY INTO ELECTRICAL ENERGY
    • H01M10/00Secondary cells; Manufacture thereof
    • H01M10/42Methods or arrangements for servicing or maintenance of secondary cells or secondary half-cells
    • H01M10/425Structural combination with electronic components, e.g. electronic circuits integrated to the outside of the casing
    • H01M10/4257Smart batteries, e.g. electronic circuits inside the housing of the cells or batteries
    • HELECTRICITY
    • H01ELECTRIC ELEMENTS
    • H01MPROCESSES OR MEANS, e.g. BATTERIES, FOR THE DIRECT CONVERSION OF CHEMICAL ENERGY INTO ELECTRICAL ENERGY
    • H01M10/00Secondary cells; Manufacture thereof
    • H01M10/42Methods or arrangements for servicing or maintenance of secondary cells or secondary half-cells
    • H01M10/44Methods for charging or discharging
    • H01M10/446Initial charging measures
    • HELECTRICITY
    • H01ELECTRIC ELEMENTS
    • H01MPROCESSES OR MEANS, e.g. BATTERIES, FOR THE DIRECT CONVERSION OF CHEMICAL ENERGY INTO ELECTRICAL ENERGY
    • H01M10/00Secondary cells; Manufacture thereof
    • H01M10/42Methods or arrangements for servicing or maintenance of secondary cells or secondary half-cells
    • H01M10/48Accumulators combined with arrangements for measuring, testing or indicating the condition of cells, e.g. the level or density of the electrolyte
    • 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
    • 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/007Regulation of charging or discharging current or voltage
    • H02J7/0071Regulation of charging or discharging current or voltage with a programmable schedule
    • HELECTRICITY
    • H01ELECTRIC ELEMENTS
    • H01MPROCESSES OR MEANS, e.g. BATTERIES, FOR THE DIRECT CONVERSION OF CHEMICAL ENERGY INTO ELECTRICAL ENERGY
    • H01M10/00Secondary cells; Manufacture thereof
    • H01M10/42Methods or arrangements for servicing or maintenance of secondary cells or secondary half-cells
    • H01M10/425Structural combination with electronic components, e.g. electronic circuits integrated to the outside of the casing
    • H01M2010/4271Battery management systems including electronic circuits, e.g. control of current or voltage to keep battery in healthy state, cell balancing
    • HELECTRICITY
    • H01ELECTRIC ELEMENTS
    • H01MPROCESSES OR MEANS, e.g. BATTERIES, FOR THE DIRECT CONVERSION OF CHEMICAL ENERGY INTO ELECTRICAL ENERGY
    • H01M10/00Secondary cells; Manufacture thereof
    • H01M10/42Methods or arrangements for servicing or maintenance of secondary cells or secondary half-cells
    • H01M10/425Structural combination with electronic components, e.g. electronic circuits integrated to the outside of the casing
    • H01M2010/4278Systems for data transfer from batteries, e.g. transfer of battery parameters to a controller, data transferred between battery controller and main controller
    • 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/00032Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries characterised by data exchange
    • H02J7/00034Charger exchanging data with an electronic device, i.e. telephone, whose internal battery is under charge
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02EREDUCTION OF GREENHOUSE GAS [GHG] EMISSIONS, RELATED TO ENERGY GENERATION, TRANSMISSION OR DISTRIBUTION
    • Y02E60/00Enabling technologies; Technologies with a potential or indirect contribution to GHG emissions mitigation
    • Y02E60/10Energy storage using batteries

Landscapes

  • Engineering & Computer Science (AREA)
  • Manufacturing & Machinery (AREA)
  • Chemical & Material Sciences (AREA)
  • Chemical Kinetics & Catalysis (AREA)
  • Electrochemistry (AREA)
  • General Chemical & Material Sciences (AREA)
  • Power Engineering (AREA)
  • Microelectronics & Electronic Packaging (AREA)
  • Charge And Discharge Circuits For Batteries Or The Like (AREA)
  • Telephone Function (AREA)

Abstract

A kind of charging method of offer of the embodiment of the present invention and terminal, to solve the problems, such as that the charging time of terminal extends.This method includes:Obtain the testing result to the type of the charging interface of charging unit, testing result be use first detection signal detection n times charging interface type as a result, charging unit for the charging unit that is connect with terminal;If testing result is the first result, then use the type of the second detection signal detection charging interface, the type that first result is used to indicate n times detection charging interface is non-dedicated charging interface DCP, first detection signal is the detection signal that the power module of terminal generates, and the second detection signal is the detection signal that the control module of terminal generates;Type according to the second detection signal detection to charging interface is DCP, then uses the type of first detection signal detection charging interface again;If first detection signal is used to detect the type of charging interface as DCP again, use the first power corresponding with DCP for terminal charge.

Description

A kind of charging method and terminal
Technical field
The present embodiments relate to field of terminal technology more particularly to a kind of charging methods and terminal.
Background technology
With the development of terminal technology, since user is increasing to the dependence of terminal, when the electricity of terminal disappears After having consumed, requirement of the user to the charging time length of terminal is also higher and higher.
In general, terminal can be filled by universal serial bus (universal serial bus, USB) and adapter foundation Electric system.Currently, whether the charging interface that terminal passes through test adaptor is special charging interface (dedicated charging Port, DCP), to determine whether the charging system can be with quick charge.If detecting, charging interface is DCP, and terminal determines should Adapter can be with quick charge (for example, the charging signals that 5V/1.5A may be used charge);If detecting, charging interface is non- DCP, then terminal determine that the adapter is unable to quick charge, i.e., traditional charging modes charging may be used (for example, can adopt in terminal It is charged with the charging signals of 5V/0.5A).
However, in the above method, insertion shake when being connected terminal with adapter due to user or the charging of terminal The charging interface poor contact etc. of interface and adapter, all may result in terminal test adaptor charging interface whether be When DCP, the DCP of the adapter is accidentally identified as non-DCP by terminal, therefore terminal may use traditional charging modes to charge, from And the charging time of terminal is caused to extend.
Invention content
A kind of charging method of offer of the embodiment of the present invention and terminal, to solve the problems, such as that the charging time of terminal extends.
In order to solve the above-mentioned technical problem, the embodiment of the present invention is realized in:
In a first aspect, the embodiment of the present invention provides a kind of charging method, this method includes:Obtain the charging to charging unit The testing result of the type of interface, the testing result are the knot for the type that the n times charging interfaces is detected using first detection signal Fruit, the charging unit are the charging unit being connect with terminal, and N is the first preset times, and N is positive integer;If the testing result is First as a result, then use the type of the second detection signal detection charging interface, which, which is used to indicate n times and detects this, fills The type of electrical interface is non-dedicated charging interface DCP, which is the detection that the power module of the terminal generates Signal, the second detection signal are the detection signal that the control module of the terminal generates;According to the second detection signal detection Type to the charging interface is DCP, then the first detection signal is used to detect the type of the charging interface again;If adopting again It detects that the type of the charging interface is the DCP with the first detection signal, then uses the first power corresponding with the DCP to be somebody's turn to do Terminal charge.
Second aspect, the embodiment of the present invention additionally provide a kind of terminal, which includes:Acquisition module, the first detection mould Block, the second detection module and charging module;The acquisition module, the detection for obtaining the type to the charging interface of charging unit As a result, the testing result be use the first detection signal detection n times charging interface type as a result, the charging unit for The charging unit of terminal connection, N are the first preset times, and N is positive integer;The first detection module, if being used for the acquisition module The testing result obtained is first as a result, then using the second type for detecting the signal detection charging interface, first result It is non-dedicated charging interface DCP to be used to indicate n times and detect the type of the charging interface, which is the terminal The detection signal that power module generates, the second detection signal are the detection signal that the control module of the terminal generates;This second Detection module, if using the second detection signal detection to the type of the charging interface for DCP for the first detection module, Use the first detection signal to detect the type of the charging interface again;The charging module, if being used for the second detection module weight It newly uses the first detection signal to detect the type of the charging interface as the DCP, then uses the first power corresponding with the DCP For the terminal charge.
The third aspect an embodiment of the present invention provides a kind of terminal, including processor, memory and is stored in the memory Computer program that is upper and can running on the processor, realizes such as first aspect when which is executed by the processor The step of described charging method.
Fourth aspect, an embodiment of the present invention provides a kind of computer readable storage medium, the computer-readable storage mediums Computer program is stored in matter, and the step of charging method as described in relation to the first aspect is realized when which is executed by processor Suddenly.
In embodiments of the present invention, terminal is somebody's turn to do by acquisition to the testing result of the type of the charging interface of charging unit Testing result be use the first detection signal detection n times charging interface type as a result, the charging unit is and terminal company The charging unit connect, N are the first preset times, and N is positive integer;If the testing result be first as a result, if using second detection The type of the signal detection charging interface, it is non-dedicated which, which is used to indicate n times and detects the type of the charging interface, Charging interface DCP, the first detection signal are the detection signal that the power module of the terminal generates, which is should The detection signal that the control module of terminal generates;Type according to the second detection signal detection to the charging interface is DCP, The first detection signal is then used to detect the type of the charging interface again;If detecting this using the first detection signal again The type of charging interface is the DCP, then uses the first power corresponding with the DCP for the terminal charge.First, terminal is in determination It, not only can be with using the type of the second detection signal detection charging interface after detecting the first result using first detection signal Increase detection number, and due to the detection signal for the power module generation that first detection signal is terminal, the second detection signal For the detection signal that the control module of terminal generates, therefore detection mode is also increased;In turn, when the type of charging interface is When DCP, the probability for DCP by the type detection of charging interface can be improved;When terminal using the second detection signal detection to filling When the type of electrical interface is DCP, then terminal uses the type of first detection signal detection charging interface again, again increases and adopts With first detection signal detect detection number, improve terminal use first detection signal by the type detection of charging interface for The probability of DCP, that is to say, that the probability that terminal uses the charging of the first power is improved, when charging so as to reduce terminal Between.
Description of the drawings
Fig. 1 is a kind of configuration diagram of possible Android operation system provided in an embodiment of the present invention;
Fig. 2 is a kind of charging system schematic diagram provided in an embodiment of the present invention;
Fig. 3 is a kind of flow diagram of charging method provided in an embodiment of the present invention;
Fig. 4 is the flow diagram of another charging method provided in an embodiment of the present invention;
Fig. 5 is a kind of possible structural schematic diagram of terminal of each embodiment of the present invention;
Fig. 6 is the possible structural schematic diagram of another terminal of each embodiment of the present invention;
Fig. 7 is a kind of hardware architecture diagram of terminal of each embodiment of the present invention.
Specific implementation mode
Charging method provided in an embodiment of the present invention for convenience of description briefly introduces battery charging specifications 1.2 first (battery charging specification 1.2, BC1.2).
BC1.2 defines the USB port of three types, respectively standard down interface (standard downstream Port, SDP), special charging interface (dedicated charging port, DCP) and charging downstream interface (charging Downstream port, CDP).
1, there is 15k Ω pull down resistors on D+ the and D- lines of the port of SDP type, SDP type interface using USB2.0 or The specification of person USB3.0, charging current is 500mA when interface uses USB2.0 specifications;Interface uses USB2.0 specifications Charging current is 900mA when definition.
2, the port of DCP types provides the electric current of 1.5A or more, does not support data transmission, when charging in DCP type ports D+ and D- lines between short circuit.Such port can support charger and vehicle-mounted charge on the wall compared with high charge ability Device.
3, CDP type ports both support large current charge, also support the data transmission of completely compatible USB2.0.Port has 15k Ω pull down resistors necessary to D+ and D- communications, it may have the internal circuit of charger detection-phase switching.Internal circuit is permitted Perhaps portable equipment distinguishes CDP and other type ports.
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 describes, 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, the every other implementation that those of ordinary skill in the art are obtained without creative efforts Example, shall fall within the protection scope of the present invention.
It should be noted that "/" herein indicate or the meaning, for example, A/B can indicate A or B;Herein "and/or" is only a kind of incidence relation of description affiliated partner, indicates may exist three kinds of relationships, for example, A and/or B, it can To indicate:Individualism A exists simultaneously A and B, these three situations of individualism B." multiple " refer to two or more.
It should be noted that in the embodiment of the present invention, " illustrative " or " such as " etc. words make example, example for indicating Card or explanation.Be described as in the embodiment of the present invention " illustrative " or " such as " any embodiment or design scheme do not answer It is interpreted than other embodiments or design scheme more preferably or more advantage.Specifically, " illustrative " or " example are used Such as " word is intended to that related notion is presented in specific ways.
Terminal in the embodiment of the present invention can be the terminal with operating system.The operating system can be Android (Android) operating system can be ios operating systems, can also be other possible operating systems, the embodiment of the present invention is not Make specific limit.
Below by taking Android operation system as an example, the software that charging method provided in an embodiment of the present invention is applied is introduced Environment.
As shown in Figure 1, being a kind of configuration diagram of possible Android operation system provided in an embodiment of the present invention.Scheming In 1, the framework of Android operation system includes 4 layers, respectively:Application layer, application framework layer, system operation library layer and Inner nuclear layer (is specifically as follows Linux inner core).
Wherein, application layer includes each application program (including system application and in Android operation system Tripartite's application program).
Application framework layer is the frame of application program, and developer can be in the exploitation of the frame in accordance with application program In the case of principle, some application programs are developed based on application framework layer.
System operation library layer includes library (also referred to as system library) and Android operation system running environment.Library is mainly Android behaviour All kinds of resources needed for it are provided as system.Android operation system running environment is used to provide software loop for Android operation system Border.
Inner nuclear layer is the operating system layer of Android operation system, belongs to the bottom of Android operation system software level.It is interior Stratum nucleare provides core system service and hardware-related driver based on linux kernel for Android operation system.
By taking Android operation system as an example, in the embodiment of the present invention, developer can be based on above-mentioned Android as shown in Figure 1 The system architecture of operating system, the software program of charging method provided in an embodiment of the present invention is realized in exploitation, so that this is filled Method for electrically can be run based on Android operation system as shown in Figure 1.I.e. processor or terminal device can be by Androids The software program is run in operating system realizes charging method provided in an embodiment of the present invention.
Fig. 2 is a kind of charging system schematic diagram provided in an embodiment of the present invention, as shown in (a) in Fig. 2, charging system A Including terminal 200, charging wire 21 and charging unit 22;Terminal 200 is connect by charging wire 21 with charging unit 22.Wherein, Terminal 200 includes:Application processor (application processor, AP) 201, power-management interface (power Management integrated circuit, PMIC) 202, microcontroller (microcontroller unit, MCU) 203. Optionally, the charging system B as shown in (b) in Fig. 2, terminal 210 include:AP201 and PMIC202.Wherein, PMIC202 is adopted The type of charging interface, AP201 or MCU203 are detected with first detection signal using the second detection signal detection charging interface Type.Wherein, AP201 is mainly used for each application program in control terminal, and PMIC202 is mainly used for the knowledge to charging unit It not and manages, for MCU203 mainly for detection of the type of the charging interface of charging unit, MCU203 can be to have it in terminal The MCU of his function, or increased MCU.
It should be noted that in the embodiment of the present invention, the charging of AP201 detection charging units 22 had both may be used in terminal The type of mouth can also use the type of the charging interface of the MCU203 detection charging units 22 in AP201 control terminals, this hair Bright embodiment is not especially limited this.
Fig. 3 is a kind of method flow schematic diagram of charging method provided in an embodiment of the present invention, with reference to shown in Fig. 2 Charging system illustrates the charging method of the embodiment of the present invention.
S301, terminal obtain the testing result of the type to the charging interface of charging unit.
Wherein, testing result is the type that terminal detects n times charging interface using first detection signal as a result, charging dress It is set to the charging unit being connect with terminal, N is the first preset times, and N is positive integer.
Optionally, the terminal in the embodiment of the present invention can be mobile phone, tablet computer, charger baby etc., the embodiment of the present invention In charging unit can be adapter, charging head, socket, charger baby, notebook or host etc., certainly, when a terminal can When thinking another terminal charge, charging unit may be terminal, and the embodiment of the present invention is not especially limited this.
In general, when terminal supports quick charge, when it is DCP to detect the type of charging interface of charging unit, then eventually The charging of the first charge power may be used in end, when terminal detects that the type of the charging interface of charging unit is non-DCP, then eventually The charging of the second charge power may be used in end, wherein the first charge power is more than the second charge power.
Specifically, in conjunction with Fig. 2, the detection knot of the type to the charging interface of charging unit 22 can be obtained by AP201 Fruit, testing result are the result for the type that PMIC202 detects n times charging interface using first detection signal.
In general, the sequential of BC1.2 may be used (that is, PMIC sends the first detection every 60ms, 40ms, 20ms successively in PMIC Signal) detect whether the charging interface of charging unit is DCP, the charging interface of charging unit is detected in 6 times (that is, N=6) Type be DCP, then terminal may be used the first power charging.
S302, if testing result be first as a result, if terminal using second detection signal detection charging interface type.
Wherein, the type that the first result is used to indicate n times detection charging interface is non-DCP, and first detection signal is eventually The detection signal that the power module at end generates, the second detection signal are the detection signal that the control module of terminal generates.
Optionally, the control module in the embodiment of the present invention can be the AP or MCU in terminal, and the embodiment of the present invention is to this It is not especially limited.
Specifically, in conjunction with Fig. 2, AP201 obtains testing results of the PMIC202 to the type of the charging interface of charging unit 22 For the first result when, can by AP201 or MCU203 using second detection signal detection charging interface type.Work as terminal It, can be by MCU203 using for shown in (a) in Fig. 2 when terminal 200, AP201 can indicate switch connection MCU203 The type of two detection signal detection charging interfaces;When terminal be Fig. 2 in (b) shown in terminal 210 when, then can pass through The type that AP201 detects signal detection charging interface using second.
Optionally, AP201 can pass through general input/output port (general purpose input output, GPIO) Export the break-make of the Signal-controlled switch of different level.
It should be noted that when testing result is the first result, then the control module in terminal can pass through software journey The sequential that sequence simulates BC1.2 generates the second detection signal, and using the type of the second detection signal detection charging interface.
It is appreciated that the terminal in the embodiment of the present invention is that can support the terminal of fast charge, when terminal is not support fast charge When terminal, even terminal detects that the type of the charging interface of charging unit is DCP, and terminal can not carry out quick charge.
If S303, terminal use the second detection signal detection to the type of charging interface for DCP, terminal is again using the The type of one detection signal detection charging interface.
Specifically, in conjunction with Fig. 2, if MCU203 or AP201 is using the type of the second detection signal detection to charging interface For DCP, then the type that the PMIC202 in Fig. 2 uses first detection signal detection charging interface again may be used.In conjunction with Fig. 2 In (a) shown in terminal 200, first, when the MCU203 in terminal 200 detect charging interface type be DCP, MCU203 Message 1 is sent to AP201, the type that message 1 is used to that AP201 to be notified to determine the charging interface of charging unit 22 is DCP;Secondly, AP201 controls switch after receiving message 1 and is connected to PMIC202, and sends message 2 to PMIC202, and message 2 is for notifying PMIC202 uses the type of first detection signal detection charging interface again;Finally, when PMIC202 receives message 2, PMIC202 uses the type of first detection signal detection charging interface again.Terminal 210 in conjunction with shown in (b) in Fig. 2, when AP201 detects that the type of charging interface is DCP, and AP201 control switches are connected to PMIC202, and send message to PMIC202 2, message 2 is used to notify PMIC202 to use the type of first detection signal detection charging interface again;PMIC202, which is received, to disappear When ceasing 2, PMIC202 uses the type of first detection signal detection charging interface again.
It should be noted that in the embodiment of the present invention " terminal uses first detection signal detection charging interface again Type " can be that terminal detects again when terminal and charging unit keep original connection, or terminal and charging unit It is detected again when re-establishing connection, the embodiment of the present invention is not especially limited this.
If S304, terminal use first detection signal to detect the type of charging interface as DCP again, terminal use with Corresponding first power of DCP is terminal charge.
It should be noted that terminal can be charged in charging by PMIC, can not also be charged by PMIC, the present invention Embodiment is not especially limited this.
It is appreciated that in the embodiment of the present invention, " terminal uses the first power corresponding with DCP for terminal charge " refers to Terminal allows charging unit to export the first power as terminal power supply, that is to say, that the acceptable charge power of terminal is the first work( Rate.
It should be noted that when the type of the charging interface of charging unit is DCP, charging which can provide Power may include the first power and the second power, when the charging interface of DCP types is detected as non-DCP by terminal, terminal to Charging unit sends instruction information instruction charging unit and the charging of the second power may be used, then what charging unit provided the terminal with fills Electrical power is the second power.
Charging method provided in an embodiment of the present invention, inspection of the terminal by acquisition to the type of the charging interface of charging unit Survey as a result, the testing result be use first detection signal detection n times charging interface type as a result, the charging unit for The charging unit of terminal connection, N are the first preset times, and N is positive integer;If testing result be first as a result, if terminal use The type of second detection signal detection charging interface;The type that first result is used to indicate n times detection charging interface is non- DCP, first detection signal are the detection signal that the power module of terminal generates, and the second detection signal is that the control module of terminal is given birth to At detection signal, if terminal uses the second detection signal detection to the type of charging interface for DCP, terminal is again using the The type of one detection signal detection charging interface;If terminal use again first detection signal detect the type of charging interface for DCP, then terminal use the first power corresponding with DCP for terminal charge.First, terminal is being determined using first detection signal inspection After measuring the first result, using the type of the second detection signal detection charging interface, it can not only increase detection number, and by In the detection signal that the power module that first detection signal is terminal generates, the second detection signal is that the control module of terminal generates Detection signal, therefore also increase detection mode;In turn, it when the type of charging interface is DCP, can improve charging The type detection of mouth is the probability of DCP;When terminal uses the second detection signal detection to the type of charging interface for DCP, then Terminal uses the type of first detection signal detection charging interface again, again increases the inspection detected using first detection signal Number is surveyed, improves the type for using first detection signal to detect charging interface as the probability of DCP, that is to say, that improve terminal The probability to be charged using the first power, so as to reduce the charging time of terminal.
In a kind of possible realization method, above-mentioned charging method is " terminal is using the second detection signal detection to charging After the type of mouth is DCP ", further include before " terminal uses the type of first detection signal detection charging interface again " S305:
S305, terminal export prompt message.
Wherein, prompt message is used to indicate user and reconnects charging unit and terminal.
Specifically, in conjunction with Fig. 2, when AP201 or MCU203 is using the type of the second detection signal detection to charging interface After DCP, prompt message can be generated by AP201 and exports the prompt message.
Optionally, prompt message may be displayed in notification bar, the prompting frame that can also be shown in display interface In, user's reconnect charging unit and terminal, the embodiment of the present invention can also be prompted not to limit this specifically with voice output It is fixed.
In turn, in the S303 in above-mentioned charging method " terminal uses first detection signal detection charging interface again Type " can be executed by W1:
If W1, user reconnect charging unit and terminal, terminal uses first detection signal to detect charging again The type of mouth.
Optionally, user can reconnect any one interface of the charging wire between terminal and charging unit.
It should be noted that after charging unit and terminal reconnect, terminal uses first detection signal to examine again The type of charging interface is surveyed, the type of charging interface is DCP if being detected after detecting again, and terminal may be used and DCP classes The corresponding first charge power charging of type.
Specifically, in conjunction with (a) in Fig. 2, if after charging unit 22 is reconnected with terminal 200, PMIC202 is adopted again The type of charging interface is detected with first detection signal.
It should be noted that in the embodiment of the present invention, AP201 acquiescences are connect with PMIC202, finish when terminal charge or When connection between terminal and charging unit 22 disconnects, AP201 controls switching to PMIC202, when terminal and charging unit 22 When reconnect, terminal acquiescence is using PMIC202 using the type of first detection signal detection charging interface.
Based on the program, if terminal is DCP according to the type of the second detection signal detection to charging interface, terminal can lead to It crosses to prompt message is exported, to remind user to reconnect charging unit and terminal, then terminal can weigh after reconnecting The new type using first detection signal detection charging interface improves detection number, to increase the type of charging interface Detect accurate probability, so can more maximum probability the charging of the first power of use, reduce the time of terminal charge.
Specifically, the W1 in above-mentioned charging method can be executed by W2:
If W2, target, which connect number, is less than the second preset times, terminal uses first detection signal detection charging again The type of interface.
Wherein, target connection number is the number that user connects charging unit and terminal in target time section, object time The type that Duan Weicong uses the second detection signal detection to charging interface is DCP to again using first detection signal detection charging Period of the type of interface between DCP.
It should be noted that when charging unit and the connection number of terminal are less than the second preset times, terminal uses first The type for detecting signal detection charging interface is still first later as a result, if terminal is using the second detection signal detection to charging The type of interface is DCP, and terminal can use the type of first detection signal detection charging interface again.
Optionally, the second preset times can be identical with the first preset times, can also be different with the first preset times, this Inventive embodiments are not especially limited this.
Based on the program, if target connection number is less than the second preset times, the first detection is used to believe again by terminal Number detection charging interface type, increase terminal detection charging interface type number, so as to improve charging interface Type detection accuracy rate, reduce the probability that DCP is detected as to non-DCP, this improves terminal use high-power charging Probability so that charging time of terminal is reduced.
Optionally, after user reconnects charging unit and terminal, above-mentioned charging method further includes S306:
If S306, target connect number be equal to the second preset times, terminal use the second power corresponding with non-DCP for Terminal charge, the second power are less than the first power.
It is appreciated that when connecting number equal to the second preset times, the PMIC in terminal is examined using first detection signal It surveys after the type of charging interface still for first as a result, then the charging interface of the charging unit is that the probability of non-DCP is bigger, i.e., Make to reresent user's reconnect, the result of PMIC detections may be still non-DCP, and therefore, terminal is using corresponding with non-DCP Second power is terminal charge, and the damage that paired terminal is made more than the charge power charging of the second power can be used to avoid terminal It ruins, for example electric current is excessive so that accident, the excessive component caused in terminal of voltage caused by terminal fever are burnt.
Optionally, in type of the terminal using the second detection signal detection to charging interface, above-mentioned charging method is also wrapped Include S307:
If S307, terminal use second detection signal detection to charging interface type for non-DCP, terminal using with it is non- Corresponding second power of DCP is terminal charge, and the second power is less than the first power.
Based on the program, terminal detect first as a result, and terminal using the second detection signal detection to charging interface Type be non-DCP, then it represents that the type of the charging interface of the charging unit have larger probability be non-DCP, therefore, terminal It uses the second power corresponding with non-DCP that can reduce for terminal charge terminal is caused to damage using the charging of larger charge power Probability, and then but also terminal charge is safer.
It is appreciated that terminal uses the type of first detection signal detection charging interface again, testing result may be DCP May also be non-DCP, optionally, above-mentioned charging method further includes S308:
If S308, terminal use first detection signal to detect the type of charging interface as non-DCP again, terminal continues The type of charging interface is detected using first detection signal, until detection number reaches P times, and P testing result is non- DCP, P are third preset times, and P is positive integer.
It is appreciated that in traditional detection method, when the type for being detected charging interface using first detection signal is being detected Type to charging interface is DCP, then it is terminal charge that the first power, which may be used, and detection 6 times (that is, N=6) is non-DCP Then think that the type of charging interface is not DCP, then it is terminal charge that the second power, which may be used,.In the embodiment of the present invention, with After family reconnects terminal and charging unit according to prompt message, the class of first detection signal detection charging interface is used again When type, detection is that non-DCP then thinks that the type of charging interface is not DCP for P time, if at this point, target, which connects number, is not up to the When two preset times, terminal continues to use the type of first detection signal detection charging interface again, until target connects number Reach the second preset times.
It should be noted that P in the embodiment of the present invention can also it is identical as N can not also be identical as N, the present invention is implemented Example is not especially limited this.
Optionally, above-mentioned charging method S303 can be executed by S303a:
If S303a, terminal continuous N time use the second detection signal detection to the type of charging interface for DCP, terminal weight The new type using first detection signal detection charging interface, M is the 4th preset times, and M is positive integer.
Specifically, in conjunction with Fig. 2, the 4th preset times are used to improve the type of AP201 or MCU203 detection charging interfaces For the accuracy rate of DCP, after AP201 or MCU203 begin to use the second detection signal detection, if continuous 4th preset times AP201/MCU203 uses the second detection signal detection to the type of charging interface for DCP, then it represents that the type of charging interface is The possibility of DCP is bigger, reuses the PMIC202 in terminal at this time and uses first detection signal detection charging interface again Type detects that the probability that the type of charging interface is DCP is bigger.
Based on the program, before terminal uses the type that first detection signal detects charging interface again, if terminal connects Continuing M times uses the second detection signal detection to the type of charging interface for DCP, then it represents that the charging unit being connect with the terminal The type of charging interface is that the possibility of DCP is bigger, and terminal by using first detection signal to detect charging again at this time The type of mouth increases the detection number of the type of detection charging interface, improves the detection for DCP by the type of charging interface Successful probability, and then the probability that terminal uses the charging of the first power is improved, so as to shorten the charging time of terminal.
Illustratively, Fig. 4 is a kind of flow diagram of charging method provided in an embodiment of the present invention, in conjunction with Fig. 2, Fig. 4 In the flow of charging method include the following steps:
(1) if in above method embodiment " terminal use again first detection signal detect the type of charging interface for Non- DCP, then terminal continue using first detection signal detection charging interface type, until detection number reach P times " in P not Equal to N, then include the following steps as shown in (a) in Fig. 4:
For terminal after terminal 200 and charging unit 22 establish connection by charging wire 21, switch is connected to PMIC202.
Step 1:PMIC202 detects the type of the charging interface of charging unit 22 according to first detection signal.
It should be noted that after first time establishes connection, without judging whether charging path is target connection, in user After reconnecting terminal and charging unit according to prompt message, need to judge whether charging path is target connection, wherein mesh Mark is connected as user according to the connection re-established after prompt message.
If PMIC202 detects that the type of charging interface is DCP, the first power may be used and charge for terminal 210.
If PMIC202 detects that the type of charging interface is non-DCP according to first detection signal, PMIC202 has been detected Detection number add 1.
Step 2:Determine whether the detection number of PMIC202 is less than or equal to N.
If the detection number that PMIC202 has been detected is less than N, PMIC202 is detected according to first detection signal and is charged again The type of the charging interface of device 22.
If the detection number that PMIC202 has been detected is equal to N, PMIC202 sends a notification message 1 to AP201, which disappears The type that breath is used to indicate the charging interface for detecting charging unit 22 of n times is non-DCP (that is, first result).
Step 3:After AP201 obtains the first result, control switch is switched to MCU203 from PMIC202, i.e. AP201, MCU203 establishes connection by charging wire 21 and charging unit 22.
Step 4:After AP201, MCU203 establish connection by charging wire 21 and charging unit 22, MCU203 is according to the Whether the type of two detection signal detection charging interfaces is DCP.
If MCU203 detects that the type of charging interface is non-DCP, MCU203 sends a notification message 2 to AP201, notice It is non-DCP that message 2, which is used to indicate the result that MCU203 is detected, then the second power may be used and charge for terminal 200.
If MCU203 detects that the type of charging interface is for DCP, MCU203 sends a notification message 3 to AP201, notice It is DCP that message 3, which is used to indicate the result that MCU203 is detected, then AP201 generates and export prompt message, and prompt message is for carrying Show that user reconnects charging unit 22 and terminal 200.
Step 5:AP201 detects that user reconnects terminal 200 and charging unit 22;After reconnection, it determines Whether the detection number that PMIC202 detects the type of the charging interface of charging unit 22 according to first detection signal is less than or equal to P。
If the detection number that PMIC202 has been detected is less than P, PMIC202 is detected according to first detection signal and is charged again The type of the charging interface of device 22.
If the detection number that PMIC202 has been detected is equal to P, PMIC202 sends a notification message 4 to AP201, which disappears The type that breath 4 is used to indicate the P charging interface for detecting charging unit 22 is non-DCP (being denoted as the second result).
Step 6:Control switch is switched to MCU203, i.e. AP201, MCU203 from PMIC202 after AP201 obtains the second result Connection is established by charging wire 21 and charging unit 22.
If MCU203 detects that the type of charging interface is still non-DCP, target connects number and is equal to Q (that is, second is default Number), Q is positive integer, then terminal is charged using the second power.
After charging complete, AP201 control switches are switched to PMIC202 from MCU203.
If target, which connects number, is less than Q, PMIC202 detects the charging of charging unit 22 according to first detection signal again The type of interface is (that is, continue to execute step 5).
(2) if in above method embodiment " terminal use again first detection signal detect the type of charging interface for Non- DCP, then terminal continues the type using first detection signal detection charging interface, until detection number reaches P times " in P etc. In N, then as shown in (b) in Fig. 4:Without detecting whether charging path is target connection in charging method flow, switch connects It is connected to PMIC, then PMIC202 detects the type of the charging interface of charging unit 22 using first detection signal, and judges detection time Whether number is less than or equal to N (that is, step 2 execution may be used in step 5, the second result in step 5 is the first result).Its The description of his step can refer to the description of correlation step in (a) in Fig. 4.
It is appreciated that terminal still detects the charging of charging unit after being detected P times according to first detection signal again When the type of interface is non-DCP, is detected again using the second detection signal by terminal, detection number is increased, if charging When the type of mouth is DCP, then improves terminal and the type detection of charging interface is the probability of DCP, and then improve terminal and adopt The probability to be charged with the first power, therefore terminal can be made to reduce the charging time.
Fig. 5 is a kind of possible hardware architecture diagram of terminal provided in an embodiment of the present invention, as shown in figure 5, terminal 500 Including:Acquisition module 501, first detection module 502, the second detection module 503 and charging module 504;Acquisition module 501 is used In the testing result for obtaining the type to the charging interface of charging unit, testing result is to detect n times using first detection signal The type of charging interface as a result, charging unit is the charging unit being connect with terminal 500, N is the first preset times, and N is just Integer;First detection module 502, for if the testing result that acquisition module 501 obtains be first as a result, if using second detect The type of signal detection charging interface, the type that the first result is used to indicate n times detection charging interface are non-DCP, the first inspection The detection signal that the power module that signal is terminal 500 generates is surveyed, the second detection signal is that the control module of terminal 500 generates Detect signal;Second detection module 503, if for first detection module 502 using the second detection signal detection to charging interface Type be DCP, then again use first detection signal detection charging interface type;Charging module 504, if for the second inspection Survey module 503 uses first detection signal to detect the type of charging interface as DCP again, then uses corresponding with DCP first Power charges for terminal 500.
Optionally, in conjunction with Fig. 5, as shown in fig. 6, terminal 500 further includes output module 505;Output module 505 is used for Before second detection module 503 uses the type of first detection signal detection charging interface again, prompt message is exported, prompts letter Breath is used to indicate user and reconnects charging unit and terminal;Second detection module 503 fills if being reconnected specifically for user Electric installation and terminal 500 then use the type of first detection signal detection charging interface again.
Optionally, the second detection module 503, if being less than the second preset times specifically for target connection number, again The type of charging interface is detected using first detection signal, wherein target connection number is that user's connection is filled in target time section The number of electric installation and terminal 500, target time section be from use second detect signal detection to charging interface type for DCP Period of the type of charging interface between DCP is detected to first detection signal is used again.
Optionally, charging module 504 use and non-DCP if being additionally operable to target connection number is equal to the second preset times Corresponding second power charges for terminal 500, and the second power is less than the first power.
Optionally, charging module 504, if being additionally operable to first detection module 502 using the second detection signal detection to charging The type of interface is non-DCP, then the second power corresponding with non-DCP is used to charge for terminal 500, and the second power is less than the first work( Rate.
Optionally, the second detection module 503, if being additionally operable to the class for using first detection signal to detect charging interface again Type is non-DCP, then continues the type using first detection signal detection charging interface, until detection number reaches P times, and P times Testing result be non-DCP, P is third preset times, and P is positive integer.
Optionally, the second detection module 503, if being additionally operable to first detection module 502 continuous N time using the second detection signal Detect that the type of charging interface is DCP, then it is the 4th pre- to use the type of first detection signal detection charging interface, M again If number, M is positive integer.
Terminal 500 provided in an embodiment of the present invention can be realized in the embodiment of the method described in any one of Fig. 1-Fig. 6 eventually The each process realized is held, to avoid repeating, which is not described herein again.
A kind of hardware architecture diagram of Fig. 7 terminals of each embodiment to realize the present invention, the terminal 700 include but not It is limited to:Radio frequency unit 701, network module 702, audio output unit 703, input unit 704, sensor 705, display unit 706, the components such as user input unit 707, interface unit 708, memory 709, processor 710 and power supply 711.This field Technical staff is appreciated that the restriction of the not structure paired terminal of terminal structure shown in Fig. 7, terminal may include than illustrating more More or less component either combines certain components or different components arrangement.In embodiments of the present invention, terminal includes But be not limited to mobile phone, tablet computer, laptop, palm PC, car-mounted terminal, wearable device and pedometer etc..
Wherein, processor 710, the testing result for obtaining the type to the charging interface of charging unit, testing result For use first detection signal detect n times charging interface type as a result, charging unit for the charging unit that is connect with terminal, N is the first preset times;If testing result be first as a result, if using the second detection signal detection charging interface type, the The type that one result is used to indicate n times detection charging interface is non-dedicated charging interface DCP, and first detection signal is terminal The detection signal that power module generates, the second detection signal are the detection signal that the control module of terminal generates;According to second The type for detecting signal detection to charging interface is DCP, then uses the type of first detection signal detection charging interface again;If Again it uses first detection signal to detect the type of charging interface as DCP, then uses the first power corresponding with DCP for terminal Charging.
Terminal provided in an embodiment of the present invention, terminal is by acquisition to the detection knot of the type of the charging interface of charging unit Fruit, the testing result be use the first detection signal detection n times charging interface type as a result, the charging unit for end It is the first preset times to hold the charging unit of connection, N, and N is positive integer;If the testing result be first as a result, if use second The type of the signal detection charging interface is detected, it is non-that which, which is used to indicate n times and detects the type of the charging interface, Special charging interface DCP, the first detection signal are the detection signal that the power module of the terminal generates, the second detection signal The detection signal generated for the control module of the terminal;According to this second detection signal detection to the charging interface type be DCP then uses the first detection signal to detect the type of the charging interface again;If using the first detection signal to detect again Type to the charging interface is the DCP, then uses the first power corresponding with the DCP for the terminal charge.First, terminal exists It determines after detecting the first result using first detection signal, using the type of the second detection signal detection charging interface, not only Detection number can be increased, and since first detection signal is the detection signal that power module generates, the second detection signal is The detection signal that control module generates, therefore also increase detection mode;It in turn, can be with when the type of charging interface is DCP Improve the probability for DCP by the type detection of charging interface;When terminal is using the class of the second detection signal detection to charging interface When type is DCP, then terminal uses the type of first detection signal detection charging interface again, again increases using the first detection The detection number of signal detection improves terminal and uses first detection signal by the type detection of charging interface for the probability of DCP, That is the probability that terminal uses the charging of the first power is improved, so as to reduce the charging time of terminal.
It should be understood that the embodiment of the present invention in, radio frequency unit 701 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 710 handle;In addition, by uplink Data are sent to base station.In general, radio frequency unit 701 includes but not limited to antenna, at least one amplifier, transceiver, coupling Device, low-noise amplifier, duplexer etc..In addition, radio frequency unit 701 can also by radio communication system and network and other set Standby communication.
Terminal has provided wireless broadband internet to the user by network module 702 and has accessed, and such as user is helped to receive and dispatch electricity Sub- mail, browsing webpage and access streaming video etc..
It is that audio output unit 703 can receive radio frequency unit 701 or network module 702 or in memory 709 The audio data of storage is converted into audio signal and exports to be sound.Moreover, audio output unit 703 can also provide and end The relevant audio output of specific function (for example, call signal receives sound, message sink sound etc.) that end 700 executes.Sound Frequency output unit 703 includes loud speaker, buzzer and receiver etc..
Input unit 704 is for receiving audio or video signal.Input unit 704 may include graphics processor (Graphics Processing Unit, GPU) 7041 and microphone 7042, graphics processor 7041 is in video acquisition mode Or the image data of the static images or video obtained by image capture apparatus (such as camera) in image capture mode carries out Reason.Treated, and picture frame may be displayed on display unit 706.Through graphics processor 7041, treated that picture frame can be deposited Storage is sent in memory 709 (or other storage mediums) or via radio frequency unit 701 or network module 702.Mike Wind 7042 can receive sound, and can be audio data by such acoustic processing.Treated audio data can be The format output of mobile communication base station can be sent to via radio frequency unit 701 by being converted in the case of telephone calling model.
Terminal 700 further includes at least one sensor 705, such as optical sensor, motion sensor and other sensors. Specifically, optical sensor includes ambient light sensor and proximity sensor, wherein ambient light sensor can be according to ambient light Light and shade adjusts the brightness of display panel 7061, and proximity sensor can close display panel when terminal 700 is moved in one's ear 7061 and/or backlight.As a kind of motion sensor, accelerometer sensor can detect in all directions (generally three axis) and add The size of speed can detect that size and the direction of gravity when static, can be used to identify terminal posture (such as horizontal/vertical screen switching, Dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, tap) etc.;Sensor 705 can be with Including fingerprint sensor, pressure sensor, iris sensor, molecule sensor, gyroscope, barometer, hygrometer, thermometer, Infrared sensor etc., details are not described herein.
Display unit 706 is for showing information input by user or being supplied to the information of user.Display unit 706 can wrap Display panel 7061 is included, liquid crystal display (Liquid Crystal Display, LCD), Organic Light Emitting Diode may be used Forms such as (Organic Light-Emitting Diode, OLED) configure display panel 7061.
User input unit 707 can be used for receiving the number or character information of input, and generates and set with the user of terminal It sets and the related key signals of function control inputs.Specifically, user input unit 707 include touch panel 7071 and other Input equipment 7072.Touch panel 7071, also referred to as touch screen, collect user on it or neighbouring touch operation (such as User is using any suitable objects or attachment such as finger, stylus on touch panel 7071 or near touch panel 7071 Operation).Touch panel 7071 may include both touch detecting apparatus and touch controller.Wherein, touch detecting apparatus is examined The touch orientation of user is surveyed, and detects the signal that touch operation is brought, transmits a signal to touch controller;Touch controller from Touch information is received on touch detecting apparatus, and is converted into contact coordinate, then gives processor 710, receives processor 710 The order sent simultaneously is executed.Furthermore, it is possible to using multiple types such as resistance-type, condenser type, infrared ray and surface acoustic waves Realize touch panel 7071.In addition to touch panel 7071, user input unit 707 can also include other input equipments 7072. Specifically, other input equipments 7072 can include but is not limited to physical keyboard, function key (such as volume control button, switch Button etc.), trace ball, mouse, operating lever, details are not described herein.
Further, touch panel 7071 can be covered on display panel 7061, when touch panel 7071 is detected at it On or near touch operation after, send processor 710 to determine the type of touch event, be followed by subsequent processing device 710 according to touch The type for touching event provides corresponding visual output on display panel 7061.Although in the figure 7, touch panel 7071 and display Panel 7061 is to realize the function that outputs and inputs of terminal as two independent components, but in certain embodiments, can The function that outputs and inputs of terminal is realized so that touch panel 7071 and display panel 7061 is integrated, is not limited herein specifically It is fixed.
Interface unit 708 is the interface that external device (ED) is connect with terminal 700.For example, external device (ED) may include it is wired or Wireless head-band earphone port, external power supply (or battery charger) port, wired or wireless data port, memory card port, For connecting the port of device with identification module, the port audio input/output (I/O), video i/o port, ear port Etc..Interface unit 708 can be used for receiving the input (for example, data information, electric power etc.) from external device (ED) and will One or more elements that the input received is transferred in terminal 700 or can be used for terminal 700 and external device (ED) it Between transmission data.
Memory 709 can be used for storing software program and various data.Memory 709 can include mainly storing program area And storage data field, wherein storing program area can storage program area, application program (such as the sound needed at least one function Sound playing function, image player function etc.) etc.;Storage data field can store according to mobile phone use created data (such as Audio data, phone directory etc.) etc..In addition, memory 709 may include high-speed random access memory, 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 710 is the control centre of terminal, using the various pieces of various interfaces and the entire terminal of connection, is led to It crosses operation or executes the software program and/or module being stored in memory 709, and call and be stored in memory 709 Data execute the various functions and processing data of terminal, to carry out integral monitoring to terminal.Processor 710 may include one Or multiple processing units;Preferably, processor 710 can integrate application processor and modem processor, wherein application processing The main processing operation system of device, user interface and application program etc., modem processor mainly handles wireless communication.It can manage Solution, above-mentioned modem processor can not also be integrated into processor 710.
Terminal 700 can also include the power supply 711 (such as battery) powered to all parts, it is preferred that power supply 711 can be with It is logically contiguous by power-supply management system and processor 710, to by power-supply management system realize management charging, electric discharge, with And the functions such as power managed.
In addition, terminal 700 includes some unshowned function modules, details are not described herein.
Preferably, the embodiment of the present invention also provides a kind of terminal, and in conjunction with Fig. 7, terminal includes processor 710, memory 709, it is stored in the computer program that can be run on memory 709 and on the processor 710, which is handled Device 710 realizes each process of above-mentioned charging method embodiment when executing, and can reach identical technique effect, to avoid weight Multiple, which is not described herein again.
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 charging method embodiment when being executed by processor, and can reach Identical technique effect, to avoid repeating, which is not described herein again.Wherein, the computer readable storage medium is deposited Ru read-only Reservoir (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disc or CD etc..
It should be noted that herein, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that process, method, article or device including a series of elements include not only 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 this There is also other identical elements in the process of element, method, 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 add the mode of required general hardware platform to realize by software, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, technical scheme of the present invention substantially in other words does the prior art Going out the part of contribution can be expressed in the form of software products, which is stored in a storage medium In (such as ROM/RAM, magnetic disc, CD), including some instructions are used so that a station 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 in 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 the protection of the present invention.

Claims (10)

1. a kind of charging method, which is characterized in that the method includes:
The testing result of the type to the charging interface of charging unit is obtained, the testing result is to be examined using first detection signal Survey the type of charging interface described in n times as a result, the charging unit be charging unit connect with terminal, N presets for first Number, N are positive integer;
If the testing result be first as a result, if using charging interface described in the second detection signal detection type, described the It is non-dedicated charging interface DCP, the first detection signal that one result, which is used to indicate n times and detects the type of the charging interface, For the detection signal that the power module of the terminal generates, the second detection signal is that the control module of the terminal generates Detect signal;
Type according to the second detection signal detection to the charging interface is DCP, then is examined again using described first Survey the type of charging interface described in signal detection;
If the first detection signal is used to detect the type of the charging interface as the DCP again, using with it is described Corresponding first power of DCP is the terminal charge.
2. according to the method described in claim 1, it is characterized in that, described again using described in first detection signal detection Before the type of charging interface, the method further includes:
Prompt message is exported, the prompt message is used to indicate user and reconnects the charging unit and the terminal;
Again the type that the charging interface is detected using the first detection signal, including:
If user reconnects the charging unit and the terminal, filled again using described in first detection signal detection The type of electrical interface.
If 3. according to the method described in claim 2, it is characterized in that, the user reconnect the charging unit with it is described Terminal then detects the type of the charging interface using the first detection signal again, including:
If target, which connects number, is less than the second preset times, the charging interface is detected using the first detection signal again Type;
The method further includes:
If the target connection number is equal to second preset times, it is described to use the second power corresponding with non-DCP Terminal charge, second power are less than first power;
Wherein, the target connection number is the number that user connects the charging unit and the terminal in target time section, It is DCP to using again that the target time section, which is from the described second type for detecting signal detection to the charging interface use, The first detection signal detects period of the type of the charging interface between DCP.
4. according to the method described in claim 1, it is characterized in that, the method further includes:
Type according to the second detection signal detection to the charging interface is non-DCP, then uses and described non-DCP pairs The second power answered is the terminal charge, and second power is less than first power.
5. according to claim 1-4 any one of them methods, which is characterized in that the method further includes:
If the first detection signal is used to detect that the type of the charging interface for the non-DCP, continues to use again The first detection signal detects the type of the charging interface, until detection number reaches P times, and P testing result is equal For the non-DCP, P is third preset times, and P is positive integer.
6. according to the method described in claim 1, it is characterized in that, according to the second detection signal detection to the charging The type of interface is DCP, then detects the type of the charging interface using the first detection signal again, including:
If continuous N time uses the second detection signal detection, for DCP, to be used again described to the type of the charging interface First detection signal detects the type of the charging interface, and M is the 4th preset times, and M is positive integer.
7. a kind of terminal, which is characterized in that the terminal includes:It acquisition module, first detection module, the second detection module and fills Electric module;
The acquisition module, the testing result for obtaining the type to the charging interface of charging unit, the testing result are Use first detection signal detection n times described in charging interface type as a result, the charging unit fills for what is connect with terminal Electric installation, N are the first preset times, and N is positive integer;
The first detection module, for if the testing result that the acquisition module obtains be first as a result, if use the The type of charging interface, first result described in two detection signal detections are used to indicate the class that n times detect the charging interface Type is non-dedicated charging interface DCP, and the first detection signal is the detection signal that the power module of the terminal generates, institute State the detection signal that the control module that the second detection signal is the terminal generates;
Second detection module, if detecting signal detection to the charging using described second for the first detection module The type of interface is DCP, then detects the type of the charging interface using the first detection signal again;
The charging module, if detecting the charging using the first detection signal again for second detection module The type of interface is the DCP, then uses the first power corresponding with the DCP for the terminal charge.
8. terminal according to claim 7, which is characterized in that the terminal further includes output module;
The output module, for detecting the charging using the first detection signal again in second detection module Mouthful type before, export prompt message, the prompt message be used to indicate user reconnect the charging unit with it is described Terminal;
Second detection module uses again if reconnecting the charging unit and the terminal specifically for user The first detection signal detects the type of the charging interface.
9. terminal according to claim 8, which is characterized in that
Second detection module uses described the again if being less than the second preset times specifically for target connection number The type of charging interface described in one detection signal detection;
The charging module uses and non-DCP pairs if being additionally operable to the target connection number is equal to second preset times The second power answered is the terminal charge, and second power is less than first power;
Wherein, the target connection number is the number that user connects the charging unit and the terminal in target time section, It is DCP to using again that the target time section, which is from the described second type for detecting signal detection to the charging interface use, The first detection signal detects period of the type of the charging interface between DCP.
10. terminal according to claim 7, which is characterized in that
Second detection module, if be additionally operable to the first detection module continuous N time detects signal detection using described second Type to the charging interface is DCP, then detects the type of the charging interface, M using the first detection signal again For the 4th preset times, M is positive integer.
CN201810209972.XA 2018-03-14 2018-03-14 Charging method and terminal Active CN108448177B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810209972.XA CN108448177B (en) 2018-03-14 2018-03-14 Charging method and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810209972.XA CN108448177B (en) 2018-03-14 2018-03-14 Charging method and terminal

Publications (2)

Publication Number Publication Date
CN108448177A true CN108448177A (en) 2018-08-24
CN108448177B CN108448177B (en) 2019-12-20

Family

ID=63195174

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810209972.XA Active CN108448177B (en) 2018-03-14 2018-03-14 Charging method and terminal

Country Status (1)

Country Link
CN (1) CN108448177B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109888884A (en) * 2019-03-28 2019-06-14 维沃移动通信有限公司 A kind of charging circuit, terminal device, charging interface and charging equipment
CN111835049A (en) * 2019-04-22 2020-10-27 北京小米移动软件有限公司 Charging terminal, method and device
CN115622177A (en) * 2022-09-30 2023-01-17 荣耀终端有限公司 Charging method, mobile terminal and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103033698A (en) * 2011-09-30 2013-04-10 快捷半导体(苏州)有限公司 Charger detection with proprietary charger support
CN104103868A (en) * 2014-07-21 2014-10-15 Tcl通讯(宁波)有限公司 Charging method and system for charger of mobile terminal
CN104426194A (en) * 2013-09-06 2015-03-18 联想(北京)有限公司 Charging method and charging equipment
CN105553001A (en) * 2015-12-23 2016-05-04 深圳市万普拉斯科技有限公司 Charging method and intelligent terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103033698A (en) * 2011-09-30 2013-04-10 快捷半导体(苏州)有限公司 Charger detection with proprietary charger support
CN104426194A (en) * 2013-09-06 2015-03-18 联想(北京)有限公司 Charging method and charging equipment
CN104103868A (en) * 2014-07-21 2014-10-15 Tcl通讯(宁波)有限公司 Charging method and system for charger of mobile terminal
CN105553001A (en) * 2015-12-23 2016-05-04 深圳市万普拉斯科技有限公司 Charging method and intelligent terminal

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109888884A (en) * 2019-03-28 2019-06-14 维沃移动通信有限公司 A kind of charging circuit, terminal device, charging interface and charging equipment
CN111835049A (en) * 2019-04-22 2020-10-27 北京小米移动软件有限公司 Charging terminal, method and device
CN111835049B (en) * 2019-04-22 2022-06-24 北京小米移动软件有限公司 Charging terminal, method and device
CN115622177A (en) * 2022-09-30 2023-01-17 荣耀终端有限公司 Charging method, mobile terminal and storage medium
CN115622177B (en) * 2022-09-30 2023-10-27 荣耀终端有限公司 Charging method, mobile terminal and storage medium

Also Published As

Publication number Publication date
CN108448177B (en) 2019-12-20

Similar Documents

Publication Publication Date Title
CN109343759A (en) A kind of control method and terminal of the display of breath screen
CN108494030A (en) A kind of wireless charging method, terminal and transmitting end equipment
CN108594120A (en) Detection method, device and the computer readable storage medium of battery status
CN107911445A (en) A kind of information push method, mobile terminal and storage medium
CN109814968A (en) A kind of data inputting method, terminal device and computer readable storage medium
CN109560591A (en) Charging method, device and terminal
CN109888928A (en) A kind of terminal and wireless charging control method
CN109600297A (en) A kind of mark sweep-out method and terminal device
CN110213686A (en) A kind of detection method and terminal of earphone socket
CN108448177A (en) A kind of charging method and terminal
CN109755997A (en) A kind of charging method and terminal device
CN107887947A (en) A kind of guard method of charging port and mobile terminal
CN108767919A (en) A kind of charging unit, terminal device and charging method
CN110267145A (en) A kind of state display method and terminal device
CN109061342A (en) A kind of fast charge plug test method and device
WO2018218686A1 (en) Method for detecting swelling of rechargeable battery, and portable electronic device
CN108898000A (en) A kind of method and terminal solving lock screen
CN109443261A (en) The acquisition methods and mobile terminal of Folding screen mobile terminal folding angles
CN108718360A (en) A kind of charging method and mobile terminal
CN110190641A (en) Charging control circuit, terminal device and data line
CN109860743A (en) A kind of charging method and terminal device
CN109979286A (en) A kind of information demonstrating method and terminal device
CN110209543A (en) A kind of detection method and terminal of earphone socket
CN109991507A (en) A kind of smart card contact detection circuit, method and apparatus
CN109950952A (en) A kind of method of supplying power to and mobile terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant