Charging method and device, electronic equipment and storage medium
After detecting and authenticating a device with insufficient power through the data transmission interface, charging based on the charging parameters is solved, and the problem of insufficient power of electronic devices when connected is solved, achieving higher compatibility and safety.
Patent Information
- Application Number
- CN202410190986.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-20
- Publication Date
- 2025-08-22
AI Technical Summary
When an electronic device is connected to other devices, its own power may not be guaranteed, which affects the use of the device and is not very intelligent enough.
The power of the connected device is detected through the data transmission interface and a charging request is sent or received. After identity authentication is performed based on the single-line protocol, it is charged according to the charging parameters.
Improves charging compatibility and safety and reliability between electronic devices, saves energy and enhances intelligence.
Smart Images

Figure CN120528049A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of electronic technology, and in particular to a charging method, device, electronic device, and storage medium. Background Art
[0002] As electronic products become increasingly diverse and used more frequently, their power consumption can quickly increase, necessitating immediate charging. For example, while tablets and laptops can charge other devices while connected, their own power may not be fully maintained, hindering their usability and limiting their intelligence. Summary of the Invention
[0003] To overcome the problems existing in the related art, the present disclosure provides a charging method, device, electronic device, and storage medium.
[0004] According to a first aspect of an embodiment of the present disclosure, there is provided a charging method, applied to a first electronic device including a first connector, the first connector including a first data transmission interface, the method comprising:
[0005] In response to detecting, through the first data transmission interface, that a second electronic device is connected, and the power level of the second electronic device does not meet a preset power level condition, receiving, through the first data transmission interface, a charging request from the second electronic device; wherein the charging request carries charging parameters, and the first data transmission interface is connected to the second data transmission interface of the second electronic device;
[0006] The second electronic device is charged based on the charging parameter.
[0007] In some embodiments, the method further comprises:
[0008] Whether the second electronic device is connected is detected through the first data transmission interface based on the single-wire protocol.
[0009] In some embodiments, in response to detecting, through the first data transmission interface, that a second electronic device is connected and the power level of the second electronic device does not meet a preset power level condition, receiving, through the first data transmission interface, a charging request from the second electronic device, includes:
[0010] In response to detecting that the second electronic device is connected through the first data transmission interface, performing identity authentication with the second electronic device based on the single-wire protocol through the first data transmission interface;
[0011] In response to the identity authentication being passed and the power level of the second electronic device not meeting the preset power level condition, a charging request from the second electronic device is received through the first data transmission interface.
[0012] In some embodiments, detecting whether the second electronic device is connected through the first data transmission interface based on a single-wire protocol includes:
[0013] At preset time intervals, detecting whether the second electronic device is connected is performed through the first data transmission interface based on the single-wire protocol.
[0014] In some embodiments, charging the second electronic device based on the charging parameter includes:
[0015] In response to the first electronic device being connected to an external power supply device, the second electronic device is charged after converting the power supply parameters provided by the external power supply device into the charging parameters.
[0016] In some embodiments, the first connector comprises a pogo pin.
[0017] According to a second aspect of an embodiment of the present disclosure, a charging method is provided, which is applied to a second electronic device including a second connector, where the second connector includes a second data transmission interface. The method includes:
[0018] In response to detecting, through the second data transmission interface, that a first electronic device is connected, and the power level of the second electronic device does not meet a preset power level condition, sending a charging request to the first electronic device through the second data transmission interface; wherein the charging request carries charging parameters, and the second data transmission interface is connected to the first data transmission interface of the first electronic device;
[0019] The device receives power provided by the first electronic device based on the charging parameter.
[0020] In some embodiments, the method further comprises:
[0021] Whether the first electronic device is connected is detected through the second data transmission interface based on a single-wire protocol.
[0022] In some embodiments, in response to detecting that the first electronic device is connected through the second data transmission interface and the power level of the second electronic device does not meet a preset power condition, sending a charging request to the first electronic device through the second data transmission interface includes:
[0023] In response to detecting that the first electronic device is connected through the second data transmission interface, performing identity authentication with the first electronic device based on the single-wire protocol through the second data transmission interface;
[0024] In response to the identity authentication being passed and the power level of the second electronic device not meeting the preset power level condition, a charging request is sent to the first electronic device through the second data transmission interface.
[0025] In some embodiments, detecting whether the first electronic device is connected through the second data transmission interface based on a single-wire protocol includes:
[0026] At preset time intervals, detecting whether the first electronic device is connected is performed through the second data transmission interface based on the single-wire protocol.
[0027] In some embodiments, the method further comprises:
[0028] During the charging process of the second electronic device, monitoring the power level of the second electronic device;
[0029] The charging parameter is determined according to the power amount.
[0030] In some embodiments, the second connector comprises a pogo pin.
[0031] According to a third aspect of an embodiment of the present disclosure, a charging device is provided, which is applied to a first electronic device including a first connector, wherein the first connector includes a first data transmission interface, and the device includes:
[0032] a first receiving module configured to, in response to detecting that a second electronic device is connected via the first data transmission interface and that the power level of the second electronic device does not meet a preset power level condition, receive a charging request from the second electronic device via the first data transmission interface; wherein the charging request carries charging parameters, and the first data transmission interface is connected to a second data transmission interface of the second electronic device;
[0033] A charging module is configured to charge the second electronic device based on the charging parameters.
[0034] In some embodiments, the apparatus further comprises:
[0035] The first detection module is configured to detect whether the second electronic device is connected through the first data transmission interface based on a single-wire protocol.
[0036] In some embodiments, the first receiving module is further configured to, in response to detecting that the second electronic device is connected through the first data transmission interface, perform identity authentication with the second electronic device based on the single-wire protocol through the first data transmission interface; in response to passing the identity authentication and the power level of the second electronic device not meeting the preset power condition, receive a charging request from the second electronic device through the first data transmission interface.
[0037] In some embodiments, the first detection module is further configured to detect whether the second electronic device is connected through the first data transmission interface based on the single-wire protocol at a preset time interval.
[0038] In some embodiments, the charging module is further configured to, in response to the first electronic device being connected to an external power supply device, convert the power supply parameters provided by the external power supply device into the charging parameters and then charge the second electronic device.
[0039] In some embodiments, the first connector comprises a pogo pin.
[0040] According to a fourth aspect of an embodiment of the present disclosure, a charging device is provided, which is applied to a second electronic device including a second connector, wherein the second connector includes a second data transmission interface, and the device includes:
[0041] a sending module configured to, in response to detecting that a first electronic device is connected through the second data transmission interface and that the power level of the second electronic device does not meet a preset power level condition, send a charging request to the first electronic device through the second data transmission interface; wherein the charging request carries charging parameters, and the second data transmission interface is connected to the first data transmission interface of the first electronic device;
[0042] The second receiving module is configured to receive electric energy provided by the first electronic device based on the charging parameter.
[0043] In some embodiments, the apparatus further comprises:
[0044] The second detection module is configured to detect whether the first electronic device is connected through the second data transmission interface based on a single-wire protocol.
[0045] In some embodiments, the sending module is further configured to, in response to detecting that the first electronic device is connected through the second data transmission interface, perform identity authentication with the first electronic device based on the single-wire protocol through the second data transmission interface; in response to the identity authentication being passed and the power level of the second electronic device not meeting the preset power condition, send a charging request to the first electronic device through the second data transmission interface.
[0046] In some embodiments, the second detection module is further configured to detect whether the first electronic device is connected through the second data transmission interface based on the single-wire protocol at preset time intervals.
[0047] In some embodiments, the apparatus further comprises:
[0048] a monitoring module configured to monitor the power level of the second electronic device during charging of the second electronic device;
[0049] The determining module is configured to determine the charging parameter according to the electric quantity.
[0050] In some embodiments, the second connector comprises a pogo pin.
[0051] According to a fifth aspect of the embodiments of the present disclosure, there is provided an electronic device, including:
[0052] processor;
[0053] memory for storing computer programs or instructions;
[0054] The processor executes the computer program or instructions to implement the steps of the method described in the first aspect; or, implements the steps of the method described in the second aspect.
[0055] According to the sixth aspect of an embodiment of the present disclosure, a non-temporary computer-readable storage medium is provided, wherein the storage medium stores a computer program or instructions. When the computer program or instructions in the storage medium are executed by a processor, the steps of the method described in the first aspect are implemented; or, the steps of the method described in the second aspect are implemented.
[0056] The technical solutions provided by the embodiments of the present disclosure may have the following beneficial effects:
[0057] In an embodiment of the present disclosure, a first electronic device first detects the connection of a second electronic device via a first data transmission interface. When the power level of the second electronic device does not meet a preset power condition, the first electronic device receives a charging request from the second electronic device carrying charging parameters via the first data transmission interface, and charges the second electronic device based on the charging parameters. On the one hand, electronic devices typically include a data transmission interface, and detecting whether a second electronic device is connected via the first data transmission interface reuses the data transmission interface, eliminating the need to install additional detection equipment, saving costs, and making implementation easier. On the other hand, receiving the charging request carrying charging parameters sent by the second electronic device and charging the second electronic device based on the charging parameters can improve the charging compatibility between electronic devices, improve the safety and reliability of electronic devices, save energy, and provide greater intelligence.
[0058] 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
[0059] 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.
[0060] Figure 1 This is a process of a charging method according to an exemplary embodiment. Figure 1 .
[0061] Figure 2 This is a process of a charging method according to an exemplary embodiment. Figure 2 .
[0062] Figure 3 The figure is an interactive diagram of a charging method process according to an exemplary embodiment.
[0063] Figure 4 This is a diagram showing an application scenario of a charging method according to an exemplary embodiment.
[0064] Figure 5 is an architectural diagram showing a charging method according to an exemplary embodiment.
[0065] Figure 6 A frame of a charging device according to an exemplary embodiment is shown Figure 1 .
[0066] Figure 7 A frame of a charging device according to an exemplary embodiment is shown Figure 2 .
[0067] Figure 8 The figure is a structural block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0068] 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.
[0069] Figure 1 This is a process of a charging method according to an exemplary embodiment. Figure 1 .like Figure 1As shown, the charging method is applied to a first electronic device including a first connector, the first connector including a first data transmission interface, and the method mainly includes the following steps:
[0070] S11. In response to detecting, through the first data transmission interface, that a second electronic device is connected, and the power level of the second electronic device does not meet a preset power condition, receiving, through the first data transmission interface, a charging request from the second electronic device; wherein the charging request carries charging parameters, and the first data transmission interface is connected to a second data transmission interface of the second electronic device;
[0071] S12: Charge the second electronic device based on the charging parameter.
[0072] In an embodiment of the present disclosure, the charging method can be applied to a first electronic device including a first connector, wherein the first electronic device can be an electronic device such as a display screen, a keyboard, a capacitive stylus, a charging stand, a projector, a headset, a printer, a game controller, etc. that can be connected to an electronic device such as a user equipment (UE), a mobile device, a user terminal, a mobile phone, a tablet computer, a personal digital assistant (PDA), a handheld device, a computing device, an in-vehicle device, a wearable device, etc. For example, the charging method of the embodiment of the present disclosure can be applied to a scenario where a keyboard charges a tablet computer. For another example, the charging method of the embodiment of the present disclosure can be applied to a scenario where a car charging stand charges a tablet computer.
[0073] In an embodiment of the present disclosure, a first electronic device includes a first connector, and the first connector includes a first data transmission interface, wherein the first connector can be a pogo pin connector, a Universal Serial Bus (USB) connector, or a High Definition Multimedia Interface (HDMI) connector, and the embodiment of the present disclosure does not impose any restrictions on this. The first data transmission interface is one of the interfaces in the first connector, such as when the first connector has a plurality of pogo pin structures, the first data transmission interface is one of the pin contacts; when the first connector is a USB connector, the first data transmission interface is an interface for connecting a USB data transmission line; when the first connector is an HDMI connector, the first data transmission interface is one or more pins of the HDMI connection.
[0074] In some embodiments, the first connector comprises a pogo pin.
[0075] In the embodiment of the present disclosure, the first connector can be an integration of multiple pogo pins, and the first data transmission interface can be one of the pogo pins in the first connector. For example, the first data transmission interface is a data pin for data transmission among multiple pogo pins. In the embodiment of the present disclosure, data transmission and connection with other electronic devices are performed through the pogo pin.
[0076] In the embodiment of the present disclosure, the provision of the pogo pin can improve the stability, durability, and corrosion resistance of the first connector, and the provision of the pogo pin is relatively simple, easy to implement, and low in cost.
[0077] In step S11, the first electronic device receives a charging request from the second electronic device through the first data transmission interface in response to detecting that the second electronic device is connected through the first data transmission interface and the power level of the second electronic device does not meet the preset power condition; wherein the charging request carries charging parameters, and the first data transmission interface is connected to the second data transmission interface of the second electronic device.
[0078] In the embodiment of the present disclosure, the second electronic device can be a user equipment (UE), a mobile device, a user terminal, a mobile phone, a tablet computer, a personal digital assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, or other electronic device.
[0079] In an embodiment of the present disclosure, the first electronic device detects whether the second electronic device is connected through the first data transmission interface. In some embodiments, the first electronic device can determine whether the second electronic device is connected by detecting the electrical parameters of the first data transmission interface. It can be understood that when the first data transmission interface is connected to the second data transmission interface of the second electronic device, the electrical parameters of the first data transmission interface (such as current value and voltage value) will change. For example, if the current value of the first data transmission interface increases instantaneously, it indicates that the second electronic device is connected; if the current value of the first data transmission interface does not change, it can be determined that the second electronic device is not connected.
[0080] In other embodiments, the first electronic device can detect whether the second electronic device is connected based on the single-wire protocol. For example, the first electronic device can set relevant parameters of the single-wire protocol and perform signal detection through the first data transmission interface. When the detected signal is the relevant parameters in the single-wire protocol, it indicates that the second electronic device is connected; otherwise, it indicates that the second electronic device is not connected.
[0081] In other embodiments, the first electronic device can determine whether the second electronic device is connected by detecting the communication status of the first data transmission interface. Specifically, the first electronic device can send a detection signal or command based on the first data transmission interface to detect whether communication can be established with the second electronic device; if communication can be established, it is determined that the second electronic device is connected; if communication cannot be established, it is determined that the second electronic device is not connected.
[0082] In other embodiments, the second electronic device can also detect whether the first electronic device is connected, and send a connection instruction or signal to the first electronic device based on the detection result. The first electronic device can receive the connection instruction or signal sent by the second electronic device through the first data transmission interface, and determine whether the second electronic device is connected through the instruction or signal.
[0083] In an embodiment of the present disclosure, the second electronic device can monitor its own power level. In some embodiments, the second electronic device includes a power meter, and the second electronic device monitors the power level through the power meter; in other embodiments, the second electronic device includes a power management module, and the second electronic device monitors the power level through the power management module; in still other embodiments, the second electronic device can monitor the power level through an installed software application. In this regard, the embodiments of the present disclosure are not limited. When the power level of the second electronic device does not meet a preset power level condition, the second electronic device can send a charging request to the first electronic device. The fact that the power level of the second electronic device does not meet the preset power level condition may mean that the power level of the second electronic device is not fully charged, or that the power level of the second electronic device is less than a preset power level threshold, for example, the power level is less than 30%.
[0084] In an embodiment of the present disclosure, a first electronic device receives a charging request from the second electronic device through the first data transmission interface in response to detecting through the first data transmission interface that a second electronic device is connected and the power level of the second electronic device does not meet a preset power condition, wherein the first data transmission interface is connected to the second data transmission interface of the second electronic device. Then, the first electronic device can receive the charging request from the second electronic device sent by the second data transmission interface through the first data transmission interface.
[0085] In the embodiment of the present disclosure, the charging request carries charging parameters, wherein the charging parameters may include charging voltage, charging current, charging power, etc. In addition, the charging request may also carry device identification information of the second device, etc.
[0086] In step S12, the first electronic device charges the second electronic device based on the charging parameters. After receiving a charging request carrying the charging parameters from the second electronic device, the first electronic device may charge the second electronic device based on the charging parameters. In some embodiments, the charging parameter is a charging voltage. The first electronic device includes a charge pump, a direct current-direct current (DC-DC) converter, a boost circuit, a buck circuit, and other voltage-adjustable devices or circuits to convert the voltage in the first electronic device into a charging voltage to charge the second electronic device.
[0087] In some embodiments, the charging parameter is a charging current. The first electronic device includes current-adjustable devices or circuits such as resistors, capacitors, and transistors, which convert the current in the first electronic device into a charging current to charge the second electronic device.
[0088] In the embodiment of the present disclosure, when the first electronic device has a device for storing electrical energy such as a battery, the second electronic device can be charged based on charging parameters through the device for storing electrical energy such as a battery of the first electronic device; when the first electronic device does not have a device for storing electrical energy such as a battery, an external power supply device can be connected to receive electrical energy provided by the power supply device, and the power supply parameters provided by the power supply device can be converted into charging parameters to charge the second electronic device.
[0089] In an embodiment of the present disclosure, a first electronic device first detects the connection of a second electronic device via a first data transmission interface. When the power level of the second electronic device does not meet a preset power condition, the first electronic device receives a charging request from the second electronic device carrying charging parameters via the first data transmission interface, and charges the second electronic device based on the charging parameters. On the one hand, electronic devices typically include a data transmission interface, and detecting whether a second electronic device is connected via the first data transmission interface reuses the data transmission interface, eliminating the need to install additional detection equipment, saving costs, and making implementation easier. On the other hand, receiving the charging request carrying charging parameters sent by the second electronic device and charging the second electronic device based on the charging parameters can improve the charging compatibility between electronic devices, improve the safety and reliability of electronic devices, save energy, and provide greater intelligence.
[0090] In some embodiments, the method further comprises:
[0091] Whether the second electronic device is connected is detected through the first data transmission interface based on the single-wire protocol.
[0092] In the embodiment of the present disclosure, as mentioned above, the first electronic device can detect whether the second electronic device is connected based on the single-line protocol through the first data transmission interface. In some embodiments, the first electronic device and the second electronic device may include a control module, such as a central processing unit (CPU), a microcontroller unit (MCU), etc. The control module in the first electronic device and the control module of the second electronic device can customize the single-line protocol, such as setting relevant parameters in the single-line protocol. The first electronic device can perform signal detection through the first data transmission interface. When the detected signal is the relevant parameter in the single-line protocol, it indicates that the second electronic device is connected. Otherwise, it indicates that the second electronic device is not connected. The relevant parameters may include data transmission rate, baud rate, etc., such as setting the data transmission rate in the single-line protocol. The data transmission rate detection is performed through the first data transmission interface. When the detected data transmission rate is the data transmission rate set in the single-line protocol, it indicates that the second electronic device is connected. Otherwise, it indicates that the second electronic device is not connected. It should be noted that in the embodiment of the present disclosure, it is also possible to determine whether the second electronic device is connected by detecting other signals. This is not limited by the embodiment of the present disclosure.
[0093] In other embodiments, the first electronic device may set an identifier of the second electronic device in the single-wire protocol and detect the identifier through the first data transmission interface. When the identifier of the second electronic device is detected, it indicates that the first electronic device is connected to the second electronic device.
[0094] In some embodiments, detecting whether the second electronic device is connected through the first data transmission interface based on a single-wire protocol includes:
[0095] At preset time intervals, detecting whether the second electronic device is connected is performed through the first data transmission interface based on the single-wire protocol.
[0096] In an embodiment of the present disclosure, a first electronic device may detect whether it is connected to a second electronic device through a first data transmission interface based on a single-wire protocol at a preset time interval, wherein the preset time interval is a set value and may be changed according to specific circumstances. Specifically, it may be changed according to the power level of the second electronic device. For example, when the power level of the second electronic device is greater than 80%, the preset time interval may be set to 10 seconds; when the power level of the second electronic device is less than 80%, the preset time interval may be set to 5 seconds. It is understood that the preset time interval may not be changed according to the power level of the second electronic device, such as being set to 10 seconds, and this is not limited in the embodiment of the present disclosure.
[0097] In the embodiment of the present disclosure, the setting of the preset time interval can improve the timeliness of electronic device detection, help to timely discover the connection and disconnection of the device, and provide timely information feedback for subsequent processing operations.
[0098] In an embodiment of the present disclosure, a first electronic device detects whether a second electronic device is connected through a first data transmission interface based on a single-wire protocol. Since the single-wire protocol is a communication protocol customized by the first electronic device and the second electronic device, detecting whether a second electronic device is connected through the single-wire protocol can enhance the accuracy and reliability of detection and is more intelligent.
[0099] In some embodiments, in response to detecting, through the first data transmission interface, that a second electronic device is connected and the power level of the second electronic device does not meet a preset power level condition, receiving, through the first data transmission interface, a charging request from the second electronic device, includes:
[0100] In response to detecting that the second electronic device is connected through the first data transmission interface, performing identity authentication with the second electronic device based on the single-wire protocol through the first data transmission interface;
[0101] In response to the identity authentication being passed and the power level of the second electronic device not meeting the preset power level condition, a charging request from the second electronic device is received through the first data transmission interface.
[0102] In an embodiment of the present disclosure, in response to detecting that a second electronic device is connected through a first data transmission interface, the first electronic device performs identity authentication with the second electronic device through the first data transmission interface based on a single-line protocol; in some embodiments, the first electronic device can perform identity authentication with the second electronic device through the first data transmission interface based on the identity information and identity password specified in the single-line protocol. For example, in response to detecting that a second electronic device is connected through the first data transmission interface, the first electronic device can send an identity authentication request to the second electronic device based on the first data transmission interface, and the identity authentication request carries the identity information specified in the single-line protocol (such as device identification, user name, etc.). After receiving the identity authentication request, the second electronic device enters the identity password corresponding to the identity information in the single-line protocol to complete the identity authentication.
[0103] In other embodiments, the first electronic device may authenticate the second electronic device based on an encryption algorithm in the single-wire protocol. In other embodiments, the first electronic device may authenticate the second electronic device based on a specific data format and instructions in the single-wire protocol. This is not limited in the present disclosure.
[0104] In an embodiment of the present disclosure, a first electronic device receives a charging request from a second electronic device via a first data transmission interface in response to successful identity authentication and the second electronic device's power level not meeting a preset power level condition. Successful identity authentication between the first and second electronic devices indicates successful pairing of the first and second electronic devices, and the first electronic device has permission to charge the second electronic device.
[0105] In an embodiment of the present disclosure, in response to detecting that a second electronic device is connected, the first electronic device performs identity authentication with the second electronic device based on a single-wire protocol through a first data transmission interface, and in response to passing the identity authentication and the power level of the second electronic device not meeting a preset power condition, receives a charging request from the second electronic device through the first data transmission interface. This can improve the security of communication between the first electronic device and the second electronic device and the reliability of charging, eliminate the need for identity authentication for each communication, and can also improve communication efficiency. In addition, the identity authentication method based on the single-wire protocol is more flexible.
[0106] In some embodiments, charging the second electronic device based on the charging parameter includes:
[0107] In response to the first electronic device being connected to an external power supply device, the second electronic device is charged after converting the power supply parameters provided by the external power supply device into the charging parameters.
[0108] In an embodiment of the present disclosure, in response to a first electronic device being connected to an external power supply device, the power supply parameters provided by the external power supply device are converted into charging parameters before charging the second electronic device. As previously mentioned, the charging parameters may be charging voltage, charging current, etc. The first electronic device may first detect the power supply parameters of the external power supply device based on the charging parameters, and then convert the power supply parameters into charging parameters to charge the second electronic device. For example, when the charging parameter is charging voltage, the first electronic device may first detect the power supply voltage provided by the external power supply device, and then convert the power supply voltage into a charging voltage to charge the second electronic device. Specifically, the first electronic device may include a DC-DC converter, and the first electronic device may convert the power supply voltage provided by the external power supply device into a charging voltage through the DC-DC converter.
[0109] In an embodiment of the present disclosure, when a first electronic device is connected to an external power supply device, the power supply parameters provided by the external power supply device are converted into charging parameters and then used to charge a second electronic device. This enables the first electronic device to automatically adjust the output voltage and current according to the charging requirements of the second electronic device, thereby realizing an automated charging process and improving the convenience and efficiency of charging.
[0110] Figure 2 This is a process of a charging method according to an exemplary embodiment. Figure 2 .like Figure 2 As shown, the charging method is applied to a second electronic device including a second connector, the second connector including a second data transmission interface, and the method mainly includes the following steps:
[0111] S21. In response to detecting that a first electronic device is connected through the second data transmission interface and that the power level of the second electronic device does not meet a preset power level condition, sending a charging request to the first electronic device through the second data transmission interface; wherein the charging request carries charging parameters, and the second data transmission interface is connected to the first data transmission interface of the first electronic device;
[0112] S22. Receive electrical energy provided by the first electronic device based on the charging parameter.
[0113] In the embodiment of the present disclosure, as mentioned above, the second electronic device can be a user equipment (UE), a mobile device, a user terminal, a mobile phone, a tablet computer, a personal digital assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, or other electronic device.
[0114] In an embodiment of the present disclosure, the second electronic device includes a second connector, and the second connector includes a second data transmission interface, wherein the second connector can be a pogo pin, a USB connector, or an HDMI connector, and this embodiment of the present disclosure does not limit this. The second data transmission interface is one of the interfaces in the second connector, such as when the second connector has a multiple pogo pin structure, the second data transmission interface is one of the pin contacts; when the second connector is a USB connector, the second data transmission interface is an interface for connecting a USB data transmission cable; when the second connector is an HDMI connector, the second data transmission interface is one or more pins of the HDMI connection.
[0115] In some embodiments, the second connector comprises a pogo pin.
[0116] In the embodiment of the present disclosure, the second connector can be an integration of multiple pogo pins, and the second data transmission interface can be one of the pogo pins in the second connector. For example, the second data transmission interface is a data pin for data transmission among multiple pogo pins. In the embodiment of the present disclosure, data transmission and connection with other electronic devices are performed through the pogo pin.
[0117] In the embodiment of the present disclosure, the provision of the pogo pin can improve the stability, durability, and corrosion resistance of the second connector, and the provision of the pogo pin is relatively simple, easy to implement, and low in cost.
[0118] In step S21, in response to detecting that the first electronic device is connected through the second data transmission interface and that the power level of the second electronic device does not meet a preset power condition, the second electronic device sends a charging request to the first electronic device through the second data transmission interface; wherein, the second electronic device can detect whether the first electronic device is connected by detecting electrical parameters of the first data transmission interface; the second electronic device can also detect whether the first electronic device is connected based on a single-wire protocol; the second electronic device can also determine whether the first electronic device is connected by detecting the communication status of the second data transmission interface; the second electronic device can also receive a connection instruction or signal sent by the first electronic device through the second data transmission interface, and determine whether the first electronic device is connected based on the instruction or signal. This embodiment of the present disclosure is not limited to this.
[0119] In an embodiment of the present disclosure, the second electronic device can also detect its own power level, and when it detects that it is connected to the first electronic device and the power level does not meet the preset power level condition, it sends a charging request carrying charging parameters to the first electronic device through the second data transmission interface, wherein the second data transmission interface is connected to the first data transmission interface of the first electronic device, then the second electronic device can send a charging request to the first data transmission interface through the second data transmission interface.
[0120] In the embodiments of the present disclosure, as previously described, the second electronic device may monitor its own power level via a power meter, a power detection module, a software application, or the like, and the embodiments of the present disclosure are not limited thereto. The fact that the power level of the second electronic device does not meet the preset power level condition may mean that the power level of the second electronic device is not fully charged, or that the power level of the second electronic device is less than a preset power level threshold, such as less than 30%, and the embodiments of the present disclosure are not limited thereto.
[0121] In the embodiment of the present disclosure, the charging request carries charging parameters, where, as mentioned above, the charging parameters may include charging voltage, charging current, charging power, etc. In addition, the charging request may also carry device identification information of the second device, etc.
[0122] In step S22, the second electronic device receives the power provided by the first electronic device based on the charging parameters. In the disclosed embodiment, after sending a charging request carrying the charging parameters to the first electronic device, the second electronic device can receive the power provided by the first electronic device based on the charging parameters.
[0123] In an embodiment of the present disclosure, in response to detecting, via a second data transmission interface, that a first electronic device is connected, and that the power level of the second electronic device does not meet a preset power condition, a second electronic device sends a charging request carrying charging parameters to the first electronic device via the second data transmission interface, and receives power provided by the first electronic device based on the charging parameters. On the one hand, electronic devices typically include a data transmission interface, and detecting whether a second electronic device is connected via the second data transmission interface reuses the data transmission interface, eliminating the need to install additional detection equipment, saving costs, and making implementation easier. On the other hand, sending a charging request carrying charging parameters to the first electronic device and receiving power provided by the first electronic device based on the charging parameters can improve charging compatibility between electronic devices, enhance the safety and reliability of electronic devices, and provide greater intelligence.
[0124] In some embodiments, the method further comprises:
[0125] Whether the first electronic device is connected is detected through the second data transmission interface based on a single-wire protocol.
[0126] In an embodiment of the present disclosure, as mentioned above, the second electronic device can detect whether the first electronic device is connected based on the single-line protocol through the second data transmission interface. The first electronic device and the second electronic device may include a control module, such as a CPU, an MCU, etc. The control module in the first electronic device and the control module of the second electronic device can customize the single-line protocol, such as setting relevant parameters in the single-line protocol. The second electronic device can perform signal detection through the second data transmission interface. When the detected signal is the relevant parameter in the single-line protocol, it indicates that the first electronic device is connected. Otherwise, it indicates that the first electronic device is not connected. The relevant parameters may include data transmission rate, baud rate, etc., such as setting the data transmission rate in the single-line protocol. The data transmission rate is detected through the second data transmission interface. When the detected data transmission rate is the data transmission rate set in the single-line protocol, it indicates that the first electronic device is connected. Otherwise, it indicates that the first electronic device is not connected. It should be noted that in the embodiment of the present disclosure, it is also possible to determine whether the first electronic device is connected by detecting other signals. The embodiment of the present disclosure does not limit this.
[0127] As mentioned above, the second electronic device may also set the identifier of the first electronic device in the single-wire protocol and detect the identifier through the second data transmission interface. When the identifier of the first electronic device is detected, it indicates that the second electronic device is connected to the first electronic device.
[0128] In some embodiments, detecting whether the first electronic device is connected through the second data transmission interface based on a single-wire protocol includes:
[0129] At preset time intervals, detecting whether the first electronic device is connected is performed through the second data transmission interface based on the single-wire protocol.
[0130] In an embodiment of the present disclosure, a second electronic device may detect whether it is connected to a first electronic device via a second data transmission interface based on a single-wire protocol at a preset time interval. As previously described, the preset time interval is a set value that may be changed according to specific circumstances. Specifically, it may be changed according to the power level of the second electronic device. For example, when the power level of the second electronic device is greater than 80%, the preset time interval may be set to 10 seconds; and when the power level of the second electronic device is less than 80%, the preset time interval may be set to 5 seconds. It is understood that the preset time interval may not be changed according to the power level of the second electronic device, such as being set to 10 seconds, and this is not limited in the embodiment of the present disclosure.
[0131] In the embodiment of the present disclosure, the setting of the preset time interval can improve the timeliness of electronic device detection, help to timely discover the connection and disconnection of the device, and provide timely information feedback for subsequent processing operations.
[0132] In an embodiment of the present disclosure, the second electronic device detects whether it is connected to the first electronic device based on a single-wire protocol through a second data transmission interface. Since the single-wire protocol is a communication protocol customized by the first electronic device and the second electronic device, detecting whether the first electronic device is connected through the single-wire protocol can enhance the accuracy and reliability of detection and is more intelligent.
[0133] In some embodiments, in response to detecting that the first electronic device is connected through the second data transmission interface and the power level of the second electronic device does not meet a preset power condition, sending a charging request to the first electronic device through the second data transmission interface includes:
[0134] In response to detecting that the first electronic device is connected through the second data transmission interface, performing identity authentication with the first electronic device based on the single-wire protocol through the second data transmission interface;
[0135] In response to the identity authentication being passed and the power level of the second electronic device not meeting the preset power level condition, a charging request is sent to the first electronic device through the second data transmission interface.
[0136] In the embodiment of the present disclosure, as mentioned above, the second electronic device can perform identity authentication with the first electronic device through the second data transmission interface based on the identity information and identity password specified in the single-line protocol. For example, in response to detecting that the first electronic device is connected through the first data transmission interface, the second electronic device can receive an identity authentication request sent by the first electronic device based on the second data transmission interface, which carries the identity information specified in the single-line protocol (such as device identification, user name, etc.), and enter the identity password corresponding to the identity information in the single-line protocol to complete the identity authentication. It should be noted that the second electronic device can also send an identity authentication request to the first electronic device, and the first electronic device can enter the identity password. This is not limited by the embodiment of the present disclosure.
[0137] As previously mentioned, the second electronic device can also authenticate itself with the first electronic device based on an encryption algorithm in the single-wire protocol. The second electronic device can also authenticate itself with the first electronic device based on specific data formats and instructions in the single-wire protocol. This disclosure does not limit this.
[0138] In the disclosed embodiment, in response to successful identity authentication and the second electronic device's power level not meeting a preset power level condition, the second electronic device sends a charging request to the first electronic device via the second data transmission interface. Successful identity authentication between the first and second electronic devices indicates successful pairing of the first and second electronic devices, and the first electronic device has permission to charge the second electronic device.
[0139] In an embodiment of the present disclosure, in response to detecting that a first electronic device is connected, the second electronic device performs identity authentication with the first electronic device through a second data transmission interface based on a single-line protocol, and in response to passing the identity authentication and the power level of the second electronic device not meeting a preset power condition, a charging request is sent to the first electronic device through the second data transmission interface. This can improve the security of communication between the first electronic device and the second electronic device and the reliability of charging, eliminate the need for identity authentication for each communication, and can also improve communication efficiency. In addition, the identity authentication method based on the single-line protocol is more flexible.
[0140] In some embodiments, the method further comprises:
[0141] During the charging process of the second electronic device, monitoring the power level of the second electronic device;
[0142] The charging parameter is determined according to the power amount.
[0143] In the embodiment of the present disclosure, the second electronic device can also monitor the power level of the second electronic device during the charging process, wherein the second electronic device can monitor the power level of the second electronic device in real time or at preset time intervals. The embodiment of the present disclosure does not limit this.
[0144] In an embodiment of the present disclosure, the second electronic device may include a power meter, and the power of the second electronic device is monitored by the power meter; the second electronic device may also include a power management module, and the second electronic device monitors the power through the power management module; in addition, the second electronic device may also monitor the power through a software application, which is not limited by the embodiment of the present disclosure.
[0145] In an embodiment of the present disclosure, the second electronic device determines the charging parameters based on the power level. In some embodiments, the second electronic device may determine the charging parameters based only on the power level of the second electronic device. For example, when the charging parameter is the charging current, the charging current determined by the second electronic device when the power level is less than 20% is less than the charging current determined by the second electronic device when the power level is greater than 20% and less than 50%.
[0146] In other embodiments, the second electronic device may further determine a charging threshold based on the usage scenario and needs of the second electronic device, and determine charging parameters based on the charging threshold and the current power level. For example, if the second electronic device needs to operate for a long time, a charging threshold of 80% or 90% may be selected; if the device is mainly used for short periods of time, a charging threshold of 50% or 60% may be selected. The required charging power and charging time are then calculated based on the current power level and the charging threshold to determine the charging parameters.
[0147] In other embodiments, the second electronic device may also jointly determine charging parameters based on the power level of the second electronic device and the charging mode supported by the second electronic device. For example, if the second electronic device supports fast charging, the fast charging function may be enabled and the charging parameters may be appropriately increased to shorten the charging time.
[0148] In other embodiments, the second electronic device may also determine the charging parameters based on the power level and the temperature of the second electronic device. This is not limited in the embodiments of the present disclosure.
[0149] The disclosed embodiment monitors the power level of the second electronic device and determines charging parameters based on the power level, thereby improving the accuracy of the charging parameters and making the system more intelligent.
[0150] Figure 3 This is an interactive diagram of a charging method process according to an exemplary embodiment. Figure 3 As shown, the following steps are included:
[0151] S31. In response to detecting that a first electronic device is connected via the second data transmission interface and that the power level of the second electronic device does not meet a preset power level condition, sending a charging request to the first electronic device via the second data transmission interface; wherein the charging request carries charging parameters;
[0152] S32: Charge the second electronic device based on the charging parameter.
[0153] In an embodiment of the present disclosure, in response to detecting a connection to a first electronic device via a second data transmission interface and the second electronic device's power level not meeting a preset power condition, the second electronic device sends a charging request carrying charging parameters to the first electronic device via the second data transmission interface. Upon receiving the charging request carrying the charging parameters from the second electronic device, the first electronic device can charge the second electronic device based on the charging parameters. This approach improves charging compatibility between electronic devices, enhances the safety and reliability of electronic devices, saves energy, and provides greater intelligence.
[0154] Figure 4 FIG. 1 is an application scenario diagram of a charging method according to an exemplary embodiment. Figure 4 As shown, the tablet is the second electronic device, and the peripheral device such as the keyboard or charging stand belongs to the first electronic device. The first power pin, the first data transmission pin, and the first ground pin together constitute a first connector, and the first data transmission pin is a first data transmission interface; the second power pin, the second data transmission pin, and the second ground pin together constitute a second connector, and the second data transmission pin is a second data transmission interface. The disclosed embodiment can be applied to a scenario where a peripheral device such as a keyboard or charging stand charges the tablet via a pin connector. In the disclosed embodiment, the tablet and the peripheral device such as the keyboard or charging stand can communicate based on the data transmission pins, thereby sending or receiving charging requests carrying charging parameters. The charging parameters can be transmitted via the power pin and the ground pin to complete the charging of the tablet by the peripheral device such as the keyboard or charging stand, thereby freeing up the tablet's wired Type-C port while charging, allowing the tablet to use headphones, OTG (On-The-Go) devices, and other devices while charging.
[0155] Figure 5 FIG. 1 is an architecture diagram of a charging method according to an exemplary embodiment. Figure 5As shown, the keyboard belongs to the first electronic device, the tablet belongs to the second electronic device, the peripheral end is powered by the external power supply device, VBUS is the power supply voltage for the external device, GND is ground, VBUS1 is the charging voltage, POGO PINL53 is the first connector on the keyboard end, POGO PINL54 is the second connector on the tablet end, and L58 is a communication line connecting the first data transmission interface on the keyboard end and the second data transmission interface on the tablet end; the microcontroller unit L52 on the keyboard end communicates with the microcontroller unit L56 on the tablet end through the communication line L58 to detect whether the keyboard is connected to the tablet, and performs identity authentication in response to detecting that the keyboard is connected to the tablet. In response to passing the identity authentication, the microcontroller unit L56 on the tablet end monitors the tablet power, and when the tablet power does not meet the preset power condition, sends a charging request carrying the charging voltage VBUS1 to the keyboard through the communication line L58. After receiving the charging request, the keyboard converts the power supply voltage VBUS into the charging voltage VBUS1 based on the DC-DC converter L51 to charge the tablet. After receiving the charging voltage VBUS1, the tablet first passes through the overvoltage protection L55, and then transmits the charging voltage VBUS1 to the battery based on the battery management chip L57 and charge pump L58. Among them, the battery management chip L57 and charge pump L58 can manage the current input to the battery based on the current charging stage of the tablet battery, thereby preventing the battery from overcharging. Among them, the overvoltage protection L55 is turned on or off by a switch.
[0156] The disclosed embodiment enables the keyboard to power the tablet through an external power supply device, which has a wide range of application scenarios. It can free up the tablet's wired Type-C port while charging, allowing the tablet to be used with headphones, OTG and other devices while charging.
[0157] Figure 6 A frame of a charging device according to an exemplary embodiment is shown Figure 1 , applied to a first electronic device including a first connector, wherein the first connector includes a first data transmission interface. Figure 6 As shown, the device mainly includes:
[0158] A first receiving module 601 is configured to, in response to detecting that a second electronic device is connected through the first data transmission interface and that the power level of the second electronic device does not meet a preset power condition, receive a charging request from the second electronic device through the first data transmission interface; wherein the charging request carries charging parameters, and the first data transmission interface is connected to a second data transmission interface of the second electronic device;
[0159] The charging module 602 is configured to charge the second electronic device based on the charging parameters.
[0160] In some embodiments, the apparatus further comprises:
[0161] The first detection module is configured to detect whether the second electronic device is connected through the first data transmission interface based on a single-wire protocol.
[0162] In some embodiments, the first receiving module 601 is further configured to, in response to detecting that the second electronic device is connected through the first data transmission interface, perform identity authentication with the second electronic device based on the single-wire protocol through the first data transmission interface; in response to passing the identity authentication and the power level of the second electronic device not meeting the preset power condition, receive a charging request from the second electronic device through the first data transmission interface.
[0163] In some embodiments, the first detection module is further configured to detect whether the second electronic device is connected through the first data transmission interface based on the single-wire protocol at a preset time interval.
[0164] In some embodiments, the charging module 602 is further configured to, in response to the first electronic device being connected to an external power supply device, convert the power supply parameters provided by the external power supply device into the charging parameters and then charge the second electronic device.
[0165] In some embodiments, the first connector comprises a pogo pin.
[0166] Figure 7 A frame of a charging device according to an exemplary embodiment is shown Figure 2 , applied to a second electronic device including a second connector, wherein the second connector includes a second data transmission interface. Figure 7 As shown, the device mainly includes:
[0167] a sending module 701 configured to, in response to detecting that a first electronic device is connected via the second data transmission interface and that the power level of the second electronic device does not meet a preset power level condition, send a charging request to the first electronic device via the second data transmission interface; wherein the charging request carries charging parameters, and the second data transmission interface is connected to the first data transmission interface of the first electronic device;
[0168] The second receiving module 702 is configured to receive electric energy provided by the first electronic device based on the charging parameter.
[0169] In some embodiments, the apparatus further comprises:
[0170] The second detection module is configured to detect whether the first electronic device is connected through the second data transmission interface based on a single-wire protocol.
[0171] In some embodiments, the sending module 701 is further configured to, in response to detecting that the first electronic device is connected through the second data transmission interface, perform identity authentication with the first electronic device based on the single-wire protocol through the second data transmission interface; in response to the identity authentication being passed and the power level of the second electronic device not meeting the preset power condition, send a charging request to the first electronic device through the second data transmission interface.
[0172] In some embodiments, the second detection module is further configured to detect whether the first electronic device is connected through the second data transmission interface based on the single-wire protocol at preset time intervals.
[0173] In some embodiments, the apparatus further comprises:
[0174] a monitoring module configured to monitor the power level of the second electronic device during charging of the second electronic device;
[0175] The determining module is configured to determine the charging parameter according to the electric quantity.
[0176] In some embodiments, the second connector comprises a pogo pin.
[0177] Regarding the apparatus in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0178] Figure 8 This is a block diagram of an electronic device 800 according to an exemplary embodiment. It should be noted that the electronic device 800 can be either a first electronic device or a second electronic device. For example, the electronic device 800 can be a display screen, a keyboard, a capacitive stylus, a charging stand, a projector, headphones, a printer, a game controller, etc. The electronic device 800 can also be a mobile phone, a computer, a wearable device, an in-vehicle device, a digital broadcast terminal, a messaging device, a tablet device, a fitness device, a personal digital assistant, etc.
[0179] Reference Figure 8 , the electronic device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .
[0180] The processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with at least one of display, phone calls, data communications, camera operation, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to perform all or part of the steps of the above-described method. In addition, the processing component 802 may include one or more modules to facilitate interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
[0181] The memory 804 is configured to store various types of data to support operations on the electronic device 800. Examples of such data include at least one of the following: instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, pictures, and videos. The memory 804 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.
[0182] The power supply component 806 provides power to various components of the electronic device 800. The power supply component 806 may include at least one of the following: a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 800.
[0183] The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 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 may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, slides, and gestures on the touch panel. The touch sensor can not only sense the boundaries of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the electronic device 800 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.
[0184] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), which is configured to receive external audio signals when the electronic device 800 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 804 or transmitted via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.
[0185] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as a keyboard, click wheel, and buttons. These buttons may include, but are not limited to, a home button, volume buttons, a start button, and a lock button.
[0186] The sensor assembly 814 includes one or more sensors for providing various aspects of the status assessment of the electronic device 800. For example, the sensor assembly 814 can detect the open / closed state of the electronic device 800, the relative positioning of components, such as the display and keypad of the electronic device 800. The sensor assembly 814 can also detect changes in the position of the electronic device 800 or a component thereof, the presence or absence of user contact with the electronic device 800, the orientation or acceleration / deceleration of the electronic device 800, and changes in the temperature of the electronic device 800. The sensor assembly 814 can include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 can also include an optical sensor, such as a complementary metal oxide semiconductor (CMOS) or charge coupled device (CCD) image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 can also include, but is not limited to, at least one of the following: an accelerometer, a gyroscope, a magnetic sensor, a pressure sensor, and a temperature sensor.
[0187] The communication component 816 is configured to facilitate communication between the electronic device 800 and other devices in a wired or wireless manner. The electronic device 800 can access a wireless network based on a communication standard, such as Wi-Fi, 4G, 5G, or a combination thereof. In an exemplary embodiment, the communication component 816 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 816 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.
[0188] In an exemplary embodiment, the electronic device 800 can 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.
[0189] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is further provided, such as a memory 804 including executable instructions or a computer program. The instructions or computer program can be executed by the processor 820 of the electronic device 800 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a compact disc read-only memory (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, etc.
[0190] A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by a processor of a first electronic device, enables the mobile terminal to perform any of the above-mentioned charging methods applied to the first electronic device in the embodiments of the present disclosure. For example, the method includes:
[0191] In response to detecting, through the first data transmission interface, that a second electronic device is connected, and the power level of the second electronic device does not meet a preset power level condition, receiving, through the first data transmission interface, a charging request from the second electronic device; wherein the charging request carries charging parameters, and the first data transmission interface is connected to the second data transmission interface of the second electronic device;
[0192] charging the second electronic device based on the charging parameter
[0193] A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by the processor of the second electronic device, enables the mobile terminal to perform any of the above-mentioned charging methods applied to the second electronic device in the embodiments of the present disclosure. For example, the method includes:
[0194] In response to detecting, through the second data transmission interface, that a first electronic device is connected, and the power level of the second electronic device does not meet a preset power level condition, sending a charging request to the first electronic device through the second data transmission interface; wherein the charging request carries charging parameters, and the second data transmission interface is connected to the first data transmission interface of the first electronic device;
[0195] The device receives power provided by the first electronic device based on the charging parameter.
[0196] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the invention disclosed 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 disclosed 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 claims.
[0197] 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.
Claims
1. A charging method, characterized in that: Applied to a first electronic device including a first connector, wherein the first connector includes a first data transmission interface, the method includes: In response to detecting, through the first data transmission interface, that a second electronic device is connected, and the power level of the second electronic device does not meet a preset power level condition, receiving, through the first data transmission interface, a charging request from the second electronic device; wherein the charging request carries charging parameters, and the first data transmission interface is connected to the second data transmission interface of the second electronic device; The second electronic device is charged based on the charging parameter.
2. The method according to claim 1, characterized in that The method further comprises: Whether the second electronic device is connected is detected through the first data transmission interface based on the single-wire protocol.
3. The method according to claim 2, characterized in that In response to detecting, through the first data transmission interface, that a second electronic device is connected and that the power level of the second electronic device does not meet a preset power level condition, receiving, through the first data transmission interface, a charging request from the second electronic device, comprises: In response to detecting that the second electronic device is connected through the first data transmission interface, performing identity authentication with the second electronic device based on the single-wire protocol through the first data transmission interface; In response to the identity authentication being passed and the power level of the second electronic device not meeting the preset power level condition, a charging request from the second electronic device is received through the first data transmission interface.
4. The method according to claim 2, characterized in that The detecting whether the second electronic device is connected via the first data transmission interface based on a single-wire protocol includes: At preset time intervals, detecting whether the second electronic device is connected is performed through the first data transmission interface based on the single-wire protocol.
5. The method according to claim 1, wherein The charging the second electronic device based on the charging parameter includes: In response to the first electronic device being connected to an external power supply device, the second electronic device is charged after converting the power supply parameters provided by the external power supply device into the charging parameters.
6. The method according to any one of claims 1 to 5, characterized in that The first connector includes a pogo pin.
7. A charging method, characterized in that: Applied to a second electronic device including a second connector, where the second connector includes a second data transmission interface, the method includes: In response to detecting, through the second data transmission interface, that a first electronic device is connected, and the power level of the second electronic device does not meet a preset power level condition, sending a charging request to the first electronic device through the second data transmission interface; wherein the charging request carries charging parameters, and the second data transmission interface is connected to the first data transmission interface of the first electronic device; The device receives power provided by the first electronic device based on the charging parameter.
8. The method according to claim 7, characterized in that The method further comprises: Whether the first electronic device is connected is detected through the second data transmission interface based on a single-wire protocol.
9. The method according to claim 8, characterized in that In response to detecting that the first electronic device is connected through the second data transmission interface and the power level of the second electronic device does not meet a preset power level condition, sending a charging request to the first electronic device through the second data transmission interface includes: In response to detecting that the first electronic device is connected through the second data transmission interface, performing identity authentication with the first electronic device based on the single-wire protocol through the second data transmission interface; In response to the identity authentication being passed and the power level of the second electronic device not meeting the preset power level condition, a charging request is sent to the first electronic device through the second data transmission interface.
10. The method according to claim 8, characterized in that The detecting whether the first electronic device is connected through the second data transmission interface based on a single-wire protocol includes: At preset time intervals, detecting whether the first electronic device is connected is performed through the second data transmission interface based on the single-wire protocol.
11. The method according to claim 7, characterized in that The method further comprises: During the charging process of the second electronic device, monitoring the power level of the second electronic device; The charging parameter is determined according to the power amount.
12. The method according to any one of claims 7 to 11, characterized in that The second connector includes a pogo pin.
13. A charging device, characterized in that: Applied to a first device including a first connector, wherein the first connector includes a first data transmission interface, the apparatus includes: a first receiving module configured to, in response to detecting that a second electronic device is connected via the first data transmission interface and that the power level of the second electronic device does not meet a preset power level condition, receive a charging request from the second electronic device via the first data transmission interface; wherein the charging request carries charging parameters, and the first data transmission interface is connected to a second data transmission interface of the second electronic device; A charging module is configured to charge the second electronic device based on the charging parameters.
14. A charging device, characterized in that: Applicable to a second electronic device including a second connector, wherein the second connector includes a second data transmission interface, the device includes: a sending module configured to, in response to detecting that a first electronic device is connected through the second data transmission interface and that the power level of the second electronic device does not meet a preset power level condition, send a charging request to the first electronic device through the second data transmission interface; wherein the charging request carries charging parameters, and the second data transmission interface is connected to the first data transmission interface of the first electronic device; The second receiving module is configured to receive electric energy provided by the first electronic device based on the charging parameter.
15. An electronic device, characterized in that: include: processor; memory for storing computer programs or instructions; The processor executes the computer program or instructions to implement the steps of the method according to any one of claims 1 to 6; or implements the steps of the method according to any one of claims 7 to 12.
16. A non-transitory computer-readable storage medium storing a computer program or instruction, characterized in that: When the computer program or instructions in the storage medium are executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented; or the steps of the method according to any one of claims 7 to 12 are implemented.