Method and System for Supplying Power to USB Device
Abstract
The present invention relates to the field of terminal technologies, and discloses a method and a system for supplying power to a USB device. The power supplying method includes: when a power supplying state of the host changes, automatically switching a power supplying manner for the USB device; when an electric quantity of the USB device is low, performing comprehensive analysis on power supplying state information of the USB device and the host according to a rule set by a monitoring program, selecting a proper power supplying manner and implementing dynamic switching of the power supplying manner. According to the present invention, the power supplying manner may be dynamically switched in a case that a connection is not broken, which ensures electricity supply to the USB device in a case that endurance of the host itself is ensured.
Claims
exact text as granted — not AI-modifiedWhat is claimed is:
1 . A method for supplying power to a USB device, comprising:
starting, by a USB device, a monitoring progress, collecting power supplying state information of the USB device, starting, by a host, a monitoring progress, and collecting power supplying state information of the host; communicating, by the USB device, with the host through a USB cable, and reporting, by the USB device, the power supplying state information of the USB device to the host; and performing, by the host, analysis processing on the power supplying state information of the USB device and the host, and determining a power supplying manner for the USB device and dynamically switching the power supplying manner as required.
2 . The method for supplying power to a USB device according to claim 1 , wherein a method for performing communication between the USB device and the host comprises:
collecting, by an information collection unit of the USB device, the power supplying state information of the USB device; performing, by a control unit of the USB device, analysis processing on the power supplying state information of the USB device; reporting, by a communication unit of the USB device, the power supplying state information of the USB device to the host under the control of the control unit of the USB device; collecting, by an information collection unit of the host, the power supplying state information of the host; performing, by a control unit of the host, analysis processing on the power supplying state information of the host and the power supplying state information which is of the USB device and is reported by the USB device, and determining whether the host is permitted to supply power to the USB device and control the switching of the power supplying manner for the USB device; and delivering, by a communication unit of the host, an instruction to the USB device under the control of the control unit of the host, and notifying the power supplying manner for the USB device.
3 . The method for supplying power to a USB device according to claim 2 , wherein in a process of communication between the USB device and the host, the collecting, by the information collection unit of the host, the power supplying state information of the host does not necessarily need to be performed after the first three steps in the method according to claim 2 are completed, but may also be performed concurrently with the first three steps.
4 . The method for supplying power to a USB device according to claim 3 , wherein the determining whether the host is permitted to supply power to the USB device comprises:
determining, by the host and according to the power supplying state information of the host, if power is supplied to the host by an external power source, permitting the host to supply power to the USB device; and if not, according to the power supplying state information of the host and the power supplying state information of the USB device, determining whether the host is permitted to supply power to the USB device.
5 . The method for supplying power to a USB device according to claim 4 , wherein when a power supplying state of the host changes, if the power supplying state changes from supplying power by a battery of the host itself to supplying power by the external power source, the host is permitted to supply power to the USB device; and if the power supplying state changes from supplying power by the external power source to supplying power by the battery of the host itself, whether the host is permitted to supply power to the USB device is determined according to the power supplying state information of the host and the power supplying state information of the USB device collectively.
6 . The method for supplying power to a USB device according to claim 4 , wherein a method for determining whether the host is permitted to supply power to the USB device according to the power supplying state information of the host and the power supplying state information of the USB device collectively comprises:
when electricity of a battery of the USB device is enough to ensure its own normal running, supplying, by its own battery, power to the USB device; when the electricity of the battery of the USB device cannot ensure its normal running, requesting the host to supply power, and determining, by the host, an electricity supplying situation of its own battery, if electricity of the battery of the host is enough to ensure normal running of both the host itself and the USB device, supplying, by the host, power to the USB device; and if the electricity of the battery of the host itself is not enough to ensure normal running of the two, popping up a prompt on the host or on the USB device, and selecting, by a user, whether the host supplies power to the USB device.
7 . The method for supplying power to a USB device according to claim 6 , wherein a method for determining whether the electricity of the battery of the USB device and the electricity of the battery of the host are enough to ensure their own normal running comprises:
determining a percentage of a current electric quantity of the battery to a total electric quantity or whether an absolute value of a current electric quantity is higher than a certain threshold value, wherein if yes, the electricity is enough to ensure its own normal running, and if no, the electricity is not enough to ensure its own normal running.
8 . The method for supplying power to a USB device according to claim 7 , wherein a threshold value that determines whether the electricity of the battery of the USB device and the electricity of the battery of the host are enough to ensure their own normal running is set by research and development personnel during research and development of a monitoring program, and may also be autonomously set by the user through a parameter modification interface provided by the program in the monitoring program.
9 . The method for supplying power to a USB device according to claim 8 , wherein a method for dynamically switching the power supplying manner for the USB device comprises:
when the USB device is in a state that power is supplied to the USB device by the host, and if the power supplying manner for the USB device needs to be changed from supplying power to the USB device by the host to supplying power by the battery of the USB device itself, switching the power supplying manner for the USB device from supplying power to the USB device by the host to supplying power by the battery of the USB device itself, and closing a hardware charging circuit through which the host supplies power to the USB device, and then maintaining a state that power is supplied by the battery of the USB device itself, until the power supplying manner for the USB device needs to be changed; and when the USB device is in a state that power is supplied by its own battery, and if the power supplying manner for the USB device needs to be changed from supplying power by its own battery to supplying power to the USB device by the host, switching the power supplying manner for the USB device from supplying power by its own battery to supplying power to the USB device by the host, and opening the hardware charging circuit through which the host supplies power to the USB device, and then maintaining the state that power is supplied to the USB device by the host, until the power supplying manner for the USB device needs to be changed.
10 . A system for supplying power to a USB device, comprising a USB device and a host, wherein each of the USB device and the host comprises an information collection unit, a storage unit, a control unit, a communication unit, and a power supplying unit, the information collection unit is configured to collect power supplying state information, the storage unit is configured to store the power supplying state information and a monitoring program code, the control unit is configured to determine a power supplying manner and control switching of the power supplying manner, the communication unit is configured to perform communication, and the power supplying unit is configured to supply electricity.
11 . The system for supplying power to a USB device according to claim 10 , wherein the USB device and the host are connected through a USB cable, and both ends of the USB cable are connected to the USB device and the host through a USB interface respectively.
12 . The system for supplying power to a USB device according to claim 11 , wherein communication units of the USB device and the host are data sending/receiving pins of the USB interface, and are configured to communicate data between the USB device and the host.
13 . The system for supplying power to a USB device according to claim 12 , wherein the power supplying unit of the USB device is a rechargeable battery or a hardware charging circuit, the rechargeable battery supplies power to the USB device directly, and the host supplies power to the USB device through the hardware charging circuit via a USB cable.
14 . The system for supplying power to a USB device according to claim 13 , wherein the control unit of the USB device is a chip of a processor, and is configured to run a monitoring progress of the USB device; control other four units in the USB device to work cooperatively by issuing an instruction; receive an instruction delivered by the host to complete a task required by the host; and control the switching of the power supplying manner when the power supplying manner needs to be changed.
15 . The system for supplying power to a USB device according to claim 14 , wherein the power supplying unit of the host is a rechargeable battery or an external power source, the rechargeable battery directly supplies power to the host, and the external power source supplies power to the host through an external direct current or alternating current power source.
16 . The system for supplying power to a USB device according to claim 10 , wherein the control unit of the host is a central processing unit, and is configured to run a monitoring progress of the host; control other four units in the host to work cooperatively by issuing an instruction; perform an operating operation on collected power supplying state information of the host and power supplying state information which is of the USB device and is reported by the USB device, determine the power supplying manner for the USB device; and control the switching of the power supplying manner when the power supplying manner needs to be changed.Join the waitlist — get patent alerts
Track US2013254580A1 — get alerts on status changes and closely related new filings.
We store only your email — no account needed. See our privacy policy.