Device control method, device and system

By establishing single-bus and dual-bus communication links between electronic devices and utilizing protocols such as UFCS to achieve parallel communication of charging information and data, the problem of poor compatibility between devices with different charging protocols is solved, thus improving the user experience.

CN122300283APending Publication Date: 2026-06-30HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411998889.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

Electronic devices manufactured by different companies may support different charging protocols, resulting in poor compatibility and the inability to simultaneously communicate charging information and data, thus reducing the user experience.

Method used

By establishing single-bus and dual-bus communication links between devices, the UFCS protocol enables parallel charging information and communication, supporting the switching and compatibility of multiple charging protocols, including UFCS, PD, and USB protocols.

Benefits of technology

It enables simultaneous charging information and data communication during the charging process, improving the user experience and resolving compatibility issues between charging devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122300283A_ABST
    Figure CN122300283A_ABST
Patent Text Reader

Abstract

This application provides a device control method, device, and system, including: detecting that a second device is connected to the physical interface; when communication with the second device is successfully established using a dual-bus communication method of the first charging protocol, and when communication with the second device is successfully established using a single-bus communication method of the second charging protocol, stopping communication with the second device using the second charging protocol, executing a charging scheme according to the first charging protocol, and switching the communication method of the first charging protocol from dual-bus communication to single-bus communication; and communicating with the second device using the dual-bus communication method of the first communication protocol. This application enables communication of information other than charging information during the charging process between devices using the charging protocol, improving the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of equipment control technology, and in particular to an equipment control method, equipment, and system. Background Technology

[0002] Charging between power supply equipment and charging equipment involves communication via charging protocols to enable real-time exchange of charging information such as charging voltage and current, ensuring charging safety. Currently, there are many types of charging protocols between power supply equipment and charging equipment, and electronic devices from different companies may support different charging protocols. This makes it difficult for electronic devices supporting different charging protocols to adapt to each other, resulting in poor compatibility. To solve this compatibility problem, the UFCS protocol was developed. However, when using the UFCS protocol for charging, communication of information other than charging data is not possible, which also degrades the user experience. Summary of the Invention

[0003] This application provides a device control method, device, and system that enables communication of information other than charging information during the charging process using a charging protocol such as UFCS, thereby improving the user experience.

[0004] In a first aspect, embodiments of this application provide a device control method applied to a first device. The first device includes a physical interface, which includes a first pin, a second pin, and a third pin. The first pin is used to support the formation of a single-bus communication link, and the second and third pins are used to support the formation of a dual-bus communication link. The first device supports a first charging protocol, a second charging protocol, and a first communication protocol. The first charging protocol supports single-bus communication based on the single-bus communication link and also supports dual-bus communication based on the dual-bus communication link. The second charging protocol supports single-bus communication based on the single-bus communication link, and the first communication protocol supports dual-bus communication based on the dual-bus communication link. The method includes:

[0005] When the physical interface is detected to be connected to the second device; when communication with the second device is successfully established using the dual-bus communication method of the first charging protocol and the single-bus communication method of the second charging protocol, communication with the second device using the second charging protocol is stopped, the charging scheme is executed according to the first charging protocol, and the communication method of the first charging protocol is switched from dual-bus communication to single-bus communication; communication with the second device is performed using the dual-bus communication method of the first communication protocol.

[0006] This method enables parallel charging and communication by using a first communication protocol while charging is being performed between the first and second devices using a first charging protocol, thereby improving the user experience.

[0007] In one possible implementation, the method further includes: if communication with the second device is successfully established using the dual-bus communication method of the first charging protocol, but communication with the second device fails to be established using the single-bus communication method of the second charging protocol, the charging scheme is executed according to the first charging protocol, while maintaining the dual-bus communication method of the first charging protocol. This method provides a charging solution for situations where the second device does not support single-bus communication.

[0008] In one possible implementation, the method further includes: if communication with the second device fails using the dual-bus communication method of the first charging protocol, but communication is successfully established using the single-bus communication method of the second charging protocol, then the charging scheme is executed according to the second charging protocol. This method provides a charging solution for situations where the second device does not support the dual-bus communication method of the first charging protocol.

[0009] In one possible implementation, the method further includes: when establishing communication with the second device using both the dual-bus communication method of the first charging protocol and the single-bus communication method of the second charging protocol fails, the charging scheme is executed according to the third charging protocol or the default mode of the physical interface. The third charging protocol is a charging protocol supported by the first device other than the first and second charging protocols. This method provides a charging solution for situations where the second device does not support the first and second charging protocols.

[0010] In one possible implementation, successfully establishing communication with the second device using the dual-bus communication method of the first charging protocol includes: successfully handshaking with the second device according to the handshake process corresponding to the dual-bus communication method of the first charging protocol. This method provides a possible implementation for establishing communication with the second device using the dual-bus communication method of the first charging protocol.

[0011] In one possible implementation, the first device is a power supply device, and successfully hands handshakes with the second device according to the handshake process corresponding to the dual-bus communication mode of the first charging protocol. This includes: detecting a preset first pulse sequence sent by the second device through the third pin, and disconnecting the short-circuit link between the second pin and the third pin and ground. This method provides a possible implementation method for the first device to act as a power supply device and handshake with the second device according to the handshake process corresponding to the dual-bus communication mode of the first charging protocol.

[0012] In one possible implementation, the first device further includes: a first chip, which is a physical layer chip of a first charging protocol, the first chip including a fourth pin, a fifth pin and a sixth pin; the fourth pin is coupled to a first branch with a first pin of the physical interface, the fifth pin is coupled to a second pin of the physical interface with a second branch, and the sixth pin is coupled to a third pin of the physical interface with a third branch; the first branch, the second branch and the third branch can be turned on or off;

[0013] After detecting that the physical interface is connected to the second device, before successfully establishing communication with the second device using the dual-bus communication method of the first charging protocol, the method also includes: turning on the second branch and the third branch;

[0014] After successfully establishing communication with the second device using the dual-bus communication method of the first charging protocol, before switching the communication method of the first charging protocol from dual-bus communication to single-bus communication, the method further includes: turning on the first branch and disconnecting the second and third branches.

[0015] This method provides a physical layer implementation for switching between dual-bus and single-bus communication modes in the first charging protocol.

[0016] In one possible implementation, the first device further includes: a second chip, which is a physical layer chip of the second charging protocol, the second chip including: a seventh pin for coupling to a first pin of the physical interface; stopping communication with the second device using the second charging protocol includes: turning off the second chip.

[0017] In one possible implementation, the first device further includes: a third chip, which is a physical layer chip of the first communication protocol, the third chip including an eighth pin and a ninth pin, the eighth pin being coupled to a second pin of the physical interface via a fourth branch, and the ninth pin being coupled to a third pin of the physical interface via a fifth branch; the fourth branch and the fifth branch can be turned on or off.

[0018] After disconnecting the second and third branches, and before communicating with the second device using the dual-bus communication method of the first communication protocol, the method further includes: turning on the fourth and fifth branches.

[0019] This method provides an implementation of physical layer link switching under the condition of parallel operation of the first charging protocol and the USB protocol.

[0020] In one possible implementation, the first device is a charging device that successfully hands hand with the second device using a first charging protocol through a handshake process corresponding to the dual-bus communication link, including: sending a preset first pulse sequence to the second device through the second pin, and detecting that the third pin switches from a low-level voltage to a high-level voltage.

[0021] This method provides a possible implementation method for a first device to act as a charging device and use a first charging protocol to handshake with a second device through a handshake process corresponding to a dual-bus communication link.

[0022] In one possible implementation, the first device is a power supply device, and successful communication is established with the second device using a single-bus communication method of the second charging protocol, including: determining that the level of the first pin has risen. This method provides a possible implementation of the first device acting as a power supply device and establishing communication with the second device using a single-bus communication method of the second charging protocol.

[0023] In one possible implementation, the first device is a charging device, and successful communication is established with the second device using a single-bus communication method of a second charging protocol, including: determining that the level of the first pin has decreased. This method provides a possible implementation of the first device acting as a charging device and establishing communication with the second device using a single-bus communication method of a second charging protocol.

[0024] In one possible implementation, the physical interface is a USB interface, the first pin is the CC pin, the second pin and the third pin are the D- pin and the D+ pin, respectively; and / or, the first charging protocol is the UFCS protocol; and / or, the second charging protocol is the PD protocol; and / or, the first communication protocol is the USB protocol.

[0025] Secondly, embodiments of this application provide an electronic device, including:

[0026] Processor, memory; wherein one or more computer programs are stored in memory, and the one or more computer programs include instructions that, when executed by the processor, cause the electronic device to perform the method of any of the first aspects.

[0027] Thirdly, embodiments of this application provide a system including the electronic device described in any of the second aspects.

[0028] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when run on a computer, causes the computer to perform the method of any one of the first aspects.

[0029] Fifthly, embodiments of this application provide a computer program product, which includes a computer program that, when run on a computer, causes the computer to perform the method of any one of the first aspects. Attached Figure Description

[0030] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0031] Figure 1 This is a schematic diagram of the charging direction between devices provided in an embodiment of this application;

[0032] Figure 2 A schematic diagram of the structure of an electronic device provided in an embodiment of this application;

[0033] Figure 3A A schematic diagram of a charging system provided in an embodiment of this application;

[0034] Figure 3B This is another schematic diagram of the charging system provided in the embodiments of this application;

[0035] Figure 4 A schematic flowchart of a device control method provided in an embodiment of this application;

[0036] Figure 5 Another schematic flowchart of the device control method provided in the embodiments of this application;

[0037] Figure 6 This is another schematic diagram of the charging system provided in the embodiments of this application;

[0038] Figure 7 This is a second flowchart illustrating the device control method provided in an embodiment of this application;

[0039] Figure 8 This is a third flowchart illustrating the device control method provided in an embodiment of this application;

[0040] Figure 9 This is a fourth flowchart illustrating the device control method provided in the embodiments of this application;

[0041] Figure 10 A fifth flowchart illustrating the device control method provided in this application embodiment;

[0042] Figure 11 A sixth flowchart illustrating the device control method provided in this application embodiment;

[0043] Figure 12 This is a simplified structural diagram of the charging system of an embodiment of this application. Detailed Implementation

[0044] The terminology used in the implementation section of this application is for the purpose of explaining specific embodiments of this application only, and is not intended to limit this application.

[0045] Charging direction between electronic devices, for example Figure 1 As indicated by the arrows: The charger can charge all electronic devices, and electronic devices can also replenish each other's power. It should be noted that... Figure 1 The charging directions shown are merely examples. In other embodiments, it is also possible for a mobile phone to charge a PC or tablet, or for a smart wearable device such as headphones / watches to charge a mobile phone or tablet. This application does not impose any limitations. Based on the charging direction between electronic devices, the electronic device providing power can be called a power supply device (Source), and the electronic device receiving power can be called a charging device or a power receiving device (SINK).

[0046] Universal Serial Bus (USB), a widely used interface standard, not only supports data transmission but also provides power supply, greatly facilitating device charging. Electronic devices connected via USB interfaces can exchange data in real time using USB protocols such as USB 2.0, and can also be charged using charging protocols.

[0047] Charging devices and power supply equipment interact using charging protocols to clearly define the real-time requirements for charging voltage and current, ensuring charging safety. Currently, there are many types of charging protocols between charging devices and power supply equipment. Taking fast charging protocols as an example, fast charging protocols can include: Quick Charge (QC) protocol, Power Delivery (PD) protocol, Fast Charging Protocol (FCP) & Super Charge Protocol (SCP) (SCP protocol), PE protocol (also known as Pump Express protocol), Adaptive Fast Charging (AFC) protocol, Voltage Open Loop Multi-step Constant-Current Charging (VOOC) protocol, and Super VOOC protocol. There are various charging protocols, such as Miturbo Charge and Flash Charge. Electronic devices from different companies may support different charging protocols. This makes it difficult for electronic devices supporting different charging protocols to be compatible, resulting in poor user charging experience. To solve the compatibility problem, the Universal Fast Charging Specification (UFCS) converged fast charging protocol was developed.

