Summary of the invention
The embodiment of the invention provides a kind of method of charging and chargers, can be according to current scene, remaining capacity
And the charge protocol supported determines charging strategy, and is charged according to the strategy to terminal, wherein the strategy includes fast
Period and trickle charge period are filled, thus while guaranteeing smoothly charging, additionally it is possible to extend battery life.
First aspect of the embodiment of the present invention discloses a kind of method of charging, which comprises
When detecting that charger obtains the mark and remaining capacity of the terminal when establishing connection with terminal;
The charger determines the charge protocol that the terminal is supported according to the mark of the terminal;
The charger obtains the picture in preset range, and current scene is determined according to the picture;
The charger determines charging plan according to the current scene, remaining capacity and the charge protocol supported
Slightly;Wherein, the charging strategy includes fast charge period and trickle charge period;
The charger charges to the terminal according to the charging strategy.
With reference to first aspect, in the first possible implementation of the first aspect, the charger obtains default model
Interior picture is enclosed, and determines current scene according to the picture, comprising:
The charger obtains the picture in preset range by camera;
The scene current with determination is compared in picture in the picture that will acquire and default scene.
The possible implementation of with reference to first aspect the first, in second of possible implementation of first aspect
In, the charger determines the charge protocol that the terminal is supported according to the mark of the terminal, comprising:
The charger according to the mark of the terminal judge the terminal whether with it is charger matched;
When the terminal and it is described charger matched when, the charger sets the charge protocol that the charger is supported
It is set to the charge protocol that the terminal is supported.
The possible implementation of second with reference to first aspect, in the third possible implementation of first aspect
In, the method also includes:
When the terminal and the charger mismatch, the charger determines the minimum that the charger can export
Target protocol corresponding to power;
The charger sets the target protocol to the charge protocol that the terminal is supported.
With reference to first aspect or any possible implementation above-mentioned of first aspect, at the 4th kind of first aspect
In possible implementation, the charger is true according to the current scene, remaining capacity and the charge protocol supported
Determine charging strategy, comprising:
The charger determines the capacity of the battery of the terminal according to the current scene;
The charger determines the fast charge time according to the capacity of the battery, remaining capacity and the charge protocol supported
Length and charger output power corresponding with fast charge time span, the time span commonly to charge and commonly fill with described
The corresponding charger output power of time span of electricity;
By the fast charge time span and charger output power corresponding with fast charge time span, the common charging
Time span and charger output power corresponding with the time span commonly to charge be set as charging strategy.
Second aspect of the present invention discloses a kind of charger, and the charger includes:
Acquiring unit, for when detect establish connection with terminal when, obtain the mark and remaining capacity of the terminal;
First determination unit determines the charge protocol that the terminal is supported for the mark according to the terminal;
The acquiring unit, for obtaining the picture in preset range;
Second determination unit, for determining current scene according to the picture;
Third determination unit, for being determined according to the current scene, remaining capacity and the charge protocol supported
Charging strategy;Wherein, the charging strategy includes fast charge period and trickle charge period;
Charhing unit, for being charged according to the charging strategy to the terminal.
In conjunction with second aspect, in the first possible implementation kind of second aspect, second determination unit includes
The acquiring unit, specifically for obtaining the picture in preset range by camera;
Second determination unit, specifically for the picture in the picture that will acquire and default scene be compared with
Determine current scene.
In conjunction with the first possible implementation of second aspect, in second of possible implementation of second aspect,
First determination unit includes judgment sub-unit and setting subelement;
The judgment sub-unit, for according to the mark of the terminal judge the terminal whether with it is charger matched;
The setting subelement, for when the terminal and it is described charger matched when, the charger is supported
Charge protocol is set as the charge protocol that the terminal is supported.
In conjunction with second of possible implementation of second aspect, in the third possible implementation of second aspect,
The charger further includes setting unit;
First determination unit, for determining the charger energy when the terminal and charger mismatch
Target protocol corresponding to the minimum power enough exported;
The setting unit, for setting the charge protocol that the terminal is supported for the target protocol.
In conjunction with aforementioned any possible implementation of second aspect or second aspect, the 4th kind in second aspect can
It is able to achieve in mode, the third determination unit includes determining that subelement, output power determine subelement, setting using duration
Unit;
It is described to determine subelement using duration, the terminal is determined according to the current scene for the charger
The capacity of battery;
The output power determines subelement, is also used to according to the capacity of the battery, remaining capacity and is supported
Charge protocol determines fast charge time span and charger output power corresponding with fast charge time span, the time commonly charged
Length and charger output power corresponding with the time span commonly to charge;
Subelement is set, is used for the fast charge time span and charger output work corresponding with fast charge time span
Rate, the time span commonly to charge and charger output power corresponding with the time span commonly to charge setting
For charging strategy.Third aspect present invention discloses a kind of charger, and the terminal includes:
It is stored with the memory of executable program code;
The processor coupled with the memory;
The processor calls the executable program code stored in the memory, executes as described in relation to the first aspect
Method.
In the scheme of the embodiment of the present invention, the charger determines what the terminal was supported according to the mark of the terminal
Charge protocol;The charger determines the current scene according to the mark of the terminal;The charger is worked as according to
Preceding scene, remaining capacity and the charge protocol supported determines charging strategy;The charger is according to the charging strategy
It charges to the terminal.It is hereby understood that by implementing technical solution provided by the invention, can according to current scene,
Remaining capacity and the charge protocol supported determine charging strategy, and are charged according to the strategy to terminal, wherein the plan
It slightly include fast charge period and trickle charge period, thus while guaranteeing smoothly charging, additionally it is possible to extend battery life.
Specific embodiment
The embodiment of the invention provides a kind of method of charging and charger, the charger is according to the current field
Scape, remaining capacity and the charge protocol supported determine charging strategy;The charger is according to the charging strategy to described
Terminal charges.It is hereby understood that by implementing technical solution provided by the invention, it can be according to current scene, remaining electricity
Amount and the charge protocol supported determine charging strategy, and are charged according to the strategy to terminal, wherein the strategy includes
Fast charge period and trickle charge period, thus while guaranteeing smoothly charging, additionally it is possible to extend battery life.
In order to enable those skilled in the art to better understand the solution of the present invention, below in conjunction in the embodiment of the present invention
Attached drawing, technical solution in the embodiment of the present invention are explicitly described, it is clear that described embodiment is the present invention one
The embodiment divided, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art are not doing
Every other embodiment obtained under the premise of creative work out, should fall within the scope of the present invention.
The term " first " that occurs in description of the invention, claims and attached drawing, " second " and " third " etc. are to use
In the different object of difference, and it is not intended to describe specific sequence.In addition, term " includes " and " having " and they are any
Deformation, it is intended that cover and non-exclusive include.Such as contain the process, method, system, product of a series of steps or units
Or equipment is not limited to listed step or unit, but optionally further comprising the step of not listing or unit, or can
Selection of land further includes the other step or units intrinsic for these process, methods, product or equipment.
The invention discloses a kind of methods of charging, which comprises when detect establish connection with terminal when, fill
Electric appliance obtains the mark and remaining capacity of the terminal;The charger determines that the terminal is propped up according to the mark of the terminal
The charge protocol held;The charger obtains the picture in preset range, and current scene is determined according to the picture;It is described
Charger determines charging strategy, the charging plan according to the current scene, remaining capacity and the charge protocol supported
It slightly include fast charge period and trickle charge period;The charger charges to the terminal according to the charging strategy.
Referring to Fig. 1, Fig. 1 is a kind of method of charging provided by one embodiment of the present invention.Wherein, as shown in Figure 1, originally
A kind of method for charging that one embodiment of invention provides includes the following contents:
S101, when detecting that charger obtains the mark and remaining capacity of the terminal when establishing connection with terminal;
Wherein, it should be pointed out that the executing subject of this method is charger.
Wherein it is possible to understand, terminal includes but is not limited to smart phone, tablet computer, computer and wearable
The electronic equipments such as equipment.
Wherein, it should be pointed out that the mark of terminal can be sequence number of terminal etc..
Wherein, it should be pointed out that charger can carry out wired connection with terminal, for example pass through connecting line or charging
Line, can also be by wireless connection, for example passes through bluetooth, infrared ray or other wireless connection technologies.
The charge protocol that S102, the charger are supported according to the determining terminal of mark of the terminal;
Wherein it is possible to understand, the charger according to the mark of the terminal judge the terminal whether with charging
Device matching;When the terminal and it is described charger matched when, the charger sets the charge protocol that the charger is supported
It is set to the charge protocol that the terminal is supported.When the terminal and the charger mismatch, the charger determines institute
State target protocol corresponding to the minimum power that charger can export;The charger sets described for the target protocol
The charge protocol that terminal is supported.
For example, charger can send the mark of the terminal to server, by server according to the mark of the terminal
Ergodic data library, if storing the mark of the terminal, illustrates this to determine in the database whether store the terminal iidentification
Terminal belongs to the object of service, then feeds back successful match to charger, conversely, it is unsuccessful then to feed back matching.It is understood that
If the charger is the original-pack server that A terminal company provides, being somebody's turn to do the terminal charger matched with this is generally exactly A public affairs
Take charge of the terminal of production.
For example, charger can support one or more charge protocols, for example can support the quick charge of Q company
Agreement can also support the charge protocol etc. of S company, numerous to list herein.
It is understood that charger may be just with the mode commonly to charge if terminal and charger mismatch
It charges to terminal, for example the fast charge that the charger is supported makes 5V4A, the common charging of support may be exactly 5V1A.
It is understood that charger may not export electric current if terminal and charger mismatch, that is to say, that
Not to unmatched terminal charge.
S103, the charger obtain the picture in preset range, and current scene is determined according to the picture;
Wherein, which includes but is not limited to smart phone, tablet computer, intelligent wearable equipment etc..
Wherein, which includes but is not limited to market, company, family, school, hospital etc..
Wherein, preset range can be used what family defined, be also possible to system default.For example, preset range can
To be centered on charger, radius is the range of 10m.
For example, after charger connects upper mobile phone, camera will be opened, the scene of 10m around is shot
To obtain picture, and the picture that will acquire the scene picture prestored is compared the scene current with determination.Wherein, should
Charger may include camera, be imaged through the camera of the charger.Refer in addition, charger can be sent to terminal
Show that information opens camera with instruction terminal and carries out photograph taking, and filmed photo feedback is charged to charger to bat
The photo taken the photograph is analyzed the scene current with determination.
Optionally, the charger obtains the picture in preset range, and current scene is determined according to the picture, wraps
Include: the charger obtains the picture in preset range by camera;Picture in the picture that will acquire and default scene into
Row, which compares, analyzes the scene current with determination.
It can be understood that being stored with the picture with the scene matching in each preset scene.For example have in bedroom
The photo of bed;For example meeting room has the photo of table or sofa;For example there is the photo in shop etc. in market.
It should be pointed out that the method that the shape of content compares in picture has very much, this will not be detailed here.
S104, the charger are filled according to the current scene, remaining capacity and the charge protocol determination supported
Electric strategy, the charging strategy include fast charge period and trickle charge period;
The charger determines charging plan according to the current scene, remaining capacity and the charge protocol supported
Slightly, comprising: the charger determines the capacity of the battery of the terminal according to the current scene;The charger is according to institute
State battery capacity, remaining capacity and the charge protocol supported determine fast charge time span and with fast charge time span pair
The charger output power answered, the time span commonly to charge and charger corresponding with the time span commonly to charge
Output power;It is described commonly to fill by the fast charge time span and charger output power corresponding with fast charge time span
The time span and charger output power corresponding with the time span commonly to charge of electricity are set as charging strategy.
Wherein, which includes but is not limited to market, company, family, school, hospital etc..
For example, it is 12 hours that duration, which can be used, in the corresponding power supply of general family;According to the charging at current time point and family
Period 18:00-6:00 determines that duration can be used in power supply.
The corresponding duration of company is 10 hours, such as according to current time point and the charging time of company section 8:
00-18:00 determines that duration can be used in power supply.Such as be currently at 4 points in afternoon, the place of charging in company, then, power supply can be used
Duration be 2 hours.
For example, the battery capacity which is is 4000mAh, and current residual electricity is lower than 20%, and supports fast charge
Agreement then carries out quick charge to the terminal, when electricity is greater than or equal to 80%, then carries out trickle charge.Because the battery is big
Capacity batteries, it is enough for 80% electricity, will not influence the normal use of user at this time.Then according to current electric quantity and
Electricity needed for 80% electricity calculates, when determining required according to the output power of institute's electricity demand, power supply available duration and charger
Between.For example, power supply available duration is two hours, charging strategy is fast charge 1 hour, and trickle charge half an hour, current time is evening 10:
00, fast charge 1H may be needed with the power of 5V4A, common charging 30 minutes are then needed with the power of 5V2A again.It completes normally to fill
While electric, the service life of mobile phone is also extended.
Wherein, it should be pointed out that the output power of general 10W or more is defined as fast charge, for example 5V4A, 9V2A are belonged to
The range of fast charge;On the contrary, 5V1A, 5V1.5V just belong to the range commonly to charge.
S105, the charger charge to the terminal according to the charging strategy.
As can be seen that the charger determines the end according to the mark of the terminal in the scheme of the embodiment of the present invention
Hold supported charge protocol;The charger determines the current scene according to the mark of the terminal;The charger
Charging strategy is determined according to the current scene, remaining capacity and the charge protocol supported;The charger is according to institute
Charging strategy is stated to charge to the terminal.It, can be according to working as it is hereby understood that by implementing technical solution provided by the invention
Preceding scene, remaining capacity and the charge protocol supported determines charging strategy, and is charged according to the strategy to terminal,
Wherein, which includes fast charge period and trickle charge period, thus while guaranteeing smoothly charging, additionally it is possible to extend battery
Service life.
Referring to Fig. 2, Fig. 2 is a kind of method of charging provided by one embodiment of the present invention.Wherein, as shown in Fig. 2, originally
A kind of method for charging that one embodiment of invention provides includes the following contents:
S201, when detecting that charger obtains the mark and remaining capacity of the terminal when establishing connection with terminal;
S202, the charger according to the mark of the terminal judge the terminal whether with it is charger matched;
S203, when the terminal and it is described charger matched when, charging that the charger is supported the charger
Agreement is set as the charge protocol that the terminal is supported;
S204, when the terminal and the charger mismatch, the charger determines that the charger can export
Minimum power corresponding to target protocol;
The target protocol is set the charge protocol that the terminal is supported by S205, the charger;
S206, the charger obtain the picture in preset range by camera;
The scene current with determination is compared in picture in S207, the picture that will acquire and default scene;
S208, the charger are filled according to the current scene, remaining capacity and the charge protocol determination supported
Electric strategy, the charging strategy include fast charge period and trickle charge period;
Wherein, the charger is filled according to the current scene, remaining capacity and the charge protocol determination supported
Electric strategy, comprising: the charger determines that duration can be used in power supply according to the current scene;The charger is according to
Power supply can be used duration, remaining capacity and the charge protocol supported determine fast charge time span and with fast charge time span
Corresponding charger output power, the time span commonly to charge and charging corresponding with the time span commonly to charge
Device output power;It is described common by the fast charge time span and charger output power corresponding with fast charge time span
The time span of charging and charger output power corresponding with the time span commonly to charge are set as charging strategy.
S209, the charger charge to the terminal according to the charging strategy.
It determines current scene as can be seen that being extended in the scheme of the embodiment of the present invention and determines power supply available duration
The step of, so as to which charging strategy is determined more accurately.
Referring to Fig. 3, Fig. 3 is a kind of structural schematic diagram for charger that one embodiment of the present of invention provides.Wherein, such as
Shown in Fig. 3, a kind of charger 300 of one embodiment of the present of invention offer, wherein the charger 300 can be carried out with terminal
Wired connection, such as by connecting line or charging cable, can also by being wirelessly connected, such as by bluetooth, infrared ray or other
Wireless connection technology.The charger 300 includes acquiring unit 301, the first determination unit 302, the second determination unit 303, third
Determination unit 304 and charhing unit 305.
Acquiring unit 301, for when detect establish connection with terminal when, obtain the terminal mark and residue electricity
Amount;
First determination unit 302 determines the charge protocol that the terminal is supported for the mark according to the terminal;
Acquiring unit 301, for obtaining the picture in preset range;
Second determination unit 303, for determining current scene according to the picture;
Third determination unit 304, for true according to the current scene, remaining capacity and the charge protocol supported
Determine charging strategy, wherein the charging strategy includes fast charge period and trickle charge period;
Charhing unit 305, for being charged according to the charging strategy to the terminal.
Wherein, acquiring unit 301, the first determination unit 302, the second determination unit 303, third determination unit 304 and
Charhing unit 305 can be used for executing method described in step S101 to S105 in embodiment 1, specifically describe detailed in Example 1
Description to the method, details are not described herein.
Referring to Fig. 4, Fig. 4 is the structural schematic diagram for another charger 400 that one embodiment of the present of invention provides.Its
In, as shown in figure 4, another charger 400 that one embodiment of the present of invention provides, wherein the charger 400 can be with end
End carries out wired connection, such as by connecting line or charging cable, can also be by wireless connection, for example passes through bluetooth, infrared ray
Or other are wirelessly connected technology.The charger 400 includes acquiring unit 401, the first determination unit 402, the second determination unit
403, third determination unit 404, charhing unit 405 and setting unit 406.
Acquiring unit 401, for when detect establish connection with terminal when, obtain the terminal mark and residue electricity
Amount.
First determination unit 402 determines the charge protocol that the terminal is supported for the mark according to the terminal.
Wherein, first determination unit 402 includes judgment sub-unit 4021 and setting subelement 4022;
The judgment sub-unit 4021, for according to the mark of the terminal judge the terminal whether with charger
Match;
The setting subelement 4022, for when the terminal and it is described charger matched when, the charger is propped up
The charge protocol held is set as the charge protocol that the terminal is supported.
Acquiring unit 401, for obtaining the picture in preset range;
Second determination unit 403, for determining current scene according to the picture;
Wherein, acquiring unit 401, specifically for obtaining the picture in preset range by camera;Second determination unit
403, the scene current with determination is compared specifically for the picture in the picture that will acquire and default scene.
Third determination unit 404, for true according to the current scene, remaining capacity and the charge protocol supported
Determine charging strategy, wherein the charging strategy includes fast charge period and trickle charge period;
The third determination unit 404 include determined using duration subelement 4041, output power determine subelement 4042,
Subelement 4043 is set;
It is described to determine subelement 4041 using duration, for determining that duration can be used in power supply according to the current scene;
The output power determines subelement 4042, be also used to according to the power supply can be used duration, remaining capacity and
The charge protocol supported determines fast charge time span and charger output power corresponding with fast charge time span, commonly fills
The time span of electricity and charger output power corresponding with the time span commonly to charge;
Subelement 4043 is set, for the fast charge time span and charger corresponding with fast charge time span is defeated
Power out, the time span commonly to charge and charger output power corresponding with the time span commonly to charge
It is set as charging strategy.
Charhing unit 405, for being charged according to the charging strategy to the terminal.
Wherein, first determination unit 402 is also used to determine institute when the terminal and charger mismatch
State target protocol corresponding to the minimum power that charger can export;
Setting unit 406, for setting the charge protocol that the terminal is supported for the target protocol.Wherein, it obtains
Take unit 401, the first determination unit 402, the second determination unit 403, third determination unit 404, charhing unit 405 and setting
Unit 406 can be used for executing method described in step S201 to S209 in embodiment 2, specifically describe 2 pairs of institutes of detailed in Example
The description of method is stated, details are not described herein.
Referring to Fig. 5, in another embodiment of the present invention, providing a kind of charger 500.The charger 500 wraps
Include CPU501, memory 502, bus 503.
Wherein, CPU501 executes the program being stored in advance in memory 502, which specifically includes:
When detecting that charger obtains the mark and remaining capacity of the terminal when establishing connection with terminal;
The charger determines the charge protocol that the terminal is supported according to the mark of the terminal;
The charger obtains the picture in preset range, and current scene is determined according to the picture;
The charger determines charging plan according to the current scene, remaining capacity and the charge protocol supported
Slightly, the charging strategy includes fast charge period and trickle charge period;
The charger charges to the terminal according to the charging strategy.
Optionally, the charger obtains the picture in preset range, and current scene is determined according to the picture, wraps
It includes:
The charger obtains the picture in preset range by camera;
The scene current with determination is compared in picture in the picture that will acquire and default scene.
Optionally, the charge protocol that the charger is supported according to the determining terminal of mark of the terminal, comprising:
The charger according to the mark of the terminal judge the terminal whether with it is charger matched;
When the terminal and it is described charger matched when, the charger sets the charge protocol that the charger is supported
It is set to the charge protocol that the terminal is supported.
Optionally, the implementation procedure further include:
When the terminal and the charger mismatch, the charger determines the minimum that the charger can export
Target protocol corresponding to power;
The charger sets the target protocol to the charge protocol that the terminal is supported.
Optionally, the charger is determined according to the current scene, remaining capacity and the charge protocol supported
Charging strategy, comprising:
The charger determines that duration can be used in power supply according to the current scene;
The charger duration, remaining capacity and the charge protocol supported can be used to determine fast charge according to the power supply
Time span and charger output power corresponding with fast charge time span, the time span commonly to charge and with it is described general
The corresponding charger output power of time span of logical charging;
By the fast charge time span and charger output power corresponding with fast charge time span, the common charging
Time span and charger output power corresponding with the time span commonly to charge be set as charging strategy.
As can be seen that the charger determines the end according to the mark of the terminal in the scheme of the embodiment of the present invention
Hold supported charge protocol;The charger determines the current scene according to the mark of the terminal;The charger
Charging strategy is determined according to the current scene, remaining capacity and the charge protocol supported;The charger is according to institute
Charging strategy is stated to charge to the terminal.It, can be according to working as it is hereby understood that by implementing technical solution provided by the invention
Preceding scene, remaining capacity and the charge protocol supported determines charging strategy, and is charged according to the strategy to terminal,
Wherein, which includes fast charge period and trickle charge period, thus while guaranteeing smoothly charging, additionally it is possible to extend battery
Service life.
In earlier figures 1, embodiment shown in Fig. 2, each step method process can be realized based on the structure of the charger.
In earlier figures 3, embodiment shown in Fig. 4, each unit function can be realized based on the structure of the charger.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, there is no the portion being described in detail in some embodiment
Point, reference can be made to the related descriptions of other embodiments.
In several embodiments provided herein, it should be understood that disclosed device, it can be by another way
It realizes.For example, the apparatus embodiments described above are merely exemplary, such as the division of the unit, it is only a kind of
Logical function partition, there may be another division manner in actual implementation, such as multiple units or components can combine or can
To be integrated into another system, or some features can be ignored or not executed.Another point, shown or discussed is mutual
Coupling, direct-coupling or communication connection can be through some interfaces, the indirect coupling or communication connection of device or unit,
It can be electrical 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.Above-mentioned integrated list
Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product
When, it can store in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantially
The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words
It embodies, which is stored in a storage medium, including some instructions are used so that a computer
Equipment (can for personal computer, server or network equipment etc.) execute each embodiment the method for the present invention whole or
Part steps.And storage medium above-mentioned includes: that USB flash disk, read-only memory (ROM, Read-Only Memory), arbitrary access are deposited
Reservoir (RAM, Random Access Memory), mobile hard disk, magnetic or disk etc. be various to can store program code
Medium.
The above, the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although referring to before
Stating embodiment, invention is explained in detail, those skilled in the art should understand that: it still can be to preceding
Technical solution documented by each embodiment is stated to modify or equivalent replacement of some of the technical features;And these
It modifies or replaces, the range for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution.