CN113131022A - Charging method and device - Google Patents

Charging method and device Download PDF

Info

Publication number
CN113131022A
CN113131022A CN201911418486.XA CN201911418486A CN113131022A CN 113131022 A CN113131022 A CN 113131022A CN 201911418486 A CN201911418486 A CN 201911418486A CN 113131022 A CN113131022 A CN 113131022A
Authority
CN
China
Prior art keywords
current
residual capacity
slave
master
master device
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.)
Pending
Application number
CN201911418486.XA
Other languages
Chinese (zh)
Inventor
赵玉峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hisense Visual Technology Co Ltd
Original Assignee
Hisense Visual Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hisense Visual Technology Co Ltd filed Critical Hisense Visual Technology Co Ltd
Priority to CN201911418486.XA priority Critical patent/CN113131022A/en
Publication of CN113131022A publication Critical patent/CN113131022A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H01ELECTRIC ELEMENTS
    • H01MPROCESSES OR MEANS, e.g. BATTERIES, FOR THE DIRECT CONVERSION OF CHEMICAL ENERGY INTO ELECTRICAL ENERGY
    • H01M10/00Secondary cells; Manufacture thereof
    • H01M10/42Methods or arrangements for servicing or maintenance of secondary cells or secondary half-cells
    • H01M10/44Methods for charging or discharging
    • H01M10/446Initial charging measures
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02EREDUCTION OF GREENHOUSE GAS [GHG] EMISSIONS, RELATED TO ENERGY GENERATION, TRANSMISSION OR DISTRIBUTION
    • Y02E60/00Enabling technologies; Technologies with a potential or indirect contribution to GHG emissions mitigation
    • Y02E60/10Energy storage using batteries

Abstract

The application provides a charging method and a charging device. The method is used in a slave device, the slave device is connected with a master device through a connecting line, and the method comprises the following steps: the method comprises the steps of acquiring the current residual capacity of the master device and the current residual capacity of the slave device at intervals of preset time, wherein the residual capacity is the percentage of the residual battery capacity to the total battery capacity, determining whether the current residual capacity of the master device and the current residual capacity of the slave device meet a first preset condition, and if the current residual capacity of the master device and the current residual capacity of the slave device meet the first preset condition, setting the access current of the master device entering the slave device to be smaller than or equal to a preset current threshold value. Therefore, the balance of the residual electric quantity of the master equipment and the residual electric quantity of the slave equipment can be kept, and the use electric quantity of the master equipment is guaranteed.

Description