[0048] The UFCS protocol uses signals on the D+ and D- lines to complete protocol interaction and real-time communication regarding charging information (such as real-time requirements for charging voltage and current). This communication link is multiplexed with the data communication link of USB protocols (such as USB 2.0). Therefore, when two electronic devices are connected via a USB interface, only fast charging and USB data communication can be selected simultaneously; it is impossible to simultaneously perform charging based on the UFCS protocol and data communication based on the USB protocol. This causes inconvenience for users. Especially in scenarios where charging and USB data communication need to be completed simultaneously, such as some vehicle-to-mobile phone interactions, users must complete these two processes sequentially, resulting in inconvenience and wasted time, severely degrading the user experience.

[0049] Therefore, this application provides a device control method that can simultaneously satisfy charging based on a charging protocol such as UFCS and data communication based on a communication protocol such as USB, thereby improving the user experience.

[0050] Specifically, in this embodiment of the application, the UFCS protocol is extended to a single-bus communication method based on a single-bus communication link, such as the CC line. For example, the UFCS protocol supports a single-bus communication method based on the CC line and a dual-bus communication method based on the D+ line and the D- line.

[0051] It should be noted that the UFCS protocol in this application embodiment can also be extended to other similar charging protocols that support dual-bus communication and single-bus communication.

[0052] It should be noted that the USB protocol described above can also be extended to other similar protocols.

[0053] Figure 2 A schematic diagram of the structure of the electronic device 100 provided in an embodiment of this application is shown.

[0054] Electronic device 100 may include processor 110, external memory interface 120, internal memory 121, universal serial bus (USB) interface 130, charging management module 140, power management module 141, battery 142, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0055] It is understood that the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0056] Processor 110 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). These different processing units may be independent devices or integrated into one or more processors.

[0057] The controller can generate operation control signals based on the instruction opcode and timing signals to complete the control of instruction fetching and execution.

[0058] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0059] In some embodiments, the processor 110 may include one or more interfaces. Interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0060] USB port 130 is a USB standard compliant interface, specifically a Mini USB port, Micro USB port, USB Type-C port, etc. USB port 130 can be used to connect a charger to charge electronic device 100, and can also be used for data transfer between electronic device 100 and peripheral devices. It can also be used to connect headphones for audio playback. This interface can also be used to connect other electronic devices, such as AR devices.

[0061] The charging management module 140 receives charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 receives charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 receives wireless charging input via the wireless charging coil of the electronic device 100. While charging the battery 142, the charging management module 140 can also supply power to the electronic device via the power management module 141.

[0062] The power management module 141 connects the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, providing power to the processor 110, internal memory 121, display screen 194, camera 193, and wireless communication module 160, etc. The power management module 141 can also monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage current, impedance). In some other embodiments, the power management module 141 may also be located within the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be located in the same device.

[0063] Internal memory 121 can be used to store computer executable program code, which includes instructions. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of electronic device 100 (such as audio data, phonebook, etc.). Furthermore, internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc. Processor 110 executes various functional applications and data processing of electronic device 100 by running instructions stored in internal memory 121 and / or instructions stored in memory located in the processor.

[0064] The device control method of the present application embodiment will be described in more detail below with reference to the structure of the above-mentioned electronic device.

[0065] like Figure 3A As shown, the device control method of this application embodiment can be applied to systems including power supply equipment and charging equipment. The power supply equipment and charging equipment can be interconnected through a physical interface. The aforementioned physical interface can be, for example, a USB interface. The USB interface can specifically be Type-A, Type-B, or Type-C, etc., and this application embodiment does not impose any limitations, as long as the USB interfaces between the power supply equipment and the charging equipment can be used together.

[0066] The physical interface may include: a charging pin, a single-bus communication pin, a dual-bus communication pin 1, a dual-bus communication pin 2, and a GND pin. The charging pin is used to transmit the charging voltage signal; the single-bus communication pin is used to support the formation of a single-bus communication link for single-bus communication signal transmission between devices; and dual-bus communication pins 1 and 2 are used to support the formation of a dual-bus communication link for dual-bus communication signal transmission between devices.

[0067] It is understood that the physical interface may also include other pins, and this application embodiment does not impose any limitations.

[0068] like Figure 3B As shown, taking a USB interface as an example, the USB interface can include: VBUS pin (corresponding to the charging pin), CC pin (corresponding to the single-bus communication pin), D- pin (corresponding to dual-bus communication pin 1), D+ pin (corresponding to dual-bus communication pin 2), and GND pin. When the USB interface of the power supply device is connected to the USB interface of the charging device, the two devices can form a single-bus communication link through the CC line where the CC pin is located, supporting single-bus communication between the two devices. A dual-bus communication link can be formed through the lines where the D- and D+ pins are located, supporting dual-bus communication between the two devices.

[0069] Figure 4 This is a schematic flowchart of a device control method provided in an embodiment of this application, such as... Figure 4 As shown, the method may include:

[0070] Step 401: The first device detects that the physical interface is connected to the second device.

[0071] The method by which the first device detects whether the physical interface is connected to the second device is not limited in this application embodiment, and can be implemented using relevant technologies.

[0072] The first device can be Figure 3A and Figure 3B The power supply device in the system shown can also be a charging device. The first device supports a first charging protocol, a second charging protocol, and a first communication protocol. The first charging protocol supports single-bus communication based on a single-bus communication link and dual-bus communication based on a dual-bus communication link. The second charging protocol supports single-bus communication based on a single-bus communication link. The first communication protocol supports dual-bus communication based on a dual-bus communication link. In related technologies, single-bus communication based on a single-bus communication link can also be referred to as single-bus communication based on a single-bus communication pin, and dual-bus communication based on a dual-bus communication link can also be referred to as dual-bus communication based on a dual-bus communication pin.

[0073] For example, when the physical interface is a USB interface, the first charging protocol can be the UFCS protocol, the second charging protocol can be a single-bus charging protocol such as the PD protocol, and the first communication protocol can be a USB protocol such as USB 2.0 or USB 3.0. The UFCS protocol supports single-bus communication based on the CC link (or CC pin) and also supports dual-bus communication based on the D-link and D+link. The single-bus charging protocol supports single-bus communication based on the CC pin. The USB communication protocol supports dual-bus communication based on the D-link and D+link.

[0074] Step 402: The first device establishes communication with the second device using the dual-bus communication method of the first charging protocol, and establishes communication with the second device using the single-bus communication method of the second charging protocol.

