CN107465234B - A kind of charge control method, mobile terminal and adapter - Google Patents

A kind of charge control method, mobile terminal and adapter Download PDF

Info

Publication number
CN107465234B
CN107465234B CN201710832389.XA CN201710832389A CN107465234B CN 107465234 B CN107465234 B CN 107465234B CN 201710832389 A CN201710832389 A CN 201710832389A CN 107465234 B CN107465234 B CN 107465234B
Authority
CN
China
Prior art keywords
adapter
mobile terminal
voltage
gear
verifying
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710832389.XA
Other languages
Chinese (zh)
Other versions
CN107465234A (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 CN201710832389.XA priority Critical patent/CN107465234B/en
Publication of CN107465234A publication Critical patent/CN107465234A/en
Application granted granted Critical
Publication of CN107465234B publication Critical patent/CN107465234B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • 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/00045Authentication, i.e. circuits for checking compatibility between one component, e.g. a battery or a battery charger, and another component, e.g. a power source

Landscapes

  • Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The present invention relates to field of communication technology, a kind of charge control method, mobile terminal and adapter are disclosed, wherein the output voltage for the first connecting pin that the mobile terminal is connected with adapter can switch between at least two voltage gears.If including: wherein to detect that adapter accesses applied to the charge control method of mobile terminal, judge whether numerical value recorded in a statistical data reaches default value;The statistical data is for recording the connection number that the output voltage of first connecting pin is connect in current first voltage gear with adapter successful handshake;If numerical value recorded in the statistical data reaches the default value, from the first voltage gear switch it is second voltage gear by the output voltage of first connecting pin, and shakes hands and connect with the adapter using the second voltage gear.The present invention improves the safety of the charge protocol between mobile terminal and adapter.

Description

A kind of charge control method, mobile terminal and adapter
Technical field
The present invention relates to field of communication technology more particularly to a kind of charge control methods, mobile terminal and adapter.
Background technique
With the development of terminal technology, the charging modes of terminal are also more and more.Wherein the charging modes of terminal include fast Fast charging modes and common charging modes, the difference of the two are: in the identical situation of charge capacity of terminal, using fast The speed charging charged time, which is less than to use, commonly charges the charged time.Currently, most terminals use rapid nitriding It charges, generally quick charge is realized by improving the output power of adapter.Wherein improve adapter output There are two types of the modes of power: one is by way of improving output voltage, such as the side QC (quick charge, Quick Charge) Formula;Another kind is such as the FCP (fast charge agreement, Fast Charging Protocol) by way of mentioning High Output Current.
Currently, the communication mode between terminal and adapter, generally by D+ (data are just) and the D- (number of charging interface According to negative) or CC1 (the first collocation channel) and CC2 (the second collocation channel) communicated.D+ and D- is either used above, Or using CC1 and CC2 communicate by the way of, be all after terminal and adapter are shaken hands successfully into quick charge mould Formula, security performance are poor;And the Handshake Protocol between terminal and adapter is compared simply, and the peace of charge protocol is also unfavorable for Full property and confidentiality.
Summary of the invention
The present invention provides a kind of charge control method, mobile terminal and adapter, with solve in the prior art terminal with The low problem of charge protocol security performance between adapter.
In a first aspect, it is applied to mobile terminal the embodiment of the invention provides a kind of charge control method, it is described mobile whole Holding the output voltage for the first connecting pin being connected with adapter can switch between at least two voltage gears;Wherein, institute Stating charge control method includes:
If detecting, adapter is accessed, and judges whether numerical value recorded in a statistical data reaches default value;It is described Statistical data is used to record the output voltage of first connecting pin in current first voltage gear and adapter successful handshake The connection number of connection;
If numerical value recorded in the statistical data reaches the default value, by the output of first connecting pin Voltage is second voltage gear from the first voltage gear switch, and is held with the adapter using the second voltage gear Hand connection.
Second aspect, the embodiment of the invention also provides a kind of mobile terminal, the mobile terminal is connected with adapter The output voltage of the first connecting pin can switch between at least two voltage gears;Wherein, the mobile terminal includes:
Judgment module, if judging whether numerical value recorded in a statistical data reaches for detecting that adapter accesses Default value;The statistical data is used to record the output voltage of first connecting pin in current first voltage gear and fits The connection number of orchestration successful handshake connection;
First switching module, if reaching the default value for numerical value recorded in the statistical data, by institute It is second voltage gear that the output voltage of the first connecting pin, which is stated, from the first voltage gear switch, and uses the second voltage Gear is shaken hands with the adapter and is connect.
The third aspect the embodiment of the invention also provides a kind of mobile terminal, including processor, memory and is stored in institute The computer program that can be run on memory and on the processor is stated, when the computer program is executed by the processor The step of realizing charge control method as described above.
Fourth aspect, it is described the embodiment of the invention also provides a kind of a kind of computer readable storage medium of mobile terminal It is stored with computer program on computer readable storage medium, is realized when the computer program is executed by processor as described above Charge control method the step of.
5th aspect, the embodiment of the invention also provides a kind of charge control methods, are applied to adapter, the adapter Be provided at least two voltage detecting gears, and the voltage detecting gear correspond in, on the mobile terminal with it is described The output voltage level for the first connecting pin that adapter is connected;The mobile terminal switches between at least two voltage gears When, the adapter can match the switching that voltage gear locating for the mobile terminal carries out relevant voltage detection gear;Its In, the charge control method includes:
In the voltage detecting gear of adapter setting, match in the first voltage gear with the mobile terminal First voltage detect gear when, if detecting the electricity for the second connection end that the adapter is connected with the mobile terminal Pressure, from the first voltage gear switch to second voltage gear, then by the voltage detecting gear switch to described second The matched second voltage of voltage gear detects gear, and is shaken hands company using second voltage detection gear and the mobile terminal It connects.
6th aspect, the embodiment of the invention also provides a kind of adapter, the adapter is provided at least two voltages Gear is detected, and the voltage detecting gear is corresponded in first to be connected on the mobile terminal with the adapter The output voltage level of connecting pin;When the mobile terminal switches between at least two voltage gears, the adapter can Match the switching that voltage gear locating for the mobile terminal carries out relevant voltage detection gear;Wherein, the adapter includes:
Second switching module, the voltage detecting gear for being arranged in the adapter, in the mobile terminal When the first voltage that first voltage gear matches detects gear, if detecting, the adapter is connected with the mobile terminal Second connection end voltage, from the first voltage gear switch to second voltage gear, then by the voltage detecting gear It switches to and detects gear with the matched second voltage of the second voltage gear, and using second voltage detection gear and institute Mobile terminal is stated to shake hands connection.
7th aspect the embodiment of the invention also provides a kind of adapter, including processor, memory and is stored in described It is real when the computer program is executed by the processor on memory and the computer program that can run on the processor Now the step of charge control method as described above.
Eighth aspect, it is described computer-readable to deposit the embodiment of the invention also provides a kind of computer readable storage medium Computer program is stored on storage media, the computer program realizes charge control side as described above when being executed by processor The step of method.
In this way, the output voltage of the first connecting pin of mobile terminal is preset at least two electricity in the embodiment of the present invention Press gear.Mobile terminal can be shaken hands with adapter with any one voltage gear and be connect, record connection number.In mobile terminal When reaching preset times with the connection number that one of voltage gear and adapter are attached, by the output of the first connecting pin Voltage is switched to another voltage gear different from current voltage gear, to guarantee the safety and confidentiality of charge protocol, And be conducive to improve the safety of mobile terminal and adapter.
Detailed description of the invention
In order to illustrate the technical solution of the embodiments of the present invention more clearly, below by institute in the description to the embodiment of the present invention Attached drawing to be used is needed to be briefly described, it should be apparent that, the accompanying drawings in the following description is only some implementations of the invention Example, for those of ordinary skill in the art, without any creative labor, can also be according to these attached drawings Obtain other attached drawings.
Fig. 1 shows one of flow charts of charge control method of the embodiment of the present invention;
Fig. 2 indicates the two of the flow chart of the charge control method of the embodiment of the present invention;
Fig. 3 indicates that the mobile terminal of the embodiment of the present invention carries out the step of matching verifying with adapter;
One of the block diagram of mobile terminal of Fig. 4 expression embodiment of the present invention;
Fig. 5 indicates the two of the block diagram of the mobile terminal of the embodiment of the present invention;
Fig. 6 indicates the three of the block diagram of the mobile terminal of the embodiment of the present invention;
Fig. 7 indicates the four of the block diagram of the mobile terminal of the embodiment of the present invention;
Fig. 8 shows the three of the flow chart of the charge control method of the embodiment of the present invention;
One of the block diagram of adapter of Fig. 9 expression embodiment of the present invention;
Figure 10 indicates the two of the block diagram of the adapter of the embodiment of the present invention.
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.
Referring to Fig. 1, the embodiment of the invention provides a kind of charge control method, be applied to mobile terminal, mobile terminal with The output voltage for the first connecting pin that adapter is connected can switch between at least two voltage gears.
Wherein, charge control method includes:
Step 11, if detecting, adapter is accessed, and judges whether numerical value recorded in a statistical data reaches present count Value;The output voltage that statistical data is used to record the first connecting pin connects in current first voltage gear and adapter successful handshake The connection number connect.
In the embodiment, mobile terminal is preset at least two voltage gears, when the first connecting pin of mobile terminal is with it In voltage gear (first voltage gear) carry out voltage output, and shaken hands and connect simultaneously with adapter using first voltage gear When success, pass through the connection number of the cumulative record successful handshake connection of counter.In the program in view of mobile terminal every time into The time of row charging and charging duration are random, therefore to the connection number that mobile terminal is connected with adapter successful handshake, change speech I.e. charging times recorded, to determine whether needing to carry out voltage gear switch, in order to detect and record.
Step 12, if numerical value recorded in statistical data reaches default value, by the output voltage of the first connecting pin It is second voltage gear from first voltage gear switch, and is shaken hands and connect with adapter using second voltage gear.
In the embodiment, mobile terminal is preset at least two voltage gears, and in the connection for connection of shaking hands with adapter When number reaches default value, the switching of voltage gear is carried out.In this way, when mobile terminal is attached by switching with adapter Voltage gear, to improve the safety and fast charge protocol of the connection that carries out shaking hands between mobile terminal and adapter Safety and confidentiality.
As a kind of implementation, mobile terminal is communicated using the D+ and D- of charging interface, corresponds to output voltage It is default that there are three voltage gears, comprising: first voltage gear, second voltage gear and tertiary voltage gear, such as: first voltage shelves The corresponding D+ output voltage range in position are as follows: 1.0~2.0V, preferred D+ output voltage standard value are 1.5V, D- output voltage model It encloses for 0.4~0.6V, preferred D- output voltage standard value is 0.5V;The corresponding D+ output voltage range of second voltage gear Are as follows: 2.0~3.0V, preferred D+ output voltage standard value are 2.5V, and D- output voltage range is 0.8~1.0V, preferred D- Output voltage standard value is 0.9V;The corresponding D+ output voltage range of tertiary voltage gear are as follows: 3.0~3.5V, preferred D+ are defeated Standard voltage value is 3.3V out, and D- output voltage range is 1.8~2.0V, and preferred D- output voltage standard value is 1.9V.
Specifically, the output voltage of the D+ and D- of the charging interface of mobile terminal, according to preset at least two voltage gear Putting in order for position, successively switches over.
Such as: mobile terminal is default, and there are three voltage gears.In the output electricity of the D+ and D- of the charging interface of mobile terminal Pressure is set as first voltage gear, and when having detected adapter access, D+ and D- are respectively according to the defeated of above-mentioned first voltage gear Standard voltage value persistently exports preset time (such as: 1S) out;If receiving the handshake request instruction of adapter transmission in the 1S time, Then feedback shakes hands connection signal to adapter, and completes connection of shaking hands.
Reached default time in mobile terminal statistics using the shake hands connection number of connection of first voltage gear and adapter When number, the output voltage of D+ and D- are switched to second voltage gear, and are carried out by the way of above-mentioned connection of shaking hands with adapter Connection.
Reached default time in mobile terminal statistics using the shake hands connection number of connection of second voltage gear and adapter When number, the output voltage of D+ and D- are switched to tertiary voltage gear, and are carried out by the way of above-mentioned connection of shaking hands with adapter Connection.
Reached default time in mobile terminal statistics using the shake hands connection number of connection of tertiary voltage gear and adapter When number, the output voltage of D+ and D- are switched to first voltage gear, and are carried out by the way of above-mentioned connection of shaking hands with adapter Connection.
Referring to fig. 2, the step of whether numerical value recorded in a statistical data is greater than default value above-mentioned steps 11: judged Later, method further include:
Step 13, it if numerical value recorded in statistical data is not up to default value, using first voltage gear and fits Orchestration is shaken hands connection.
In the embodiment, the output voltage of the first connecting pin of mobile terminal is currently set for first voltage gear, and Mobile terminal using first voltage gear and adapter shake hands the connection number of connection be not up to preset times when, maintain first to connect It connects end and voltage output is carried out with first voltage gear, guarantee the successful connection that can shake hands between mobile terminal and adapter.
Wherein, it above-mentioned steps 13: is shaken hands after the step of connecting using first voltage gear and adapter, method is also wrapped It includes:
Step 14, shake hands successful connection according to first voltage gear and adapter, then make numerical value in statistical data into Row plus 1 counting.
In the embodiment, the record of number is attached using counter, after successful connection of shaking hands every time, the number of counter Value plus 1, until reaching preset times.The program has convenient for detecting the count signal counted, and convenient for statistics Conducive to raising counting precision.
Wherein, it above-mentioned steps 12: is shaken hands after the step of connecting using second voltage gear and adapter, method is also wrapped It includes:
Step 15, it shakes hands successful connection according to second voltage gear and adapter, then makes the numerical value in statistical data clear Zero, it is carried out after clearing plus 1 counts.
In the embodiment, the first connecting pin of mobile terminal output voltage by first voltage gear switch to second electricity It presses gear, and is shaken hands after connection using second voltage gear and adapter, by the mobile terminal recorded in statistical data using the The shake hands connection number of connection of one voltage gear and adapter is reset.It is carried out after clearing plus 1 counts, start to count mobile whole The connection number that end is connect using second voltage gear with adapter.The program will unite after carrying out voltage gear switch every time Zeros data in counting simultaneously re-starts statistics, is convenient for statistical management, guarantees that mobile terminal can be according in statistical data Numerical value carry out voltage gear switching, to guarantee the timeliness and accuracy of voltage gear switch.
Wherein, after use second voltage gear shakes hands the step of connecting with adapter, method further include:
When mobile terminal is shaken hands with adapter and connect, then verifying is matched at least once between adapter.If every Secondary matching verifying is successful, then is charged by adapter using the first charge mode;If being tested carrying out matching at least once When card, matching authentication failed is detected, then charged by adapter using the second charge mode.
In the embodiment, when mobile terminal is shaken hands with adapter and connect, successively matched at least once with adapter Verifying, it is preferred that can be set and carry out 3 matchings verifying.When determining that 3 matchings verifying is proved to be successful, pass through adapter It is charged using the first charge mode, i.e., quick charge is carried out by adapter.In the 3 matchings verifying successively carried out, If wherein when primary matching verifying, determining matching authentication failed, then charged by adapter using the second charge mode, Commonly charged by adapter.The program further improves the safety of fast charge protocol.
Specifically, when mobile terminal is shaken hands with adapter and connect, being carried out at least once between adapter referring to Fig. 3 The step of verifying, comprising:
Step 31, verifying instruction is sent to adapter, wherein verifying instruction includes at least one random parameter.
As a kind of implementation, mobile terminal be issued to adapter verifying instruction include 8 random parameters, wherein this 8 random parameters are that mobile terminal generates at random, to guarantee the safety and confidentiality of fast charge protocol.
Specifically, the format of verifying instruction is as shown in table 1.
Table 1
Step 32, after acquisition adapter is calculated according to verifying instruction and preset verifying formula, the first of feedback is tested Card value.
In the embodiment, verifying formula can be preset, such as a variety of different hybrid operation modes can be set, and be increased It is fixed value parameter and carries out operation, to guarantee the safety and confidentiality of fast charge protocol.
Step 33, the first validation value is compared with the second validation value, wherein the second validation value be mobile terminal according to What random parameter and preset verifying formula were calculated.
In the embodiment, mobile terminal and adapter use identical verifying according to the random parameter in verifying instruction Formula is calculated.The second validation value that the first validation value that adapter is calculated is calculated with mobile terminal compares Compared with to judge that adaptation matching is proved to be successful, to guarantee the safety and confidentiality of fast charge protocol.
Step 34, if the first validation value is equal with the second validation value, it is determined that matching is proved to be successful, and is sent and be proved to be successful Feedback signal to adapter;Otherwise, it determines matching authentication failed.
In the embodiment, if the second validation value that the first validation value and mobile terminal that adapter is calculated are calculated It is unequal, then it is commonly charged by adapter;If the first validation value that adapter is calculated and mobile terminal calculate The second validation value arrived is equal, then it is assumed that when previous matching is proved to be successful, and matching verifying next time is carried out, until be continuously finished The matching verifying of pre-determined number (such as: 3 times) is successful, then quick charge is carried out by adapter, to guarantee fast charge protocol Safety and confidentiality.
In above scheme, the output voltage of the first connecting pin of mobile terminal is preset at least two voltage gears.It is mobile Terminal can be shaken hands with adapter with any one voltage gear and be connect, record connection number.In mobile terminal with one of them When the connection number that voltage gear and adapter are attached reaches preset times, the output voltage of the first connecting pin is switched to Another voltage gear different from current voltage gear, to guarantee the safety and confidentiality of fast charge protocol, and it is advantageous In the safety for improving mobile terminal and adapter, the universal adaptability of quick charge is improved.
Referring to fig. 4, the embodiment of the invention also provides a kind of mobile terminal, the mobile terminal 400 is connected with adapter The output voltage of the first connecting pin connect can switch between at least two voltage gears;Wherein, the mobile terminal 400 wraps It includes:
Judgment module 410, if judging whether numerical value recorded in a statistical data reaches for detecting that adapter accesses To default value;The statistical data be used to record the output voltage of first connecting pin current first voltage gear with The connection number of adapter successful handshake connection.
First switching module 420 will if reaching the default value for numerical value recorded in the statistical data The output voltage of first connecting pin from the first voltage gear switch be second voltage gear, and using it is described second electricity Pressure gear is shaken hands with the adapter to be connect.
Wherein, the mobile terminal further include:
First link block is adopted if being not up to the default value for numerical value recorded in the statistical data It is shaken hands and is connect with the adapter with the first voltage gear.
Wherein, the mobile terminal further include:
Counting module then makes described for shaking hands successful connection according to the first voltage gear and the adapter Numerical value in statistical data carries out plus 1 counts.
Wherein, the mobile terminal further include:
Processing module then makes described for shaking hands successful connection according to the second voltage gear and the adapter Numerical value in statistical data is reset, and carries out after clearing plus 1 counts.
Wherein, the mobile terminal further include:
First authentication module, for when the mobile terminal is shaken hands with the adapter and is connect, then with the adapter Between matched verifying at least once.
First charging module, if successful for matching verifying every time, by the adapter using the first charging mould Formula charges.
Second charging module, if detecting matching authentication failed, then for when carrying out the verifying of matching at least once It is charged by the adapter using the second charge mode.
Wherein, first authentication module includes:
First transmission unit, for sending verifying instruction to the adapter, wherein verifying instruction includes at least one A random parameter.
First acquisition unit, by obtaining the adapter according to verifying instruction and based on preset verifying formula carries out After calculation, the first validation value of feedback.
Comparing unit, for first validation value to be compared with the second validation value, wherein second validation value The mobile terminal is calculated according to the random parameter and the preset verifying formula.
First processing units, if equal with second validation value for first validation value, it is determined that matching verifying Success, and the feedback signal that is proved to be successful is sent to the adapter;Otherwise, it determines matching authentication failed.
In above scheme, the output voltage of the first connecting pin of mobile terminal is preset at least two voltage gears.It is mobile Terminal can be shaken hands with adapter with any one voltage gear and be connect, record connection number.In mobile terminal with one of them When the connection number that voltage gear and adapter are attached reaches preset times, the output voltage of the first connecting pin is switched to Another voltage gear different from current voltage gear, to guarantee the safety and confidentiality of fast charge protocol, and it is advantageous In the safety for improving mobile terminal and adapter, the universal adaptability of quick charge is improved.
Fig. 5 is the block diagram of the mobile terminal of another embodiment of the present invention, and the mobile terminal 500 is connected with adapter The output voltage of the first connecting pin can switch between at least two voltage gears.The mobile terminal 500 includes processing Device 501, memory 502 and it is stored in the computer program that can be run on the memory 502 and on the processor 501, The computer program realizes following steps when being executed by the processor 501: if detecting, adapter is accessed, and judges a statistics Whether numerical value recorded in data reaches default value;The statistical data is used to record the output electricity of first connecting pin It is pressed in the connection number that current first voltage gear is connect with adapter successful handshake;If recorded in the statistical data Numerical value reaches the default value, then by the output voltage of first connecting pin from the first voltage gear switch be second Voltage gear, and shaken hands and connect with the adapter using the second voltage gear.
Optionally, following steps be can also be achieved when computer program is executed by processor 501: if institute in the statistical data The numerical value of record is not up to the default value, then is shaken hands and connect with the adapter using the first voltage gear.
Optionally, following steps be can also be achieved when computer program is executed by processor 501: according to the first voltage Gear and the adapter are shaken hands successful connection, then make that the numerical value in the statistical data carries out plus 1 counts.
Optionally, following steps be can also be achieved when computer program is executed by processor 501: according to the second voltage Gear and the adapter are shaken hands successful connection, then reset the numerical value in the statistical data, carry out after clearing plus 1 counts Number.
Optionally, following steps be can also be achieved when computer program is executed by processor 501: in the mobile terminal and institute It states adapter to shake hands when connecting, is then matched verifying at least once between the adapter;If every time matching verifying at Function is then charged by the adapter using the first charge mode;If when carrying out the verifying of matching at least once, inspection Matching authentication failed is measured, then is charged by the adapter using the second charge mode.
Optionally, following steps be can also be achieved when computer program is executed by processor 501: sending verifying and instruct to described Adapter, wherein verifying instruction includes at least one random parameter;Obtain the adapter according to the verifying instruction and After preset verifying formula is calculated, the first validation value of feedback;First validation value is compared with the second validation value It is right, wherein second validation value is that the mobile terminal is counted according to the random parameter and the preset verifying formula It obtains;If first validation value is equal with second validation value, it is determined that matching be proved to be successful, and send verifying at The feedback signal of function is to the adapter;Otherwise, it determines matching authentication failed.
Wherein, software module can be located at random access memory, flash memory, read-only memory, programmable read only memory or In the computer readable storage medium of this fields such as electrically erasable programmable memory, register maturation.This is computer-readable to deposit Storage media is located at memory 502, and processor 501 reads the information in memory 502, and the step of the above method is completed in conjunction with its hardware Suddenly.Specifically, computer program is stored on the computer readable storage medium, when computer program is executed by processor 501 Realize each step such as above-mentioned charge control method embodiment.
Fig. 6 is the block diagram of the mobile terminal 600 of another embodiment of the present invention, mobile terminal as shown in FIG. 6 include: to Few a processor 601, memory 602, take pictures component 603 and user interface 604.Various components in mobile terminal 600 are logical Bus system 605 is crossed to be coupled.It is understood that bus system 605 is for realizing the connection communication between these components.Bus System 605 further includes power bus, control bus and status signal bus in addition in addition to including data/address bus.But in order to clear For the sake of explanation, various buses are all designated as bus system 605 in Fig. 6.
Wherein, user interface 604 may include display or pointing device (such as touch-sensitive plate or touch screen etc..
It is appreciated that the memory 602 in the embodiment of the present invention can be volatile memory or nonvolatile memory, It or may include both volatile and non-volatile memories.Wherein, nonvolatile memory can be read-only memory (Read- Only Memory, ROM), programmable read only memory (Programmable ROM, PROM), the read-only storage of erasable programmable Device (Erasable PROM, EPROM), electrically erasable programmable read-only memory (Electrically EPROM, EEPROM) or Flash memory.Volatile memory can be random access memory (Random Access Memory, RAM), be used as external high Speed caching.By exemplary but be not restricted explanation, the RAM of many forms is available, such as static random access memory (Static RAM, SRAM), dynamic random access memory (Dynamic RAM, DRAM), Synchronous Dynamic Random Access Memory (Synchronous DRAM, SDRAM), double data speed synchronous dynamic RAM (Double Data Rate SDRAM, DDRSDRAM), enhanced Synchronous Dynamic Random Access Memory (Enhanced SDRAM, ESDRAM), synchronized links Dynamic random access memory (Synchlink DRAM, SLDRAM) and direct rambus random access memory (Direct Rambus RAM, DRRAM).The memory 602 of system and method described herein is intended to include but is not limited to these and arbitrarily its It is suitble to the memory of type.
In some embodiments, memory 602 stores following element, executable modules or data structures, or Their subset of person or their superset: operating system 6021 and application program 6022.
Wherein, operating system 6021 include various system programs, such as ccf layer, core library layer, driving layer etc., are used for Realize various basic businesses and the hardware based task of processing.Application program 6022 includes various application programs, such as media Player (Media Player), browser (Browser) etc., for realizing various applied business.Realize the embodiment of the present invention The program of method may be embodied in application program 6022.
In an embodiment of the present invention, specifically it can be and answer by the program or instruction of calling memory 602 to store With the program or instruction stored in program 6022.Wherein, processor 601 is used for: if detecting, adapter is accessed, and judges a statistics Whether numerical value recorded in data reaches default value;The statistical data is used to record the output electricity of first connecting pin It is pressed in the connection number that current first voltage gear is connect with adapter successful handshake;If recorded in the statistical data Numerical value reaches the default value, then by the output voltage of first connecting pin from the first voltage gear switch be second Voltage gear, and shaken hands and connect with the adapter using the second voltage gear.
The method that the embodiments of the present invention disclose can be applied in processor 601, or be realized by processor 601. Processor 601 may be a kind of IC chip, the processing capacity with signal.During realization, the above method it is each Step can be completed by the integrated logic circuit of the hardware in processor 601 or the instruction of software form.Above-mentioned processing Device 601 can be general processor, digital signal processor (Digital Signal Processor, DSP), dedicated integrated electricity Road (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic, Discrete hardware components.It may be implemented or execute disclosed each method, step and the logic diagram in the embodiment of the present invention.It is general Processor can be microprocessor or the processor is also possible to any conventional processor etc..In conjunction with institute of the embodiment of the present invention The step of disclosed method, can be embodied directly in hardware decoding processor and execute completion, or with the hardware in decoding processor And software module combination executes completion.Software module can be located at random access memory, and flash memory, read-only memory may be programmed read-only In the storage medium of this fields such as memory or electrically erasable programmable memory, register maturation.The storage medium is located at The step of memory 602, processor 601 reads the information in memory 602, completes the above method in conjunction with its hardware.
It is understood that embodiments described herein can with hardware, software, firmware, middleware, microcode or its Combination is to realize.For hardware realization, processing unit be may be implemented in one or more specific integrated circuit (Application Specific Integrated Circuits, ASIC), digital signal processor (Digital Signal Processing, DSP), digital signal processing appts (DSP Device, DSPD), programmable logic device (Programmable Logic Device, PLD), field programmable gate array (Field-Programmable Gate Array, FPGA), general processor, In controller, microcontroller, microprocessor, other electronic units for executing herein described function or combinations thereof.
For software implementations, it can be realized herein by executing the module (such as process, function etc.) of function described herein The technology.Software code is storable in memory and is executed by processor.Memory can in the processor or It is realized outside processor.
Wherein, processor 601 is also used to: if numerical value recorded in the statistical data is not up to the default value, It is then shaken hands and is connect with the adapter using the first voltage gear.
Wherein, processor 601 is also used to: it shakes hands successful connection according to the first voltage gear and the adapter, The numerical value in the statistical data is then set to carry out adding 1 to count.
Wherein, processor 601 is also used to: it shakes hands successful connection according to the second voltage gear and the adapter, It then resets the numerical value in the statistical data, is carried out after clearing plus 1 counts.
Wherein, processor 601 is also used to: when the mobile terminal is shaken hands with the adapter and connect, then being fitted with described Verifying is matched between orchestration at least once;If matching verifying is successful every time, filled by the adapter using first Power mode charges;If detecting matching authentication failed when carrying out the verifying of matching at least once, then by described suitable Orchestration is charged using the second charge mode.
Wherein, processor 601 is also used to: sending verifying instruction to the adapter, wherein verifying instruction includes extremely A few random parameter;The adapter is obtained according to verifying instruction and after preset verifying formula calculated, is fed back The first validation value;First validation value is compared with the second validation value, wherein second validation value is the shifting Dynamic terminal is calculated according to the random parameter and the preset verifying formula;If first validation value and institute It is equal to state the second validation value, it is determined that matching is proved to be successful, and sends the feedback signal that is proved to be successful to the adapter;It is no Then, matching authentication failed is determined.
The output voltage of first connecting pin of the mobile terminal 600 of the embodiment of the present invention is preset at least two voltage gears Position.Mobile terminal can be shaken hands with adapter with any one voltage gear and be connect, record connection number.In mobile terminal with it In the connection number that is attached of voltage gear and adapter when reaching preset times, by the output voltage of the first connecting pin It is switched to another voltage gear different from current voltage gear, to guarantee the safety and confidentiality of fast charge protocol, And be conducive to improve the safety of mobile terminal and adapter, improve the universal adaptability of quick charge.
Fig. 7 is the structural schematic diagram of the mobile terminal of another embodiment of the present invention.Specifically, the mobile terminal in Fig. 7 700 can be mobile phone, tablet computer, personal digital assistant (Personal Digital Assistant, PDA) or vehicle mounted electric Brain etc..
Mobile terminal 700 in Fig. 7 includes power supply 710, memory 720, input unit 730, display unit 740, processing Device 750, WIFI (Wireless Fidelity) module 760, voicefrequency circuit 770 and RF circuit 780.
Wherein, input unit 730 can be used for receiving the number or character information of user's input, and generation and mobile terminal The related signal input of 700 user setting and function control.Specifically, in the embodiment of the present invention, which can To include touch panel 731.Touch panel 731, also referred to as touch screen collect the touch operation of user on it or nearby (for example user uses the operations of any suitable object or attachment on touch panel 731 such as finger, stylus), and according to preparatory The formula of setting drives corresponding attachment device.Optionally, touch panel 731 may include touch detecting apparatus and touch controller Two parts.Wherein, the touch orientation of touch detecting apparatus detection user, and touch operation bring signal is detected, by signal Send touch controller to;Touch controller receives touch information from touch detecting apparatus, and is converted into contact coordinate, The processor 750 is given again, and can be received order that processor 750 is sent and be executed.Furthermore, it is possible to using resistance-type, The multiple types such as condenser type, infrared ray and surface acoustic wave realize touch panel 731.In addition to touch panel 731, input unit 730 can also include other input equipments 732, other input equipments 732 can include but is not limited to physical keyboard, function key One of (such as volume control button, switch key etc.), trace ball, mouse, operating stick etc. are a variety of.
Wherein, display unit 740 can be used for showing information input by user or be supplied to the information and movement of user The various menu interfaces of terminal.Display unit 740 may include display panel 741, optionally, can use LCD or organic light emission The forms such as diode (Organic Light-Emitting Diode, OLED) configure display panel 741.
It should be noted that touch panel 731 can cover display panel 741, touch display screen is formed, when the touch display screen is examined After measuring touch operation on it or nearby, processor 750 is sent to determine the type of touch event, is followed by subsequent processing device 750 provide corresponding visual output according to the type of touch event in touch display screen.
Touch display screen includes Application Program Interface viewing area and common control viewing area.The Application Program Interface viewing area And arrangement mode of the common control viewing area does not limit, can be arranged above and below, left-right situs etc. can distinguish two it is aobvious Show the arrangement mode in area.The Application Program Interface viewing area is displayed for the interface of application program.Each interface can be with The interface elements such as the icon comprising at least one application program and/or widget desktop control.The Application Program Interface viewing area Or the empty interface not comprising any content.This commonly uses control viewing area for showing the higher control of utilization rate, for example, Application icons such as button, interface number, scroll bar, phone directory icon etc. are set.
Wherein processor 750 is the control centre of mobile terminal, utilizes each of various interfaces and connection whole mobile phone A part by running or execute the software program and/or module that are stored in first memory 721, and is called and is stored in Data in second memory 722 execute the various functions and processing data of mobile terminal, to carry out to mobile terminal whole Monitoring.Optionally, processor 750 may include one or more processing units.
In embodiments of the present invention, by call store the first memory 721 in software program and/or module and/ To the data in second memory 722, processor 750 is used for: if detecting, adapter is accessed, and judges to be remembered in a statistical data Whether the numerical value of record reaches default value;The statistical data is used to record the output voltage of first connecting pin current The connection number that first voltage gear is connect with adapter successful handshake;If numerical value recorded in the statistical data reaches institute State default value, then by the output voltage of first connecting pin from the first voltage gear switch be second voltage gear, And it is shaken hands and is connect with the adapter using the second voltage gear.
Wherein, processor 750 is also used to: if numerical value recorded in the statistical data is not up to the default value, It is then shaken hands and is connect with the adapter using the first voltage gear.
Wherein, processor 750 is also used to: it shakes hands successful connection according to the first voltage gear and the adapter, The numerical value in the statistical data is then set to carry out adding 1 to count.
Wherein, processor 750 is also used to: it shakes hands successful connection according to the second voltage gear and the adapter, It then resets the numerical value in the statistical data, is carried out after clearing plus 1 counts.
Wherein, processor 750 is also used to: when the mobile terminal is shaken hands with the adapter and connect, then being fitted with described Verifying is matched between orchestration at least once;If matching verifying is successful every time, filled by the adapter using first Power mode charges;If detecting matching authentication failed when carrying out the verifying of matching at least once, then by described suitable Orchestration is charged using the second charge mode.
Wherein, processor 750 is also used to: sending verifying instruction to the adapter, wherein verifying instruction includes extremely A few random parameter;The adapter is obtained according to verifying instruction and after preset verifying formula calculated, is fed back The first validation value;First validation value is compared with the second validation value, wherein second validation value is the shifting Dynamic terminal is calculated according to the random parameter and the preset verifying formula;If first validation value and institute It is equal to state the second validation value, it is determined that matching is proved to be successful, and sends the feedback signal that is proved to be successful to the adapter;It is no Then, matching authentication failed is determined.
The output voltage of first connecting pin of the mobile terminal 700 of the embodiment of the present invention is preset at least two voltage gears Position.Mobile terminal can be shaken hands with adapter with any one voltage gear and be connect, record connection number.In mobile terminal with it In the connection number that is attached of voltage gear and adapter when reaching preset times, by the output voltage of the first connecting pin It is switched to another voltage gear different from current voltage gear, to guarantee the safety and confidentiality of fast charge protocol, And be conducive to improve the safety of mobile terminal and adapter, improve the universal adaptability of quick charge.
Referring to Fig. 8, the embodiment of the invention provides a kind of charge control methods, are applied to adapter, and the adapter is set Be equipped at least two voltage detecting gears, and the voltage detecting gear correspond in, on the mobile terminal with it is described suitable The output voltage level for the first connecting pin that orchestration is connected;The mobile terminal switches between at least two voltage gears When, the adapter can match the switching that voltage gear locating for the mobile terminal carries out relevant voltage detection gear.Its In, the charge control method includes:
Adapter setting voltage detecting gear, in the first voltage gear with mobile terminal match first electricity When pressure detection gear, if detecting the voltage for the second connection end that adapter is connected with mobile terminal, from first voltage gear Second voltage gear is switched to, then voltage detecting gear switch is detected into shelves to the matched second voltage of second voltage gear Position, and shaken hands and connect with mobile terminal using second voltage detection gear.
Wherein, the method also includes:
In the voltage detecting gear of adapter setting, match in the first voltage gear with the mobile terminal First voltage detect gear when, if detecting the voltage for the second connection end that the adapter is connected with the mobile terminal In the first voltage gear, is then shaken hands and connect with the mobile terminal using first voltage detection gear.
In the embodiment, when mobile terminal is preset at least two voltage gears, adapter is preset with and the voltage Gear matched voltage detecting gear one by one.When the output voltage of the first connecting pin of mobile terminal is at least two voltage gears When switching over, adapter is capable of the switching of the voltage gear of adaptive mobile terminal, and carries out relevant voltage detection gear Switching, to guarantee the safety and confidentiality of fast charge protocol, level-one improves the universal adaptability of fast charge protocol.
Wherein, described to be shaken hands after the step of connecting using the second voltage detection gear and the mobile terminal, institute State method further include:
When the adapter is shaken hands with the mobile terminal and connect, carried out between the mobile terminal at least once With verifying;If matching verifying is successful every time, charged using the first charge mode to the mobile terminal;If carry out It is described at least once matching verifying when, detect matching authentication failed, then using the second charge mode to the mobile terminal into Row charging.
In the embodiment, when adapter is shaken hands with mobile terminal and connect, carried out between mobile terminal at least once With verifying, it is preferred that can be set and carry out 3 matchings verifying.When determining that 3 matchings verifying is proved to be successful, using first Charge mode charges to mobile terminal, i.e., carries out quick charge to mobile terminal.In the 3 matchings verifying successively carried out In, if determining matching authentication failed when primary matching verifying wherein, then being filled using the second charge mode to mobile terminal Electricity commonly charges to mobile terminal.The program further improves the safety of fast charge protocol.
Wherein, described when the adapter is shaken hands with the mobile terminal and connect, it is carried out between the mobile terminal The step of matching verifying at least once, comprising:
The verifying instruction that the mobile terminal is sent is obtained, wherein verifying instruction includes at least one random parameter.
As a kind of implementation, it includes 8 random parameters that adapter, which obtains the verifying instruction that mobile terminal issues, wherein This 8 random parameters are that mobile terminal generates at random, to guarantee the safety and confidentiality of fast charge protocol.
It is calculated according to verifying instruction and preset verifying formula, obtains the first validation value, and by described first Validation value is sent to the mobile terminal.
In the embodiment, verifying formula can be preset, such as a variety of different hybrid operation modes can be set, and be increased It is fixed value parameter and carries out operation, to guarantee the safety and confidentiality of fast charge protocol.
After receiving the mobile terminal and first validation value be compared with the second validation value, the verifying of transmission When successful feedback information, determine that matching is proved to be successful;Otherwise, it determines matching authentication failed;Wherein, second validation value is The mobile terminal is calculated according to the random parameter and the preset verifying formula.
In the embodiment, mobile terminal and adapter use identical verifying according to the random parameter in verifying instruction Formula is calculated.If the second validation value that the first validation value that adapter is calculated is calculated with mobile terminal not phase Deng then commonly being charged to mobile terminal;What if the first validation value that adapter is calculated and mobile terminal were calculated Second validation value is equal, then it is assumed that when it is previous matching be proved to be successful, and carry out next time matching verifying, until be continuously finished it is predetermined The matching verifying of number (such as: 3 times) is successful, then quick charge is carried out to mobile terminal, to guarantee the peace of fast charge protocol Full property and confidentiality.
Referring to Fig. 9, the embodiment of the invention also provides a kind of adapter 900, the adapter 900 is provided at least two Voltage detecting gear, and the voltage detecting gear is corresponded in being connected on the mobile terminal with the adapter 900 The first connecting pin output voltage level;When the mobile terminal switches between at least two voltage gears, the adaptation Device 900 can match the switching that voltage gear locating for the mobile terminal carries out relevant voltage detection gear.Wherein, described suitable Orchestration 900 includes:
Second switching module 910, the voltage detecting gear for being arranged in the adapter are in and the mobile terminal First voltage gear match first voltage detection gear when, if detecting, the adapter is connected with the mobile terminal The voltage of the second connection end connect, from the first voltage gear switch to second voltage gear, then by the voltage detecting shelves Position switch to the second voltage gear matched second voltage detection gear, and using second voltage detection gear with The mobile terminal is shaken hands connection.
Wherein, the adapter further include:
Second link block, the voltage detecting gear for being arranged in the adapter, in the mobile terminal When the first voltage that first voltage gear matches detects gear, if detecting, the adapter is connected with the mobile terminal The voltage of second connection end be in the first voltage gear, then using first voltage detection gear and it is described it is mobile eventually Hold connection of shaking hands.
Wherein, the adapter further include:
Second authentication module, for when the adapter is shaken hands with the mobile terminal and connect, with the mobile terminal Between matched verifying at least once.
Third charging module, if successful for matching verifying every time, using the first charge mode to described mobile whole It charges at end;
4th charging module, if detecting matching authentication failed, then for when carrying out the verifying of matching at least once It is charged using the second charge mode to the mobile terminal.
Wherein, second authentication module includes:
Second acquisition unit, the verifying instruction sent for obtaining the mobile terminal, wherein verifying instruction includes At least one random parameter.
Computing unit is calculated with preset verifying formula for being instructed according to the verifying, obtains the first validation value, And first validation value is sent to the mobile terminal.
The second processing unit, for receiving the mobile terminal for first validation value and the progress of the second validation value After comparison, when the feedback information of transmission being proved to be successful, determine that matching is proved to be successful;Otherwise, it determines matching authentication failed.
Wherein, second validation value is the mobile terminal according to the random parameter and the preset verifying formula It is calculated.
In the embodiment, when mobile terminal is preset at least two voltage gears, adapter is preset with and the voltage Gear matched voltage detecting gear one by one.When the output voltage of the first connecting pin of mobile terminal is at least two voltage gears When switching over, adapter is capable of the switching of the voltage gear of adaptive mobile terminal, and carries out relevant voltage detection gear Switching, to guarantee the safety and confidentiality of fast charge protocol, level-one improves the universal adaptability of fast charge protocol.
Figure 10 is the block diagram of the adapter of another embodiment of the present invention, and the adapter 1000 is provided at least two voltages Gear is detected, and the voltage detecting gear is corresponded in first to be connected on mobile terminal with adapter 1000 connect The output voltage level at end;When mobile terminal switches between at least two voltage gears, adapter 1000 can match movement Voltage gear locating for terminal carries out the switching of relevant voltage detection gear.The adapter 1000 includes processor 1001, deposits Reservoir 1002 and it is stored in the computer program that can be run on the memory 1002 and on the processor 1001, the meter Calculation machine program realizes following steps when being executed by the processor 1001: at the voltage detecting gear of adapter setting, place When first voltage that the first voltage gear with the mobile terminal matches detects gear, if detect the adapter with The voltage for the second connection end that the mobile terminal is connected, from the first voltage gear switch to second voltage gear, then The voltage detecting gear switch is detected into gear to the matched second voltage of the second voltage gear, and using described the Two voltage detecting gears are shaken hands with the mobile terminal to be connect.
Optionally, following steps are also realized when the computer program is executed by the processor 1001: in the adaptation The voltage detecting gear of device setting, the first voltage to match in the first voltage gear with the mobile terminal detect gear When, if detecting, the voltage for the second connection end that the adapter is connected with the mobile terminal is in the first voltage shelves Position is then shaken hands with the mobile terminal using first voltage detection gear and is connect.
Optionally, following steps are also realized when the computer program is executed by the processor 1001: in the adaptation Device is shaken hands with the mobile terminal when connecting, and is matched verifying at least once between the mobile terminal;If matching every time Verifying is successful, then is charged using the first charge mode to the mobile terminal;If described match at least once When verifying, matching authentication failed is detected, then charged using the second charge mode to the mobile terminal.
Optionally, following steps are also realized when the computer program is executed by the processor 1001: obtaining the shifting The verifying instruction that dynamic terminal is sent, wherein verifying instruction includes at least one random parameter;According to the verifying instruction and Preset verifying formula is calculated, and obtains the first validation value, and first validation value is sent to the mobile terminal;? It receives after first validation value is compared the mobile terminal with the second validation value, the feedback of transmission being proved to be successful When information, determine that matching is proved to be successful;Otherwise, it determines matching authentication failed;Wherein, second validation value is described mobile whole End is calculated according to the random parameter and the preset verifying formula.
Wherein, software module can be located at random access memory, flash memory, read-only memory, programmable read only memory or In the computer readable storage medium of this fields such as electrically erasable programmable memory, register maturation.This is computer-readable to deposit Storage media is located at memory 1002, and processor 1001 reads the information in memory 1002, completes the above method in conjunction with its hardware The step of.Specifically, computer program is stored on the computer readable storage medium, computer program is held by processor 1001 Each step such as above-mentioned charge control method embodiment is realized when row.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure Member and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually It is implemented in hardware or software, the specific application and design constraint depending on technical solution.Professional technician Each specific application can be used different methods to achieve the described function, but this realization is it is not considered that exceed The scope of the present invention.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description, The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In embodiment provided herein, it should be understood that disclosed device and method can pass through others Mode is realized.For example, the apparatus embodiments described above are merely exemplary, for example, the division of the unit, only A kind of logical function partition, there may be another division manner in actual implementation, for example, multiple units or components can combine or Person is desirably integrated into another system, or some features can be ignored or not executed.Another point, shown or discussed is mutual Between coupling, direct-coupling or communication connection can be through some interfaces, the INDIRECT COUPLING or communication link of device or unit It connects, can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.
It, can be with if the function is realized in the form of SFU software functional unit and when sold or used as an independent product It is stored in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantially in other words The part of the part that contributes to existing technology or the technical solution can be embodied in the form of software products, the meter Calculation machine software product is stored in a storage medium, including some instructions are used so that a computer equipment (can be a People's computer, server or network equipment etc.) it performs all or part of the steps of the method described in the various embodiments of the present invention. And storage medium above-mentioned includes: that USB flash disk, mobile hard disk, ROM, RAM, magnetic or disk etc. are various can store program code Medium.
Above-described is the preferred embodiment of the present invention, it should be pointed out that the ordinary person of the art is come It says, can also make several improvements and retouch under the premise of not departing from principle of the present invention, these improvements and modifications also exist In protection scope of the present invention.

Claims (24)

1. a kind of charge control method is applied to mobile terminal, which is characterized in that the mobile terminal was connected with adapter The output voltage of first connecting pin can switch between at least two voltage gears;
Wherein, the charge control method includes:
If detecting, adapter is accessed, and judges whether numerical value recorded in a statistical data reaches default value;The statistics The output voltage that data are used to record first connecting pin is connect in current first voltage gear with adapter successful handshake Connection number;
If numerical value recorded in the statistical data reaches the default value, by the output voltage of first connecting pin It is second voltage gear from the first voltage gear switch, and is shaken hands company using the second voltage gear and the adapter It connects.
2. charge control method according to claim 1, which is characterized in that recorded in one statistical data of the judgement After the step of whether numerical value is greater than default value, the method also includes:
If numerical value recorded in the statistical data is not up to the default value, the first voltage gear and institute are used Adapter is stated to shake hands connection.
3. charge control method according to claim 2, which is characterized in that described to use the first voltage gear and institute Adapter is stated to shake hands after the step of connecting, the method also includes:
Shake hands successful connection according to the first voltage gear and the adapter, then make numerical value in the statistical data into Row plus 1 counting.
4. charge control method according to claim 1, which is characterized in that described to use the second voltage gear and institute Adapter is stated to shake hands after the step of connecting, the method also includes:
It shakes hands successful connection according to the second voltage gear and the adapter, then makes the numerical value in the statistical data clear Zero, it is carried out after clearing plus 1 counts.
5. charge control method according to claim 1, which is characterized in that described to use the second voltage gear and institute Adapter is stated to shake hands after the step of connecting, the method also includes:
When the mobile terminal is shaken hands with the adapter and connect, is then matched and tested at least once between the adapter Card;
If matching verifying is successful every time, charged by the adapter using the first charge mode;
If detecting matching authentication failed when carrying out the verifying of matching at least once, then by the adapter using the Two charge modes charge.
6. charge control method according to claim 5, which is characterized in that described to be adapted in the mobile terminal with described Device is shaken hands when connecting, the step of verifying at least once between the adapter, comprising:
Verifying instruction is sent to the adapter, wherein verifying instruction includes at least one random parameter;
The adapter is obtained according to verifying instruction and after preset verifying formula calculated, the first of feedback is verified Value;
First validation value is compared with the second validation value, wherein second validation value be the mobile terminal according to What the random parameter and the preset verifying formula were calculated;
If first validation value is equal with second validation value, it is determined that matching is proved to be successful, and is sent and be proved to be successful Feedback signal is to the adapter;Otherwise, it determines matching authentication failed.
7. a kind of charge control method is applied to adapter, which is characterized in that the adapter is provided with the inspection of at least two voltages Gear is surveyed, and the voltage detecting gear is corresponded in the first connecting pin being connected on mobile terminal with the adapter Output voltage level;When the mobile terminal switches between at least two voltage gears, the adapter can match institute State the switching that voltage gear locating for mobile terminal carries out relevant voltage detection gear;
Wherein, the charge control method includes:
In the voltage detecting gear of adapter setting, the to match in the first voltage gear with the mobile terminal When one voltage detecting gear, if detecting the voltage for the second connection end that the adapter is connected with the mobile terminal, from The first voltage gear switch to second voltage gear, then by the voltage detecting gear switch to the second voltage shelves The matched second voltage in position detects gear, and is shaken hands and connect with the mobile terminal using second voltage detection gear.
8. charge control method according to claim 7, which is characterized in that the method also includes:
In the voltage detecting gear of adapter setting, the to match in the first voltage gear with the mobile terminal When one voltage detecting gear, if detecting, the voltage for the second connection end that the adapter is connected with the mobile terminal is in The first voltage gear is then shaken hands with the mobile terminal using first voltage detection gear and is connect.
9. charge control method according to claim 7, which is characterized in that described to detect gear using the second voltage It shakes hands after the step of connecting with the mobile terminal, the method also includes:
When the adapter is shaken hands with the mobile terminal and connect, is matched and tested at least once between the mobile terminal Card;
If matching verifying is successful every time, charged using the first charge mode to the mobile terminal;
If detecting matching authentication failed, then using the second charge mode to institute when carrying out the verifying of matching at least once Mobile terminal is stated to charge.
10. charge control method according to claim 9, which is characterized in that described in the adapter and the movement Terminal is shaken hands when connecting, and is matched the step of verifying at least once between the mobile terminal, comprising:
The verifying instruction that the mobile terminal is sent is obtained, wherein verifying instruction includes at least one random parameter;
It is calculated according to verifying instruction and preset verifying formula, obtains the first validation value, and described first is verified Value is sent to the mobile terminal;
After receiving the mobile terminal and first validation value is compared with the second validation value, transmission is proved to be successful Feedback information when, determine matching be proved to be successful;Otherwise, it determines matching authentication failed;
Wherein, second validation value is that the mobile terminal is carried out according to the random parameter and the preset verifying formula It is calculated.
11. a kind of mobile terminal, which is characterized in that the output electricity for the first connecting pin that the mobile terminal is connected with adapter Pressure energy is enough to be switched between at least two voltage gears;
Wherein, the mobile terminal includes:
Judgment module, if judging whether numerical value recorded in a statistical data reaches default for detecting that adapter accesses Numerical value;The statistical data is used to record the output voltage of first connecting pin in current first voltage gear and adapter The connection number of successful handshake connection;
First switching module, if reaching the default value for numerical value recorded in the statistical data, by described The output voltage of one connecting pin from the first voltage gear switch be second voltage gear, and use the second voltage gear It shakes hands and connect with the adapter.
12. mobile terminal according to claim 11, which is characterized in that the mobile terminal further include:
First link block uses institute if being not up to the default value for numerical value recorded in the statistical data It states first voltage gear and shakes hands with the adapter and connect.
13. mobile terminal according to claim 12, which is characterized in that the mobile terminal further include:
Counting module then makes the statistics for shaking hands successful connection according to the first voltage gear and the adapter Numerical value in data carries out plus 1 counts.
14. mobile terminal according to claim 11, which is characterized in that the mobile terminal further include:
Processing module then makes the statistics for shaking hands successful connection according to the second voltage gear and the adapter Numerical value in data is reset, and carries out after clearing plus 1 counts.
15. mobile terminal according to claim 11, which is characterized in that the mobile terminal further include:
First authentication module, for when the mobile terminal is shaken hands with the adapter and connect, then between the adapter Carry out matching verifying at least once;
First charging module, if successful for matching verifying every time, by the adapter using the first charge mode into Row charging;
Second charging module, if detecting matching authentication failed for when carrying out the verifying of matching at least once, then passing through The adapter is charged using the second charge mode.
16. mobile terminal according to claim 15, which is characterized in that first authentication module includes:
First transmission unit, for sending verifying instruction to the adapter, wherein verifying instruction including at least one with Machine parameter;
First acquisition unit is calculated for obtaining the adapter according to verifying instruction and preset verifying formula Afterwards, the first validation value of feedback;
Comparing unit, for first validation value to be compared with the second validation value, wherein second validation value is institute State what mobile terminal was calculated according to the random parameter and the preset verifying formula;
First processing units, if equal with second validation value for first validation value, it is determined that matching is proved to be successful, And the feedback signal that is proved to be successful is sent to the adapter;Otherwise, it determines matching authentication failed.
17. a kind of adapter, which is characterized in that the adapter is provided at least two voltage detecting gears, and the voltage Gear is detected to correspond in the output voltage level for the first connecting pin being connected on mobile terminal with the adapter;Institute When stating mobile terminal and switching between at least two voltage gears, the adapter can match electricity locating for the mobile terminal Gear is pressed to carry out the switching of relevant voltage detection gear;
Wherein, the adapter includes:
Second switching module, the voltage detecting gear for being arranged in the adapter, in first with the mobile terminal When first voltage that voltage gear matches detects gear, if detect that the adapter is connected with the mobile terminal the The voltage of two connecting pins, from the first voltage gear switch to second voltage gear, then by the voltage detecting gear switch Gear is detected to the matched second voltage of the second voltage gear, and using second voltage detection gear and the shifting Dynamic terminal is shaken hands connection.
18. adapter according to claim 17, which is characterized in that the adapter further include:
Second link block, the voltage detecting gear for being arranged in the adapter, in first with the mobile terminal When first voltage that voltage gear matches detects gear, if detect that the adapter is connected with the mobile terminal the The voltage of two connecting pins is in the first voltage gear, then is held using first voltage detection gear with the mobile terminal Hand connection.
19. adapter according to claim 17, which is characterized in that the adapter further include:
Second authentication module, for when the adapter is shaken hands with the mobile terminal and connect, between the mobile terminal Carry out matching verifying at least once;
Third charging module, if successful for matching verifying every time, using the first charge mode to the mobile terminal into Row charging;
4th charging module, if detecting matching authentication failed for when carrying out the verifying of matching at least once, then using Second charge mode charges to the mobile terminal.
20. adapter according to claim 19, which is characterized in that second authentication module includes:
Second acquisition unit, the verifying instruction sent for obtaining the mobile terminal, wherein verifying instruction includes at least One random parameter;
Computing unit obtains the first validation value, and will for being calculated according to verifying instruction and preset verifying formula First validation value is sent to the mobile terminal;
The second processing unit, for first validation value being compared with the second validation value receiving the mobile terminal Afterwards, when the feedback information of transmission being proved to be successful, determine that matching is proved to be successful;Otherwise, it determines matching authentication failed;
Wherein, second validation value is that the mobile terminal is carried out according to the random parameter and the preset verifying formula It is calculated.
21. a kind of mobile terminal, 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 6 is realized when the computer program is executed by the processor Any one of described in charge control method the step of.
22. a kind of computer readable storage medium, which is characterized in that be stored with computer on the computer readable storage medium Program realizes such as charge control method described in any one of claims 1 to 6 when the computer program is executed by processor The step of.
23. a kind of adapter, which is characterized in that including processor, memory and be stored on the memory and can be described The computer program run on processor realizes such as claim 7 to 10 when the computer program is executed by the processor Any one of described in charge control method the step of.
24. a kind of computer readable storage medium, which is characterized in that be stored with computer on the computer readable storage medium Program realizes the charge control side as described in any one of claim 7 to 10 when the computer program is executed by processor The step of method.
CN201710832389.XA 2017-09-15 2017-09-15 A kind of charge control method, mobile terminal and adapter Active CN107465234B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710832389.XA CN107465234B (en) 2017-09-15 2017-09-15 A kind of charge control method, mobile terminal and adapter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710832389.XA CN107465234B (en) 2017-09-15 2017-09-15 A kind of charge control method, mobile terminal and adapter

Publications (2)

Publication Number Publication Date
CN107465234A CN107465234A (en) 2017-12-12
CN107465234B true CN107465234B (en) 2019-09-27

Family

ID=60551304

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710832389.XA Active CN107465234B (en) 2017-09-15 2017-09-15 A kind of charge control method, mobile terminal and adapter

Country Status (1)

Country Link
CN (1) CN107465234B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110881042A (en) * 2019-11-29 2020-03-13 株洲新奥燃气有限公司 Gas pipe network monitoring data acquisition terminal and output voltage adjustment method thereof
CN112448450B (en) * 2020-11-16 2023-05-05 Oppo广东移动通信有限公司 Charging control method and device, electronic equipment and storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9314632B2 (en) * 2012-05-17 2016-04-19 Boston Scientific Neuromodulation Corporation Pulse-by-pulse compliance voltage generation for an implantable stimulator
JP2014017989A (en) * 2012-07-10 2014-01-30 Nec Casio Mobile Communications Ltd Mobile terminal, contactless charging system, and management method of contactless charging
US10199848B2 (en) * 2014-07-28 2019-02-05 Qualcomm Incorporated Apparatuses, methods, and systems for enabling higher current charging of Universal Serial Bus (USB) specification revision 2.0 (USB 2.0) portable electronic devices from USB 3.X hosts
CN105762863B (en) * 2015-04-17 2018-06-26 维沃移动通信有限公司 A kind of charging method and charging unit
CN106487072A (en) * 2016-12-06 2017-03-08 东软集团股份有限公司 The method of equipment charge, charger and system

Also Published As

Publication number Publication date
CN107465234A (en) 2017-12-12

Similar Documents

Publication Publication Date Title
CN106843739B (en) A kind of display control method and mobile terminal of mobile terminal
CN106451640B (en) A kind of charging method and mobile terminal
CN106844265B (en) A kind of control method and mobile terminal of general-purpose serial bus USB interface
CN106951174B (en) A kind of method of adjustment and mobile terminal of dummy keyboard
CN106293332B (en) A kind of processing method and mobile terminal of singlehanded positioning application
CN107368150A (en) A kind of photographic method and mobile terminal
CN106354303B (en) A kind of photographic method and mobile terminal of mobile terminal
CN106535434B (en) A kind of flash lamp control method and mobile terminal of mobile terminal
CN105843540A (en) Shortcut operation implementation method and terminal equipment
CN105893130B (en) A kind of processing method and mobile terminal of application program for mobile terminal
CN106648857B (en) A kind of open method and mobile terminal of the OTG function of mobile terminal
CN107515670B (en) A kind of method that realizing automatic page turning and mobile terminal
CN106131828A (en) A kind of WiFi password sharing method, mobile terminal and Cloud Server
CN107465234B (en) A kind of charge control method, mobile terminal and adapter
CN107071264A (en) A kind of image resolution ratio method of adjustment and mobile terminal
CN108762467A (en) Application processing method, device, electronic equipment and computer readable storage medium
CN107396028B (en) A kind of processing method and mobile terminal of video calling
CN107422970B (en) A kind of unlocking method and mobile terminal
CN107329687B (en) A kind of display methods and mobile terminal of virtual input keyboard
CN106027786B (en) A kind of lookup method and mobile terminal of record list
CN107045295A (en) The control method and mobile terminal of a kind of mobile terminal
CN106790768B (en) A kind of dns server setting method and mobile terminal
CN106227612B (en) A kind of method and mobile terminal of word processing
CN108270253A (en) A kind of charging method and mobile terminal
CN107658924A (en) A kind of wireless charging method 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