Charging method and device
Technical Field
The present application relates to the field of electronic devices, and in particular, to a charging method and apparatus.
Background
The mobile phone is a core of a current personal electronic device, and has a wide range of users, there are many kinds of devices externally connected with the mobile phone as a main device, and some external devices need to be powered by the mobile phone, for example, in the field of Virtual Reality (VR)/Augmented Reality (AR), when some VR/AR devices have a battery, and when the VR/AR devices are connected to the mobile phone through a Universal Serial Bus (USB) interface, the mobile phone can be used as a main device, the VR/AR devices can be used as a slave device, and the main device charges the slave device, but sometimes, the battery power of the mobile phone is consumed by the slave device and the battery power of the slave device is sufficient, and the battery power of the slave device is unbalanced, so that the battery power of the mobile phone cannot be guaranteed.
Disclosure of Invention
The application provides a charging method and a charging device, which are used for solving the problem that the use electric quantity of a master device cannot be guaranteed when a slave device is charged through the master device.
In a first aspect, the present application provides a charging method, where the method is used in a slave device, and the slave device is connected with a master device through a connection line, and the method includes:
acquiring the current residual capacity of the master equipment and the current residual capacity of the slave equipment at preset time intervals, wherein the residual capacity is the percentage of the residual battery capacity to the total battery capacity;
determining whether the current residual capacity of the master device and the current residual capacity of the slave device meet a first preset condition;
and if the first preset condition is determined to be met, setting the path current of the master equipment entering the slave equipment to be less than or equal to a preset current threshold.
Optionally, the first preset condition is:
the current residual capacity of the master device is smaller than the current residual capacity of the slave device; alternatively, the first and second electrodes may be,
and the difference value between the current residual capacity of the master equipment and the current residual capacity of the slave equipment is smaller than a first preset threshold value.
Optionally, the method further includes:
acquiring initial residual capacity of the master device and initial residual capacity of the slave device;
determining whether the initial residual capacity of the master device and the initial residual capacity of the slave device meet a second preset condition;
and if the second preset condition is determined to be met, starting the path current of the master equipment into the slave equipment.
Optionally, the method further includes:
and if the second preset condition is determined not to be met, setting the path current of the master equipment entering the slave equipment to be less than or equal to the preset current threshold.
Optionally, the second preset condition is:
the initial residual capacity of the master device is greater than or equal to the initial residual capacity of the slave device; alternatively, the first and second electrodes may be,
the difference value between the initial residual capacity of the master device and the initial residual capacity of the slave device is greater than or equal to a second preset threshold value.
Optionally, the obtaining of the current remaining power of the master device includes:
and receiving the current residual electric quantity of the main equipment, which is sent by the connection established by the main equipment through the connecting line.
Optionally, the connecting line is a USB connecting line.
In a second aspect, the present application provides a charging method, where the method is used in a master device, and the master device is connected to a slave device through a connection line, and the method includes:
acquiring the current residual capacity of the master equipment and the current residual capacity of the slave equipment at preset time intervals, wherein the residual capacity is the percentage of the residual battery capacity to the total battery capacity;
determining whether the current residual capacity of the master device and the current residual capacity of the slave device meet a first preset condition;
and if the first preset condition is determined to be met, setting the path current flowing into the slave equipment from the master equipment to be less than or equal to a preset current threshold.
Optionally, the first preset condition is:
the current residual capacity of the master device is smaller than the current residual capacity of the slave device; alternatively, the first and second electrodes may be,
and the difference value between the current residual capacity of the master equipment and the current residual capacity of the slave equipment is smaller than a first preset threshold value.
Optionally, the method further includes:
acquiring initial residual capacity of the master device and initial residual capacity of the slave device;
determining whether the initial residual capacity of the master device and the initial residual capacity of the slave device meet a second preset condition;
and if the second preset condition is determined to be met, starting the path current of the master equipment flowing into the slave equipment.
Optionally, the method further includes:
and if the second preset condition is determined not to be met, setting the path current flowing into the slave equipment from the master equipment to be less than or equal to the preset current threshold.
Optionally, the second preset condition is:
the initial residual capacity of the master device is greater than or equal to the initial residual capacity of the slave device; alternatively, the first and second electrodes may be,
the difference value between the initial residual capacity of the master device and the initial residual capacity of the slave device is greater than or equal to a second preset threshold value.
Optionally, the obtaining of the current remaining power of the slave device includes:
and receiving the current residual capacity of the slave equipment, which is sent by the slave equipment through the connection established by the connecting line.
Optionally, the connecting line is a USB connecting line.
In a third aspect, the present application provides a charging device comprising:
the obtaining module is used for obtaining the current residual electric quantity of the master equipment and the current residual electric quantity of the slave equipment at intervals of preset time, wherein the residual electric quantity is the percentage of the residual battery electric quantity to the total battery electric quantity;
the determining module is used for determining whether the current residual capacity of the master device and the current residual capacity of the slave device meet a first preset condition;
and the processing module is used for setting the path current of the master equipment entering the slave equipment to be less than or equal to a preset current threshold when the determining module determines that the first preset condition is met.
Optionally, the first preset condition is:
the current residual capacity of the master device is smaller than the current residual capacity of the slave device; alternatively, the first and second electrodes may be,
and the difference value between the current residual capacity of the master equipment and the current residual capacity of the slave equipment is smaller than a first preset threshold value.
Optionally, the obtaining module is further configured to: acquiring initial residual capacity of the master device and initial residual capacity of the slave device;
the determination module is further to: determining whether the initial residual capacity of the master device and the initial residual capacity of the slave device meet a second preset condition;
the processing module is further configured to: and when the determining module determines that the second preset condition is met, starting the path current of the master device entering the slave device.
Optionally, the processing module is further configured to: and if the determining module determines that the second preset condition is not met, setting the path current of the master device entering the slave device to be less than or equal to the preset current threshold.
Optionally, the second preset condition is:
the initial residual capacity of the master device is greater than or equal to the initial residual capacity of the slave device; alternatively, the first and second electrodes may be,
the difference value between the initial residual capacity of the master device and the initial residual capacity of the slave device is greater than or equal to a second preset threshold value.
Optionally, the obtaining module is configured to: and receiving the current residual electric quantity of the main equipment, which is sent by the connection established by the main equipment through the connecting line.
Optionally, the connection line is a Universal Serial Bus (USB) connection line.
In a fourth aspect, the present application provides a charging device comprising:
the obtaining module is used for obtaining the current residual electric quantity of the master equipment and the current residual electric quantity of the slave equipment at intervals of preset time, wherein the residual electric quantity is the percentage of the residual battery electric quantity to the total battery electric quantity;
the determining module is used for determining whether the current residual capacity of the master device and the current residual capacity of the slave device meet a first preset condition;
and the processing module is used for setting the path current flowing into the slave equipment from the master equipment to be less than or equal to a preset current threshold when the determining module determines that the first preset condition is met.
Optionally, the first preset condition is:
the current residual capacity of the master device is smaller than the current residual capacity of the slave device; alternatively, the first and second electrodes may be,
and the difference value between the current residual capacity of the master equipment and the current residual capacity of the slave equipment is smaller than a first preset threshold value.
Optionally, the obtaining module is further configured to: acquiring initial residual capacity of the master device and initial residual capacity of the slave device;
the determination module is further to: determining whether the initial residual capacity of the master device and the initial residual capacity of the slave device meet a second preset condition;
the processing module is further configured to: and when the determining module determines that the second preset condition is met, starting the path current flowing into the slave equipment by the master equipment.
Optionally, the processing module is further configured to: and if the determining module determines that the second preset condition is not met, setting the path current flowing into the slave equipment from the master equipment to be less than or equal to the preset current threshold.
Optionally, the second preset condition is:
the initial residual capacity of the master device is greater than or equal to the initial residual capacity of the slave device; alternatively, the first and second electrodes may be,
the difference value between the initial residual capacity of the master device and the initial residual capacity of the slave device is greater than or equal to a second preset threshold value.
Optionally, the obtaining module is configured to: and receiving the current residual capacity of the slave equipment, which is sent by the slave equipment through the connection established by the connecting line.
Optionally, the connection line is a Universal Serial Bus (USB) connection line.
According to the charging method and device, after the slave device is connected with the master device through the connecting line, the current residual capacity of the master device and the current residual capacity of the slave device are obtained at preset intervals, when it is determined that the current residual capacity of the master device and the current residual capacity of the slave device meet a first preset condition, the path current of the master device entering the slave device is set to be smaller than or equal to a preset current threshold value, when the preset current threshold value is 0, the path current of the master device entering the slave device is closed, the residual capacity is the percentage of the residual battery capacity to the total battery capacity, so that the residual capacity of the master device can be guaranteed not to be smaller than the residual capacity of the slave device, the balance of the capacities of the master device and the slave device is guaranteed, and the use capacity of the master device is guaranteed.
Drawings
In order to more clearly illustrate the technical solutions in the present application or the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a schematic view of an application scenario of a charging method provided in the present application;
fig. 2 is a flowchart of an embodiment of a charging method provided in the present application;
fig. 3 is a flowchart of an embodiment of a charging method provided in the present application;
fig. 4 is a flowchart of an embodiment of a charging method provided in the present application;
fig. 5 is a schematic structural diagram of an embodiment of a charging device provided in the present application;
fig. 6 is a schematic structural diagram of an embodiment of a charging device provided in the present application;
fig. 7 is a schematic diagram of a hardware structure of an electronic device provided in the present application.
Detailed Description
To make the purpose, technical solutions and advantages of the present application clearer, the technical solutions in the present application will be clearly and completely described below with reference to the drawings in the present application, and it is obvious that the described embodiments are some, but not all embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In the related art, when the master device and the slave device are connected through the USB interface, the master device charges the slave device, for example, when the VR/AR device is connected to the mobile phone through the USB interface, the mobile phone may serve as the master device, the VR/AR device serves as the slave device, the master device charges the slave device, as long as the slave device is connected to the master device, the master device starts to charge the slave device, and sometimes a situation may occur where the battery power of the master device is consumed by the slave device and the battery power of the slave device is sufficient, for example, the current remaining power of the slave device is 80%, the current remaining power of the master device is 10%, the master device still charges the slave device after the slave device is connected to the master device, or during the charging process, the current remaining power of the slave device is 80%, the current remaining power of the master device is 10%, the master device continues to charge the slave device, and the amounts of the two are obviously unbalanced, the method comprises the steps that after a slave device is connected to a master device, the slave device obtains the current residual capacity of the master device and the current residual capacity of the slave device at preset time intervals, when whether the current residual capacity of the master device and the current residual capacity of the slave device meet a first preset condition is determined, the first preset condition is that the current residual capacity of the master device is smaller than the current residual capacity of the slave device, or the first preset condition is that the difference value between the current residual capacity of the master device and the current residual capacity of the slave device is smaller than a first preset threshold value, the access current of the master device entering the slave device is set to be smaller than or equal to the preset current threshold value, when the preset current threshold value is 0, the access current of the master device entering the slave device is closed, and the residual capacity is the percentage of the residual battery capacity to the total battery capacity, therefore, the residual electric quantity of the master equipment can be ensured not to be less than that of the slave equipment, the electric quantity of the master equipment and the electric quantity of the slave equipment are ensured to be kept balanced, and the use electric quantity of the master equipment is ensured. The following describes a specific implementation process of the present application in detail by using specific embodiments with reference to the accompanying drawings.
Fig. 1 is a schematic view of an application scenario of the charging method provided in the present application, and as shown in fig. 1, the application scenario of the charging method in the present application includes a master device 110, a slave device 111, and a connection line 112 connecting the master device 110 and the slave device 111. The master device 110 may be a smart phone, a tablet computer, a portable computer, a netbook, or the like, and the slave device 111 may be a wearable electronic device, an AR device, a VR device, a music player, or the like, and the specific forms of the master device 110 and the slave device 111 are not particularly limited in this application.
The master device 110 and the slave device 111 are connected through a connection line 112, a connector 113 and a connector 114 of the connection line 112 are respectively matched with an interface of the master device 110 and an interface of the slave device 111, the connection line 112 may be a USB connection line, for example, any one of Type-A, Type-B and Type-C, and when the connection line 112 is a USB connection line, the connector 113 and the connector 114 of the connection line 112 are both USB connectors.
Fig. 2 is a flowchart of an embodiment of a charging method provided in the present application, where an execution main body in the embodiment may be a slave device shown in fig. 1, and the slave device is connected to a master device through a connection line, as shown in fig. 2, the method of the present embodiment may include:
s101, acquiring the current residual capacity of the master equipment and the current residual capacity of the slave equipment at preset time intervals.
The obtaining of the current remaining power of the master device may be receiving the current remaining power of the master device sent by the connection established by the master device through the connection line. The connection line connecting the slave device and the master device may be a USB connection line. The obtaining of the current remaining power of the slave device may be reading the current remaining power of the slave device. In the embodiment of the present application, the remaining battery capacity is a percentage of the remaining battery capacity to the total battery capacity, such as 50%, 80%, and so on.
S102, whether the current residual capacity of the master device and the current residual capacity of the slave device meet a first preset condition is determined.
The first preset condition may be: the current remaining capacity of the master device is less than the current remaining capacity of the slave device. For example, the current remaining capacity of the master device is 40%, the current remaining capacity of the slave device is 50%, and the current remaining capacity of the master device is smaller than the current remaining capacity of the slave device.
The first preset condition may also be: the difference value between the current residual capacity of the master device and the current residual capacity of the slave device is smaller than a first preset threshold value. For example, the first preset threshold is 5%, that is, the difference between the current remaining power of the master device and the current remaining power of the slave device is less than 5%. This avoids frequent activation of the turn-off or turn-on of the pass current from the master device to the slave device, for example, once charging has begun, the turn-off of the pass current from the master device to the slave device (i.e., stopping charging) may occur after the master device has less than 3% of the slave device charge.
Specifically, after the slave device is connected to the master device, the master device starts to charge the slave device, and acquires the current remaining power of the master device and the current remaining power of the slave device every preset time, for example, every preset time is 10S or 1 minute, determines the current remaining power of the master device and the current remaining power of the slave device, determines whether to continue charging, and if it is determined that the current remaining power of the master device and the current remaining power of the slave device meet a first preset condition, executes S103.
S103, if the first preset condition is met, setting the path current of the master device entering the slave device to be smaller than or equal to a preset current threshold.
Specifically, for example, the preset current threshold is 50mA, the path current of the master device entering the slave device is set to be less than 50mA, and if the preset current threshold is 0, the path current of the master device entering the slave device is set to be 0, that is, the path current of the master device entering the slave device is turned off. Therefore, the situation that the slave equipment needs to be charged when the electric quantity of the main equipment is insufficient can be avoided, and the electric quantity of the main equipment is ensured.
Optionally, before S101, the method of this embodiment may further include:
and S104, acquiring the initial residual capacity of the master equipment and the initial residual capacity of the slave equipment.
Specifically, after the slave device is connected to the master device, before the master device starts charging the slave device, the initial remaining capacity of the master device and the initial remaining capacity of the master device are obtained, where the obtained initial remaining capacity of the master device may be the initial remaining capacity of the master device sent by receiving a connection established by the master device through a connection line. That is, after the master device determines to connect to the slave device, the initial remaining power of the master device itself is read and then transmitted to the slave device. The obtaining of the initial remaining power of the slave device may be reading the initial remaining power of the slave device. In the embodiment of the present application, the remaining battery capacity is a percentage of the remaining battery capacity to the total battery capacity, such as 50%, 80%, and so on.
And S105, determining whether the initial residual capacity of the master equipment and the initial residual capacity of the slave equipment meet a second preset condition.
Wherein, the second preset condition may be: the initial remaining capacity of the master device is greater than or equal to the initial remaining capacity of the slave device.
The second preset condition may also be: the difference value between the initial residual capacity of the master device and the initial residual capacity of the slave device is greater than or equal to a second preset threshold value.
It should be noted that the first preset threshold and the second preset threshold may be the same or different.
And S106, if the second preset condition is met, starting the path current of the master equipment into the slave equipment.
And S107, if the second preset condition is determined not to be met, setting the path current of the master device entering the slave device to be less than or equal to a preset current threshold.
Specifically, for example, the initial remaining capacity of the master device is 60%, the remaining capacity of the slave device is 50%, and 60% is greater than 50%, the slave device turns on the pass current of the master device into the slave device, that is, turns on the charging mode.
If it is determined that the initial remaining power of the master device is less than the initial remaining power of the slave device, for example, the initial remaining power of the master device is 40% and the remaining power of the slave device is 50%, the path current of the master device entering the slave device is set to be less than or equal to a preset current threshold, for example, the preset current threshold is 50mA, the path current of the master device entering the slave device is set to be less than 50mA, and if the preset current threshold is 0, the path current of the master device entering the slave device is set to be 0, that is, the path current of the master device entering the slave device is turned off. Therefore, the situation that the slave equipment needs to be charged when the electric quantity of the main equipment is insufficient can be avoided, and the electric quantity of the main equipment is ensured.
In this embodiment, when the two devices are connected, the remaining power of the two devices is determined, and whether to start the access current of the master device to the slave device is determined, so that the situation that the slave device needs to be charged when the power of the master device is insufficient can be avoided, and the power consumption of the master device is ensured.
According to the charging method provided by the embodiment, after the slave device is connected with the master device through the connecting line, the current residual capacity of the master device and the current residual capacity of the slave device are obtained at preset time intervals, when it is determined that the current residual capacity of the master device and the current residual capacity of the slave device meet a first preset condition, the path current of the master device entering the slave device is set to be smaller than or equal to a preset current threshold, when the preset current threshold is 0, the path current of the master device entering the slave device is closed, the residual capacity is the percentage of the residual battery capacity to the total battery capacity, so that the residual capacity of the master device is not smaller than the residual capacity of the slave device, the capacities of the master device and the slave device are kept balanced, and the use capacity of the master device is guaranteed.
The following describes the technical solution of the embodiment of the method shown in fig. 2 in detail by using a specific embodiment.
Fig. 3 is a flowchart of an embodiment of a charging method provided in the present application, where an execution main body in the embodiment may be the slave device shown in fig. 1, and the slave device is connected to the master device through a connection line, as shown in fig. 3, the method of the present embodiment may include:
s201, acquiring initial residual capacity of the master device and initial residual capacity of the slave device, wherein the residual capacity is the percentage of the residual battery capacity to the total battery capacity.
S202, judging whether the difference value between the initial residual capacity of the master device and the initial residual capacity of the slave device is larger than or equal to a preset threshold value.
If so, S204 is executed, otherwise, S203 is executed.
In this embodiment, it is described as an example that whether the difference between the initial remaining capacity of the master device and the initial remaining capacity of the slave device is greater than or equal to the preset threshold is determined, and in S202, it may also be determined whether the initial remaining capacity of the master device is greater than or equal to the initial remaining capacity of the slave device.
Specifically, for example, if the initial remaining power of the master device is 60%, the remaining power of the slave device is 50%, the preset threshold is 5%, and the difference between the two is 10%, the step S204 is executed to turn on the path current of the master device into the slave device.
S203, setting the path current of the master device entering the slave device to be less than or equal to a preset current threshold value.
And S204, starting the path current of the master device entering the slave device.
And S205, acquiring the current residual capacity of the master equipment and the current residual capacity of the slave equipment at preset time intervals.
And S206, judging whether the difference value between the current residual capacity of the master equipment and the current residual capacity of the slave equipment is larger than or equal to a preset threshold value.
If yes, the process continues to step S205, otherwise, the process proceeds to step S203.
In this embodiment, it is described as an example that whether the difference between the current remaining capacity of the master device and the current remaining capacity of the slave device is greater than or equal to the preset threshold is determined, and in S202, it may also be determined whether the current remaining capacity of the master device is greater than or equal to the current remaining capacity of the slave device.
The method of the embodiment can ensure that the residual electric quantity of the master device is not less than the residual electric quantity of the slave device, ensure that the electric quantities of the master device and the slave device are kept balanced, and ensure the use electric quantity of the master device. It does not happen that the power of the master device is not enough to be used and the slave device is charged.
It should be noted that the method of this embodiment may also be used in a master device, fig. 4 is a flowchart of an embodiment of a charging method provided in this application, an execution subject in this embodiment may be the master device shown in fig. 4, and the master device is connected to a slave device through a connection line, as shown in fig. 4, the method of this embodiment may include:
s301, acquiring the current residual capacity of the master device and the current residual capacity of the slave device at preset time intervals.
The obtaining of the current remaining power of the slave device may be receiving the current remaining power of the slave device sent by the connection established by the slave device through the connection line. The connection line connecting the slave device and the master device may be a USB connection line. The master device obtains its current remaining power, which may be reading its current remaining power. In the embodiment of the present application, the remaining battery capacity is a percentage of the remaining battery capacity to the total battery capacity, such as 50%, 80%, and so on.
S302, whether the current residual capacity of the master device and the current residual capacity of the slave device meet a first preset condition is determined.
The first preset condition may be: the current remaining capacity of the master device is less than the current remaining capacity of the slave device. For example, the current remaining capacity of the master device is 40%, the current remaining capacity of the slave device is 50%, and the current remaining capacity of the master device is smaller than the current remaining capacity of the slave device.
The first preset condition may also be: the difference value between the current residual capacity of the master device and the current residual capacity of the slave device is smaller than a first preset threshold value. For example, the first preset threshold is 5%, that is, the difference between the current remaining power of the master device and the current remaining power of the slave device is less than 5%. This avoids frequent activation of the turn-off or turn-on of the pass current from the master device to the slave device, for example, once charging has begun, the turn-off of the pass current from the master device to the slave device (i.e., stopping charging) may occur after the master device has less than 3% of the slave device charge.
Specifically, after the slave device is connected to the master device, the master device starts to charge the slave device, and acquires the current remaining power of the master device and the current remaining power of the slave device every preset time, for example, every preset time is 10S or 1 minute, determines the current remaining power of the master device and the current remaining power of the slave device, determines whether to continue charging, and if it is determined that the current remaining power of the master device and the current remaining power of the slave device satisfy the first preset condition, S303 is executed.
And S303, if the first preset condition is met, setting the path current flowing into the slave equipment from the master equipment to be less than or equal to a preset current threshold.
Specifically, for example, the preset current threshold is 50mA, the path current flowing into the slave device from the master device is set to be less than 50mA, and if the preset current threshold is 0, the path current flowing into the slave device from the master device is set to be 0, that is, the path current flowing into the slave device from the master device is turned off. Therefore, the situation that the slave equipment needs to be charged when the electric quantity of the main equipment is insufficient can be avoided, and the electric quantity of the main equipment is ensured.
Optionally, before S301, the method of this embodiment may further include:
s304, acquiring the initial residual capacity of the master device and the initial residual capacity of the slave device.
Specifically, after the slave device is connected to the master device, before the master device starts charging the slave device, the initial remaining capacity of the master device and the initial remaining capacity of the slave device are obtained, where obtaining the initial remaining capacity of the slave device may be receiving the initial remaining capacity of the slave device sent by the connection established by the slave device through the connection line. That is, after the slave device determines to connect to the master device, the initial remaining power of the slave device itself is read and then transmitted to the master device. The master device obtains its initial remaining power, which may be reading its initial remaining power. In the embodiment of the present application, the remaining battery capacity is a percentage of the remaining battery capacity to the total battery capacity, such as 50%, 80%, and so on.
S305, determining whether the initial residual capacity of the master device and the initial residual capacity of the slave device meet a second preset condition.
Wherein, the second preset condition may be: the initial remaining capacity of the master device is greater than or equal to the initial remaining capacity of the slave device.
The second preset condition may also be: the difference value between the initial residual capacity of the master device and the initial residual capacity of the slave device is greater than or equal to a second preset threshold value.
It should be noted that the first preset threshold and the second preset threshold may be the same or different.
And S306, if the second preset condition is met, starting the path current of the master device flowing into the slave device.
And S307, if the second preset condition is determined not to be met, setting the path current flowing into the slave equipment from the master equipment to be less than or equal to a preset current threshold.
Specifically, for example, the initial remaining capacity of the master device is 60%, the remaining capacity of the slave device is 50%, and 60% is greater than 50%, the master device turns on the pass current flowing from the master device to the slave device, that is, turns on the charging mode.
If it is determined that the initial remaining power of the master device is less than the initial remaining power of the slave device, for example, the initial remaining power of the master device is 40% and the remaining power of the slave device is 50%, the path current flowing into the slave device from the master device is set to be less than or equal to a preset current threshold, for example, the preset current threshold is 50mA, the path current flowing into the slave device from the master device is set to be less than 50mA, and if the preset current threshold is 0, the path current flowing into the slave device from the master device is set to be 0, that is, the path current flowing into the slave device from the master device is turned off. Therefore, the situation that the slave equipment needs to be charged when the electric quantity of the main equipment is insufficient can be avoided, and the electric quantity of the main equipment is ensured.
In this embodiment, when the two devices are connected, the remaining power of the two devices is determined, and whether to start the path current flowing from the master device to the slave device is determined, so that the situation that the slave device needs to be charged when the power of the master device is insufficient can be avoided, and the power consumption of the master device is ensured.
According to the charging method provided by the embodiment, after the master device is connected with the master device through the connecting line, the current residual capacity of the master device and the current residual capacity of the slave device are obtained at preset time intervals, when it is determined that the current residual capacity of the master device and the current residual capacity of the slave device meet a first preset condition, the path current flowing into the slave device from the master device is set to be smaller than or equal to a preset current threshold, when the preset current threshold is 0, the path current flowing into the slave device from the master device is closed, and the residual capacity in the embodiment is the percentage of the residual battery capacity to the total battery capacity, so that the residual capacity of the master device is not smaller than the residual capacity of the slave device, the capacities of the master device and the slave device are guaranteed to be balanced, and the use capacity of the master.
Fig. 5 is a schematic structural diagram of an embodiment of a charging device provided in the present application, and as shown in fig. 5, the charging device of the present embodiment may include: an acquisition module 11, a determination module 12 and a processing module 13, wherein,
the obtaining module 11 is configured to obtain a current remaining power of the master device and a current remaining power of the slave device every preset time, where the remaining power is a percentage of a remaining battery power to a total battery power;
the determining module 12 is configured to determine whether the current remaining power of the master device and the current remaining power of the slave device meet a first preset condition;
the processing module 13 is configured to set a path current of the master device entering the slave device to be less than or equal to a preset current threshold when the determining module determines that the first preset condition is met.
Optionally, the first preset condition is:
the current residual capacity of the master device is smaller than the current residual capacity of the slave device; alternatively, the first and second electrodes may be,
and the difference value between the current residual capacity of the master equipment and the current residual capacity of the slave equipment is smaller than a first preset threshold value.
Optionally, the obtaining module 11 is further configured to: acquiring initial residual capacity of the master device and initial residual capacity of the slave device;
the determination module 12 is further configured to: determining whether the initial residual capacity of the master device and the initial residual capacity of the slave device meet a second preset condition;
the processing module 13 is further configured to: when the determining module 12 determines that the second preset condition is met, the path current of the master device into the slave device is turned on.
Optionally, the processing module 13 is further configured to: if it is determined that the second preset condition is not satisfied at the determining module 12, the path current of the master device entering the slave device is set to be less than or equal to the preset current threshold.
Optionally, the second preset condition is:
the initial residual capacity of the master device is greater than or equal to the initial residual capacity of the slave device; alternatively, the first and second electrodes may be,
the difference value between the initial residual capacity of the master device and the initial residual capacity of the slave device is greater than or equal to a second preset threshold value.
Optionally, the obtaining module 11 is configured to: and receiving the current residual electric quantity of the main equipment, which is sent by the connection established by the main equipment through the connecting line.
Optionally, the connection line is a Universal Serial Bus (USB) connection line.
The charging device provided in this embodiment can be used to perform the charging method shown in fig. 2, and its implementation manner and technical effects are similar, and are not described herein again.
Fig. 6 is a schematic structural diagram of an embodiment of a charging device provided in the present application, and as shown in fig. 6, the charging device of the present embodiment may include: an acquisition module 21, a determination module 22 and a processing module 23, wherein,
the obtaining module 21 is configured to obtain a current remaining power of the master device and a current remaining power of the slave device every preset time, where the remaining power is a percentage of a remaining battery power to a total battery power;
the determining module 22 is configured to determine whether the current remaining power of the master device and the current remaining power of the slave device satisfy a first preset condition;
the processing module 23 is configured to set a path current flowing into the slave device from the master device to be less than or equal to a preset current threshold when the determining module determines that the first preset condition is met.
Optionally, the first preset condition is:
the current residual capacity of the master device is smaller than the current residual capacity of the slave device; alternatively, the first and second electrodes may be,
and the difference value between the current residual capacity of the master equipment and the current residual capacity of the slave equipment is smaller than a first preset threshold value.
Optionally, the obtaining module 21 is further configured to: acquiring initial residual capacity of the master device and initial residual capacity of the slave device;
the determination module 22 is further configured to: determining whether the initial residual capacity of the master device and the initial residual capacity of the slave device meet a second preset condition;
the processing module 23 is further configured to: and when the determining module determines that the second preset condition is met, starting the path current flowing into the slave equipment by the master equipment.
Optionally, the processing module 23 is further configured to: if it is determined by the determining module 22 that the second preset condition is not satisfied, the path current flowing into the slave device from the master device is set to be less than or equal to the preset current threshold.
Optionally, the second preset condition is:
the initial residual capacity of the master device is greater than or equal to the initial residual capacity of the slave device; alternatively, the first and second electrodes may be,
the difference value between the initial residual capacity of the master device and the initial residual capacity of the slave device is greater than or equal to a second preset threshold value.
Optionally, the obtaining module 21 is configured to: and receiving the current residual capacity of the slave equipment, which is sent by the slave equipment through the connection established by the connecting line.
Optionally, the connection line is a Universal Serial Bus (USB) connection line.
The charging device provided in this embodiment can be used to perform the charging method shown in fig. 4, and its implementation manner and technical effects are similar, which are not described herein again.
Fig. 7 is a schematic diagram of a hardware structure of an electronic device provided in the present application. As shown in fig. 7, the electronic device 30 is configured to implement the operation corresponding to the slave device or the master device in any of the method embodiments described above, where the electronic device 30 of this embodiment may include: a memory 31 and a processor 32;
a memory 31 for storing a computer program;
a processor 32 for executing the computer program stored in the memory to implement the charging method in the above-described embodiments. Reference may be made in particular to the description relating to the method embodiments described above.
Alternatively, the memory 31 may be separate or integrated with the processor 32.
When the memory 31 is a device separate from the processor 32, the electronic device 30 may further include:
a bus 33 for connecting the memory 31 and the processor 32.
Optionally, this embodiment further includes: a communication interface 34, the communication interface 34 being connectable to the processor 32 via a bus 33. The processor 32 may control the communication interface 33 to implement the above-described receiving and transmitting functions of the electronic device 30.
The electronic device provided in this embodiment can be used to execute the charging method, and its implementation manner and technical effect are similar, which are not described herein again.
The present application also provides a computer-readable storage medium including a computer program for implementing the charging method as in the above embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the division of modules is only one logical division, and other divisions may be realized in practice, for example, a plurality of modules may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or modules, and may be in an electrical, mechanical or other form.
Modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present application may be integrated into one processing unit, or each module may exist alone physically, or two or more modules are integrated into one unit. The unit formed by the modules can be realized in a hardware form, and can also be realized in a form of hardware and a software functional unit.
The integrated module implemented in the form of a software functional module may be stored in a computer-readable storage medium. The software functional module is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute some steps of the methods according to the embodiments of the present application.
It should be understood that the Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the present invention may be embodied directly in a hardware processor, or in a combination of the hardware and software modules within the processor.
The memory may comprise a high-speed RAM memory, and may further comprise a non-volatile storage NVM, such as at least one disk memory, and may also be a usb disk, a removable hard disk, a read-only memory, a magnetic or optical disk, etc.
The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, the buses in the figures of the present application are not limited to only one bus or one type of bus.
The computer-readable storage medium may be implemented by any type or combination of volatile or non-volatile memory devices, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present application.