[0075] In some embodiments, the first device establishes communication with the second device using a dual-bus communication method of the first charging protocol. Specifically, this may include the first device performing a handshake with the second device using a handshake process of the dual-bus communication method of the first charging protocol. Correspondingly, if the handshake is successful, the first device successfully establishes communication with the second device using the dual-bus communication method of the first charging protocol; if the handshake fails, the first device fails to establish communication with the second device using the dual-bus communication method of the first charging protocol.

[0076] In some embodiments, the first device establishes communication with the second device using a single-bus communication method of the second charging protocol. Specifically, this may include the first device performing a handshake with the second device using a handshake process of the single-bus communication method of the second charging protocol. Accordingly, if the handshake is successful, the first device successfully establishes communication with the second device using the single-bus communication method of the second charging protocol; if the handshake fails, the first device fails to establish communication with the second device using the single-bus communication method of the second charging protocol.

[0077] If communication with the second device is successfully established using the first charging protocol and communication with the second device is successfully established using the second charging protocol, proceed to step 403;

[0078] If communication with the second device is successfully established using the first charging protocol but fails to be established using the second charging protocol, proceed to step 404.

[0079] If communication with the second device fails using the first charging protocol but succeeds using the second charging protocol, proceed to step 405.

[0080] If communication with the second device fails using both the first and second charging protocols, proceed to step 406.

[0081] Step 403: The first device stops using the second charging protocol to communicate with the second device, switches the first charging protocol from dual-bus communication mode to single-bus communication mode, and executes the charging scheme according to the first charging protocol; the first device then uses the dual-bus communication mode of the first communication protocol to communicate with the second device. This branch of the process ends.

[0082] It should be noted that when switching the first charging protocol from a dual-bus communication mode to a single-bus communication mode, the communication link used by the first charging protocol also needs to be switched from a dual-bus communication link to a single-bus communication link. At this time, the dual-bus communication link occupied by the first charging protocol can be released and then occupied by the first communication protocol, supporting the first device to communicate with the second device using the dual-bus communication mode of the first communication protocol. For specific implementation details, please refer to the exemplary descriptions in the following embodiments.

[0083] During the execution of the charging scheme according to the first charging protocol, the first device can use the single-bus communication method of the first charging protocol to communicate with the second device in real time for exchanging charging information such as charging current and / or charging voltage during the charging process.

[0084] The first device communicates with the second device using a dual-bus communication method based on the first communication protocol, primarily for transmitting information other than charging information.

[0085] In some embodiments, when switching the communication mode of the first charging protocol from dual-bus communication to single-bus communication, a handshake process using the single-bus communication mode of the first charging protocol can be used to handshake with the second device. If the handshake is successful, the communication link of the first charging protocol successfully switches from dual-bus communication to single-bus communication; otherwise, the switch fails, and the communication link of the first charging protocol remains in dual-bus communication. At this time, the first device will execute the charging scheme according to the first charging protocol and communicate with the second device using the dual-bus communication mode of the first charging protocol.

[0086] Step 404: The first device executes the charging scheme according to the first charging protocol. This branch of the process ends.

[0087] During the process of the first device executing the charging scheme according to the first charging protocol, the first device can use the dual-bus communication method of the first charging protocol to communicate with the second device in real time for exchanging charging information such as charging current and / or charging voltage during the charging process.

[0088] Step 405: The first device executes the charging scheme according to the second charging protocol, and this branch process ends.

[0089] Communicate with the second device using a single-bus communication method based on the second charging protocol.

[0090] During the process of the first device executing the charging scheme according to the second charging protocol, the first device can use the single-bus communication method of the second charging protocol to communicate with the second device in real time for exchanging charging information such as charging current and / or charging voltage during the charging process.

[0091] Step 406: The first device establishes communication with the second device using the third charging protocol. If communication is successfully established, the charging plan is executed using the successfully established third charging protocol. This branch of the process ends.

[0092] The third charging protocol in this step is a charging protocol supported by the first device, other than the first and second charging protocols. Taking a USB interface as an example, the third charging protocol could be, for example, the aforementioned QC protocol, FCP & SCP protocol, PE protocol, AFC protocol, VOOC protocol and superVOOC protocol, Miturbo Charge protocol, and / or Flash Charge protocol, etc. It can be understood that if the first device supports two or more third charging protocols in addition to the first and second charging protocols, it can sequentially use each third charging protocol to establish communication with the second device in a preset order until a third charging protocol successfully establishes communication with the second device. In this case, the charging scheme is executed using that third charging protocol; otherwise, if no third charging protocol successfully establishes communication with the second device, the first device does not execute the charging scheme.

[0093] In other embodiments, if the physical interface is a USB interface, the charging scheme can also be executed using the default mode of the USB interface when the first device fails to establish communication with the second device using the third charging protocol.

[0094] In other embodiments, if the first device does not support the third charging protocol, or if the supported third charging protocols fail to establish communication successfully, the first device can terminate the process in this step and not execute the charging scheme.

[0095] In this device control method, the first device can intelligently determine the second device's support for the first charging protocol and the second charging protocol, and intelligently switch the charging protocol and the communication link used by the first charging protocol. In particular, when the second device supports both the first and second charging protocols, it can switch the first charging protocol from dual-bus communication to single-bus communication. This allows the first and second devices to transmit information other than charging information while meeting the requirement of using the first charging protocol, thereby improving the user experience.

[0096] The following describes the device control method of this application embodiment in detail, taking a physical interface of USB, a first charging protocol of UFCS, a second charging protocol of single-bus charging protocol, and a first communication protocol of USB as an example.

[0097] It is understood that the USB interface in the following embodiments can be extended to other physical interfaces, the UFCS protocol (first charging protocol) can be extended to other charging protocols that support both single-bus and dual-bus communication, the single-bus charging protocol (second charging protocol) can be extended to other charging protocols that support single-bus communication, and the USB protocol can be extended to other communication protocols that support dual-bus communication.

[0098] like Figure 5 As shown, the first device can perform the following processing flow:

[0099] The first device detected that the second device was connected via a USB interface;

