CN106299515A - Charging method and device - Google Patents
Charging method and device Download PDFInfo
- Publication number
- CN106299515A CN106299515A CN201610827192.2A CN201610827192A CN106299515A CN 106299515 A CN106299515 A CN 106299515A CN 201610827192 A CN201610827192 A CN 201610827192A CN 106299515 A CN106299515 A CN 106299515A
- Authority
- CN
- China
- Prior art keywords
- terminal
- power supply
- dump energy
- role exchange
- energy information
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H01—ELECTRIC ELEMENTS
- H01M—PROCESSES OR MEANS, e.g. BATTERIES, FOR THE DIRECT CONVERSION OF CHEMICAL ENERGY INTO ELECTRICAL ENERGY
- H01M10/00—Secondary cells; Manufacture thereof
- H01M10/42—Methods or arrangements for servicing or maintenance of secondary cells or secondary half-cells
- H01M10/44—Methods for charging or discharging
-
- H—ELECTRICITY
- H01—ELECTRIC ELEMENTS
- H01M—PROCESSES OR MEANS, e.g. BATTERIES, FOR THE DIRECT CONVERSION OF CHEMICAL ENERGY INTO ELECTRICAL ENERGY
- H01M10/00—Secondary cells; Manufacture thereof
- H01M10/42—Methods or arrangements for servicing or maintenance of secondary cells or secondary half-cells
- H01M10/44—Methods for charging or discharging
- H01M10/441—Methods for charging or discharging for several batteries or cells simultaneously or sequentially
-
- H—ELECTRICITY
- H01—ELECTRIC ELEMENTS
- H01M—PROCESSES OR MEANS, e.g. BATTERIES, FOR THE DIRECT CONVERSION OF CHEMICAL ENERGY INTO ELECTRICAL ENERGY
- H01M10/00—Secondary cells; Manufacture thereof
- H01M10/42—Methods or arrangements for servicing or maintenance of secondary cells or secondary half-cells
- H01M10/46—Accumulators structurally combined with charging apparatus
-
- H—ELECTRICITY
- H02—GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
- H02J—CIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
- H02J7/00—Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
- H02J7/0013—Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries acting upon several batteries simultaneously or sequentially
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02E—REDUCTION OF GREENHOUSE GAS [GHG] EMISSIONS, RELATED TO ENERGY GENERATION, TRANSMISSION OR DISTRIBUTION
- Y02E60/00—Enabling technologies; Technologies with a potential or indirect contribution to GHG emissions mitigation
- Y02E60/10—Energy storage using batteries
Landscapes
- Engineering & Computer Science (AREA)
- Manufacturing & Machinery (AREA)
- Chemical & Material Sciences (AREA)
- Chemical Kinetics & Catalysis (AREA)
- Electrochemistry (AREA)
- General Chemical & Material Sciences (AREA)
- Power Engineering (AREA)
- Charge And Discharge Circuits For Batteries Or The Like (AREA)
- Telephone Function (AREA)
Abstract
The disclosure is directed to a kind of charging method and device.Method includes: gather the dump energy information of first terminal;Obtain the dump energy information of the second terminal being connected with described first terminal;When the dump energy information of the master slave mode information according to described first terminal, the dump energy information of described first terminal and described second terminal determines that described first terminal and described second terminal meet default power supply role exchange condition, change the power supply direction between described first terminal and described second terminal.Thus, it is possible to avoid the terminal that dump energy in correlation technique is low to power to the terminal that dump energy is high, cause the problem that self cannot continue data interaction because of electricity shortage.Additionally, this charging method need not change the master slave mode of two terminals, the change in power supply direction just can be realized, because of without data are impacted alternately.
Description
Technical field
It relates to field of terminal, particularly relate to a kind of charging method and device.
Background technology
Along with the appearance of Type C interface, increasing terminal unit begins with this interface.Terminal unit with its
When his terminal unit is mutual, this terminal unit can be at three kinds of different patterns, it may be assumed that main equipment pattern (DFP pattern), from equipment
Pattern (UFP pattern) and master-slave equipment pattern (DRP pattern).When two terminal units set up connection by Type C interface,
The two probability being in master slave mode is equal, and i.e. it can be as main equipment, it is also possible to as from equipment.When two terminals
Equipment is set up by Type C interface when connecting, and always main equipment is powered to from equipment, now, if the electricity of main equipment is not
Foot, then can affect data interaction.Additionally, in the related, changing the power supply direction between two terminal units needs to pass through
The master slave mode changing two terminal units realizes.
Summary of the invention
For overcoming problem present in correlation technique, the disclosure provides a kind of charging method and device.
First aspect according to disclosure embodiment, it is provided that a kind of charging method, described method includes:
Gather the dump energy information of described first terminal;
Obtain the dump energy information of the second terminal being connected with described first terminal;
When the master slave mode information according to described first terminal, the dump energy information of described first terminal and described second
The dump energy information of terminal determines when described first terminal and described second terminal meet default power supply role exchange condition,
Change the power supply direction between described first terminal and described second terminal.
Alternatively, described first terminal is connected by Type C interface with described second terminal;And
The dump energy information of the second terminal that described acquisition is connected with described first terminal, including:
The dump energy information of the second terminal being connected with described first terminal is obtained by described Type C interface.
Alternatively, represent that described first terminal is in main equipment pattern, and described first when described master slave mode information
When the dump energy of terminal is less than the dump energy of described second terminal, determine that described first terminal and described second terminal meet
Described power supply role exchange condition;
When described master slave mode information represents that described first terminal is in from equipment mode, and described first terminal is surplus
When remaining electricity is more than the dump energy of described second terminal, determine that described first terminal and described second terminal meet described power supply
Role exchange condition.
Alternatively, described when the dump energy letter according to the master slave mode information of described first terminal, described first terminal
The dump energy information of breath and described second terminal determines that described first terminal and described second terminal meet default confession electric angle
When color exchanges condition, change the power supply direction between described first terminal and described second terminal, including:
When the master slave mode information according to described first terminal, the dump energy information of described first terminal and described second
The dump energy information of terminal determines when described first terminal and described second terminal meet default power supply role exchange condition,
Power supply role exchange request is sent to described second terminal;
Receiving the power supply role exchange response message that described second terminal sends, wherein, described power supply role exchange responds
Message is used for indicating described second terminal accept the request of described power supply role exchange or refuse the request of described power supply role exchange;
When described second terminal of described power supply role exchange response message instruction accepts the request of described power supply role exchange,
Change the power supply direction between described first terminal and described second terminal.
Alternatively, described method also includes:
When the master slave mode information according to described first terminal, the dump energy information of described first terminal and described second
The dump energy information of terminal determines that described first terminal and described second terminal are unsatisfactory for the power supply role exchange condition preset
Time, or when described second terminal of described power supply role exchange response message instruction refuses the request of described power supply role exchange, protect
Hold the power supply direction between described first terminal and described second terminal constant.
Second aspect according to disclosure embodiment, it is provided that a kind of charging device, described device includes:
Acquisition module, is configured to gather the dump energy information of described first terminal;
Acquisition module, is configured to obtain the dump energy information of the second terminal being connected with described first terminal;
Power supply direction changes module, is configured as the master slave mode information according to described first terminal, described first end
The dump energy information of end and the dump energy information of described second terminal determine that described first terminal and described second terminal are full
During the power supply role exchange condition that foot is preset, change the power supply direction between described first terminal and described second terminal.
Alternatively, described first terminal is connected by Type C interface with described second terminal;And
Described acquisition module is configured to described Type C interface and obtains be connected with described first terminal
The dump energy information of two terminals.
Alternatively, described power supply direction changes module and is configured as described master slave mode information and represents described first terminal
Be in main equipment pattern, and the dump energy of described first terminal less than the dump energy of described second terminal time, determine institute
State first terminal and described second terminal meets described power supply role exchange condition;When described master slave mode information represents described
One terminal is in from equipment mode, and the dump energy of described first terminal more than the dump energy of described second terminal time,
Determine that described first terminal and described second terminal meet described power supply role exchange condition.
Alternatively, change module in described power supply direction includes:
Send submodule, be configured as the master slave mode information according to described first terminal, described first terminal surplus
The dump energy information of remaining information about power and described second terminal determines that described first terminal and described second terminal meet and presets
Power supply role exchange condition time, to described second terminal send power supply role exchange request;
Receive submodule, be configured to receive the power supply role exchange response message that described second terminal sends, wherein, institute
State power supply role exchange response message for indicating described second terminal to accept described in the request of described power supply role exchange or refusal
Power supply role exchange request;
Power supply direction changes submodule, is configured as described power supply role exchange response message and indicates described second terminal
When accepting the request of described power supply role exchange, change the power supply direction between described first terminal and described second terminal.
Alternatively, described device also includes:
Power supply direction keeps module, is configured as the master slave mode information according to described first terminal, described first end
The dump energy information of end and the dump energy information of described second terminal determine described first terminal and described second terminal not
When meeting the power supply role exchange condition preset, or when the described second terminal refusal of described power supply role exchange response message instruction
During the request of described power supply role exchange, keep the power supply direction between described first terminal and described second terminal constant.
The third aspect according to disclosure embodiment, it is provided that a kind of charging device, including:
Processor;
For storing the memorizer of processor executable;
Wherein, described processor is configured to:
Gather the dump energy information of described first terminal;
Obtain the dump energy information of the second terminal being connected with described first terminal;
When the master slave mode information according to described first terminal, the dump energy information of described first terminal and described second
The dump energy information of terminal determines when described first terminal and described second terminal meet default power supply role exchange condition,
Change the power supply direction between described first terminal and described second terminal.
Fourth aspect according to disclosure embodiment, it is provided that a kind of non-transitory computer-readable recording medium, when described
When instruction in storage medium is performed by the processor of first terminal so that first terminal is able to carry out a kind of charging method, institute
The method of stating includes:
Gather the dump energy information of described first terminal;
Obtain the dump energy information of the second terminal being connected with described first terminal;
When the master slave mode information according to described first terminal, the dump energy information of described first terminal and described second
The dump energy information of terminal determines when described first terminal and described second terminal meet default power supply role exchange condition,
Change the power supply direction between described first terminal and described second terminal.
Embodiment of the disclosure that the technical scheme of offer can include following beneficial effect: by according to first terminal
The dump energy information of master slave mode information, the dump energy information of first terminal and the second terminal determines first terminal and second
Terminal changes the power supply direction between first terminal and the second terminal when meeting default power supply role exchange condition, can avoid
The terminal that dump energy is low is powered to dump energy high terminal, causes self to continue asking of data interaction because of electricity shortage
Topic.Additionally, this charging method need not change the master slave mode of two terminals, the change in the direction that just can realize powering, thus not
Data interaction can be impacted.
It should be appreciated that it is only exemplary and explanatory, not that above general description and details hereinafter describe
The disclosure can be limited.
Accompanying drawing explanation
Accompanying drawing herein is merged in description and constitutes the part of this specification, it is shown that meet the enforcement of the disclosure
Example, and for explaining the principle of the disclosure together with description.
Figure 1A is the structural representation according to a kind of implementation environment shown in an exemplary embodiment.
Figure 1B is the structural representation according to a kind of implementation environment shown in another exemplary embodiment.
Fig. 2 A is the flow chart according to a kind of charging method shown in an exemplary embodiment.
Fig. 2 B is according to a kind of supplier of electricity changed between first terminal and the second terminal shown in an exemplary embodiment
To the flow chart of process.
Fig. 2 C is the flow chart according to a kind of charging method shown in another exemplary embodiment.
Fig. 3 A is the block diagram according to a kind of charging device shown in an exemplary embodiment.
Fig. 3 B is according to the block diagram of a kind of charging device shown in another exemplary embodiment.
Fig. 4 is the block diagram according to a kind of charging device shown in an exemplary embodiment.
Detailed description of the invention
Here will illustrate exemplary embodiment in detail, its example represents in the accompanying drawings.Explained below relates to
During accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawings represents same or analogous key element.Following exemplary embodiment
Described in embodiment do not represent all embodiments consistent with the disclosure.On the contrary, they are only with the most appended
Device that some aspects that described in detail in claims, the disclosure are consistent and the example of device.
Figure 1A is the structural representation according to a kind of implementation environment shown in an exemplary embodiment.This implementation environment is permissible
Including first terminal 110 and the second terminal 120, and, first terminal 110 and the second terminal 120 may belong to same type of
Terminal, the two can be communicated by Type C interface.Wherein, first terminal 110 and first terminal 120 can be intelligence handss
Machine, panel computer, notebook computer etc..Figure 1A is all that smart mobile phone is illustrated with first terminal 110 and the second terminal 120.
After first terminal 110 and the second terminal 120 establish communication connection, first terminal 110 and the second terminal 120
Residing master slave mode also determines that.Under normal circumstances, it is at main equipment pattern, the second terminal 120 when first terminal 110
When from equipment mode, first terminal 110 is powered to the second terminal 120;When first terminal 110 be in from equipment mode, second
When terminal 120 is in main equipment pattern, first terminal 110 is powered by the second terminal 120.
Figure 1B is the structural representation according to a kind of implementation environment shown in another exemplary embodiment.This implementation environment can
To include first terminal 110 and the second terminal 120, and, first terminal 110 and the second terminal 120 may belong to not type
Terminal, the two can be communicated by Type C interface.Figure 1B is smart mobile phone, the second terminal with first terminal 110
120 is that notebook computer is illustrated.
Fig. 2 A is the flow chart according to a kind of charging method shown in an exemplary embodiment, and wherein, the method can be answered
For first terminal, such as, the terminal 110 shown in Figure 1A or Figure 1B.As shown in Figure 2 A, the method may comprise steps of:
In step 201, the dump energy information of first terminal is gathered.
In the disclosure, the current capacities of the battery that this dump energy information is arranged on first terminal for instruction.The
One terminal can gather the dump energy information of self by built-in sensor, and the mode of collection can be according to predetermined
Cycle is acquired, it is also possible to be to be acquired when setting up be connected with the second terminal.
In step 202., the dump energy information of the second terminal being connected with first terminal is obtained.
In an embodiment of the disclosure, this first terminal can be carried out even by Type C interface and the second terminal
Connecing, so, first terminal can obtain, by this Type C interface, the dump energy information that the second terminal collects.This residue
The current capacities of the battery that information about power is arranged in the second terminal for instruction.Second terminal can be by built-in sensor
Carry out the collection of dump energy information.The mode of the dump energy information that first terminal obtains the second terminal can be the second terminal
Periodically transmission, first terminal automatic reception.The mode of the dump energy information that first terminal obtains the second terminal can also be
First terminal, when being connected by the foundation of Type C interface with the second terminal, is sent dump energy information request to the second terminal and refers to
Order;Second terminal, after receiving the dump energy information request instruction that first terminal sends, sends self residual to first terminal
Information about power is to respond this request;First terminal receives the dump energy information that the second terminal sends.
In step 203, when the master slave mode information according to first terminal, the dump energy information and second of first terminal
The dump energy information of terminal determines when first terminal and the second terminal meet default power supply role exchange condition, changes first
Power supply direction between terminal and the second terminal.
In the disclosure, the master slave mode that master slave mode information is presently in for indicating terminal, wherein, this master slave mode
Main equipment pattern can be included and from equipment mode.
In an embodiment of the disclosure, can be by comparing dump energy and the residue of the second terminal of first terminal
The size of electricity, and combine the master slave mode information of first terminal, judge whether first terminal and the second terminal meet and preset
Power supply role exchange condition.When master slave mode information represents that first terminal is in main equipment pattern, and first terminal is surplus
When remaining electricity is less than the dump energy of the second terminal, it may be determined that it is mutual that first terminal and the second terminal meet default power supply role
Change condition;When master slave mode information represents that first terminal is in from equipment mode, and the dump energy of first terminal is more than the
During the dump energy of two terminals, it may be determined that first terminal and the second terminal meet default power supply role exchange condition.
When determining that first terminal and the second terminal meet default power supply role exchange condition, change first terminal and the
Power supply direction between two terminals, is i.e. in and powers to the terminal being in main equipment pattern from the terminal of equipment mode.
Illustratively, after first terminal and the second terminal are set up and connected, when master slave mode information instruction first terminal is current
When being in main equipment pattern, first terminal is powered to the second terminal.Dump energy remaining less than the second terminal when first terminal
During remaining electricity, it may be determined that first terminal and the second terminal meet default power supply role exchange condition.Now, first is changed eventually
End and the power supply direction of the second terminal, i.e. first terminal is powered by the second terminal.
Illustratively, after first terminal and the second terminal are set up and connected, when master slave mode information instruction first terminal is current
Being in when equipment mode, first terminal is powered by the second terminal.Dump energy remaining more than the second terminal when first terminal
During remaining electricity, it may be determined that first terminal and the second terminal meet default power supply role exchange condition.Now, first is changed eventually
End and the power supply direction of the second terminal, i.e. first terminal is powered to the second terminal.
Embodiment of the disclosure that the technical scheme of offer can include following beneficial effect: by according to first terminal
The dump energy information of master slave mode information, the dump energy information of first terminal and the second terminal determines first terminal and second
Terminal changes the power supply direction between first terminal and the second terminal when meeting default power supply role exchange condition, can avoid
The terminal that dump energy is low is powered to dump energy high terminal, causes self to continue asking of data interaction because of electricity shortage
Topic.Additionally, this charging method need not change the master slave mode of two terminals, the change in the direction that just can realize powering, thus not
Data interaction can be impacted.
In one embodiment, when the master slave mode information according to first terminal, the dump energy information of first terminal
When determining that first terminal and the second terminal meet default power supply role exchange condition with the dump energy information of the second terminal, can
To change the power supply direction between first terminal and the second terminal in the following manner.As shown in Figure 2 B, above-mentioned steps 203 can
To include:
In step 2031, when the master slave mode information according to first terminal, the dump energy information of first terminal and
The dump energy information of two terminals determines when first terminal and the second terminal meet default power supply role exchange condition, to second
Terminal sends power supply role exchange request.
In step 2032, receiving the power supply role exchange response message that the second terminal sends, wherein, this power supply role is mutual
Change response message for indicating the second terminal to accept power supply role exchange request or refusal power supply role exchange request.
In step 2033, when power supply role exchange response message indicates the second terminal to accept power supply role exchange request
Time, change the power supply direction between first terminal and the second terminal.
Illustratively, after first terminal and the second terminal are set up and connected, when master slave mode information instruction first terminal is current
When being in main equipment pattern, first terminal is powered to the second terminal.When the dump energy information combining two terminals determines first
When terminal and the second terminal meet default power supply role exchange condition, first terminal sends power supply role exchange to the second terminal
Request.Second terminal, when receiving the power supply role exchange request from first terminal, sends power supply role to first terminal
Exchange response message, to represent whether it accepts role exchange request of powering.When power supply role exchange response message instruction second
When terminal accepts power supply role exchange request, change the power supply direction between first terminal and the second terminal, i.e. first terminal quilt
Second terminal is powered.
Illustratively, after first terminal and the second terminal are set up and connected, when master slave mode information instruction first terminal is current
Being in when equipment mode, first terminal is powered by the second terminal.When the dump energy information combining two terminals determines first
When terminal and the second terminal meet default power supply role exchange condition, first terminal sends power supply role exchange to the second terminal
Request.Second terminal, when receiving the power supply role exchange request from first terminal, sends power supply role to first terminal
Exchange response message, to represent whether it accepts role exchange request of powering.When power supply role exchange response message instruction second
When terminal accepts power supply role exchange request, change the power supply direction between first terminal and the second terminal, i.e. first terminal to
Second terminal is powered.
Fig. 2 C is the flow chart according to a kind of charging method shown in another exemplary embodiment, and wherein, the method is permissible
It is applied to first terminal, such as, the first terminal 110 shown in Figure 1A or Figure 1B.As shown in Figure 2 C, above-mentioned charging method also may be used
To include:
In step 204, when the master slave mode information according to first terminal, the dump energy information and second of first terminal
When the dump energy information of terminal determines the power supply role exchange condition that first terminal and the second terminal are unsatisfactory for presetting, maybe work as confession
When electricity role exchange response message indicates the second terminal refusal power supply role exchange request, keep first terminal and the second terminal it
Between power supply direction constant.
In one embodiment, when the master slave mode information according to first terminal, the dump energy information of first terminal
When determining, with the dump energy information of the second terminal, the power supply role exchange condition that first terminal and the second terminal are unsatisfactory for presetting,
Keep the power supply direction between first terminal and the second terminal constant.
Illustratively, after first terminal and the second terminal are set up and connected, when master slave mode information instruction first terminal is current
When being in main equipment pattern, first terminal is powered to the second terminal.When the master slave mode information according to first terminal, first terminal
Dump energy information and the dump energy information of the second terminal determine that first terminal and the second terminal are unsatisfactory for the power supply preset
During role exchange condition, keep the power supply direction between first terminal and the second terminal constant, i.e. first terminal continues to second
Terminal is powered.
Illustratively, after first terminal and the second terminal are set up and connected, when master slave mode information instruction first terminal is current
Being in when equipment mode, first terminal is powered by the second terminal.When the master slave mode information according to first terminal, first terminal
Dump energy information and the dump energy information of the second terminal determine that first terminal and the second terminal are unsatisfactory for the power supply preset
During role exchange condition, keep the power supply direction between first terminal and the second terminal constant, i.e. first terminal continues by second
Terminal is powered.
In another embodiment, believe when the dump energy of the master slave mode information according to first terminal, first terminal
The dump energy information of breath and the second terminal determines when first terminal and the second terminal meet default power supply role exchange condition,
First terminal sends power supply role exchange request to the second terminal.When the second terminal refusal power supply role exchange request, keep
Power supply direction between first terminal and the second terminal is constant.
Illustratively, after first terminal and the second terminal are set up and connected, when master slave mode information instruction first terminal is current
When being in main equipment pattern, first terminal is powered to the second terminal.When the dump energy information combining two terminals determines first
When terminal and the second terminal meet default power supply role exchange condition, first terminal sends power supply role exchange to the second terminal
Request.When the second terminal refusal power supply role exchange request, keep the power supply direction between first terminal and the second terminal not
Become, i.e. first terminal continues to power to the second terminal.
Illustratively, after first terminal and the second terminal are set up and connected, when master slave mode information instruction first terminal is current
Being in when equipment mode, first terminal is powered by the second terminal.When the dump energy information combining two terminals determines first
When terminal and the second terminal meet default power supply role exchange condition, first terminal sends power supply role exchange to the second terminal
Request.When the second terminal refusal power supply role exchange request, keep the power supply direction between first terminal and the second terminal not
Become, i.e. first terminal continues to be powered by the second terminal.
Fig. 3 A is the block diagram according to a kind of charging device 300 shown in an exemplary embodiment, and wherein, this device 300 can
To be applied to first terminal, such as, the first terminal 110 shown in Figure 1A or Figure 1B.With reference to Fig. 3 A, this device 300 can wrap
Include: acquisition module 301, be configured to gather the dump energy information of described first terminal;Acquisition module 302, is configured to obtain
Take the dump energy information of the second terminal being connected with described first terminal;Power supply direction changes module 303, is configured as
Master slave mode information, the dump energy information of described first terminal and the residue of described second terminal according to described first terminal
Information about power determines when described first terminal and described second terminal meet default power supply role exchange condition, changes described
Power supply direction between one terminal and described second terminal.
Alternatively, described first terminal is connected by Type C interface with described second terminal;And
Described acquisition module 302 is configured to described Type C interface and obtains and be connected with described first terminal
The dump energy information of the second terminal.
Alternatively, described power supply direction changes module 303 and is configured as described master slave mode information and represents described first
Terminal is in main equipment pattern, and the dump energy of described first terminal less than the dump energy of described second terminal time, really
Fixed described first terminal and described second terminal meet described power supply role exchange condition;When described master slave mode information represents institute
State first terminal to be in from equipment mode, and the dump energy of described first terminal is more than the dump energy of described second terminal
Time, determine that described first terminal and described second terminal meet described power supply role exchange condition.
Alternatively, change module 303 in described power supply direction includes:
Send submodule, be configured as the master slave mode information according to described first terminal, described first terminal surplus
The dump energy information of remaining information about power and described second terminal determines that described first terminal and described second terminal meet and presets
Power supply role exchange condition time, to described second terminal send power supply role exchange request;
Receive submodule, be configured to receive the power supply role exchange response message that described second terminal sends, wherein, institute
State power supply role exchange response message for indicating described second terminal to accept described in the request of described power supply role exchange or refusal
Power supply role exchange request;
Power supply direction changes submodule, is configured as described power supply role exchange response message and indicates described second terminal
When accepting the request of described power supply role exchange, change the power supply direction between described first terminal and described second terminal.
Fig. 3 B is the block diagram according to a kind of charging device 300 shown in another exemplary embodiment, wherein, and this device 300
Can apply to first terminal, such as, the first terminal 110 shown in Figure 1A or Figure 1B.As shown in Figure 3 B, above-mentioned charging device
300 can also include:
Power supply direction keep module 304, be configured as the master slave mode information according to described first terminal, described first
The dump energy information of terminal and the dump energy information of described second terminal determine described first terminal and described second terminal
When being unsatisfactory for the power supply role exchange condition preset, or when described power supply role exchange response message indicates described second terminal to refuse
During the request of exhausted described power supply role exchange, keep the power supply direction between described first terminal and described second terminal constant.
Embodiment of the disclosure that the technical scheme of offer can include following beneficial effect: by according to first terminal
The dump energy information of master slave mode information, the dump energy information of first terminal and the second terminal determines first terminal and second
Terminal changes the power supply direction between first terminal and the second terminal when meeting default power supply role exchange condition, can avoid
The terminal that dump energy is low is powered to dump energy high terminal, causes self to continue asking of data interaction because of electricity shortage
Topic.Additionally, this charging method need not change the master slave mode of two terminals, the change in the direction that just can realize powering, thus not
Data interaction can be impacted.
About the device in above-described embodiment, wherein modules performs the concrete mode of operation at this device relevant
Embodiment in be described in detail, explanation will be not set forth in detail herein.
Fig. 4 is according to the block diagram of a kind of charging device 400 shown in an exemplary embodiment.Such as, device 400 can be to move
Mobile phone, computer, digital broadcast terminal, messaging devices, game console, tablet device, armarium, body-building sets
Standby, personal digital assistant etc..
With reference to Fig. 4, device 400 can include following one or more assembly: processes assembly 402, memorizer 404, electric power
Assembly 406, multimedia groupware 408, audio-frequency assembly 410, the interface 412 of input/output (I/O), sensor cluster 414, and
Communications component 416.
Process assembly 402 and generally control the integrated operation of device 400, such as with display, call, data communication, phase
The operation that machine operation and record operation are associated.Process assembly 402 and can include that one or more processor 420 performs to refer to
Order, to complete all or part of step of above-mentioned charging method.Additionally, process assembly 402 can include one or more mould
Block, it is simple to process between assembly 402 and other assemblies is mutual.Such as, process assembly 402 and can include multi-media module, with
Facilitate multimedia groupware 408 and process between assembly 402 mutual.
Memorizer 404 is configured to store various types of data to support the operation at device 400.Showing of these data
Example includes any application program for operation on device 400 or the instruction of device, contact data, telephone book data, disappears
Breath, picture, video etc..Memorizer 404 can be by any kind of volatibility or non-volatile memory device or their group
Close and realize, such as static RAM (SRAM), Electrically Erasable Read Only Memory (EEPROM), erasable compile
Journey read only memory (EPROM), programmable read only memory (PROM), read only memory (ROM), magnetic memory, flash
Device, disk or CD.
The various assemblies that electric power assembly 406 is device 400 provide electric power.Electric power assembly 406 can include power management system
System, one or more power supplys, and other generate, manage and distribute, with for device 400, the assembly that electric power is associated.
The screen of one output interface of offer that multimedia groupware 408 is included between described device 400 and user.One
In a little embodiments, screen can include liquid crystal display (LCD) and touch panel (TP).If screen includes touch panel, screen
Curtain may be implemented as touch screen, to receive the input signal from user.Touch panel includes one or more touch sensing
Device is with the gesture on sensing touch, slip and touch panel.Described touch sensor can not only sense touch or sliding action
Border, but also detect the persistent period relevant to described touch or slide and pressure.In certain embodiments, many matchmakers
Body assembly 408 includes a front-facing camera and/or post-positioned pick-up head.When device 400 is in operator scheme, such as screening-mode or
During video mode, front-facing camera and/or post-positioned pick-up head can receive the multi-medium data of outside.Each front-facing camera and
Post-positioned pick-up head can be a fixing optical lens system or have focal length and optical zoom ability.
Audio-frequency assembly 410 is configured to output and/or input audio signal.Such as, audio-frequency assembly 410 includes a Mike
Wind (MIC), when device 400 is in operator scheme, during such as call model, logging mode and speech recognition mode, mike is joined
It is set to receive external audio signal.The audio signal received can be further stored at memorizer 404 or via communication set
Part 416 sends.In certain embodiments, audio-frequency assembly 410 also includes a speaker, is used for exporting audio signal.
I/O interface 412 provides interface for processing between assembly 402 and peripheral interface module, above-mentioned peripheral interface module can
To be keyboard, put striking wheel, button etc..These buttons may include but be not limited to: home button, volume button, start button and lock
Set button.
Sensor cluster 414 includes one or more sensor, for providing the state of various aspects to comment for device 400
Estimate.Such as, what sensor cluster 414 can detect device 400 opens/closed mode, the relative localization of assembly, such as described
Assembly is display and the keypad of device 400, and sensor cluster 414 can also detect device 400 or 400 1 assemblies of device
Position change, the presence or absence that user contacts with device 400, device 400 orientation or acceleration/deceleration and device 400
Variations in temperature.Sensor cluster 414 can include proximity transducer, is configured to when not having any physical contact detect
The existence of neighbouring object.Sensor cluster 414 can also include optical sensor, such as CMOS or ccd image sensor, is used for becoming
Use as in application.In certain embodiments, this sensor cluster 414 can also include acceleration transducer, gyro sensors
Device, Magnetic Sensor, pressure transducer or temperature sensor.
Communications component 416 is configured to facilitate the communication of wired or wireless mode between device 400 and other equipment.Device
400 can access wireless network based on communication standard, such as WiFi, 2G or 3G, or combinations thereof.An exemplary enforcement
In example, communications component 416 receives the broadcast singal from external broadcasting management system or broadcast related information via broadcast channel.
In one exemplary embodiment, described communications component 416 also includes near-field communication (NFC) module, to promote junction service.Example
As, can be based on RF identification (RFID) technology in NFC module, Infrared Data Association (IrDA) technology, ultra broadband (UWB) technology,
Bluetooth (BT) technology and other technologies realize.
In the exemplary embodiment, device 400 can be by one or more application specific integrated circuits (ASIC), numeral letter
Number processor (DSP), digital signal processing appts (DSPD), PLD (PLD), field programmable gate array
(FPGA), controller, microcontroller, microprocessor or other electronic components realize, for performing above-mentioned charging method.
In the exemplary embodiment, a kind of non-transitory computer-readable recording medium including instruction, example are additionally provided
As included the memorizer 404 of instruction, above-mentioned instruction can have been performed above-mentioned charging method by the processor 420 of device 400.
Such as, described non-transitory computer-readable recording medium can be ROM, random access memory (RAM), CD-ROM, tape,
Floppy disk and optical data storage devices etc..
Those skilled in the art, after considering description and putting into practice the disclosure, will readily occur to other embodiment party of the disclosure
Case.The application is intended to any modification, purposes or the adaptations of the disclosure, these modification, purposes or adaptability
Change is followed the general principle of the disclosure and includes the undocumented common knowledge in the art of the disclosure or usual skill
Art means.Description and embodiments is considered only as exemplary, and the true scope of the disclosure and spirit are by claim below
Point out.
It should be appreciated that the disclosure is not limited to precision architecture described above and illustrated in the accompanying drawings, and
And various modifications and changes can carried out without departing from the scope.The scope of the present disclosure is only limited by appended claim.
Claims (11)
1. a charging method, it is characterised in that described method is applied to first terminal, described method includes:
Gather the dump energy information of described first terminal;
Obtain the dump energy information of the second terminal being connected with described first terminal;
When the master slave mode information according to described first terminal, the dump energy information of described first terminal and described second terminal
Dump energy information determine when described first terminal and described second terminal meet default power supply role exchange condition, change
Power supply direction between described first terminal and described second terminal.
Method the most according to claim 1, it is characterised in that described first terminal and described second terminal are by Type C
Interface is connected;And
The dump energy information of the second terminal that described acquisition is connected with described first terminal, including:
The dump energy information of the second terminal being connected with described first terminal is obtained by described Type C interface.
Method the most according to claim 1, it is characterised in that when described master slave mode information represents at described first terminal
In main equipment pattern, and the dump energy of described first terminal less than the dump energy of described second terminal time, determine described
First terminal and described second terminal meet described power supply role exchange condition;
When described master slave mode information represents that described first terminal is in from equipment mode, and the residue electricity of described first terminal
When amount is more than the dump energy of described second terminal, determine that described first terminal and described second terminal meet described power supply role
Exchange condition.
Method the most according to claim 1, it is characterised in that described when the master slave mode letter according to described first terminal
The dump energy information of breath, the dump energy information of described first terminal and described second terminal determines described first terminal and institute
State the second terminal when meeting default power supply role exchange condition, change the confession between described first terminal and described second terminal
Electricity direction, including:
When the master slave mode information according to described first terminal, the dump energy information of described first terminal and described second terminal
Dump energy information determine when described first terminal and described second terminal meet default power supply role exchange condition, to institute
State the second terminal and send power supply role exchange request;
Receive the power supply role exchange response message that described second terminal sends, wherein, described power supply role exchange response message
For indicating described second terminal accept the request of described power supply role exchange or refuse the request of described power supply role exchange;
When described second terminal of described power supply role exchange response message instruction accepts the request of described power supply role exchange, change
Power supply direction between described first terminal and described second terminal.
Method the most according to claim 4, it is characterised in that described method also includes:
When the master slave mode information according to described first terminal, the dump energy information of described first terminal and described second terminal
Dump energy information determine when described first terminal and described second terminal are unsatisfactory for the power supply role exchange condition preset, or
When described second terminal of described power supply role exchange response message instruction refuses the request of described power supply role exchange, keep described
Power supply direction between first terminal and described second terminal is constant.
6. a charging device, it is characterised in that described device is applied to first terminal, described device includes:
Acquisition module, is configured to gather the dump energy information of described first terminal;
Acquisition module, is configured to obtain the dump energy information of the second terminal being connected with described first terminal;
Power supply direction changes module, is configured as master slave mode information according to described first terminal, described first terminal
It is pre-that the dump energy information of dump energy information and described second terminal determines that described first terminal and described second terminal meet
If power supply role exchange condition time, change the power supply direction between described first terminal and described second terminal.
Device the most according to claim 6, it is characterised in that described first terminal and described second terminal are by Type C
Interface is connected;And
Described acquisition module is configured to described Type C interface and obtains second be connected with described first terminal eventually
The dump energy information of end.
Device the most according to claim 6, it is characterised in that described power supply direction changes module and is configured as described master
Represent that described first terminal is in main equipment pattern from pattern information, and the dump energy of described first terminal is less than described the
During the dump energy of two terminals, determine that described first terminal and described second terminal meet described power supply role exchange condition;When
Described master slave mode information represents that described first terminal is in from equipment mode, and the dump energy of described first terminal is more than
During the dump energy of described second terminal, determine that described first terminal and described second terminal meet described power supply role exchange bar
Part.
Device the most according to claim 6, it is characterised in that described power supply direction changes module and includes:
Send submodule, be configured as the residue electricity of the master slave mode information according to described first terminal, described first terminal
The dump energy information of amount information and described second terminal determines that described first terminal and described second terminal meet default confession
During electricity role exchange condition, send power supply role exchange request to described second terminal;
Receive submodule, be configured to receive the power supply role exchange response message that described second terminal sends, wherein, described confession
Electricity role exchange response message is used for indicating described second terminal accept the request of described power supply role exchange or refuse described power supply
Role exchange is asked;
Power supply direction changes submodule, is configured as described second terminal of described power supply role exchange response message instruction and accepts
During the request of described power supply role exchange, change the power supply direction between described first terminal and described second terminal.
Device the most according to claim 9, it is characterised in that described device also includes:
Power supply direction keeps module, is configured as master slave mode information according to described first terminal, described first terminal
The dump energy information of dump energy information and described second terminal determines that described first terminal and described second terminal are unsatisfactory for
During the power supply role exchange condition preset, or when the described second terminal refusal of described power supply role exchange response message instruction is described
During power supply role exchange request, keep the power supply direction between described first terminal and described second terminal constant.
11. 1 kinds of charging devices, it is characterised in that including:
Processor;
For storing the memorizer of processor executable;
Wherein, described processor is configured to:
Gather the dump energy information of described first terminal;
Obtain the dump energy information of the second terminal being connected with described first terminal;
When the master slave mode information according to described first terminal, the dump energy information of described first terminal and described second terminal
Dump energy information determine when described first terminal and described second terminal meet default power supply role exchange condition, change
Power supply direction between described first terminal and described second terminal.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610827192.2A CN106299515B (en) | 2016-09-14 | 2016-09-14 | Charging method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610827192.2A CN106299515B (en) | 2016-09-14 | 2016-09-14 | Charging method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106299515A true CN106299515A (en) | 2017-01-04 |
CN106299515B CN106299515B (en) | 2019-04-16 |
Family
ID=57711694
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610827192.2A Active CN106299515B (en) | 2016-09-14 | 2016-09-14 | Charging method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106299515B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111713176A (en) * | 2018-05-16 | 2020-09-25 | 华为技术有限公司 | Data transmission method and terminal |
CN113078709A (en) * | 2021-04-01 | 2021-07-06 | 博阳能源科技有限公司 | Role control method of quick charging circuit, protocol processing system and circuit |
CN114498784A (en) * | 2020-10-26 | 2022-05-13 | 北京小米移动软件有限公司 | Charging method, charging device, electronic device and storage medium |
CN116231815A (en) * | 2023-05-10 | 2023-06-06 | 荣耀终端有限公司 | Method for controlling charging and electronic equipment |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102025001A (en) * | 2009-09-21 | 2011-04-20 | 联想(北京)有限公司 | Terminal and charging and power supplying method thereof |
CN104900927A (en) * | 2014-03-07 | 2015-09-09 | 世和能源科技股份有限公司 | Detection and display method for mobile power supply charging information |
US20160149431A1 (en) * | 2013-05-24 | 2016-05-26 | Qualcomm Incorporated | Master-slave multi-phase charging |
-
2016
- 2016-09-14 CN CN201610827192.2A patent/CN106299515B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102025001A (en) * | 2009-09-21 | 2011-04-20 | 联想(北京)有限公司 | Terminal and charging and power supplying method thereof |
US20160149431A1 (en) * | 2013-05-24 | 2016-05-26 | Qualcomm Incorporated | Master-slave multi-phase charging |
CN104900927A (en) * | 2014-03-07 | 2015-09-09 | 世和能源科技股份有限公司 | Detection and display method for mobile power supply charging information |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111713176A (en) * | 2018-05-16 | 2020-09-25 | 华为技术有限公司 | Data transmission method and terminal |
US11979941B2 (en) | 2018-05-16 | 2024-05-07 | Huawei Technologies Co., Ltd. | Data transmission method and terminal |
CN114498784A (en) * | 2020-10-26 | 2022-05-13 | 北京小米移动软件有限公司 | Charging method, charging device, electronic device and storage medium |
CN113078709A (en) * | 2021-04-01 | 2021-07-06 | 博阳能源科技有限公司 | Role control method of quick charging circuit, protocol processing system and circuit |
CN116231815A (en) * | 2023-05-10 | 2023-06-06 | 荣耀终端有限公司 | Method for controlling charging and electronic equipment |
CN116231815B (en) * | 2023-05-10 | 2023-09-08 | 荣耀终端有限公司 | Method for controlling charging and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN106299515B (en) | 2019-04-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105098888A (en) | Charging method and device | |
CN104714414A (en) | Smart home equipment control method and device and electronic equipment | |
CN105373464A (en) | Charging warning method and device of wearable equipment | |
CN105072336A (en) | Control method, apparatus and device for adjusting photographing function | |
CN105098273A (en) | Charging method and device | |
CN105720644A (en) | Charging control method and device and terminal device | |
CN104578372A (en) | Method and device for controlling charging of terminal device | |
CN104320542A (en) | Method and device for sending reminding message | |
CN106712219A (en) | Charging protection method and device | |
CN105120505A (en) | Method, apparatus and system for making intelligent equipment accessed to router | |
CN104376239A (en) | Terminal unlocking method and device | |
CN106299515A (en) | Charging method and device | |
CN104090655A (en) | Terminal and terminal control method and device. | |
CN104837154A (en) | Wireless access point control method and device | |
CN105353901A (en) | Method and apparatus for determining validity of touch operation | |
CN106230066A (en) | Charge prompting method and apparatus | |
CN104714826A (en) | Application theme loading method and device | |
CN106453846A (en) | Display method and device for two-dimensional code business card | |
CN106304101A (en) | Share the method and device of network | |
CN105630655A (en) | Charging connection prompting method and apparatus | |
CN104881342A (en) | Terminal testing method and device | |
CN104463047A (en) | Device and method for control modules to work | |
CN106786842A (en) | Charge prompting method and device | |
CN105573471A (en) | Information processing method and device | |
CN104967174A (en) | Charging control method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |