Power supply method and device, computer equipment and storage medium
By setting up a wireless reverse charge circuit and an OTG circuit in a mobile device, switching the power supply circuit according to the type of external device, the problem that mobile devices such as mobile phones cannot adaptively provide power, and high-power power supply and function expansion for external devices are achieved.
Patent Information
- Application Number
- CN202410172259.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-06
- Publication Date
- 2025-08-08
AI Technical Summary
Mobile devices such as mobile phones cannot adaptively provide greater power to external devices when powering is powered, resulting in limited functional expansion of external devices.
By setting two power supply circuits in the mobile device, namely the wireless reverse charge circuit and the OTG circuit, the power supply circuit is switched according to the type of external device to provide different power supply ranges, ensuring that the high power requirements of external devices are met without affecting the interface function.
It realizes adaptively providing appropriate power supply power according to the type of external device, meets the high power needs of external devices, and improves user experience and device function expansion capabilities.
Smart Images

Figure CN120454286A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of interface power supply technology, and in particular to a power supply method, apparatus, computer equipment, and storage medium. Background Art
[0002] With the widespread use of mobile devices such as mobile phones, the functions of mobile phones themselves are increasingly unable to meet user needs. Therefore, users usually expand the functions of mobile devices based on external devices.
[0003] When external devices are working, they often require the mobile device to provide a higher power supply. In related technologies, mobile phones often only support external power supply at one power level and cannot provide external power supply adaptively. Summary of the Invention
[0004] To overcome the problems existing in the related art, the present disclosure provides a power supply method, apparatus, computer equipment and storage medium.
[0005] A first aspect of the present disclosure provides a power supply method, the method comprising:
[0006] In response to the interface being connected to the connector, obtaining a type of external device corresponding to the connector;
[0007] When the type of the external device corresponding to the connector is a preset type, power is supplied to the external device based on a first circuit; and when the type of the external device corresponding to the connector is not a preset type, power is supplied to the external device based on a second circuit, wherein an upper limit of a power supply power range that can be provided by the first circuit is greater than an upper limit of a power supply power range that can be provided by the second circuit.
[0008] Optionally, when the type of the external device corresponding to the connector is a preset type, supplying power to the external device based on the first circuit includes:
[0009] When the type of the external device corresponding to the connector is a preset type, a prompt message is presented, and when a user instruction indicating to turn on the preset mode based on the prompt message is received, power is supplied to the external device based on the first circuit.
[0010] Optionally, the method further includes:
[0011] In a case where no user instruction to start the preset mode is received, power is supplied to the external device based on the second circuit.
[0012] Optionally, when the type of the external device corresponding to the connector is a preset type, supplying power to the external device based on the first circuit includes:
[0013] When the type of the external device corresponding to the connector is a preset type, a prompt message is presented, and when a user instruction indicating to turn off the preset mode based on the prompt message is received, power is supplied to the external device based on the second circuit.
[0014] Optionally, in response to the interface being connected to the connector, obtaining the type of the external device corresponding to the connector includes:
[0015] In response to the interface being connected to the connector, obtaining a device descriptor of an external device corresponding to the connector;
[0016] The method of supplying power to the external device based on the first circuit when the type of the external device corresponding to the connector is a preset type, and supplying power to the external device based on the second circuit when the type of the external device corresponding to the connector is not a preset type, includes:
[0017] When the device descriptor is a preset device descriptor or a device descriptor recorded in advance based on a user instruction, power is supplied to the external device based on a first circuit; and when the device descriptor portion is a preset device descriptor or a device descriptor recorded in advance based on a user instruction, power is supplied to the external device based on a second circuit.
[0018] Optionally, the first circuit includes a circuit in the device for wirelessly powering an external device.
[0019] Optionally, the first circuit is used to supply power to the external device through a wireless power supply coil, and the second circuit is used to supply power to the external device through the interface.
[0020] Optionally, the method further includes:
[0021] In response to receiving a user instruction to wirelessly power an external device or detecting an external device to be wirelessly powered, power is supplied to the external device based on the second circuit.
[0022] Optionally, the method further includes:
[0023] When the interface is not connected to the connector, power is supplied to the external device based on the second circuit.
[0024] Optionally, the method further includes:
[0025] In response to disconnection between the interface and the connector, power is supplied to the external device based on the second circuit.
[0026] Optionally, the second circuit includes an OTG power supply circuit.
[0027] A second aspect of the present disclosure provides a power supply device, the device comprising:
[0028] an acquisition module, configured to acquire a type of an external device corresponding to the connector in response to the interface being connected to the connector;
[0029] A power supply module is used to supply power to the external device based on a first circuit when the type of the external device corresponding to the connector is a preset type, and to supply power to the external device based on a second circuit when the type of the external device corresponding to the connector is not a preset type, wherein an upper limit of the power supply range that can be provided by the first circuit is greater than an upper limit of the power supply range that can be provided by the second circuit.
[0030] Optionally, when the type of the external device corresponding to the connector is a preset type, the power supply module is used to:
[0031] When the type of the external device corresponding to the connector is a preset type, a prompt message is presented, and when a user instruction indicating to turn on the preset mode based on the prompt message is received, power is supplied to the external device based on the first circuit.
[0032] Optionally, the power supply module is further used to:
[0033] In a case where no user instruction to start the preset mode is received, power is supplied to the external device based on the second circuit.
[0034] Optionally, when the type of the external device corresponding to the connector is a preset type, the power supply module is used to:
[0035] When the type of the external device corresponding to the connector is a preset type, a prompt message is presented, and when a user instruction indicating to turn off the preset mode based on the prompt message is received, power is supplied to the external device based on the second circuit.
[0036] Optionally, when the acquisition module is used to acquire the type of the external device corresponding to the connector in response to the interface being connected to the connector, it is used to:
[0037] In response to the interface being connected to the connector, obtaining a device descriptor of an external device corresponding to the connector;
[0038] The power supply module is configured to supply power to the external device based on a first circuit when the type of the external device corresponding to the connector is a preset type, and to supply power to the external device based on a second circuit when the type of the external device corresponding to the connector is not a preset type, and is configured to:
[0039] When the device descriptor is a preset device descriptor or a device descriptor recorded in advance based on a user instruction, power is supplied to the external device based on a first circuit, and when the device descriptor portion is a preset device descriptor or a device descriptor recorded in advance based on a user instruction, power is supplied to the external device based on a second circuit.
[0040] Optionally, the first circuit includes a circuit in the device for wirelessly powering an external device.
[0041] Optionally, the first circuit is used to supply power to the external device through a wireless power supply coil, and the second circuit is used to supply power to the external device through the interface.
[0042] Optionally, the power supply module is further used to:
[0043] In response to receiving a user instruction to wirelessly power an external device or detecting an external device to be wirelessly powered, power is supplied to the interface based on the second circuit.
[0044] Optionally, the power supply module is further used to:
[0045] When the interface is not connected to the connector, power is supplied to the interface based on the second circuit.
[0046] Optionally, the power supply module is further used to:
[0047] In response to a disconnection between the interface and the connector, power is supplied to the interface based on the second circuit.
[0048] Optionally, the second circuit includes an OTG power supply circuit.
[0049] A third aspect of the present disclosure provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in the first aspect when executing the program.
[0050] A fourth aspect of the present disclosure provides a computer-readable storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method described in the first aspect.
[0051] The technical solutions provided by the embodiments of the present disclosure may have the following beneficial effects:
[0052] In an embodiment of the present disclosure, in response to an interface on the device being connected to a connector, the device obtains the type of external device corresponding to the connector, and when the type of the external device corresponding to the connector is a preset type, the device supplies power to the external device based on a first circuit, and when the type of the external device corresponding to the connector is not a preset type, the device supplies power to the external device based on a second circuit. Because the upper limit of the power range that can be provided by the first circuit is greater than the upper limit of the power range that can be provided by the second circuit, this method can utilize different power supply circuits in the device to adaptively provide appropriate power to the external device, thereby achieving power supply to external devices with higher power requirements without affecting the original function of the interface.
[0053] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0055] Figure 1 FIG. 1 is a background diagram of a power supply method shown in some exemplary embodiments.
[0056] Figure 2 FIG. 4 is a flow chart of a power supply method shown in some exemplary embodiments.
[0057] Figure 3 FIG. 1 is a selection branch diagram of a power supply method shown in some exemplary embodiments.
[0058] Figure 4 is a block diagram of a power supply device showing some exemplary embodiments.
[0059] Figure 5 FIG. 4 is a hardware structure diagram of a computer device shown in some exemplary embodiments. DETAILED DESCRIPTION
[0060] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all possible embodiments consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
[0061] The terms used in this disclosure are for the purpose of describing specific embodiments only and are not intended to limit the disclosure. As used in this disclosure and the appended claims, the singular forms "a," "an," "the," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
[0062] It should be understood that although the terms first, second, third, etc. may be used in this disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of this disclosure, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining."
[0063] With the widespread use of mobile devices such as mobile phones, the functions of mobile phones themselves are increasingly unable to meet user needs. Therefore, users usually expand the functions of mobile devices based on external devices.
[0064] When external devices are working, they often require the mobile device to provide a higher power supply. In related technologies, mobile phones often only support external power supply at one power level and cannot provide external power supply adaptively.
[0065] In view of this, the present disclosure provides a power supply method, apparatus, computer device, and storage medium. The concepts involved in the present disclosure are explained below.
[0066] A connector (also called a connector) refers to a component used to connect electronic components, circuit boards or cables, such as a USB-C (Universal Serial Bus Type-C) connector, a Micro USB connector (Micro Universal Serial Bus), etc. The connector and its corresponding interface usually have a specific physical shape and pin layout, and can be used to provide or receive electrical energy and transmit data. In actual applications, the interface is usually located on the device, or the connection with the device is achieved through a virtual or physical medium. In the present disclosure, a device may have one or more interfaces, and by reusing the method provided in the present disclosure, a power supply method for multiple interfaces on the same device can be obtained.
[0067] In an exemplary application scenario, see Figure 1Mobile devices (such as mobile phones and tablets) have batteries and two boost circuits: a wireless reverse charging circuit (hereinafter referred to as the wireless reverse charging circuit) and an OTG circuit (hereinafter referred to as the OTG circuit). The wireless reverse charging circuit is typically used to connect a coil that can be used for wireless power supply. After the device identifies the external device to be wirelessly charged, it provides power to the coil, enabling the mobile phone to have a wireless reverse charging function (i.e., the device supplies power to the external device). The OTG circuit is typically used in the OTG (On-The-Go) function and is used to support direct connection and communication between the mobile device and an external device, such as connecting a USB flash drive or an external hard drive via a USB interface. One of the notable features is that the power supply capacity of the wireless reverse charging circuit is higher than that of the OTG circuit, that is, the wireless reverse charging circuit supports higher-power stable power supply compared to the OTG circuit.
[0068] Next, the embodiments of the present disclosure are described in detail.
[0069] The first aspect of the present disclosure provides a power supply method. Figure 2 , which includes the following steps.
[0070] Step S201 : in response to an interface being connected to a connector, obtaining a type of an external device corresponding to the connector.
[0071] Among them, the type of external device corresponding to the connector can be a device descriptor obtained based on the protocol between the device and the connector (such as the Universal Serial Bus USB protocol), such as USB Mass Storage (USB mass storage device), USB CD-ROM (USB optical drive), USB Audio (USB audio device), etc., or it can be a data field that can be used to characterize the device type based on data interaction between the device and the external device or user instructions.
[0072] Step S202: When the type of the external device corresponding to the connector is a preset type, power is supplied to the external device based on the first circuit; and when the type of the external device corresponding to the connector is not a preset type, power is supplied to the external device based on the second circuit, wherein the upper limit of the power supply range that can be provided by the first circuit is greater than the upper limit of the power supply range that can be provided by the second circuit.
[0073] Among them, the preset type can be recorded based on user instructions (i.e., user-defined) or it can be the default of the device. The upper limit of the power supply range that the circuit can provide is the maximum power in the power supply protocol supported by the circuit, or the maximum reliable power (continuous power) that the circuit can provide. Regarding powering the external device, illustratively, powering the external device can be achieved by supplying power to the interface inserted into the connector. Another illustrative example is that powering the wireless power supply coil configured in the device (the coil corresponds to the coil of the external device, that is, its electrical energy can be received by the coil of the external device) to achieve power supply to the external device.
[0074] It is worth noting that the relationship between the first circuit and the second circuit is not limited to the size of power, it can also be extended to the size of dimensions such as voltage and current. For example, although some external devices do not put forward requirements for power, they put forward requirements for supply voltage. At this time, the external device can also be powered by a power supply circuit inside the device that supports a higher voltage (for example, in the above-mentioned exemplary application scenario, the external device can be powered based on a wireless reverse charging circuit rather than an OTG circuit).
[0075] In an embodiment of the present disclosure, in response to an interface on the device being connected to a connector, the device obtains the type of external device corresponding to the connector, and when the type of the external device corresponding to the connector is a preset type, the device supplies power to the external device based on a first circuit, and when the type of the external device corresponding to the connector is not a preset type, the device supplies power to the external device based on a second circuit. Because the upper limit of the power range that can be provided by the first circuit is greater than the upper limit of the power range that can be provided by the second circuit, this method can utilize different power supply circuits in the device to adaptively provide appropriate power to the external device, thereby achieving power supply to external devices with higher power requirements without affecting the original function of the interface.
[0076] In some embodiments of the present disclosure, when the type of the external device corresponding to the connector is a preset type, supplying power to the external device based on the first circuit includes:
[0077] When the type of the external device corresponding to the connector is a preset type, a prompt message is presented, and when a user instruction indicating to turn on the preset mode based on the prompt message is received, power is supplied to the external device based on the first circuit.
[0078] In addition, the method may further include:
[0079] In a case where no user instruction to start the preset mode is received, power is supplied to the external device based on the second circuit.
[0080] In other words, when the device detects that the type of the external device corresponding to the connector is a preset type, it can default to supply power to the external device based on the second circuit, and present a prompt message to the user, and the prompt message can be used to prompt the user whether to turn on the preset mode. In actual applications, since when an external device is connected to a device, there will usually be higher power supply requirements in scenarios such as data transmission and peripheral debugging, preferably, the preset mode can be "data transmission mode", "peripheral debugging mode", etc. Its advantage is that the power supply scheme of the device to the external device is subdivided, and the outward power supply mode of the device is flexibly adjusted according to user instructions, so that the power supply strategy of the device to the external device can be more in line with the actual power supply requirements of the external device corresponding to the connector. In addition, by introducing the concept of preset mode, the method implements the professional power supply strategy into a specific scenario mode, which helps users complete the conversion of power supply strategy through a friendly human-computer interaction process without understanding the specific power supply strategy, thereby improving the user experience.
[0081] In some embodiments of the present disclosure, when the type of the external device corresponding to the connector is a preset type, supplying power to the external device based on the first circuit includes:
[0082] When the type of the external device corresponding to the connector is a preset type, a prompt message is presented, and when a user instruction indicating to turn off the preset mode based on the prompt message is received, power is supplied to the external device based on the second circuit.
[0083] In other words, when the device detects that the type of external device corresponding to the connector is a preset type, it can default to supply power to the external device based on the first circuit and present a prompt message to the user. The prompt message can be used to prompt the user whether to turn on the preset mode. If the user wishes to turn off the preset mode (for example, the user believes that the device battery is too low and wishes to save power), the external device is supplied with power based on the second circuit, further making the device's power supply strategy for the external device fit the user's needs and improving the user experience. For other advantages and specific details of this embodiment, please refer to the corresponding parts of the aforementioned embodiment, which will not be repeated here.
[0084] In some embodiments of the present disclosure, in response to the interface being connected to the connector, obtaining the type of the external device corresponding to the connector includes:
[0085] In response to the interface being connected to the connector, obtaining a device descriptor of an external device corresponding to the connector;
[0086] The method of supplying power to the external device based on the first circuit when the type of the external device corresponding to the connector is a preset type, and supplying power to the external device based on the second circuit when the type of the external device corresponding to the connector is not a preset type, includes:
[0087] When the device descriptor is a preset device descriptor or a device descriptor recorded in advance based on a user instruction, power is supplied to the external device based on a first circuit, and when the device descriptor portion is a preset device descriptor or a device descriptor recorded in advance based on a user instruction, power is supplied to the external device based on a second circuit.
[0088] The device descriptor can be a device descriptor obtained based on a communication protocol such as the Universal Serial Bus (USB) or Thunderbolt protocol, such as the aforementioned USB Mass Storage and USB CD-ROM. Based on this, the aforementioned beneficial effects can be achieved without modifying the device's handshake logic or existing protocols, which is low-cost and highly universal.
[0089] In some embodiments of the present disclosure, the method further includes supplying power to the interface based on the second circuit when the interface is not connected to the connector.
[0090] Additionally, the method may further include supplying power to the interface based on the second circuit in response to a disconnection between the interface and the connector.
[0091] Since external devices such as flash drives and optical drives typically require a mobile phone, tablet, or other device to actively send a detection signal or provide power before they can properly shake hands and begin operating, the second circuit can be used to supply power to the interface in response to the interface being disconnected from the connector, or when the interface is not connected to the connector. This ensures that the device can achieve real-time detection of external devices (connectors) while consuming relatively little power, and ensures that external devices inserted by users can be detected promptly.
[0092] In some embodiments of the present disclosure, the first circuit includes a circuit in a device for wirelessly powering an external device, and the second circuit includes an OTG power supply circuit.
[0093] Corresponding to Figure 1In the embodiment shown, preferably, the first circuit can be a wireless reverse charging circuit, and the second circuit can be an OTG circuit. Based on this, when the device has a wireless reverse charging function, the boost circuit for wireless reverse charging in the device can be directly used as the first circuit, and when the device has an OTG function, the circuit for OTG power supply in the device can be directly used as the second circuit, thereby maximizing the utilization of the device hardware and significantly reducing the implementation cost of the method, which has extremely high practical value.
[0094] Preferably, when the device receives a user instruction instructing wireless power supply to an external device or detects an external device to be wirelessly powered (for example, a weak voltage for handshake can be provided to the coil, or the voltage emitted by the external device can be passively identified to detect the external device to be wirelessly powered), the interface can be powered based on the second circuit, thereby further realizing the combination of the above-mentioned embodiment and the wireless reverse charging function (that is, the wireless reverse charging circuit can be applied to the wireless reverse charging function, and the OTG circuit can be applied to power the interface. At this time, the external device can receive electrical energy through a connector connected to the interface), thereby realizing the switching of different power supply capabilities of the device at the interface without affecting the wireless reverse charging function of the device, and realizing the multiplexing of the device hardware functions.
[0095] In some embodiments of the present disclosure, the first circuit is used to supply power to the external device through a wireless power supply coil, and the second circuit is used to supply power to the external device through the interface.
[0096] In other words, this method can realize the insertion detection of external devices (i.e., determine whether there is an external device that needs power) and the identification of the type of external device based on the connector, and determine whether to power the external device based on the interface or based on the wireless charging coil according to the specific type of the device.
[0097] Take a camera handle as an example. This handle can be adapted to a mobile phone and simulate the operation mode of a professional camera (for example, adjusting the focus by turning a knob, taking a photo by pressing a mechanical button), but its power consumption is relatively high. In this case, the camera handle (external device) can be attached to the mobile phone, and its connector (for example, a USB Type-C connector) can be connected to the interface of the mobile phone (device), so that the mobile phone can determine the device type of the camera handle in response to the insertion of the camera handle. When it is determined that the camera handle is a device of a preset type (for example, the user has previously registered the camera handle on the mobile phone, or the mobile phone is configured with a default protocol), the camera handle is powered by the wireless charging coil inside the device (the camera handle is also configured with a corresponding receiving coil). When an external device like the camera handle mentioned above is connected to a mobile phone or other device, it often blocks the original power supply position of the wireless power supply coil to a certain extent, making the original wireless power supply function difficult to use (or considering safety factors, it is not recommended for users to use the wireless power supply function to other devices at this time). At this time, the wireless power supply coil is actually in an idle state, and its power supply capacity is stronger than the power supply capacity of OTG power supply; at the same time, these external devices often have data transmission requirements with mobile phones and other devices. Device type identification is performed based on the interface, and after identifying a specific type of device, power is supplied to the specific type of device based on the wireless power supply coil. This can maximize the power supply capacity of the mobile phone and realize high-power external power supply and data transmission functions (for example, based on the interface).
[0098] It is worth noting that the present disclosure does not limit the wireless power supply circuit to only being used to supply power to external devices through the coil. It can also be connected to an interface and supply power to the external device through the interface. Its specific power supply strategy can be determined based on actual conditions and preset protocols. Specifically, the following strategies can be adopted:
[0099] When the type of the external device corresponding to the connector is a first preset type, supplying power to the external device based on the first circuit includes:
[0100] When the type of the external device corresponding to the connector is a first type, powering the external device based on the first circuit and through a coil configured by the device executing the method;
[0101] When the type of the external device corresponding to the connector is the second type, power is supplied to the external device through the interface based on the first circuit;
[0102] When the type of the external device corresponding to the connector is not a preset type, supplying power to the external device based on the second circuit includes:
[0103] When the type of the external device corresponding to the connector is neither the first type nor the second type, power is supplied to the external device through the interface based on the second circuit.
[0104] Based on this, it is possible to flexibly match the two boost circuits, the wireless reverse charging circuit and the OTG circuit, and the two external output methods, the coil and the interface, to maximize the matching of the device's power supply capacity and the power demand of the external device. This method does not require adding more boost circuits to the device, and achieves low cost.
[0105] Next, based on Figure 3 The selection branch diagram shown, combined with Figure 1 The exemplary technical background shown and the example of an external device receiving power from the device through an interface are used to further illustrate at least one of the above embodiments.
[0106] First, the interface can be powered based on the OTG circuit (not based on the wireless reverse charging circuit), and connector insertion detection can be performed.
[0107] After detecting that an external device (connector) is plugged in, it can be determined whether the device identifier meets a preset condition (ie, whether it is predefined or recorded).
[0108] If the device identifier of the connector meets the preset conditions, the interface can be powered based on the OTG circuit first, and the data transmission switch can be displayed on the device (such as a mobile phone) interface (i.e., reminding the user whether to enter the data transmission mode).
[0109] If the user clicks the switch (ie, issues a user instruction to start the preset mode), the OTG circuit can be turned off, and the interface power supply is switched to the wireless reverse charging circuit.
[0110] Furthermore, it can detect whether the external device is unplugged and whether the external device is turned off; when the external device is not unplugged and not turned off, the mobile phone (device) and the mobile phone accessories (external device) can communicate normally; if the external device is unplugged or turned off, the power supply to the interface based on the wireless reverse charging circuit can be stopped, and the power supply to the interface based on the OTG circuit can be stopped.
[0111] The specific details of the above process and related beneficial effects can be found in the aforementioned embodiments and will not be repeated here.
[0112] Corresponding to the aforementioned method embodiments, the present disclosure also provides embodiments of a device and a terminal to which the device is applied.
[0113] The second aspect of the present disclosure provides a power supply device, see Figure 4 , the device comprises:
[0114] An acquisition module 401 is configured to acquire a type of an external device corresponding to a connector in response to an interface being connected to the connector;
[0115] The power supply module 402 is used to supply power to the external device based on a first circuit when the type of the external device corresponding to the connector is a preset type, and to supply power to the external device based on a second circuit when the type of the external device corresponding to the connector is not a preset type, wherein the upper limit of the power supply range that can be provided by the first circuit is greater than the upper limit of the power supply range that can be provided by the second circuit.
[0116] Optionally, the power supply module 402 is configured to, when the type of the external device corresponding to the connector is a preset type, supply power to the external device based on the first circuit, to:
[0117] When the type of the external device corresponding to the connector is a preset type, a prompt message is presented, and when a user instruction indicating to turn on the preset mode based on the prompt message is received, power is supplied to the external device based on the first circuit.
[0118] Optionally, the power supply module 402 is further configured to:
[0119] In a case where no user instruction to start the preset mode is received, power is supplied to the external device based on the second circuit.
[0120] Optionally, the power supply module 402 is configured to, when the type of the external device corresponding to the connector is a preset type, supply power to the external device based on the first circuit, to:
[0121] When the type of the external device corresponding to the connector is a preset type, a prompt message is presented, and when a user instruction indicating to turn off the preset mode based on the prompt message is received, power is supplied to the external device based on the second circuit.
[0122] Optionally, when the acquisition module 401 is configured to acquire the type of the external device corresponding to the connector in response to the interface being connected to the connector, it is configured to:
[0123] In response to the interface being connected to the connector, obtaining a device descriptor of an external device corresponding to the connector;
[0124] The power supply module 402 is configured to supply power to the external device based on the first circuit when the type of the external device corresponding to the connector is a preset type, and to supply power to the external device based on the second circuit when the type of the external device corresponding to the connector is not a preset type, and is configured to:
[0125] When the device descriptor is a preset device descriptor or a device descriptor recorded in advance based on a user instruction, power is supplied to the external device based on a first circuit, and when the device descriptor portion is a preset device descriptor or a device descriptor recorded in advance based on a user instruction, power is supplied to the external device based on a second circuit.
[0126] Optionally, the first circuit includes a circuit in the device for wirelessly powering an external device.
[0127] Optionally, the first circuit is used to supply power to the external device through a wireless power supply coil, and the second circuit is used to supply power to the external device through the interface.
[0128] Optionally, the power supply module 402 is further configured to:
[0129] In response to receiving a user instruction to wirelessly power an external device or detecting an external device to be wirelessly powered, power is supplied to the interface based on the second circuit.
[0130] Optionally, the power supply module 402 is further configured to:
[0131] When the interface is not connected to the connector, power is supplied to the interface based on the second circuit.
[0132] Optionally, the power supply module 402 is further configured to:
[0133] In response to a disconnection between the interface and the connector, power is supplied to the interface based on the second circuit.
[0134] Optionally, the second circuit includes an OTG power supply circuit.
[0135] The implementation process of the functions and effects of each module in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.
[0136] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to the partial description of the method embodiments. The device embodiments described above are merely illustrative, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the disclosed solution. Those of ordinary skill in the art can understand and implement it without paying any creative work.
[0137] In a third aspect, the embodiment of the power supply device provided by the present disclosure can be applied to computer equipment. Figure 5 , which exemplarily shows a hardware schematic diagram of a computer device. For example, device 500 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0138] Device 500 may include one or more of the following components: a processing component 501 , a memory 502 , a power component 503 , a multimedia component 504 , an audio component 505 , an input / output (I / O) interface 506 , a sensor component 507 , and a communication component 508 .
[0139] The processing component 501 generally controls the overall operation of the device 500, such as operations associated with display, phone calls, data communications, camera operation, and recording operations. The processing component 501 may include one or more processors 509 to execute instructions to perform all or part of the steps of the above-described method. In addition, the processing component 501 may include one or more modules to facilitate interaction between the processing component 501 and other components. For example, the processing component 501 may include a multimedia module to facilitate interaction between the multimedia component 504 and the processing component 501.
[0140] The memory 502 is configured to store various types of data to support operations on the device 500. Examples of such data include instructions for any application or method operating on the device 500, contact data, phone book data, messages, pictures, videos, etc. The memory 502 can be implemented by any type of volatile or non-volatile storage device, or a combination thereof, 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 disk, or optical disk.
[0141] Power component 503 provides power to various components of device 500. Power component 503 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to device 500.
[0142] The multimedia component 504 includes a screen that provides an output interface between the device 500 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, sliding, and gestures on the touch panel. The touch sensor can not only sense the boundaries of the touch or sliding action, but also detect the duration and pressure associated with the touch or sliding operation. In some embodiments, the multimedia component 504 includes a front camera and / or a rear camera. When the device 500 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have a focal length and optical zoom capability.
[0143] The audio component 505 is configured to output and / or input audio signals. For example, the audio component 505 includes a microphone (MIC), which is configured to receive external audio signals when the device 500 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal can be further stored in the memory 502 or transmitted via the communication component 508. In some embodiments, the audio component 505 also includes a speaker for outputting audio signals.
[0144] The I / O interface 506 provides an interface between the processing component 501 and peripheral interface modules, such as a keyboard, a click wheel, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0145] The sensor assembly 507 includes one or more sensors for providing various aspects of status assessment for the device 500. For example, the sensor assembly 507 can detect the open / closed state of the device 500, the relative positioning of components, such as the display and keypad of the device 500. The sensor assembly 507 can also detect changes in the position of the device 500 or a component of the device 500, the presence or absence of user contact with the device 500, the orientation or acceleration / deceleration of the device 500, and temperature changes of the device 500. The sensor assembly 507 can also include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 507 can also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 507 can also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0146] The communication component 508 is configured to facilitate wired or wireless communication between the device 500 and other devices. The device 500 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, 4G or 5G or a combination thereof. In an exemplary embodiment, the communication component 508 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 508 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0147] In an exemplary embodiment, the device 500 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above-mentioned power supply method for a computer device.
[0148] In a fourth aspect, the present disclosure, in an exemplary embodiment, further provides a non-transitory computer-readable storage medium including instructions, such as a memory 502 including instructions. The instructions can be executed by a processor 509 of a device 500 to implement the above-described method for powering a computer device. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, or the like.
[0149] The foregoing description describes specific embodiments of the present disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that described in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or the sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0150] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the inventions claimed herein. This disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art not claimed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the following claims.
[0151] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
[0152] The above description is only a preferred embodiment of the present disclosure and is not intended to limit the present disclosure. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present disclosure should be included in the scope of protection of the present disclosure.
Claims
1. A power supply method, characterized in that: The method comprises: In response to the interface being connected to the connector, obtaining a type of external device corresponding to the connector; When the type of the external device corresponding to the connector is a preset type, power is supplied to the external device based on a first circuit; and when the type of the external device corresponding to the connector is not a preset type, power is supplied to the external device based on a second circuit, wherein an upper limit of a power supply power range that can be provided by the first circuit is greater than an upper limit of a power supply power range that can be provided by the second circuit.
2. The power supply method according to claim 1, wherein: When the type of the external device corresponding to the connector is a preset type, supplying power to the external device based on the first circuit includes: When the type of the external device corresponding to the connector is a preset type, a prompt message is presented, and when a user instruction indicating to turn on the preset mode based on the prompt message is received, power is supplied to the external device based on the first circuit.
3. The power supply method according to claim 2, wherein: The method further comprises: In a case where no user instruction to start the preset mode is received, power is supplied to the external device based on the second circuit.
4. The power supply method according to claim 1, wherein: When the type of the external device corresponding to the connector is a preset type, supplying power to the external device based on the first circuit includes: When the type of the external device corresponding to the connector is a preset type, a prompt message is presented, and when a user instruction indicating to turn off the preset mode based on the prompt message is received, power is supplied to the external device based on the second circuit.
5. The power supply method according to claim 1, wherein: In response to the interface being connected to the connector, obtaining the type of the external device corresponding to the connector includes: In response to the interface being connected to the connector, obtaining a device descriptor of an external device corresponding to the connector; The method of supplying power to the external device based on the first circuit when the type of the external device corresponding to the connector is a preset type, and supplying power to the external device based on the second circuit when the type of the external device corresponding to the connector is not a preset type, includes: When the device descriptor is a preset device descriptor or a device descriptor recorded in advance based on a user instruction, power is supplied to the external device based on a first circuit, and when the device descriptor portion is a preset device descriptor or a device descriptor recorded in advance based on a user instruction, power is supplied to the external device based on a second circuit.
6. The power supply method according to claim 1, wherein: The first circuit includes a circuit in the device for wirelessly powering an external device.
7. The power supply method according to claim 6, characterized in that: The first circuit is used to supply power to the external device through the wireless power supply coil, and the second circuit is used to supply power to the external device through the interface.
8. The power supply method according to claim 6, wherein: The method further comprises: In response to receiving a user instruction to wirelessly power an external device or detecting an external device to be wirelessly powered, power is supplied to the interface based on the second circuit.
9. The power supply method according to claim 1, wherein: The method further comprises: When the interface is not connected to the connector, power is supplied to the interface based on the second circuit.
10. The power supply method according to claim 1, wherein: The method further comprises: In response to disconnection between the interface and the connector, power is supplied to the external device based on the second circuit.
11. The power supply method according to claim 1, wherein: The second circuit includes an OTG power supply circuit.
12. A power supply device, characterized in that: The device comprises: an acquisition module, configured to acquire a type of an external device corresponding to the connector in response to the interface being connected to the connector; A power supply module is used to supply power to the external device based on a first circuit when the type of the external device corresponding to the connector is a preset type, and to supply power to the external device based on a second circuit when the type of the external device corresponding to the connector is not a preset type, wherein an upper limit of the power supply range that can be provided by the first circuit is greater than an upper limit of the power supply range that can be provided by the second circuit.
13. A computer device, characterized in that: The method comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method according to any one of claims 1 to 11 is implemented.
14. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 11 is implemented.