[0100] The first device uses the dual-bus communication method of the UFCS protocol to handshake with the second device based on the (D+, D-) link, and uses the single-bus charging protocol to handshake with the second device based on the CC link;

[0101] If the handshake with the second device is successful using the dual-bus communication method of the UFCS protocol, and the handshake with the second device is also successful using the single-bus charging protocol, then the single-bus charging protocol is turned off, and the communication method of the UFCS protocol is switched from the dual-bus communication method to the single-bus communication method. The charging scheme is executed according to the UFCS protocol, and the USB 2.0 protocol is used to communicate with the second device.

[0102] If the handshake with the second device is successful using the dual-bus communication method of the UFCS protocol, but the handshake with the second device fails using the single-bus charging protocol, then the charging scheme shall be executed according to the UFCS protocol, and the communication method of the UFCS protocol shall remain the dual-bus communication method.

[0103] If the handshake with the second device fails using the dual-bus communication method of the UFCS protocol, but the handshake with the second device succeeds using the single-bus charging protocol, then the charging scheme shall be executed according to the single-bus charging protocol.

[0104] If the handshake with the second device fails using the dual-bus communication method of the UFCS protocol, and also fails using the single-bus charging protocol, then attempt to execute the charging scheme according to the third charging protocol or the USB default mode.

[0105] Figure 6 This is a schematic diagram of a circuit implementation structure of the power supply device and charging device provided in the embodiments of this application, such as... Figure 6As shown, the power supply device may include a USB interface 1, a processor 1, a single-bus charging protocol physical layer (PHY) chip 1, a UFCS physical layer chip 1, and a USB physical layer chip 1; wherein,

[0106] Single-bus charging protocol physical layer chip 1 is a physical layer chip that supports a single charging protocol; UFCS physical layer chip 1 is a physical layer chip that supports the UFCS protocol; and USB physical layer chip 1 is a physical layer chip that supports the USB protocol.

[0107] The processor 1 is coupled to the single-bus charging protocol physical layer chip 1, the UFCS physical layer chip 1 and the USB physical layer chip 1 respectively, so that the processor 1 can communicate with the above physical layer chips, such as receiving information sent by the physical layer chips or sending control commands to the physical layer chips.

[0108] The single-bus charging protocol physical layer chip 1 may include a CC pin, coupled to the CC pin of the USB interface 1. In this embodiment, since the single-bus charging protocol physical layer chip 1 does not include D- and D+ pins, the connection / disconnection of the branch between the CC pin of the single-bus charging protocol physical layer chip 1 and the CC pin of the USB interface 1 can be achieved by turning the single-bus charging protocol physical layer chip 1 on and off, rather than by setting a switch in the branch. In other embodiments, a switch may also be set in the branch between the CC pin of the single-bus charging protocol physical layer chip 1 and the CC pin of the USB interface 1 to realize the connection and disconnection of the branch.

[0109] The UFCS physical layer chip 1 includes a CC pin, a D- pin, and a D+ pin. A switch S112 is coupled between the CC pin of the UFCS physical layer chip 1 and the CC pin of the USB interface 1. By controlling the on / off state of switch S112, the branch between the CC pin of the UFCS physical layer chip 1 and the CC pin of the USB interface 1 can be switched on / off. A switch S14 is coupled between the D- pin of the UFCS physical layer chip 1 and the D- pin of the USB interface 1. By controlling the on / off state of switch S14, the branch between the D- pin of the UFCS physical layer chip 1 and the D- pin of the USB interface 1 can be switched on / off. A switch S13 is coupled between the D+ pin of the UFCS physical layer chip 1 and the D+ pin of the USB interface 1. By controlling the on / off state of switch S13, the branch between the D+ pin of the UFCS physical layer chip 1 and the D+ pin of the USB interface 1 can be switched on / off.

[0110] The USB physical layer chip 1 includes a D- pin and a D+ pin. A switch S15 is coupled between the D- pin of the USB physical layer chip 1 and the D- pin of the USB interface 1. By controlling the on and off state of switch S15, the branch between the D- pin of the USB physical layer chip 1 and the D- pin of the USB interface 1 can be switched on and off. A switch S16 is coupled between the D+ pin of the USB physical layer chip 1 and the D+ pin of the USB interface 1. By controlling the on and off state of switch S16, the branch between the D+ pin of the USB physical layer chip 1 and the D+ pin of the USB interface 1 can be switched on and off.

[0111] like Figure 6 As shown, the power supply equipment also includes:

[0112] The voltage supply terminal V+ is coupled to the CC pin of USB interface 1 through a series resistor R11 and switch S11. The CC pin of USB interface 1 is coupled to ground through a series switch S12 and resistor R12.

[0113] The voltage supply terminal V+ is coupled to the D- pin of the USB physical layer chip 1 through a series resistor R13 and a switch S17. The D- pin of the USB physical layer chip 1 is coupled to ground through a series switch S19 and a resistor R15.

[0114] The voltage supply terminal V+ is coupled to the D+ pin of the USB physical layer chip 1 through a series resistor R14 and a switch S18. The D+ pin of the USB physical layer chip 1 is coupled to ground through a series switch S11 and a resistor R16.

[0115] Through the above circuit connection, the voltage of the CC pin, D- pin, and D+ pin can be increased or decreased respectively.

[0116] In some embodiments, the switching on or off of switches S11-S19 and S11-S112 in the power supply equipment can be controlled by processor 1.

[0117] like Figure 6 As shown, the circuit connection relationship on the charging device side is similar to that on the power supply device side. The specific circuit implementation can be found in the circuit implementation description on the power supply device side above, and will not be repeated here.

[0118] The following combination Figure 4 and Figure 5 The device control method shown and Figure 6 The circuit structure shown is provided as an example to further illustrate the device control method of the embodiments of this application.

[0119] The following is passed Figure 7This describes a possible implementation method for the first device, when it is a power supply device, to handshake with the second device (i.e., a charging device) via a dual-bus communication method of the UFCS protocol. In some embodiments, this method can be specifically executed by a processor in the first device. Figure 7 As shown, the method may include:

[0120] Step 701: The first device short-circuits the D+ and D- lines.