Claims (10)

1. A charging method for use in a slave device connected to a master device via a connection line, the method comprising:
acquiring the current residual capacity of the master equipment and the current residual capacity of the slave equipment at preset time intervals, wherein the residual capacity is the percentage of the residual battery capacity to the total battery capacity;
determining whether the current residual capacity of the master device and the current residual capacity of the slave device meet a first preset condition;
and if the first preset condition is determined to be met, setting the path current of the master equipment entering the slave equipment to be less than or equal to a preset current threshold.
2. The method according to claim 1, wherein the first preset condition is:
the current residual capacity of the master device is smaller than the current residual capacity of the slave device; alternatively, the first and second electrodes may be,
and the difference value between the current residual capacity of the master equipment and the current residual capacity of the slave equipment is smaller than a first preset threshold value.
3. The method according to claim 1 or 2, characterized in that the method further comprises:
acquiring initial residual capacity of the master device and initial residual capacity of the slave device;
determining whether the initial residual capacity of the master device and the initial residual capacity of the slave device meet a second preset condition;
and if the second preset condition is determined to be met, starting the path current of the master equipment into the slave equipment.
4. The method of claim 3, further comprising:
and if the second preset condition is determined not to be met, setting the path current of the master equipment entering the slave equipment to be less than or equal to the preset current threshold.
5. The method according to claim 3, characterized in that the second preset condition is:
the initial residual capacity of the master device is greater than or equal to the initial residual capacity of the slave device; alternatively, the first and second electrodes may be,
the difference value between the initial residual capacity of the master device and the initial residual capacity of the slave device is greater than or equal to a second preset threshold value.
6. The method of claim 1, wherein obtaining the current remaining power of the master device comprises:
and receiving the current residual electric quantity of the main equipment, which is sent by the connection established by the main equipment through the connecting line.
7. The method of claim 1, wherein the connection line is a Universal Serial Bus (USB) connection line.
8. A charging method for use in a master device, the master device being connected to a slave device via a connection line, the method comprising:
acquiring the current residual capacity of the master equipment and the current residual capacity of the slave equipment at preset time intervals, wherein the residual capacity is the percentage of the residual battery capacity to the total battery capacity;
determining whether the current residual capacity of the master device and the current residual capacity of the slave device meet a first preset condition;
and if the first preset condition is determined to be met, setting the path current flowing into the slave equipment from the master equipment to be less than or equal to a preset current threshold.
9. The method according to claim 8, wherein the first preset condition is:
the current residual capacity of the master device is smaller than the current residual capacity of the slave device; alternatively, the first and second electrodes may be,
and the difference value between the current residual capacity of the master equipment and the current residual capacity of the slave equipment is smaller than a first preset threshold value.
10. An electronic device, comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the charging method of any of claims 1-7 or 8-9 via execution of the executable instructions.
CN201911418486.XA 2019-12-31 2019-12-31 Charging method and device Pending CN113131022A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911418486.XA CN113131022A (en) 2019-12-31 2019-12-31 Charging method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911418486.XA CN113131022A (en) 2019-12-31 2019-12-31 Charging method and device