[0121] Combination Figure 6 In the circuit structure shown, after the first device detects that the physical interface is connected to the second device, before shorting the D+ and D- lines, the first device (e.g., processor 1) can control switches S13 and S14 to be turned on, thereby turning on the branch between the D- pin of the UFCS physical layer chip 1 on the power supply side and the D- pin of the USB interface 1, and turning on the branch between the D+ pin of the UFCS physical layer chip 1 on the power supply side and the D+ pin of the USB interface 1.

[0122] Combination Figure 6 In some embodiments, this step can be implemented by the processor 1 controlling the UFCS physical layer chip 1.

[0123] Step 702: The first device determines whether a preset pulse sequence is detected from the D-pin. If yes, proceed to step 703; otherwise, proceed to step 705.

[0124] The specific implementation of the preset pulse sequence is not limited in the embodiments of this application.

[0125] The method by which the first device detects the preset pulse sequence from the D-pin is not limited in this application embodiment. For example, it can be detected by the UFCS physical layer chip 1 and the detection result is sent to the processor 1.

[0126] Step 703: The first device releases the short circuit between the D+ and D- lines, and proceeds to step 704.

[0127] Combination Figure 6 In some embodiments, this step can be implemented by the processor 1 controlling the UFCS physical layer chip 1.

[0128] Step 704: The first device has successfully established a handshake with the second device using the UFCS protocol's dual-bus communication method. This branch of the process ends.

[0129] Step 705: The first device determines whether the duration of the preset pulse sequence has reached the preset duration T1. If yes, proceed to step 706; otherwise, return to step 702.

[0130] The specific value of the preset duration T1 is not limited in this embodiment of the application.

[0131] Step 706: The first device has failed to handshake with the second device using the dual-bus communication method of the UFCS protocol. This branch of the process ends.

[0132] Combination Figure 6 In the circuit structure shown, after the first device determines that the handshake with the second device using the dual-bus communication method of the UFCS protocol has failed, the first device (e.g., processor 1) can control switches S13 and S14 to open, thereby disconnecting the branch between the D-pin of the UFCS physical layer chip 1 on the power supply side and the D-pin of the USB interface 1, and disconnecting the branch between the D+ pin of the UFCS physical layer chip 1 on the power supply side and the D+ pin of the USB interface 1, thereby releasing the right of the UFCS protocol, or the UFCS physical layer chip 1, to use the dual-bus communication link formed by the D-pin and D+ pin.

[0133] The following is passed Figure 8 This describes the handshake process between the first device and the second device (i.e., the power supply device) via a dual-bus communication method of the UFCS protocol when the first device is a charging device. In some embodiments, this method may be executed by a processor in the first device. Figure 8 As shown, the method may include:

[0134] Step 801: The first device determines whether the VBUS pin detects a charging voltage. If yes, proceed to step 802; otherwise, continue to step 801 to make the determination.

[0135] It should be noted that the first device may have a preset time T2 for detecting the preset voltage. If the preset voltage is not detected within the preset time T2, it is determined that the handshake with the second device through the dual-bus communication method of the UFCS protocol has failed.

[0136] The specific implementation method for the first device to determine whether the VBUS pin has detected a charging voltage is not limited in this application embodiment, as long as the processor 1 of the first device can obtain the detection result.

[0137] Step 802: The first device determines whether it is in dedicated power supply mode. If so, proceed to step 803; otherwise, this branch process ends.

[0138] The proprietary power supply mode here refers to the preset charging mode based on the UFCS protocol.

[0139] Step 803: The first device sets the detection counter to 1.

[0140] Step 804: The first device outputs a preset pulse sequence to the second device via the D-line.

[0141] Specifically, such as Figure 8 As shown, the first device can output a high-level voltage for a duration of tDet1 via the D-line, followed by a low-level voltage for a duration of tDet2, then a high-level voltage for a duration of tDet3, and finally a low-level voltage for a duration of tDet4, thereby outputting a preset pulse sequence to the second device via the D-line. The specific values ​​of the durations tDet1 to tDet4 depend on the preset pulse sequence, and this embodiment does not impose any limitations.

[0142] Combination Figure 6 The circuit structure shown allows the processor 2 to control the UFCS physical layer chip 2 to output a preset pulse sequence via the D-line.

[0143] Step 805: The first device determines whether a high-level voltage is detected on the D+ line. If yes, proceed to step 806; otherwise, proceed to step 807.

[0144] Step 806: The first device confirms that it has successfully handshaked with the second device through the dual-bus communication method of the UFCS protocol, and this branch process ends.

[0145] Step 807: The first device determines whether the detection time of the D+ line exceeds the preset duration T3. If yes, proceed to step 808; otherwise, return to step 805.

[0146] Step 808: The first device determines whether the value of the detection counter is greater than the number of times threshold. If yes, proceed to step 809; otherwise, proceed to step 810.

[0147] Step 809: The first device determines that the handshake with the second device via the dual-bus communication method of the UFCS protocol has failed, and this branch of the process ends.

[0148] In some embodiments, after the first device determines that the handshake with the second device has failed, it can control switches S13 and S14 to open, so that D- and D+ enter a high-resistance state.

[0149] Step 810: The first device increments the value of the detection counter by 1 and returns to step 804.

[0150] Combination Figure 6 In the circuit structure shown, after the first device detects that the physical interface is connected to the second device, and before the first device outputs a preset pulse sequence to the second device through the D- line, the first device (e.g., processor 2) can control switches S23 and S24 to be turned on, thereby turning on the branch between the D- pin of the charging device side UFCS physical layer chip 2 and the D- pin of the USB interface 2, and turning on the branch between the D+ pin of the charging device side UFCS physical layer chip 2 and the D+ pin of the USB interface 2.

[0151] Combination Figure 6 In the circuit structure shown, after the first device determines in step 809 that the handshake with the second device using the dual-bus communication method of the UFCS protocol has failed, the first device (e.g., processor 2) can control switches S23 and S24 to open, thereby disconnecting the branch between the D-pin of the UFCS physical layer chip 2 on the charging device side and the D-pin of the USB interface 2, and disconnecting the branch between the D+ pin of the UFCS physical layer chip 2 on the charging device side and the D+ pin of the USB interface 2, thereby releasing the right of the UFCS protocol, or the UFCS physical layer chip 2, to use the dual-bus communication link formed by the D-pin and D+ pin.

[0152] The following is passed Figure 9 This describes the method flow for the first device to handshake with the second device (i.e., the charging device) via a single-bus communication method using a single-bus charging protocol when the first device is a power supply device. In some embodiments, this method may be executed by a processor in the first device. Figure 9 As shown, the method may include:

[0153] Step 901: The first device determines whether a voltage increase is detected on the CC line. If yes, proceed to step 902; otherwise, proceed to step 903.

[0154] Combination Figure 6 In the circuit structure shown, before the first device executes step 901, the processor 1 can first turn on the single-bus charging protocol physical layer chip 1 to put it into working state.

[0155] Step 902: The first device confirms that it has successfully handshaked with the second device through the single-bus communication method of the single-bus charging protocol, and this branch process ends.

[0156] Step 903: The first device determines whether the detection time has reached the preset time T4. If yes, proceed to step 904; otherwise, return to step 901 to continue the judgment.

[0157] Step 904: The first device determines that the handshake with the second device via the single-bus communication method of the single-bus charging protocol has failed.

[0158] The following is passed Figure 10 This describes the method flow for the first device to handshake with the second device (i.e., the power supply device) via a single-bus communication method of a single-bus charging protocol when the first device is a charging device. In some embodiments, this method may be executed by a processor in the first device. Figure 10 As shown, the method may include:

[0159] Step 1001: The first device determines whether the VBUS pin detects a charging voltage. If yes, proceed to step 1002; otherwise, continue to step 1001 to make the determination.

[0160] Step 1002: The first device determines whether the CC line has detected a decrease in level. If yes, proceed to step 1003; otherwise, proceed to step 1004.

[0161] Step 1003: The first device confirms that it has successfully handshaked with the second device through the single-bus communication method of the single-bus charging protocol, and this branch process ends.

[0162] Step 1004: The first device determines whether the detection time has reached the preset time T5. If yes, proceed to step 1005; otherwise, return to step 1002 to continue the judgment.

[0163] Step 1005: The first device determines that the handshake with the second device via the single-bus communication method of the single-bus charging protocol has failed.

[0164] Figure 10 In the method shown, the single-bus charging protocol defaults to having a charging voltage on the VBUS line before a successful handshake. In other embodiments, if the single-bus charging protocol defaults to having no charging voltage on the VBUS line before a successful handshake, then step 1001 can be omitted, for example... Figure 11 As shown.

[0165] like Figure 12 As shown, Figure 6 The simplified structural diagram shown below is combined with... Figure 12 Explain the working principle of the increase and decrease of CC line voltage in the handshake process of the single-bus charging protocol.

[0166] like Figure 12 As shown, before the USB interfaces of the power supply device and the charging device are connected, the power supply device can keep switch S11 on and S12 off, while the charging device can keep switch S21 off and S22 on. After the USB interfaces of the power supply device and the charging device are connected, a path is formed between them via the CC line. The power supply device can detect a decrease in voltage on the CC line, while the charging device can detect an increase in voltage on the CC line. This method can be used to identify whether the USB interfaces of the power supply device and the charging device are connected, and can also serve as a handshake implementation method for the single-bus charging protocol.

[0167] In some embodiments, the power supply device side and the charging device side can also determine the power supply capability of the power supply device based on the different values ​​of the pull-up and pull-down resistors.

[0168] In some scenarios, two electronic devices can act as both power supply and charging devices for each other. Figure 6 In the circuit shown, the power supply device is device 1 and the charging device is device 2. In the process of the single-bus charging protocol identifying device access or handshaking, the truth table of the switch control on the power supply device and the charging device side is shown in Table 1 below.

[0169]

[0170] Table 1

[0171] Based on a principle similar to that of the CC line, the truth table of switch control between two devices that are power supply devices and charging devices in the USB protocol device identification can be obtained, as shown in Table 2 below.

[0172]

[0173]

[0174] Table 2

[0175] Table 3 below illustrates the truth table of switch control between two devices that are each other's power supply and charging devices, in a dual-bus communication scenario using the UFCS protocol based on a dual-bus communication link, and in a single-bus communication scenario using the UFCS protocol based on a single-bus communication link and the USB protocol based on a dual-bus communication link.

[0176]

[0177] Table 3

[0178] In the table above, 1 indicates that the switch is on, and 0 indicates that the switch is off.

[0179] Currently, the UFCS protocol conducts full-duplex communication through a dual-bus communication link. In practical applications, charging devices using the UFCS protocol carry content communication via a dual-bus communication link based on D+ and D-. This application's embodiments demonstrate a single-bus communication method extended from the UFCS protocol. In some embodiments, full-duplex implementation based on the dual-bus communication mode of UFCS protocol versions 1.0 and 2.0 can be achieved by adjusting the D+ and D- signals to a master-slave half-duplex configuration and transmitting them on the CC line, thus realizing single-bus communication of the UFCS protocol.

[0180] The device implementation method of this application embodiment is applicable to systems that combine charging and communication, including but not limited to systems composed of the following combinations: speakers and mobile phones that support charging and data transmission, personal computers (PCs) and mobile phones that support mutual charging, mobile phones and mobile phones that support mutual charging, vehicle systems and mobile phones, vehicle systems and tablet computers (PADs), two-wheeled electric vehicles and mobile phones, two-wheeled electric vehicles and PADs, outdoor smart devices and terminals, etc.

[0181] It should be noted that the physical interface in this application embodiment is not limited to a USB interface, and can be extended to other interfaces or a customized physical interface based on this application embodiment. The cables used in this application embodiment include, but are not limited to, CC and AC cables, or cables that meet the requirements of this application embodiment can also be customized.

[0182] This application also provides an electronic device, including a processor and a memory, wherein the processor is used to implement the method provided in this application.

[0183] This application also provides a system including the power supply equipment and charging equipment described above.

[0184] This application also provides a computer-readable storage medium storing a computer program that, when run on a computer, causes the computer to execute the method provided in this application.

[0185] This application also provides a computer program product, which includes a computer program that, when run on a computer, causes the computer to perform the method provided in this application.

[0186] In this application embodiment, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent the existence of A alone, A and B simultaneously, or B alone. A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of singular or plural items. For example, at least one of a, b, and c can represent: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, and c can be single or multiple.