Publications (1)

Publication Number Publication Date
CN113131022A true CN113131022A (en) 2021-07-16

Family

ID=76769205

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911418486.XA Pending CN113131022A (en) 2019-12-31 2019-12-31 Charging method and device

Country Status (1)

Country Link
CN (1) CN113131022A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105098888A (en) * 2015-07-20 2015-11-25 小米科技有限责任公司 Charging method and device
US20160285287A1 (en) * 2015-03-27 2016-09-29 Samsung Electronics Co., Ltd. Method and apparatus for controlling supply of power to electronic device
CN108539822A (en) * 2018-04-28 2018-09-14 鲍丁玲 A kind of battery protecting method of charger baby, device and its readable storage medium storing program for executing machine terminal equipment
CN109327063A (en) * 2018-12-14 2019-02-12 歌尔科技有限公司 Wireless charging control method, device and storage medium
CN109991554A (en) * 2019-03-29 2019-07-09 深圳猛犸电动科技有限公司 A kind of battery electricity detection method, device and terminal device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160285287A1 (en) * 2015-03-27 2016-09-29 Samsung Electronics Co., Ltd. Method and apparatus for controlling supply of power to electronic device
CN105098888A (en) * 2015-07-20 2015-11-25 小米科技有限责任公司 Charging method and device
CN108539822A (en) * 2018-04-28 2018-09-14 鲍丁玲 A kind of battery protecting method of charger baby, device and its readable storage medium storing program for executing machine terminal equipment
CN109327063A (en) * 2018-12-14 2019-02-12 歌尔科技有限公司 Wireless charging control method, device and storage medium
CN109991554A (en) * 2019-03-29 2019-07-09 深圳猛犸电动科技有限公司 A kind of battery electricity detection method, device and terminal device

Similar Documents

Publication Publication Date Title
CN108777033B (en) Shared charger treasure leasing method based on shared leasing equipment and terminal equipment thereof
CN104951034B (en) Mobile terminal and its USB interface condition control method and device
CN106571657B (en) Terminal, converter, and connection conversion system and method
CN104716709B (en) Electronic equipment and its charging method and battery
US20170279286A1 (en) Power adaptor, terminal and charging system
CN107957906A (en) Application management method, computer installation, the computer-readable recording medium of terminal device
CN109976492B (en) Electronic device, control method thereof, and storage medium
CN110442308B (en) Data block storage method, device, equipment and storage medium
EP2980958A1 (en) Charging control method and electronic device for supporting the same
CN112805987B (en) Startup process control method, startup process control device, terminal equipment and computer readable storage medium
CN108539822B (en) Battery protection method and device for charger and readable storage medium machine terminal equipment thereof
CN103842966A (en) Electronic device
CN112260348A (en) Charging control circuit and charging equipment
CN109766057B (en) Firmware data processing method and system
US11462930B2 (en) Method and device for controlling charging on basis of state of battery
CN107565184B (en) Charging method, device and equipment
CN113131022A (en) Charging method and device
CN116315185A (en) Electronic device and battery management method
CN107370196A (en) Charging device and charging method
CN109117406B (en) PCIE hot plug test method, device, terminal and storage medium
CN108321900A (en) The charge control method and terminal of terminal
CN113991804A (en) Charging protocol handshaking circuit and electronic equipment
CN209282342U (en) A kind of battery system and mobile terminal detecting state in place
CN109343689B (en) Information processing method and device
CN110570225A (en) Virtual cloud desktop use charging method, system, medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20210716

RJ01 Rejection of invention patent application after publication