[0187] Those skilled in the art will recognize that the units and algorithm steps described in the embodiments disclosed herein can be implemented using electronic hardware, computer software, or a combination of electronic hardware and software. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0188] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0189] In the several embodiments provided in this application, any function, if implemented as a software functional unit and sold or used as an independent product, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0190] The above description is merely a specific embodiment of this application. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the protection scope of this application. The protection scope of this application should be determined by the protection scope of the claims.

Claims

1. A device control method, characterized in that, The first device is applied to a physical interface, which includes a first pin, a second pin, and a third pin. The first pin is used to support the formation of a single-bus communication link, and the second and third pins are used to support the formation of a dual-bus communication link. The first device supports a first charging protocol, a second charging protocol, and a first communication protocol. The first charging protocol supports single-bus communication based on the single-bus communication link and also supports dual-bus communication based on the dual-bus communication link. The second charging protocol supports single-bus communication based on the single-bus communication link, and the first communication protocol supports dual-bus communication based on the dual-bus communication link. The method includes: The physical interface was detected to be connected to the second device; When communication with the second device is successfully established using the dual-bus communication method of the first charging protocol and the single-bus communication method of the second charging protocol, communication with the second device using the second charging protocol is stopped, the charging scheme is executed according to the first charging protocol, and the communication method of the first charging protocol is switched from the dual-bus communication to the single-bus communication. The device communicates with the second device using the dual-bus communication method of the first communication protocol.

2. The method according to claim 1, characterized in that, Also includes: If communication with the second device is successfully established using the dual-bus communication method of the first charging protocol, and communication with the second device fails to be established using the single-bus communication method of the second charging protocol, the charging scheme shall be executed according to the first charging protocol, and the communication method of the first charging protocol shall remain as dual-bus communication.

3. The method according to claim 1, characterized in that, Also includes: If communication with the second device fails using the dual-bus communication method of the first charging protocol, but successfully establishes communication with the second device using the single-bus communication method of the second charging protocol, the charging scheme shall be executed according to the second charging protocol.

4. The method according to claim 1, characterized in that, Also includes: If communication with the second device fails to be established using the dual-bus communication method of the first charging protocol, and communication with the second device fails to be established using the single-bus communication method of the second charging protocol, the charging scheme shall be executed according to the third charging protocol or the default mode of the physical interface. The third charging protocol is a charging protocol other than the first charging protocol and the second charging protocol among the charging protocols supported by the first device.

5. The method according to claim 1, characterized in that, The successful establishment of communication with the second device using the dual-bus communication method of the first charging protocol includes: The handshake with the second device was successful, following the handshake process corresponding to the dual-bus communication method of the first charging protocol.

6. The method according to claim 5, characterized in that, The first device is a power supply device, and the handshake process corresponding to the dual-bus communication method of the first charging protocol successfully hands with the second device, including: The preset first pulse sequence sent by the second device is detected by the third pin, and the short-circuit link between the second pin and the third pin and ground is disconnected respectively.

7. The method according to any one of claims 1 to 6, characterized in that, The first device further includes: a first chip, which is the physical layer chip of the first charging protocol, the first chip including a fourth pin, a fifth pin and a sixth pin; the fourth pin is coupled to a first pin of the physical interface via a first branch, the fifth pin is coupled to a second pin of the physical interface via a second branch, and the sixth pin is coupled to a third pin of the physical interface via a third branch; the first branch, the second branch and the third branch can be turned on or off; After detecting that the physical interface is connected to the second device, but before successfully establishing communication with the second device using the dual-bus communication method of the first charging protocol, the method further includes: Connect the second branch and the third branch; After successfully establishing communication with the second device using the dual-bus communication method of the first charging protocol, before switching the communication method of the first charging protocol from the dual-bus communication to the single-bus communication, the method further includes: Connect the first branch, and disconnect the second and third branches.

8. The method according to claim 7, characterized in that, The first device further includes: a second chip, which is a physical layer chip of the second charging protocol, and the second chip includes: a seventh pin, which is used to couple to the first pin of the physical interface; The step of stopping communication with the second device using the second charging protocol includes: The second chip is turned off.

9. The method according to claim 7, characterized in that, The first device further includes: a third chip, which is the physical layer chip of the first communication protocol, the third chip including an eighth pin and a ninth pin, the eighth pin being coupled to a second pin of the physical interface via a fourth branch, and the ninth pin being coupled to a third pin of the physical interface via a fifth branch; the fourth branch and the fifth branch can be turned on or off. After disconnecting the second branch and the third branch, and before communicating with the second device using the dual-bus communication method of the first communication protocol, the method further includes: Connect the fourth branch and the fifth branch.

10. The method according to claim 5, characterized in that, The first device is a charging device, and the step of successfully handshaking with the second device using the first charging protocol through the handshake process corresponding to the dual-bus communication link includes: A preset first pulse sequence is sent to the second device through the second pin, and the third pin is detected to switch from a low level voltage to a high level voltage.

11. The method according to any one of claims 1 to 6, characterized in that, The first device is a power supply device, and the successful establishment of communication with the second device using the single-bus communication method of the second charging protocol includes: Determine if the level of the first pin increases.

12. The method according to any one of claims 1 to 6, characterized in that, The first device is a charging device, and the successful establishment of communication with the second device using the single-bus communication method of the second charging protocol includes: Determine that the level of the first pin has decreased.

13. The method according to any one of claims 1 to 12, characterized in that, The physical interface is a USB interface, the first pin is the CC pin, and the second and third pins are the D- and D+ pins, respectively; and / or, The first charging protocol is the UFCS protocol; and / or, The second charging protocol is the PD protocol; and / or, The first communication protocol is the USB protocol.

14. An electronic device, characterized in that, include: Processor, memory; One or more computer programs are stored in the memory, the one or more computer programs including instructions that, when executed by the processor, cause the electronic device to perform the method of any one of claims 1 to 13.

15. A system, characterized in that, Includes the electronic device as described in claim 14.

16. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when run on a computer, causes the computer to perform the method described in any one of claims 1 to 13.

17. A computer program product, characterized in that, The computer program product includes a computer program that, when run on a computer, causes the computer to perform the method according to any one of claims 1 to 13.